- Create a NOTICE file. It references the list of contributors that re-licensed their commits to Apache License, Version 2.0.
- So we can restore the Apache-2.0 license.
- Also update the README and the Pull Request template as there is no more warning about the license.
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).
The README is the main entry point of the lib. It should provide the main information about the project and should attract potential users.
Previously, it was a mix of technical information and outdated sentences about the good old mxGraph.
This is a first attempt to improve things. In short
- First present what the lib does and the project status.
- Then, provide a code example and a gif to let potential users see the rendering at a glance.
- Remove inaccurate content and refresh the project history.