Commit Graph

8 Commits (fa67c24df3455c97677d55a9ef8003d1924f5fd2)

Author SHA1 Message Date
Anatoliy Mayorov 2ad1395aab refactor: run eslint and prettier on codebase 2022-10-29 22:53:09 +03:00
Anatoliy Mayorov 7e5360ad97 chore(tsconfig): add base tsconfig.json 2022-10-23 10:33:45 +03:00
Thomas Bouffard 4622527af8
Merge pull request #124 from mayorovad/issue-96 2022-10-09 22:32:39 +02:00
Anatoliy Mayorov 1603729a9b fix: types of Hierarchical and Swimlane Layout #96 2022-10-08 21:43:35 +03:00
Thomas Bouffard b7cfeebd23 ts-example: restore the rounded shape in the custom rectangle 2022-09-24 11:16:26 +02:00
Thomas Bouffard ea836a1fb5
chore: improve vite config in ts-example (#104)
bump vite from 2.9.12 to 3.1.0
add vite config to generate a dedicated chunk for maxgraph@core. It lets know the size the produced bundle in an
external application and if tree shaking works.
2022-09-14 13:15:04 +02:00
Thomas Bouffard f9d757548e
doc: update copyright and license in source file headers (#100)
Ensure that all source files contain the Apache-2.0 license and that the 'maxGraph Contributors' are mentioned.
2022-08-30 17:36:33 +02:00
Thomas Bouffard 893ad44ff2
chore: improve the configuration to build the npm package (#87)
Root and all package.json files
  - Fix license, version and authors
  - Remove the non-relevant .npmignore file at the project. It was designed for mxgraph, the whole directory structure
  changed, and we don't plan to publish the root package

`core` package
  - Generate type definition and javascript files for ESM output
    - dedicated folder for `esm` and `types` in the `dist` folder to clearly separate concerns
    - exported in the package.json
  - Add npm script for `npm pack` configuration
  - Drop the `postinstall` npm script that built the `core` bundle. It would have been run when the package is installed
  in dependent projects at dependencies install. And it would have failed as it tries to build the project from TypeScript
  sources that are not available in the npm package.

fix: ConstraintHandler now loads image as everywhere else in the code using `Client.imageBasePath`
Using import doesn't work as the image is not available in the npm package. It generated error like this in ViteJS
project:
Failed to resolve import "../../../images/point.gif" from "../core/dist/esm/view/handler/ConstraintHandler.js". Does the file exist?
This gif import had been introduced to make `Anchors.stories.js` retrieve the gif file. Configuring `imageBasePath` as
already done in other stories fixes the issue.

Don't export EditorCodec and StylesheetCodec as they generate errors.
This is a temporary solution to avoid error in dependent project (at least, with ViteJS projects).
2022-07-05 08:08:25 +02:00