@matfsw/docusaurus-plantuml-plugin 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -1
- package/README.md +1 -1
- package/dist/theme/PlantUmlDiagram/useZoomPan.js +10 -5
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.3]
|
|
11
|
+
|
|
12
|
+
### Security
|
|
13
|
+
|
|
14
|
+
- `copy-webpack-plugin` `12` → `14`, which moves the transitive `serialize-javascript`
|
|
15
|
+
dependency to `7.0.7`. That closes a high-severity advisory (RCE via `RegExp.flags`) and a
|
|
16
|
+
denial-of-service advisory in the version the plugin previously pulled in. The dependency is
|
|
17
|
+
used at build time and never reaches a site visitor's browser.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- `engines.node` is now `>= 20.9.0`, following `copy-webpack-plugin@14`. In practice this is
|
|
22
|
+
not a restriction: the Node 20 LTS line begins at `20.9.0`, so any supported Node 20 already
|
|
23
|
+
satisfies it.
|
|
24
|
+
- Development dependencies updated: `globals` `16` → `17`, `@types/node` `22` → `26`, and
|
|
25
|
+
React `18` → `19` for the unit-test environment. The plugin still supports React 18 and 19;
|
|
26
|
+
the example site continues to exercise React 18 end to end, so both are covered.
|
|
27
|
+
- GitHub Actions updated: `actions/checkout` `5` → `7`, `actions/setup-node` `5` → `7`,
|
|
28
|
+
`actions/upload-artifact` `4` → `7`.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- Resets of the zoom view now have exactly one owner. The listener effect also reset on every
|
|
33
|
+
re-attach, duplicating the effect keyed on the rendered picture; any re-attach for an
|
|
34
|
+
unrelated reason would have silently discarded a zoom the reader had chosen.
|
|
35
|
+
- A unit test built a fake React element from its internal `$$typeof` symbol, which React 19
|
|
36
|
+
renamed. It now uses a real element, so it no longer depends on React internals.
|
|
37
|
+
- The maximize round-trip test no longer assumes effect flush order, which made it flaky on
|
|
38
|
+
CI. It asserts the same value, so a genuinely wrong transform still fails.
|
|
39
|
+
|
|
10
40
|
## [1.0.2]
|
|
11
41
|
|
|
12
42
|
### Fixed
|
|
@@ -96,7 +126,8 @@ Initial release.
|
|
|
96
126
|
opt-out.
|
|
97
127
|
- Plugin option validation that rejects unknown keys and out-of-range values at build time.
|
|
98
128
|
|
|
99
|
-
[Unreleased]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.0.
|
|
129
|
+
[Unreleased]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.0.3...HEAD
|
|
130
|
+
[1.0.3]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.0.2...v1.0.3
|
|
100
131
|
[1.0.2]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.0.1...v1.0.2
|
|
101
132
|
[1.0.1]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.0.0...v1.0.1
|
|
102
133
|
[1.0.0]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v0.1.0...v1.0.0
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ them are exported.
|
|
|
42
42
|
| Requirement | Supported |
|
|
43
43
|
| --------------- | -------------------------------------------------------------------------------------- |
|
|
44
44
|
| Docusaurus | `3.5.0` and later `3.x` |
|
|
45
|
-
| Node.js (build) | `>= 20`
|
|
45
|
+
| Node.js (build) | `>= 20.9.0` (the Node 20 LTS line) |
|
|
46
46
|
| React | `18.x` or `19.x` (matching your Docusaurus install) |
|
|
47
47
|
| Bundler | webpack (default) and Rspack (`future.v4` / `@docusaurus/faster`) |
|
|
48
48
|
| PlantUML engine | `@plantuml/core` `1.2026.6` |
|
|
@@ -121,8 +121,6 @@ export function useZoomPan({ enabled, resetKey }) {
|
|
|
121
121
|
const viewport = viewportRef.current;
|
|
122
122
|
if (!viewport)
|
|
123
123
|
return undefined;
|
|
124
|
-
// The layer node is replaced whenever the rendered SVG changes; start from a clean view.
|
|
125
|
-
write(IDENTITY);
|
|
126
124
|
let dragging = false;
|
|
127
125
|
let pointerId = null;
|
|
128
126
|
let startX = 0;
|
|
@@ -255,9 +253,16 @@ export function useZoomPan({ enabled, resetKey }) {
|
|
|
255
253
|
// the listeners against a clean view.
|
|
256
254
|
}, [apply, enabled, measure, resetKey, write]);
|
|
257
255
|
/**
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
256
|
+
* The single owner of "reset the view".
|
|
257
|
+
*
|
|
258
|
+
* `resetKey` identifies the rendered picture, so this covers both a new diagram and a
|
|
259
|
+
* colour-mode change — including the case where a cache hit resolves before any phase is
|
|
260
|
+
* reported and the component goes `ready -> ready` without the layer ever unmounting.
|
|
261
|
+
*
|
|
262
|
+
* The listener effect deliberately does *not* also reset. Its dependencies are a superset of
|
|
263
|
+
* this one's, so any re-attach for an unrelated reason — a remount, or a callback identity
|
|
264
|
+
* change from a future refactor — would silently throw away a zoom the reader had chosen.
|
|
265
|
+
* One owner means a reset happens when the picture changes, and at no other time.
|
|
261
266
|
*/
|
|
262
267
|
useEffect(() => {
|
|
263
268
|
if (!enabled)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matfsw/docusaurus-plantuml-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Render PlantUML diagrams in Docusaurus 3 entirely in the browser - no Java, no PlantUML server, no CDN.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docusaurus",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"CHANGELOG.md"
|
|
42
42
|
],
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=20.
|
|
44
|
+
"node": ">=20.9.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"clean": "node scripts/clean.mjs",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@plantuml/core": "^1.2026.6",
|
|
73
|
-
"copy-webpack-plugin": "^
|
|
73
|
+
"copy-webpack-plugin": "^14.0.0",
|
|
74
74
|
"dompurify": "^3.2.7"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
@@ -91,19 +91,19 @@
|
|
|
91
91
|
"@testing-library/jest-dom": "^6.9.1",
|
|
92
92
|
"@testing-library/react": "^16.3.0",
|
|
93
93
|
"@testing-library/user-event": "^14.6.1",
|
|
94
|
-
"@types/node": "^
|
|
95
|
-
"@types/react": "^
|
|
96
|
-
"@types/react-dom": "^
|
|
94
|
+
"@types/node": "^26.1.2",
|
|
95
|
+
"@types/react": "^19.2.18",
|
|
96
|
+
"@types/react-dom": "^19.2.4",
|
|
97
97
|
"@vitest/coverage-v8": "^3.2.4",
|
|
98
98
|
"eslint": "^9.39.1",
|
|
99
99
|
"eslint-config-prettier": "^10.1.8",
|
|
100
100
|
"eslint-plugin-react": "^7.37.5",
|
|
101
101
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
102
|
-
"globals": "^
|
|
102
|
+
"globals": "^17.9.0",
|
|
103
103
|
"jsdom": "^26.1.0",
|
|
104
104
|
"prettier": "^3.6.2",
|
|
105
|
-
"react": "^
|
|
106
|
-
"react-dom": "^
|
|
105
|
+
"react": "^19.2.8",
|
|
106
|
+
"react-dom": "^19.2.8",
|
|
107
107
|
"tsup": "^8.5.0",
|
|
108
108
|
"typescript": "~5.9.3",
|
|
109
109
|
"typescript-eslint": "^8.46.4",
|