pmx-canvas 0.1.21 → 0.1.22

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 CHANGED
@@ -3,6 +3,70 @@
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.22] - 2026-05-12
7
+
8
+ CLI ergonomics and response-size polish on top of 0.1.21. Adds a
9
+ `pmx-canvas diagram add` alias, declares kebab-case aliases for the
10
+ HTML sidecar fields in the schema, advertises those flags in `node
11
+ add --help --type html`, elides full file bodies from compact node
12
+ responses, validates presentation theme names with a clear error,
13
+ and improves keyboard focus inside present mode.
14
+
15
+ ### Added
16
+
17
+ - **`pmx-canvas diagram add` CLI alias.** A thin wrapper that
18
+ delegates to `pmx-canvas external-app add --kind excalidraw` so
19
+ diagram creation has a discoverable top-level command. The `diagram`
20
+ subcommand is now registered in `AGENT_COMMANDS` and surfaces in
21
+ `pmx-canvas --help`. The help text for `diagram add` notes the
22
+ equivalence so agents can switch between the two without guessing.
23
+ - **`node add --help --type html` advertises sidecar flags.** The
24
+ help output now includes a dedicated "HTML sidecar flags" section
25
+ listing `--summary`, `--agent-summary`, `--description`,
26
+ `--presentation true`, `--slide-title`, and `--embedded-node-id`,
27
+ matching the sidecars added in 0.1.21.
28
+ - **Kebab-case aliases for HTML sidecar fields in
29
+ `canvas_describe_schema`.** The schema entries for `agentSummary`,
30
+ `embeddedNodeIds`, `embeddedUrls`, and `slideTitles` now declare
31
+ the corresponding kebab-case flag names so agents reading the
32
+ schema discover the CLI shape without trial and error.
33
+
34
+ ### Changed
35
+
36
+ - **Compact node responses elide file content.**
37
+ `serializeCanvasNodeCompact` replaces a file node's full
38
+ `data.fileContent` with `{ omitted: 'file-content', bytes,
39
+ lineCount, sha256 }`. Agents that hit `canvas_get_node`,
40
+ `canvas_get_layout`, or batch-style responses without
41
+ `full: true` no longer re-receive the file body on every read;
42
+ the file `path` is still exposed as `content` so the node remains
43
+ fetchable.
44
+ - **Presentation theme names are validated.** Passing an invalid
45
+ `theme` (or `theme.base`) to a `presentation` primitive now
46
+ fails fast with a clear "use canvas, midnight, paper, aurora, or
47
+ a custom theme object" message instead of silently falling
48
+ through to a default. The HTTP `POST /api/canvas/node?type=html-
49
+ primitive` endpoint wraps `buildHtmlPrimitive` in a try/catch and
50
+ returns a 400 with the message.
51
+ - **Present-mode keyboard focus is tighter.** Tabbing inside the
52
+ presentation overlay now jumps to the Exit button instead of
53
+ escaping to the underlying canvas, Space and Enter on the Exit
54
+ button no longer trigger slide navigation, and the overlay
55
+ re-focuses itself when keyboard focus drifts outside. The deck
56
+ iframe loses its 18px corner radius in present mode for an
57
+ edge-to-edge fullscreen frame.
58
+
59
+ ### Internal
60
+
61
+ - Regression coverage for: `node add` forwarding HTML sidecar flags
62
+ through to the underlying html node, `node add --help --type
63
+ html` advertising the new flags, `diagram add` always invoking
64
+ the Excalidraw external app alias, `diagram` routing through the
65
+ agent CLI (not the server-startup path), presentation primitives
66
+ rejecting unknown theme names, and batch `file` node add
67
+ responses returning compact `file-content` metadata instead of
68
+ the full body.
69
+
6
70
  ## [0.1.21] - 2026-05-09
7
71
 
8
72
  HTML communication maturity pass on top of 0.1.20. Adds a
@@ -981,6 +1045,7 @@ otherwise have to discover by trial and error.
981
1045
  - Regression coverage for snapshot flat-`id` aliases on both MCP and
982
1046
  HTTP surfaces, plus async / top-level-`await` WebView script bodies.
983
1047
 
1048
+ [0.1.22]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.22
984
1049
  [0.1.21]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.21
985
1050
  [0.1.20]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.20
986
1051
  [0.1.19]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.19
@@ -2472,75 +2472,58 @@ body,
2472
2472
  inset: 0;
2473
2473
  z-index: 10050;
2474
2474
  display: flex;
2475
- flex-direction: column;
2476
- gap: 14px;
2477
- padding: clamp(12px, 2vw, 28px);
2475
+ padding: 0;
2478
2476
  background:
2479
2477
  radial-gradient(circle at top left, var(--c-accent-25), transparent 36rem),
2480
2478
  rgba(3, 7, 18, 0.96);
2481
2479
  color: var(--c-text);
2482
2480
  }
2483
2481
 
2484
- .html-presentation-toolbar {
2485
- display: flex;
2486
- align-items: center;
2487
- justify-content: space-between;
2488
- gap: 16px;
2489
- flex-shrink: 0;
2490
- padding: 10px 12px;
2491
- border: 1px solid var(--c-line);
2492
- border-radius: 16px;
2493
- background: var(--c-panel-glass);
2494
- box-shadow: 0 18px 50px var(--c-shadow-heavy);
2495
- }
2496
-
2497
- .html-presentation-kicker {
2498
- color: var(--c-accent);
2499
- font-size: 10px;
2500
- font-weight: 800;
2501
- letter-spacing: 0.14em;
2502
- text-transform: uppercase;
2503
- }
2504
-
2505
- .html-presentation-title {
2506
- max-width: min(72vw, 900px);
2507
- overflow: hidden;
2508
- color: var(--c-text);
2509
- font-size: 14px;
2510
- font-weight: 700;
2511
- text-overflow: ellipsis;
2512
- white-space: nowrap;
2513
- }
2514
-
2515
2482
  .html-presentation-exit {
2516
- flex-shrink: 0;
2517
- padding: 8px 12px;
2483
+ position: fixed;
2484
+ top: 12px;
2485
+ right: 12px;
2486
+ z-index: 1;
2487
+ padding: 10px 14px;
2518
2488
  border: 1px solid var(--c-line);
2519
2489
  border-radius: 999px;
2520
- background: var(--c-panel-soft);
2490
+ background: var(--c-panel-glass);
2491
+ box-shadow: 0 18px 50px var(--c-shadow-heavy);
2521
2492
  color: var(--c-text-soft);
2522
2493
  cursor: pointer;
2523
2494
  font: 600 12px/1 var(--font);
2495
+ opacity: 0;
2496
+ pointer-events: none;
2497
+ transform: translateY(-6px);
2498
+ transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
2524
2499
  }
2525
2500
 
2526
- .html-presentation-exit:hover {
2501
+ .html-presentation-exit:hover,
2502
+ .html-presentation-exit:focus-visible {
2527
2503
  border-color: var(--c-accent);
2528
2504
  color: var(--c-text);
2529
2505
  }
2530
2506
 
2507
+ .html-presentation-exit:focus,
2508
+ .html-presentation-exit:focus-visible {
2509
+ opacity: 1;
2510
+ pointer-events: auto;
2511
+ transform: translateY(0);
2512
+ }
2513
+
2531
2514
  .html-presentation-stage {
2532
2515
  flex: 1;
2533
2516
  min-height: 0;
2534
2517
  display: flex;
2535
- border-radius: 22px;
2518
+ border-radius: 0;
2536
2519
  background: var(--c-bg);
2537
- box-shadow: 0 24px 90px rgba(0, 0, 0, 0.55);
2538
2520
  overflow: hidden;
2539
2521
  }
2540
2522
 
2541
2523
  .html-node-frame-presentation {
2542
2524
  flex: 1;
2543
2525
  min-height: 0;
2526
+ border-radius: 0 !important;
2544
2527
  }
2545
2528
 
2546
2529
  /* ── Context pin button on node title bar ────────────────────── */