From b357dcb62e1e886521d9262cab5db9da549a1847 Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Wed, 12 Aug 2026 15:37:31 +0200 Subject: [PATCH 1/8] chore: use changesets to support an automatic release process --- .changeset/README.md | 8 + .changeset/clear-maps-begin.md | 6 + .changeset/config.json | 51 +++ .github/pull_request_template.md | 1 + .github/workflows/release.yml | 141 ++++++++ .github/workflows/test-pr.yml | 12 + CONTRIBUTING.md | 60 ++++ package.json | 3 + packages/joint-cli/package.json | 3 +- packages/joint-core/CHANGELOG.md | 278 +++++++++++++++ packages/joint-core/package.json | 3 +- packages/joint-decorators/package.json | 5 +- packages/joint-eslint-config/package.json | 2 +- .../joint-layout-directed-graph/CHANGELOG.md | 106 ++++++ .../joint-layout-directed-graph/package.json | 3 +- packages/joint-layout-msagl/CHANGELOG.md | 41 +++ packages/joint-layout-msagl/package.json | 5 +- packages/joint-react/CHANGELOG.md | 27 ++ packages/joint-react/package.json | 3 +- .../joint-shapes-general-tools/package.json | 1 + packages/joint-shapes-general/package.json | 1 + .../joint-vitest-plugin-mock-svg/package.json | 3 +- yarn.lock | 334 +++++++++++++++++- 23 files changed, 1085 insertions(+), 12 deletions(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/clear-maps-begin.md create mode 100644 .changeset/config.json create mode 100644 .github/workflows/release.yml create mode 100644 packages/joint-core/CHANGELOG.md create mode 100644 packages/joint-layout-directed-graph/CHANGELOG.md create mode 100644 packages/joint-layout-msagl/CHANGELOG.md create mode 100644 packages/joint-react/CHANGELOG.md diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000000..654c6d4750 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets). + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md). diff --git a/.changeset/clear-maps-begin.md b/.changeset/clear-maps-begin.md new file mode 100644 index 0000000000..f0184f387e --- /dev/null +++ b/.changeset/clear-maps-begin.md @@ -0,0 +1,6 @@ +--- + +--- + + + \ No newline at end of file diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000000..307a23116e --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@4.0.0/schema.json", + "baseBranch": "master", + "access": "public", + "changelog": "@changesets/cli/changelog", + "commit": false, + "ignore": [], + "fixed": [], + "linked": [], + "updateInternalDependencies": "patch", + "privatePackages": { + "version": false, + "tag": false + }, + "changedFilePatterns": [ + "**", + "!**/*.test.{js,jsx,ts,tsx,mjs}", + "!**/test/**", + "!**/__tests__/**", + "!**/__mocks__/**", + "!**/bench/**", + "!**/demo/**", + "!**/stories/**", + "!**/.storybook/**", + "!**/dist/**", + "!**/build/**", + "!**/coverage/**", + "!**/coverage.json", + "!**/.tscache/**", + "!**/scripts/**", + "!**/grunt/**", + "!**/Gruntfile.js", + "!**/Makefile", + "!**/rollup.config.*", + "!**/rollup.resources.mjs", + "!**/vite.config.*", + "!**/vitest.workspace.*", + "!**/jest.config.js", + "!**/jest.react18.config.mjs", + "!**/karma.conf.js", + "!**/tsconfig*.json", + "!**/dts-generator.config.js", + "!**/knip.json", + "!**/typedoc.*", + "!**/.prettierrc*", + "!**/.gitignore", + "!**/eslint.config.mjs", + "!**/*.md", + "!**/LICENSE" + ] +} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d015073ee9..a3b7eb9b7d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -7,6 +7,7 @@ Please verify that: * [ ] If applicable, there are new or updated unit tests validating the change * [ ] If applicable, there are new or updated @types * [ ] If applicable, documentation has been updated +* [ ] If the change is releasable, you've added a changeset (`yarn changeset`) --> ## Description diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..dd904f6868 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,141 @@ +# Release pipeline, driven by Changesets (https://changesets.dev). +# +# On every push to `master` this workflow decides between two modes: +# +# * `version` - there are pending changesets in `.changeset/`. The workflow +# applies the version bumps + per-package `CHANGELOG.md` entries, deletes +# the consumed changesets and opens (or updates) `changeset-release/master` +# PR titled "Version Packages". +# * `publish` - the release PR has been merged, so the versions in `master` +# are ahead of what is on npm. The workflow builds the workspace, publishes +# every changed public package, and creates a git tag + GitHub Release per +# published package. +# +# Nothing is published until the release PR is merged by a maintainer. +# +# Repository setup: +# * Settings > Actions > General > "Allow GitHub Actions to create and approve +# pull requests" must be enabled (needed to open the release PR). +# * Secret `NPM_TOKEN` - an npm automation token that bypasses 2FA. +# +# Note: the release PR is opened by `github-actions[bot]`, so `test-pr.yml` does +# not run on it. +name: Release + +on: + push: + branches: [ "master" ] + +# Reset permissions and grant them explicitly per job. +permissions: {} + +# Never release twice at the same time. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + # Decide whether this push should version or publish. + select-mode: + if: ${{ github.repository == 'clientIO/joint' }} + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + mode: ${{ steps.select-mode.outputs.mode }} + steps: + - name: Checkout joint + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Setup Node.js v22 + uses: actions/setup-node@v4 + with: + node-version: 22.14.0 + + - name: Cache Yarn + uses: actions/cache@v4 + with: + path: | + .yarn/cache + key: yarn-cache-${{ hashFiles('yarn.lock') }} + + - name: Install dependencies + run: yarn install --immutable + + - name: Select Changesets mode + id: select-mode + uses: changesets/action/select-mode@v2 + + # Pending changesets: open/update the "Version Packages" PR. + version: + needs: select-mode + if: ${{ needs.select-mode.outputs.mode == 'version' }} + runs-on: ubuntu-latest + permissions: + contents: write # commit the version bumps + pull-requests: write # open the release PR + steps: + - name: Checkout joint + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Setup Node.js v22 + uses: actions/setup-node@v4 + with: + node-version: 22.14.0 + + - name: Cache Yarn + uses: actions/cache@v4 + with: + path: | + .yarn/cache + key: yarn-cache-${{ hashFiles('yarn.lock') }} + + - name: Install dependencies + run: yarn install --immutable + + # Runs `changeset version` and pushes the result to `changeset-release/master`. + - name: Version packages + uses: changesets/action/version@v2 + + # Release PR merged: build and publish everything that is not on npm yet. + publish: + needs: select-mode + if: ${{ needs.select-mode.outputs.mode == 'publish' }} + runs-on: ubuntu-latest + permissions: + contents: write # push git tags and create GitHub Releases + steps: + - name: Checkout joint + uses: actions/checkout@v4 + + + - name: Setup Node.js v22 + uses: actions/setup-node@v4 + with: + node-version: 22.14.0 + # No `registry-url` on purpose (not used by Yarn) + + - name: Cache Yarn + uses: actions/cache@v4 + with: + path: | + .yarn/cache + key: yarn-cache-${{ hashFiles('yarn.lock') }} + + - name: Install dependencies + run: yarn install --immutable + + - name: Build packages + run: yarn dist + + # Runs `changeset publish`, which publishes through `yarn npm publish` (Yarn Berry + # is auto-detected), then tags each published package and cuts a GitHub Release. + - name: Publish packages + uses: changesets/action/publish@v2 + env: + YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # No `NODE_AUTH_TOKEN` on purpose (must use Yarn) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 3f62425397..84b3643c83 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -62,6 +62,18 @@ jobs: id: install-dependencies run: yarn install --immutable + # Changing releasable code in a public package must provide a changeset + # (Releasable files are configured in `.changeset/config.json`) + # (Call `yarn changeset --empty` for a PR without releasable code) + - name: Check changeset + id: check-changeset + # Release PR is skipped - it consumes all changesets instead + if: ${{ github.event_name == 'pull_request' && !startsWith(github.head_ref, 'changeset-release/') }} + # Compare PR to current committed master + run: | + git fetch --no-tags origin '+refs/heads/master:refs/remotes/origin/master' + yarn changeset status --since=origin/master + # Build the joint project - name: Prepare joint id: prepare-joint diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 264a115889..055dae134b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,6 +72,7 @@ Before submitting a PR, please verify: - [ ] If applicable, there are new or updated unit tests validating the change - [ ] If applicable, there are new or updated @types - [ ] If applicable, documentation has been updated +- [ ] If the change is releasable, you've added a changeset (`yarn changeset`) ### Commit Message Format @@ -84,6 +85,65 @@ Examples: Types: `feat`, `fix`, `style`, `refactor`, `test`, `chore`, `example` +## Changesets + +Versions and changelogs are managed by [Changesets](https://changesets.dev). Every package +keeps its own `CHANGELOG.md`, and each package is versioned independently. + +If your PR changes releasable code, add a changeset: + +```bash +yarn changeset +``` + +Pick the affected package(s) and the bump type (`patch`, `minor`, `major`), then write a +short summary. The summary is what ends up in the package's `CHANGELOG.md`, so write it for +users of the package - we use the same `scope: description` style as commit messages: + +```markdown +--- +"@joint/core": minor +--- + +dia.Paper: add `originX` and `originY` options to `getFitToContentArea()` +``` + +Commit the generated `.changeset/*.md` file with your PR. + +CI runs `changeset status --since=origin/master` and fails a PR that changes releasable +code in a public package without a changeset. Test-, docs-, demo- and build-config-only +changes are exempt - the exact list lives in `changedFilePatterns` in +[.changeset/config.json](.changeset/config.json). If a PR touches releasable files but +should not trigger a release, add an empty changeset: + +```bash +yarn changeset add --empty +``` + +## Releasing (maintainers) + +Releasing is automated by [.github/workflows/release.yml](.github/workflows/release.yml), +which runs on every push to `master`: + +1. **Version** - while there are pending changesets, the workflow keeps a + `changeset-release/master` PR ("Version Packages") up to date. That PR applies the + version bumps, writes the per-package `CHANGELOG.md` entries and deletes the consumed + changesets. +2. **Publish** - merging that PR is the release. The workflow then builds the workspace, + runs `changeset publish` (which publishes through `yarn npm publish`), and creates a git + tag plus a GitHub Release for every published package. + +Notes: + +- Private packages (`examples/*`, `@joint/shapes-general`, `@joint/shapes-general-tools`) + are never versioned or published. +- Packages depending on `@joint/core` with a `workspace:~` range (`@joint/decorators`, + `@joint/layout-directed-graph`, `@joint/layout-msagl`) get an automatic patch release + whenever `@joint/core` gets a minor release, because their dependency range has to move. +- Prereleases use the standard changesets pre mode: `yarn changeset pre enter beta` on + `master`, release as usual, then `yarn changeset pre exit`. +- Snapshot releases: `yarn changeset version --snapshot` + `yarn changeset publish --tag`. + ## Code Style - TypeScript strict mode is enabled diff --git a/package.json b/package.json index 7cd78aeb6a..1d537f1cda 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,9 @@ "lint-fix": "yarn workspaces foreach --all -tvv run lint-fix", "pack-all": "yarn workspaces foreach --all -tvv --include \"@joint/core\" --include \"@joint/layout-directed-graph\" --include \"@joint/layout-msagl\" pack --out %s-%v.tgz" }, + "devDependencies": { + "@changesets/cli": "3.0.0" + }, "workspaces": [ "./packages/*", "./examples/*" diff --git a/packages/joint-cli/package.json b/packages/joint-cli/package.json index 823028731d..bb56ffbff7 100644 --- a/packages/joint-cli/package.json +++ b/packages/joint-cli/package.json @@ -8,7 +8,8 @@ "joint": "./dist/cli.js" }, "files": [ - "dist" + "dist", + "./CHANGELOG.md" ], "scripts": { "build": "tsc", diff --git a/packages/joint-core/CHANGELOG.md b/packages/joint-core/CHANGELOG.md new file mode 100644 index 0000000000..c9823d303e --- /dev/null +++ b/packages/joint-core/CHANGELOG.md @@ -0,0 +1,278 @@ +# @joint/core + +## 4.3.1 + +### Patch Changes + +- routers.rightAngle - fix to allow zero-value margins and un-clamp `minPathMargin` + +## 4.3.0 + +### Minor Changes + +- dia.Paper - add `originX` and `originY` options to `getFitToContentArea()` +- dia.Paper - add typed `EventMap` for IDE autocomplete and type-checking on `on()` calls +- dia.Paper - `resolveViewClass` factory now receives the resolved namespace view class as a second argument +- dia.Paper - add `getCellView()` method for strict view lookup +- dia.Paper - add `setDragging()` and `isDragging()` methods for drag-state access +- dia.Paper - auto-emit `resize` event when the host container is resized via CSS +- dia.Paper - `elementView` / `linkView` factory options now receive the namespace view class as a second argument +- dia.GridLayerView - read built-in grid patterns from the paper constructor's static field +- dia.CellView - `getNodeBoundingRect()` and new `computeNodeBoundingRect()` support HTML elements +- dia.Graph - add `getCellNamespace()`, `setCellNamespace()`, `getTypeConstructor()`, `getTypeDefaults()`; deprecate `CellCollection.cellNamespace` setter +- dia.Graph - add typed `EventMap` for IDE autocomplete and type-checking on `on()` calls +- dia.Graph - add `port` and `magnet` options to `getConnectedLinks()` +- dia.Cell - support predicate function for `ignoreEmptyAttributes` option of `toJSON()` +- dia.Cell - add `Cell.JSON` and `Cell.JSONInit` types; deprecate `GenericAttributes` +- anchors.midSide - add `'top-bottom'`, `'bottom-top'`, `'left-right'`, `'right-left'` direction modes +- highlighters - add HTML element support to the mask highlighter +- routers.rightAngle - add `minPathMargin`, `sourceMargin`, and `targetMargin` options +- mvc.View - add `classNamePrefix` instance property to override the `joint-` CSS class prefix +- config - add `storeEmbeds` option to suppress the `embeds` attribute + +### Patch Changes + +- dia.Paper - fix stale cell views when cells become hidden during a batch update +- routers.rightAngle - fix anchor point excluded from clearance bounding-box union +- Vectorizer - fix `getRelativeTransformation()` when the screen CTM is non-invertible + +## 4.2.5 + +### Patch Changes + +- util - fix to guard `merge()`, `omit()`, `pick()`, `assign()` against potential prototype pollution attacks + +## 4.2.4 + +### Patch Changes + +- dia.Paper - fix to handle element removal during pointer events +- dia.Graph - fix to pass options to `batch:start` and `batch:stop` events consistently +- mvc.Model - fix to trigger the `changeId` event only if the previous ID is different from the current ID +- Vectorizer - fix `getTransformToElement()` when the target node is inside a nested SVG document + +## 4.2.3 + +### Patch Changes + +- dia.Paper - fix to wake up idle `async` paper with `initializeUnmounted: true` when a new cell is added to graph +- dia.Paper - fix to prevent an error when a view is synchronously dumped during an asynchronous visibility check +- dia.Element - fix `getPortBBox()` to return a valid bbox when port has no size defined + +## 4.2.2 + +### Patch Changes + +- dia.Graph - fix types + +## 4.2.1 + +### Patch Changes + +- fix types to allow port optional transformations and make all SVG attributes nullable + +## 4.2.0 + +### Minor Changes + +- dia.Paper - introduce layers API +- dia.Paper - rework `autoFreeze` option +- dia.Paper - add `measureNode()` callback option +- dia.Paper - add `findClosestMagnetToPoint()` method +- dia.Paper - add `viewManagement` option for advanced view lifecycle management +- dia.Paper - add `cellVisibility()` callback option +- dia.Paper - add `disposeHiddenCellViews()` method +- dia.Paper - add `prioritizeCellViewMount()` and `prioritizeCellViewUnmount()` methods +- dia.Paper - add `updateCellVisibility()` and `updateCellsVisibility()` methods +- dia.Paper - add `isCellVisible()` method +- dia.LinkView - allow link-to-link snap +- dia.CellView - make `getNodeBBox()` method work for nodes outside the render tree +- dia.CellView - optimize measurements of nodes referenced by `ref` attribute +- dia.Graph - add `syncCells()` method +- dia.Graph - add `removeCell()` method +- dia.Element - add `filter` option to `fitToChildren()` and `fitParent()` methods +- dia.Element - add `minRect` option to `fitToChildren()` and `fitParent()` methods +- dia.Element - support port position `args` inside `position` property +- dia.Element - add `getPortBBox()` and `getPortCenter()` methods +- dia.Element - support custom `portLayoutNamespace` and `portLabelLayoutNamespace` +- dia.Element - support passing custom port label layout functions to `label.position` +- dia.Element - optimize cloning in `getPort()` method +- dia.Element - optimize `hasPort()` and `hasPorts()` methods +- dia.Cell - add `getCenter()` method +- dia.Cell - add cell attributes merge strategy +- dia.Cell - support array paths in `transition()` and `stopTransition()` methods +- dia.Cell - expose `getAttributeDefinition()` method +- dia.attributes - add `useNoBreakSpace` which reinstates `V.sanitizeText()` functionality +- dia.HighlighterView - `z` option now supports highlighter positioning within SVG +- dia.HighlighterView - add static `has()` method to check if CellView has a highlighter attached +- anchors - add `useModelGeometry` option to all anchors +- anchors - add support for `calc()` expressions in `dx`, `dy` options +- anchors.midSide - add `mode` and `preferenceThreshold` options +- connectionPoints - add `useModelGeometry` option to `bbox` and `rectangle` +- mvc.View - allow providing custom `cid` in constructor +- mvc.Collection - use a Map to store references +- Vectorizer - add `safe` option to `getTransformToElement()` method +- Vectorizer - add static `getCommonAncestor()` method +- Vectorizer - add `useNoBreakSpace` option to `text()` method +- Vectorizer - deprecate static `sanitizeText()` method +- Geometry - add `moveAroundPoint()` method to `Rect` + +### Patch Changes + +- dia.Paper - fix to only trigger `'render:idle'` event after all updates are completed +- dia.Paper - fix generic view detachment when `viewport()` callback returns `false` +- dia.Paper - fix to trigger `'render:*'` events when paper model is reset with no cells +- dia.Paper - fix rendering of first batch of updates in `async` mode to be asynchronous +- dia.LinkView - fix to prevent link snap to a magnet when only the host cell is close enough +- dia.LinkView - fix missing arrowheads in WKWebView +- dia.Element - fix to parse numeric strings in port position args +- dia.Cell - fix to always create deep copy of arrays in constructor +- dia.attributes - fix `textWrap` attribute when Paper is not in render tree +- dia.HighlighterView - fix to prevent highlighting nodes outside cell view +- dia.HighlighterView - fix to prevent removing not-yet-mounted HighlighterViews on unmount +- elementTools - fix tools position when attached directly to ElementView +- linkTools.Vertices - fix to call blur when `redundancyRemoval: false` +- Vectorizer - fix to preserve camelCase in `attributeName`, `repeatCount` attribute names +- Vectorizer - fix to handle implicit line coordinates in `convertToPathData()` method +- fix to keep `'use strict'` for minified files + +## 4.1.3 + +### Patch Changes + +- mvc.Dom - use `getComputedStyle` for static position check + +## 4.1.2 + +### Patch Changes + +- mvc.Listener - fix to support running in Web Workers + +## 4.1.1 + +### Patch Changes + +- dia.ElementView - fix return types (DOM `Element` vs. `dia.Element`) +- dia.ToolsView - make sure tools are rendered before the first update + +## 4.1.0 + +### Minor Changes + +- dia.Paper - add methods to find cell/element/link views in paper +- dia.ElementView - add `getTargetParentView()` method +- dia.LinkView - update tools when labels change +- dia.CellView - expose special presentation attributes API +- dia.CellView - add `isIntersecting()` method +- dia.Graph - accept `toJSON()` options +- dia.Graph - add `transferCellEmbeds()` and `transferCellConnectedLinks()` methods +- dia.Graph - add methods to find cells/elements/links in graph +- dia.Element - add `getPortGroupNames()` method +- dia.Cell - add `ignoreDefaults` and `ignoreEmptyAttributes` options to `toJSON()` +- dia.Cell - add `reparent` option to `embed()` +- elementTools.Control - add pointer event to `setPosition()` and `resetPosition()` signature +- linkTools - add `Control` link tool +- linkTools - add `RotateLabel` link tool +- linkTools.Vertices - add `vertexAdding.interactiveLinkNode` option +- linkTools.Button - allow `distance` to be defined via callback +- dia.HighlighterView - add static `getAll()` method +- dia.ToolView - add `visibility` option callback +- util - add `objectDifference()` method +- util - expose `calc()` expression API +- util - expose `cloneCells()` method +- Geometry - add `strict` option to `containsPoint()` of `Rect` + +### Patch Changes + +- dia.ElementView - fix to prevent exception when position or size is not defined +- dia.LinkView - fix to invalidate the root node cache when labels change +- dia.Graph - fix to remove graph reference from cells after `resetCells()` +- linkTools - fix pending batch for `TargetArrowhead` and `SourceArrowhead` +- routers.RightAngle - fix various routing issues +- dia.ToolsView - fix to prevent tool `update()` from being called before previous `render()` due to visibility +- mvc.View - fix to allow setting `style` via options + +## 4.0.4 + +### Patch Changes + +- update HTML demo in alignment with v4 +- dia.LinkView - fix missing arrowheads in Safari +- dia.attributes - fix to take the inline font attributes into account in `textWrap` + +## 4.0.3 + +### Patch Changes + +- dia.Paper - fix to ensure grid pattern IDs are unique +- dia.ElementView - fix to support port IDs of number type +- linkTools.SourceArrowhead - fix to trigger `pointerdown` event when the user starts dragging an arrowhead +- linkTools.TargetArrowhead - fix to trigger `pointerdown` event when the user starts dragging an arrowhead + +## 4.0.2 + +### Patch Changes + +- dia.Paper - fix to prevent leaks of pending animation frame requests on `resetViews()` +- routers.rightAngle - fix to improve generated route +- dia.attributes - fix `text-wrap` to take external CSS into account +- Vectorizer - fix `normalizePathData()` to support zero-length arcto curves + +## 4.0.1 + +### Patch Changes + +- fix content of `dist` folder + +## 4.0.0 + +### Major Changes + +- rename package from `jointjs` to `@joint/core` +- remove `jQuery`, `backbone`, and `lodash` dependencies +- drop `CSS` (`JointJS` no longer distributed with CSS) +- dia.Paper - change the default cell sorting to `APPROX` type +- dia.Paper - remove deprecated `perpendicularLinks` option +- dia.Paper - remove deprecated `linkConnectionPoint` option +- dia.Paper - change the value of the `defaultConnectionPoint` option to `boundary` +- dia.Paper - add SVG `grid` layer +- dia.Paper - drop `drawGrid()` and `clearGrid()` methods +- dia.Paper - new `transform` event added +- dia.Paper - allow passing custom data along with transformation events +- dia.Paper - allow passing custom data along with resize events +- dia.Paper - `origin` option removed +- dia.Paper - `setOrigin` method removed +- dia.Paper - `scale()` no longer accepts scaling origin +- dia.Paper - add `scaleUniformAtPoint()` method +- dia.Paper - fix `paper:pinch` dispatched event type +- dia.LinkView - remove support for legacy +- dia.CellView - early evaluation of `calc` attributes +- dia.CellView - disable `useCSSSelectors` by default +- dia.Graph - throw exception when cell constructor not found +- dia.Link - become an abstract class (same as `dia.Element`) +- dia.Link - replace legacy attributes in the default label definition +- dia.Link - remove the deprecated `smooth` attribute +- dia.Link - remove the deprecated `manhattan` attribute +- dia.Cell - add `mergeArrays` options to constructor +- dia.Cell - remove the `parent(id)` setter +- shapes.standard - use `calc` expressions instead of legacy attributes (drop use of `refWidth`, `refHeight`, `refX`, `refY`, etc.) +- shapes.basic - remove in favor of `shapes.standard` +- shapes.devs - remove from package, define as custom shapes in demos +- shapes.pn - remove from package, define as custom shapes in demos +- shapes.uml - remove from package, define as custom shapes in demos +- shapes.logic - remove from package, define as custom shapes in demos +- shapes.org - remove from package, define as custom shapes in demos +- shapes.chess - remove from package, define as custom shapes in demos +- shapes.fsa - remove from package, define as custom shapes in demos +- highlighters.opacity - add `alphaValue` option +- highlighters.stroke - add `nonScalingStroke` option +- elementTools.Remove - change type to `remove` +- linkTools.Remove - change type to `remove` +- attributes.filter - change the coordinate system of the filters from `objectBoundingBox` to `userSpaceOnUse` +- util - remove deprecated `shapePerimeterConnectionPoint` +- Vectorizer - enable camel case attribute support by default +- Vectorizer - make the `attributeNames` property public + +### Patch Changes + +- linkTools.Vertices - fix to trigger `link:mouseleave` event when the user stops dragging a vertex diff --git a/packages/joint-core/package.json b/packages/joint-core/package.json index 195448f1a6..3da98d1cf9 100644 --- a/packages/joint-core/package.json +++ b/packages/joint-core/package.json @@ -87,7 +87,8 @@ "./index.js", "./joint.mjs", "./LICENSE", - "./README.md" + "./README.md", + "./CHANGELOG.md" ], "devDependencies": { "@babel/core": "7.26.10", diff --git a/packages/joint-decorators/package.json b/packages/joint-decorators/package.json index 8e98ced2e1..2b298f5f66 100644 --- a/packages/joint-decorators/package.json +++ b/packages/joint-decorators/package.json @@ -1,7 +1,7 @@ { "name": "@joint/decorators", "title": "JointJS Decorators", - "version": "4.3.1", + "version": "0.4.0", "description": "Decorators module for JointJS", "main": "build/index.js", "types": "build/index.d.ts", @@ -34,7 +34,8 @@ "build/", "src/", "./LICENSE", - "./SECURITY.md" + "./SECURITY.md", + "./CHANGELOG.md" ], "dependencies": { "@joint/core": "workspace:~" diff --git a/packages/joint-eslint-config/package.json b/packages/joint-eslint-config/package.json index 3ba47b8f0b..fd83907b58 100644 --- a/packages/joint-eslint-config/package.json +++ b/packages/joint-eslint-config/package.json @@ -1,7 +1,7 @@ { "name": "@joint/eslint-config", "title": "JointJS ESLintConfig", - "version": "4.3.1", + "version": "4.3.0", "description": "ESLintConfig module for JointJS", "sideEffects": false, "type": "module", diff --git a/packages/joint-layout-directed-graph/CHANGELOG.md b/packages/joint-layout-directed-graph/CHANGELOG.md new file mode 100644 index 0000000000..67c62553fb --- /dev/null +++ b/packages/joint-layout-directed-graph/CHANGELOG.md @@ -0,0 +1,106 @@ +# @joint/layout-directed-graph + +## 4.3.0 + +### Patch Changes + +- Updated dependencies + - @joint/core@4.3.0 + +## 4.2.5 + +### Patch Changes + +- Updated dependencies + - @joint/core@4.2.5 + +## 4.2.3 + +### Patch Changes + +- layout.DirectedGraph - fix to accept a padding object for `clusterPadding` option of `layout()` +- Updated dependencies + - @joint/core@4.2.3 + +## 4.2.2 + +### Patch Changes + +- layout.DirectedGraph - ignore cell layers in the layout +- Updated dependencies + - @joint/core@4.2.2 + +## 4.2.0 + +### Minor Changes + +- layout.DirectedGraph - support `clusterPadding: 'default'` +- layout.DirectedGraph - expose Dagre `disableOptimalOrderHeuristic` and `customOrder` options + +### Patch Changes + +- Updated dependencies + - @joint/core@4.2.0 + +## 4.1.4 + +### Patch Changes + +- layout.DirectedGraph - fix `resizeClusters` option logic to only resize top-level clusters whose children were provided to the `layout()` function + +## 4.1.3 + +### Patch Changes + +- layout.DirectedGraph - fix to accept `0` value for `nodesep`, `edgesep`, `ranksep` options of `layout()` + +## 4.1.1 + +### Patch Changes + +- Updated dependencies + - @joint/core@4.1.1 + +## 4.1.0 + +### Minor Changes + +- layout.DirectedGraph - add `graph` option to `fromGraphLib()` + +### Patch Changes + +- Updated dependencies + - @joint/core@4.1.0 + +## 4.0.3 + +### Patch Changes + +- fix distributed `package.json` by resolving `@joint/core` workspace dependency + +## 4.0.2 + +### Patch Changes + +- Updated dependencies + - @joint/core@4.0.2 + +## 4.0.1 + +### Patch Changes + +- change the constraint on `@joint/core` dependency to allow patches only +- Updated dependencies + - @joint/core@4.0.1 + +## 4.0.0 + +### Major Changes + +- move the `DirectedGraph` layout into separate package + +### Patch Changes + +- upgrade `dagre` to version `1.0.4` (free from `lodash` dependency) +- Updated dependencies + - @joint/core@4.0.0 diff --git a/packages/joint-layout-directed-graph/package.json b/packages/joint-layout-directed-graph/package.json index 03d2c27e6b..c3582a274b 100644 --- a/packages/joint-layout-directed-graph/package.json +++ b/packages/joint-layout-directed-graph/package.json @@ -1,7 +1,7 @@ { "name": "@joint/layout-directed-graph", "title": "JointJS LayoutDirectedGraph", - "version": "4.3.1", + "version": "4.3.0", "description": "LayoutDirectedGraph module for JointJS", "main": "dist/DirectedGraph.js", "module": "./DirectedGraph.mjs", @@ -48,6 +48,7 @@ "./LICENSE", "./README.md", "./SECURITY.md", + "./CHANGELOG.md", "dist/" ], "dependencies": { diff --git a/packages/joint-layout-msagl/CHANGELOG.md b/packages/joint-layout-msagl/CHANGELOG.md new file mode 100644 index 0000000000..13fe4aab81 --- /dev/null +++ b/packages/joint-layout-msagl/CHANGELOG.md @@ -0,0 +1,41 @@ +# @joint/layout-msagl + +## 4.3.0 + +### Patch Changes + +- Updated dependencies + - @joint/core@4.3.0 + +## 4.2.5 + +### Patch Changes + +- Updated dependencies + - @joint/core@4.2.5 + +## 4.2.3 + +### Patch Changes + +- Updated dependencies + - @joint/core@4.2.3 + +## 4.2.2 + +### Patch Changes + +- layout.MSAGL - ignore cell layers in the layout +- Updated dependencies + - @joint/core@4.2.2 + +## 4.2.0 + +### Minor Changes + +- layout.MSAGL - add new layout package utilizing the Microsoft Automatic Graph Layout + +### Patch Changes + +- Updated dependencies + - @joint/core@4.2.0 diff --git a/packages/joint-layout-msagl/package.json b/packages/joint-layout-msagl/package.json index c006f96d80..85580fd1df 100644 --- a/packages/joint-layout-msagl/package.json +++ b/packages/joint-layout-msagl/package.json @@ -1,7 +1,7 @@ { "name": "@joint/layout-msagl", "title": "JointJS LayoutMSAGL", - "version": "4.3.1", + "version": "4.3.0", "description": "LayoutMSAGL module for JointJS", "sideEffects": false, "main": "./dist/esm/index.mjs", @@ -57,7 +57,8 @@ "dist", "SECURITY.md", "README.md", - "LICENSE" + "LICENSE", + "CHANGELOG.md" ], "dependencies": { "@joint/core": "workspace:~", diff --git a/packages/joint-react/CHANGELOG.md b/packages/joint-react/CHANGELOG.md new file mode 100644 index 0000000000..a66bc8d650 --- /dev/null +++ b/packages/joint-react/CHANGELOG.md @@ -0,0 +1,27 @@ +# @joint/react + +## 4.3.2 + +### Patch Changes + +- - fix the visual grid to redraw reactively when `drawGrid`, `drawGridSize`, or `gridSize` change +- Updated dependencies + - @joint/core@4.3.1 + +## 4.3.1 + +### Patch Changes + +- useCreateFeature - fix duplicate paper feature registration under React 18 StrictMode causing interactions to fire twice +- useCells - fix ghost cells reported after `resetCells()` + +## 4.3.0 + +### Minor Changes + +- new package - idiomatic React components and hooks for JointJS, built directly on the core engine + +### Patch Changes + +- Updated dependencies + - @joint/core@4.3.0 diff --git a/packages/joint-react/package.json b/packages/joint-react/package.json index 9b431e105c..690e25f789 100644 --- a/packages/joint-react/package.json +++ b/packages/joint-react/package.json @@ -73,7 +73,8 @@ "files": [ "dist/", "./LICENSE", - "./README.md" + "./README.md", + "./CHANGELOG.md" ], "dependencies": { "@joint/core": "workspace:^", diff --git a/packages/joint-shapes-general-tools/package.json b/packages/joint-shapes-general-tools/package.json index 7651010992..9df49cebf5 100644 --- a/packages/joint-shapes-general-tools/package.json +++ b/packages/joint-shapes-general-tools/package.json @@ -1,5 +1,6 @@ { "name": "@joint/shapes-general-tools", + "private": true, "title": "JointJS General Shapes Tools", "version": "4.3.1", "description": "General Shapes Tools module for JointJS", diff --git a/packages/joint-shapes-general/package.json b/packages/joint-shapes-general/package.json index 12bd88c4d1..6af798c428 100644 --- a/packages/joint-shapes-general/package.json +++ b/packages/joint-shapes-general/package.json @@ -1,5 +1,6 @@ { "name": "@joint/shapes-general", + "private": true, "title": "JointJS General Shapes", "version": "4.3.1", "description": "General Shapes module for JointJS", diff --git a/packages/joint-vitest-plugin-mock-svg/package.json b/packages/joint-vitest-plugin-mock-svg/package.json index 5265d86db1..0ef00d6f76 100644 --- a/packages/joint-vitest-plugin-mock-svg/package.json +++ b/packages/joint-vitest-plugin-mock-svg/package.json @@ -42,7 +42,8 @@ "mocks/", "./LICENSE", "./README.md", - "./SECURITY.md" + "./SECURITY.md", + "./CHANGELOG.md" ], "exports": { ".": { diff --git a/yarn.lock b/yarn.lock index 710279ce36..0b5fb1dff8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3135,6 +3135,187 @@ __metadata: languageName: node linkType: hard +"@changesets/apply-release-plan@npm:^8.0.0": + version: 8.0.0 + resolution: "@changesets/apply-release-plan@npm:8.0.0" + dependencies: + "@changesets/config": "npm:^4.0.0" + "@changesets/format": "npm:^0.1.1" + "@changesets/git": "npm:^4.0.0" + "@changesets/should-skip-package": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + import-meta-resolve: "npm:^4.2.0" + jsonc-parser: "npm:^3.3.1" + semver: "npm:^7.8.1" + checksum: 10/0d0244c712215f1a409dc37b1cd1d6fe17633aaf1510d206ac42ad625c9e72b63e1fcd91ca269e911c6605a572b78eff3f8b05bd48fd65912a7606835222dca8 + languageName: node + linkType: hard + +"@changesets/assemble-release-plan@npm:^7.0.0": + version: 7.0.0 + resolution: "@changesets/assemble-release-plan@npm:7.0.0" + dependencies: + "@changesets/errors": "npm:^1.0.0" + "@changesets/get-dependents-graph": "npm:^3.0.0" + "@changesets/should-skip-package": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + semver: "npm:^7.8.1" + checksum: 10/1d2b22d57f4db2c33075b511f7185bea63e8b17f6083b0bf607c10ba2868df5942695e29774dce695876f03512da4264edd61101492312ffc716c356f750743d + languageName: node + linkType: hard + +"@changesets/changelog-git@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/changelog-git@npm:1.0.0" + dependencies: + "@changesets/types": "npm:^7.0.0" + checksum: 10/64d4a9b44ee7fee23034f6d89cd80bb66419f59a1002424167a0282dfe252369eb7ecbad1f3eb9a02126d3bc5f9d2e5f8cdc0a51fed9158d71f9491735830d52 + languageName: node + linkType: hard + +"@changesets/cli@npm:3.0.0": + version: 3.0.0 + resolution: "@changesets/cli@npm:3.0.0" + dependencies: + "@changesets/apply-release-plan": "npm:^8.0.0" + "@changesets/assemble-release-plan": "npm:^7.0.0" + "@changesets/changelog-git": "npm:^1.0.0" + "@changesets/config": "npm:^4.0.0" + "@changesets/errors": "npm:^1.0.0" + "@changesets/get-dependents-graph": "npm:^3.0.0" + "@changesets/git": "npm:^4.0.0" + "@changesets/pre": "npm:^3.0.0" + "@changesets/read": "npm:^1.0.0" + "@changesets/should-skip-package": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + "@changesets/write": "npm:^1.0.0" + "@clack/prompts": "npm:^1.7.0" + "@manypkg/get-packages": "npm:^3.1.0" + "@pnpm/deps.graph-sequencer": "npm:^1100.0.1" + cac: "npm:^7.0.0" + import-meta-resolve: "npm:^4.2.0" + launch-editor: "npm:^2.14.1" + package-manager-detector: "npm:^1.6.0" + semver: "npm:^7.8.1" + tinyexec: "npm:^1.3.0" + bin: + changeset: bin.js + checksum: 10/11030de752427fdf551b0f83f9ecf78976129d552b1c1c0fc9d54ab8c105e8c67ca617ea841ebd0b9c5b73847f9cf39bc715abb500f045f2dffbd0f7aab73006 + languageName: node + linkType: hard + +"@changesets/config@npm:^4.0.0": + version: 4.0.0 + resolution: "@changesets/config@npm:4.0.0" + dependencies: + "@changesets/get-dependents-graph": "npm:^3.0.0" + "@changesets/should-skip-package": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + "@manypkg/get-packages": "npm:^3.1.0" + picomatch: "npm:^4.0.4" + checksum: 10/2e21cc47ed2f4f94a8d92baf5c6fd449ece769b1d19b326adcda4db954e6aed91d7e1ee291547766d45e1641d38514b8223e33603f7665316f00288969499997 + languageName: node + linkType: hard + +"@changesets/errors@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/errors@npm:1.0.0" + checksum: 10/27f8ef6c539eccb5d3173bd5beb039e3ce44e8714cb2cc0749f0ccb98f1af4ef32b6aef25520cfd08e35d6876da634743b04a50ffcd4bde520cb302c5d1dfe04 + languageName: node + linkType: hard + +"@changesets/format@npm:^0.1.1": + version: 0.1.1 + resolution: "@changesets/format@npm:0.1.1" + dependencies: + package-manager-detector: "npm:^1.6.0" + tinyexec: "npm:^1.2.4" + checksum: 10/e1c7c1808b4b1f3120607e2729739a49e2c712c4745a3f80313cc5fa5d41e0c36272692cd12ea34da7dc7ee237ccb18d677dc23c454483d34e6316dad892942c + languageName: node + linkType: hard + +"@changesets/get-dependents-graph@npm:^3.0.0": + version: 3.0.0 + resolution: "@changesets/get-dependents-graph@npm:3.0.0" + dependencies: + "@changesets/types": "npm:^7.0.0" + semver: "npm:^7.8.1" + checksum: 10/3b53b29bc316acc08f76351711b2e90f79237a8d5c1369e845c05f940b69b580d438404b7f53fce997a97f926279135b88995ce819fe6bb211a577a80b381804 + languageName: node + linkType: hard + +"@changesets/git@npm:^4.0.0": + version: 4.0.0 + resolution: "@changesets/git@npm:4.0.0" + dependencies: + "@changesets/errors": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + "@manypkg/get-packages": "npm:^3.1.0" + picomatch: "npm:^4.0.4" + tinyexec: "npm:^1.3.0" + checksum: 10/f2907b0c3a9b8c1d135f87952505c675f304dc0162fef46a2e4fc255dea2b380730813e6e355bda5e70d453a1c8bf231ef1de947cc7b7bc3aca4f6926b09980f + languageName: node + linkType: hard + +"@changesets/parse@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/parse@npm:1.0.0" + dependencies: + "@changesets/types": "npm:^7.0.0" + yaml: "npm:^2.9.0" + checksum: 10/f3e7d0cb03d9218abebb1e7bd2244befcddab7cd9299f88714fc2ac3f5b16850efc158f67155ccfe46ccd6e6a8371b8db02121b9c0b2ac1ce947f3634f248b64 + languageName: node + linkType: hard + +"@changesets/pre@npm:^3.0.0": + version: 3.0.0 + resolution: "@changesets/pre@npm:3.0.0" + dependencies: + "@changesets/errors": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + "@manypkg/get-packages": "npm:^3.1.0" + checksum: 10/c9615ad03b7efc020bc4046ddc158ce62eaa7aee4e283e9b7c0da229ddad74e86707bf54c73681fe8822305486bfd1691d3118ba3e674018a1f07a46640faa10 + languageName: node + linkType: hard + +"@changesets/read@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/read@npm:1.0.0" + dependencies: + "@changesets/git": "npm:^4.0.0" + "@changesets/parse": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + checksum: 10/505e723f87fd847b7264ce342a0b3f5aa849d5d6aba6806d1e7fc0490964e3716bb0fc065dd6a87e970a3684fe04d30ef789a1c0f1d49671dadc4b55c7a5c65d + languageName: node + linkType: hard + +"@changesets/should-skip-package@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/should-skip-package@npm:1.0.0" + dependencies: + "@changesets/types": "npm:^7.0.0" + checksum: 10/143f7757fa602e173ec6cd504c41c0d4a204c6b36f5bdc80fbf13e2eec22cdd371b97daaebbd8b772fde1329070fb1ac80f9925193ebc0782c178e7c5a37aaee + languageName: node + linkType: hard + +"@changesets/types@npm:^7.0.0": + version: 7.0.0 + resolution: "@changesets/types@npm:7.0.0" + checksum: 10/7de8bfc0614cf76c0d1d699b61e1f1ba11abb9dd0f5eb0525fbddcf4bcca519151078c27e3bfa1fcf63aba23e28b744c18048eec3d4fb3eec5c763915edbaae2 + languageName: node + linkType: hard + +"@changesets/write@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/write@npm:1.0.0" + dependencies: + "@changesets/format": "npm:^0.1.1" + "@changesets/types": "npm:^7.0.0" + human-id: "npm:^4.2.0" + checksum: 10/9a67ab5eb8adf0a94f7cc03eb6b29ffccc16e491149ba00130b1cb95a0ea69bf8439041ad8f606f25cb13e7ea5a1c5f1d413f9b1e35e7e44a925195e327fcee2 + languageName: node + linkType: hard + "@clack/core@npm:0.3.5, @clack/core@npm:^0.3.5": version: 0.3.5 resolution: "@clack/core@npm:0.3.5" @@ -3145,6 +3326,16 @@ __metadata: languageName: node linkType: hard +"@clack/core@npm:1.4.3": + version: 1.4.3 + resolution: "@clack/core@npm:1.4.3" + dependencies: + fast-wrap-ansi: "npm:^0.2.0" + sisteransi: "npm:^1.0.5" + checksum: 10/9d875718cb161e0eca97c3ed3ba3063211436c4224a04556b840e045f18505c8fdb645754d9459181069b3a3b6699962d0f47e38e2502cb0acfef1649b3557b3 + languageName: node + linkType: hard + "@clack/prompts@npm:^0.8.2": version: 0.8.2 resolution: "@clack/prompts@npm:0.8.2" @@ -3156,6 +3347,18 @@ __metadata: languageName: node linkType: hard +"@clack/prompts@npm:^1.7.0": + version: 1.7.0 + resolution: "@clack/prompts@npm:1.7.0" + dependencies: + "@clack/core": "npm:1.4.3" + fast-string-width: "npm:^3.0.2" + fast-wrap-ansi: "npm:^0.2.0" + sisteransi: "npm:^1.0.5" + checksum: 10/2bfc89d6755a1e10166a3b7a6cc883a09c1d4d82c08fbe98763284d522f256a58ed20c5ee4ab36f2a6e06bc1b3f0c16b02657159f7d593dab12c55260755f0c2 + languageName: node + linkType: hard + "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -7003,6 +7206,36 @@ __metadata: languageName: node linkType: hard +"@manypkg/find-root@npm:^3.1.0": + version: 3.1.0 + resolution: "@manypkg/find-root@npm:3.1.0" + dependencies: + "@manypkg/tools": "npm:^2.1.0" + checksum: 10/49d625ce57a142066ac8bc135219fcb924715e7f54ece98d36208034beeba20133c49e4bb6b636a5e7d0c0633f157a9c3523e65397839f487d88490c42bfab62 + languageName: node + linkType: hard + +"@manypkg/get-packages@npm:^3.1.0": + version: 3.1.0 + resolution: "@manypkg/get-packages@npm:3.1.0" + dependencies: + "@manypkg/find-root": "npm:^3.1.0" + "@manypkg/tools": "npm:^2.1.0" + checksum: 10/f6c7e16fc99fc17138b0eeda2374ccd3279b9d520e87ddb25296738d83bb1345f67ff1bf6b759ec19d9df84fcb3dd20546eb2cdafb53c378fa4bcebeb693e6d3 + languageName: node + linkType: hard + +"@manypkg/tools@npm:^2.1.0": + version: 2.1.2 + resolution: "@manypkg/tools@npm:2.1.2" + dependencies: + jju: "npm:^1.4.0" + tinyglobby: "npm:^0.2.13" + yaml: "npm:^2.9.0" + checksum: 10/b5ccf5500c8103978a2d1adcfbea9c51e637e1f03efabe0f8bc3631ff43d066459f965c73bdd68e575abd9237edb73b1fc83dab6b3e91bd49d39810466ff0755 + languageName: node + linkType: hard + "@mdx-js/react@npm:^3.0.0": version: 3.1.1 resolution: "@mdx-js/react@npm:3.1.1" @@ -8217,6 +8450,13 @@ __metadata: languageName: node linkType: hard +"@pnpm/deps.graph-sequencer@npm:^1100.0.1": + version: 1100.0.1 + resolution: "@pnpm/deps.graph-sequencer@npm:1100.0.1" + checksum: 10/b1e4d2bf61458bddaa1ebfb5c50a5643b1fa8607773583676e537350293682f14af96932e0519837fc5d91a56d3332892b5199f3d95056817696c9394cf4c4ab + languageName: node + linkType: hard + "@polka/url@npm:^1.0.0-next.20": version: 1.0.0-next.29 resolution: "@polka/url@npm:1.0.0-next.29" @@ -13726,6 +13966,13 @@ __metadata: languageName: node linkType: hard +"cac@npm:^7.0.0": + version: 7.0.0 + resolution: "cac@npm:7.0.0" + checksum: 10/1ada3b090403d0051619b1519c21db1cb0b32c7772d6c8782cc55c5349caac9efbb1076ba513c5975331ff0bdb104e2be9421fd3ff6c0ef5db9d58a04a4aa6f5 + languageName: node + linkType: hard + "cacache@npm:^12.0.3": version: 12.0.4 resolution: "cacache@npm:12.0.4" @@ -17920,6 +18167,22 @@ __metadata: languageName: node linkType: hard +"fast-string-truncated-width@npm:^3.0.2": + version: 3.0.3 + resolution: "fast-string-truncated-width@npm:3.0.3" + checksum: 10/3a1631e48927cb558b612a90ee78a61a660823c39b024bfc113935760b5b64805dbf03c4e696c33005294db578417687432e9d13567f1a582c2c75015e8a7648 + languageName: node + linkType: hard + +"fast-string-width@npm:^3.0.2": + version: 3.0.2 + resolution: "fast-string-width@npm:3.0.2" + dependencies: + fast-string-truncated-width: "npm:^3.0.2" + checksum: 10/5b9019769f2b00b96d43575c202f4e035a0e55eba7669a9a32351de9fa0805d0959a2afcaec6e4db5ee9b9a4c08d8e77f95abeb04b5bae2f76635cf04ddb4b80 + languageName: node + linkType: hard + "fast-uri@npm:^3.0.1": version: 3.1.0 resolution: "fast-uri@npm:3.1.0" @@ -17927,6 +18190,15 @@ __metadata: languageName: node linkType: hard +"fast-wrap-ansi@npm:^0.2.0": + version: 0.2.2 + resolution: "fast-wrap-ansi@npm:0.2.2" + dependencies: + fast-string-width: "npm:^3.0.2" + checksum: 10/c72272e4ee9c047ec4609adea9beb779f058e0aaee37d9e99d2306c401b34ad2b158ba6969860e35f8be7a0b0ba7512b71315d403e58a45a9f0eba0dc5b4befd + languageName: node + linkType: hard + "fast-xml-parser@npm:^5.3.3": version: 5.3.4 resolution: "fast-xml-parser@npm:5.3.4" @@ -19790,6 +20062,15 @@ __metadata: languageName: node linkType: hard +"human-id@npm:^4.2.0": + version: 4.2.0 + resolution: "human-id@npm:4.2.0" + bin: + human-id: dist/cli.js + checksum: 10/879f603f199642a67995b76a41510e142140f67852fe886c7b4cd1e90f82f4fb1452a6b2a8b75b1c313073e663d0bbcbc5dbb1dd17a648991d4d1a6da709f087 + languageName: node + linkType: hard + "human-signals@npm:^1.1.1": version: 1.1.1 resolution: "human-signals@npm:1.1.1" @@ -19962,7 +20243,7 @@ __metadata: languageName: node linkType: hard -"import-meta-resolve@npm:^4.0.0": +"import-meta-resolve@npm:^4.0.0, import-meta-resolve@npm:^4.2.0": version: 4.2.0 resolution: "import-meta-resolve@npm:4.2.0" checksum: 10/3499ee8b7eddb79be77067b368bcdf39e6f144306dea4686d08071ae7e65a2e3bdca3f98f2a0f4babdcd4ba9d9e7d379ae7e27c4b9bf8b08c1e812a28c674bf3 @@ -21516,9 +21797,18 @@ __metadata: languageName: node linkType: hard +"jju@npm:^1.4.0": + version: 1.4.0 + resolution: "jju@npm:1.4.0" + checksum: 10/1067ff8ce02221faac5a842116ed0ec79a53312a111d0bf8342a80bd02c0a3fdf0b8449694a65947db0a3e8420e8b326dffb489c7dd5866efc380c0d1708a707 + languageName: node + linkType: hard + "joint@workspace:.": version: 0.0.0-use.local resolution: "joint@workspace:." + dependencies: + "@changesets/cli": "npm:3.0.0" languageName: unknown linkType: soft @@ -21758,7 +22048,7 @@ __metadata: languageName: node linkType: hard -"jsonc-parser@npm:3.3.1, jsonc-parser@npm:^3.2.0": +"jsonc-parser@npm:3.3.1, jsonc-parser@npm:^3.2.0, jsonc-parser@npm:^3.3.1": version: 3.3.1 resolution: "jsonc-parser@npm:3.3.1" checksum: 10/9b0dc391f20b47378f843ef1e877e73ec652a5bdc3c5fa1f36af0f119a55091d147a86c1ee86a232296f55c929bba174538c2bf0312610e0817a22de131cc3f4 @@ -22013,6 +22303,16 @@ __metadata: languageName: node linkType: hard +"launch-editor@npm:^2.14.1": + version: 2.14.1 + resolution: "launch-editor@npm:2.14.1" + dependencies: + picocolors: "npm:^1.1.1" + shell-quote: "npm:^1.8.4" + checksum: 10/335d12ca437280e77070657531c251b6c91c62bc653f70ab66ddd2a6e50131b1b043480411c5b93d54955a0a6eb8ec01e9a5b5cfe2d887341d878d19394a126b + languageName: node + linkType: hard + "launch-editor@npm:^2.6.0, launch-editor@npm:^2.6.1": version: 2.12.0 resolution: "launch-editor@npm:2.12.0" @@ -24845,6 +25145,13 @@ __metadata: languageName: node linkType: hard +"package-manager-detector@npm:^1.6.0": + version: 1.8.0 + resolution: "package-manager-detector@npm:1.8.0" + checksum: 10/5d79b8bf3d0d3da312ec08749c74a3b7e4d4139c259fe3561538772c65ece8ff733e002c67a4324b5c505d2ac625c121b94cf3d5135e1b4e43fed5bced148763 + languageName: node + linkType: hard + "pacote@npm:20.0.0": version: 20.0.0 resolution: "pacote@npm:20.0.0" @@ -28024,6 +28331,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.8.1": + version: 7.8.5 + resolution: "semver@npm:7.8.5" + bin: + semver: bin/semver.js + checksum: 10/9b01d2ff11e6e4a4539b7ca3c5f280c8704cb397a28504469f2ed4f00ad2194748d756647362a9712fff30984d15772ab7f083108c2fb508e2096ae9e708f22c + languageName: node + linkType: hard + "send@npm:0.16.2": version: 0.16.2 resolution: "send@npm:0.16.2" @@ -28299,6 +28615,13 @@ __metadata: languageName: node linkType: hard +"shell-quote@npm:^1.8.4": + version: 1.10.0 + resolution: "shell-quote@npm:1.10.0" + checksum: 10/d4a22aeefe64919290af753ac6098239d7ffee52a5db62c20edef69794bd10b5f86e298f68be26af9606ac435e890dd391994a5405a90bb8aebef1ff1dde839b + languageName: node + linkType: hard + "shelljs@npm:0.8.4": version: 0.8.4 resolution: "shelljs@npm:0.8.4" @@ -29826,6 +30149,13 @@ __metadata: languageName: node linkType: hard +"tinyexec@npm:^1.2.4, tinyexec@npm:^1.3.0": + version: 1.3.0 + resolution: "tinyexec@npm:1.3.0" + checksum: 10/749a8c5aac2ffe3f04220b8966f414636c6c324d4ae88895dfffb2319db61cf1c01c5d7e8f0fb8ab747389ea0be1f0f80d850a9cce88a9d96cc5ebcb345db018 + languageName: node + linkType: hard + "tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.13, tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15": version: 0.2.15 resolution: "tinyglobby@npm:0.2.15" From e52fc279d23df9321e9b9b97ef516dd273e161ce Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Thu, 13 Aug 2026 16:18:26 +0200 Subject: [PATCH 2/8] add a link between core and layout packages --- .changeset/config.json | 8 ++++++- CONTRIBUTING.md | 50 +++++++++++++++++++++++++----------------- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index 307a23116e..8a5eb46b22 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -6,7 +6,13 @@ "commit": false, "ignore": [], "fixed": [], - "linked": [], + "linked": [ + [ + "@joint/core", + "@joint/layout-directed-graph", + "@joint/layout-msagl" + ] + ], "updateInternalDependencies": "patch", "privatePackages": { "version": false, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 055dae134b..1dd83150ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,8 +87,9 @@ Types: `feat`, `fix`, `style`, `refactor`, `test`, `chore`, `example` ## Changesets -Versions and changelogs are managed by [Changesets](https://changesets.dev). Every package -keeps its own `CHANGELOG.md`, and each package is versioned independently. +Versions and changelogs are managed by [Changesets](https://changesets.dev). +Every package keeps its own `CHANGELOG.md`, and each package is versioned +independently. If your PR changes releasable code, add a changeset: @@ -96,9 +97,11 @@ If your PR changes releasable code, add a changeset: yarn changeset ``` -Pick the affected package(s) and the bump type (`patch`, `minor`, `major`), then write a -short summary. The summary is what ends up in the package's `CHANGELOG.md`, so write it for -users of the package - we use the same `scope: description` style as commit messages: +Pick the affected package and the bump type (`patch`, `minor`, `major`), then +write a short summary. If your change affects multiple packages and you need +each to be summarized differently, add a separate changeset for each package. +The summary line(s) are what ends up in a package's `CHANGELOG.md`, so write +them for users of the package - we a `scope - description` style: ```markdown --- @@ -110,11 +113,11 @@ dia.Paper: add `originX` and `originY` options to `getFitToContentArea()` Commit the generated `.changeset/*.md` file with your PR. -CI runs `changeset status --since=origin/master` and fails a PR that changes releasable -code in a public package without a changeset. Test-, docs-, demo- and build-config-only -changes are exempt - the exact list lives in `changedFilePatterns` in -[.changeset/config.json](.changeset/config.json). If a PR touches releasable files but -should not trigger a release, add an empty changeset: +CI runs `changeset status --since=origin/master` and fails a PR that changes +releasable code in a public package without a changeset. Test-, docs-, demo- and build-config-only changes are exempt - the exact list can be found in +`changedFilePatterns` in [.changeset/config.json](.changeset/config.json). If a +PR touches releasable files but should not trigger a release, add an empty +changeset: ```bash yarn changeset add --empty @@ -122,8 +125,9 @@ yarn changeset add --empty ## Releasing (maintainers) -Releasing is automated by [.github/workflows/release.yml](.github/workflows/release.yml), -which runs on every push to `master`: +Releasing is automated by +[.github/workflows/release.yml](.github/workflows/release.yml), which runs on +every push to `master`: 1. **Version** - while there are pending changesets, the workflow keeps a `changeset-release/master` PR ("Version Packages") up to date. That PR applies the @@ -135,14 +139,20 @@ which runs on every push to `master`: Notes: -- Private packages (`examples/*`, `@joint/shapes-general`, `@joint/shapes-general-tools`) - are never versioned or published. -- Packages depending on `@joint/core` with a `workspace:~` range (`@joint/decorators`, - `@joint/layout-directed-graph`, `@joint/layout-msagl`) get an automatic patch release - whenever `@joint/core` gets a minor release, because their dependency range has to move. -- Prereleases use the standard changesets pre mode: `yarn changeset pre enter beta` on - `master`, release as usual, then `yarn changeset pre exit`. -- Snapshot releases: `yarn changeset version --snapshot` + `yarn changeset publish --tag`. +- Private packages are never versioned or published. +- Packages depending on `@joint/core` with a `workspace:~` range + (`@joint/layout-directed-graph`, `@joint/layout-msagl`) get an automatic + release whenever `@joint/core` gets a minor release, because their dependency + range has to move. +- `@joint/core`, `@joint/layout-directed-graph` and `@joint/layout-msagl` are + **linked**, so any of them released together share one version (the highest + bump type in the run, applied to the group's highest current version). Every + other package versions independently. +- Prereleases use the standard changesets pre mode: + `yarn changeset pre enter beta` on `master`, release as usual, then + `yarn changeset pre exit`. +- Snapshot releases: `yarn changeset version --snapshot` + + `yarn changeset publish --tag`. ## Code Style From b3747d40f95e7a1c3a3e3a6919e6576eb7a57665 Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Wed, 19 Aug 2026 14:09:56 +0200 Subject: [PATCH 3/8] explain changesets format in readme files + improve their formatting --- .changeset/README.md | 41 +++++++-- CLAUDE.md | 26 ++++-- CONTRIBUTING.md | 151 +++++++++++++++++++++++++++------ packages/joint-react/CLAUDE.md | 77 ++++++++++++----- 4 files changed, 237 insertions(+), 58 deletions(-) diff --git a/.changeset/README.md b/.changeset/README.md index 654c6d4750..5536f7617f 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -1,8 +1,39 @@ # Changesets -Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works -with multi-package repos, or single-package repos to help you version and publish your code. You can -find the full documentation for it [in our repository](https://github.com/changesets/changesets). +This folder holds pending changesets. Versions, `CHANGELOG.md` files and npm +publishing are driven from them by +[`@changesets/cli`](https://github.com/changesets/changesets) +- see [CONTRIBUTING.md](../CONTRIBUTING.md#changesets) for the full workflow and +[Changeset format](../CONTRIBUTING.md#changeset-format) for the rules this project expects. -We have a quick list of common questions to get you started engaging with this project in -[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md). +Add one with `yarn changeset`, or write the file by hand: + +```markdown +--- +"@joint/core": minor +--- + +dia.Paper - add `originX` and `originY` options to `getFitToContentArea()` +``` + +The short version of the format: + +- **Frontmatter** - which packages this changeset releases, and the bump type + (`patch`, `minor`, `major`). Listing several packages is rare: the body is + copied verbatim into each one's changelog. Prefer one changeset per package. +- **Body** - the changelog entry, one line, `scope - description`. One changeset + becomes exactly one changelog bullet (later lines are folded into that same + bullet, not turned into new ones) - so write no `-`/`*` bullets of your own + and add another changeset file for each further changelog line. +- **Scope** - usually `namespace.Class` (`dia.Paper`, `elementTools.Control`, + `mvc.View`, `layout.MSAGL`), or the component/hook for `@joint/react` + (``, `useCreateFeature`). A bare `namespace` (`anchors`, + `connectionPoints`) when the change covers all of it; no scope at all for + package-wide, architectural changes. +- **Description** - less than ~100 characters, lowercase, no trailing period, + verb first. Code artifacts in backticks (`` `changeId` ``, + `` `batch:start` ``, `` `initializeUnmounted: true` ``); functions and + methods always with `()`. + +An empty changeset (`yarn changeset add --empty`) marks a PR that touches +releasable files but should not trigger a release. diff --git a/CLAUDE.md b/CLAUDE.md index 9746687d75..d952f4ddee 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,12 +1,16 @@ # CLAUDE.md -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +This file provides guidance to Claude Code (claude.ai/code) when working with +code in this repository. ## Project Overview -JointJS is a JavaScript/TypeScript diagramming library for building visual and no-code/low-code applications. It's a Yarn workspace monorepo with multiple packages. +JointJS is a JavaScript/TypeScript diagramming library for building visual and +no-code/low-code applications. It's a Yarn workspace monorepo with multiple +packages. -**Stack:** Node 22.14.0, Yarn 4.18.0, TypeScript 5.8, Grunt (build), QUnit/Jest/Karma (testing) +**Stack:** Node 22.14.0, Yarn 4.18.0, TypeScript 5.8, Grunt (build), +QUnit/Jest/Karma (testing) ## Common Commands @@ -96,9 +100,19 @@ export { anchors, linkAnchors, connectionPoints, connectionStrategies, - **`/packages/joint-core/test/e2e/`** - Puppeteer E2E tests - **`/packages/joint-react/`** - Jest tests with @testing-library/react +## Changesets + +Releasable changes need a changeset in `/.changeset`. Before writing one, read +the **Changeset format** section of `CONTRIBUTING.md` - it defines the required +frontmatter, the `scope - description` changelog style (`dia.Paper`, `anchors`, +``, ...), and the backtick/`()` conventions - and follow it exactly. + ## Key Patterns -- **Change tracking:** Models emit `change:*` events; `changeId` event triggers only when ID actually changes -- **Workspace commands:** Use `yarn workspaces foreach --all -tvv run ` for cross-package operations -- **TypeScript:** Strict mode enabled with `noUnusedLocals`, `noUnusedParameters`, `noImplicitReturns` +- **Change tracking:** Models emit `change:*` events; `changeId` event triggers + only when ID actually changes +- **Workspace commands:** Use `yarn workspaces foreach --all -tvv run ` + for cross-package operations +- **TypeScript:** Strict mode enabled with `noUnusedLocals`, + `noUnusedParameters`, `noImplicitReturns` - **ESLint:** Uses flat config format (v9) via `@joint/eslint-config` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1dd83150ac..268b248123 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,7 @@ # Contributing to JointJS -Thank you for your interest in contributing to JointJS! This document provides guidelines and instructions for contributing. +Thank you for your interest in contributing to JointJS! This document provides +guidelines and instructions for contributing. ## Development Setup @@ -88,8 +89,13 @@ Types: `feat`, `fix`, `style`, `refactor`, `test`, `chore`, `example` ## Changesets Versions and changelogs are managed by [Changesets](https://changesets.dev). -Every package keeps its own `CHANGELOG.md`, and each package is versioned -independently. +Every package keeps its own `CHANGELOG.md`. Most packages are versioned +independently; the exception is `@joint/core`, `@joint/layout-directed-graph` +and `@joint/layout-msagl`, which are **linked** - whenever two or more of them +are released in the same run, they all land on one shared version number. +Linking only applies to the packages actually being released, so the three do +drift apart between releases. See [Releasing](#releasing-maintainers) for the +details. If your PR changes releasable code, add a changeset: @@ -98,31 +104,113 @@ yarn changeset ``` Pick the affected package and the bump type (`patch`, `minor`, `major`), then -write a short summary. If your change affects multiple packages and you need -each to be summarized differently, add a separate changeset for each package. -The summary line(s) are what ends up in a package's `CHANGELOG.md`, so write -them for users of the package - we a `scope - description` style: +write the summary as described in [Changeset format](#changeset-format) below. +Commit the generated `.changeset/*.md` file with your PR. + +CI runs `changeset status --since=origin/master` and fails a PR that changes +releasable code in a public package without a changeset. Test-, docs-, demo- and +build-config-only changes are exempt - the exact list can be found in +`changedFilePatterns` in [.changeset/config.json](.changeset/config.json). If a +PR touches releasable files but should not trigger a release, add an empty +changeset: + +```bash +yarn changeset add --empty +``` + +### Changeset format + +A changeset is a Markdown file in [.changeset/](.changeset/) with YAML +frontmatter. The frontmatter says **which packages** the change releases; the +body is the **changelog entry** that gets written into each of those packages' +`CHANGELOG.md`: ```markdown --- "@joint/core": minor --- -dia.Paper: add `originX` and `originY` options to `getFitToContentArea()` +dia.Paper - add `originX` and `originY` options to `getFitToContentArea()` ``` -Commit the generated `.changeset/*.md` file with your PR. +**Keep the body to a single line - one changeset produces exactly one changelog +bullet.** Only the body's first line receives the `- ` marker; any further lines +are indented beneath it and render as continuation text of that same bullet +rather than as entries of their own. So do not write your own `-`/`*` bullets or +Markdown headings in the body, and add another changeset file for every +additional changelog line you need. Most often that happens because a PR touches +several packages - see [Frontmatter](#frontmatter) below. -CI runs `changeset status --since=origin/master` and fails a PR that changes -releasable code in a public package without a changeset. Test-, docs-, demo- and build-config-only changes are exempt - the exact list can be found in -`changedFilePatterns` in [.changeset/config.json](.changeset/config.json). If a -PR touches releasable files but should not trigger a release, add an empty -changeset: +#### Frontmatter -```bash -yarn changeset add --empty +Each key is a package name, each value is the bump type (`patch`, `minor`, +`major`). **Listing more than one package in a single changeset should be +rare** - the body is copied unchanged into every listed package's changelog, +which is only correct when the exact same sentence is right for all of them. +When one commit touches several packages, write a separate changeset per +package, each with a body phrased for that package's users. + +#### Body + +Follow the changelog style already used in the packages' `CHANGELOG.md` files: +a scope, ` - ` (space-hyphen-space), then a short description. + +**Scope.** Most commonly `namespace.Class`: + +```markdown +dia.Paper - add `getCellView()` method for strict view lookup +mvc.View - add `classNamePrefix` instance property to override the `joint-` CSS class prefix +elementTools.Control - respect the `padding` option when computing the handle position +layout.DirectedGraph - add `rankSep` option +``` + +For `@joint/react`, the scope is the exported component or hook - components +written as JSX tags, hooks by name: + +```markdown + - fix the visual grid to redraw reactively when `drawGrid` changes +useCells - fix ghost cells reported after `resetCells()` ``` +Less commonly, a bare `namespace` when the change applies to everything in it +and repeating it per class would be noise: + +```markdown +anchors - add `rotate` option to all built-in anchors +connectionPoints - fix stroke-width handling on transformed elements +``` + +Least commonly, **no scope at all** for overarching or architectural changes +that affect the whole package - then the body is just the description, with no +scope and no leading ` - `: + +```markdown +drop support for Internet Explorer 11 +publish native ESM alongside the UMD bundle +``` + +The one fixed exception is a brand-new package, which uses the literal scope +`new package`: + +```markdown +new package - idiomatic React components and hooks for JointJS, built directly on the core engine +``` + +**Description.** Keep it to less than ~100 characters. Start lowercase, no +trailing period. Lead with a verb (`add`, `fix`, `deprecate`, `remove`, +`support`); a bug fix reads naturally as `fix ` or `fix to `. + +**Code artifacts** mentioned in the description - and most descriptions mention +at least one - go in backticks: `` `changeId` ``, `` `batch:start` ``, +`` `initializeUnmounted: true` ``, `` `drawGrid` ``. Function and method names +always carry trailing parentheses: + +| Write | Not | +| --- | --- | +| ``of `layout()` `` | of the layout function | +| ``of `layout()` `` | ``of `layout()` function`` | +| ``fix `toJSON()` to honor the option`` | fix `toJSON` to honor the option | + ## Releasing (maintainers) Releasing is automated by @@ -130,24 +218,31 @@ Releasing is automated by every push to `master`: 1. **Version** - while there are pending changesets, the workflow keeps a - `changeset-release/master` PR ("Version Packages") up to date. That PR applies the - version bumps, writes the per-package `CHANGELOG.md` entries and deletes the consumed - changesets. -2. **Publish** - merging that PR is the release. The workflow then builds the workspace, - runs `changeset publish` (which publishes through `yarn npm publish`), and creates a git - tag plus a GitHub Release for every published package. + `changeset-release/master` PR ("Version Packages") up to date. That PR + applies the version bumps, writes the per-package `CHANGELOG.md` entries and + deletes the consumed changesets. +2. **Publish** - merging that PR is the release. The workflow then builds the + workspace, runs `changeset publish` (which publishes through + `yarn npm publish`), and creates a git tag plus a GitHub Release for every + published package. Notes: - Private packages are never versioned or published. -- Packages depending on `@joint/core` with a `workspace:~` range - (`@joint/layout-directed-graph`, `@joint/layout-msagl`) get an automatic - release whenever `@joint/core` gets a minor release, because their dependency - range has to move. +- A package is only dragged into a release by a dependency when the new version + falls **outside** its declared range. `workspace:~` expands to + `~`, so `@joint/layout-directed-graph`, + `@joint/layout-msagl` and `@joint/decorators` get an automatic patch release + on a `@joint/core` **minor** or major, but not on a `@joint/core` patch - + `4.3.2` still satisfies `~4.3.1`. `@joint/react` uses `workspace:^`, so it + only rides along on a `@joint/core` **major**. - `@joint/core`, `@joint/layout-directed-graph` and `@joint/layout-msagl` are **linked**, so any of them released together share one version (the highest - bump type in the run, applied to the group's highest current version). Every - other package versions independently. + bump type in the run, applied to the group's highest current version). + Linking only covers the packages in that run - a linked package with nothing + to release keeps its current version, which is how `@joint/core` can sit at + `4.3.1` while both layout packages are still at `4.3.0`. Every other package + versions independently. - Prereleases use the standard changesets pre mode: `yarn changeset pre enter beta` on `master`, release as usual, then `yarn changeset pre exit`. diff --git a/packages/joint-react/CLAUDE.md b/packages/joint-react/CLAUDE.md index 91214c9bba..87035f056b 100644 --- a/packages/joint-react/CLAUDE.md +++ b/packages/joint-react/CLAUDE.md @@ -1,12 +1,17 @@ # CLAUDE.md -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +This file provides guidance to Claude Code (claude.ai/code) when working with +code in this repository. ## Project Overview -`@joint/react` is the React bindings library for JointJS. It provides React components and hooks for building diagramming applications with JointJS, rendering diagram elements as React components via SVG foreignObject portals. +`@joint/react` is the React bindings library for JointJS. It provides React +components and hooks for building diagramming applications with JointJS, +rendering diagram elements as React components via SVG foreignObject portals. -**Stack:** TypeScript 5.9, React 19 (peer: >=18 <20), esbuild (build), Vite (storybook/dev), Jest 30 + @testing-library/react (testing), ESLint 9 flat config, Storybook 10 +**Stack:** TypeScript 5.9, React 19 (peer: >=18 <20), esbuild (build), Vite +(storybook/dev), Jest 30 + @testing-library/react (testing), ESLint 9 flat +config, Storybook 10 ## Common Commands @@ -36,13 +41,33 @@ yarn storybook yarn build-storybook ``` +## Changesets + +Releasable changes need a changeset - the format is defined in the **Changeset +format** section of the repository's `CONTRIBUTING.md`. Two things are specific +to this package: + +- The changelog scope is the exported component or hook rather than a JointJS + namespace - components as JSX tags, hooks by name: + + ```markdown + - fix the visual grid to redraw reactively when `drawGrid` changes + useCells - fix ghost cells reported after `resetCells()` + ``` + +- `@joint/react` is versioned independently. It is not part of the + `@joint/core` linked group, and because it depends on core via `workspace:^`, + a `@joint/core` minor release does not drag it along - only a major does. + # Clean Code & Style Guidelines ## General - Prefer clear, explicit code over clever one-liners. Maintainability > brevity. -- When editing existing code, preserve the existing style unless I explicitly ask for a refactor. -- Leave code cleaner than you found it. Continuously refactor small things instead of accumulating technical debt. +- When editing existing code, preserve the existing style unless I explicitly + ask for a refactor. +- Leave code cleaner than you found it. Continuously refactor small things + instead of accumulating technical debt. ## Constants Over Magic Numbers @@ -54,9 +79,11 @@ yarn build-storybook - Variables, functions, and classes should reveal their purpose. - Names should explain **why** something exists and **how** it is used. -- Avoid abbreviations unless they are truly universal (e.g. `id`, `URL`, `HTML`). +- Avoid abbreviations unless they are truly universal (e.g. `id`, `URL`, + `HTML`). - Boolean names must be self-descriptive and read like conditions: - - Use prefixes: `is`, `has`, `should`, `can`, `must`, `needs` (e.g. `isOpen`, `hasError`, `shouldRetry`). + - Use prefixes: `is`, `has`, `should`, `can`, `must`, `needs` (e.g. `isOpen`, + `hasError`, `shouldRetry`). - Avoid generic names like `flag`, `ok`, `state`, `enabled` without context. - Function names should describe behavior, not implementation details. @@ -70,7 +97,8 @@ yarn build-storybook ## Smart Comments -- Do **not** comment on what the code does if the code can be made self-explanatory instead. +- Do **not** comment on what the code does if the code can be made + self-explanatory instead. - Prefer to improve the code so it reads clearly without comments. - Use comments to explain: - Why something is done in a non-obvious way. @@ -82,14 +110,16 @@ yarn build-storybook - Each function should do exactly one thing. - Functions should be small and focused. -- If a function needs a long comment to explain what it does, consider splitting it into smaller functions. +- If a function needs a long comment to explain what it does, consider + splitting it into smaller functions. - JSDoc is mandatory for all exported functions. ## DRY (Don't Repeat Yourself) - Extract repeated code into reusable functions or utilities. - Share common logic through proper abstractions. -- Maintain single sources of truth for configuration, constants, and shared logic. +- Maintain single sources of truth for configuration, constants, and shared + logic. ## Clean Structure @@ -108,23 +138,32 @@ yarn build-storybook - Never use `any` in new code: - Prefer proper types, generics, unions, or `unknown` + narrowing. - - If `any` is unavoidable at a boundary (e.g. 3rd-party library), isolate it and add a clear `TODO` explaining why. + - If `any` is unavoidable at a boundary (e.g. 3rd-party library), isolate it + and add a clear `TODO` explaining why. - Write `strict`-friendly code: - No implicit `any`. - Avoid sloppy or unnecessary `as` casts. - - Avoid `as any` and non-null assertions (`!`) unless absolutely necessary; justify them with a short comment. + - Avoid `as any` and non-null assertions (`!`) unless absolutely necessary; + justify them with a short comment. - Use `interface`/`type` aliases for data structures instead of loose objects. -- Keep function signatures explicit and well-typed, especially for exported functions and public APIs. -- Prefer readonly/immutable data where reasonable (e.g. `readonly` props, avoid mutating function arguments). +- Keep function signatures explicit and well-typed, especially for exported + functions and public APIs. +- Prefer readonly/immutable data where reasonable (e.g. `readonly` props, avoid + mutating function arguments). ## Performance Mindset - Avoid unnecessary allocations and copies: - - No pointless spreading (`{ ...obj }`) or `JSON.parse(JSON.stringify(...))` in hot paths. -- Avoid creating new functions/objects inside tight loops or very frequently rendered components unless memoized. -- Use `useMemo` / `useCallback` **only** when they prevent real, recurring work or re-renders, not everywhere by default. -- Be careful not to introduce extra re-renders by changing prop shapes unnecessarily. -- Prefer algorithmic improvements and proper data structures over micro-optimizations when performance is a concern. + - No pointless spreading (`{ ...obj }`) or `JSON.parse(JSON.stringify(...))` + in hot paths. +- Avoid creating new functions/objects inside tight loops or very frequently + rendered components unless memoized. +- Use `useMemo` / `useCallback` **only** when they prevent real, recurring work + or re-renders, not everywhere by default. +- Be careful not to introduce extra re-renders by changing prop shapes + unnecessarily. +- Prefer algorithmic improvements and proper data structures over + micro-optimizations when performance is a concern. ## Code Quality Maintenance From de644aaabdf02a5e4c24b9dea139f5ef4872a70a Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Wed, 19 Aug 2026 14:10:21 +0200 Subject: [PATCH 4/8] update joint-core dependency of joint-decorators --- packages/joint-decorators/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/joint-decorators/package.json b/packages/joint-decorators/package.json index 2b298f5f66..722c84200a 100644 --- a/packages/joint-decorators/package.json +++ b/packages/joint-decorators/package.json @@ -38,7 +38,7 @@ "./CHANGELOG.md" ], "dependencies": { - "@joint/core": "workspace:~" + "@joint/core": "workspace:^" }, "devDependencies": { "@joint/eslint-config": "workspace:*", From 45ca9c8c8319045415c046f0b114824243bc212c Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Wed, 19 Aug 2026 14:24:51 +0200 Subject: [PATCH 5/8] update yarn.lock --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 0b5fb1dff8..5ffa0fea5c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5862,7 +5862,7 @@ __metadata: version: 0.0.0-use.local resolution: "@joint/decorators@workspace:packages/joint-decorators" dependencies: - "@joint/core": "workspace:~" + "@joint/core": "workspace:^" "@joint/eslint-config": "workspace:*" eslint: "npm:9.39.2" typescript: "npm:5.8.2" From 3c753f1a80e156fe87c3cccaffce588215a40220 Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Wed, 19 Aug 2026 14:30:47 +0200 Subject: [PATCH 6/8] improve GHA comment --- .github/workflows/test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 84b3643c83..3945626a6b 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -64,7 +64,7 @@ jobs: # Changing releasable code in a public package must provide a changeset # (Releasable files are configured in `.changeset/config.json`) - # (Call `yarn changeset --empty` for a PR without releasable code) + # (Call `yarn changeset add --empty` to opt out of a release) - name: Check changeset id: check-changeset # Release PR is skipped - it consumes all changesets instead From 8f0a634570d4e08a2654ca55fad7077556fa4f75 Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Wed, 19 Aug 2026 15:14:08 +0200 Subject: [PATCH 7/8] readme updates --- .changeset/README.md | 9 ++++---- .github/pull_request_template.md | 2 +- CLAUDE.md | 37 +++++++++++++++++--------------- CONTRIBUTING.md | 19 +++++++--------- packages/joint-core/README.md | 2 +- packages/joint-react/CLAUDE.md | 9 ++++---- 6 files changed, 40 insertions(+), 38 deletions(-) diff --git a/.changeset/README.md b/.changeset/README.md index 5536f7617f..922e2d157d 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -4,7 +4,8 @@ This folder holds pending changesets. Versions, `CHANGELOG.md` files and npm publishing are driven from them by [`@changesets/cli`](https://github.com/changesets/changesets) - see [CONTRIBUTING.md](../CONTRIBUTING.md#changesets) for the full workflow and -[Changeset format](../CONTRIBUTING.md#changeset-format) for the rules this project expects. + [Changeset format](../CONTRIBUTING.md#changeset-format) for the rules this + project expects. Add one with `yarn changeset`, or write the file by hand: @@ -27,9 +28,9 @@ The short version of the format: and add another changeset file for each further changelog line. - **Scope** - usually `namespace.Class` (`dia.Paper`, `elementTools.Control`, `mvc.View`, `layout.MSAGL`), or the component/hook for `@joint/react` - (``, `useCreateFeature`). A bare `namespace` (`anchors`, - `connectionPoints`) when the change covers all of it; no scope at all for - package-wide, architectural changes. + (``, `useCells`). A bare `namespace` (`anchors`, `connectionPoints`) + when the change covers all of it; no scope at all for package-wide, + architectural changes. - **Description** - less than ~100 characters, lowercase, no trailing period, verb first. Code artifacts in backticks (`` `changeId` ``, `` `batch:start` ``, `` `initializeUnmounted: true` ``); functions and diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a3b7eb9b7d..eb6f1014dc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,7 +3,7 @@ Thank you for submitting a pull request! Please verify that: * [ ] Code is up-to-date with the `master` branch -* [ ] You've successfully run `grunt test` locally +* [ ] You've successfully run `yarn test` locally * [ ] If applicable, there are new or updated unit tests validating the change * [ ] If applicable, there are new or updated @types * [ ] If applicable, documentation has been updated diff --git a/CLAUDE.md b/CLAUDE.md index d952f4ddee..8c51f206d3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,8 +9,8 @@ JointJS is a JavaScript/TypeScript diagramming library for building visual and no-code/low-code applications. It's a Yarn workspace monorepo with multiple packages. -**Stack:** Node 22.14.0, Yarn 4.18.0, TypeScript 5.8, Grunt (build), -QUnit/Jest/Karma (testing) +**Stack:** Node 22.14.0, Yarn 4.18.0, TypeScript 5.8 (5.9 in `joint-react`), +Grunt (build), QUnit/Karma/Mocha/Jest (testing) ## Common Commands @@ -41,16 +41,10 @@ yarn build-bundles ### Running Single Tests -For joint-core QUnit tests, use Grunt directly: -```bash -cd packages/joint-core -grunt test:server --file=test/jointjs/paper.js # Single test file -``` - For joint-react Jest tests: ```bash cd packages/joint-react -yarn test -- --testPathPattern="ComponentName" +yarn jest --testPathPatterns="ComponentName" ``` ## Architecture @@ -58,7 +52,7 @@ yarn test -- --testPathPattern="ComponentName" ### Monorepo Packages (`/packages`) - **@joint/core** - Main diagramming library (MVC architecture, SVG rendering) -- **@joint/react** - React bindings and hooks (Vite + Storybook) +- **@joint/react** - React bindings and hooks (Rollup + esbuild, Storybook) - **@joint/layout-directed-graph** - Graph layout algorithms - **@joint/layout-msagl** - Microsoft MSAGL layout integration - **@joint/shapes-general** - General-purpose diagram shapes @@ -81,24 +75,30 @@ The library follows an MVC pattern: - **`anchors/`** - Connection point anchors on elements - **`highlighters/`** - Visual highlighting mechanisms - **`linkTools/`**, **`elementTools/`** - Interactive manipulation tools +- **`shapes/`** - Built-in shapes (standard) +- **`layout/`** - Built-in layouts (port, port label) - **`alg/`** - Graph algorithms (DFS, BFS, shortest path) ### Main Export (`/packages/joint-core/src/core.mjs`) ```javascript -export { anchors, linkAnchors, connectionPoints, connectionStrategies, - connectors, dia, highlighters, mvc, routers, util, - linkTools, elementTools, V, g }; +export { anchors, linkAnchors, config, connectionPoints, connectionStrategies, + connectors, dia, env, highlighters, layout, mvc, routers, setTheme, + util, version, linkTools, elementTools, V, Vectorizer, g }; ``` ## Test Organization - **`/packages/joint-core/test/jointjs/`** - QUnit tests for core functionality +- **`/packages/joint-core/test/jointjs-nodejs/`** - Mocha tests run by + `test-server` - **`/packages/joint-core/test/geometry/`** - Geometry library tests - **`/packages/joint-core/test/vectorizer/`** - SVG vectorizer tests -- **`/packages/joint-core/test/ts/`** - TypeScript definition validation +- **`/packages/joint-core/test/ts/`**, **`test/ts-exports/`** - TypeScript + definition validation - **`/packages/joint-core/test/e2e/`** - Puppeteer E2E tests -- **`/packages/joint-react/`** - Jest tests with @testing-library/react +- **`/packages/joint-react/src/`** - Jest tests with @testing-library/react, + colocated in `__tests__` folders ## Changesets @@ -113,6 +113,9 @@ frontmatter, the `scope - description` changelog style (`dia.Paper`, `anchors`, only when ID actually changes - **Workspace commands:** Use `yarn workspaces foreach --all -tvv run ` for cross-package operations -- **TypeScript:** Strict mode enabled with `noUnusedLocals`, - `noUnusedParameters`, `noImplicitReturns` +- **TypeScript:** Strict mode enabled; the settings are per package, not + repo-wide. `tsconfig.common.json` adds `noUnusedLocals`, + `noUnusedParameters` and `noImplicitReturns`, and is used by `joint-cli`, + `joint-decorators` and the `shapes-general` packages - `joint-core` and + `joint-react` each have their own - **ESLint:** Uses flat config format (v9) via `@joint/eslint-config` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 268b248123..68c4c7734c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,10 +39,6 @@ yarn test-server # Server-side tests (Node.js/Mocha) yarn test-client # Client-side tests (Browser/Karma/QUnit) yarn test-ts # TypeScript type definition tests yarn test-e2e # End-to-end tests (Puppeteer) - -# Run tests for a specific file (joint-core) -cd packages/joint-core -npm run test-client -- --file=test/jointjs/graph.js ``` ## Linting @@ -230,12 +226,13 @@ Notes: - Private packages are never versioned or published. - A package is only dragged into a release by a dependency when the new version - falls **outside** its declared range. `workspace:~` expands to - `~`, so `@joint/layout-directed-graph`, - `@joint/layout-msagl` and `@joint/decorators` get an automatic patch release - on a `@joint/core` **minor** or major, but not on a `@joint/core` patch - - `4.3.2` still satisfies `~4.3.1`. `@joint/react` uses `workspace:^`, so it - only rides along on a `@joint/core` **major**. + falls **outside** its declared range, and only through a runtime dependency - + a `devDependencies` entry never causes one. `workspace:~` expands to + `~`, so `@joint/layout-directed-graph` and + `@joint/layout-msagl` get an automatic patch release on a `@joint/core` + **minor** or major, but not on a `@joint/core` patch - `4.3.2` still satisfies + `~4.3.1`. `@joint/decorators` and `@joint/react` use `workspace:^`, so they + only ride along on a `@joint/core` **major**. - `@joint/core`, `@joint/layout-directed-graph` and `@joint/layout-msagl` are **linked**, so any of them released together share one version (the highest bump type in the run, applied to the group's highest current version). @@ -251,7 +248,7 @@ Notes: ## Code Style -- TypeScript strict mode is enabled +- TypeScript strict mode is enabled; its settings are per package, not repo-wide - ESLint flat config (v9) via `@joint/eslint-config` - Run `yarn lint-fix` before committing diff --git a/packages/joint-core/README.md b/packages/joint-core/README.md index de9329fba7..ddf439fd11 100644 --- a/packages/joint-core/README.md +++ b/packages/joint-core/README.md @@ -106,7 +106,7 @@ Make sure you have the following dependencies installed on your system: - [git](https://git-scm.com/) - [yarn](https://yarnpkg.com/getting-started/install) -The installation requires Node version >= 20.19.3, to avoid syntax errors during installation. +The installation requires Node version 22.14.0, to avoid syntax errors during installation. Make sure that you are using Yarn version >= 2.0.0, so that you have access to [Yarn workspace ranges](https://yarnpkg.com/features/workspaces#workspace-ranges-workspace) functionality. If you are using [Volta](https://volta.sh/), it will automatically read this restriction from `package.json`. diff --git a/packages/joint-react/CLAUDE.md b/packages/joint-react/CLAUDE.md index 87035f056b..3f4b241479 100644 --- a/packages/joint-react/CLAUDE.md +++ b/packages/joint-react/CLAUDE.md @@ -9,17 +9,18 @@ code in this repository. components and hooks for building diagramming applications with JointJS, rendering diagram elements as React components via SVG foreignObject portals. -**Stack:** TypeScript 5.9, React 19 (peer: >=18 <20), esbuild (build), Vite +**Stack:** TypeScript 5.9, React 19 (peer: >=18), Rollup + esbuild (build), Vite (storybook/dev), Jest 30 + @testing-library/react (testing), ESLint 9 flat config, Storybook 10 ## Common Commands ```bash -# Build (esbuild → dist/cjs, dist/esm, dist/types) +# Build (Rollup + esbuild → dist/cjs, dist/esm, dist/types) yarn build -# Run all checks (typecheck + knip + jest) +# Run all checks (typecheck + knip + jest, once against React 19 and once +# against React 18) yarn test # Run individual checks @@ -29,7 +30,7 @@ yarn lint-fix # ESLint with auto-fix yarn jest # Jest tests only # Run a single test file -yarn jest --testPathPattern="use-elements" +yarn jest --testPathPatterns="use-elements" # Run tests in watch mode yarn jest --watch From 63c7a2c4dc64a96686818573c270d431bc6f9a9d Mon Sep 17 00:00:00 2001 From: zbynekstara Date: Wed, 19 Aug 2026 16:02:50 +0200 Subject: [PATCH 8/8] add deprecation message for v4 to root changelog --- CHANGELOG | 313 +----------------------------------------------------- 1 file changed, 5 insertions(+), 308 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d8ed805f7b..66f2b1930d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,311 +1,8 @@ -27-07-2026 (v4.3.2) - - @joint/react - * - fix the visual grid to redraw reactively when `drawGrid`, `drawGridSize`, or `gridSize` change - -27-07-2026 (v4.3.1) - - @joint/core - * routers.rightAngle - fix to allow zero-value margins and un-clamp `minPathMargin` - -07-07-2026 (v4.3.1) - - @joint/react - * useCreateFeature - fix duplicate paper feature registration under React 18 StrictMode causing interactions to fire twice - * useCells - fix ghost cells reported after `resetCells()` - -07-07-2026 (v4.3.0) - - @joint/react - * new package - idiomatic React components and hooks for JointJS, built directly on the core engine - - @joint/core - * dia.Paper - add `originX` and `originY` options to `getFitToContentArea()` - * dia.Paper - add typed `EventMap` for IDE autocomplete and type-checking on `on()` calls - * dia.Paper - `resolveViewClass` factory now receives the resolved namespace view class as a second argument - * dia.Paper - add `getCellView()` method for strict view lookup - * dia.Paper - add `setDragging()` and `isDragging()` methods for drag-state access - * dia.Paper - auto-emit `resize` event when the host container is resized via CSS - * dia.Paper - fix stale cell views when cells become hidden during a batch update - * dia.Paper - `elementView` / `linkView` factory options now receive the namespace view class as a second argument - * dia.GridLayerView - read built-in grid patterns from the paper constructor's static field - * dia.CellView - `getNodeBoundingRect()` and new `computeNodeBoundingRect()` support HTML elements - * dia.Graph - add `getCellNamespace()`, `setCellNamespace()`, `getTypeConstructor()`, `getTypeDefaults()`; deprecate `CellCollection.cellNamespace` setter - * dia.Graph - add typed `EventMap` for IDE autocomplete and type-checking on `on()` calls - * dia.Graph - add `port` and `magnet` options to `getConnectedLinks()` - * dia.Cell - support predicate function for `ignoreEmptyAttributes` option of `toJSON()` - * dia.Cell - add `Cell.JSON` and `Cell.JSONInit` types; deprecate `GenericAttributes` - * anchors.midSide - add `'top-bottom'`, `'bottom-top'`, `'left-right'`, `'right-left'` direction modes - * highlighters - add HTML element support to the mask highlighter - * routers.rightAngle - fix anchor point excluded from clearance bounding-box union - * routers.rightAngle - add `minPathMargin`, `sourceMargin`, and `targetMargin` options - * mvc.View - add `classNamePrefix` instance property to override the `joint-` CSS class prefix - * config - add `storeEmbeds` option to suppress the `embeds` attribute - * Vectorizer - fix `getRelativeTransformation()` when the screen CTM is non-invertible - -11-06-2026 (v4.2.5) - - @joint/core - * util - fix to guard `merge()`, `omit()`, `pick()`, `assign()` against potential prototype pollution attacks - -13-02-2026 (v4.2.4) - - @joint/core - * dia.Paper - fix to handle element removal during pointer events - * dia.Graph - fix to pass options to `batch:start` and `batch:stop` events consistently - * mvc.Model - fix to trigger the `changeId` event only if the previous ID is different from the current ID - * Vectorizer - fix `getTransformToElement()` when the target node is inside a nested SVG document - -21-01-2026 (v4.2.3) - - @joint/core - * dia.Paper - fix to wake up idle `async` paper with `initializeUnmounted: true` when a new cell is added to graph - * dia.Paper - fix to prevent an error when a view is synchronously dumped during an asynchronous visibility check - * dia.Element - fix `getPortBBox()` to return a valid bbox when port has no size defined - - @joint/layout-directed-graph - * layout.DirectedGraph - fix to accept a padding object for `clusterPadding` option of `layout()` - -16-12-2025 (v4.2.2) - - @joint/core - * dia.Graph - fix types - - @joint/layout-directed-graph - * layout.DirectedGraph - ignore cell layers in the layout - - @joint/layout-msagl - * layout.MSAGL - ignore cell layers in the layout - -20-11-2025 (v4.2.1) - - @joint/core - * fix types to allow port optional transformations and make all SVG attributes nullable - -10-11-2025 (v4.2.0) - - * add new ELK layout example - - @joint/core - * dia.Paper - introduce layers API - * dia.Paper - rework `autoFreeze` option - * dia.Paper - add `measureNode()` callback option - * dia.Paper - add `findClosestMagnetToPoint()` method - * dia.Paper - add `viewManagement` option for advanced view lifecycle management - * dia.Paper - add `cellVisibility()` callback option - * dia.Paper - add `disposeHiddenCellViews()` method - * dia.Paper - add `prioritizeCellViewMount()` and `prioritizeCellViewUnmount()` methods - * dia.Paper - add `updateCellVisibility()` and `updateCellsVisibility()` methods - * dia.Paper - add `isCellVisible()` method - * dia.Paper - fix to only trigger `'render:idle'` event after all updates are completed - * dia.Paper - fix generic view detachment when `viewport()` callback returns `false` - * dia.Paper - fix to trigger `'render:*'` events when paper model is reset with no cells - * dia.Paper - fix rendering of first batch of updates in `async` mode to be asynchronous - * dia.LinkView - allow link-to-link snap - * dia.LinkView - fix to prevent link snap to a magnet when only the host cell is close enough - * dia.LinkView - fix missing arrowheads in WKWebView - * dia.CellView - make `getNodeBBox()` method work for nodes outside the render tree - * dia.CellView - optimize measurements of nodes referenced by `ref` attribute - * dia.Graph - add `syncCells()` method - * dia.Graph - add `removeCell()` method - * dia.Element - add `filter` option to `fitToChildren()` and `fitParent()` methods - * dia.Element - add `minRect` option to `fitToChildren()` and `fitParent()` methods - * dia.Element - support port position `args` inside `position` property - * dia.Element - add `getPortBBox()` and `getPortCenter()` methods - * dia.Element - support custom `portLayoutNamespace` and `portLabelLayoutNamespace` - * dia.Element - support passing custom port label layout functions to `label.position` - * dia.Element - optimize cloning in `getPort()` method - * dia.Element - optimize `hasPort()` and `hasPorts()` methods - * dia.Element - fix to parse numeric strings in port position args - * dia.Cell - add `getCenter()` method - * dia.Cell - add cell attributes merge strategy - * dia.Cell - support array paths in `transition()` and `stopTransition()` methods - * dia.Cell - expose `getAttributeDefinition()` method - * dia.Cell - fix to always create deep copy of arrays in constructor - * dia.attributes - add `useNoBreakSpace` which reinstates `V.sanitizeText()` functionality - * dia.attributes - fix `textWrap` attribute when Paper is not in render tree - * dia.HighlighterView - `z` option now supports highlighter positioning within SVG - * dia.HighlighterView - add static `has()` method to check if CellView has a highlighter attached - * dia.HighlighterView - fix to prevent highlighting nodes outside cell view - * dia.HighlighterView - fix to prevent removing not-yet-mounted HighlighterViews on unmount - * elementTools - fix tools position when attached directly to ElementView - * linkTools.Vertices - fix to call blur when `redundancyRemoval: false` - * anchors - add `useModelGeometry` option to all anchors - * anchors - add support for `calc()` expressions in `dx`, `dy` options - * anchors.midSide - add `mode` and `preferenceThreshold` options - * connectionPoints - add `useModelGeometry` option to `bbox` and `rectangle` - * mvc.View - allow providing custom `cid` in constructor - * mvc.Collection - use a Map to store references - * Vectorizer - add `safe` option to `getTransformToElement()` method - * Vectorizer - add static `getCommonAncestor()` method - * Vectorizer - add `useNoBreakSpace` option to `text()` method - * Vectorizer - deprecate static `sanitizeText()` method - * Vectorizer - fix to preserve camelCase in `attributeName`, `repeatCount` attribute names - * Vectorizer - fix to handle implicit line coordinates in `convertToPathData()` method - * Geometry - add `moveAroundPoint()` method to `Rect` - * fix to keep `'use strict'` for minified files - - @joint/layout-directed-graph - * layout.DirectedGraph - support `clusterPadding: 'default'` - * layout.DirectedGraph - expose Dagre `disableOptimalOrderHeuristic` and `customOrder` options - - @joint/layout-msagl - * layout.MSAGL - add new layout package utilizing the Microsoft Automatic Graph Layout - -13-03-2025 (v4.1.4) - - @joint/layout-directed-graph - * layout.DirectedGraph - fix `resizeClusters` option logic to only resize top-level clusters whose children were provided to the `layout()` function - -04-03-2025 (v4.1.3) - - @joint/layout-directed-graph - * layout.DirectedGraph - fix to accept `0` value for `nodesep`, `edgesep`, `ranksep` options of `layout()` - -04-02-2025 (v4.1.3) - - @joint/core - * mvc.Dom - use `getComputedStyle` for static position check - -16-01-2025 (v4.1.2) - - @joint/core - * mvc.Listener - fix to support running in Web Workers - -02-12-2024 (v4.1.1) - - @joint/core - * dia.ElementView - fix return types (DOM `Element` vs. `dia.Element`) - * dia.ToolsView - make sure tools are rendered before the first update - -27-11-2024 (v4.1.0) - - @joint/core - * dia.Paper - add methods to find cell/element/link views in paper - * dia.ElementView - add `getTargetParentView()` method - * dia.ElementView - fix to prevent exception when position or size is not defined - * dia.LinkView - update tools when labels change - * dia.LinkView - fix to invalidate the root node cache when labels change - * dia.CellView - expose special presentation attributes API - * dia.CellView - add `isIntersecting()` method - * dia.Graph - accept `toJSON()` options - * dia.Graph - add `transferCellEmbeds()` and `transferCellConnectedLinks()` methods - * dia.Graph - add methods to find cells/elements/links in graph - * dia.Graph - fix to remove graph reference from cells after `resetCells()` - * dia.Element - add `getPortGroupNames()` method - * dia.Cell - add `ignoreDefaults` and `ignoreEmptyAttributes` options to `toJSON()` - * dia.Cell - add `reparent` option to `embed()` - * elementTools.Control - add pointer event to `setPosition()` and `resetPosition()` signature - * linkTools - add `Control` link tool - * linkTools - add `RotateLabel` link tool - * linkTools - fix pending batch for `TargetArrowhead` and `SourceArrowhead` - * linkTools.Vertices - add `vertexAdding.interactiveLinkNode` option - * linkTools.Button - allow `distance` to be defined via callback - * routers.RightAngle - fix various routing issues - * dia.HighlighterView - add static `getAll()` method - * dia.ToolsView - fix to prevent tool `update()` from being called before previous `render()` due to visibility - * dia.ToolView - add `visibility` option callback - * mvc.View - fix to allow setting `style` via options - * util - add `objectDifference()` method - * util - expose `calc()` expression API - * util - expose `cloneCells()` method - * Geometry - add `strict` option to `containsPoint()` of `Rect` - - @joint/layout-directed-graph - * layout.DirectedGraph - add `graph` option to `fromGraphLib()` - -31-05-2024 (v4.0.4) - - @joint/core - * update HTML demo in alignment with v4 - * dia.LinkView - fix missing arrowheads in Safari - * dia.attributes - fix to take the inline font attributes into account in `textWrap` - -14-05-2024 (v4.0.3) - - * examples.libavoid - add new demo to illustrate using libavoid-js for orthogonal routing - - @joint/core - * dia.Paper - fix to ensure grid pattern IDs are unique - * dia.ElementView - fix to support port IDs of number type - * linkTools.SourceArrowhead - fix to trigger `pointerdown` event when the user starts dragging an arrowhead - * linkTools.TargetArrowhead - fix to trigger `pointerdown` event when the user starts dragging an arrowhead - -10-04-2024 (v4.0.3) - - @joint/layout-directed-graph - * fix distributed `package.json` by resolving `@joint/core` workspace dependency - -09-04-2024 (v4.0.2) - - @joint/core - * dia.Paper - fix to prevent leaks of pending animation frame requests on `resetViews()` - * routers.rightAngle - fix to improve generated route - * dia.attributes - fix `text-wrap` to take external CSS into account - * Vectorizer - fix `normalizePathData()` to support zero-length arcto curves - -02-02-2024 (v4.0.1) - - @joint/core - * fix content of `dist` folder - - @joint/layout-directed-graph - * change the constraint on `@joint/core` dependency to allow patches only - -01-02-2024 (v4.0.0) - - * switch to a monorepo - - @joint/core - * rename package from `jointjs` to `@joint/core` - * remove `jQuery`, `backbone`, and `lodash` dependencies - * drop `CSS` (`JointJS` no longer distributed with CSS) - * dia.Paper - change the default cell sorting to `APPROX` type - * dia.Paper - remove deprecated `perpendicularLinks` option - * dia.Paper - remove deprecated `linkConnectionPoint` option - * dia.Paper - change the value of the `defaultConnectionPoint` option to `boundary` - * dia.Paper - add SVG `grid` layer - * dia.Paper - drop `drawGrid()` and `clearGrid()` methods - * dia.Paper - new `transform` event added - * dia.Paper - allow passing custom data along with transformation events - * dia.Paper - allow passing custom data along with resize events - * dia.Paper - `origin` option removed - * dia.Paper - `setOrigin` method removed - * dia.Paper - `scale()` no longer accepts scaling origin - * dia.Paper - add `scaleUniformAtPoint()` method - * dia.Paper - fix `paper:pinch` dispatched event type - * dia.LinkView - remove support for legacy - * dia.CellView - early evaluation of `calc` attributes - * dia.CellView - disable `useCSSSelectors` by default - * dia.Graph - throw exception when cell constructor not found - * dia.Link - become an abstract class (same as `dia.Element`) - * dia.Link - replace legacy attributes in the default label definition - * dia.Link - remove the deprecated `smooth` attribute - * dia.Link - remove the deprecated `manhattan` attribute - * dia.Cell - add `mergeArrays` options to constructor - * dia.Cell - remove the `parent(id)` setter - * shapes.standard - use `calc` expressions instead of legacy attributes (drop use of `refWidth`, `refHeight`, `refX`, `refY`, etc.) - * shapes.basic - remove in favor of `shapes.standard` - * shapes.devs - remove from package, define as custom shapes in demos - * shapes.pn - remove from package, define as custom shapes in demos - * shapes.uml - remove from package, define as custom shapes in demos - * shapes.logic - remove from package, define as custom shapes in demos - * shapes.org - remove from package, define as custom shapes in demos - * shapes.chess - remove from package, define as custom shapes in demos - * shapes.fsa - remove from package, define as custom shapes in demos - * highlighters.opacity - add `alphaValue` option - * highlighters.stroke - add `nonScalingStroke` option - * elementTools.Remove - change type to `remove` - * linkTools.Remove - change type to `remove` - * linkTools.Vertices - fix to trigger `link:mouseleave` event when the user stops dragging a vertex - * attributes.filter - change the coordinate system of the filters from `objectBoundingBox` to `userSpaceOnUse` - * util - remove deprecated `shapePerimeterConnectionPoint` - * Vectorizer - enable camel case attribute support by default - * Vectorizer - make the `attributeNames` property public - - @joint/layout-directed-graph - * move the `DirectedGraph` layout into separate package - * upgrade `dagre` to version `1.0.4` (free from `lodash` dependency) +DEPRECATED: For changelog records from v4.0.0 onwards, refer to individual packages' CHANGELOG.md files: +- `packages/joint-core/CHANGELOG.md` +- `packages/joint-layout-directed-graph/CHANGELOG.md` +- `packages/joint-layout-msagl/CHANGELOG.md` +- `packages/joint-react/CHANGELOG.md` 07-11-2023 (v3.7.7)