Commit Graph

9 Commits (7544da2da3aaa9488da03059fb76c24637ad485a)

Author SHA1 Message Date
Thomas Bouffard 7544da2da3 chore(release): prepare version 0.6.0
Also improve the release procedure.
2023-12-22 08:26:38 +01:00
Thomas Bouffard 99ffdfa29b
feat: add `ModelXmlSerializer` to import/export the model (#290)
This class was previously only available in test. It simplifies maxGraph
model import/export as:
  - it hides `Codec` and `HTMLElement` management
  - it registers codecs automagically
2023-12-18 15:53:43 +01:00
Thomas Bouffard f9b2d7d19a
refactor!: move codecs to dedicated files and reduce side effects (#289)
Previously, codec classes were defined and registered in the same file
as the class they targeted. This prevented efficient tree-shaking: as
soon as the target class was imported (e.g. `StyleSheet`), the
corresponding codec was also imported (`StyleSheetCodec`). As a result,
a large amount of codec code (and dependent code) was present in
applications incorporating maxGraph, even if they didn't use the codec
function. As there are currently many problems with the codec function
that make it almost unusable, this was a great waste.

Codecs are no longer registered by default, which reduces side effects
and coupling.
It also greatly improves tree-shaking.
For example, in the `ts-example` application included in this repository
which doesn't use the "codec" feature, the size of the minified
`maxGraph` chunk goes from `568.58 kB` to `467.90 kB`, which corresponds
to a size reduction of `17.7%`!


BREAKING CHANGE: Codecs supplied by `maxGraph` are no longer registered
by default. They MUST be registered before performing an `encode` or
`decode`. You can use one of the following functions to register codecs:
  - `registerAllCodecs`
  - `registerCoreCodecs`
  - `registerEditorCodecs`
2023-12-13 17:39:40 +01:00
Thomas Bouffard 1507490c72
docs(release): improve the "examples repository update" paragraph (#285)
Changes are based on the feedback collected during the  `0.5.0` release:
  - Use Dependabot to update `maxGraph`
  - Fix link to GitHub releases.
2023-12-11 08:49:27 +01:00
Thomas Bouffard 9463e1e21e chore(release): prepare version 0.5.0
Also improve the documentation of the release procedure.
2023-12-07 16:57:36 +01:00
Thomas Bouffard 068a50f35c
docs: remove extra "markdown-page" page (#274)
This page is an example from the Docusaurus initialization. It has been
kept by mistake.
2023-12-04 02:35:28 +01:00
Thomas Bouffard d46e99a114
docs: improve the migration guide from mxGraph (#271)
Provide various improvements
  - fix `InternalEvent`
  - improve `Client`
  - improve explanations about plugins
  - removed `mxUtils` methods
  - removed `isVisible` methods

Also use more admonitions.
2023-12-04 00:57:50 +01:00
Thomas Bouffard 17f31fcc5c
chore: clean before pack (#270)
This simplifies the release procedure. No manual cleaning is required,
this reduces the risk of errors.
2023-12-03 21:50:14 +01:00
Thomas Bouffard 6e6009aebd
docs: build the user documentation with Docusaurus (#264)
Initiate the website with Docusaurus v3.
Setup the site and includes the content that was already available in
the `docs` package.
The currently implementation mainly uses the default theme available
when using the Docusaurus scaffolding. It was initiated with:
`npx create-docusaurus@3.0.0 my-website classic`
2023-11-27 18:53:52 +01:00