@1agh/maude 0.28.1 → 0.29.0
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/README.md +2 -2
- package/{plugins/design/dev-server → apps/studio}/ai-banner.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/annotations-context-toolbar.tsx +285 -5
- package/{plugins/design/dev-server → apps/studio}/annotations-layer.tsx +1206 -119
- package/{plugins/design/dev-server → apps/studio}/api.ts +486 -32
- package/{plugins/design/dev-server → apps/studio}/artboard-activity-overlay.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/artboard-marquee.tsx +1 -1
- package/apps/studio/bin/_motion-sample-playwright.mjs +129 -0
- package/{plugins/design/dev-server → apps/studio}/bin/canvas-edit.sh +1 -1
- package/{plugins/design/dev-server → apps/studio}/bin/draw-proof.sh +37 -2
- package/{plugins/design/dev-server → apps/studio}/bin/preflight.sh +1 -1
- package/apps/studio/bin/read-annotations.mjs +438 -0
- package/apps/studio/bin/read-annotations.sh +11 -0
- package/{plugins/design/dev-server → apps/studio}/bin/runtime-health.sh +1 -1
- package/{plugins/design/dev-server → apps/studio}/bin/screenshot.sh +62 -2
- package/{plugins/design/dev-server → apps/studio}/bin/server-up.sh +9 -3
- package/apps/studio/bin/to-lottie-verify.html +68 -0
- package/apps/studio/bin/to-lottie.sh +128 -0
- package/{plugins/design/dev-server → apps/studio}/build.ts +5 -3
- package/{plugins/design/dev-server → apps/studio}/canvas-arrowheads.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/canvas-comment-mount.tsx +1 -1
- package/apps/studio/canvas-create.ts +104 -0
- package/{plugins/design/dev-server → apps/studio}/canvas-cursors.ts +46 -12
- package/{plugins/design/dev-server → apps/studio}/canvas-icons.tsx +60 -1
- package/{plugins/design/dev-server → apps/studio}/canvas-lib-inline.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/canvas-lib-resolver.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/canvas-lib.tsx +31 -12
- package/{plugins/design/dev-server → apps/studio}/canvas-shell.tsx +56 -41
- package/{plugins/design/dev-server → apps/studio}/client/app.jsx +1713 -530
- package/apps/studio/client/canvas-url.js +81 -0
- package/{plugins/design/dev-server → apps/studio}/client/comments-overlay.css +41 -27
- package/{plugins/design/dev-server → apps/studio}/client/index.html +2 -1
- package/apps/studio/client/styles/1-tokens-maude.css +296 -0
- package/apps/studio/client/styles/3-shell-maude.css +459 -0
- package/{plugins/design/dev-server → apps/studio}/client/styles/3-shell.css +129 -0
- package/apps/studio/client/styles/4-components-maude.css +74 -0
- package/{plugins/design/dev-server → apps/studio}/client/styles/4-components.css +357 -34
- package/apps/studio/client/styles/5-maude-overrides.css +123 -0
- package/{plugins/design/dev-server → apps/studio}/client/styles/_index.css +9 -0
- package/{plugins/design/dev-server → apps/studio}/client/styles.css +1 -1
- package/apps/studio/client/tour/overlay.jsx +191 -0
- package/apps/studio/client/tour/usage-tour.js +35 -0
- package/apps/studio/client/whats-new-seen.js +52 -0
- package/apps/studio/client/whats-new.jsx +250 -0
- package/{plugins/design/dev-server → apps/studio}/commands/annotation-strokes-command.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/commands/equal-spacing-command.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/commands/move-artboards-command.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/comments-overlay.tsx +25 -6
- package/{plugins/design/dev-server → apps/studio}/context-menu.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/contextual-toolbar.tsx +4 -7
- package/{plugins/design/dev-server → apps/studio}/cursors-overlay.tsx +1 -1
- package/apps/studio/dist/client.bundle.js +22825 -0
- package/apps/studio/dist/comment-mount.js +1960 -0
- package/apps/studio/dist/styles.css +5695 -0
- package/{plugins/design/dev-server → apps/studio}/dom-selection.ts +75 -4
- package/apps/studio/draw/animate.ts +333 -0
- package/{plugins/design/dev-server → apps/studio}/draw/brush.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/draw/composition.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/draw/geometry.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/draw/index.ts +4 -1
- package/{plugins/design/dev-server → apps/studio}/draw/layout.ts +1 -1
- package/apps/studio/draw/morph.ts +204 -0
- package/{plugins/design/dev-server → apps/studio}/draw/optimize.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/draw/palette.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/draw/primitives.ts +1 -1
- package/apps/studio/draw/serialize-animate.ts +324 -0
- package/{plugins/design/dev-server → apps/studio}/draw/serialize.ts +9 -3
- package/apps/studio/draw/test/animate.test.ts +172 -0
- package/apps/studio/draw/test/morph.test.ts +107 -0
- package/apps/studio/draw/test/serialize-animate.test.ts +142 -0
- package/{plugins/design/dev-server → apps/studio}/equal-spacing-detector.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/equal-spacing-handles.tsx +7 -29
- package/{plugins/design/dev-server → apps/studio}/export-dialog.tsx +13 -1
- package/{plugins/design/dev-server → apps/studio}/http.ts +102 -1
- package/{plugins/design/dev-server → apps/studio}/input-router.tsx +8 -1
- package/{plugins/design/dev-server → apps/studio}/inspect.ts +20 -3
- package/{plugins/design/dev-server → apps/studio}/marquee-overlay.tsx +5 -2
- package/{plugins/design/dev-server → apps/studio}/participants-chrome.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/paths.ts +15 -11
- package/{plugins/design/dev-server → apps/studio}/server.ts +18 -0
- package/{plugins/design/dev-server → apps/studio}/sync/index.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/test/annotations-layer.test.ts +63 -0
- package/{plugins/design/dev-server → apps/studio}/test/annotations-roundtrip.test.ts +97 -0
- package/apps/studio/test/annotations-text-format.test.ts +396 -0
- package/apps/studio/test/asset-api.test.ts +149 -0
- package/apps/studio/test/canvas-create-api.test.ts +361 -0
- package/{plugins/design/dev-server → apps/studio}/test/canvas-cursors.test.ts +2 -0
- package/{plugins/design/dev-server → apps/studio}/test/canvas-lib-resolver.test.ts +1 -1
- package/apps/studio/test/canvas-media-drop.test.ts +158 -0
- package/{plugins/design/dev-server → apps/studio}/test/canvas-origin-gate.test.ts +17 -1
- package/apps/studio/test/canvas-url.test.ts +99 -0
- package/apps/studio/test/index-data-canvas-ds.test.ts +97 -0
- package/apps/studio/test/motion-sample.test.ts +35 -0
- package/{plugins/design/dev-server → apps/studio}/test/perf-harness.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/test/phase-3.6-smoke.test.ts +3 -1
- package/apps/studio/test/read-annotations.test.ts +409 -0
- package/{plugins/design/dev-server → apps/studio}/test/sanitize-annotation-svg.test.ts +108 -2
- package/{plugins/design/dev-server → apps/studio}/test/shared-doc-convergence.test.ts +1 -1
- package/apps/studio/test/tour-overlay.test.tsx +56 -0
- package/{plugins/design/dev-server → apps/studio}/test/use-annotation-resize.test.ts +43 -0
- package/{plugins/design/dev-server → apps/studio}/test/use-tool-mode.test.tsx +4 -1
- package/apps/studio/test/whats-new.test.ts +101 -0
- package/apps/studio/text-imports.d.ts +9 -0
- package/{plugins/design/dev-server → apps/studio}/tool-palette.tsx +4 -69
- package/{plugins/design/dev-server → apps/studio}/undo-hud.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/undo-stack.ts +1 -1
- package/{plugins/design/dev-server → apps/studio}/use-agent-presence.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/use-annotation-resize.tsx +40 -7
- package/{plugins/design/dev-server → apps/studio}/use-annotation-selection.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/use-annotations-visibility.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/use-artboard-drag.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/use-canvas-activity.tsx +1 -1
- package/apps/studio/use-canvas-media-drop.tsx +343 -0
- package/{plugins/design/dev-server → apps/studio}/use-collab.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/use-cursor-modifiers.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/use-keyboard-discipline.tsx +5 -2
- package/{plugins/design/dev-server → apps/studio}/use-selection-set.tsx +9 -1
- package/{plugins/design/dev-server → apps/studio}/use-snap-guides.tsx +1 -1
- package/{plugins/design/dev-server → apps/studio}/use-tool-mode.tsx +3 -1
- package/{plugins/design/dev-server → apps/studio}/use-undo-stack.tsx +1 -1
- package/apps/studio/whats-new.json +139 -0
- package/apps/studio/whats-new.schema.json +70 -0
- package/apps/studio/whats-new.ts +87 -0
- package/cli/bin/maude.mjs +10 -0
- package/cli/commands/design.mjs +15 -7
- package/cli/commands/design.test.mjs +36 -0
- package/cli/commands/help.mjs +8 -2
- package/cli/commands/hub.mjs +3 -3
- package/cli/commands/hub.test.mjs +1 -1
- package/cli/commands/scenario-report.mjs +2 -9
- package/cli/lib/flow-design-integration.test.mjs +1 -1
- package/cli/lib/gitignore-block.mjs +1 -0
- package/cli/lib/plugin-cli-reachability.test.mjs +8 -7
- package/cli/lib/preflight.mjs +1 -1
- package/package.json +15 -15
- package/plugins/design/templates/brief-board.tsx.template +61 -0
- package/plugins/design/templates/canvas.tsx.template +1 -1
- package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +1 -1
- package/plugins/design/templates/design-system-inspiration/core/preview/_motion-readme.md.tpl +1 -1
- package/plugins/flow/.claude-plugin/config.schema.json +16 -0
- package/plugins/design/dev-server/dist/client.bundle.js +0 -20692
- package/plugins/design/dev-server/dist/comment-mount.js +0 -1924
- package/plugins/design/dev-server/dist/styles.css +0 -2710
- /package/{plugins/design/dev-server → apps/studio}/activity.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/_enumerate-artboards-playwright.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/_html-playwright.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/_pdf-playwright.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/_png-playwright.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/_pptx-playwright.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/_pw-launch.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/_screenshot-playwright.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/_svg-optimize.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/_svg-playwright.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/asset-sweep.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/bootstrap-check.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/check-runtime-bundles.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/draw-build.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/handoff.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/prep.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/scenario-report.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/slug.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/smoke.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/svg-optimize.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/bin/visual-sanity.sh +0 -0
- /package/{plugins/design/dev-server → apps/studio}/boot-self-heal.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/canvas-build.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/canvas-edit.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/canvas-header.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/canvas-meta.schema.json +0 -0
- /package/{plugins/design/dev-server → apps/studio}/canvas-pipeline.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/client/hmr.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/client/iframe-lazy.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/client/styles/0-reset.css +0 -0
- /package/{plugins/design/dev-server → apps/studio}/client/styles/1-tokens.css +0 -0
- /package/{plugins/design/dev-server → apps/studio}/client/styles/2-layout.css +0 -0
- /package/{plugins/design/dev-server → apps/studio}/client/styles/5-utilities.css +0 -0
- /package/{plugins/design/dev-server → apps/studio}/collab/ai-activity.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/collab/awareness-bridge.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/collab/git-lifecycle.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/collab/index.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/collab/persistence.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/collab/protocol.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/collab/registry.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/collab/room.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/config.schema.json +0 -0
- /package/{plugins/design/dev-server → apps/studio}/context.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/.min-sizes.json +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/lib0_decoding.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/lib0_encoding.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/motion.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/motion_react.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/pixi-js.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/react-dom.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/react-dom_client.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/react.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/react_jsx-dev-runtime.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/react_jsx-runtime.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/y-protocols_awareness.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/y-protocols_sync.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/dist/runtime/yjs.js +0 -0
- /package/{plugins/design/dev-server → apps/studio}/draw/test/brush.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/draw/test/composition.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/draw/test/geometry.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/draw/test/gradient.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/draw/test/layout.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/draw/test/optimize.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/draw/test/palette.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/draw/test/primitives.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/draw/test/serialize.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/examples/README.md +0 -0
- /package/{plugins/design/dev-server → apps/studio}/examples/perf-100-artboards.tsx +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/_browser-bundles.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/canva-handoff-prompt.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/canva.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/html.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/index.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/pdf.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/png.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/pptx.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/scope.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/svg.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/exporters/zip.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/fs-watch.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/handoff.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/history.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/hmr-broadcast.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/locator.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/mem.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/runtime-bundle.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/server.mjs +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/agent.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/atomic-write.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/codec.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/connection-state.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/echo-guard.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/fs-mirror.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/hubs-config.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/materialize.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/migrate-seed.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/origins.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/projection.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/status.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/sync/untrusted.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/_helpers.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/active-state.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/activity.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/ai-activity.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/annotation-strokes-command.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/annotations-api.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/annotations-draw-modifiers.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/artboard-activity-overlay.test.tsx +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/binary-smoke.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/boot-self-heal.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/bundle-smoke.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/canvas-build.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/canvas-edit.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/canvas-header.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/canvas-hmr-runtime.test.tsx +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/canvas-lib-inline.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/canvas-lib-motion.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/canvas-meta-api.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/canvas-pipeline.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/canvas-route.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/collab-annotations-bridge.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/collab-awareness-bridge.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/collab-bridge.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/collab-loopback.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/collab-protocol.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/collab-reseed-guard.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/collab-room.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/collab-stress.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/comment-mount.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/comments-api.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/compile-entry.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/context-resolve-tokens.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/csp-canvas-shell.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/equal-spacing-detector.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/canva.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/endpoint.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/history.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/html.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/pdf.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/png.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/pptx-deck.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/pptx.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/pw-launch.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/scope.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/svg.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/exporters/zip.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/fixtures/phase-20-annotations.svg +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/fixtures/phase-21-annotations.svg +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/fs-watch.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/git-lifecycle.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/handoff-static-frames.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/handoff.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/history-rollback.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/hmr-broadcast.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/hmr-classify.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/input-router.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/locator.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/marquee-overlay.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/move-artboards-command.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/participants-chrome.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/paths.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/runtime-bundle-error-mapping.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/runtime-bundle.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/server-lifecycle.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/shared-doc-foundation.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/shared-doc-migrate.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/shared-doc-projection.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/snap-distance-pill.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-agent.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-atomic-write.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-codec.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-connection-state.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-echo-guard.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-fs-mirror.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-hardening.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-hubs-config.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-meta-codec.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-runtime.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-status.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/sync-untrusted.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/system-endpoint.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/tool-palette.test.tsx +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/undo-stack.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-agent-presence.test.tsx +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-annotation-selection.test.tsx +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-artboard-drag.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-canvas-activity.test.tsx +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-collab.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-cursor-modifiers.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-keyboard-discipline.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-selection-set.test.tsx +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-snap-guides.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/use-undo-stack.test.tsx +0 -0
- /package/{plugins/design/dev-server → apps/studio}/test/ws-handshake.test.ts +0 -0
- /package/{plugins/design/dev-server → apps/studio}/tsconfig.json +0 -0
- /package/{plugins/design/dev-server → apps/studio}/ws.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file canvas-icons.tsx — Phase 5.1 inline-SVG icon set
|
|
3
|
-
* @scope
|
|
3
|
+
* @scope apps/studio/canvas-icons.tsx
|
|
4
4
|
* @purpose Tiny dependency-free Lucide-style icon set for the canvas
|
|
5
5
|
* chrome (tool palette, context toolbar). Each icon is a single
|
|
6
6
|
* `<svg>` with `currentColor` stroke so it inherits the button
|
|
@@ -122,6 +122,18 @@ export function IconText(props: IconProps) {
|
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
// Phase 23 — link (chain) glyph, used by the annotation context toolbar's
|
|
126
|
+
// "Open link" button. (Media is paste/drop-only — no toolbar buttons — so the
|
|
127
|
+
// picture-frame image icon was dropped.)
|
|
128
|
+
export function IconLink(props: IconProps) {
|
|
129
|
+
return (
|
|
130
|
+
<Svg {...props}>
|
|
131
|
+
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" />
|
|
132
|
+
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />
|
|
133
|
+
</Svg>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
125
137
|
export function IconPresentation(props: IconProps) {
|
|
126
138
|
return (
|
|
127
139
|
<Svg {...props}>
|
|
@@ -404,11 +416,58 @@ export function IconAlignRight(props: IconProps) {
|
|
|
404
416
|
);
|
|
405
417
|
}
|
|
406
418
|
|
|
419
|
+
// ── Annotation polish text-style icons (italic / underline / lists) ──────────
|
|
420
|
+
export function IconItalic(props: IconProps) {
|
|
421
|
+
return (
|
|
422
|
+
<Svg {...props}>
|
|
423
|
+
<path d="M10 5h8M6 19h8M14 5l-4 14" />
|
|
424
|
+
</Svg>
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
export function IconUnderline(props: IconProps) {
|
|
428
|
+
return (
|
|
429
|
+
<Svg {...props}>
|
|
430
|
+
<path d="M7 4v7a5 5 0 0010 0V4M5 20h14" />
|
|
431
|
+
</Svg>
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
export function IconListBullet(props: IconProps) {
|
|
435
|
+
return (
|
|
436
|
+
<Svg {...props}>
|
|
437
|
+
<path d="M9 6h11M9 12h11M9 18h11" />
|
|
438
|
+
<circle cx="4.5" cy="6" r="1.1" fill="currentColor" stroke="none" />
|
|
439
|
+
<circle cx="4.5" cy="12" r="1.1" fill="currentColor" stroke="none" />
|
|
440
|
+
<circle cx="4.5" cy="18" r="1.1" fill="currentColor" stroke="none" />
|
|
441
|
+
</Svg>
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
export function IconListOrdered(props: IconProps) {
|
|
445
|
+
return (
|
|
446
|
+
<Svg {...props}>
|
|
447
|
+
<path d="M10 6h10M10 12h10M10 18h10" />
|
|
448
|
+
<path d="M3 5l1.4-.5V9M3 9h2.8" strokeWidth={1.4} />
|
|
449
|
+
<path d="M3.2 14.2a1 1 0 011.7.7c0 .9-1.7 1.4-1.7 2.6h2" strokeWidth={1.4} />
|
|
450
|
+
</Svg>
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// ── Annotation polish — highlighter (chisel-tip marker) ──────────────────────
|
|
455
|
+
export function IconHighlighter(props: IconProps) {
|
|
456
|
+
return (
|
|
457
|
+
<Svg {...props}>
|
|
458
|
+
<path d="M14 4l6 6-8.5 8.5H6v-5.5z" />
|
|
459
|
+
<path d="M11 7l6 6" />
|
|
460
|
+
<path d="M4 21h7" strokeWidth={2.5} />
|
|
461
|
+
</Svg>
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
|
|
407
465
|
export const TOOL_ICONS: Record<string, (p: IconProps) => JSX.Element> = {
|
|
408
466
|
move: IconMove,
|
|
409
467
|
hand: IconHand,
|
|
410
468
|
comment: IconComment,
|
|
411
469
|
pen: IconPen,
|
|
470
|
+
highlighter: IconHighlighter,
|
|
412
471
|
// Phase 24 — single Shape tool. rect/ellipse kept for any legacy lookups.
|
|
413
472
|
shape: IconShape,
|
|
414
473
|
rect: IconRect,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
// `/design:handoff` emits a self-contained shadcn registry-item.json. Canvases
|
|
5
5
|
// import their envelope + helpers from `@maude/canvas-lib`, which the dev-server
|
|
6
|
-
// resolves to its bundled `
|
|
6
|
+
// resolves to its bundled `apps/studio/canvas-lib.tsx`. The
|
|
7
7
|
// handoff drop must inline every used export so the consumer never sees the
|
|
8
8
|
// `@maude/canvas-lib` specifier — it's a dev-time virtual module, not a real
|
|
9
9
|
// npm dep.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Canvases import the shared canvas library via the specifier `@maude/canvas-lib`.
|
|
4
4
|
// At build time we redirect that to the dev-server-bundled source at
|
|
5
|
-
// `
|
|
5
|
+
// `apps/studio/canvas-lib.tsx` so:
|
|
6
6
|
//
|
|
7
7
|
// - the lib ships with the dev-server install (single source of truth — see
|
|
8
8
|
// DDR-025; reverses DDR-022's "project-owned source under <designRoot>/_lib/"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file canvas-lib.tsx — dev-server-bundled canvas library
|
|
3
|
-
* @scope
|
|
3
|
+
* @scope apps/studio/canvas-lib.tsx
|
|
4
4
|
* Ships with the dev-server install; resolved at canvas build time
|
|
5
5
|
* via the `@maude/canvas-lib` virtual specifier. Per DDR-025, this
|
|
6
6
|
* is the single source of truth — no project-side copy.
|
|
@@ -137,10 +137,9 @@ const ENGINE_CSS = `
|
|
|
137
137
|
/* Canvas-shell chrome — the workspace plane + dotted grid follow the Maude
|
|
138
138
|
chrome theme (--maude-chrome-*), NOT the DS palette. See canvas-shell.tsx
|
|
139
139
|
HUD_TOKENS_CSS. Artboards (.dc-artboard) keep the DS theme. */
|
|
140
|
-
background-color: var(--maude-chrome-bg-
|
|
140
|
+
background-color: var(--maude-chrome-bg-0, #f4f1ea);
|
|
141
141
|
background-image:
|
|
142
|
-
|
|
143
|
-
linear-gradient(90deg, var(--maude-chrome-border, rgba(0,0,0,0.08)) 1px, transparent 1px);
|
|
142
|
+
radial-gradient(var(--maude-chrome-dot, rgba(0,0,0,0.12)) 1.1px, transparent 1.2px);
|
|
144
143
|
background-size: 24px 24px;
|
|
145
144
|
}
|
|
146
145
|
/* DDR-046 — Snap guides. Sibling kind = confident magenta + glow + distance
|
|
@@ -199,6 +198,17 @@ const ENGINE_CSS = `
|
|
|
199
198
|
irrelevant under zoom (zoom anchors top-left of the box). will-change
|
|
200
199
|
hints to the compositor that this layer changes often. */
|
|
201
200
|
will-change: transform;
|
|
201
|
+
/* Marquee / multi-select drags over artboards must not trigger native text
|
|
202
|
+
selection (it highlighted the canvas content). Editable surfaces re-enable
|
|
203
|
+
it below. */
|
|
204
|
+
user-select: none;
|
|
205
|
+
-webkit-user-select: none;
|
|
206
|
+
}
|
|
207
|
+
.dc-world input,
|
|
208
|
+
.dc-world textarea,
|
|
209
|
+
.dc-world [contenteditable="true"] {
|
|
210
|
+
user-select: text;
|
|
211
|
+
-webkit-user-select: text;
|
|
202
212
|
}
|
|
203
213
|
.dc-section-collapsed { display: contents; }
|
|
204
214
|
|
|
@@ -1162,7 +1172,7 @@ export function useDragStateContext(): DragStateBus | null {
|
|
|
1162
1172
|
interface DesignCanvasProps {
|
|
1163
1173
|
children: ReactNode;
|
|
1164
1174
|
/** Per-overlay opt-out. `false` hides it; omit or `true` shows it. */
|
|
1165
|
-
controls?: { minimap?: boolean; toolbar?: boolean };
|
|
1175
|
+
controls?: { minimap?: boolean; toolbar?: boolean; zoom?: boolean };
|
|
1166
1176
|
}
|
|
1167
1177
|
|
|
1168
1178
|
/**
|
|
@@ -1374,6 +1384,7 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
1374
1384
|
);
|
|
1375
1385
|
|
|
1376
1386
|
const showMiniMap = controls?.minimap !== false;
|
|
1387
|
+
const showZoom = controls?.zoom !== false;
|
|
1377
1388
|
|
|
1378
1389
|
// Drag-state bus (Phase 4.2). Single source of truth: only one artboard
|
|
1379
1390
|
// drag is active at a time. DCArtboards write here when their local drag
|
|
@@ -1445,10 +1456,12 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
1445
1456
|
{children}
|
|
1446
1457
|
</div>
|
|
1447
1458
|
{showMiniMap ? <DCMiniMap /> : null}
|
|
1448
|
-
{/*
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1459
|
+
{/* Plan C F6 — separate bottom-left zoom pill (the design's ZoomHud).
|
|
1460
|
+
Phase 5.1 had folded zoom into the ToolPalette; user feedback wants
|
|
1461
|
+
the design's standalone pill, so DCZoomToolbar renders here again (the
|
|
1462
|
+
ToolPalette's inline zoom is removed in tool-palette.tsx). It carries
|
|
1463
|
+
MORE than the mock — fit + actual-size — so no capability is lost. */}
|
|
1464
|
+
{showZoom ? <DCZoomToolbar /> : null}
|
|
1452
1465
|
</div>
|
|
1453
1466
|
);
|
|
1454
1467
|
|
|
@@ -1900,6 +1913,9 @@ const OVERLAY_CSS = `
|
|
|
1900
1913
|
overflow: hidden;
|
|
1901
1914
|
}
|
|
1902
1915
|
.dc-mm-hd {
|
|
1916
|
+
display: flex;
|
|
1917
|
+
align-items: center;
|
|
1918
|
+
justify-content: space-between;
|
|
1903
1919
|
padding: 5px 8px 4px;
|
|
1904
1920
|
border-bottom: 1px solid var(--maude-chrome-border, rgba(0,0,0,0.08));
|
|
1905
1921
|
letter-spacing: 0.05em;
|
|
@@ -1907,6 +1923,7 @@ const OVERLAY_CSS = `
|
|
|
1907
1923
|
font-size: 9px;
|
|
1908
1924
|
background: var(--maude-chrome-bg-1, #f4f1ea);
|
|
1909
1925
|
}
|
|
1926
|
+
.dc-mm-count { font-variant-numeric: tabular-nums; color: var(--maude-chrome-fg-2, rgba(40,30,20,0.55)); }
|
|
1910
1927
|
.dc-mm-body {
|
|
1911
1928
|
position: relative;
|
|
1912
1929
|
width: 100%;
|
|
@@ -1932,9 +1949,8 @@ const OVERLAY_CSS = `
|
|
|
1932
1949
|
}
|
|
1933
1950
|
.dc-zoom-tb {
|
|
1934
1951
|
position: absolute;
|
|
1935
|
-
left:
|
|
1952
|
+
left: 16px;
|
|
1936
1953
|
bottom: 16px;
|
|
1937
|
-
transform: translateX(-50%);
|
|
1938
1954
|
display: flex;
|
|
1939
1955
|
align-items: stretch;
|
|
1940
1956
|
background: var(--maude-chrome-bg-0, #ffffff);
|
|
@@ -2105,7 +2121,10 @@ export function DCMiniMap() {
|
|
|
2105
2121
|
return (
|
|
2106
2122
|
<div className="dc-mm" aria-hidden="true">
|
|
2107
2123
|
<div className="dc-mm-hd">
|
|
2108
|
-
|
|
2124
|
+
<span>World</span>
|
|
2125
|
+
<span className="dc-mm-count">
|
|
2126
|
+
{world.artboards.length} / {world.artboards.length}
|
|
2127
|
+
</span>
|
|
2109
2128
|
</div>
|
|
2110
2129
|
<div
|
|
2111
2130
|
className="dc-mm-body"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file canvas-shell.tsx — universal input-grammar wrapper for TSX canvases
|
|
3
|
-
* @scope
|
|
3
|
+
* @scope apps/studio/canvas-shell.tsx
|
|
4
4
|
* @purpose Mounted by `DesignCanvas` for every canvas. Stacks
|
|
5
5
|
* SelectionSetProvider + ContextMenuProvider, wires the input
|
|
6
6
|
* router to provider actions, and renders the floating chrome
|
|
@@ -59,12 +59,14 @@ import {
|
|
|
59
59
|
import { ContextualToolbar } from './contextual-toolbar.tsx';
|
|
60
60
|
import { CursorsOverlay } from './cursors-overlay.tsx';
|
|
61
61
|
import {
|
|
62
|
-
cssEscape,
|
|
63
62
|
cssPath,
|
|
64
63
|
deriveFile,
|
|
65
64
|
domPath,
|
|
66
65
|
hoverTargetToSelection,
|
|
67
66
|
realClasses,
|
|
67
|
+
resolveSelectionEl,
|
|
68
|
+
scopedCdSelector,
|
|
69
|
+
selectorIndex,
|
|
68
70
|
shortText,
|
|
69
71
|
} from './dom-selection.ts';
|
|
70
72
|
import { EqualSpacingHandles } from './equal-spacing-handles.tsx';
|
|
@@ -129,32 +131,46 @@ import { useUndoStack } from './use-undo-stack.tsx';
|
|
|
129
131
|
// theme (readInitialTheme() → 'dark'). DDR — mirrors the `--maude-hud-*`
|
|
130
132
|
// precedent; the `data-maude-theme` attribute is deliberately SEPARATE from the
|
|
131
133
|
// DS `data-theme` so chrome theming never touches artboard palettes.
|
|
134
|
+
// Plan B (Task 7) — the in-canvas chrome now mirrors the maude DS ladder (indigo
|
|
135
|
+
// accent hue 268, cool-neutral hue 255) so the iframe chrome reads as one product
|
|
136
|
+
// with the rewritten outer shell. Accent-fg is the maude dark navy (NOT white):
|
|
137
|
+
// maude's bright indigo accent needs a dark fg for WCAG contrast (white/indigo
|
|
138
|
+
// ≈ 3:1, fails AA; navy/indigo ≈ 6.3:1). Token-only swap — no overlay logic
|
|
139
|
+
// changes (DDR-054). Values lifted from `.design/system/maude/colors_and_type.css`.
|
|
132
140
|
const HUD_TOKENS_CSS = `
|
|
133
141
|
:root,
|
|
134
142
|
:root[data-maude-theme="dark"] {
|
|
135
|
-
--maude-hud-accent:
|
|
136
|
-
--maude-hud-accent-hover:
|
|
137
|
-
--maude-hud-accent-active:
|
|
138
|
-
--maude-hud-accent-fg:
|
|
139
|
-
--maude-hud-accent-tint: color-mix(in oklab,
|
|
140
|
-
|
|
141
|
-
--maude-chrome-bg-0: oklch(
|
|
142
|
-
--maude-chrome-bg-1: oklch(
|
|
143
|
-
--maude-chrome-bg-2: oklch(
|
|
144
|
-
--maude-chrome-fg-0: oklch(
|
|
145
|
-
--maude-chrome-fg-1: oklch(
|
|
146
|
-
--maude-chrome-border: oklch(
|
|
147
|
-
--maude-chrome-
|
|
148
|
-
--maude-chrome-
|
|
143
|
+
--maude-hud-accent: oklch(0.680 0.180 268);
|
|
144
|
+
--maude-hud-accent-hover: oklch(0.730 0.170 268);
|
|
145
|
+
--maude-hud-accent-active: oklch(0.630 0.180 268);
|
|
146
|
+
--maude-hud-accent-fg: oklch(0.180 0.030 268);
|
|
147
|
+
--maude-hud-accent-tint: color-mix(in oklab, oklch(0.680 0.180 268) 16%, transparent);
|
|
148
|
+
|
|
149
|
+
--maude-chrome-bg-0: oklch(0.165 0.012 255);
|
|
150
|
+
--maude-chrome-bg-1: oklch(0.198 0.012 255);
|
|
151
|
+
--maude-chrome-bg-2: oklch(0.232 0.013 255);
|
|
152
|
+
--maude-chrome-fg-0: oklch(0.955 0.005 250);
|
|
153
|
+
--maude-chrome-fg-1: oklch(0.790 0.008 250);
|
|
154
|
+
--maude-chrome-border: oklch(0.290 0.012 255);
|
|
155
|
+
--maude-chrome-dot: oklch(0.340 0.012 255);
|
|
156
|
+
--maude-chrome-shadow: rgba(0, 0, 0, 0.46);
|
|
157
|
+
--maude-chrome-font-mono: 'JetBrains Mono', 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
|
|
149
158
|
}
|
|
150
159
|
:root[data-maude-theme="light"] {
|
|
151
|
-
--maude-
|
|
152
|
-
--maude-
|
|
153
|
-
--maude-
|
|
154
|
-
--maude-
|
|
155
|
-
--maude-
|
|
156
|
-
|
|
157
|
-
--maude-chrome-
|
|
160
|
+
--maude-hud-accent: oklch(0.520 0.195 268);
|
|
161
|
+
--maude-hud-accent-hover: oklch(0.470 0.195 268);
|
|
162
|
+
--maude-hud-accent-active: oklch(0.430 0.190 268);
|
|
163
|
+
--maude-hud-accent-fg: oklch(0.995 0.004 268);
|
|
164
|
+
--maude-hud-accent-tint: color-mix(in oklab, oklch(0.520 0.195 268) 12%, transparent);
|
|
165
|
+
|
|
166
|
+
--maude-chrome-bg-0: oklch(0.975 0.004 255);
|
|
167
|
+
--maude-chrome-bg-1: oklch(1.000 0 0);
|
|
168
|
+
--maude-chrome-bg-2: oklch(0.987 0.003 255);
|
|
169
|
+
--maude-chrome-fg-0: oklch(0.225 0.015 260);
|
|
170
|
+
--maude-chrome-fg-1: oklch(0.400 0.014 260);
|
|
171
|
+
--maude-chrome-border: oklch(0.922 0.005 255);
|
|
172
|
+
--maude-chrome-dot: oklch(0.860 0.008 255);
|
|
173
|
+
--maude-chrome-shadow: color-mix(in oklab, oklch(0.225 0.015 260) 14%, transparent);
|
|
158
174
|
}
|
|
159
175
|
`;
|
|
160
176
|
|
|
@@ -956,12 +972,16 @@ function buildRegistry(deps: {
|
|
|
956
972
|
|
|
957
973
|
const postComposeForTarget = (target: ContextTarget): void => {
|
|
958
974
|
if (typeof window === 'undefined') return;
|
|
975
|
+
const composeSelector = target.cdId
|
|
976
|
+
? scopedCdSelector(target.cdId, target.artboardId)
|
|
977
|
+
: cssPath(target.el);
|
|
959
978
|
const sel: Selection | null = target.el
|
|
960
979
|
? {
|
|
961
980
|
file: deriveFile(),
|
|
962
981
|
id: target.cdId ?? undefined,
|
|
963
|
-
selector:
|
|
982
|
+
selector: composeSelector,
|
|
964
983
|
artboardId: target.artboardId,
|
|
984
|
+
index: target.cdId ? selectorIndex(document, composeSelector, target.el) : 0,
|
|
965
985
|
tag: target.el.tagName.toLowerCase(),
|
|
966
986
|
classes: realClasses(target.el),
|
|
967
987
|
text: shortText(target.el, 240),
|
|
@@ -1283,6 +1303,15 @@ function CanvasRouter({
|
|
|
1283
1303
|
if (typeof t === 'string') setTool(t as never);
|
|
1284
1304
|
return;
|
|
1285
1305
|
}
|
|
1306
|
+
// Plan C — Edit menu (shell) bridges to the in-canvas undo stack.
|
|
1307
|
+
if (m.dgn === 'undo') {
|
|
1308
|
+
void undoStack.undo();
|
|
1309
|
+
return;
|
|
1310
|
+
}
|
|
1311
|
+
if (m.dgn === 'redo') {
|
|
1312
|
+
void undoStack.redo();
|
|
1313
|
+
return;
|
|
1314
|
+
}
|
|
1286
1315
|
// D9 — canvas-shell chrome follows the Maude chrome theme. The chrome's
|
|
1287
1316
|
// `--maude-chrome-*` token family is keyed by `data-maude-theme` on the
|
|
1288
1317
|
// iframe documentElement (see HUD_TOKENS_CSS). This attribute is
|
|
@@ -1299,7 +1328,7 @@ function CanvasRouter({
|
|
|
1299
1328
|
};
|
|
1300
1329
|
window.addEventListener('message', onMessage);
|
|
1301
1330
|
return () => window.removeEventListener('message', onMessage);
|
|
1302
|
-
}, [selSet, annotSel, setTool]);
|
|
1331
|
+
}, [selSet, annotSel, setTool, undoStack]);
|
|
1303
1332
|
|
|
1304
1333
|
// Cleanup any pending rAF on unmount.
|
|
1305
1334
|
useEffect(
|
|
@@ -1822,11 +1851,7 @@ function SelectionHalos() {
|
|
|
1822
1851
|
for (let i = 0; i < selected.length; i++) {
|
|
1823
1852
|
const sel = selected[i];
|
|
1824
1853
|
const child = c.children[i] as HTMLDivElement;
|
|
1825
|
-
const el = sel
|
|
1826
|
-
? document.querySelector(`[data-cd-id="${cssEscape(sel.id)}"]`)
|
|
1827
|
-
: sel
|
|
1828
|
-
? safeQuery(sel.selector)
|
|
1829
|
-
: null;
|
|
1854
|
+
const el = sel ? resolveSelectionEl(document, sel) : null;
|
|
1830
1855
|
if (!el) {
|
|
1831
1856
|
child.style.display = 'none';
|
|
1832
1857
|
continue;
|
|
@@ -1879,9 +1904,7 @@ function GroupBbox() {
|
|
|
1879
1904
|
let yMax = Number.NEGATIVE_INFINITY;
|
|
1880
1905
|
let anyHit = false;
|
|
1881
1906
|
for (const sel of selected) {
|
|
1882
|
-
const el = sel
|
|
1883
|
-
? document.querySelector(`[data-cd-id="${cssEscape(sel.id)}"]`)
|
|
1884
|
-
: safeQuery(sel.selector);
|
|
1907
|
+
const el = resolveSelectionEl(document, sel);
|
|
1885
1908
|
if (!el) continue;
|
|
1886
1909
|
// Post-Wave-2: direct artboard drag — the article updates its own
|
|
1887
1910
|
// `left/top` during drag, so the group bbox just follows via
|
|
@@ -1936,11 +1959,3 @@ function classifyContextKind(target: HoverTarget | null): ContextTargetKind {
|
|
|
1936
1959
|
if (target.artboardId) return 'artboard-chrome';
|
|
1937
1960
|
return 'world';
|
|
1938
1961
|
}
|
|
1939
|
-
|
|
1940
|
-
function safeQuery(selector: string): Element | null {
|
|
1941
|
-
try {
|
|
1942
|
-
return document.querySelector(selector);
|
|
1943
|
-
} catch {
|
|
1944
|
-
return null;
|
|
1945
|
-
}
|
|
1946
|
-
}
|