pmx-canvas 0.1.10 → 0.1.11
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 +83 -0
- package/dist/canvas/index.js +30 -30
- package/dist/json-render/index.js +115 -115
- package/dist/types/json-render/catalog.d.ts +10 -0
- package/dist/types/json-render/charts/components.d.ts +18 -0
- package/dist/types/json-render/charts/definitions.d.ts +4 -0
- package/dist/types/json-render/charts/extra-components.d.ts +3 -0
- package/dist/types/json-render/charts/extra-definitions.d.ts +6 -0
- package/dist/types/json-render/server.d.ts +4 -0
- package/dist/types/server/canvas-operations.d.ts +2 -0
- package/dist/types/server/index.d.ts +2 -0
- package/package.json +1 -1
- package/skills/pmx-canvas/SKILL.md +9 -0
- package/src/cli/agent.ts +78 -2
- package/src/cli/index.ts +6 -3
- package/src/client/canvas/CanvasNode.tsx +3 -1
- package/src/client/canvas/auto-fit.ts +1 -1
- package/src/json-render/charts/components.tsx +18 -10
- package/src/json-render/charts/definitions.ts +4 -0
- package/src/json-render/charts/extra-components.tsx +23 -16
- package/src/json-render/charts/extra-definitions.ts +6 -0
- package/src/json-render/server.ts +11 -0
- package/src/mcp/server.ts +10 -0
- package/src/server/canvas-operations.ts +21 -1
- package/src/server/canvas-schema.ts +5 -0
- package/src/server/diagram-presets.ts +44 -12
- package/src/server/index.ts +7 -1
- package/src/server/server.ts +33 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,88 @@
|
|
|
3
3
|
All notable changes to `pmx-canvas` are documented here. This project follows
|
|
4
4
|
[Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [0.1.11] - 2026-05-02
|
|
7
|
+
|
|
8
|
+
Agent ergonomics + chart polish on top of 0.1.10. Adds a `--strict-size`
|
|
9
|
+
mode for nodes that should scroll instead of auto-fit, surfaces
|
|
10
|
+
`pmx-canvas json-render` and `pmx-canvas screenshot` as top-level CLI
|
|
11
|
+
shortcuts, lets graph nodes hide legends and pie labels for compact
|
|
12
|
+
tile layouts, propagates explicit geometry to reused MCP-app nodes, and
|
|
13
|
+
folds Excalidraw bound text into container labels before sending it
|
|
14
|
+
through the diagram MCP.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **`--strict-size` / `--scroll-overflow` for node create and update.**
|
|
19
|
+
All node types now accept `strictSize` to keep the explicit
|
|
20
|
+
`width`/`height` frame fixed and scroll overflowing content instead of
|
|
21
|
+
letting the canvas auto-fit the node to its content. Surfaced through
|
|
22
|
+
CLI flags, HTTP `POST/PATCH /api/canvas/node`, dedicated json-render
|
|
23
|
+
and graph endpoints, and MCP tools (`canvas_add_node`,
|
|
24
|
+
`canvas_add_json_render_node`, `canvas_add_graph_node`).
|
|
25
|
+
`canvas_describe_schema` and `canvas://schema` advertise the field on
|
|
26
|
+
markdown, webpage, and graph entries with kebab-case aliases.
|
|
27
|
+
- **`pmx-canvas json-render` top-level CLI command.** Agent-friendly
|
|
28
|
+
shortcut for the json-render schema/example explorer. Supports
|
|
29
|
+
`--schema`, `--summary`, `--component <name>`, `--field <name>`, and
|
|
30
|
+
`--example`/`--examples`, mirroring the existing `node schema --type
|
|
31
|
+
json-render` data in a more direct shape.
|
|
32
|
+
- **`pmx-canvas screenshot` top-level CLI command.** Shorthand for
|
|
33
|
+
`pmx-canvas webview screenshot`, with the same `--output`,
|
|
34
|
+
`--format`, and `--quality` flags. Routes through the agent CLI like
|
|
35
|
+
the other top-level subcommands.
|
|
36
|
+
- **`showLegend` / `showLabels` chart display flags.** Graph node
|
|
37
|
+
payloads now accept `showLegend` and `showLabels` booleans that
|
|
38
|
+
cascade through CLI (`--show-legend`, `--show-labels`), HTTP, MCP,
|
|
39
|
+
and the json-render chart components. Set `showLegend: false` for
|
|
40
|
+
compact tile dashboards or `showLabels: false` to hide pie slice
|
|
41
|
+
labels.
|
|
42
|
+
- **Skill catches up to the new CLI surface.** The agent-facing
|
|
43
|
+
`skills/pmx-canvas/SKILL.md` now documents `pmx-canvas screenshot`,
|
|
44
|
+
`pmx-canvas json-render`, the `--strict-size` flag, and the chart
|
|
45
|
+
display flags, so agents do not have to discover them by reading the
|
|
46
|
+
CHANGELOG.
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- **Reused MCP-app nodes accept explicit geometry on reopen.** When
|
|
51
|
+
`canvas_open_mcp_app` (or the workbench `ext-app-open` SSE event)
|
|
52
|
+
reopens an existing mcp-app node and the call passes `x`, `y`,
|
|
53
|
+
`width`, or `height`, the server now applies that geometry to the
|
|
54
|
+
existing node instead of leaving the original frame in place. This
|
|
55
|
+
lets agents resize a previously created Excalidraw or other reusable
|
|
56
|
+
app node with a single call.
|
|
57
|
+
- **Compact json-render charts trim whitespace.** Bar, line, area,
|
|
58
|
+
scatter, pie, radar, stacked-bar, and composed charts share new
|
|
59
|
+
`chartMargin`, `polarChartMargin`, `axisTickMargin`, and
|
|
60
|
+
`legendMargin` constants, so axis ticks and legends sit closer to the
|
|
61
|
+
plot and small graph nodes keep more of their frame for the actual
|
|
62
|
+
chart.
|
|
63
|
+
- **Diagram preset folds bound text into container labels.** The
|
|
64
|
+
Excalidraw normalization path now collapses `text` elements that
|
|
65
|
+
reference a container into the container's `label` field (when the
|
|
66
|
+
container does not already carry a label) and removes the redundant
|
|
67
|
+
text element from the outgoing payload. This produces the in-shape
|
|
68
|
+
labels Excalidraw renders by default while still keeping the
|
|
69
|
+
bound-element references repaired from 0.1.10. The same normalization
|
|
70
|
+
also runs through `buildExcalidrawOpenMcpAppInput` so MCP `open`
|
|
71
|
+
payloads are repaired identically to checkpoint and tool-input
|
|
72
|
+
payloads.
|
|
73
|
+
- **Diagram preset seeds defaults when nothing renderable is present.**
|
|
74
|
+
An elements array containing only deletion or camera-update entries
|
|
75
|
+
(or stale ghosts) now falls back to the default Excalidraw preset
|
|
76
|
+
instead of being sent as an empty diagram.
|
|
77
|
+
|
|
78
|
+
### Internal
|
|
79
|
+
|
|
80
|
+
- Regression coverage for: `--strict-size` end-to-end through CLI,
|
|
81
|
+
HTTP, and MCP plus the auto-fit guard that keeps strict-size content
|
|
82
|
+
nodes from being auto-fitted; top-level CLI routing for `screenshot`
|
|
83
|
+
and `json-render`; compact graph specs that hide legends and pie
|
|
84
|
+
labels; reused mcp-app open with explicit geometry; Excalidraw
|
|
85
|
+
defaults for non-renderable element arrays; shared MCP open
|
|
86
|
+
normalization through the diagram-preset path.
|
|
87
|
+
|
|
6
88
|
## [0.1.10] - 2026-05-01
|
|
7
89
|
|
|
8
90
|
Agent-ergonomics and correctness pass on top of 0.1.9. Tightens
|
|
@@ -234,6 +316,7 @@ otherwise have to discover by trial and error.
|
|
|
234
316
|
- Regression coverage for snapshot flat-`id` aliases on both MCP and
|
|
235
317
|
HTTP surfaces, plus async / top-level-`await` WebView script bodies.
|
|
236
318
|
|
|
319
|
+
[0.1.11]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.11
|
|
237
320
|
[0.1.10]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.10
|
|
238
321
|
[0.1.9]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.9
|
|
239
322
|
[0.1.8]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.8
|