@1agh/maude 1.9.1 → 2.0.0-rc.1
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 +4 -4
- package/apps/hub/src/project-transactions/baseline.mjs +276 -0
- package/apps/hub/src/project-transactions/kernel.mjs +1756 -0
- package/apps/hub/src/project-transactions/lanes.mjs +287 -0
- package/apps/hub/src/project-transactions/runs-core.mjs +639 -0
- package/apps/hub/src/project-transactions/store-core.mjs +831 -0
- package/apps/studio/access/closure.ts +1075 -0
- package/apps/studio/access/filters.ts +1193 -0
- package/apps/studio/access/frame.ts +365 -0
- package/apps/studio/access/known-canvases.ts +82 -0
- package/apps/studio/access/request.ts +637 -0
- package/apps/studio/access/roles.ts +187 -0
- package/apps/studio/access/scope.ts +407 -0
- package/apps/studio/access/share-map.ts +434 -0
- package/apps/studio/acp/adapter-stderr.ts +22 -0
- package/apps/studio/acp/agent-path.ts +39 -0
- package/apps/studio/acp/ask-queue.ts +238 -0
- package/apps/studio/acp/audience.ts +615 -0
- package/apps/studio/acp/bootstrap-brief.ts +32 -15
- package/apps/studio/acp/bridge.ts +890 -114
- package/apps/studio/acp/chat-search.ts +195 -0
- package/apps/studio/acp/connected-fact.ts +83 -0
- package/apps/studio/acp/design-write-verb.ts +71 -0
- package/apps/studio/acp/env.ts +86 -0
- package/apps/studio/acp/index.ts +775 -58
- package/apps/studio/acp/login-state.ts +15 -1
- package/apps/studio/acp/may-scope.ts +771 -0
- package/apps/studio/acp/plugin-bootstrap.ts +90 -5
- package/apps/studio/acp/probe.ts +18 -4
- package/apps/studio/acp/repo-private.ts +73 -0
- package/apps/studio/acp/running.ts +50 -5
- package/apps/studio/acp/transcript.ts +356 -21
- package/apps/studio/acp/write-scope.ts +141 -11
- package/apps/studio/actions/agents.ts +2068 -0
- package/apps/studio/actions/canvas-keys.ts +41 -0
- package/apps/studio/actions/ctx.ts +118 -0
- package/apps/studio/actions/defs/_v1.ts +55 -0
- package/apps/studio/actions/defs/ai-runs.ts +56 -0
- package/apps/studio/actions/defs/annotation.ts +164 -0
- package/apps/studio/actions/defs/app.ts +269 -0
- package/apps/studio/actions/defs/canvas.ts +281 -0
- package/apps/studio/actions/defs/chat.ts +158 -0
- package/apps/studio/actions/defs/diagnostics.ts +52 -0
- package/apps/studio/actions/defs/ds.ts +139 -0
- package/apps/studio/actions/defs/edit.ts +986 -0
- package/apps/studio/actions/defs/export.ts +221 -0
- package/apps/studio/actions/defs/history.ts +175 -0
- package/apps/studio/actions/defs/native.ts +264 -0
- package/apps/studio/actions/defs/presence.ts +53 -0
- package/apps/studio/actions/defs/search.ts +90 -0
- package/apps/studio/actions/defs/sync.ts +47 -0
- package/apps/studio/actions/defs/timeline.ts +254 -0
- package/apps/studio/actions/defs/tool.ts +152 -0
- package/apps/studio/actions/defs/ui.ts +38 -0
- package/apps/studio/actions/defs/video.ts +115 -0
- package/apps/studio/actions/defs/view.ts +556 -0
- package/apps/studio/actions/documents.ts +32 -0
- package/apps/studio/actions/forward.ts +48 -0
- package/apps/studio/actions/help.ts +115 -0
- package/apps/studio/actions/index.ts +51 -0
- package/apps/studio/actions/keymap.gen.ts +1170 -0
- package/apps/studio/actions/keys.ts +271 -0
- package/apps/studio/actions/legacy.ts +250 -0
- package/apps/studio/actions/manifest-version.ts +18 -0
- package/apps/studio/actions/menu.ts +203 -0
- package/apps/studio/actions/native-menu.ts +132 -0
- package/apps/studio/actions/resolve.ts +118 -0
- package/apps/studio/actions/types.ts +266 -0
- package/apps/studio/actions/uniqueness.ts +119 -0
- package/apps/studio/actions/verbs.ts +306 -0
- package/apps/studio/actions.manifest.json +7826 -0
- package/apps/studio/actions.parity.json +268 -0
- package/apps/studio/activity.ts +4 -31
- package/apps/studio/agent-runs.ts +676 -0
- package/apps/studio/ai/attach-grants.ts +497 -0
- package/apps/studio/ai/copy-meta.ts +204 -0
- package/apps/studio/ai/create-claim.ts +88 -0
- package/apps/studio/ai/lease-home.ts +202 -0
- package/apps/studio/ai/run-doing.ts +106 -0
- package/apps/studio/ai/run-lifecycle.ts +320 -0
- package/apps/studio/ai/run-progress.ts +154 -0
- package/apps/studio/ai/runs.ts +1180 -0
- package/apps/studio/ai/save-hold.ts +565 -0
- package/apps/studio/ai/watch-progress.ts +182 -0
- package/apps/studio/ai/write-claim-scope.ts +39 -0
- package/apps/studio/ai/write-claim.ts +193 -0
- package/apps/studio/ai-banner.tsx +8 -14
- package/apps/studio/annotations/ai-read.ts +289 -1
- package/apps/studio/annotations/ai-write.ts +281 -23
- package/apps/studio/annotations/artboard-members.ts +86 -0
- package/apps/studio/annotations/board-ops.ts +358 -0
- package/apps/studio/annotations/board-schema.ts +81 -0
- package/apps/studio/annotations/constants.ts +2 -0
- package/apps/studio/annotations/elements/_shared.ts +290 -1
- package/apps/studio/annotations/elements/arrow.model.ts +29 -2
- package/apps/studio/annotations/elements/ballot.model.ts +110 -0
- package/apps/studio/annotations/elements/media.model.ts +11 -1
- package/apps/studio/annotations/elements/section.model.ts +3 -1
- package/apps/studio/annotations/elements/stamp.model.ts +83 -0
- package/apps/studio/annotations/elements/sticky.model.ts +235 -0
- package/apps/studio/annotations/elements/vote.model.ts +71 -0
- package/apps/studio/annotations/fields.ts +51 -0
- package/apps/studio/annotations/figjam-into.ts +119 -0
- package/apps/studio/annotations/hosts.ts +231 -0
- package/apps/studio/annotations/migrate-v1.ts +21 -2
- package/apps/studio/annotations/ops.ts +23 -0
- package/apps/studio/annotations/registry.ts +154 -16
- package/apps/studio/annotations/route.ts +268 -0
- package/apps/studio/annotations/run-tag.ts +150 -0
- package/apps/studio/annotations/stamp-kinds.ts +66 -0
- package/apps/studio/annotations/templates.ts +154 -0
- package/apps/studio/annotations/text-steps.ts +253 -0
- package/apps/studio/annotations/time-marks.ts +140 -0
- package/apps/studio/annotations/types.ts +22 -0
- package/apps/studio/annotations/ui/ai-marks.tsx +64 -0
- package/apps/studio/annotations/ui/ai-seen.tsx +117 -0
- package/apps/studio/annotations/ui/arrow-bind.ts +347 -0
- package/apps/studio/annotations/ui/arrow-cards.tsx +396 -0
- package/apps/studio/annotations/ui/arrow-kinds.ts +90 -0
- package/apps/studio/annotations/ui/bar-place.ts +18 -0
- package/apps/studio/annotations/ui/element-node.tsx +300 -52
- package/apps/studio/annotations/ui/host-view.ts +99 -0
- package/apps/studio/annotations/ui/locked.tsx +83 -0
- package/apps/studio/annotations/ui/lod.tsx +246 -0
- package/apps/studio/annotations/ui/placement.tsx +270 -0
- package/apps/studio/annotations/ui/pointer-pipeline.ts +10 -0
- package/apps/studio/annotations/ui/posture.ts +124 -0
- package/apps/studio/annotations/ui/quiet-tip.ts +28 -0
- package/apps/studio/annotations/ui/render-model.ts +27 -2
- package/apps/studio/annotations/ui/rest-route.ts +152 -0
- package/apps/studio/annotations/ui/ride.ts +957 -0
- package/apps/studio/annotations/ui/scene.tsx +59 -11
- package/apps/studio/annotations/ui/section-fold.ts +95 -0
- package/apps/studio/annotations/ui/shell-asks.ts +62 -0
- package/apps/studio/annotations/ui/stamps.ts +221 -0
- package/apps/studio/annotations/ui/stamps.tsx +272 -0
- package/apps/studio/annotations/ui/sticker-drop.ts +147 -0
- package/apps/studio/annotations/ui/sticker-preview.ts +41 -0
- package/apps/studio/annotations/ui/sticky-resolve.ts +106 -0
- package/apps/studio/annotations/ui/template-place.ts +108 -0
- package/apps/studio/annotations/ui/text-editor.tsx +6 -4
- package/apps/studio/annotations/ui/text-session.ts +63 -1
- package/apps/studio/annotations/ui/text-style.ts +11 -3
- package/apps/studio/annotations/ui/time-pins.tsx +134 -0
- package/apps/studio/annotations/ui/tool-prefs.ts +242 -0
- package/apps/studio/annotations/ui/tool-state.ts +211 -0
- package/apps/studio/annotations/ui/visibility.ts +76 -0
- package/apps/studio/annotations/ui/vote-dots.tsx +283 -0
- package/apps/studio/annotations/v1-adapter.ts +88 -5
- package/apps/studio/annotations/validate-board.ts +257 -0
- package/apps/studio/annotations/vote-guard.ts +48 -0
- package/apps/studio/annotations/votes-local.ts +481 -0
- package/apps/studio/annotations-bindings.ts +54 -8
- package/apps/studio/annotations-context-toolbar.tsx +612 -150
- package/apps/studio/annotations-layer.tsx +1768 -674
- package/apps/studio/annotations-model.ts +80 -5
- package/apps/studio/api.ts +1522 -454
- package/apps/studio/artboard-activity-overlay.tsx +530 -3
- package/apps/studio/artboard-ai-copies.tsx +187 -0
- package/apps/studio/artboard-convert-marks.tsx +142 -0
- package/apps/studio/artboard-gap-mark.tsx +177 -0
- package/apps/studio/artboard-ghosts-overlay.tsx +106 -0
- package/apps/studio/artboard-growth-memory.ts +56 -0
- package/apps/studio/artboard-growth-tag.tsx +115 -0
- package/apps/studio/artboard-guides-overlay.tsx +86 -26
- package/apps/studio/artboard-marquee.tsx +21 -6
- package/apps/studio/artboard-new-section.tsx +188 -0
- package/apps/studio/artboard-warn-mark.tsx +330 -0
- package/apps/studio/asset-details.ts +339 -0
- package/apps/studio/asset-generated.ts +99 -0
- package/apps/studio/asset-origins.ts +147 -0
- package/apps/studio/asset-placeholder.tsx +481 -0
- package/apps/studio/asset-rename.ts +171 -0
- package/apps/studio/asset-trash.ts +176 -0
- package/apps/studio/asset-upload-bars.tsx +167 -0
- package/apps/studio/asset-upload.ts +145 -1
- package/apps/studio/attribute-artboards.ts +327 -0
- package/apps/studio/bin/_ab-headless.sh +35 -0
- package/apps/studio/bin/_ab-park.sh +83 -0
- package/apps/studio/bin/_agent-browser-safe.mjs +36 -3
- package/apps/studio/bin/_annotate-post.mjs +137 -0
- package/apps/studio/bin/_assets.mjs +213 -0
- package/apps/studio/bin/_brand-colours.mjs +189 -0
- package/apps/studio/bin/_brand-fonts.mjs +158 -0
- package/apps/studio/bin/_brand-site.mjs +309 -0
- package/apps/studio/bin/_canvas-errors.mjs +143 -0
- package/apps/studio/bin/_canvas-rects-playwright.mjs +6 -3
- package/apps/studio/bin/_canvas-rects-static.mjs +1 -1
- package/apps/studio/bin/_check.mjs +122 -0
- package/apps/studio/bin/_comments.mjs +274 -0
- package/apps/studio/bin/_curl-local.mjs +122 -3
- package/apps/studio/bin/_decode-webaudio.mjs +120 -0
- package/apps/studio/bin/_describe.mjs +220 -0
- package/apps/studio/bin/_ds-check.mjs +26 -0
- package/apps/studio/bin/_ds-prove-playwright.mjs +327 -0
- package/apps/studio/bin/_ds-upgrade.mjs +14 -0
- package/apps/studio/bin/_ds.mjs +82 -0
- package/apps/studio/bin/_enumerate-artboards-playwright.mjs +6 -3
- package/apps/studio/bin/_exports.mjs +244 -0
- package/apps/studio/bin/_fetch-asset.mjs +209 -15
- package/apps/studio/bin/_history.mjs +509 -0
- package/apps/studio/bin/_html-playwright.mjs +10 -3
- package/apps/studio/bin/_import-asset.mjs +446 -15
- package/apps/studio/bin/_import-brand.mjs +40 -156
- package/apps/studio/bin/_import-figma.mjs +878 -20
- package/apps/studio/bin/_import-tokens.mjs +8 -118
- package/apps/studio/bin/_index-cli.mjs +126 -0
- package/apps/studio/bin/_layout-check.mjs +35 -0
- package/apps/studio/bin/_logs.mjs +130 -0
- package/apps/studio/bin/_motion-sample-playwright.mjs +6 -3
- package/apps/studio/bin/_no-egress.sh +36 -0
- package/apps/studio/bin/_pdf-playwright.mjs +9 -3
- package/apps/studio/bin/_perf-probe-safari.mjs +327 -37
- package/apps/studio/bin/_perf-probe-studio.mjs +259 -0
- package/apps/studio/bin/_perf-probe.mjs +35 -1
- package/apps/studio/bin/_perf-shared.mjs +377 -12
- package/apps/studio/bin/_place.mjs +35 -0
- package/apps/studio/bin/_png-playwright.mjs +27 -7
- package/apps/studio/bin/_pptx-playwright.mjs +4 -3
- package/apps/studio/bin/_pw-launch.mjs +124 -2
- package/apps/studio/bin/_record-shot.sh +65 -0
- package/apps/studio/bin/_rects-input.mjs +69 -0
- package/apps/studio/bin/_reel-place.mjs +160 -0
- package/apps/studio/bin/_region.mjs +37 -1
- package/apps/studio/bin/_runs.mjs +178 -0
- package/apps/studio/bin/_screenshot-playwright.mjs +6 -3
- package/apps/studio/bin/_studio-verb.mjs +220 -0
- package/apps/studio/bin/_svg-playwright.mjs +4 -3
- package/apps/studio/bin/_sync.mjs +179 -0
- package/apps/studio/bin/_thumbs-playwright.mjs +704 -0
- package/apps/studio/bin/_tile-draw.mjs +74 -0
- package/apps/studio/bin/_transcribe-local.mjs +243 -0
- package/apps/studio/bin/_transcribe.mjs +48 -56
- package/apps/studio/bin/_trash.mjs +287 -0
- package/apps/studio/bin/_url-guard.mjs +88 -0
- package/apps/studio/bin/_url-guard.sh +16 -0
- package/apps/studio/bin/_video-playwright.mjs +9 -3
- package/apps/studio/bin/_video-verbs.mjs +403 -0
- package/apps/studio/bin/_write-claim.mjs +124 -0
- package/apps/studio/bin/annotate.mjs +348 -330
- package/apps/studio/bin/assets.sh +28 -0
- package/apps/studio/bin/beats.mjs +237 -0
- package/apps/studio/bin/beats.sh +24 -0
- package/apps/studio/bin/bootstrap-check.sh +2 -1
- package/apps/studio/bin/canvas-edit.sh +17 -9
- package/apps/studio/bin/canvas-errors.sh +18 -0
- package/apps/studio/bin/canvas-rects.sh +14 -0
- package/apps/studio/bin/canvas-source.sh +18 -0
- package/apps/studio/bin/captions.sh +13 -0
- package/apps/studio/bin/chat-open.sh +2 -2
- package/apps/studio/bin/check.sh +27 -0
- package/apps/studio/bin/comments.sh +20 -0
- package/apps/studio/bin/cut-to-beat.sh +13 -0
- package/apps/studio/bin/cut-words.sh +13 -0
- package/apps/studio/bin/describe.sh +28 -0
- package/apps/studio/bin/draw-proof.sh +41 -8
- package/apps/studio/bin/ds-check.sh +30 -0
- package/apps/studio/bin/ds-upgrade.sh +30 -0
- package/apps/studio/bin/ds.sh +29 -0
- package/apps/studio/bin/exports.sh +19 -0
- package/apps/studio/bin/generate.sh +45 -3
- package/apps/studio/bin/handoff.sh +60 -1
- package/apps/studio/bin/history.sh +24 -0
- package/apps/studio/bin/import-brand.sh +5 -3
- package/apps/studio/bin/index.sh +26 -0
- package/apps/studio/bin/layout-check.sh +20 -0
- package/apps/studio/bin/logs.sh +17 -0
- package/apps/studio/bin/perf.sh +93 -3
- package/apps/studio/bin/photo-bg-remove.sh +49 -7
- package/apps/studio/bin/place.sh +20 -0
- package/apps/studio/bin/read-annotations.mjs +52 -1
- package/apps/studio/bin/reel-place.sh +15 -0
- package/apps/studio/bin/runs.sh +19 -0
- package/apps/studio/bin/screenshot.sh +37 -21
- package/apps/studio/bin/server-up.sh +50 -13
- package/apps/studio/bin/smoke.sh +10 -0
- package/apps/studio/bin/sync.sh +18 -0
- package/apps/studio/bin/to-lottie.sh +1 -1
- package/apps/studio/bin/transcribe-local.sh +27 -0
- package/apps/studio/bin/trash.sh +23 -0
- package/apps/studio/bin/visual-sanity.sh +1 -0
- package/apps/studio/bridge/canvas-mode-store.ts +301 -0
- package/apps/studio/bridge/canvas-modes.ts +548 -0
- package/apps/studio/bridge/dgn-protocol.ts +2671 -0
- package/apps/studio/bridge/esc-ladder.ts +98 -0
- package/apps/studio/bridge/link-target.ts +157 -0
- package/apps/studio/bridge/mode-shows.ts +167 -0
- package/apps/studio/bridge/occlusion.ts +108 -0
- package/apps/studio/bridge/paste-data.ts +101 -0
- package/apps/studio/build.ts +12 -1
- package/apps/studio/bunfig.toml +4 -0
- package/apps/studio/canvas-build-sandbox.ts +34 -5
- package/apps/studio/canvas-build-worker.ts +23 -1
- package/apps/studio/canvas-build.ts +419 -15
- package/apps/studio/canvas-comment-mount.tsx +113 -25
- package/apps/studio/canvas-create.ts +285 -49
- package/apps/studio/canvas-cursors.ts +12 -0
- package/apps/studio/canvas-ds-icons.tsx +241 -0
- package/apps/studio/canvas-edit.ts +1188 -172
- package/apps/studio/canvas-hud-tokens.gen.ts +120 -0
- package/apps/studio/canvas-icons.tsx +47 -0
- package/apps/studio/canvas-lib-inline.ts +57 -3
- package/apps/studio/canvas-lib.tsx +1033 -263
- package/apps/studio/canvas-list-watch.ts +73 -2
- package/apps/studio/canvas-meta.schema.json +11 -0
- package/apps/studio/canvas-notifications.tsx +28 -3
- package/apps/studio/canvas-pipeline.ts +43 -8
- package/apps/studio/canvas-replay-keys.ts +65 -0
- package/apps/studio/canvas-rows.ts +116 -0
- package/apps/studio/canvas-shell.tsx +784 -698
- package/apps/studio/canvas-source/errors.ts +315 -0
- package/apps/studio/canvas-source/source-map.ts +69 -0
- package/apps/studio/canvas-theme-pill.tsx +164 -0
- package/apps/studio/canvas-theme.ts +133 -0
- package/apps/studio/canvas-top-level.ts +69 -0
- package/apps/studio/check/ids.ts +28 -0
- package/apps/studio/check/index.ts +586 -0
- package/apps/studio/check/link-resolver.ts +75 -0
- package/apps/studio/check/meta.ts +79 -0
- package/apps/studio/check/video.ts +352 -0
- package/apps/studio/client/actions/shell-key-handlers.js +450 -0
- package/apps/studio/client/app.jsx +2914 -1203
- package/apps/studio/client/canvas-url.js +241 -5
- package/apps/studio/client/clipboard-relay.ts +144 -0
- package/apps/studio/client/command-palette-match.js +4 -2
- package/apps/studio/client/comments-overlay.css +529 -144
- package/apps/studio/client/dialogs/asset-picker.jsx +77 -32
- package/apps/studio/client/dialogs/command-palette.jsx +453 -67
- package/apps/studio/client/dialogs/export-dialog.jsx +6 -781
- package/apps/studio/client/dialogs/help-modal.jsx +31 -2
- package/apps/studio/client/dialogs/shortcuts-overlay.jsx +201 -106
- package/apps/studio/client/edit-op-relay.ts +77 -0
- package/apps/studio/client/embed-view.jsx +25 -5
- package/apps/studio/client/export-bridge-scope.js +72 -0
- package/apps/studio/client/export-center.jsx +179 -369
- package/apps/studio/client/export-lane.js +117 -0
- package/apps/studio/client/export-region.ts +25 -0
- package/apps/studio/client/file-tree.jsx +4 -4
- package/apps/studio/client/frame-cap.js +132 -0
- package/apps/studio/client/generate-dialog.jsx +38 -36
- package/apps/studio/client/github.js +85 -26
- package/apps/studio/client/home/HomeAsk.jsx +220 -0
- package/apps/studio/client/home/InviteSheet.jsx +150 -0
- package/apps/studio/client/home/Shelves.jsx +216 -0
- package/apps/studio/client/home/Starters.jsx +42 -0
- package/apps/studio/client/home/TargetChip.jsx +152 -0
- package/apps/studio/client/home/home-api.js +275 -0
- package/apps/studio/client/home/home-app.jsx +1884 -0
- package/apps/studio/client/home/home-icons.jsx +143 -0
- package/apps/studio/client/home/home-menu.js +43 -0
- package/apps/studio/client/home/home-model.js +514 -0
- package/apps/studio/client/home/home-starters.js +136 -0
- package/apps/studio/client/home/home.css +1681 -0
- package/apps/studio/client/home/invite-flow.js +422 -0
- package/apps/studio/client/home/shell-mode.js +49 -0
- package/apps/studio/client/hooks/annotations-hidden-toast.js +21 -0
- package/apps/studio/client/hooks/canvas-origin-probe.js +26 -0
- package/apps/studio/client/hooks/edit-scope-query.js +16 -0
- package/apps/studio/client/hooks/use-action-keys.jsx +121 -0
- package/apps/studio/client/hooks/use-canvas-bridge.jsx +881 -247
- package/apps/studio/client/hooks/use-git-actions.jsx +33 -12
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +722 -287
- package/apps/studio/client/hooks/use-photo-and-timeline.jsx +268 -307
- package/apps/studio/client/hooks/use-project-data.jsx +23 -2
- package/apps/studio/client/hooks/use-shell-core.jsx +582 -126
- package/apps/studio/client/hooks/use-tabs.jsx +268 -126
- package/apps/studio/client/index-loader.ts +3 -1
- package/apps/studio/client/inspector/color-picker.jsx +29 -18
- package/apps/studio/client/inspector/css-knobs.jsx +765 -436
- package/apps/studio/client/inspector/css-vocab.jsx +37 -4
- package/apps/studio/client/inspector/ds-tokens.js +127 -15
- package/apps/studio/client/inspector/grid-tracks-editor.jsx +21 -15
- package/apps/studio/client/inspector/inspect-computed.jsx +17 -15
- package/apps/studio/client/inspector/inspector-panel.jsx +314 -207
- package/apps/studio/client/inspector/layers.jsx +90 -65
- package/apps/studio/client/inspector/selection.js +20 -0
- package/apps/studio/client/inspector/token-popover.jsx +42 -28
- package/apps/studio/client/inspector-controls.jsx +453 -106
- package/apps/studio/client/panels/BrandUploadPanel.jsx +8 -229
- package/apps/studio/client/panels/ChatPanel.jsx +391 -1674
- package/apps/studio/client/panels/CloudBar.jsx +548 -252
- package/apps/studio/client/panels/CollabModelInfographic.jsx +77 -20
- package/apps/studio/client/panels/CreateProject.jsx +224 -40
- package/apps/studio/client/panels/DiffView.jsx +27 -10
- package/apps/studio/client/panels/ElicitationPrompt.jsx +4 -3
- package/apps/studio/client/panels/FigmaImportPanel.jsx +12 -263
- package/apps/studio/client/panels/IdentityBar.jsx +262 -74
- package/apps/studio/client/panels/IntroVideoDialog.jsx +6 -1
- package/apps/studio/client/panels/PermissionPrompt.jsx +85 -9
- package/apps/studio/client/panels/ReadinessList.jsx +71 -46
- package/apps/studio/client/panels/RepoBranchSwitcher.jsx +124 -745
- package/apps/studio/client/panels/SettingsPanel.jsx +492 -608
- package/apps/studio/client/panels/SetupChecklist.jsx +10 -3
- package/apps/studio/client/panels/SourceConflictPanel.jsx +96 -20
- package/apps/studio/client/panels/SyncConsentDialog.jsx +14 -13
- package/apps/studio/client/panels/TeamProjects.jsx +365 -119
- package/apps/studio/client/panels/ToolGroup.jsx +6 -2
- package/apps/studio/client/panels/acp-runtime.js +127 -22
- package/apps/studio/client/panels/acp-usage.js +4 -1
- package/apps/studio/client/panels/chat-context.js +74 -5
- package/apps/studio/client/panels/chat-header.jsx +67 -0
- package/apps/studio/client/panels/chat-markdown.jsx +6 -2
- package/apps/studio/client/panels/file-deep-link-dialog.jsx +88 -17
- package/apps/studio/client/panels/file-preview.jsx +50 -24
- package/apps/studio/client/panels/git-grouping.js +9 -2
- package/apps/studio/client/panels/slash-commands.gen.js +171 -0
- package/apps/studio/client/panels/slash-commands.js +65 -25
- package/apps/studio/client/panels/timeline-media-cache.js +68 -2
- package/apps/studio/client/panels/timeline-parse.js +62 -22
- package/apps/studio/client/panels/timeline-snap.js +4 -1
- package/apps/studio/client/panels/transcript-view.js +9 -0
- package/apps/studio/client/photo-knobs.jsx +225 -46
- package/apps/studio/client/prefs-migrate.js +79 -0
- package/apps/studio/client/report-bug.jsx +59 -26
- package/apps/studio/client/selection-scope.js +215 -0
- package/apps/studio/client/share-link.js +104 -8
- package/apps/studio/client/shell/account-tone.js +28 -0
- package/apps/studio/client/shell/banners.jsx +21 -188
- package/apps/studio/client/shell/comments-panel.jsx +5 -176
- package/apps/studio/client/shell/constants.js +1 -0
- package/apps/studio/client/shell/dock.jsx +217 -31
- package/apps/studio/client/shell/drop-guard.js +52 -0
- package/apps/studio/client/shell/icons.jsx +165 -23
- package/apps/studio/client/shell/util.js +20 -33
- package/apps/studio/client/shell/viewport.jsx +249 -95
- package/apps/studio/client/shell-bus.js +82 -0
- package/apps/studio/client/shell-events.js +251 -0
- package/apps/studio/client/stamp-follow.js +62 -0
- package/apps/studio/client/stores/shell-store.jsx +15 -0
- package/apps/studio/client/styles/0-reset.css +79 -16
- package/apps/studio/client/styles/1-tokens-maude-v2.css +367 -0
- package/apps/studio/client/styles/1-tokens-shell.css +374 -0
- package/apps/studio/client/styles/2-layout.css +404 -24
- package/apps/studio/client/styles/3-kit-maude-v2.css +683 -0
- package/apps/studio/client/styles/_index.css +183 -18
- package/apps/studio/client/system/system-view.jsx +52 -6
- package/apps/studio/client/tour/collab-tour.js +43 -38
- package/apps/studio/client/tour/overlay.jsx +61 -19
- package/apps/studio/client/tour/quick-setup-tour.js +27 -20
- package/apps/studio/client/tour/tour-model.js +36 -0
- package/apps/studio/client/tour/usage-tour.js +43 -24
- package/apps/studio/client/tree/tree.jsx +661 -409
- package/apps/studio/client/tree-expansion.js +5 -2
- package/apps/studio/client/tree-row-menu.jsx +43 -29
- package/apps/studio/client/ui-open.js +104 -0
- package/apps/studio/client/use-tree-drag.js +2 -0
- package/apps/studio/client/v2/access/access-card.jsx +54 -0
- package/apps/studio/client/v2/access/access-client.js +525 -0
- package/apps/studio/client/v2/access/access-host.jsx +328 -0
- package/apps/studio/client/v2/access/access.css +163 -0
- package/apps/studio/client/v2/access/ask-to-edit.jsx +97 -0
- package/apps/studio/client/v2/access/disabled-reason.js +50 -0
- package/apps/studio/client/v2/access/link-off-card.jsx +37 -0
- package/apps/studio/client/v2/access/trashed-banner.jsx +123 -0
- package/apps/studio/client/v2/advanced/where-matrix.js +231 -0
- package/apps/studio/client/v2/ai/AChip.jsx +158 -0
- package/apps/studio/client/v2/ai/Advanced.jsx +640 -0
- package/apps/studio/client/v2/ai/AiChatIsland.jsx +108 -0
- package/apps/studio/client/v2/ai/AskSelectionHost.jsx +173 -0
- package/apps/studio/client/v2/ai/AttachMenu.jsx +190 -0
- package/apps/studio/client/v2/ai/BigChat.jsx +195 -0
- package/apps/studio/client/v2/ai/ChatList.jsx +614 -0
- package/apps/studio/client/v2/ai/ChatUndo.jsx +164 -0
- package/apps/studio/client/v2/ai/ChoiceCard.jsx +178 -0
- package/apps/studio/client/v2/ai/Composer.jsx +655 -0
- package/apps/studio/client/v2/ai/ConnectSheet.jsx +118 -0
- package/apps/studio/client/v2/ai/Consent.jsx +66 -0
- package/apps/studio/client/v2/ai/DropOverlay.jsx +113 -0
- package/apps/studio/client/v2/ai/Feed.jsx +589 -0
- package/apps/studio/client/v2/ai/FoldNeeds.jsx +23 -0
- package/apps/studio/client/v2/ai/NeedsYouSlot.jsx +250 -0
- package/apps/studio/client/v2/ai/NotReady.jsx +110 -0
- package/apps/studio/client/v2/ai/OfferCard.jsx +165 -0
- package/apps/studio/client/v2/ai/PermissionCard.jsx +168 -0
- package/apps/studio/client/v2/ai/PickedShots.jsx +33 -0
- package/apps/studio/client/v2/ai/ProblemCard.jsx +41 -0
- package/apps/studio/client/v2/ai/QuitDialog.jsx +127 -0
- package/apps/studio/client/v2/ai/RawLog.jsx +68 -0
- package/apps/studio/client/v2/ai/Result.jsx +144 -0
- package/apps/studio/client/v2/ai/RunList.jsx +352 -0
- package/apps/studio/client/v2/ai/RunSurface.jsx +248 -0
- package/apps/studio/client/v2/ai/ScopeChip.jsx +239 -0
- package/apps/studio/client/v2/ai/SentStrip.jsx +70 -0
- package/apps/studio/client/v2/ai/StoppedDivider.jsx +84 -0
- package/apps/studio/client/v2/ai/Suggest.jsx +153 -0
- package/apps/studio/client/v2/ai/TurnResult.jsx +95 -0
- package/apps/studio/client/v2/ai/WaitingCard.jsx +133 -0
- package/apps/studio/client/v2/ai/WillChange.jsx +40 -0
- package/apps/studio/client/v2/ai/Working.jsx +74 -0
- package/apps/studio/client/v2/ai/advanced-handlers.js +56 -0
- package/apps/studio/client/v2/ai/advanced-model.js +214 -0
- package/apps/studio/client/v2/ai/ai-list-advanced.css +625 -0
- package/apps/studio/client/v2/ai/ai-may.js +75 -0
- package/apps/studio/client/v2/ai/ai-offer.js +178 -0
- package/apps/studio/client/v2/ai/ai-run.css +281 -0
- package/apps/studio/client/v2/ai/ai-send.js +164 -0
- package/apps/studio/client/v2/ai/ai.css +261 -0
- package/apps/studio/client/v2/ai/answer-note.js +44 -0
- package/apps/studio/client/v2/ai/ask-frame.js +131 -0
- package/apps/studio/client/v2/ai/ask-selection-lane.js +100 -0
- package/apps/studio/client/v2/ai/ask-selection.css +142 -0
- package/apps/studio/client/v2/ai/ask-selection.js +84 -0
- package/apps/studio/client/v2/ai/attach.css +366 -0
- package/apps/studio/client/v2/ai/attach.js +186 -0
- package/apps/studio/client/v2/ai/chat-list-model.js +333 -0
- package/apps/studio/client/v2/ai/chat-store-api.js +93 -0
- package/apps/studio/client/{styles/6-acp-chat.css → v2/ai/chat.css} +1152 -797
- package/apps/studio/client/v2/ai/connect-flow.js +75 -0
- package/apps/studio/client/v2/ai/gate-lines.js +121 -0
- package/apps/studio/client/v2/ai/icons.jsx +66 -0
- package/apps/studio/client/v2/ai/jump-model.js +61 -0
- package/apps/studio/client/v2/ai/made-by-ai.js +179 -0
- package/apps/studio/client/v2/ai/needs-you-store.js +112 -0
- package/apps/studio/client/v2/ai/needs-you-toast.js +104 -0
- package/apps/studio/client/v2/ai/needs-you.css +554 -0
- package/apps/studio/client/v2/ai/needs-you.js +391 -0
- package/apps/studio/client/v2/ai/panel-focus.js +71 -0
- package/apps/studio/client/v2/ai/panel.css +88 -0
- package/apps/studio/client/v2/ai/paste-chips.jsx +108 -0
- package/apps/studio/client/v2/ai/picked-shots.js +48 -0
- package/apps/studio/client/v2/ai/quit.css +64 -0
- package/apps/studio/client/v2/ai/result-shown.js +50 -0
- package/apps/studio/client/v2/ai/ring-relay.js +143 -0
- package/apps/studio/client/v2/ai/row-slots-lane.js +67 -0
- package/apps/studio/client/v2/ai/run-api.js +137 -0
- package/apps/studio/client/v2/ai/run-cards.js +31 -0
- package/apps/studio/client/v2/ai/run-compare.js +60 -0
- package/apps/studio/client/v2/ai/run-icons.jsx +53 -0
- package/apps/studio/client/v2/ai/run-model.js +348 -0
- package/apps/studio/client/v2/ai/runs-model.js +568 -0
- package/apps/studio/client/v2/ai/runs-store.js +161 -0
- package/apps/studio/client/v2/ai/runs.css +226 -0
- package/apps/studio/client/v2/ai/scope.js +298 -0
- package/apps/studio/client/v2/ai/seen-relay.js +95 -0
- package/apps/studio/client/v2/ai/sent-attachments.js +77 -0
- package/apps/studio/client/v2/ai/stopped.js +69 -0
- package/apps/studio/client/v2/ai/suggest-why.js +200 -0
- package/apps/studio/client/v2/ai/use-ai-scope.js +198 -0
- package/apps/studio/client/v2/ai/use-ask-ai.js +63 -0
- package/apps/studio/client/v2/ai/use-ask-selection.js +41 -0
- package/apps/studio/client/v2/ai/use-attachments.js +239 -0
- package/apps/studio/client/v2/ai/use-chat-runs.js +32 -0
- package/apps/studio/client/v2/ai/use-run-versions.js +39 -0
- package/apps/studio/client/v2/ai/video/ClipsAttached.jsx +23 -0
- package/apps/studio/client/v2/ai/video/LeftOut.jsx +29 -0
- package/apps/studio/client/v2/ai/video/WatchProgress.jsx +65 -0
- package/apps/studio/client/v2/ai/video/card-model.js +107 -0
- package/apps/studio/client/v2/ai/video/cards.jsx +51 -0
- package/apps/studio/client/v2/ai/video/clip-pic.js +12 -0
- package/apps/studio/client/v2/ai/video/video-cards.css +168 -0
- package/apps/studio/client/v2/annotations/annotation-asks.js +171 -0
- package/apps/studio/client/v2/annotations/annotation-list-model.js +238 -0
- package/apps/studio/client/v2/annotations/annotation-list.css +277 -0
- package/apps/studio/client/v2/annotations/annotation-list.jsx +433 -0
- package/apps/studio/client/v2/annotations/recent-stickers.js +64 -0
- package/apps/studio/client/v2/annotations/stamp-row.jsx +66 -0
- package/apps/studio/client/v2/annotations/stamps-glyphs.jsx +35 -0
- package/apps/studio/client/v2/annotations/sticker-preload.js +44 -0
- package/apps/studio/client/v2/annotations/sticker-search.js +155 -0
- package/apps/studio/client/v2/annotations/stickers-gallery.css +295 -0
- package/apps/studio/client/v2/annotations/stickers-gallery.jsx +454 -0
- package/apps/studio/client/v2/annotations/templates-panel.css +344 -0
- package/apps/studio/client/v2/annotations/templates-panel.jsx +240 -0
- package/apps/studio/client/v2/annotations/v2-scope.js +20 -0
- package/apps/studio/client/v2/annotations/vote-bar.jsx +212 -0
- package/apps/studio/client/v2/annotations/vote-sheet.jsx +200 -0
- package/apps/studio/client/v2/annotations/vote-store.js +392 -0
- package/apps/studio/client/v2/annotations/vote.css +153 -0
- package/apps/studio/client/v2/assets/ask-once.js +65 -0
- package/apps/studio/client/v2/assets/asset-drop-session.js +238 -0
- package/apps/studio/client/v2/assets/asset-state-lane.js +267 -0
- package/apps/studio/client/v2/assets/assets-bus.js +109 -0
- package/apps/studio/client/v2/assets/browse-model.js +90 -0
- package/apps/studio/client/v2/assets/browse-view.jsx +202 -0
- package/apps/studio/client/v2/assets/canvas-drop-catcher.jsx +114 -0
- package/apps/studio/client/v2/assets/connect-key-sheet.jsx +69 -0
- package/apps/studio/client/v2/assets/copy-asset.js +37 -0
- package/apps/studio/client/v2/assets/describe-client.js +156 -0
- package/apps/studio/client/v2/assets/describe-consent.jsx +184 -0
- package/apps/studio/client/v2/assets/describe.css +72 -0
- package/apps/studio/client/v2/assets/details-advanced.jsx +76 -0
- package/apps/studio/client/v2/assets/details-model.js +233 -0
- package/apps/studio/client/v2/assets/details.jsx +292 -0
- package/apps/studio/client/v2/assets/generate-ask.jsx +506 -0
- package/apps/studio/client/v2/assets/generated.js +83 -0
- package/apps/studio/client/v2/assets/import-lines.js +228 -0
- package/apps/studio/client/v2/assets/import-offline.js +32 -0
- package/apps/studio/client/v2/assets/import-toast.js +56 -0
- package/apps/studio/client/v2/assets/just-added.js +32 -0
- package/apps/studio/client/v2/assets/kinds-chip.jsx +77 -0
- package/apps/studio/client/v2/assets/library-foot.js +42 -0
- package/apps/studio/client/v2/assets/missing-frame.css +60 -0
- package/apps/studio/client/v2/assets/missing-frame.jsx +218 -0
- package/apps/studio/client/v2/assets/multi-select.js +58 -0
- package/apps/studio/client/v2/assets/place-asset.js +128 -0
- package/apps/studio/client/v2/assets/relink.js +96 -0
- package/apps/studio/client/v2/assets/rename-asset.js +83 -0
- package/apps/studio/client/v2/assets/search-marks.jsx +75 -0
- package/apps/studio/client/v2/assets/takes-overlay.jsx +86 -0
- package/apps/studio/client/v2/assets/takes.css +177 -0
- package/apps/studio/client/v2/assets/takes.js +224 -0
- package/apps/studio/client/v2/assets/tidy.jsx +144 -0
- package/apps/studio/client/v2/assets/tile-drag.js +53 -0
- package/apps/studio/client/v2/assets/tile-menu.jsx +119 -0
- package/apps/studio/client/v2/assets/tile.jsx +131 -0
- package/apps/studio/client/v2/assets/trash-assets.js +98 -0
- package/apps/studio/client/v2/assets/use-asset-details.js +58 -0
- package/apps/studio/client/v2/assets/use-assets.js +121 -0
- package/apps/studio/client/v2/assets/use-takes-lane.js +150 -0
- package/apps/studio/client/v2/canvases/canvas-icons.jsx +107 -0
- package/apps/studio/client/v2/canvases/canvases-panel.jsx +1466 -0
- package/apps/studio/client/v2/canvases/canvases.css +699 -0
- package/apps/studio/client/v2/canvases/covers.js +32 -0
- package/apps/studio/client/v2/canvases/inline-rename.jsx +122 -0
- package/apps/studio/client/v2/canvases/jump-list.jsx +100 -0
- package/apps/studio/client/v2/canvases/jump-model.js +102 -0
- package/apps/studio/client/v2/canvases/kept-on-this-mac.jsx +192 -0
- package/apps/studio/client/v2/canvases/last-canvas.js +36 -0
- package/apps/studio/client/v2/canvases/move-model.js +45 -0
- package/apps/studio/client/v2/canvases/move-sheet.jsx +91 -0
- package/apps/studio/client/v2/canvases/open-link.js +154 -0
- package/apps/studio/client/v2/canvases/panel-search.js +156 -0
- package/apps/studio/client/v2/canvases/rename-model.js +134 -0
- package/apps/studio/client/v2/canvases/row-menu.jsx +145 -0
- package/apps/studio/client/v2/canvases/row-slots.js +224 -0
- package/apps/studio/client/v2/canvases/sort.js +132 -0
- package/apps/studio/client/v2/canvases/support-model.js +68 -0
- package/apps/studio/client/v2/canvases/trash-canvas.js +120 -0
- package/apps/studio/client/v2/canvases/tree-model.js +760 -0
- package/apps/studio/client/v2/canvases/use-canvas-index.js +50 -0
- package/apps/studio/client/v2/canvases/use-canvases-sort.js +59 -0
- package/apps/studio/client/v2/canvases/use-move.js +61 -0
- package/apps/studio/client/v2/canvases/use-pins.js +80 -0
- package/apps/studio/client/v2/cloud/browser-door.js +152 -0
- package/apps/studio/client/v2/cloud/cloud-name.js +38 -0
- package/apps/studio/client/v2/code/canvas-error-card.jsx +407 -0
- package/apps/studio/client/v2/code/canvas-imports-card.jsx +31 -0
- package/apps/studio/client/v2/code/code-bus.js +63 -0
- package/apps/studio/client/v2/code/code-view.jsx +277 -0
- package/apps/studio/client/v2/code/code.css +373 -0
- package/apps/studio/client/v2/code/highlight.js +163 -0
- package/apps/studio/client/v2/code/use-canvas-source.js +338 -0
- package/apps/studio/client/v2/comments/comment-bridge.js +154 -0
- package/apps/studio/client/v2/comments/comment-client.js +84 -0
- package/apps/studio/client/v2/comments/comment-tool.js +18 -0
- package/apps/studio/client/v2/comments/comments-model.js +213 -0
- package/apps/studio/client/v2/comments/comments-panel.jsx +400 -0
- package/apps/studio/client/v2/comments/comments.css +305 -0
- package/apps/studio/client/v2/comments/mention-callouts.jsx +90 -0
- package/apps/studio/client/v2/comments/mention-model.js +118 -0
- package/apps/studio/client/v2/comments/native-mention-notice.js +73 -0
- package/apps/studio/client/v2/comments/reply-focus.js +30 -0
- package/apps/studio/client/v2/comments/use-comments-shell.jsx +176 -0
- package/apps/studio/client/v2/create/NameDialog.jsx +95 -0
- package/apps/studio/client/v2/create/NameDialogHost.jsx +141 -0
- package/apps/studio/client/v2/create/create-project.css +260 -0
- package/apps/studio/client/v2/create/duplicate-done.js +45 -0
- package/apps/studio/client/v2/create/empty-project.css +113 -0
- package/apps/studio/client/v2/create/empty-project.jsx +162 -0
- package/apps/studio/client/v2/create/first-draft.js +30 -0
- package/apps/studio/client/v2/create/intent-host.jsx +40 -0
- package/apps/studio/client/v2/create/name-dialog-bus.js +41 -0
- package/apps/studio/client/v2/create/name-dialog.css +36 -0
- package/apps/studio/client/v2/create/new-canvas.js +64 -0
- package/apps/studio/client/v2/create/open-sizes.js +41 -0
- package/apps/studio/client/v2/create/render-error.css +29 -0
- package/apps/studio/client/v2/create/render-error.jsx +107 -0
- package/apps/studio/client/v2/create/repair-offer.js +36 -0
- package/apps/studio/client/v2/create/take-intent.js +154 -0
- package/apps/studio/client/v2/create/use-project-empty.js +85 -0
- package/apps/studio/client/v2/create/use-render-error.js +116 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-bus.js +47 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-handlers.js +108 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-host.jsx +196 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-model.js +253 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-sheet.jsx +557 -0
- package/apps/studio/client/v2/diagnostics/diagnostics.css +612 -0
- package/apps/studio/client/v2/diagnostics/resync-model.js +51 -0
- package/apps/studio/client/v2/diagnostics/resync-run.js +79 -0
- package/apps/studio/client/v2/diagnostics/sync-actions.js +38 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +241 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +392 -0
- package/apps/studio/client/v2/diagnostics/use-diagnostics-menu.js +58 -0
- package/apps/studio/client/v2/ds/advanced-bus.js +40 -0
- package/apps/studio/client/v2/ds/advanced-host.jsx +228 -0
- package/apps/studio/client/v2/ds/advanced-model.js +110 -0
- package/apps/studio/client/v2/ds/advanced-store.js +47 -0
- package/apps/studio/client/v2/ds/advanced.css +277 -0
- package/apps/studio/client/v2/ds/advanced.jsx +203 -0
- package/apps/studio/client/v2/ds/check-card.jsx +80 -0
- package/apps/studio/client/v2/ds/colour-picker.jsx +121 -0
- package/apps/studio/client/v2/ds/colour-words.js +48 -0
- package/apps/studio/client/v2/ds/conflict-pick.jsx +151 -0
- package/apps/studio/client/v2/ds/contrast-warning.jsx +80 -0
- package/apps/studio/client/v2/ds/contrast.js +137 -0
- package/apps/studio/client/v2/ds/convert-dialog.jsx +133 -0
- package/apps/studio/client/v2/ds/convert-host.jsx +143 -0
- package/apps/studio/client/v2/ds/convert-model.js +221 -0
- package/apps/studio/client/v2/ds/default-write.js +69 -0
- package/apps/studio/client/v2/ds/direction-bar.jsx +287 -0
- package/apps/studio/client/v2/ds/door-write.js +163 -0
- package/apps/studio/client/v2/ds/edge-model.js +151 -0
- package/apps/studio/client/v2/ds/edge-write.js +91 -0
- package/apps/studio/client/v2/ds/edges.css +152 -0
- package/apps/studio/client/v2/ds/follower-swap.js +88 -0
- package/apps/studio/client/v2/ds/go-to.js +71 -0
- package/apps/studio/client/v2/ds/kinds/master.jsx +214 -0
- package/apps/studio/client/v2/ds/kinds/token.jsx +546 -0
- package/apps/studio/client/v2/ds/library-bus.js +43 -0
- package/apps/studio/client/v2/ds/library-card.jsx +379 -0
- package/apps/studio/client/v2/ds/library-host.jsx +436 -0
- package/apps/studio/client/v2/ds/library-model.js +305 -0
- package/apps/studio/client/v2/ds/library-store.js +45 -0
- package/apps/studio/client/v2/ds/library.css +148 -0
- package/apps/studio/client/v2/ds/make-host.jsx +244 -0
- package/apps/studio/client/v2/ds/make-model.js +208 -0
- package/apps/studio/client/v2/ds/make-sheet.jsx +264 -0
- package/apps/studio/client/v2/ds/make-write.js +90 -0
- package/apps/studio/client/v2/ds/make.css +242 -0
- package/apps/studio/client/v2/ds/master-write.js +145 -0
- package/apps/studio/client/v2/ds/new-canvas-default.js +89 -0
- package/apps/studio/client/v2/ds/off-system-host.jsx +107 -0
- package/apps/studio/client/v2/ds/off-system.jsx +101 -0
- package/apps/studio/client/v2/ds/outside-banner.jsx +153 -0
- package/apps/studio/client/v2/ds/pinned-rows.js +138 -0
- package/apps/studio/client/v2/ds/pins.js +102 -0
- package/apps/studio/client/v2/ds/preview-bar.jsx +220 -0
- package/apps/studio/client/v2/ds/preview-doors.js +47 -0
- package/apps/studio/client/v2/ds/preview-mode.js +163 -0
- package/apps/studio/client/v2/ds/reach-data.js +68 -0
- package/apps/studio/client/v2/ds/reach-model.js +184 -0
- package/apps/studio/client/v2/ds/reach-view.jsx +577 -0
- package/apps/studio/client/v2/ds/reach.css +298 -0
- package/apps/studio/client/v2/ds/rename-write.js +88 -0
- package/apps/studio/client/v2/ds/review-bus.js +41 -0
- package/apps/studio/client/v2/ds/review-host.jsx +438 -0
- package/apps/studio/client/v2/ds/review-model.js +307 -0
- package/apps/studio/client/v2/ds/review-sheet.jsx +390 -0
- package/apps/studio/client/v2/ds/review.css +894 -0
- package/apps/studio/client/v2/ds/row-dots.js +41 -0
- package/apps/studio/client/v2/ds/switch-bus.js +56 -0
- package/apps/studio/client/v2/ds/switch-host.jsx +241 -0
- package/apps/studio/client/v2/ds/switch-model.js +254 -0
- package/apps/studio/client/v2/ds/switch-sheet.jsx +364 -0
- package/apps/studio/client/v2/ds/switch.css +263 -0
- package/apps/studio/client/v2/ds/system-menu.jsx +81 -0
- package/apps/studio/client/v2/ds/system-rename.jsx +102 -0
- package/apps/studio/client/v2/ds/token-write.js +241 -0
- package/apps/studio/client/v2/ds/token.css +185 -0
- package/apps/studio/client/v2/ds/trash-token-sheet.jsx +112 -0
- package/apps/studio/client/v2/ds/truth-card.jsx +85 -0
- package/apps/studio/client/v2/ds/truth-host.jsx +239 -0
- package/apps/studio/client/v2/ds/truth-model.js +315 -0
- package/apps/studio/client/v2/ds/truth-store.js +45 -0
- package/apps/studio/client/v2/ds/truth.css +143 -0
- package/apps/studio/client/v2/ds/update-available.jsx +261 -0
- package/apps/studio/client/v2/ds/update-dots.js +103 -0
- package/apps/studio/client/v2/ds/update-model.js +295 -0
- package/apps/studio/client/v2/ds/upgrade-bus.js +40 -0
- package/apps/studio/client/v2/ds/upgrade-host.jsx +185 -0
- package/apps/studio/client/v2/ds/upgrade-model.js +266 -0
- package/apps/studio/client/v2/ds/upgrade-offers.js +34 -0
- package/apps/studio/client/v2/ds/upgrade-sheet.jsx +277 -0
- package/apps/studio/client/v2/ds/upgrade.css +166 -0
- package/apps/studio/client/v2/ds/use-covers.js +27 -0
- package/apps/studio/client/v2/ds/use-ds-frames.js +165 -0
- package/apps/studio/client/v2/ds/use-ds-model.js +61 -0
- package/apps/studio/client/v2/ds/use-ds-search.js +61 -0
- package/apps/studio/client/v2/ds/use-ds-state.js +65 -0
- package/apps/studio/client/v2/ds/uses-link.jsx +58 -0
- package/apps/studio/client/v2/empty/all-trashed-model.js +321 -0
- package/apps/studio/client/v2/empty/all-trashed-relay.js +65 -0
- package/apps/studio/client/v2/empty/all-trashed.jsx +229 -0
- package/apps/studio/client/v2/empty/arriving.jsx +180 -0
- package/apps/studio/client/v2/empty/artboard-hint.jsx +47 -0
- package/apps/studio/client/v2/empty/ask-button.jsx +35 -0
- package/apps/studio/client/v2/empty/confetti.jsx +46 -0
- package/apps/studio/client/v2/empty/empty-canvas.jsx +96 -0
- package/apps/studio/client/v2/empty/empty-copy.js +265 -0
- package/apps/studio/client/v2/empty/empty-hint-store.js +31 -0
- package/apps/studio/client/v2/empty/empty-host.jsx +168 -0
- package/apps/studio/client/v2/empty/empty.css +440 -0
- package/apps/studio/client/v2/empty/empty.jsx +162 -0
- package/apps/studio/client/v2/empty/fill-ask.js +22 -0
- package/apps/studio/client/v2/empty/free-centre.js +11 -0
- package/apps/studio/client/v2/empty/index.js +40 -0
- package/apps/studio/client/v2/empty/layers-empty.jsx +22 -0
- package/apps/studio/client/v2/empty/not-local.jsx +111 -0
- package/apps/studio/client/v2/empty/select-new-artboard.js +32 -0
- package/apps/studio/client/v2/empty/skeleton.jsx +51 -0
- package/apps/studio/client/v2/empty/spot-art.jsx +923 -0
- package/apps/studio/client/v2/empty/spot.jsx +96 -0
- package/apps/studio/client/v2/empty/suggestions.jsx +18 -0
- package/apps/studio/client/v2/empty/use-empty-canvas.js +251 -0
- package/apps/studio/client/v2/export/access-line.jsx +48 -0
- package/apps/studio/client/v2/export/advanced/advanced-copy.js +77 -0
- package/apps/studio/client/v2/export/advanced/advanced.css +252 -0
- package/apps/studio/client/v2/export/advanced/advanced.jsx +148 -0
- package/apps/studio/client/v2/export/advanced/command.js +128 -0
- package/apps/studio/client/v2/export/advanced/command.jsx +50 -0
- package/apps/studio/client/v2/export/advanced/fields.jsx +132 -0
- package/apps/studio/client/v2/export/advanced/image.jsx +124 -0
- package/apps/studio/client/v2/export/advanced/model.js +199 -0
- package/apps/studio/client/v2/export/advanced/names.jsx +65 -0
- package/apps/studio/client/v2/export/advanced/print.jsx +99 -0
- package/apps/studio/client/v2/export/advanced/render.jsx +63 -0
- package/apps/studio/client/v2/export/advanced/video.jsx +76 -0
- package/apps/studio/client/v2/export/annotations-policy.js +28 -0
- package/apps/studio/client/v2/export/cloud-queue.js +69 -0
- package/apps/studio/client/v2/export/copy-command.js +72 -0
- package/apps/studio/client/v2/export/copy-png.js +144 -0
- package/apps/studio/client/v2/export/done-toast.jsx +89 -0
- package/apps/studio/client/v2/export/edges.css +74 -0
- package/apps/studio/client/v2/export/export-copy.js +352 -0
- package/apps/studio/client/v2/export/export-sheet.jsx +804 -0
- package/apps/studio/client/v2/export/export-sizes.js +217 -0
- package/apps/studio/client/v2/export/export.css +832 -0
- package/apps/studio/client/v2/export/exports-model.js +383 -0
- package/apps/studio/client/v2/export/exports-panel.css +192 -0
- package/apps/studio/client/v2/export/exports-panel.jsx +164 -0
- package/apps/studio/client/v2/export/file-rows.jsx +84 -0
- package/apps/studio/client/v2/export/inspector-export.jsx +335 -0
- package/apps/studio/client/v2/export/job-row.jsx +358 -0
- package/apps/studio/client/v2/export/last-finished.js +34 -0
- package/apps/studio/client/v2/export/native-save.js +160 -0
- package/apps/studio/client/v2/export/other-formats.jsx +199 -0
- package/apps/studio/client/v2/export/parts.jsx +117 -0
- package/apps/studio/client/v2/export/preflight/fonts.js +27 -0
- package/apps/studio/client/v2/export/preflight/paper.jsx +177 -0
- package/apps/studio/client/v2/export/preflight/safe-margin.js +24 -0
- package/apps/studio/client/v2/export/preflight/use-preflight.js +74 -0
- package/apps/studio/client/v2/export/preview.jsx +79 -0
- package/apps/studio/client/v2/export/print.css +219 -0
- package/apps/studio/client/v2/export/run-export.js +177 -0
- package/apps/studio/client/v2/export/scope-bar.jsx +70 -0
- package/apps/studio/client/v2/export/sections/batch-model.js +224 -0
- package/apps/studio/client/v2/export/sections/batch.jsx +235 -0
- package/apps/studio/client/v2/export/sections/image.jsx +93 -0
- package/apps/studio/client/v2/export/sections/print-copy.js +41 -0
- package/apps/studio/client/v2/export/sections/print.jsx +285 -0
- package/apps/studio/client/v2/export/sections/render-row.jsx +81 -0
- package/apps/studio/client/v2/export/sections/version.jsx +176 -0
- package/apps/studio/client/v2/export/sections/video-copy.js +92 -0
- package/apps/studio/client/v2/export/sections/video-model.js +127 -0
- package/apps/studio/client/v2/export/sections/video.jsx +397 -0
- package/apps/studio/client/v2/export/sections/web.jsx +151 -0
- package/apps/studio/client/v2/export/share-hint.jsx +51 -0
- package/apps/studio/client/v2/export/use-export-spec.js +546 -0
- package/apps/studio/client/v2/export/video-content.js +75 -0
- package/apps/studio/client/v2/export/video.css +221 -0
- package/apps/studio/client/v2/fold/advanced-fold.jsx +96 -0
- package/apps/studio/client/v2/fold/fold-store.js +151 -0
- package/apps/studio/client/v2/fold/fold.css +59 -0
- package/apps/studio/client/v2/fold/use-fold.js +36 -0
- package/apps/studio/client/v2/handoff/edges.jsx +74 -0
- package/apps/studio/client/v2/handoff/handoff-sheet.jsx +469 -0
- package/apps/studio/client/v2/handoff/handoff.css +181 -0
- package/apps/studio/client/v2/handoff/ready-card.jsx +84 -0
- package/apps/studio/client/v2/handoff/targets.js +111 -0
- package/apps/studio/client/v2/help/add-guides.js +43 -0
- package/apps/studio/client/v2/help/help.css +995 -0
- package/apps/studio/client/v2/history/blame.js +161 -0
- package/apps/studio/client/v2/history/branch-actions.js +214 -0
- package/apps/studio/client/v2/history/change-list.jsx +102 -0
- package/apps/studio/client/v2/history/clear-band.js +144 -0
- package/apps/studio/client/v2/history/compare-store.js +80 -0
- package/apps/studio/client/v2/history/compare-view.jsx +318 -0
- package/apps/studio/client/v2/history/compare-words.js +8 -0
- package/apps/studio/client/v2/history/git-advanced.jsx +580 -0
- package/apps/studio/client/v2/history/git-io.js +58 -0
- package/apps/studio/client/v2/history/git-model.js +526 -0
- package/apps/studio/client/v2/history/git-parts.jsx +662 -0
- package/apps/studio/client/v2/history/history-host.jsx +78 -0
- package/apps/studio/client/v2/history/history-panel.jsx +599 -0
- package/apps/studio/client/v2/history/history.css +1477 -0
- package/apps/studio/client/v2/history/name-dialog.jsx +109 -0
- package/apps/studio/client/v2/history/object-filter.js +143 -0
- package/apps/studio/client/v2/history/object-history-ask.js +62 -0
- package/apps/studio/client/v2/history/object-view.jsx +236 -0
- package/apps/studio/client/v2/history/rows.ts +445 -0
- package/apps/studio/client/v2/history/use-versions.js +391 -0
- package/apps/studio/client/v2/history/view-bar.jsx +80 -0
- package/apps/studio/client/v2/import/brand-model.js +145 -0
- package/apps/studio/client/v2/import/brand-result.jsx +197 -0
- package/apps/studio/client/v2/import/brand-sheet.jsx +434 -0
- package/apps/studio/client/v2/import/brand.css +378 -0
- package/apps/studio/client/v2/import/figma-artboard.jsx +121 -0
- package/apps/studio/client/v2/import/figma-model.js +237 -0
- package/apps/studio/client/v2/import/figma-prefill.js +23 -0
- package/apps/studio/client/v2/import/figma-sheet.jsx +525 -0
- package/apps/studio/client/v2/import/figma-summary.jsx +62 -0
- package/apps/studio/client/v2/import/figma.css +179 -0
- package/apps/studio/client/v2/import/frame-picker.jsx +57 -0
- package/apps/studio/client/v2/inspect/inspect-host.jsx +53 -0
- package/apps/studio/client/v2/inspect/inspect-model.js +132 -0
- package/apps/studio/client/v2/inspect/inspect-panel.jsx +214 -0
- package/apps/studio/client/v2/inspect/inspect.css +87 -0
- package/apps/studio/client/v2/inspector/advanced-rows-default.jsx +773 -0
- package/apps/studio/client/v2/inspector/advanced-rows.js +106 -0
- package/apps/studio/client/v2/inspector/advanced.jsx +286 -0
- package/apps/studio/client/v2/inspector/blocks.js +57 -0
- package/apps/studio/client/v2/inspector/colour-groups.js +129 -0
- package/apps/studio/client/v2/inspector/component-picker.css +133 -0
- package/apps/studio/client/v2/inspector/component-picker.jsx +367 -0
- package/apps/studio/client/v2/inspector/crumbs.jsx +89 -0
- package/apps/studio/client/v2/inspector/css-text.js +179 -0
- package/apps/studio/client/v2/inspector/css-write.js +204 -0
- package/apps/studio/client/v2/inspector/element-code.js +39 -0
- package/apps/studio/client/v2/inspector/element-id.js +70 -0
- package/apps/studio/client/v2/inspector/formats-ui.js +101 -0
- package/apps/studio/client/v2/inspector/formats-write.js +60 -0
- package/apps/studio/client/v2/inspector/frame.jsx +336 -0
- package/apps/studio/client/v2/inspector/inspector-actions.js +60 -0
- package/apps/studio/client/v2/inspector/inspector.css +2872 -0
- package/apps/studio/client/v2/inspector/jsx-slice.js +219 -0
- package/apps/studio/client/v2/inspector/kinds/add-width.js +55 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-advanced-rows.jsx +89 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-advanced.jsx +62 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-fixed.jsx +111 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-kinds-model.js +171 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-model.js +155 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-multi.jsx +142 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-print-advanced.jsx +210 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-print-model.js +112 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-print.jsx +268 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-rows.jsx +124 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-video.jsx +144 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-web.jsx +170 -0
- package/apps/studio/client/v2/inspector/kinds/artboard.jsx +168 -0
- package/apps/studio/client/v2/inspector/kinds/caption.jsx +203 -0
- package/apps/studio/client/v2/inspector/kinds/clip-model.js +190 -0
- package/apps/studio/client/v2/inspector/kinds/clip.css +157 -0
- package/apps/studio/client/v2/inspector/kinds/clip.jsx +447 -0
- package/apps/studio/client/v2/inspector/kinds/frame.jsx +118 -0
- package/apps/studio/client/v2/inspector/kinds/image.jsx +267 -0
- package/apps/studio/client/v2/inspector/kinds/index.js +180 -0
- package/apps/studio/client/v2/inspector/kinds/instance.jsx +377 -0
- package/apps/studio/client/v2/inspector/kinds/multi-artboard.jsx +129 -0
- package/apps/studio/client/v2/inspector/kinds/multi.jsx +220 -0
- package/apps/studio/client/v2/inspector/kinds/music.jsx +294 -0
- package/apps/studio/client/v2/inspector/kinds/path.jsx +174 -0
- package/apps/studio/client/v2/inspector/kinds/shape.jsx +59 -0
- package/apps/studio/client/v2/inspector/kinds/text.jsx +518 -0
- package/apps/studio/client/v2/inspector/kinds/title-rows.jsx +135 -0
- package/apps/studio/client/v2/inspector/kinds/video-facts.js +142 -0
- package/apps/studio/client/v2/inspector/layers-row-tools.jsx +93 -0
- package/apps/studio/client/v2/inspector/layers-slot.jsx +93 -0
- package/apps/studio/client/v2/inspector/link-write.js +52 -0
- package/apps/studio/client/v2/inspector/live-size.js +96 -0
- package/apps/studio/client/v2/inspector/model.js +228 -0
- package/apps/studio/client/v2/inspector/path-point.js +104 -0
- package/apps/studio/client/v2/inspector/print-write.js +85 -0
- package/apps/studio/client/v2/inspector/safe-zones-write.js +88 -0
- package/apps/studio/client/v2/inspector/sections/add-requests.js +35 -0
- package/apps/studio/client/v2/inspector/sections/border.jsx +141 -0
- package/apps/studio/client/v2/inspector/sections/color-control.jsx +246 -0
- package/apps/studio/client/v2/inspector/sections/colour-custom.jsx +826 -0
- package/apps/studio/client/v2/inspector/sections/colour-model.js +404 -0
- package/apps/studio/client/v2/inspector/sections/colour-popover.jsx +631 -0
- package/apps/studio/client/v2/inspector/sections/colour-words.js +131 -0
- package/apps/studio/client/v2/inspector/sections/corners.jsx +177 -0
- package/apps/studio/client/v2/inspector/sections/effects.jsx +67 -0
- package/apps/studio/client/v2/inspector/sections/export-slot.jsx +60 -0
- package/apps/studio/client/v2/inspector/sections/fill.jsx +187 -0
- package/apps/studio/client/v2/inspector/sections/formats.jsx +209 -0
- package/apps/studio/client/v2/inspector/sections/index.js +74 -0
- package/apps/studio/client/v2/inspector/sections/interaction.jsx +204 -0
- package/apps/studio/client/v2/inspector/sections/layout.jsx +314 -0
- package/apps/studio/client/v2/inspector/sections/opacity-row.jsx +37 -0
- package/apps/studio/client/v2/inspector/sections/point.jsx +102 -0
- package/apps/studio/client/v2/inspector/sections/position.jsx +259 -0
- package/apps/studio/client/v2/inspector/sections/recent-colours.js +106 -0
- package/apps/studio/client/v2/inspector/sections/row.jsx +91 -0
- package/apps/studio/client/v2/inspector/sections/safe-zones.jsx +174 -0
- package/apps/studio/client/v2/inspector/sections/sections.css +1474 -0
- package/apps/studio/client/v2/inspector/sections/size.jsx +104 -0
- package/apps/studio/client/v2/inspector/sections/type.jsx +168 -0
- package/apps/studio/client/v2/inspector/sections/warnings.css +44 -0
- package/apps/studio/client/v2/inspector/sections/warnings.jsx +137 -0
- package/apps/studio/client/v2/inspector/sections.js +226 -0
- package/apps/studio/client/v2/inspector/slots.js +110 -0
- package/apps/studio/client/v2/inspector/token-chip.jsx +315 -0
- package/apps/studio/client/v2/inspector/view-mode.jsx +193 -0
- package/apps/studio/client/v2/inspector/warning-fix.js +111 -0
- package/apps/studio/client/v2/kinds/ConvertDialog.jsx +183 -0
- package/apps/studio/client/v2/kinds/KindChips.jsx +60 -0
- package/apps/studio/client/v2/kinds/KindDimHost.jsx +35 -0
- package/apps/studio/client/v2/kinds/LayersKindFilter.jsx +108 -0
- package/apps/studio/client/v2/kinds/SizePicker.jsx +566 -0
- package/apps/studio/client/v2/kinds/SizePickerHost.jsx +104 -0
- package/apps/studio/client/v2/kinds/advanced-rows.js +40 -0
- package/apps/studio/client/v2/kinds/convert-api.js +116 -0
- package/apps/studio/client/v2/kinds/convert.css +87 -0
- package/apps/studio/client/v2/kinds/kind-dim-relay.js +93 -0
- package/apps/studio/client/v2/kinds/kind-filter-model.js +106 -0
- package/apps/studio/client/v2/kinds/kind-filter-store.js +71 -0
- package/apps/studio/client/v2/kinds/kind-filter.css +105 -0
- package/apps/studio/client/v2/kinds/layers-kind-model.js +99 -0
- package/apps/studio/client/v2/kinds/size-picker-model.js +189 -0
- package/apps/studio/client/v2/kinds/size-picker.css +393 -0
- package/apps/studio/client/v2/layers/artboard-layers.jsx +105 -0
- package/apps/studio/client/v2/layers/layers.css +94 -0
- package/apps/studio/client/v2/left-panel/advanced-model.js +98 -0
- package/apps/studio/client/v2/left-panel/assets-panel.jsx +1203 -0
- package/apps/studio/client/v2/left-panel/canvas-file-menu.js +115 -0
- package/apps/studio/client/v2/left-panel/canvases-advanced.jsx +270 -0
- package/apps/studio/client/v2/left-panel/canvases-pinned.jsx +274 -0
- package/apps/studio/client/v2/left-panel/layers-advanced.jsx +179 -0
- package/apps/studio/client/v2/left-panel/left-panel-bus.js +83 -0
- package/apps/studio/client/v2/left-panel/left-panel-model.js +184 -0
- package/apps/studio/client/v2/left-panel/left-panel.css +1846 -0
- package/apps/studio/client/v2/left-panel/selector-scope.js +42 -0
- package/apps/studio/client/v2/left-panel/trash-model.js +282 -0
- package/apps/studio/client/v2/left-panel/trash-view.jsx +257 -0
- package/apps/studio/client/v2/left-panel/use-trash.js +172 -0
- package/apps/studio/client/v2/left-panel/view-prefs.js +84 -0
- package/apps/studio/client/v2/onboarding/AdvSheet.jsx +114 -0
- package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +239 -0
- package/apps/studio/client/v2/onboarding/CliSheet.jsx +101 -0
- package/apps/studio/client/v2/onboarding/ConnectAiSheet.jsx +60 -0
- package/apps/studio/client/v2/onboarding/FigmaSheet.jsx +96 -0
- package/apps/studio/client/v2/onboarding/FolderGithubSheet.jsx +77 -0
- package/apps/studio/client/v2/onboarding/GithubSegment.jsx +241 -0
- package/apps/studio/client/v2/onboarding/HubSheet.jsx +244 -0
- package/apps/studio/client/v2/onboarding/connect-ai-home.js +94 -0
- package/apps/studio/client/v2/onboarding/github-home.js +84 -0
- package/apps/studio/client/v2/onboarding/onboarding-model.js +106 -0
- package/apps/studio/client/v2/onboarding/onboarding.css +546 -0
- package/apps/studio/client/v2/photo/apply-every-use-sheet.jsx +196 -0
- package/apps/studio/client/v2/photo/canvas-rel.js +20 -0
- package/apps/studio/client/v2/photo/looks.js +129 -0
- package/apps/studio/client/v2/photo/photo-section.jsx +625 -0
- package/apps/studio/client/v2/photo/photo.css +218 -0
- package/apps/studio/client/v2/portal-scope.jsx +14 -0
- package/apps/studio/client/v2/presence/faces.jsx +356 -0
- package/apps/studio/client/v2/presence/presence.css +187 -0
- package/apps/studio/client/v2/presence/use-presence-host.js +83 -0
- package/apps/studio/client/v2/present/audience-window.js +63 -0
- package/apps/studio/client/v2/present/canvas-pill.jsx +55 -0
- package/apps/studio/client/v2/present/copy-link.js +82 -0
- package/apps/studio/client/v2/present/follow-location.js +82 -0
- package/apps/studio/client/v2/present/follow-model.js +68 -0
- package/apps/studio/client/v2/present/follow-view.jsx +354 -0
- package/apps/studio/client/v2/present/follow.css +91 -0
- package/apps/studio/client/v2/present/order-map.jsx +64 -0
- package/apps/studio/client/v2/present/order-notes-artboards.js +88 -0
- package/apps/studio/client/v2/present/order-notes-model.js +141 -0
- package/apps/studio/client/v2/present/order-notes-mount.jsx +26 -0
- package/apps/studio/client/v2/present/order-notes-sheet.jsx +293 -0
- package/apps/studio/client/v2/present/order-notes.css +150 -0
- package/apps/studio/client/v2/present/present-chrome-host.jsx +95 -0
- package/apps/studio/client/v2/present/present-controls-model.js +114 -0
- package/apps/studio/client/v2/present/present-controls.jsx +263 -0
- package/apps/studio/client/v2/present/present-zoom-store.js +33 -0
- package/apps/studio/client/v2/present/present.css +258 -0
- package/apps/studio/client/v2/present/presenter-button.jsx +25 -0
- package/apps/studio/client/v2/present/presenter-host.jsx +246 -0
- package/apps/studio/client/v2/present/presenter-model.js +167 -0
- package/apps/studio/client/v2/present/presenter-store.js +140 -0
- package/apps/studio/client/v2/present/presenter-view.css +298 -0
- package/apps/studio/client/v2/present/presenter-view.jsx +241 -0
- package/apps/studio/client/v2/present/video-present-model.js +92 -0
- package/apps/studio/client/v2/present/video-present.css +164 -0
- package/apps/studio/client/v2/present/video-present.jsx +331 -0
- package/apps/studio/client/v2/preview/external-link-confirm.jsx +245 -0
- package/apps/studio/client/v2/preview/link-follow.js +109 -0
- package/apps/studio/client/v2/preview/open-in-app.jsx +46 -0
- package/apps/studio/client/v2/preview/preview-back.js +21 -0
- package/apps/studio/client/v2/preview/preview-bar.jsx +86 -0
- package/apps/studio/client/v2/preview/preview-chrome-host.jsx +234 -0
- package/apps/studio/client/v2/preview/preview-history.js +61 -0
- package/apps/studio/client/v2/preview/preview.css +262 -0
- package/apps/studio/client/v2/preview/zoom-only.jsx +58 -0
- package/apps/studio/client/v2/search/help-model.js +275 -0
- package/apps/studio/client/v2/search/moved-keys.js +74 -0
- package/apps/studio/client/v2/search/palette-icons.js +45 -0
- package/apps/studio/client/v2/search/search-ds.js +142 -0
- package/apps/studio/client/v2/search/search-env.js +110 -0
- package/apps/studio/client/v2/search/search-keywords.js +162 -0
- package/apps/studio/client/v2/search/search-model.js +623 -0
- package/apps/studio/client/v2/search/search-projects.js +214 -0
- package/apps/studio/client/v2/search/search-recent.js +94 -0
- package/apps/studio/client/v2/search/search-remote.js +30 -0
- package/apps/studio/client/v2/search/search.css +519 -0
- package/apps/studio/client/v2/settings/account.jsx +164 -0
- package/apps/studio/client/v2/settings/advanced-prefs.js +91 -0
- package/apps/studio/client/v2/settings/advanced-section.jsx +308 -0
- package/apps/studio/client/v2/settings/connection-row.jsx +79 -0
- package/apps/studio/client/v2/settings/connections-model.js +138 -0
- package/apps/studio/client/v2/settings/connections-section.jsx +663 -0
- package/apps/studio/client/v2/settings/general-section.jsx +155 -0
- package/apps/studio/client/v2/settings/parts.jsx +48 -0
- package/apps/studio/client/v2/settings/prefs-migrate.js +141 -0
- package/apps/studio/client/v2/settings/project-sync-settings.jsx +255 -0
- package/apps/studio/client/v2/settings/reset-section.jsx +164 -0
- package/apps/studio/client/v2/settings/settings-handlers.js +46 -0
- package/apps/studio/client/v2/settings/settings-model.js +523 -0
- package/apps/studio/client/v2/settings/settings-sheet.jsx +204 -0
- package/apps/studio/client/v2/settings/settings.css +975 -0
- package/apps/studio/client/v2/settings/theme-auto.js +75 -0
- package/apps/studio/client/v2/settings/use-advanced-prefs.js +32 -0
- package/apps/studio/client/v2/settings/use-connections.js +485 -0
- package/apps/studio/client/v2/share/glyphs.jsx +92 -0
- package/apps/studio/client/v2/share/invite-row.jsx +68 -0
- package/apps/studio/client/v2/share/link-dialog.js +53 -0
- package/apps/studio/client/v2/share/link-row.jsx +38 -0
- package/apps/studio/client/v2/share/move-to-cloud.jsx +88 -0
- package/apps/studio/client/v2/share/people-list.jsx +151 -0
- package/apps/studio/client/v2/share/person.jsx +26 -0
- package/apps/studio/client/v2/share/role-menu.jsx +145 -0
- package/apps/studio/client/v2/share/share-advanced.jsx +411 -0
- package/apps/studio/client/v2/share/share-model.js +469 -0
- package/apps/studio/client/v2/share/share-sheet.jsx +602 -0
- package/apps/studio/client/v2/share/share.css +828 -0
- package/apps/studio/client/v2/shell/account-card-model.js +114 -0
- package/apps/studio/client/v2/shell/account-card.jsx +177 -0
- package/apps/studio/client/v2/shell/annotation-prefs-store.js +105 -0
- package/apps/studio/client/v2/shell/ask-to-edit.js +33 -0
- package/apps/studio/client/v2/shell/callouts-host.jsx +151 -0
- package/apps/studio/client/v2/shell/callouts-model.js +358 -0
- package/apps/studio/client/v2/shell/callouts.css +164 -0
- package/apps/studio/client/v2/shell/callouts.jsx +162 -0
- package/apps/studio/client/v2/shell/canvas-mode.js +393 -0
- package/apps/studio/client/v2/shell/contrast.css +37 -0
- package/apps/studio/client/v2/shell/corner-icons.jsx +153 -0
- package/apps/studio/client/v2/shell/dock-rail-homes.js +106 -0
- package/apps/studio/client/v2/shell/f6-cycle.js +124 -0
- package/apps/studio/client/v2/shell/floating-panels.css +2858 -0
- package/apps/studio/client/v2/shell/fold-ghost.js +70 -0
- package/apps/studio/client/v2/shell/format-update.css +43 -0
- package/apps/studio/client/v2/shell/format-update.js +487 -0
- package/apps/studio/client/v2/shell/format-update.jsx +479 -0
- package/apps/studio/client/v2/shell/held-conflict.js +51 -0
- package/apps/studio/client/v2/shell/image-pick.js +140 -0
- package/apps/studio/client/v2/shell/insets-now.js +35 -0
- package/apps/studio/client/v2/shell/inspector-follow.js +113 -0
- package/apps/studio/client/v2/shell/menu-runner.js +711 -0
- package/apps/studio/client/v2/shell/modal-focus.js +259 -0
- package/apps/studio/client/v2/shell/mode-switch.jsx +418 -0
- package/apps/studio/client/v2/shell/native-doors.js +121 -0
- package/apps/studio/client/v2/shell/occlusion-insets.js +116 -0
- package/apps/studio/client/v2/shell/panel-availability.js +27 -0
- package/apps/studio/client/v2/shell/panel-layout.js +144 -0
- package/apps/studio/client/v2/shell/panel-sizes.js +150 -0
- package/apps/studio/client/v2/shell/paste-forward.js +43 -0
- package/apps/studio/client/v2/shell/present-from-label.js +19 -0
- package/apps/studio/client/v2/shell/project-menu-model.js +216 -0
- package/apps/studio/client/v2/shell/project-pill.css +214 -0
- package/apps/studio/client/v2/shell/project-pill.jsx +456 -0
- package/apps/studio/client/v2/shell/recovery-store.js +139 -0
- package/apps/studio/client/v2/shell/role-denial.js +73 -0
- package/apps/studio/client/v2/shell/role-gate.js +29 -0
- package/apps/studio/client/v2/shell/save-hold-notice.js +69 -0
- package/apps/studio/client/v2/shell/save-status.js +191 -0
- package/apps/studio/client/v2/shell/scroll-lock.js +49 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +389 -0
- package/apps/studio/client/v2/shell/share-cluster.css +608 -0
- package/apps/studio/client/v2/shell/share-cluster.jsx +255 -0
- package/apps/studio/client/v2/shell/shell-error-boundary.jsx +81 -0
- package/apps/studio/client/v2/shell/shell-panels-relay.js +95 -0
- package/apps/studio/client/v2/shell/shell-parity.js +457 -0
- package/apps/studio/client/v2/shell/shell-parity.json +2106 -0
- package/apps/studio/client/v2/shell/single-keys-store.js +49 -0
- package/apps/studio/client/v2/shell/tool-panels.css +39 -0
- package/apps/studio/client/v2/shell/tool-panels.js +156 -0
- package/apps/studio/client/v2/shell/use-account.js +59 -0
- package/apps/studio/client/v2/shell/use-annotation-prefs.js +77 -0
- package/apps/studio/client/v2/shell/use-canvas-mode-lane.js +388 -0
- package/apps/studio/client/v2/shell/use-dismiss-outside.js +35 -0
- package/apps/studio/client/v2/shell/use-fit-on-ai-pin.js +42 -0
- package/apps/studio/client/v2/shell/use-fit-while-ai-drafts.js +37 -0
- package/apps/studio/client/v2/shell/use-occluded-insets.js +107 -0
- package/apps/studio/client/v2/shell/use-panel-layout.js +45 -0
- package/apps/studio/client/v2/shell/use-single-keys.js +56 -0
- package/apps/studio/client/v2/shell/use-tool-panels.js +205 -0
- package/apps/studio/client/v2/signin/CreateLocalSheet.jsx +155 -0
- package/apps/studio/client/v2/signin/SignInCard.jsx +284 -0
- package/apps/studio/client/v2/signin/SignInToast.jsx +22 -0
- package/apps/studio/client/v2/signin/WhatsNewLine.jsx +64 -0
- package/apps/studio/client/v2/signin/advanced-rows.js +40 -0
- package/apps/studio/client/v2/signin/signin-model.js +138 -0
- package/apps/studio/client/v2/signin/signin.css +484 -0
- package/apps/studio/client/v2/signin/use-signin.js +209 -0
- package/apps/studio/client/v2/signin/use-whats-new-line.js +94 -0
- package/apps/studio/client/v2/sync-states/back-online.jsx +61 -0
- package/apps/studio/client/v2/sync-states/conflict-card.jsx +326 -0
- package/apps/studio/client/v2/sync-states/offline-foot.jsx +79 -0
- package/apps/studio/client/v2/sync-states/row-words.js +83 -0
- package/apps/studio/client/v2/sync-states/sync-states-model.js +264 -0
- package/apps/studio/client/v2/sync-states/sync-states.css +232 -0
- package/apps/studio/client/v2/timeline/Timeline.jsx +3194 -0
- package/apps/studio/client/v2/timeline/TimelineHost.jsx +360 -0
- package/apps/studio/client/v2/timeline/advanced/actions.js +27 -0
- package/apps/studio/client/v2/timeline/advanced/advanced-store.js +116 -0
- package/apps/studio/client/v2/timeline/advanced/advanced.css +323 -0
- package/apps/studio/client/v2/timeline/advanced/cut-as-code.jsx +127 -0
- package/apps/studio/client/v2/timeline/advanced/easing-curve.jsx +200 -0
- package/apps/studio/client/v2/timeline/advanced/foot.jsx +210 -0
- package/apps/studio/client/v2/timeline/advanced/model.js +121 -0
- package/apps/studio/client/v2/timeline/advanced/render-settings.jsx +62 -0
- package/apps/studio/client/v2/timeline/advanced/video-cap.js +174 -0
- package/apps/studio/client/v2/timeline/ai-edge-model.js +111 -0
- package/apps/studio/client/v2/timeline/ai-edge.css +104 -0
- package/apps/studio/client/v2/timeline/ai-edge.jsx +113 -0
- package/apps/studio/client/v2/timeline/anchor-lane.js +80 -0
- package/apps/studio/client/v2/timeline/anchor.js +80 -0
- package/apps/studio/client/v2/timeline/assemble-video.js +64 -0
- package/apps/studio/client/v2/timeline/clip-search.js +88 -0
- package/apps/studio/client/v2/timeline/clip-verb.js +224 -0
- package/apps/studio/client/v2/timeline/comment-strip-host.jsx +93 -0
- package/apps/studio/client/v2/timeline/comment-strip-model.js +103 -0
- package/apps/studio/client/v2/timeline/comment-strip.jsx +82 -0
- package/apps/studio/client/v2/timeline/edit/clip-menu.js +118 -0
- package/apps/studio/client/v2/timeline/edit/clip-menu.jsx +48 -0
- package/apps/studio/client/v2/timeline/edit/drop.jsx +101 -0
- package/apps/studio/client/v2/timeline/edit/move.jsx +43 -0
- package/apps/studio/client/v2/timeline/edit/ripple.js +43 -0
- package/apps/studio/client/v2/timeline/edit/trim.jsx +52 -0
- package/apps/studio/client/v2/timeline/edit/words.js +65 -0
- package/apps/studio/client/v2/timeline/fit-fill.jsx +172 -0
- package/apps/studio/client/v2/timeline/fit-model.js +137 -0
- package/apps/studio/client/v2/timeline/fold.js +128 -0
- package/apps/studio/client/v2/timeline/footage-rows.jsx +46 -0
- package/apps/studio/client/v2/timeline/footage-state.js +135 -0
- package/apps/studio/client/v2/timeline/glyphs.jsx +118 -0
- package/apps/studio/client/v2/timeline/island-context.js +29 -0
- package/apps/studio/client/v2/timeline/island-controls.jsx +83 -0
- package/apps/studio/client/v2/timeline/island.jsx +54 -0
- package/apps/studio/client/v2/timeline/joins/join-model.js +133 -0
- package/apps/studio/client/v2/timeline/joins/joins.css +277 -0
- package/apps/studio/client/v2/timeline/joins/transition-picker.jsx +240 -0
- package/apps/studio/client/v2/timeline/keys.js +74 -0
- package/apps/studio/client/v2/timeline/lanes/caption-lane.jsx +149 -0
- package/apps/studio/client/v2/timeline/lanes/music-lane.jsx +294 -0
- package/apps/studio/client/v2/timeline/lanes/music-media.js +200 -0
- package/apps/studio/client/v2/timeline/lanes/music-model.js +190 -0
- package/apps/studio/client/v2/timeline/loop-handle.jsx +70 -0
- package/apps/studio/client/v2/timeline/marker-store.js +117 -0
- package/apps/studio/client/v2/timeline/markers.js +79 -0
- package/apps/studio/client/v2/timeline/marks.jsx +152 -0
- package/apps/studio/client/v2/timeline/music-hint.jsx +98 -0
- package/apps/studio/client/v2/timeline/other-takes-model.js +103 -0
- package/apps/studio/client/v2/timeline/other-takes-store.js +49 -0
- package/apps/studio/client/v2/timeline/other-takes.css +98 -0
- package/apps/studio/client/v2/timeline/other-takes.jsx +269 -0
- package/apps/studio/client/v2/timeline/peers.jsx +246 -0
- package/apps/studio/client/v2/timeline/playhead.js +97 -0
- package/apps/studio/client/v2/timeline/poster.js +109 -0
- package/apps/studio/client/v2/timeline/reframe-island.jsx +478 -0
- package/apps/studio/client/v2/timeline/reframe-model.js +135 -0
- package/apps/studio/client/v2/timeline/reframe.css +150 -0
- package/apps/studio/client/v2/timeline/ruler.js +61 -0
- package/apps/studio/client/v2/timeline/selection.js +110 -0
- package/apps/studio/client/v2/timeline/timeline-empty.jsx +108 -0
- package/apps/studio/client/v2/timeline/timeline-store.js +147 -0
- package/apps/studio/client/v2/timeline/timeline.css +2879 -0
- package/apps/studio/client/v2/timeline/together.css +85 -0
- package/apps/studio/client/v2/timeline/track-toggle.js +56 -0
- package/apps/studio/client/v2/timeline/tracks.js +68 -0
- package/apps/studio/client/v2/timeline/transport.js +66 -0
- package/apps/studio/client/v2/timeline/zoom.js +37 -0
- package/apps/studio/client/v2/transcript/TranscriptHost.jsx +162 -0
- package/apps/studio/client/v2/transcript/TranscriptPanel.jsx +358 -0
- package/apps/studio/client/v2/transcript/captions-api.js +297 -0
- package/apps/studio/client/v2/transcript/captions-file-flag.js +38 -0
- package/apps/studio/client/v2/transcript/comp-media-store.js +89 -0
- package/apps/studio/client/v2/transcript/transcript-model.js +240 -0
- package/apps/studio/client/v2/transcript/transcript.css +262 -0
- package/apps/studio/client/v2/undo/projection.js +291 -0
- package/apps/studio/client/v2/undo/undo-history.jsx +286 -0
- package/apps/studio/client/v2/undo/undo.css +81 -0
- package/apps/studio/client/v2/undo/use-undo-mode-lane.js +96 -0
- package/apps/studio/client/v2/undo/use-undo-projection.jsx +460 -0
- package/apps/studio/client/v2/undo/zoom-undo.jsx +79 -0
- package/apps/studio/client/whats-new-seen.js +40 -0
- package/apps/studio/client/whats-new.jsx +65 -62
- package/apps/studio/clip-ops.ts +38 -6
- package/apps/studio/cloud/config-path.ts +42 -0
- package/apps/studio/cloud/endpoints.ts +212 -50
- package/apps/studio/cloud/renew.ts +29 -16
- package/apps/studio/collab/ai-activity.ts +19 -0
- package/apps/studio/collab/awareness-bridge.ts +131 -4
- package/apps/studio/collab/git-lifecycle.ts +52 -20
- package/apps/studio/collab/holds.ts +69 -0
- package/apps/studio/collab/index.ts +25 -0
- package/apps/studio/collab/protocol.ts +64 -0
- package/apps/studio/collab/registry.ts +59 -6
- package/apps/studio/collab/room.ts +374 -16
- package/apps/studio/collab/timeline-awareness.ts +123 -0
- package/apps/studio/collab/timeline-presence.tsx +219 -0
- package/apps/studio/commands/move-artboards-command.ts +45 -4
- package/apps/studio/comments/anchors.ts +147 -0
- package/apps/studio/comments/author-face.ts +41 -0
- package/apps/studio/comments/from-line.ts +43 -0
- package/apps/studio/comments/imported-from.ts +113 -0
- package/apps/studio/comments/local-author.ts +41 -0
- package/apps/studio/comments/mentions.ts +115 -0
- package/apps/studio/comments/mine-stamp.ts +78 -0
- package/apps/studio/comments/ops.ts +293 -0
- package/apps/studio/comments/people.ts +66 -0
- package/apps/studio/comments/where.ts +136 -0
- package/apps/studio/comments-overlay.tsx +1220 -253
- package/apps/studio/config.schema.json +33 -0
- package/apps/studio/context-menu.tsx +126 -42
- package/apps/studio/context.ts +178 -13
- package/apps/studio/cursors-overlay.tsx +28 -11
- package/apps/studio/debug-bundle.ts +21 -5
- package/apps/studio/describe/batch.ts +414 -0
- package/apps/studio/describe/budget.ts +147 -0
- package/apps/studio/describe/claude.ts +273 -0
- package/apps/studio/describe/consent.ts +120 -0
- package/apps/studio/describe/validate.ts +192 -0
- package/apps/studio/design-setup-readiness.ts +2 -2
- package/apps/studio/diagnostics/store.ts +220 -0
- package/apps/studio/dist/client.bundle.js +2429 -2329
- package/apps/studio/dist/comment-mount.js +12 -9
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/dom-selection.ts +239 -23
- package/apps/studio/drag-bus.ts +211 -0
- package/apps/studio/draw/serialize-animate.ts +4 -4
- package/apps/studio/ds/board/board-specimen.css +199 -0
- package/apps/studio/ds/board/board.css +674 -0
- package/apps/studio/ds/board/brand-notes.ts +92 -0
- package/apps/studio/ds/board/build-model.ts +418 -0
- package/apps/studio/ds/board/component-states.ts +111 -0
- package/apps/studio/ds/board/directions-model.ts +145 -0
- package/apps/studio/ds/board/directions.css +169 -0
- package/apps/studio/ds/board/directions.tsx +100 -0
- package/apps/studio/ds/board/ds-bar.tsx +107 -0
- package/apps/studio/ds/board/index.tsx +71 -0
- package/apps/studio/ds/board/logo-paint.ts +118 -0
- package/apps/studio/ds/board/outline.tsx +127 -0
- package/apps/studio/ds/board/parts.tsx +160 -0
- package/apps/studio/ds/board/section-brand.tsx +148 -0
- package/apps/studio/ds/board/section-colour.tsx +160 -0
- package/apps/studio/ds/board/section-components.tsx +146 -0
- package/apps/studio/ds/board/section-motion.tsx +106 -0
- package/apps/studio/ds/board/section-patterns.tsx +89 -0
- package/apps/studio/ds/board/section-space.tsx +109 -0
- package/apps/studio/ds/board/section-type.tsx +129 -0
- package/apps/studio/ds/board/specimen.tsx +61 -0
- package/apps/studio/ds/board/state.ts +105 -0
- package/apps/studio/ds/board/template.ts +152 -0
- package/apps/studio/ds/board/types.ts +346 -0
- package/apps/studio/ds/canvas-check.ts +914 -0
- package/apps/studio/ds/canvas-cli.ts +346 -0
- package/apps/studio/ds/check-system-verb.ts +88 -0
- package/apps/studio/ds/check-system.ts +293 -0
- package/apps/studio/ds/check.ts +541 -0
- package/apps/studio/ds/cli.ts +348 -0
- package/apps/studio/ds/component-list.ts +150 -0
- package/apps/studio/ds/contrast.ts +438 -0
- package/apps/studio/ds/convert-map.ts +126 -0
- package/apps/studio/ds/convert.ts +603 -0
- package/apps/studio/ds/css-scan.ts +292 -0
- package/apps/studio/ds/default-components.tsx +377 -0
- package/apps/studio/ds/default.ts +58 -0
- package/apps/studio/ds/design-system.tsx.tpl +40 -0
- package/apps/studio/ds/ds-resolver.ts +205 -0
- package/apps/studio/ds/ds-verb.ts +563 -0
- package/apps/studio/ds/edges.ts +412 -0
- package/apps/studio/ds/emit.ts +217 -0
- package/apps/studio/ds/engine.ts +1652 -0
- package/apps/studio/ds/fallbacks.ts +116 -0
- package/apps/studio/ds/generate.ts +746 -0
- package/apps/studio/ds/head.ts +372 -0
- package/apps/studio/ds/instance-info.ts +90 -0
- package/apps/studio/ds/library.ts +1137 -0
- package/apps/studio/ds/make.ts +726 -0
- package/apps/studio/ds/migrate-emitter.ts +42 -0
- package/apps/studio/ds/nearest.ts +163 -0
- package/apps/studio/ds/outside.ts +343 -0
- package/apps/studio/ds/override-map.ts +213 -0
- package/apps/studio/ds/pairing-css.ts +145 -0
- package/apps/studio/ds/pin-scope.ts +268 -0
- package/apps/studio/ds/registry.ts +228 -0
- package/apps/studio/ds/rename.ts +104 -0
- package/apps/studio/ds/render-rev.ts +144 -0
- package/apps/studio/ds/revision.ts +268 -0
- package/apps/studio/ds/shell-fallbacks.ts +84 -0
- package/apps/studio/ds/switch.ts +426 -0
- package/apps/studio/ds/system-files.ts +251 -0
- package/apps/studio/ds/system.ts +312 -0
- package/apps/studio/ds/undo-hook.ts +46 -0
- package/apps/studio/ds/upgrade-apply.ts +258 -0
- package/apps/studio/ds/upgrade-cli.ts +216 -0
- package/apps/studio/ds/upgrade-codemod.ts +116 -0
- package/apps/studio/ds/upgrade-progress.ts +153 -0
- package/apps/studio/ds/upgrade-prove.ts +429 -0
- package/apps/studio/ds/upgrade-stage.ts +387 -0
- package/apps/studio/ds/upgrade.ts +394 -0
- package/apps/studio/ds/value-types.ts +190 -0
- package/apps/studio/edit-ops/align.ts +43 -0
- package/apps/studio/edit-ops/arrange.ts +93 -0
- package/apps/studio/edit-ops/artboard-facts.ts +70 -0
- package/apps/studio/edit-ops/artboard-resize.ts +50 -0
- package/apps/studio/edit-ops/artboard-trash.ts +77 -0
- package/apps/studio/edit-ops/clear-link.ts +16 -0
- package/apps/studio/edit-ops/clip/captions.ts +154 -0
- package/apps/studio/edit-ops/clip/comp.ts +124 -0
- package/apps/studio/edit-ops/clip/cut-source-range.ts +100 -0
- package/apps/studio/edit-ops/clip/cut-to-beat.ts +136 -0
- package/apps/studio/edit-ops/clip/duck.ts +123 -0
- package/apps/studio/edit-ops/clip/easing.ts +76 -0
- package/apps/studio/edit-ops/clip/formats.ts +163 -0
- package/apps/studio/edit-ops/clip/gestures.ts +161 -0
- package/apps/studio/edit-ops/clip/index.ts +543 -0
- package/apps/studio/edit-ops/clip/jsx.ts +251 -0
- package/apps/studio/edit-ops/clip/place.ts +127 -0
- package/apps/studio/edit-ops/clip/reframe.ts +194 -0
- package/apps/studio/edit-ops/clip/take-swap.ts +53 -0
- package/apps/studio/edit-ops/clip/title-motion.ts +103 -0
- package/apps/studio/edit-ops/clip/title-style.ts +177 -0
- package/apps/studio/edit-ops/clip/track.ts +102 -0
- package/apps/studio/edit-ops/clipboard.ts +482 -0
- package/apps/studio/edit-ops/combine.ts +264 -0
- package/apps/studio/edit-ops/constraints.ts +148 -0
- package/apps/studio/edit-ops/convert-kind.ts +203 -0
- package/apps/studio/edit-ops/corner-radius.ts +86 -0
- package/apps/studio/edit-ops/crop.ts +303 -0
- package/apps/studio/edit-ops/czech-ties.ts +84 -0
- package/apps/studio/edit-ops/detach-instance.ts +119 -0
- package/apps/studio/edit-ops/dispatch.ts +552 -0
- package/apps/studio/edit-ops/distribute.ts +31 -0
- package/apps/studio/edit-ops/ds-instance-update.ts +46 -0
- package/apps/studio/edit-ops/ds-use-nearest.ts +72 -0
- package/apps/studio/edit-ops/duplicate-at-width.ts +241 -0
- package/apps/studio/edit-ops/frame.ts +68 -0
- package/apps/studio/edit-ops/guides.ts +67 -0
- package/apps/studio/edit-ops/hide.ts +30 -0
- package/apps/studio/edit-ops/hover-rules.ts +94 -0
- package/apps/studio/edit-ops/image-fit.ts +571 -0
- package/apps/studio/edit-ops/insert-component.ts +344 -0
- package/apps/studio/edit-ops/insert-preset.ts +151 -0
- package/apps/studio/edit-ops/insert-shape.ts +326 -0
- package/apps/studio/edit-ops/instance-model.ts +286 -0
- package/apps/studio/edit-ops/instance-tree.ts +215 -0
- package/apps/studio/edit-ops/layout-patch.ts +81 -0
- package/apps/studio/edit-ops/lock.ts +30 -0
- package/apps/studio/edit-ops/op-label.ts +155 -0
- package/apps/studio/edit-ops/path-model.ts +671 -0
- package/apps/studio/edit-ops/path.ts +172 -0
- package/apps/studio/edit-ops/photo-every-use.ts +64 -0
- package/apps/studio/edit-ops/photo-use.ts +41 -0
- package/apps/studio/edit-ops/place-freely.ts +47 -0
- package/apps/studio/edit-ops/place-plan.ts +60 -0
- package/apps/studio/edit-ops/print.ts +104 -0
- package/apps/studio/edit-ops/references.ts +231 -0
- package/apps/studio/edit-ops/relink.ts +49 -0
- package/apps/studio/edit-ops/reorder.ts +104 -0
- package/apps/studio/edit-ops/reset-overrides.ts +75 -0
- package/apps/studio/edit-ops/revert.ts +63 -0
- package/apps/studio/edit-ops/rotate.ts +58 -0
- package/apps/studio/edit-ops/safe-zones.ts +38 -0
- package/apps/studio/edit-ops/scope-names.ts +151 -0
- package/apps/studio/edit-ops/select-matching.ts +48 -0
- package/apps/studio/edit-ops/set-gap.ts +65 -0
- package/apps/studio/edit-ops/set-id.ts +42 -0
- package/apps/studio/edit-ops/set-link.ts +39 -0
- package/apps/studio/edit-ops/siblings.ts +105 -0
- package/apps/studio/edit-ops/slot-defaults.ts +48 -0
- package/apps/studio/edit-ops/stamp.ts +27 -0
- package/apps/studio/edit-ops/swap-variant.ts +163 -0
- package/apps/studio/edit-ops/text-copy.ts +146 -0
- package/apps/studio/edit-ops/text-detach.ts +62 -0
- package/apps/studio/edit-ops/text-style-ops.ts +131 -0
- package/apps/studio/edit-ops/text-style.ts +141 -0
- package/apps/studio/edit-ops/tidy.ts +72 -0
- package/apps/studio/edit-ops/types.ts +229 -0
- package/apps/studio/edit-ops/unframe.ts +53 -0
- package/apps/studio/edit-ops/words-css.ts +487 -0
- package/apps/studio/edit-ops/words-paint.ts +521 -0
- package/apps/studio/edit-ops/z-order.ts +81 -0
- package/apps/studio/editing/ai-point-ring.tsx +158 -0
- package/apps/studio/editing/ai-scope-outline.tsx +180 -0
- package/apps/studio/editing/align-bar.tsx +510 -0
- package/apps/studio/editing/anchor-report.ts +123 -0
- package/apps/studio/editing/anchor-reporter.tsx +64 -0
- package/apps/studio/editing/aria-live.tsx +162 -0
- package/apps/studio/editing/arrange.ts +345 -0
- package/apps/studio/editing/artboard-actions.ts +275 -0
- package/apps/studio/editing/artboard-commands.tsx +232 -0
- package/apps/studio/editing/artboard-guides.tsx +265 -0
- package/apps/studio/editing/artboard-handles.tsx +524 -0
- package/apps/studio/editing/artboard-menu.tsx +153 -0
- package/apps/studio/editing/artboard-resize.ts +306 -0
- package/apps/studio/editing/ask-bubble.tsx +161 -0
- package/apps/studio/editing/asset-drag.ts +70 -0
- package/apps/studio/editing/click-to-type.ts +207 -0
- package/apps/studio/editing/clipboard-actions.ts +91 -0
- package/apps/studio/editing/clipboard.ts +194 -0
- package/apps/studio/editing/clipped-grab.ts +45 -0
- package/apps/studio/editing/corner-dots.tsx +394 -0
- package/apps/studio/editing/crop-geometry.ts +128 -0
- package/apps/studio/editing/crop-mode.tsx +522 -0
- package/apps/studio/editing/crumbs.ts +158 -0
- package/apps/studio/editing/draw-geometry.ts +151 -0
- package/apps/studio/editing/draw-tools.tsx +490 -0
- package/apps/studio/editing/drop-chip.tsx +105 -0
- package/apps/studio/editing/duplicate-rhythm.ts +166 -0
- package/apps/studio/editing/edit-chrome-gate.tsx +58 -0
- package/apps/studio/editing/edit-op.ts +90 -0
- package/apps/studio/editing/empty-report.ts +182 -0
- package/apps/studio/editing/empty-reporter.tsx +74 -0
- package/apps/studio/editing/figma-paste.ts +71 -0
- package/apps/studio/editing/finder-drop-model.ts +130 -0
- package/apps/studio/editing/finder-drop.tsx +400 -0
- package/apps/studio/editing/focus-model.tsx +429 -0
- package/apps/studio/editing/gap-bands.tsx +257 -0
- package/apps/studio/editing/hold-rings.tsx +461 -0
- package/apps/studio/editing/image-drop.tsx +193 -0
- package/apps/studio/editing/index.tsx +402 -0
- package/apps/studio/editing/instance-actions.ts +152 -0
- package/apps/studio/editing/kids-summary.ts +75 -0
- package/apps/studio/editing/kind-dim.tsx +54 -0
- package/apps/studio/editing/layout-actions.ts +159 -0
- package/apps/studio/editing/lock-badge.tsx +178 -0
- package/apps/studio/editing/long-page.ts +102 -0
- package/apps/studio/editing/minimap-context.tsx +161 -0
- package/apps/studio/editing/nudge.tsx +212 -0
- package/apps/studio/editing/object-actions.ts +156 -0
- package/apps/studio/editing/object-keys.ts +58 -0
- package/apps/studio/editing/object-menu.tsx +216 -0
- package/apps/studio/editing/object-ops.ts +114 -0
- package/apps/studio/editing/paste-bar.tsx +388 -0
- package/apps/studio/editing/pen/combine-run.ts +113 -0
- package/apps/studio/editing/pen/draw.tsx +364 -0
- package/apps/studio/editing/pen/index.tsx +48 -0
- package/apps/studio/editing/pen/overlay.tsx +147 -0
- package/apps/studio/editing/pen/pen-geometry.ts +234 -0
- package/apps/studio/editing/pen/point-store.ts +64 -0
- package/apps/studio/editing/pen/points.tsx +421 -0
- package/apps/studio/editing/place-freely.tsx +389 -0
- package/apps/studio/editing/place-ghost.tsx +418 -0
- package/apps/studio/editing/place-image.tsx +219 -0
- package/apps/studio/editing/preset-ruler.tsx +218 -0
- package/apps/studio/editing/rename-order.ts +58 -0
- package/apps/studio/editing/reorder-slot.tsx +567 -0
- package/apps/studio/editing/rotate-handle.tsx +353 -0
- package/apps/studio/editing/selection.tsx +319 -0
- package/apps/studio/editing/set-gap.ts +55 -0
- package/apps/studio/editing/size-ghost.tsx +343 -0
- package/apps/studio/editing/space-tap.ts +56 -0
- package/apps/studio/editing/sticky-name.tsx +112 -0
- package/apps/studio/editing/tab-order.tsx +298 -0
- package/apps/studio/editing/take-keys.ts +115 -0
- package/apps/studio/editing/text-actions.ts +214 -0
- package/apps/studio/editing/text-in-place.tsx +187 -0
- package/apps/studio/editing/tidy-preview.tsx +83 -0
- package/apps/studio/editing/token-ruler.tsx +231 -0
- package/apps/studio/editing/type-role.ts +122 -0
- package/apps/studio/editing/undo-preview.tsx +120 -0
- package/apps/studio/editing/video-label.ts +66 -0
- package/apps/studio/editing/video-play.ts +65 -0
- package/apps/studio/editing/world-menu.ts +36 -0
- package/apps/studio/element-ids.ts +1030 -0
- package/apps/studio/equal-spacing-handles.tsx +1 -1
- package/apps/studio/exporters/_runtime.ts +64 -24
- package/apps/studio/exporters/audio.ts +136 -0
- package/apps/studio/exporters/door-fingerprint.ts +202 -0
- package/apps/studio/exporters/estimate.ts +314 -0
- package/apps/studio/exporters/file-names.ts +197 -0
- package/apps/studio/exporters/format-scopes.ts +7 -1
- package/apps/studio/exporters/hub-render-door.ts +368 -0
- package/apps/studio/exporters/index.ts +53 -7
- package/apps/studio/exporters/jobs.ts +484 -80
- package/apps/studio/exporters/jpg.ts +21 -0
- package/apps/studio/exporters/pdf-fonts.ts +102 -0
- package/apps/studio/exporters/pdf.ts +133 -14
- package/apps/studio/exporters/png.ts +136 -9
- package/apps/studio/exporters/print-back.ts +92 -0
- package/apps/studio/exporters/print-preflight.ts +373 -0
- package/apps/studio/exporters/rects-runner.ts +130 -0
- package/apps/studio/exporters/remote.ts +726 -3
- package/apps/studio/exporters/render-seconds.ts +57 -0
- package/apps/studio/exporters/replay.ts +48 -0
- package/apps/studio/exporters/scope.ts +560 -15
- package/apps/studio/exporters/spec-run.ts +270 -0
- package/apps/studio/exporters/spec-v2.ts +408 -0
- package/apps/studio/exporters/video-cap.ts +280 -0
- package/apps/studio/exporters/wait-ai.ts +192 -0
- package/apps/studio/figma/client.ts +67 -0
- package/apps/studio/figma/comments-to-pins.ts +249 -0
- package/apps/studio/figma/comments-to-strokes.ts +6 -1
- package/apps/studio/figma/into-board.ts +141 -0
- package/apps/studio/figma/to-strokes.ts +54 -0
- package/apps/studio/format.ts +172 -30
- package/apps/studio/fs-watch.ts +28 -1
- package/apps/studio/generation/adapters/gemini.ts +3 -0
- package/apps/studio/generation/adapters/stub.ts +133 -0
- package/apps/studio/generation/gen-sidecar.ts +108 -0
- package/apps/studio/generation/registry.ts +16 -5
- package/apps/studio/generation/takes.ts +398 -0
- package/apps/studio/generation/types.ts +7 -0
- package/apps/studio/git/service.ts +143 -14
- package/apps/studio/github/endpoints.ts +1 -1
- package/apps/studio/github/identity-cache.ts +53 -14
- package/apps/studio/handoff/blockers.ts +120 -0
- package/apps/studio/handoff/run.ts +233 -0
- package/apps/studio/handoff/targets.ts +334 -0
- package/apps/studio/handoff/write-scopes.ts +57 -0
- package/apps/studio/handoff.ts +24 -5
- package/apps/studio/history/changes.ts +199 -0
- package/apps/studio/history/describe-annotations.ts +216 -0
- package/apps/studio/history/describe-css.ts +592 -0
- package/apps/studio/history/describe-match.ts +866 -0
- package/apps/studio/history/describe-meta.ts +281 -0
- package/apps/studio/history/describe-version.ts +89 -0
- package/apps/studio/history/describe-words.ts +513 -0
- package/apps/studio/history/describe.ts +1452 -0
- package/apps/studio/history/last-good.ts +123 -0
- package/apps/studio/history/links.ts +112 -0
- package/apps/studio/history/object-history.ts +535 -0
- package/apps/studio/history/render-ok-signal.ts +81 -0
- package/apps/studio/history/restore-artboard-action.ts +183 -0
- package/apps/studio/history/restore-artboard.ts +607 -0
- package/apps/studio/history/restore-object.ts +168 -0
- package/apps/studio/history/run-label.ts +18 -0
- package/apps/studio/history/surface-requests.ts +115 -0
- package/apps/studio/history/titles.ts +259 -0
- package/apps/studio/history/trash.ts +314 -0
- package/apps/studio/history/version-lanes.ts +115 -0
- package/apps/studio/history/versions.ts +458 -0
- package/apps/studio/hmr-broadcast.ts +55 -1
- package/apps/studio/home/ai.ts +79 -0
- package/apps/studio/home/cli.ts +221 -0
- package/apps/studio/home/cloud.ts +297 -0
- package/apps/studio/home/create-local.ts +164 -0
- package/apps/studio/home/github.ts +99 -0
- package/apps/studio/home/hub.ts +340 -0
- package/apps/studio/home/index-gc.ts +288 -0
- package/apps/studio/home/index-reader.ts +338 -0
- package/apps/studio/home/invite.ts +204 -0
- package/apps/studio/home/main.ts +159 -0
- package/apps/studio/home/pid.ts +12 -0
- package/apps/studio/home/routes.ts +591 -0
- package/apps/studio/home/signin.ts +285 -0
- package/apps/studio/home/user-state.ts +177 -0
- package/apps/studio/home/whats-new.ts +42 -0
- package/apps/studio/http.ts +2589 -947
- package/apps/studio/index/assets-response.ts +34 -0
- package/apps/studio/index/assets.ts +335 -0
- package/apps/studio/index/ds-usage.ts +983 -0
- package/apps/studio/index/extract.ts +348 -0
- package/apps/studio/index/extractors/asset-usage.ts +349 -0
- package/apps/studio/index/extractors/attribution-cache.ts +225 -0
- package/apps/studio/index/history-refs.ts +301 -0
- package/apps/studio/index/history-source.ts +39 -0
- package/apps/studio/index/match.ts +307 -0
- package/apps/studio/index/scan-kick.ts +47 -0
- package/apps/studio/index/service.ts +367 -0
- package/apps/studio/index/snapshot.ts +135 -0
- package/apps/studio/index/types.ts +139 -0
- package/apps/studio/index/version-feed.ts +71 -0
- package/apps/studio/input-router.tsx +522 -55
- package/apps/studio/inspect-canvas.ts +86 -0
- package/apps/studio/inspect-overlay.tsx +192 -0
- package/apps/studio/inspect.ts +96 -33
- package/apps/studio/kinds/convert.ts +175 -0
- package/apps/studio/kinds/export-defaults.ts +42 -0
- package/apps/studio/kinds/meta.ts +237 -0
- package/apps/studio/kinds/physical.ts +84 -0
- package/apps/studio/kinds/presets.ts +452 -0
- package/apps/studio/kinds/print-custom.ts +165 -0
- package/apps/studio/kinds/print-edit.ts +130 -0
- package/apps/studio/kinds/print-guides.ts +23 -0
- package/apps/studio/kinds/safe-zones.ts +250 -0
- package/apps/studio/kinds/warnings.ts +422 -0
- package/apps/studio/layer-name.ts +148 -0
- package/apps/studio/layout/free-space.ts +131 -0
- package/apps/studio/link-chip-overlay.tsx +175 -0
- package/apps/studio/link-import.ts +617 -0
- package/apps/studio/loopback-listen.ts +105 -0
- package/apps/studio/macro-guard.ts +67 -0
- package/apps/studio/managed-projects.ts +63 -14
- package/apps/studio/marquee-overlay.tsx +2 -2
- package/apps/studio/measure-overlay.tsx +10 -4
- package/apps/studio/migrate/cli.ts +164 -0
- package/apps/studio/migrate/ds-registry.ts +42 -0
- package/apps/studio/migrate/engine.ts +926 -0
- package/apps/studio/migrate/hub.ts +219 -0
- package/apps/studio/migrate/steps.ts +627 -0
- package/apps/studio/notifications.tsx +197 -52
- package/apps/studio/outbox/content.ts +139 -0
- package/apps/studio/outbox/drain.ts +269 -0
- package/apps/studio/outbox/hub-reachability.ts +58 -0
- package/apps/studio/outbox/index.ts +57 -0
- package/apps/studio/outbox/policy.ts +859 -0
- package/apps/studio/outbox/senders/export-cloud.ts +116 -0
- package/apps/studio/outbox/store.ts +336 -0
- package/apps/studio/outbox/types.ts +160 -0
- package/apps/studio/participants-chrome.tsx +178 -60
- package/apps/studio/paths.ts +8 -0
- package/apps/studio/photo-store.ts +230 -1
- package/apps/studio/port.ts +93 -0
- package/apps/studio/presence/canvas-presence.tsx +522 -0
- package/apps/studio/presence/fields.ts +93 -0
- package/apps/studio/presence/model.ts +296 -0
- package/apps/studio/presence/tones.ts +39 -0
- package/apps/studio/present/fit.ts +138 -0
- package/apps/studio/present/follow.ts +142 -0
- package/apps/studio/present/media-presence.ts +105 -0
- package/apps/studio/present/meta-schema.ts +612 -0
- package/apps/studio/present/order.ts +153 -0
- package/apps/studio/present/pointer-dot.tsx +379 -0
- package/apps/studio/present/pointer-point.ts +24 -0
- package/apps/studio/present/present-media.ts +446 -0
- package/apps/studio/present/present-stage.tsx +1018 -0
- package/apps/studio/present/present-zoom.ts +63 -0
- package/apps/studio/present/relay-strip.ts +136 -0
- package/apps/studio/preview/preview-camera.tsx +442 -0
- package/apps/studio/preview/wheel-scroll.ts +85 -0
- package/apps/studio/print/units.ts +3 -0
- package/apps/studio/print-overlay-content.tsx +127 -10
- package/apps/studio/read-only-mode.ts +83 -0
- package/apps/studio/readiness.ts +18 -3
- package/apps/studio/ripple.ts +19 -1
- package/apps/studio/routes/agent.ts +1025 -0
- package/apps/studio/routes/ai.ts +422 -0
- package/apps/studio/routes/annotations.ts +649 -0
- package/apps/studio/routes/asset-details.ts +87 -0
- package/apps/studio/routes/asset-rename.ts +60 -0
- package/apps/studio/routes/asset-state.ts +137 -0
- package/apps/studio/routes/asset-trash.ts +77 -0
- package/apps/studio/routes/assets.ts +217 -0
- package/apps/studio/routes/availability.ts +94 -0
- package/apps/studio/routes/canvas-meta-rider.ts +304 -0
- package/apps/studio/routes/canvas-origin.ts +88 -0
- package/apps/studio/routes/canvas-source.ts +315 -0
- package/apps/studio/routes/chat-attach.ts +335 -0
- package/apps/studio/routes/chat.ts +137 -0
- package/apps/studio/routes/cloud-move.ts +364 -0
- package/apps/studio/routes/cloud-plan.ts +36 -0
- package/apps/studio/routes/comments.ts +118 -0
- package/apps/studio/routes/connections.ts +132 -0
- package/apps/studio/routes/describe.ts +122 -0
- package/apps/studio/routes/diagnostics.ts +118 -0
- package/apps/studio/routes/ds-check.ts +124 -0
- package/apps/studio/routes/ds-convert.ts +55 -0
- package/apps/studio/routes/ds-edges.ts +136 -0
- package/apps/studio/routes/ds-library.ts +194 -0
- package/apps/studio/routes/ds-make.ts +91 -0
- package/apps/studio/routes/ds-switch.ts +68 -0
- package/apps/studio/routes/ds-upgrade.ts +139 -0
- package/apps/studio/routes/ds.ts +808 -0
- package/apps/studio/routes/edit.ts +658 -0
- package/apps/studio/routes/element-links.ts +155 -0
- package/apps/studio/routes/export.ts +486 -0
- package/apps/studio/routes/figma.ts +200 -0
- package/apps/studio/routes/generate.ts +443 -0
- package/apps/studio/routes/handoff.ts +319 -0
- package/apps/studio/routes/help-guides.ts +37 -0
- package/apps/studio/routes/history.ts +739 -0
- package/apps/studio/routes/import-link.ts +186 -0
- package/apps/studio/routes/index.ts +293 -0
- package/apps/studio/routes/kinds.ts +257 -0
- package/apps/studio/routes/links.ts +72 -0
- package/apps/studio/routes/outbox.ts +87 -0
- package/apps/studio/routes/photo-every-use.ts +241 -0
- package/apps/studio/routes/pins.ts +66 -0
- package/apps/studio/routes/present.ts +187 -0
- package/apps/studio/routes/project-format.ts +148 -0
- package/apps/studio/routes/project-undo.ts +497 -0
- package/apps/studio/routes/settings.ts +179 -0
- package/apps/studio/routes/share.ts +463 -0
- package/apps/studio/routes/shell.ts +137 -0
- package/apps/studio/routes/sync-conflicts.ts +150 -0
- package/apps/studio/routes/sync.ts +172 -0
- package/apps/studio/routes/table.ts +224 -0
- package/apps/studio/routes/trash.ts +393 -0
- package/apps/studio/routes/video.ts +395 -0
- package/apps/studio/routes/votes.ts +486 -0
- package/apps/studio/safe-zones-overlay.tsx +269 -0
- package/apps/studio/scaffold-design.ts +72 -124
- package/apps/studio/schema/annotations.v2.schema.json +2303 -0
- package/apps/studio/schema/beats.v1.schema.json +94 -0
- package/apps/studio/schema/canvas-meta.v2.schema.json +264 -0
- package/apps/studio/schema/canvas-tsx.md +357 -0
- package/apps/studio/schema/comments.v2.schema.json +125 -0
- package/apps/studio/schema/ds-components-v1.schema.json +96 -0
- package/apps/studio/schema/ds-formats.md +146 -0
- package/apps/studio/schema/ds-head-v1.schema.json +67 -0
- package/apps/studio/schema/ds-revision-v1.schema.json +31 -0
- package/apps/studio/schema/ds-schema-v1.fallbacks.css +118 -0
- package/apps/studio/schema/ds-schema-v1.json +2029 -0
- package/apps/studio/schema/ds-schema-v1.schema.json +663 -0
- package/apps/studio/schema/ds-tokens-v1.schema.json +210 -0
- package/apps/studio/schema/edl.v1.schema.json +124 -0
- package/apps/studio/schema/formats.ts +175 -0
- package/apps/studio/schema/gen.v1.schema.json +33 -0
- package/apps/studio/schema/transcript.v1.schema.json +133 -0
- package/apps/studio/server.ts +454 -166
- package/apps/studio/shell/info-file.ts +54 -0
- package/apps/studio/shell/parent-watch.ts +97 -0
- package/apps/studio/shell/profile.ts +61 -0
- package/apps/studio/shell-canvas-file.ts +36 -0
- package/apps/studio/skip-dirs.ts +455 -0
- package/apps/studio/spoof-chars.ts +17 -0
- package/apps/studio/static-lane.ts +212 -0
- package/apps/studio/sync/accepted-cold-start.ts +35 -13
- package/apps/studio/sync/accepted-link.ts +524 -27
- package/apps/studio/sync/access-notices.ts +143 -0
- package/apps/studio/sync/action-feed.ts +145 -0
- package/apps/studio/sync/action-stage.ts +831 -165
- package/apps/studio/sync/asset-push.ts +24 -2
- package/apps/studio/sync/asset-state.ts +391 -0
- package/apps/studio/sync/atomic-write.ts +42 -1
- package/apps/studio/sync/availability.ts +185 -0
- package/apps/studio/sync/canvas-path.ts +70 -6
- package/apps/studio/sync/cell-pairing.ts +5 -24
- package/apps/studio/sync/comment-door.ts +104 -0
- package/apps/studio/sync/conflict-record.ts +186 -0
- package/apps/studio/sync/create-collision.ts +297 -0
- package/apps/studio/sync/ctl-provider.ts +13 -1
- package/apps/studio/sync/file-membership.ts +95 -10
- package/apps/studio/sync/file-plane.ts +76 -7
- package/apps/studio/sync/format-sync.ts +13 -7
- package/apps/studio/sync/history-fields.ts +61 -0
- package/apps/studio/sync/hub-link.ts +24 -4
- package/apps/studio/sync/hub-text-undo.ts +178 -0
- package/apps/studio/sync/hubs-config.ts +122 -20
- package/apps/studio/sync/index.ts +1444 -127
- package/apps/studio/sync/journal-client.ts +44 -0
- package/apps/studio/sync/keep-both.ts +187 -0
- package/apps/studio/sync/link-consent.ts +390 -0
- package/apps/studio/sync/local-kernel.ts +2725 -0
- package/apps/studio/sync/media-gate.ts +97 -0
- package/apps/studio/sync/object-conflict.ts +199 -0
- package/apps/studio/sync/poke.ts +20 -0
- package/apps/studio/sync/presentation.ts +14 -1
- package/apps/studio/sync/project-config-push.ts +5 -2
- package/apps/studio/sync/projection.ts +201 -34
- package/apps/studio/sync/resync-trace.ts +220 -0
- package/apps/studio/sync/status.ts +8 -1
- package/apps/studio/sync/supervisor.ts +20 -2
- package/apps/studio/sync/transaction-client.ts +364 -34
- package/apps/studio/sync/trash-clear-copies.ts +120 -0
- package/apps/studio/sync/trash-watch.ts +157 -0
- package/apps/studio/sync/trash.ts +50 -2
- package/apps/studio/sync/undo-target.ts +110 -0
- package/apps/studio/sync/workspace-signin.ts +14 -3
- package/apps/studio/sync/write-hold.ts +238 -0
- package/apps/studio/sync/writer-registry.ts +380 -5
- package/apps/studio/sync-name-key.ts +59 -0
- package/apps/studio/thumbs/keys.ts +147 -0
- package/apps/studio/thumbs/routes.ts +68 -0
- package/apps/studio/thumbs/service.ts +884 -0
- package/apps/studio/thumbs/store.ts +114 -0
- package/apps/studio/thumbs/validate.ts +62 -0
- package/apps/studio/tool-palette.tsx +782 -563
- package/apps/studio/toolbars/marker-tip.ts +22 -0
- package/apps/studio/toolbars/shell-panels.ts +55 -0
- package/apps/studio/toolbars/tool-panel.ts +89 -0
- package/apps/studio/toolbars/toolbar-css.ts +283 -0
- package/apps/studio/toolbars/toolbar-icons.tsx +135 -0
- package/apps/studio/toolbars/toolbar-rect.ts +82 -0
- package/apps/studio/ui-prefs-migrate.ts +467 -0
- package/apps/studio/ui-prefs.ts +305 -3
- package/apps/studio/undo-stack.ts +10 -0
- package/apps/studio/use-annotation-resize.tsx +23 -17
- package/apps/studio/use-artboard-drag.tsx +156 -15
- package/apps/studio/use-canvas-keys.ts +58 -0
- package/apps/studio/use-chrome-visibility.tsx +13 -0
- package/apps/studio/use-collab.tsx +556 -56
- package/apps/studio/use-element-resize.tsx +13 -9
- package/apps/studio/use-governed-mode.ts +23 -0
- package/apps/studio/use-keyboard-discipline.tsx +114 -49
- package/apps/studio/use-selection-set.tsx +110 -9
- package/apps/studio/use-snap-guides.tsx +74 -5
- package/apps/studio/use-spacing-handles.tsx +90 -27
- package/apps/studio/use-tool-mode.tsx +204 -10
- package/apps/studio/use-undo-stack.tsx +19 -23
- package/apps/studio/video/beats.ts +484 -0
- package/apps/studio/video/decode-webaudio.ts +115 -0
- package/apps/studio/video/decode.ts +288 -0
- package/apps/studio/video/derive.ts +647 -0
- package/apps/studio/video/format-ids.ts +158 -0
- package/apps/studio/video/framing.ts +246 -0
- package/apps/studio/video/inject.ts +324 -0
- package/apps/studio/video/keyframes.ts +356 -0
- package/apps/studio/video/link-groups.ts +40 -0
- package/apps/studio/video/linked-formats.ts +142 -0
- package/apps/studio/video/mask-comments.ts +36 -0
- package/apps/studio/video/media-analysis.ts +169 -0
- package/apps/studio/video/reel-place.ts +286 -0
- package/apps/studio/video/reframe-read.ts +90 -0
- package/apps/studio/video/schema.ts +422 -0
- package/apps/studio/video/speech.ts +129 -0
- package/apps/studio/video/title-motion.ts +85 -0
- package/apps/studio/video/transcript-cut.ts +91 -0
- package/apps/studio/video/whisper-parse.ts +123 -0
- package/apps/studio/video/words-run.ts +210 -0
- package/apps/studio/video/words-timing.ts +222 -0
- package/apps/studio/video-comp.tsx +238 -9
- package/apps/studio/video-links-overlay.tsx +272 -0
- package/apps/studio/video-natural.ts +73 -0
- package/apps/studio/video-play-chrome.tsx +229 -0
- package/apps/studio/video-play-overlay.tsx +190 -0
- package/apps/studio/video-vocab.tsx +460 -0
- package/apps/studio/view-only-gesture.tsx +101 -0
- package/apps/studio/viewport-fit.ts +28 -0
- package/apps/studio/web-overlay-content.tsx +4 -2
- package/apps/studio/whats-new.json +55 -20
- package/apps/studio/whats-new.schema.json +10 -0
- package/apps/studio/whats-new.ts +4 -0
- package/apps/studio/workspace-mode.ts +10 -0
- package/apps/studio/ws.ts +299 -8
- package/cli/bin/maude.mjs +2 -0
- package/cli/commands/design.mjs +401 -72
- package/cli/commands/flow.mjs +73 -0
- package/cli/commands/help.mjs +14 -1
- package/cli/commands/init.mjs +1 -1
- package/cli/commands/migrate.mjs +55 -0
- package/cli/lib/bash-guard.mjs +1691 -0
- package/cli/lib/cache.mjs +1 -1
- package/cli/lib/confine-out.mjs +150 -0
- package/cli/lib/confine-read.mjs +179 -0
- package/cli/lib/confine-root.mjs +157 -0
- package/cli/lib/ddr-to-kgai.mjs +2 -2
- package/cli/lib/design-help.gen.mjs +119 -0
- package/cli/lib/design-hook.mjs +1764 -0
- package/cli/lib/design-link.mjs +68 -4
- package/cli/lib/design-open.mjs +238 -0
- package/cli/lib/export-spec.mjs +394 -0
- package/cli/lib/finding-text.mjs +63 -0
- package/cli/lib/flow-usage.mjs +133 -0
- package/cli/lib/gitignore-block.mjs +1 -0
- package/cli/lib/handoff.mjs +285 -0
- package/cli/lib/handoff.schema.json +336 -0
- package/cli/lib/hubs-config.mjs +10 -0
- package/cli/lib/json-schema-lite.mjs +260 -0
- package/cli/lib/project-links.mjs +88 -0
- package/cli/lib/studio-locate.mjs +83 -0
- package/cli/lib/sub-verbs.mjs +111 -0
- package/cli/lib/workspace-plan.mjs +16 -3
- package/package.json +30 -11
- package/plugins/design/README.md +46 -0
- package/plugins/design/templates/_shell.html +749 -69
- package/plugins/design/templates/blank-canvas.tsx.template +26 -0
- package/plugins/design/templates/brief-board.tsx.template +12 -11
- package/plugins/design/templates/canvas.tsx.template +3 -3
- package/plugins/design/templates/design-system-inspiration/core/README.philosophy.md.tpl +104 -0
- package/plugins/design/templates/design-system-inspiration/core/colors_and_type.css.tpl +38 -3
- package/plugins/design/templates/design-system-inspiration/core/components.json.tpl +127 -0
- package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +1 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/_components.css.tpl +111 -0
- package/plugins/flow/.claude-plugin/config.schema.json +170 -9
- package/plugins/flow/README.md +18 -17
- package/plugins/flow/dependencies.json +25 -26
- package/plugins/flow/templates/ai-skeleton/INDEX.md +3 -3
- package/plugins/flow/templates/ai-skeleton/README.md +5 -5
- package/plugins/flow/templates/ai-skeleton/context/README.md +1 -1
- package/plugins/flow/templates/ai-skeleton/logs/README.md +1 -1
- package/plugins/flow/templates/ai-skeleton/plans/README.md +1 -1
- package/plugins/flow/templates/ai-skeleton/reviews/README.md +2 -2
- package/plugins/flow/templates/ai-skeleton/scenario-guide.md +4 -4
- package/plugins/flow/templates/ai-skeleton/scenarios/README.md +2 -2
- package/plugins/flow/templates/ai-skeleton/templates/HANDOFF.md +1 -1
- package/apps/studio/annotations/ui/edit-actions.ts +0 -551
- package/apps/studio/canvas-header.ts +0 -165
- package/apps/studio/client/hmr.mjs +0 -113
- package/apps/studio/client/hooks/use-keyboard-shortcuts.jsx +0 -297
- package/apps/studio/client/iframe-lazy.mjs +0 -121
- package/apps/studio/client/inspector/artboard-knobs.jsx +0 -456
- package/apps/studio/client/menus/menubar.jsx +0 -856
- package/apps/studio/client/panels/CapabilityBar.jsx +0 -101
- package/apps/studio/client/panels/ClipInspector.jsx +0 -409
- package/apps/studio/client/panels/GitPanel.jsx +0 -1026
- package/apps/studio/client/panels/OnboardingWizard.jsx +0 -642
- package/apps/studio/client/panels/StickerPicker.jsx +0 -160
- package/apps/studio/client/panels/SyncPanel.jsx +0 -1190
- package/apps/studio/client/panels/TimelinePanel.jsx +0 -2259
- package/apps/studio/client/share-dialog.jsx +0 -91
- package/apps/studio/client/shell/collapsed-rail.jsx +0 -23
- package/apps/studio/client/shell/status-bar.jsx +0 -215
- package/apps/studio/client/styles/1-tokens-maude.css +0 -296
- package/apps/studio/client/styles/1-tokens.css +0 -304
- package/apps/studio/client/styles/3-shell-maude.css +0 -3158
- package/apps/studio/client/styles/3-shell.css +0 -1036
- package/apps/studio/client/styles/4-components-maude.css +0 -134
- package/apps/studio/client/styles/4-components.css +0 -2204
- package/apps/studio/client/styles/5-maude-overrides.css +0 -162
- package/apps/studio/client/styles.css +0 -1264
- package/apps/studio/contextual-toolbar.tsx +0 -512
- package/apps/studio/export-dialog.tsx +0 -827
- package/apps/studio/undo-hud.tsx +0 -16
|
@@ -0,0 +1,2671 @@
|
|
|
1
|
+
// apps/studio/bridge/dgn-protocol.ts — the ONE typed shell↔canvas `dgn` message table (V2-1.2 §5.2).
|
|
2
|
+
//
|
|
3
|
+
// Both documents import it: the shell (`client/hooks/*` via `../../bridge/dgn-protocol.ts`) and the
|
|
4
|
+
// canvas runtime (`canvas-shell.tsx`, `canvas-comment-mount.tsx`, … via `./bridge/…`; bundled into
|
|
5
|
+
// the canvas-lib runtime and comment-mount). Leaf module: no React, no DOM beyond the
|
|
6
|
+
// `MessageEvent` / `Window` types; type-only imports only (erased).
|
|
7
|
+
//
|
|
8
|
+
// Per message: direction (`c2s` / `s2c`), `gate` (who may send it — enforced today), `target` (the
|
|
9
|
+
// gate the §5.2 arrow tightens it to in V2-2.10c, when different), `status`, the `owner` of its
|
|
10
|
+
// semantics, and `parse` (strips unknown keys; strings ≤ 4 000, arrays ≤ 10 000; junk → null).
|
|
11
|
+
//
|
|
12
|
+
// Drift gate: test/dgn-protocol-coverage.test.ts runs scripts/v2-dgn/dgn-inventory.mjs over the
|
|
13
|
+
// sources — every `dgn` literal must be a row here, with the direction the code uses, and every
|
|
14
|
+
// live row must still have its sender and handler. Adding a literal outside this table fails it.
|
|
15
|
+
//
|
|
16
|
+
// Gate vocabulary. Shell side (after `e.origin === canvasOrigin`): `active` — `e.source` is the
|
|
17
|
+
// active canvas window (never `null === null`); `asked` — the frame the shell asked (by `id`);
|
|
18
|
+
// `frame` — any iframe the shell owns; `any` — any canvas-origin window. Canvas side: `parent` —
|
|
19
|
+
// `e.source === window.parent`; `parent|self` — also the canvas document posting to itself; `any`.
|
|
20
|
+
|
|
21
|
+
import type { ApplyEditMessage } from '../client/apply-edit-request.ts';
|
|
22
|
+
import type { AiActivityEntry } from '../collab/ai-activity.ts';
|
|
23
|
+
import type { EditOpCode, ElementRef } from '../edit-ops/types.ts';
|
|
24
|
+
import type { PhotoEdit } from '../photo/schema.ts';
|
|
25
|
+
import type { Selection } from '../use-selection-set.tsx';
|
|
26
|
+
import {
|
|
27
|
+
CANVAS_MODES,
|
|
28
|
+
type CanvasModeV2,
|
|
29
|
+
type ModeCaps,
|
|
30
|
+
PRESENT_KINDS,
|
|
31
|
+
type PresentSpec,
|
|
32
|
+
TOOL_IDS,
|
|
33
|
+
type ToolId,
|
|
34
|
+
} from './canvas-modes.ts';
|
|
35
|
+
import { clampInsets, type Insets } from './occlusion.ts';
|
|
36
|
+
import { parsePasteData } from './paste-data.ts';
|
|
37
|
+
|
|
38
|
+
export const DGN_V = 2;
|
|
39
|
+
type Id = string;
|
|
40
|
+
type Rect = { x: number; y: number; w: number; h: number };
|
|
41
|
+
/** S4.8 — what the annotation tools remember per person (annotations/ui/tool-prefs.ts is the palette gate). */
|
|
42
|
+
export type AnnotationPrefsPayload = {
|
|
43
|
+
stickyColor?: string;
|
|
44
|
+
ink?: string;
|
|
45
|
+
thickness?: 3 | 6;
|
|
46
|
+
tip?: 'pen' | 'highlighter' | 'eraser';
|
|
47
|
+
highlighterColor?: string;
|
|
48
|
+
highlighterWidth?: number;
|
|
49
|
+
};
|
|
50
|
+
/** S2.19 — what the prompt may say of a selected element: locators only, never its markup (DDR-054). */
|
|
51
|
+
export type AskLocator = {
|
|
52
|
+
id?: string;
|
|
53
|
+
tag?: string;
|
|
54
|
+
text?: string;
|
|
55
|
+
selector?: string;
|
|
56
|
+
index?: number;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// Payload shapes still private to their modules (names fixed by the contract). Opaque here; each is
|
|
60
|
+
// lifted beside its builder when its listener is routed through the accept helpers (V2-2.10b).
|
|
61
|
+
/** S2.1 — one rung of the selection's breadcrumb (S2-edit-ops.md §7). */
|
|
62
|
+
export type SelectionCrumb = { label: string; ref: ElementRef | null };
|
|
63
|
+
export const SELECTION_KINDS = [
|
|
64
|
+
'frame',
|
|
65
|
+
'text',
|
|
66
|
+
'image',
|
|
67
|
+
'path',
|
|
68
|
+
'shape',
|
|
69
|
+
'instance',
|
|
70
|
+
'artboard',
|
|
71
|
+
'multi',
|
|
72
|
+
] as const;
|
|
73
|
+
export type SelectionKind = (typeof SELECTION_KINDS)[number];
|
|
74
|
+
|
|
75
|
+
export type InsertAnchor = {
|
|
76
|
+
refId?: string;
|
|
77
|
+
refIndex?: number;
|
|
78
|
+
artboardId?: string | null;
|
|
79
|
+
position?: string;
|
|
80
|
+
};
|
|
81
|
+
export type ConvertToAbsoluteRequest = {
|
|
82
|
+
artboardId?: string;
|
|
83
|
+
allowShared?: boolean;
|
|
84
|
+
containers?: unknown[];
|
|
85
|
+
dissolve?: unknown[];
|
|
86
|
+
containerId?: string;
|
|
87
|
+
children?: unknown[];
|
|
88
|
+
containerSetRelative?: boolean;
|
|
89
|
+
};
|
|
90
|
+
export type LayerNode = Record<string, unknown>;
|
|
91
|
+
export type CommentThread = Record<string, unknown>;
|
|
92
|
+
export type CommentDraft = Record<string, unknown>;
|
|
93
|
+
export type CommentPatch = Record<string, unknown>;
|
|
94
|
+
export type CapturedItem = Record<string, unknown>;
|
|
95
|
+
export type ExportPayload = Record<string, unknown>;
|
|
96
|
+
export type ExportResult = { ok: boolean; browser?: boolean; jobId?: string; error?: string };
|
|
97
|
+
export type ExportHistoryEntry = Record<string, unknown>;
|
|
98
|
+
export type OpenExportDetail = Record<string, unknown>;
|
|
99
|
+
export type TimelineComp = Record<string, unknown>;
|
|
100
|
+
export type RecordEditPayload = Record<string, unknown>;
|
|
101
|
+
export type GitLifecycleEvent = Record<string, unknown>;
|
|
102
|
+
/** S9.22 — the overlay's request id (`cm<n>`), echoed back so it can match the answer. */
|
|
103
|
+
export type ReqId = string | number;
|
|
104
|
+
/** S9.22 — one comment op as the overlay asks it; `op` is one of COMMENT_OPS, the rest the door's. */
|
|
105
|
+
export type CommentOpRequest = { op: string } & Record<string, unknown>;
|
|
106
|
+
/** S9.22 — a mention row as the popover shows it (comments/people.ts `MentionRow`). */
|
|
107
|
+
export type MentionPerson = { id: string; name: string; role?: string };
|
|
108
|
+
type Empty = Record<string, never>;
|
|
109
|
+
|
|
110
|
+
/** canvas → shell (posted to window.parent) */
|
|
111
|
+
export interface CanvasToShell {
|
|
112
|
+
// lifecycle
|
|
113
|
+
loaded: { file: string };
|
|
114
|
+
'canvas-rendered': { file: string };
|
|
115
|
+
'canvas-failed': { file: string };
|
|
116
|
+
'canvas-mounted': { file: string; children: number };
|
|
117
|
+
// S6.12 (C5) — the canvas could not draw / drew without an error. `message` is plain text (≤ 300). The
|
|
118
|
+
// shell never trusts `file`: it names the frame the message came from (DDR-054).
|
|
119
|
+
'render-error': { file: string; message: string };
|
|
120
|
+
'render-ok': { file: string };
|
|
121
|
+
// S10.4 (V2-1.6 §5.8) — the `data-ds-rev` values (`head` | a revision id) the canvas document carries;
|
|
122
|
+
// the studio answers with `ds-pins`. A value is a name, never a path.
|
|
123
|
+
'ds-pins-want': { revs: string[] };
|
|
124
|
+
// S10.8 — "Review…" on the Design system canvas's bar: the person asks for "Update N canvases". The canvas
|
|
125
|
+
// only asks; the shell opens the sheet (client/v2/ds/review-host.jsx), for the canvas on screen.
|
|
126
|
+
'ds-review': Empty;
|
|
127
|
+
// S10.9 (13 · ds-edit-reach) — the answer to a `ds-rects` ask: where each asked element sits, in THIS frame's own
|
|
128
|
+
// pixels (getBoundingClientRect), and the frame's size. The reach view rings them. `label` is the artboard's own
|
|
129
|
+
// name as text (untrusted; rendered as text only).
|
|
130
|
+
'ds-rects-result': {
|
|
131
|
+
seq: number;
|
|
132
|
+
view: { w: number; h: number };
|
|
133
|
+
label?: string;
|
|
134
|
+
rects: Array<{ id: string; x: number; y: number; w: number; h: number }>;
|
|
135
|
+
};
|
|
136
|
+
'canvas-expired': Empty;
|
|
137
|
+
// S4.9 — the annotation board of `file` changed (a local write, a peer's, an undo): the shell's
|
|
138
|
+
// Preview annotation list (client/v2/annotations/annotation-list.jsx) re-reads it.
|
|
139
|
+
'annotations-changed': { file: string };
|
|
140
|
+
// S4.12 (S4-S9 §3.3) — Turn into a comment: the canvas names the sticky; the SHELL calls
|
|
141
|
+
// POST /_api/annotations/to-comment with the active canvas as `file` (the canvas is untrusted, DDR-054).
|
|
142
|
+
'annotation-to-comment': { id: string };
|
|
143
|
+
// S4.12 (S4-S5 §1) — what is selected on the annotation layer: ids, a count per type and the artboards
|
|
144
|
+
// they ride with — never their words. `ids: []` clears. The AI chat's scope chip reads it (S4.15).
|
|
145
|
+
'annotation-selection': { ids: string[]; kinds: Record<string, number>; artboards: string[] };
|
|
146
|
+
// S4.12 — a toast the shell owns, because a canvas notice cannot carry an Undo button
|
|
147
|
+
// (decision v2-S4.9-shell-owns-hidden-toast): "6 stickies moved to the trash" + Undo.
|
|
148
|
+
'annotation-toast': { v: 1; message: string; undo: boolean };
|
|
149
|
+
// S4.12 — ⌘/ (or Ask AI about it) with annotations selected: open the AI chat with that scope.
|
|
150
|
+
'annotation-ask-ai': { v: 1 };
|
|
151
|
+
/** p8-dead-reasons — "Version history of this object" from the object / sticky menu: one element or one annotation. */
|
|
152
|
+
'object-history': { artboard?: string; element?: string; annotation?: string };
|
|
153
|
+
// S9.21b (10 co-ask-edit) — a read-only canvas saw a drag on the design go nowhere; the shell shows its own
|
|
154
|
+
// "You can look at …, not change it." tip. No text, no element (DDR-054). Round 7: `x`/`y` — the pointer's
|
|
155
|
+
// position inside the canvas frame (whole CSS px, 0–16384; numbers only) — so the tip sits beside the pointer
|
|
156
|
+
// like the board's callout. Both optional: an older frame posts the bare message and the tip stays under the cluster.
|
|
157
|
+
'view-only-gesture': { v: 1; x?: number; y?: number };
|
|
158
|
+
// S4.14 (S4-S9 §2.6) — a formal vote. The canvas holds no vote: it names an artboard for one dot more or
|
|
159
|
+
// less (`remove`), and the SHELL posts the ballot to /_api/votes/ballot as the session.
|
|
160
|
+
'vote-cast': { artboard: string; remove?: boolean };
|
|
161
|
+
// S4.14 — the canvas's artboards (names + world rects; untrusted, text only) for the Start a vote sheet
|
|
162
|
+
// and the result section's place. `open` = "Start a vote…" (⌘K / the artboard's right-click, `focus`).
|
|
163
|
+
'vote-board': {
|
|
164
|
+
artboards: Array<{ id: string; label: string; x: number; y: number; w: number; h: number }>;
|
|
165
|
+
open?: boolean;
|
|
166
|
+
focus?: string;
|
|
167
|
+
};
|
|
168
|
+
// S4.18 (an-visibility) — ⇧P pressed inside the canvas hid or showed the layer: the shell keeps the pref
|
|
169
|
+
// and shows "Annotations hidden. Press ⇧P to bring them back." + Show (it owns that toast).
|
|
170
|
+
'annotations-visibility': { v: 1; visible: boolean };
|
|
171
|
+
'canvas-notice': {
|
|
172
|
+
message: string;
|
|
173
|
+
kind: 'info' | 'success' | 'error' | 'warning' | 'undo';
|
|
174
|
+
};
|
|
175
|
+
'embed-escape': Empty;
|
|
176
|
+
// selection + inline edit
|
|
177
|
+
'select-set': {
|
|
178
|
+
selection: Selection | Selection[] | null;
|
|
179
|
+
/** S2.1 (S2-edit-ops.md §7) — the selection as refs; computed ids stay transient */
|
|
180
|
+
refs?: ElementRef[];
|
|
181
|
+
/** artboard › … › selected, outermost first; `ref: null` = the artboard */
|
|
182
|
+
crumbs?: SelectionCrumb[];
|
|
183
|
+
kind?: SelectionKind;
|
|
184
|
+
};
|
|
185
|
+
'edit-text': { id: Id; file: string; text: string; occurrence?: number; before?: string };
|
|
186
|
+
'apply-edit': ApplyEditMessage & { requestId: string };
|
|
187
|
+
'undo-barrier': { requestId: string };
|
|
188
|
+
/** S2.20b — ⌘Z (`redo: false`) / ⇧⌘Z pressed in an op-log canvas: the shell's projection runs it */
|
|
189
|
+
'undo-key': { redo: boolean };
|
|
190
|
+
/** S8.16 — ← / → pressed in the canvas on a selected picture with other takes: the shell steps the take
|
|
191
|
+
* (`image.next-take` / `image.prev-take`, judged by the shell's own selection + role) */
|
|
192
|
+
'take-step': { dir: 'next' | 'prev' };
|
|
193
|
+
/** S2.1 — one structural edit; the shell pins `file` to the active canvas (S2-edit-ops.md §6) */
|
|
194
|
+
'edit-op': {
|
|
195
|
+
requestId: string;
|
|
196
|
+
op: string;
|
|
197
|
+
targets: ElementRef[];
|
|
198
|
+
params?: Record<string, unknown>;
|
|
199
|
+
expectRev?: string;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* r3 — an Assets tile dropped on the canvas: what lies under the point the shell asked about (`asset-drop-at`).
|
|
203
|
+
* WebKit hands no drag event of a shell-started drag to the canvas origin, so the SHELL catches the drop and
|
|
204
|
+
* asks; the canvas names only the target (never the asset — the shell holds the path it started dragging).
|
|
205
|
+
* `target: null` = nothing to place on (off every artboard, locked, read-only).
|
|
206
|
+
*/
|
|
207
|
+
'asset-drop-target': { requestId: string; target: AssetDropTarget | null };
|
|
208
|
+
'active-artboard': { id: Id | null };
|
|
209
|
+
/**
|
|
210
|
+
* S2.11b — the slot a lifted card would land in, for Layers to draw the same numbered place
|
|
211
|
+
* (ed-lay-reorder). `index` is 1-based among `total` siblings of the frame `parentId`; `index: 0`
|
|
212
|
+
* = the drag ended (no slot). A frame with no `data-cd-id` has no `parentId` and Layers draws none.
|
|
213
|
+
*/
|
|
214
|
+
'reorder-slot': { index: number; total: number; parentId?: Id };
|
|
215
|
+
'layers-tree': { artboardId: Id | null; tree: LayerNode[] };
|
|
216
|
+
'open-inspector': { tab?: string };
|
|
217
|
+
'copy-style': Empty;
|
|
218
|
+
'paste-style': { id: Id };
|
|
219
|
+
// structural write requests (the shell writes; main-origin routes only, DDR-054)
|
|
220
|
+
'insert-request': InsertAnchor & { kind: 'div' | 'text' | 'image'; src?: string };
|
|
221
|
+
'insert-image-request': InsertAnchor;
|
|
222
|
+
'delete-request': { id: Id; idIndex?: number };
|
|
223
|
+
'duplicate-request': { id: Id; idIndex?: number };
|
|
224
|
+
'reorder-request': {
|
|
225
|
+
id: Id;
|
|
226
|
+
refId: Id;
|
|
227
|
+
position: string;
|
|
228
|
+
idIndex?: number;
|
|
229
|
+
refIndex?: number;
|
|
230
|
+
};
|
|
231
|
+
'reorder-revert': { seq: number; dir: 'undo' | 'redo' };
|
|
232
|
+
'reposition-request': {
|
|
233
|
+
id: Id;
|
|
234
|
+
left: string;
|
|
235
|
+
top: string;
|
|
236
|
+
beforeLeft?: string;
|
|
237
|
+
beforeTop?: string;
|
|
238
|
+
idIndex?: number;
|
|
239
|
+
};
|
|
240
|
+
'resize-request': {
|
|
241
|
+
id: Id;
|
|
242
|
+
patch: Record<string, string>;
|
|
243
|
+
before?: Record<string, string>;
|
|
244
|
+
idIndex?: number;
|
|
245
|
+
};
|
|
246
|
+
'replace-media-request': { id: Id; before?: string };
|
|
247
|
+
'convert-to-absolute-request': ConvertToAbsoluteRequest;
|
|
248
|
+
'delete-artboard-request': { artboardId: Id };
|
|
249
|
+
'duplicate-artboard-request': { artboardId: Id; width?: number };
|
|
250
|
+
'rename-artboard-request': { artboardId: Id; label: string };
|
|
251
|
+
'resize-artboard-request': { artboardId: Id; width: number; height: number };
|
|
252
|
+
'set-artboard-kind-request': { artboardId: Id; kind: string | null };
|
|
253
|
+
'open-timeline-request': { artboardId: Id };
|
|
254
|
+
// annotations / media
|
|
255
|
+
'replace-annotation-media-request': { id: Id; before?: string };
|
|
256
|
+
'edit-annotation-photo-request': { id: Id; asset: string };
|
|
257
|
+
// (`open-sticker-picker` retired in V2-4.5c: the Stickers slot posts `tool-panel-open {panel:'stickers'}`)
|
|
258
|
+
// comments
|
|
259
|
+
'comment-compose': { selection: Selection };
|
|
260
|
+
'comment-submit': { payload: CommentDraft };
|
|
261
|
+
'comment-patch': { id: Id; patch: CommentPatch };
|
|
262
|
+
'comment-delete': { id: Id };
|
|
263
|
+
'comment-click': { id: Id };
|
|
264
|
+
// S9.22 — the overlay asks the shell to run a comment op through `POST /_api/comments/op` (the op
|
|
265
|
+
// is the door's to judge, comments/ops.ts) and for the mention people; the shell answers the asker.
|
|
266
|
+
'comment-op': { reqId: ReqId; op: CommentOpRequest };
|
|
267
|
+
'comment-people-request': { reqId: ReqId };
|
|
268
|
+
// export
|
|
269
|
+
'export-request': { id: Id; payload: ExportPayload };
|
|
270
|
+
'export-history-request': { id: Id };
|
|
271
|
+
'open-export': { detail: OpenExportDetail };
|
|
272
|
+
'export-capture-progress': { id: Id; current: number; total: number };
|
|
273
|
+
'export-capture-done': { id: Id; items: CapturedItem[] };
|
|
274
|
+
'export-capture-error': { id: Id; message: string };
|
|
275
|
+
'export-selection': { id: Id; selectors: string[] };
|
|
276
|
+
// timeline
|
|
277
|
+
'timeline-comps': { comps: TimelineComp[] };
|
|
278
|
+
'timeline-frame': { id?: Id; frame: number };
|
|
279
|
+
'timeline-ended': { id?: Id };
|
|
280
|
+
/** S7.8 — the Player started / stopped (its own play and pause events): the shell's transport follows the truth. */
|
|
281
|
+
'timeline-playing': { id?: Id; playing: boolean };
|
|
282
|
+
// keys forwarded from the iframe (V2-1.3 / V2-2.4 — supersedes toggle-palette / shell-shortcut)
|
|
283
|
+
key: { v: 1; chord: string; hint?: { artboardId?: Id } };
|
|
284
|
+
// mode / tools
|
|
285
|
+
'tool-cursor': { tool: ToolId };
|
|
286
|
+
// (`present-enter` retired in V2-4.3b: Present lives in the Share cluster, shell-local)
|
|
287
|
+
// V2-4.3b — who else is on the active canvas, from its Yjs awareness, for the Share cluster's faces.
|
|
288
|
+
// Untrusted text: ≤ PEERS_MAX peers, names ≤ PEER_NAME_MAX, rendered as text only.
|
|
289
|
+
// S9.23 — where each person is (the face menu, the people list): all optional, all checked by value.
|
|
290
|
+
peers: {
|
|
291
|
+
peers: Array<{
|
|
292
|
+
clientID: number;
|
|
293
|
+
name: string;
|
|
294
|
+
color?: string;
|
|
295
|
+
following?: boolean;
|
|
296
|
+
artboard?: string;
|
|
297
|
+
idleSince?: number;
|
|
298
|
+
surface?: 'browser';
|
|
299
|
+
inComments?: boolean;
|
|
300
|
+
role?: PeerRole;
|
|
301
|
+
}>;
|
|
302
|
+
};
|
|
303
|
+
// S2.18 (A10, V2-1.15 §5.8) — the single selection's holds, for the inspector's view mode: a person
|
|
304
|
+
// holding it (their name), and an AI run holding it (`held`) or another object of its artboard.
|
|
305
|
+
// Untrusted text, rendered as text only; ≤ HOLD_LABEL_MAX.
|
|
306
|
+
'hold-view': {
|
|
307
|
+
person: { name: string } | null;
|
|
308
|
+
label: string;
|
|
309
|
+
ai: { label: string; held: boolean; mine: boolean } | null;
|
|
310
|
+
};
|
|
311
|
+
// legacy, no in-tree sender (accepted today; removal needs a characterization proof)
|
|
312
|
+
select: { selection: Selection };
|
|
313
|
+
'clear-select': Empty;
|
|
314
|
+
artboards: { count: number };
|
|
315
|
+
/** S11.2 — the ONE selected artboard has nothing on it (the shell draws the hint at `rect`, iframe viewport px);
|
|
316
|
+
* `rect: null` = it is not empty now / something else is selected. `label` / `from` are untrusted text. */
|
|
317
|
+
'artboard-empty': {
|
|
318
|
+
artboardId: Id | null;
|
|
319
|
+
rect: Rect | null;
|
|
320
|
+
label?: string;
|
|
321
|
+
from?: string;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* S7.7 — the ONE selected whole artboard, for the timeline island: which (`artboardId`), what kind (`video` ⇒ the
|
|
325
|
+
* island rises from it), its name and where it is (`rect`, iframe viewport px; re-sent while a video is selected so
|
|
326
|
+
* the island follows pan and zoom). `{ artboardId: null }` = no whole artboard is selected now. `label` is untrusted.
|
|
327
|
+
*/
|
|
328
|
+
'artboard-anchor': { artboardId: Id | null; kind?: string; label?: string; rect?: Rect | null };
|
|
329
|
+
/**
|
|
330
|
+
* P8 c6 (14 ed-ab-resize) — while an artboard EDGE is being dragged the canvas says the size the drag asks for, so the
|
|
331
|
+
* inspector's Preset / Size rows follow the pointer ("Laptop · 1280" the moment the width clicks onto it). `id: null`
|
|
332
|
+
* (or the drag ending) = back to the real size. World px; `preset` is the snap's name. Untrusted numbers, clamped.
|
|
333
|
+
*/
|
|
334
|
+
'artboard-live-size': { id: Id | null; w?: number; h?: number; preset?: string | null };
|
|
335
|
+
/**
|
|
336
|
+
* S7.8 — Space went down and up inside 200 ms with no drag between: a TAP, not the Hand. The shell plays / pauses
|
|
337
|
+
* the video the timeline follows (07 · ve-play). Carries nothing; a hold or a pan sends nothing at all.
|
|
338
|
+
*/
|
|
339
|
+
'space-tap': Empty;
|
|
340
|
+
/**
|
|
341
|
+
* S7.17 (07 · ve-together) — the teammates whose timeline is open, from this canvas's awareness (already through
|
|
342
|
+
* `sanitizeForeignState`): where each playhead is (`artboardId`, `frame`) and the caption word each is fixing
|
|
343
|
+
* (`word`, a `src|wordId|clip` key). ≤ PEERS_MAX entries; names are untrusted text, rendered as text only.
|
|
344
|
+
*/
|
|
345
|
+
'timeline-peers': {
|
|
346
|
+
peers: Array<{
|
|
347
|
+
clientID: number;
|
|
348
|
+
name: string;
|
|
349
|
+
artboardId: string;
|
|
350
|
+
frame?: number;
|
|
351
|
+
word?: string;
|
|
352
|
+
}>;
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* S2.19 (14 `ed-edge-ask`) — ⌘/ with elements selected: which (`refs`, with the canvas's locators for the
|
|
356
|
+
* prompt's `[selected: …]` lines) and where (`rect`, iframe viewport px). The SHELL draws the bubble and owns
|
|
357
|
+
* the words: a canvas never carries a prompt to the shell. `-rect`: the live AI outline over the asked
|
|
358
|
+
* elements moved (`null`: it is gone — the run is over).
|
|
359
|
+
*/
|
|
360
|
+
// S2.21: an artboard's "Ask AI about this artboard" names the artboard instead of elements (`refs` is [])
|
|
361
|
+
'ask-selection': { refs: ElementRef[]; selection?: AskLocator[]; rect: Rect; artboard?: Id };
|
|
362
|
+
'ask-selection-rect': { rect: Rect | null };
|
|
363
|
+
'insert-artboard-request': { id?: Id; label?: string; width?: number; height?: number };
|
|
364
|
+
|
|
365
|
+
// ── V2-1.2 mode lane — live since V2-4.3b (set-mode / mode-changed / mode-request); the rest new ──
|
|
366
|
+
'mode-changed': {
|
|
367
|
+
seq: number;
|
|
368
|
+
mode: CanvasModeV2;
|
|
369
|
+
tool: ToolId;
|
|
370
|
+
present: PresentSpec | null;
|
|
371
|
+
cause: 'set-mode' | 'tool' | 'clamp' | 'boot';
|
|
372
|
+
};
|
|
373
|
+
'mode-request': {
|
|
374
|
+
mode: CanvasModeV2 | 'back';
|
|
375
|
+
tool?: ToolId;
|
|
376
|
+
present?: PresentSpec;
|
|
377
|
+
cause: 'key' | 'esc' | 'inspect' | 'toolbar' | 'link';
|
|
378
|
+
};
|
|
379
|
+
'toolbar-rect': { mode: CanvasModeV2; rect: Rect | null };
|
|
380
|
+
'tool-panel-open': {
|
|
381
|
+
// r2-p1 TD10: 'image' = Image (I), the shell's picture picker; 'generate' = the Generate… slot next to it
|
|
382
|
+
panel: 'stickers' | 'components' | 'templates' | 'assets' | 'sizes' | 'image' | 'generate';
|
|
383
|
+
anchor: Rect | null;
|
|
384
|
+
/** S4.3: the id of the sticker being replaced (Replace… on a selected sticker opens the gallery in replace mode) */
|
|
385
|
+
replace?: Id;
|
|
386
|
+
};
|
|
387
|
+
// S7.20: the canvas wrote a size-picker pick (`artboard.insert-preset`) at `world`; the shell closes the picker and
|
|
388
|
+
// remembers the pick in Recent. Only after a write that went through.
|
|
389
|
+
'size-place': { presetId: string; world: { x: number; y: number } };
|
|
390
|
+
// 15 an-stamps: the canvas let go of an armed stamp (Esc / a right click in the canvas — the shell never hears that
|
|
391
|
+
// key); the shell puts its Stamps row away (annotations/ui/placement.tsx postStampDisarmed).
|
|
392
|
+
'stamp-disarmed': Empty;
|
|
393
|
+
// S4.8 — a change to what the annotation tools remember per person (sticky colour, Marker ink / thickness /
|
|
394
|
+
// tip, Highlighter hue / nib): the shell writes prefs.json and tells every canvas (`annotation-prefs`).
|
|
395
|
+
// Only fields that are members of their palette survive `parse` + the receivers' sanitiser.
|
|
396
|
+
'annotation-prefs-set': { prefs: AnnotationPrefsPayload };
|
|
397
|
+
// fit: the camera is where the last ⌘0 / Zoom to fit put it (V2-8.5 c7: "Zoom to fit · N %").
|
|
398
|
+
'viewport-zoom': { zoom: number; fit?: boolean };
|
|
399
|
+
// S3.7a — `sid` / `seq` (S3-present-session §3): the presenting session, and its step count.
|
|
400
|
+
'present-position': { index: number; total: number; artboardId: Id; sid?: string; seq?: number };
|
|
401
|
+
// S3.6b — the Present run's artboards with their world rects and labels, in canvas order: the presenter
|
|
402
|
+
// view's order map (the live layout exists only in the canvas). Untrusted: labels render as text only.
|
|
403
|
+
'present-run': {
|
|
404
|
+
artboards: Array<{ id: Id; label: string; x: number; y: number; w: number; h: number }>;
|
|
405
|
+
};
|
|
406
|
+
// S3.7a — a follower canvas tells its follower page (client/v2/present/follow-view.jsx) what it shows.
|
|
407
|
+
// Untrusted: `presenterName` is rendered as text only and re-clamped by the page.
|
|
408
|
+
'present-follow-state': {
|
|
409
|
+
live: boolean;
|
|
410
|
+
sid: string | null;
|
|
411
|
+
presenterName: string;
|
|
412
|
+
presenterIndex: number;
|
|
413
|
+
index: number;
|
|
414
|
+
total: number;
|
|
415
|
+
watchers: number;
|
|
416
|
+
ended: boolean;
|
|
417
|
+
};
|
|
418
|
+
// S3.3 — the clip on the presented artboard (video-comp): the shell's transport mirrors it. `t` and
|
|
419
|
+
// `duration` are seconds, 0..86400.
|
|
420
|
+
// S3.8 — `sources`: the media files the clip uses (src URLs, ≤ 8 × 400 chars); `missing`: its media failed to
|
|
421
|
+
// load, so it holds its first frame. Untrusted: the shell only compares them with what is on this Mac.
|
|
422
|
+
'present-media': {
|
|
423
|
+
playing: boolean;
|
|
424
|
+
t: number;
|
|
425
|
+
duration: number;
|
|
426
|
+
muted: boolean;
|
|
427
|
+
sources?: string[];
|
|
428
|
+
missing?: boolean;
|
|
429
|
+
};
|
|
430
|
+
/** S3.10a — a plain click in Preview on an element with `data-cd-link` + `data-cd-id`. Never the target:
|
|
431
|
+
* the shell reads it from the TSX (`GET /_api/links`, S3-links-format §1.3). */
|
|
432
|
+
'link-follow': { elementId: Id; artboardId: Id | null };
|
|
433
|
+
// S8.19 — the placeholder frame's Relink… (a Missing picture): the shell opens its relink sheet for
|
|
434
|
+
// that rel. The canvas asks; the shell decides (the write is the shell's `asset.relink` edit op).
|
|
435
|
+
'asset-relink-request': { rel: string };
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/** S8.19 — one picture's state, as the shell tells the canvas (contract S8-S9-asset-presence §5.5). */
|
|
439
|
+
export interface AssetStateItem {
|
|
440
|
+
rel: string;
|
|
441
|
+
state: 'here' | 'uploading' | 'waiting' | 'missing';
|
|
442
|
+
/** A display name only — never an e-mail, never a device id. */
|
|
443
|
+
who?: { name: string | null; kind: 'mac' | 'pc' | 'linux' | null; self: boolean };
|
|
444
|
+
/** The hub already has the bytes; this Mac has not pulled them yet ("Syncing…"). */
|
|
445
|
+
syncing?: boolean;
|
|
446
|
+
/** S8.14: upload progress 0..1 while `state` is 'uploading' (the thin bar on the picture). */
|
|
447
|
+
progress?: number;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/** shell → canvas (posted to iframe.contentWindow) */
|
|
451
|
+
export interface ShellToCanvas {
|
|
452
|
+
// chrome + view (DDR-117 family)
|
|
453
|
+
theme: { theme: 'light' | 'dark' };
|
|
454
|
+
'view-chrome': Partial<{
|
|
455
|
+
minimap: boolean;
|
|
456
|
+
zoom: boolean;
|
|
457
|
+
present: boolean;
|
|
458
|
+
guides: boolean;
|
|
459
|
+
print: boolean;
|
|
460
|
+
safeZones: boolean;
|
|
461
|
+
/** P8 C8 (01 cf-open-big): ⌘\ hid the panels - the toolbar folds to its one current tool. */
|
|
462
|
+
zen: boolean;
|
|
463
|
+
}>;
|
|
464
|
+
'view-annotations': { visible: boolean };
|
|
465
|
+
'canvas-cap': { t: string };
|
|
466
|
+
// S10.4 — the follower swap: the two designRoot-relative `.css` files the canvas follows now
|
|
467
|
+
// (client/v2/ds/follower-swap.js decides WHEN; the shell swaps `#canvas-tokens` / `#canvas-components`).
|
|
468
|
+
'ds-css': { tokens?: string | null; components?: string | null };
|
|
469
|
+
// S10.4 — element pins: per `data-ds-rev` value, the sibling files of the revision it names (loaded by
|
|
470
|
+
// the shell document and scoped with ds/pin-scope.ts); a value not listed keeps the canvas's own look.
|
|
471
|
+
'ds-pins': {
|
|
472
|
+
revs: Record<string, { tokens: string; components: string | null }>;
|
|
473
|
+
rootClass: string | null;
|
|
474
|
+
};
|
|
475
|
+
// S10.8 — a canvas left out of a design-system update: the `data-cd-id`s of the elements that wear what
|
|
476
|
+
// changed (client/v2/ds/update-dots.js names them from the usage index); the shell document draws a dot.
|
|
477
|
+
'ds-update-dots': { ids: string[] };
|
|
478
|
+
// S10.16c — the Design system canvas's three shell messages (they were raw `{ type: 'maude:ds-…' }` posts):
|
|
479
|
+
// the Light | Dark preview (`ds.set-theme-preview`, a view of this one canvas), the tokens the studio flags
|
|
480
|
+
// ("Changed outside" / "2 versions", S10.11) and which sections of a system being made wait, are drawn or done
|
|
481
|
+
// (13 · ds-make-filling, S10.16b). The board listens only to its parent and keeps all three in memory.
|
|
482
|
+
'ds-theme-preview': { mode: 'light' | 'dark' };
|
|
483
|
+
'ds-marks': { outside: string[]; conflicts: string[] };
|
|
484
|
+
'ds-make-states': {
|
|
485
|
+
sections: Partial<
|
|
486
|
+
Record<
|
|
487
|
+
'brand' | 'colour' | 'type' | 'space' | 'motion' | 'components' | 'patterns',
|
|
488
|
+
'waiting' | 'drawing' | 'done'
|
|
489
|
+
>
|
|
490
|
+
>;
|
|
491
|
+
};
|
|
492
|
+
// S10.9 — the reach view asks a preview frame where these elements (`data-cd-id`s from the usage index, inside
|
|
493
|
+
// `artboard` when given) are drawn; the frame answers `ds-rects-result` with the same `seq`.
|
|
494
|
+
'ds-rects': { seq: number; artboard: string | null; ids: string[] };
|
|
495
|
+
'ai-activity': { file: string; entry: AiActivityEntry | null };
|
|
496
|
+
// selection + edit round-trips
|
|
497
|
+
/** `add` (P8 round 7, 12 · ia-placed): add to the selection instead of replacing it — the placed photos as one group */
|
|
498
|
+
'select-by-id': { id?: Id; artboardId?: Id | null; index?: number; add?: boolean };
|
|
499
|
+
/** S11.9 — Layers › Advanced › Select by selector: the canvas selects what the selector matches inside its
|
|
500
|
+
* artboards (capped at 500, scoped to `[data-dc-screen]`). */
|
|
501
|
+
'select-by-selector': { selector: string };
|
|
502
|
+
highlight: { id: Id | null; artboardId?: Id | null; index?: number };
|
|
503
|
+
'request-layers': { artboardId: Id | null };
|
|
504
|
+
'force-clear': Empty;
|
|
505
|
+
'select-clear': Empty;
|
|
506
|
+
'locked-set': { locked: string[] };
|
|
507
|
+
'apply-style': {
|
|
508
|
+
id: Id;
|
|
509
|
+
artboardId?: Id | null;
|
|
510
|
+
index?: number;
|
|
511
|
+
prop: string;
|
|
512
|
+
value: string | null;
|
|
513
|
+
};
|
|
514
|
+
'record-edit': { payload: RecordEditPayload };
|
|
515
|
+
'apply-edit-result': { requestId: string; ok: boolean; error?: string; conflict?: boolean };
|
|
516
|
+
'undo-barrier-ok': { requestId: string };
|
|
517
|
+
/** S2.1 — the route's answer (`EditOpResult`, flattened) */
|
|
518
|
+
'edit-op-result': {
|
|
519
|
+
requestId: string;
|
|
520
|
+
ok: boolean;
|
|
521
|
+
actionId?: string | null;
|
|
522
|
+
writeId?: string;
|
|
523
|
+
rev?: string;
|
|
524
|
+
refs?: ElementRef[];
|
|
525
|
+
created?: ElementRef[];
|
|
526
|
+
code?: EditOpCode;
|
|
527
|
+
message?: string;
|
|
528
|
+
};
|
|
529
|
+
'edit-reverted': { op: string; id?: Id; reason?: string };
|
|
530
|
+
'reorder-failed': Empty;
|
|
531
|
+
'reposition-failed': Empty;
|
|
532
|
+
'resize-failed': Empty;
|
|
533
|
+
'resize-artboard-failed': Empty;
|
|
534
|
+
'freeze-and-set-kind': {
|
|
535
|
+
artboardId: Id;
|
|
536
|
+
kind: string | null;
|
|
537
|
+
ask?: boolean;
|
|
538
|
+
freeze?: boolean;
|
|
539
|
+
};
|
|
540
|
+
'op-toast': { message: string };
|
|
541
|
+
'tool-set': { tool: ToolId };
|
|
542
|
+
// annotations / media
|
|
543
|
+
// `sticker` (S4.3): which bundled sticker the bytes at `path` came from, so Replace/Flip/Recent can
|
|
544
|
+
// name it (`pack` = the pack slug, `id` = its file); `path` alone (a pasted PNG) stays valid
|
|
545
|
+
'insert-sticker': {
|
|
546
|
+
path: string;
|
|
547
|
+
follow?: boolean;
|
|
548
|
+
/** r4 #16: the picture as a small image data URL, so the ghost + the placed sticker draw at once. */
|
|
549
|
+
preview?: string;
|
|
550
|
+
sticker?: { pack: string; id: string; flip?: boolean };
|
|
551
|
+
};
|
|
552
|
+
// S4.4: a Templates-panel pick (`id` is an annotations/templates.ts id); the canvas expands the same
|
|
553
|
+
// spec `annotate --board <id>` does and, with `follow`, the ghost trails the pointer until a click (S4.13)
|
|
554
|
+
'insert-template': { id: string; follow?: boolean };
|
|
555
|
+
// S2.16: a Component-picker pick (⇧I). `component` is a `@maude/ds` export name (validated here, and
|
|
556
|
+
// again by the `component.insert` writer); `mode` 'ghost' = the pick follows the pointer until a click,
|
|
557
|
+
// 'selection' = ↵ puts it in the selected frame. Accepted only from the shell (`gate: 'parent'`).
|
|
558
|
+
'place-component': {
|
|
559
|
+
component: string;
|
|
560
|
+
label?: string;
|
|
561
|
+
variant?: string;
|
|
562
|
+
glyph?: string;
|
|
563
|
+
// P8 c8 (14 ed-comp-pick): 'preview' = the picker's highlighted row drawn as a ghost on the artboard's centre
|
|
564
|
+
// line; 'cancel' = the picker closed without a pick
|
|
565
|
+
mode: 'ghost' | 'selection' | 'preview' | 'cancel';
|
|
566
|
+
};
|
|
567
|
+
// r2-p1 TD10 (UX audit F10): the picture Image (I) picked in the shell, already in Assets (`asset` = its
|
|
568
|
+
// `assets/…` path). The canvas arms it: the next click on an artboard places it there, ↵ in the middle of the
|
|
569
|
+
// view, esc lets go — one `image.place` write. Accepted only from the shell (`gate: 'parent'`).
|
|
570
|
+
'place-image': { asset: string; natural?: { w: number; h: number } | null; label?: string };
|
|
571
|
+
// r3: an Assets tile is being dragged over the canvas. The shell catches the drag (a catcher over the frame —
|
|
572
|
+
// WebKit gives a shell-started drag no event in the canvas origin) and says where the pointer is, in the frame's
|
|
573
|
+
// own coordinates, so the canvas rings what it would land on (`x: null` = the drag left or ended).
|
|
574
|
+
'asset-drag-over': { x: number | null; y?: number };
|
|
575
|
+
// r3: the tile was dropped at (x, y): the canvas answers `asset-drop-target` with what lies there.
|
|
576
|
+
'asset-drop-at': { requestId: string; x: number; y: number };
|
|
577
|
+
// r3: how the shell's `image.place` went — the canvas selects what it made, or says the refusal in one line.
|
|
578
|
+
'asset-drop-done': { requestId: string; ok: boolean; created?: ElementRef[]; message?: string };
|
|
579
|
+
// S7.9 (07 ve-drop): footage is being dragged over the window while a video artboard is followed — that artboard
|
|
580
|
+
// shows the chip "Or drop here — adds at the end" (`on: false` = the drag ended or left). The shell owns the drop
|
|
581
|
+
// (a catcher over the artboard's rect), so the canvas only draws.
|
|
582
|
+
'timeline-drop-hint': { artboardId: Id; on: boolean };
|
|
583
|
+
// S7.17 (07 ve-together): the caption word this person is fixing in the shell (the Transcript panel's field) — the
|
|
584
|
+
// canvas publishes it on awareness as a soft lock; `{ artboardId: null }` = they left it.
|
|
585
|
+
'timeline-word': { artboardId: Id | null; wordKey?: string };
|
|
586
|
+
// S7.24b (08 ak-mixed-fit): the kind filter — the artboards OUTSIDE the chosen kind, for the canvas to draw
|
|
587
|
+
// quiet ("19 other artboards are dimmed"). The shell counts (the index knows each canvas's artboard kinds); the
|
|
588
|
+
// canvas only draws. `null` = dim nothing. ≤ DIM_IDS_MAX ids; a longer list is refused whole.
|
|
589
|
+
'dim-artboards': { ids: string[] | null };
|
|
590
|
+
// S7.20: the F size picker's hover — where the artboard of this preset would land, dashed and labelled
|
|
591
|
+
// ("FB event cover 1920 × 1005"); `null` = the pointer left the tiles. The canvas picks the place.
|
|
592
|
+
'size-ghost': {
|
|
593
|
+
preset: { id: string; label: string; sizeText: string; w: number; h: number } | null;
|
|
594
|
+
};
|
|
595
|
+
// S1.3: the Canvases panel's artboard jump list — ease (glide) or cut the camera to an artboard and
|
|
596
|
+
// optionally flash its outline. The shell decides glide (reduced motion = cut); a repeat to the same
|
|
597
|
+
// artboard while gliding is a no-op. canvas-lib's handler lands with the L1 slice that owns it.
|
|
598
|
+
'reveal-artboard': { artboardId: Id; glide: boolean; flash: boolean };
|
|
599
|
+
// V2-8.5 c7 (08 ak-convert-after): right after "Make A6 print" the canvas draws two transient marks — "✓ Unchanged" under
|
|
600
|
+
// the post (`from`) and "+13 % height · Ink fill" on the copy (`to`, `extraPct` of its height is background in `fill`).
|
|
601
|
+
// Words only: the canvas builds the strings from these three facts, nothing is shown as markup.
|
|
602
|
+
'convert-marks': { v: 1; from: Id; to: Id; extraPct: number; fill: string | null };
|
|
603
|
+
// V2-8.5 c7 (15 an-stk-gallery, 04 md-edit-image): which of the shell's tool panels is open, so the canvas dock can
|
|
604
|
+
// press the slot that opened it (Stickers · E while the gallery is up, Image · I while the Assets panel is). A state:
|
|
605
|
+
// the whole answer each time, `null` = none. Two words and nothing else; the canvas never learns what the panel shows.
|
|
606
|
+
'shell-panels': { v: 1; open: 'stickers' | 'assets' | 'components' | null };
|
|
607
|
+
// V2-8.5 c7 (03 ai-copy): the artboards a "Run on a copy" made, each with the artboard it was copied from. The canvas
|
|
608
|
+
// draws a dashed link between the pair and "Copied from <the original's name>" under the copy. Ids only: the
|
|
609
|
+
// canvas reads the name off its own artboard, and nothing the person asked (or the busy chat's title) crosses
|
|
610
|
+
// (DDR-054, v2-S5.11-neutral-ring-tags). State, not an event: the whole list each time; `[]` clears.
|
|
611
|
+
'ai-copies': { v: 1; copies: Array<{ from: Id; to: Id }> };
|
|
612
|
+
// S5.11 (V2-1.15 §5.8, P3): which artboards an AI is on, for the ring + tag the canvas draws. A state, a
|
|
613
|
+
// name and a count per artboard — never a prompt, a question or a progress line (the canvas is untrusted).
|
|
614
|
+
// `done` is the settled ring after a run (driven by the V2-1.5 action event, not the registry).
|
|
615
|
+
'ai-runs': {
|
|
616
|
+
artboards: Record<
|
|
617
|
+
Id,
|
|
618
|
+
{ state: 'running' | 'needs-you' | 'done'; who: string; tag: string; waiting: number }
|
|
619
|
+
>;
|
|
620
|
+
};
|
|
621
|
+
// S11.5 (05 es-all-trashed): the outlines an all-trashed canvas keeps. The shell reads the Trash itself and
|
|
622
|
+
// sends ids, labels and where each stood (`rect: null` = unknown, left out); the canvas draws and never says
|
|
623
|
+
// what is in the Trash. The table caps the strings (ids 128, labels 200); the layer draws at most 200.
|
|
624
|
+
'trashed-artboards': {
|
|
625
|
+
canvas: string;
|
|
626
|
+
items: Array<{ id: Id; label: string; rect: Rect | null }>;
|
|
627
|
+
};
|
|
628
|
+
'insert-annotation-media': { paths: string[] };
|
|
629
|
+
// `sticker` (S4.13): Replace… on a gallery sticker names the new one, so the canvas keeps its identity (a
|
|
630
|
+
// pick that is not a gallery sticker omits it and the canvas clears the old identity)
|
|
631
|
+
'replace-annotation-media': {
|
|
632
|
+
id: Id;
|
|
633
|
+
path: string;
|
|
634
|
+
sticker?: { pack: string; id: string; flip?: boolean };
|
|
635
|
+
};
|
|
636
|
+
/** S8.15 — `use`: the `data-cd-id` of the one use being edited (absent = every use). */
|
|
637
|
+
'photo-preview': { asset: string; edit: PhotoEdit | null; use?: string };
|
|
638
|
+
'photo-busy': { asset: string; busy: boolean };
|
|
639
|
+
// comments
|
|
640
|
+
'comments-set': { comments: CommentThread[] };
|
|
641
|
+
// S6.11b — `reply`: a thread landing (invite / mention) focuses the thread's reply field
|
|
642
|
+
'comment-focus': { id: Id | null; reply?: true };
|
|
643
|
+
// S9.22 — the shell's answers to `comment-op` / `comment-people-request`, to the frame that asked.
|
|
644
|
+
'comment-op-ack': { reqId: ReqId | null };
|
|
645
|
+
'comment-op-result': {
|
|
646
|
+
reqId: ReqId | null;
|
|
647
|
+
ok: boolean;
|
|
648
|
+
comment?: CommentThread | null;
|
|
649
|
+
status?: number;
|
|
650
|
+
error?: string;
|
|
651
|
+
};
|
|
652
|
+
'comment-people': { reqId: ReqId | null; people: MentionPerson[] | null };
|
|
653
|
+
// S4.17 — the Preview annotation list selects / filters on the canvas (handler: S4.9)
|
|
654
|
+
'annotation-select': { v: 1; ids: string[] };
|
|
655
|
+
'annotation-filter': { v: 1; authors: string[] };
|
|
656
|
+
// export
|
|
657
|
+
'export-capture': { id: Id; format: string; artboardIds: Id[]; scale: number };
|
|
658
|
+
'export-selection-query': { id: Id };
|
|
659
|
+
'export-result': { id: Id } & ExportResult;
|
|
660
|
+
'export-history-result': { id: Id; history: ExportHistoryEntry[] };
|
|
661
|
+
// timeline
|
|
662
|
+
'timeline-play': { id?: Id };
|
|
663
|
+
'timeline-pause': { id?: Id };
|
|
664
|
+
'timeline-seek': { id?: Id; frame: number };
|
|
665
|
+
'timeline-loop': { id?: Id; loop: boolean };
|
|
666
|
+
'timeline-mute': { id?: Id; muted: boolean };
|
|
667
|
+
'timeline-volume': { id?: Id; volume: number };
|
|
668
|
+
'timeline-request-comps': Empty;
|
|
669
|
+
// the shell runs a canvas action (V2-1.3 / V2-2.4 — supersedes undo/redo/zoom/selection-clear/
|
|
670
|
+
// annotation-select-all)
|
|
671
|
+
'run-action': { v: 1; id: string; params?: Record<string, unknown> };
|
|
672
|
+
// p8-sweep-leftovers — Menu › Edit › Paste: what the SHELL read from the clipboard (the frame may not read
|
|
673
|
+
// it, DDR-054); the frame replays it as its ⌘V paste. Bounded + typed in bridge/paste-data.ts.
|
|
674
|
+
'paste-data': { v: 1; text?: string; html?: string; image?: Blob };
|
|
675
|
+
// dead send (no canvas handler) — keep declared, retire in V2-8.0
|
|
676
|
+
'git-lifecycle': { payload: GitLifecycleEvent };
|
|
677
|
+
|
|
678
|
+
// ── NEW (V2-1.2) ──
|
|
679
|
+
'set-mode': {
|
|
680
|
+
v: 2;
|
|
681
|
+
seq: number;
|
|
682
|
+
mode: CanvasModeV2;
|
|
683
|
+
present: PresentSpec | null;
|
|
684
|
+
tool?: ToolId;
|
|
685
|
+
caps: ModeCaps;
|
|
686
|
+
};
|
|
687
|
+
'occluded-insets': { seq: number; insets: Insets };
|
|
688
|
+
'present-step': { to: number | 'next' | 'prev' };
|
|
689
|
+
// S3.7a — the follower page tells its canvas which session to follow (`sid: null` = the first
|
|
690
|
+
// presenter seen), whether it is live, and whether it is the locked audience window.
|
|
691
|
+
'present-follow': { sid: string | null; live: boolean; locked: boolean };
|
|
692
|
+
// S3.3 — the shell's transport (and presenter view: `mute` on the Mac's canvas) drives the clip.
|
|
693
|
+
'present-media-cmd': {
|
|
694
|
+
op: 'play' | 'pause' | 'mute' | 'unmute' | 'captions-on' | 'captions-off';
|
|
695
|
+
};
|
|
696
|
+
// V2-4 gate (WCAG 2.1.4) — the per-Mac "Single-key shortcuts" switch: `false` → the canvas resolves no
|
|
697
|
+
// character-key chord (V, /, ⇧0 …; actions/keys.ts › isCharacterChord). State, not an event: the shell
|
|
698
|
+
// sends it on every change and seeds each canvas on `loaded` / `canvas-rendered`.
|
|
699
|
+
'key-prefs': { singleKeys: boolean };
|
|
700
|
+
// S4.8 (Q8) — the person's annotation-tool memory, seeded on `loaded` / `canvas-rendered` and re-sent on
|
|
701
|
+
// each change made in another canvas. State, not an event.
|
|
702
|
+
'annotation-prefs': { prefs: AnnotationPrefsPayload };
|
|
703
|
+
// S4.14 (S4-S9 §2.6) — the vote the canvas shows: the projection only (targets, state, YOUR dots, the
|
|
704
|
+
// counts once ended). Never a name, never another person's picks — the parser keeps nothing else.
|
|
705
|
+
'vote-state': {
|
|
706
|
+
vote: {
|
|
707
|
+
id: string;
|
|
708
|
+
targets: string[];
|
|
709
|
+
state: 'open' | 'ended';
|
|
710
|
+
perVoter: number;
|
|
711
|
+
tallies?: Record<string, number>;
|
|
712
|
+
} | null;
|
|
713
|
+
mine: Record<string, number>;
|
|
714
|
+
};
|
|
715
|
+
// S2.18 (V2-1.15 §5.12) — what the canvas can't see for this person's `holding`: an inspector field has
|
|
716
|
+
// focus (`field`), the app has focus (`app`), an inspector edit just landed (`gesture`). State, sent on
|
|
717
|
+
// every change to the active canvas.
|
|
718
|
+
'hold-intent': { field: boolean; app: boolean; gesture?: boolean };
|
|
719
|
+
// S2.18 (V2-1.15 §5.8) — the objects live AI runs hold on this canvas (a run's `objects`): the canvas
|
|
720
|
+
// draws the spark outline + tag and the click tip. A tag and a flag per object — never a prompt.
|
|
721
|
+
'ai-holds': {
|
|
722
|
+
/** `scope: true` (S2.19) — the object was ASKED about by a ⌘/ selection: the canvas draws those as one outline */
|
|
723
|
+
holds: Array<{
|
|
724
|
+
artboard: Id;
|
|
725
|
+
element: Id;
|
|
726
|
+
occurrence?: number;
|
|
727
|
+
tag: string;
|
|
728
|
+
mine: boolean;
|
|
729
|
+
scope?: boolean;
|
|
730
|
+
/** S5.19 (03 `ai-question`) — a spot the AI points at (a small spark ring, gone on a click); the tag is its name only */
|
|
731
|
+
point?: boolean;
|
|
732
|
+
}>;
|
|
733
|
+
};
|
|
734
|
+
// S4.15 (an-ai-read) — the places the AI means, while its "Make these changes" card is the latest message:
|
|
735
|
+
// the annotation layer draws a dashed spark outline and a tag. `ref` is `ab:<artboard>` or `el:<artboard>/<id>`;
|
|
736
|
+
// the tag is built by the shell from the ref alone (the element's name) — never a word of the agent's answer
|
|
737
|
+
// (DDR-054, v2-lead-neutral-ai-ring-tags). `[]` clears.
|
|
738
|
+
'ai-seen': { targets: Array<{ ref: string; tag: string }> };
|
|
739
|
+
// S2.20 — pointing at an Undo history row lights the artboards it would undo; `[]` clears.
|
|
740
|
+
'undo-preview': { artboards: string[]; tag: string | null };
|
|
741
|
+
// S8.19 — "Waiting for Jonas's Mac" vs Missing for the open canvas's media. State, not an event: the
|
|
742
|
+
// shell sends the whole list on open, every 60 s while something waits, at reconnect and after a
|
|
743
|
+
// sweep ends. ≤ 256 items; a name with an `@` is refused whole (the canvas never sees an e-mail).
|
|
744
|
+
'asset-state': { items: AssetStateItem[] };
|
|
745
|
+
// S8.16 — the pictures of the open canvas that have other takes (`assets/<sha8>.<ext>`): with one of them
|
|
746
|
+
// selected, ← → are `take-step`, not a nudge. State, not an event: the whole set each time. ≤ 256 items,
|
|
747
|
+
// each an asset path; a planted or oversized list is refused whole.
|
|
748
|
+
'gen-takes': { assets: string[] };
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/** r3 — what an Assets drop lands on: a picture or frame (by ref) or the artboard itself (placed loose). */
|
|
752
|
+
export type AssetDropTarget = {
|
|
753
|
+
kind: 'picture' | 'frame' | 'artboard';
|
|
754
|
+
artboard: string;
|
|
755
|
+
element?: string;
|
|
756
|
+
occurrence?: number;
|
|
757
|
+
};
|
|
758
|
+
export type DgnMessage<M> = { [K in keyof M]: { dgn: K } & M[K] }[keyof M];
|
|
759
|
+
export type CanvasToShellMessage = DgnMessage<CanvasToShell>;
|
|
760
|
+
export type ShellToCanvasMessage = DgnMessage<ShellToCanvas>;
|
|
761
|
+
export type ShellGate = 'active' | 'asked' | 'frame' | 'any';
|
|
762
|
+
export type CanvasGate = 'parent' | 'parent|self' | 'any';
|
|
763
|
+
export type DgnStatus = 'live' | 'legacy' | 'new' | 'proposed';
|
|
764
|
+
export interface DgnSpec<P, G> {
|
|
765
|
+
/** The gate enforced today (the accept helpers apply it). */
|
|
766
|
+
gate: G;
|
|
767
|
+
/** The §5.2 arrow: what V2-2.10c tightens `gate` to. Absent = already there. */
|
|
768
|
+
target?: G;
|
|
769
|
+
status: DgnStatus;
|
|
770
|
+
/** The module that owns the semantics. */
|
|
771
|
+
owner: string;
|
|
772
|
+
/** A declared orphan: no in-tree sender, or no handler (inventory-checked). */
|
|
773
|
+
orphan?: 'no-sender' | 'no-handler';
|
|
774
|
+
parse: (raw: Record<string, unknown>) => P | null;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
// ─── validators ───────────────────────────────────────────────────────────────
|
|
778
|
+
// A validator returns the cleaned value, `undefined` for an absent optional, or BAD.
|
|
779
|
+
|
|
780
|
+
const BAD: unique symbol = Symbol('dgn.bad');
|
|
781
|
+
type V = (v: unknown) => unknown;
|
|
782
|
+
|
|
783
|
+
import { isImageDataUrl } from '../annotations/ui/sticker-preview.ts';
|
|
784
|
+
|
|
785
|
+
export const MAX_STR = 4000;
|
|
786
|
+
export const MAX_ARR = 10000;
|
|
787
|
+
const MAX_DEPTH = 16;
|
|
788
|
+
const isPlain = (v: unknown): v is Record<string, unknown> =>
|
|
789
|
+
!!v && typeof v === 'object' && !Array.isArray(v);
|
|
790
|
+
|
|
791
|
+
const str: V = (v) => (typeof v === 'string' && v.length <= MAX_STR ? v : BAD);
|
|
792
|
+
const num: V = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : BAD);
|
|
793
|
+
const unit: V = (v) => (typeof v === 'number' && Number.isFinite(v) && v >= 0 && v <= 1 ? v : BAD);
|
|
794
|
+
const bool: V = (v) => (typeof v === 'boolean' ? v : BAD);
|
|
795
|
+
/** r4 #16 — a small raster image as a data URL (the one string allowed past MAX_STR; never svg or html). */
|
|
796
|
+
const imageDataUrl: V = (v) => (isImageDataUrl(v) ? v : BAD);
|
|
797
|
+
/** S3.3 — a time in seconds: finite, 0..86400 (a day), else the whole message is junk. */
|
|
798
|
+
const seconds: V = (v) =>
|
|
799
|
+
typeof v === 'number' && Number.isFinite(v) && v >= 0 && v <= 86400 ? v : BAD;
|
|
800
|
+
/** S3.8 — the media files a presented clip uses: at most 8 strings of at most 400 chars. */
|
|
801
|
+
const mediaSources: V = (v) => {
|
|
802
|
+
if (!Array.isArray(v) || v.length > 8) return BAD;
|
|
803
|
+
for (const x of v) if (typeof x !== 'string' || x.length > 400) return BAD;
|
|
804
|
+
return [...v];
|
|
805
|
+
};
|
|
806
|
+
const lit =
|
|
807
|
+
(...xs: readonly unknown[]): V =>
|
|
808
|
+
(v) =>
|
|
809
|
+
xs.includes(v) ? v : BAD;
|
|
810
|
+
const opt =
|
|
811
|
+
(f: V): V =>
|
|
812
|
+
(v) =>
|
|
813
|
+
v === undefined ? undefined : f(v);
|
|
814
|
+
// S3.10a — a linked element's authored id (V2-1.4 §4.2: never 8 hex) and its artboard (S3-links-format §9).
|
|
815
|
+
const linkElementIdV: V = (v) =>
|
|
816
|
+
typeof v === 'string' &&
|
|
817
|
+
v.length <= 48 &&
|
|
818
|
+
/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(v) &&
|
|
819
|
+
!/^[0-9a-f]{8}$/.test(v)
|
|
820
|
+
? v
|
|
821
|
+
: BAD;
|
|
822
|
+
const linkArtboardIdV: V = (v) =>
|
|
823
|
+
typeof v === 'string' && /^[A-Za-z0-9_-]{1,64}$/.test(v) ? v : BAD;
|
|
824
|
+
const nul =
|
|
825
|
+
(f: V): V =>
|
|
826
|
+
(v) =>
|
|
827
|
+
v === null ? null : f(v);
|
|
828
|
+
const arrOf =
|
|
829
|
+
(f: V): V =>
|
|
830
|
+
(v) => {
|
|
831
|
+
if (!Array.isArray(v) || v.length > MAX_ARR) return BAD;
|
|
832
|
+
const out: unknown[] = [];
|
|
833
|
+
for (const x of v) {
|
|
834
|
+
const r = f(x);
|
|
835
|
+
if (r === BAD) return BAD;
|
|
836
|
+
out.push(r);
|
|
837
|
+
}
|
|
838
|
+
return out;
|
|
839
|
+
};
|
|
840
|
+
/** A JSON value with the caps applied at every depth (opaque payloads owned by other modules). */
|
|
841
|
+
const json: V = (v) => jsonAt(v, 0);
|
|
842
|
+
function jsonAt(v: unknown, depth: number): unknown {
|
|
843
|
+
if (v === null || typeof v === 'boolean') return v;
|
|
844
|
+
if (typeof v === 'number') return Number.isFinite(v) ? v : BAD;
|
|
845
|
+
if (typeof v === 'string') return v.length <= MAX_STR ? v : BAD;
|
|
846
|
+
if (depth >= MAX_DEPTH || typeof v !== 'object') return BAD;
|
|
847
|
+
if (Array.isArray(v)) {
|
|
848
|
+
if (v.length > MAX_ARR) return BAD;
|
|
849
|
+
const out: unknown[] = [];
|
|
850
|
+
for (const x of v) {
|
|
851
|
+
const r = jsonAt(x, depth + 1);
|
|
852
|
+
if (r === BAD) return BAD;
|
|
853
|
+
out.push(r);
|
|
854
|
+
}
|
|
855
|
+
return out;
|
|
856
|
+
}
|
|
857
|
+
const out: Record<string, unknown> = {};
|
|
858
|
+
let n = 0;
|
|
859
|
+
for (const k of Object.keys(v)) {
|
|
860
|
+
if (++n > MAX_ARR || k.length > MAX_STR) return BAD;
|
|
861
|
+
const r = jsonAt((v as Record<string, unknown>)[k], depth + 1);
|
|
862
|
+
if (r === BAD) return BAD;
|
|
863
|
+
if (r !== undefined) out[k] = r;
|
|
864
|
+
}
|
|
865
|
+
return out;
|
|
866
|
+
}
|
|
867
|
+
const jsonObj: V = (v) => (isPlain(v) ? json(v) : BAD);
|
|
868
|
+
const strMap: V = (v) => {
|
|
869
|
+
if (!isPlain(v)) return BAD;
|
|
870
|
+
const out: Record<string, string> = {};
|
|
871
|
+
const keys = Object.keys(v);
|
|
872
|
+
if (keys.length > MAX_ARR) return BAD;
|
|
873
|
+
for (const k of keys) {
|
|
874
|
+
const r = str(v[k]);
|
|
875
|
+
if (r === BAD || k.length > MAX_STR) return BAD;
|
|
876
|
+
out[k] = r as string;
|
|
877
|
+
}
|
|
878
|
+
return out;
|
|
879
|
+
};
|
|
880
|
+
/** A map of validated values with a bounded key count; `__proto__`/`constructor`/`prototype` keys are REJECTED. */
|
|
881
|
+
export const RING_KEYS_MAX = 256;
|
|
882
|
+
const recOf =
|
|
883
|
+
(f: V, max = RING_KEYS_MAX): V =>
|
|
884
|
+
(v) => {
|
|
885
|
+
if (!isPlain(v)) return BAD;
|
|
886
|
+
const keys = Object.keys(v);
|
|
887
|
+
if (keys.length > max) return BAD;
|
|
888
|
+
const out: Record<string, unknown> = Object.create(null);
|
|
889
|
+
for (const k of keys) {
|
|
890
|
+
if (k.length > 200 || k === '__proto__' || k === 'constructor' || k === 'prototype')
|
|
891
|
+
return BAD;
|
|
892
|
+
const r = f(v[k]);
|
|
893
|
+
if (r === BAD) return BAD;
|
|
894
|
+
out[k] = r;
|
|
895
|
+
}
|
|
896
|
+
return out;
|
|
897
|
+
};
|
|
898
|
+
/** S4.12 — an annotation element id as the layer mints it (`s_xxxxxxxx`) or a migrated one: word chars and dashes. */
|
|
899
|
+
const annotationIdV: V = (v) =>
|
|
900
|
+
typeof v === 'string' && /^[A-Za-z0-9_-]{1,64}$/.test(v) ? v : BAD;
|
|
901
|
+
const shortStr =
|
|
902
|
+
(max: number): V =>
|
|
903
|
+
(v) =>
|
|
904
|
+
typeof v === 'string' && v.length <= max ? v : BAD;
|
|
905
|
+
const dsName: V = (v) => (typeof v === 'string' && /^[A-Z][A-Za-z0-9]{0,63}$/.test(v) ? v : BAD);
|
|
906
|
+
const dsSlug: V = (v) => (typeof v === 'string' && /^[a-z][a-z0-9-]{0,40}$/.test(v) ? v : BAD);
|
|
907
|
+
const count: V = (v) =>
|
|
908
|
+
typeof v === 'number' && Number.isSafeInteger(v) && v >= 0 && v <= 9999 ? v : BAD;
|
|
909
|
+
const shape =
|
|
910
|
+
(fields: Record<string, V>): V =>
|
|
911
|
+
(v) => {
|
|
912
|
+
if (!isPlain(v)) return BAD;
|
|
913
|
+
const out: Record<string, unknown> = {};
|
|
914
|
+
for (const k of Object.keys(fields)) {
|
|
915
|
+
const r = fields[k](v[k]);
|
|
916
|
+
if (r === BAD) return BAD;
|
|
917
|
+
if (r !== undefined) out[k] = r;
|
|
918
|
+
}
|
|
919
|
+
return out;
|
|
920
|
+
};
|
|
921
|
+
/** A whole number in [min, max]. */
|
|
922
|
+
const intIn =
|
|
923
|
+
(min: number, max: number): V =>
|
|
924
|
+
(v) =>
|
|
925
|
+
typeof v === 'number' && Number.isInteger(v) && v >= min && v <= max ? v : BAD;
|
|
926
|
+
/** The `data-cd-id` grammar the writers accept (api.ts CD_ID_RE): word characters and dashes, 1–64. */
|
|
927
|
+
const cdId: V = (v) => (typeof v === 'string' && /^[\w-]{1,64}$/.test(v) ? v : BAD);
|
|
928
|
+
const rect = shape({ x: num, y: num, w: num, h: num });
|
|
929
|
+
/** S7.17 — a caption word key (`src|wordId|clip`): bounded, no control characters (collab/timeline-awareness.ts). */
|
|
930
|
+
export const TIMELINE_WORD_MAX = 512;
|
|
931
|
+
const wordKeyV: V = (v) => {
|
|
932
|
+
if (typeof v !== 'string' || v.length < 5 || v.length > TIMELINE_WORD_MAX) return BAD;
|
|
933
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: the point is to refuse them
|
|
934
|
+
if (/[\u0000-\u001f\u007f]/.test(v) || v.split('|').length < 3) return BAD;
|
|
935
|
+
return v;
|
|
936
|
+
};
|
|
937
|
+
/** `timeline-peers` (S7.17): a planted or oversized list is REJECTED whole, never trimmed. */
|
|
938
|
+
const timelinePeerList: V = (v) => {
|
|
939
|
+
if (!Array.isArray(v) || v.length > PEERS_MAX) return BAD;
|
|
940
|
+
const cell = shape({
|
|
941
|
+
clientID: intIn(0, Number.MAX_SAFE_INTEGER),
|
|
942
|
+
name: (x) => (typeof x === 'string' && x.length <= PEER_NAME_MAX ? x : BAD),
|
|
943
|
+
artboardId: linkArtboardIdV,
|
|
944
|
+
frame: opt(intIn(0, 10_000_000)),
|
|
945
|
+
word: opt(wordKeyV),
|
|
946
|
+
});
|
|
947
|
+
const out: unknown[] = [];
|
|
948
|
+
for (const x of v) {
|
|
949
|
+
if (!isPlain(x)) return BAD;
|
|
950
|
+
const r = cell(x);
|
|
951
|
+
if (r === BAD) return BAD;
|
|
952
|
+
out.push(r);
|
|
953
|
+
}
|
|
954
|
+
return out;
|
|
955
|
+
};
|
|
956
|
+
/** A palette colour as the tools store it: `#rrggbb` or `#rrggbbaa` (the receivers check palette membership). */
|
|
957
|
+
const hexColour: V = (v) =>
|
|
958
|
+
typeof v === 'string' && /^#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/.test(v) ? v : BAD;
|
|
959
|
+
const annotationPrefs = shape({
|
|
960
|
+
stickyColor: opt(hexColour),
|
|
961
|
+
ink: opt(hexColour),
|
|
962
|
+
thickness: opt(lit(3, 6)),
|
|
963
|
+
tip: opt(lit('pen', 'highlighter', 'eraser')),
|
|
964
|
+
highlighterColor: opt(hexColour),
|
|
965
|
+
highlighterWidth: opt(intIn(1, 64)),
|
|
966
|
+
});
|
|
967
|
+
const mode: V = lit(...CANVAS_MODES);
|
|
968
|
+
const tool: V = lit(...TOOL_IDS);
|
|
969
|
+
const present = shape({ kind: lit(...PRESENT_KINDS), from: opt(str), only: opt(lit('formats')) });
|
|
970
|
+
const caps = shape({ edit: bool, annotate: bool, comment: bool, present: opt(bool) });
|
|
971
|
+
const PRESENT_SID = /^[a-z0-9]{8,32}$/;
|
|
972
|
+
const sid: V = (v) => (typeof v === 'string' && PRESENT_SID.test(v) ? v : BAD);
|
|
973
|
+
export const PRESENT_NAME_MAX = 64;
|
|
974
|
+
const presenterName: V = (v) => (typeof v === 'string' && v.length <= PRESENT_NAME_MAX ? v : BAD);
|
|
975
|
+
const insets: V = (v) => clampInsets(v) ?? BAD;
|
|
976
|
+
/** S10.4 — a designRoot-relative `.css` path; the same rule as the shell's `DS_CSS_REL` (no URL, no `..`). */
|
|
977
|
+
const DS_CSS_REL = /^(?!\/)(?!.*\.\.)[A-Za-z0-9_][A-Za-z0-9 ._/-]{0,255}\.css$/;
|
|
978
|
+
const dsCssPath: V = (v) => (typeof v === 'string' && DS_CSS_REL.test(v) ? v : BAD);
|
|
979
|
+
/** S10.4 — a `data-ds-rev` value: `head` or a revision id. */
|
|
980
|
+
const PIN_VALUE = /^(?:head|[0-9a-f]{64})$/;
|
|
981
|
+
export const DS_PINS_MAX = 16;
|
|
982
|
+
const pinValue: V = (v) => (typeof v === 'string' && PIN_VALUE.test(v) ? v : BAD);
|
|
983
|
+
const pinValues: V = (v) =>
|
|
984
|
+
Array.isArray(v) && v.length <= DS_PINS_MAX ? arrOf(pinValue)(v) : BAD;
|
|
985
|
+
/** S10.8 — the element ids a left-out canvas dots: `data-cd-id` values, capped (client/v2/ds/update-dots.js). */
|
|
986
|
+
export const DS_DOTS_MAX = 200;
|
|
987
|
+
const DOT_ID = /^[A-Za-z0-9_.:-]{1,128}$/;
|
|
988
|
+
const dotId: V = (v) => (typeof v === 'string' && DOT_ID.test(v) ? v : BAD);
|
|
989
|
+
const dotIds: V = (v) => (Array.isArray(v) && v.length <= DS_DOTS_MAX ? arrOf(dotId)(v) : BAD);
|
|
990
|
+
/** S10.16c — `ds-theme-preview`: the board's own Light | Dark. */
|
|
991
|
+
const dsThemeMode: V = lit('light', 'dark');
|
|
992
|
+
/** S10.16c — `ds-marks`: custom-property names (the board's `safeCssName`), at most this many per list. */
|
|
993
|
+
export const DS_MARKS_MAX = 200;
|
|
994
|
+
const MARK_NAME = /^--[A-Za-z0-9_-]{1,128}$/;
|
|
995
|
+
const markName: V = (v) => (typeof v === 'string' && MARK_NAME.test(v) ? v : BAD);
|
|
996
|
+
const markNames: V = (v) =>
|
|
997
|
+
Array.isArray(v) && v.length <= DS_MARKS_MAX ? arrOf(markName)(v) : BAD;
|
|
998
|
+
/** S10.16c — `ds-make-states`: the seven sections of a design system board (ds/board/types.ts SECTIONS, pinned by
|
|
999
|
+
* test/ds-board-dgn-messages.test.tsx) and the three words a section can be in. */
|
|
1000
|
+
export const DS_SECTION_KINDS = [
|
|
1001
|
+
'brand',
|
|
1002
|
+
'colour',
|
|
1003
|
+
'type',
|
|
1004
|
+
'space',
|
|
1005
|
+
'motion',
|
|
1006
|
+
'components',
|
|
1007
|
+
'patterns',
|
|
1008
|
+
] as const;
|
|
1009
|
+
const dsSectionState: V = lit('waiting', 'drawing', 'done');
|
|
1010
|
+
const dsMakeSections: V = (v) => {
|
|
1011
|
+
if (!isPlain(v)) return BAD;
|
|
1012
|
+
const out: Record<string, unknown> = {};
|
|
1013
|
+
for (const k of Object.keys(v)) {
|
|
1014
|
+
if (!(DS_SECTION_KINDS as readonly string[]).includes(k)) return BAD;
|
|
1015
|
+
const r = dsSectionState(v[k]);
|
|
1016
|
+
if (r === BAD) return BAD;
|
|
1017
|
+
out[k] = r;
|
|
1018
|
+
}
|
|
1019
|
+
return out;
|
|
1020
|
+
};
|
|
1021
|
+
/** S10.9 — the reach view: how many elements one `ds-rects` asks about (the model's ring cap, reach-model.js). */
|
|
1022
|
+
export const DS_RECTS_MAX = 500;
|
|
1023
|
+
const rectIds: V = (v) => (Array.isArray(v) && v.length <= DS_RECTS_MAX ? arrOf(dotId)(v) : BAD);
|
|
1024
|
+
const rectSeq: V = intIn(0, 1_000_000);
|
|
1025
|
+
const rectArtboard: V = (v) => (v === null || dotId(v) !== BAD ? v : BAD);
|
|
1026
|
+
const rectCells: V = (v) =>
|
|
1027
|
+
Array.isArray(v) && v.length <= DS_RECTS_MAX
|
|
1028
|
+
? arrOf(shape({ id: dotId, x: num, y: num, w: num, h: num }))(v)
|
|
1029
|
+
: BAD;
|
|
1030
|
+
const dsPinEntry = shape({ tokens: dsCssPath, components: nul(dsCssPath) });
|
|
1031
|
+
const dsPinRevs: V = (v) => {
|
|
1032
|
+
if (!isPlain(v)) return BAD;
|
|
1033
|
+
const keys = Object.keys(v);
|
|
1034
|
+
if (keys.length > DS_PINS_MAX) return BAD;
|
|
1035
|
+
const out: Record<string, unknown> = Object.create(null);
|
|
1036
|
+
for (const k of keys) {
|
|
1037
|
+
if (pinValue(k) === BAD) return BAD;
|
|
1038
|
+
const r = dsPinEntry(v[k]);
|
|
1039
|
+
if (r === BAD) return BAD;
|
|
1040
|
+
out[k] = r;
|
|
1041
|
+
}
|
|
1042
|
+
return out;
|
|
1043
|
+
};
|
|
1044
|
+
const rootClassName: V = (v) =>
|
|
1045
|
+
typeof v === 'string' && /^[A-Za-z_][\w-]{0,63}$/.test(v) ? v : BAD;
|
|
1046
|
+
/** S3.6b — `present-run`: at most this many artboards (the follow fields' 0..2000 index range). */
|
|
1047
|
+
export const PRESENT_RUN_MAX = 2000;
|
|
1048
|
+
const presentRunCell = shape({
|
|
1049
|
+
id: shortStr(200),
|
|
1050
|
+
label: shortStr(200),
|
|
1051
|
+
x: num,
|
|
1052
|
+
y: num,
|
|
1053
|
+
w: num,
|
|
1054
|
+
h: num,
|
|
1055
|
+
});
|
|
1056
|
+
const presentRunList: V = (v) =>
|
|
1057
|
+
Array.isArray(v) && v.length <= PRESENT_RUN_MAX ? arrOf(presentRunCell)(v) : BAD;
|
|
1058
|
+
/** `peers` (V2-4.3b): a planted or oversized list is REJECTED whole, never trimmed. */
|
|
1059
|
+
/** S7.24b — the most artboard ids one `dim-artboards` carries (client/v2/kinds/layers-kind-model.js sends no more). */
|
|
1060
|
+
export const DIM_IDS_MAX = 500;
|
|
1061
|
+
export const PEERS_MAX = 32;
|
|
1062
|
+
export const PEER_NAME_MAX = 64;
|
|
1063
|
+
const PEER_COLOR = /^(#[0-9a-f]{3,8}|oklch\([0-9.%\s/-]{1,40}\))$/i;
|
|
1064
|
+
const PEER_ARTBOARD = /^[A-Za-z0-9_-]{1,64}$/;
|
|
1065
|
+
/** P8 G2 (b) — the room-stamped role; a closed set, any other value is dropped (the peer stays). */
|
|
1066
|
+
export type PeerRole = 'owner' | 'member' | 'viewer' | 'observer';
|
|
1067
|
+
const PEER_ROLES: readonly unknown[] = ['owner', 'member', 'viewer', 'observer'];
|
|
1068
|
+
type PeerEntry = {
|
|
1069
|
+
clientID: number;
|
|
1070
|
+
name: string;
|
|
1071
|
+
color?: string;
|
|
1072
|
+
following?: boolean;
|
|
1073
|
+
artboard?: string;
|
|
1074
|
+
idleSince?: number;
|
|
1075
|
+
surface?: 'browser';
|
|
1076
|
+
inComments?: boolean;
|
|
1077
|
+
role?: PeerRole;
|
|
1078
|
+
};
|
|
1079
|
+
const peerList: V = (v) => {
|
|
1080
|
+
if (!Array.isArray(v) || v.length > PEERS_MAX) return BAD;
|
|
1081
|
+
const out: PeerEntry[] = [];
|
|
1082
|
+
for (const x of v) {
|
|
1083
|
+
if (!isPlain(x)) return BAD;
|
|
1084
|
+
const { clientID, name, color, following, artboard, idleSince, surface, inComments, role } = x;
|
|
1085
|
+
if (typeof clientID !== 'number' || !Number.isSafeInteger(clientID) || clientID < 0) return BAD;
|
|
1086
|
+
if (typeof name !== 'string' || name.length > PEER_NAME_MAX) return BAD;
|
|
1087
|
+
if (color !== undefined && (typeof color !== 'string' || !PEER_COLOR.test(color))) return BAD;
|
|
1088
|
+
if (following !== undefined && typeof following !== 'boolean') return BAD;
|
|
1089
|
+
if (artboard !== undefined && (typeof artboard !== 'string' || !PEER_ARTBOARD.test(artboard)))
|
|
1090
|
+
return BAD;
|
|
1091
|
+
if (
|
|
1092
|
+
idleSince !== undefined &&
|
|
1093
|
+
(typeof idleSince !== 'number' || !Number.isSafeInteger(idleSince) || idleSince <= 0)
|
|
1094
|
+
)
|
|
1095
|
+
return BAD;
|
|
1096
|
+
if (surface !== undefined && surface !== 'browser') return BAD;
|
|
1097
|
+
if (inComments !== undefined && typeof inComments !== 'boolean') return BAD;
|
|
1098
|
+
const peer: PeerEntry = { clientID, name };
|
|
1099
|
+
if (color !== undefined) peer.color = color;
|
|
1100
|
+
if (following === true) peer.following = true;
|
|
1101
|
+
if (artboard !== undefined) peer.artboard = artboard;
|
|
1102
|
+
if (idleSince !== undefined) peer.idleSince = idleSince;
|
|
1103
|
+
if (surface === 'browser') peer.surface = 'browser';
|
|
1104
|
+
if (inComments === true) peer.inComments = true;
|
|
1105
|
+
if (PEER_ROLES.includes(role)) peer.role = role as PeerRole;
|
|
1106
|
+
out.push(peer);
|
|
1107
|
+
}
|
|
1108
|
+
return out;
|
|
1109
|
+
};
|
|
1110
|
+
|
|
1111
|
+
/** S2.18 — hold labels / tags (`hold-view`, `ai-holds`): bounded text, rendered as text only. */
|
|
1112
|
+
export const HOLD_LABEL_MAX = 120;
|
|
1113
|
+
export const AI_HOLDS_MAX = 256;
|
|
1114
|
+
const holdText: V = (v) => (typeof v === 'string' && v.length <= HOLD_LABEL_MAX ? v : BAD);
|
|
1115
|
+
const aiHoldList: V = (v) =>
|
|
1116
|
+
Array.isArray(v) && v.length <= AI_HOLDS_MAX
|
|
1117
|
+
? arrOf(
|
|
1118
|
+
shape({
|
|
1119
|
+
artboard: holdText,
|
|
1120
|
+
element: holdText,
|
|
1121
|
+
occurrence: opt((x) =>
|
|
1122
|
+
typeof x === 'number' && Number.isInteger(x) && x >= 0 && x < 10000 ? x : BAD
|
|
1123
|
+
),
|
|
1124
|
+
tag: holdText,
|
|
1125
|
+
mine: bool,
|
|
1126
|
+
scope: opt(bool),
|
|
1127
|
+
point: opt(bool),
|
|
1128
|
+
})
|
|
1129
|
+
)(v)
|
|
1130
|
+
: BAD;
|
|
1131
|
+
|
|
1132
|
+
/** S4.15 — `ai-seen`: where the AI points, as host refs (`ab:<id>` | `el:<artboard>/<id>`) and a bounded tag. */
|
|
1133
|
+
export const AI_SEEN_MAX = 8;
|
|
1134
|
+
export const AI_SEEN_TAG_MAX = 40;
|
|
1135
|
+
const SEEN_ID = '[A-Za-z0-9_.:-]{1,128}';
|
|
1136
|
+
const SEEN_REF = new RegExp(`^(?:ab:${SEEN_ID}|el:${SEEN_ID}/${SEEN_ID})$`);
|
|
1137
|
+
/** V2-8.5 c7 - how many copy pairs one `ai-copies` may carry. */
|
|
1138
|
+
export const AI_COPIES_MAX = 20;
|
|
1139
|
+
const aiCopiesList: V = (v) =>
|
|
1140
|
+
Array.isArray(v) && v.length <= AI_COPIES_MAX ? arrOf(shape({ from: cdId, to: cdId }))(v) : BAD;
|
|
1141
|
+
|
|
1142
|
+
const aiSeenList: V = (v) =>
|
|
1143
|
+
Array.isArray(v) && v.length <= AI_SEEN_MAX
|
|
1144
|
+
? arrOf(
|
|
1145
|
+
shape({
|
|
1146
|
+
ref: (x) => (typeof x === 'string' && SEEN_REF.test(x) ? x : BAD),
|
|
1147
|
+
tag: (x) => (typeof x === 'string' && x.length <= AI_SEEN_TAG_MAX ? x : BAD),
|
|
1148
|
+
})
|
|
1149
|
+
)(v)
|
|
1150
|
+
: BAD;
|
|
1151
|
+
|
|
1152
|
+
/** S9.22 — the comment bridge. The op names the door takes (comments/ops.ts `parseCommentOp`). */
|
|
1153
|
+
export const COMMENT_OPS = ['add', 'reply', 'resolve', 'reopen', 'edit-own', 'delete-own'] as const;
|
|
1154
|
+
/** S4.V4 G5 — the sticky ↔ comment conversion asks the thread makes; the SHELL answers them (S4.7 routes,
|
|
1155
|
+
* its own session conversion map), never the comment door. `{ op, commentId }` only. */
|
|
1156
|
+
export const COMMENT_CONVERT_OPS = ['to-sticky', 'convert-undo', 'convert-undoable'] as const;
|
|
1157
|
+
const reqIdV: V = (v) =>
|
|
1158
|
+
(typeof v === 'string' && v.length > 0 && v.length <= 64) ||
|
|
1159
|
+
(typeof v === 'number' && Number.isSafeInteger(v))
|
|
1160
|
+
? v
|
|
1161
|
+
: BAD;
|
|
1162
|
+
/** The op body: a plain object with a known `op`, every value under the JSON caps. */
|
|
1163
|
+
const commentOpV: V = (v) => {
|
|
1164
|
+
if (!isPlain(v)) return BAD;
|
|
1165
|
+
if ((COMMENT_CONVERT_OPS as readonly unknown[]).includes(v.op))
|
|
1166
|
+
return typeof v.commentId === 'string' && /^[A-Za-z0-9_]{1,64}$/.test(v.commentId)
|
|
1167
|
+
? { op: v.op, commentId: v.commentId }
|
|
1168
|
+
: BAD;
|
|
1169
|
+
if (!(COMMENT_OPS as readonly unknown[]).includes(v.op)) return BAD;
|
|
1170
|
+
return json(v);
|
|
1171
|
+
};
|
|
1172
|
+
const mentionPerson = shape({ id: shortStr(200), name: shortStr(120), role: opt(shortStr(40)) });
|
|
1173
|
+
/** S8.19 — `asset-state`: a planted or oversized list is REJECTED whole, never trimmed. */
|
|
1174
|
+
export const ASSET_STATE_MAX = 256;
|
|
1175
|
+
const ASSET_WHO_NAME_MAX = 64;
|
|
1176
|
+
const assetWho = shape({
|
|
1177
|
+
name: nul((v) =>
|
|
1178
|
+
typeof v === 'string' && v.length <= ASSET_WHO_NAME_MAX && !v.includes('@') ? v : BAD
|
|
1179
|
+
),
|
|
1180
|
+
kind: nul(lit('mac', 'pc', 'linux')),
|
|
1181
|
+
self: bool,
|
|
1182
|
+
});
|
|
1183
|
+
const assetStateItem = shape({
|
|
1184
|
+
rel: shortStr(512),
|
|
1185
|
+
state: lit('here', 'uploading', 'waiting', 'missing'),
|
|
1186
|
+
who: opt(assetWho),
|
|
1187
|
+
syncing: opt(bool),
|
|
1188
|
+
progress: opt(unit),
|
|
1189
|
+
});
|
|
1190
|
+
const assetStateList: V = (v) =>
|
|
1191
|
+
Array.isArray(v) && v.length <= ASSET_STATE_MAX ? arrOf(assetStateItem)(v) : BAD;
|
|
1192
|
+
|
|
1193
|
+
/** S8.16 — `gen-takes`: content-addressed picture paths only, refused whole past the cap. */
|
|
1194
|
+
export const GEN_TAKES_ASSETS_MAX = 256;
|
|
1195
|
+
const GEN_TAKE_ASSET_RE = /^assets\/[0-9a-f]{8}\.[A-Za-z0-9]{1,8}$/;
|
|
1196
|
+
const genTakeAssets: V = (v) =>
|
|
1197
|
+
Array.isArray(v) &&
|
|
1198
|
+
v.length <= GEN_TAKES_ASSETS_MAX &&
|
|
1199
|
+
v.every((x) => typeof x === 'string' && GEN_TAKE_ASSET_RE.test(x))
|
|
1200
|
+
? v.slice()
|
|
1201
|
+
: BAD;
|
|
1202
|
+
|
|
1203
|
+
/** A top-level parser over exactly the interface's keys (the type pins the key set). */
|
|
1204
|
+
function p<T>(
|
|
1205
|
+
fields: NoInfer<{ [K in keyof Required<T>]: V }>
|
|
1206
|
+
): (raw: Record<string, unknown>) => T | null {
|
|
1207
|
+
const s = shape(fields as Record<string, V>);
|
|
1208
|
+
return (raw) => {
|
|
1209
|
+
const r = s(raw);
|
|
1210
|
+
return r === BAD ? null : (r as T);
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
const none = (raw: Record<string, unknown>): Empty | null => (isPlain(raw) ? {} : null);
|
|
1214
|
+
|
|
1215
|
+
const anchor = {
|
|
1216
|
+
refId: opt(str),
|
|
1217
|
+
refIndex: opt(num),
|
|
1218
|
+
artboardId: opt(nul(str)),
|
|
1219
|
+
position: opt(str),
|
|
1220
|
+
};
|
|
1221
|
+
const tlId = { id: opt(str) };
|
|
1222
|
+
const elementRef = shape({ artboard: str, element: str, occurrence: opt(num) });
|
|
1223
|
+
const assetDropTarget = shape({
|
|
1224
|
+
kind: lit('picture', 'frame', 'artboard'),
|
|
1225
|
+
artboard: shortStr(200),
|
|
1226
|
+
element: opt(shortStr(200)),
|
|
1227
|
+
occurrence: opt(intIn(1, MAX_ARR)),
|
|
1228
|
+
});
|
|
1229
|
+
/** An array no longer than `max` (refused whole past it, never trimmed). */
|
|
1230
|
+
const capped =
|
|
1231
|
+
(max: number, f: V): V =>
|
|
1232
|
+
(v) =>
|
|
1233
|
+
Array.isArray(v) && v.length <= max ? f(v) : BAD;
|
|
1234
|
+
const askLocator = shape({
|
|
1235
|
+
id: opt(shortStr(128)),
|
|
1236
|
+
tag: opt(shortStr(24)),
|
|
1237
|
+
text: opt(shortStr(160)),
|
|
1238
|
+
selector: opt(shortStr(200)),
|
|
1239
|
+
index: opt(num),
|
|
1240
|
+
});
|
|
1241
|
+
const crumb = shape({ label: str, ref: nul(elementRef) });
|
|
1242
|
+
const EDIT_OP_CODES = ['held-by-ai', 'locked', 'stale', 'invalid', 'forbidden'] as const;
|
|
1243
|
+
|
|
1244
|
+
// ─── the table ────────────────────────────────────────────────────────────────
|
|
1245
|
+
|
|
1246
|
+
type C2S = { [K in keyof CanvasToShell]: DgnSpec<CanvasToShell[K], ShellGate> };
|
|
1247
|
+
type S2C = { [K in keyof ShellToCanvas]: DgnSpec<ShellToCanvas[K], CanvasGate> };
|
|
1248
|
+
const BR = 'h/use-canvas-bridge'; // client/hooks/use-canvas-bridge.jsx
|
|
1249
|
+
const CS = 'canvas-shell';
|
|
1250
|
+
|
|
1251
|
+
const c2s: C2S = {
|
|
1252
|
+
loaded: { gate: 'any', status: 'live', owner: BR, parse: p({ file: str }) },
|
|
1253
|
+
'canvas-rendered': { gate: 'active', status: 'live', owner: BR, parse: p({ file: str }) },
|
|
1254
|
+
'canvas-failed': { gate: 'active', status: 'live', owner: BR, parse: p({ file: str }) },
|
|
1255
|
+
'canvas-mounted': {
|
|
1256
|
+
gate: 'any',
|
|
1257
|
+
status: 'legacy',
|
|
1258
|
+
owner: 'tpl/_shell.html (probe)',
|
|
1259
|
+
orphan: 'no-handler',
|
|
1260
|
+
parse: p({ file: str, children: num }),
|
|
1261
|
+
},
|
|
1262
|
+
// S6.12 — handled by client/v2/create/use-render-error.js; `frame` (not `active`): a background tab's
|
|
1263
|
+
// canvas that breaks must be known when it is brought forward.
|
|
1264
|
+
'render-error': {
|
|
1265
|
+
gate: 'frame',
|
|
1266
|
+
status: 'live',
|
|
1267
|
+
owner: 'v2/create/use-render-error',
|
|
1268
|
+
parse: p({ file: str, message: shortStr(600) }),
|
|
1269
|
+
},
|
|
1270
|
+
'render-ok': {
|
|
1271
|
+
gate: 'frame',
|
|
1272
|
+
status: 'live',
|
|
1273
|
+
owner: 'v2/create/use-render-error',
|
|
1274
|
+
parse: p({ file: str }),
|
|
1275
|
+
},
|
|
1276
|
+
// S10.8 — handled by client/v2/ds/use-ds-frames.js (opens the review for the ACTIVE canvas's system)
|
|
1277
|
+
'ds-review': { gate: 'active', status: 'live', owner: 'h/use-ds-frames', parse: none },
|
|
1278
|
+
// S10.9 — sent by the shell template's `ds-rects` region, read by client/v2/ds/reach-view.jsx (the frames it
|
|
1279
|
+
// framed itself, hence 'frame': a reach frame is never the active canvas)
|
|
1280
|
+
'ds-rects-result': {
|
|
1281
|
+
gate: 'frame',
|
|
1282
|
+
status: 'live',
|
|
1283
|
+
owner: 'v2/ds/reach-view',
|
|
1284
|
+
parse: p({
|
|
1285
|
+
seq: rectSeq,
|
|
1286
|
+
view: shape({ w: num, h: num }),
|
|
1287
|
+
label: opt(shortStr(120)),
|
|
1288
|
+
rects: rectCells,
|
|
1289
|
+
}),
|
|
1290
|
+
},
|
|
1291
|
+
// S10.4 — handled by client/v2/ds/pins.js (createPinsHost.onMessage)
|
|
1292
|
+
'ds-pins-want': {
|
|
1293
|
+
gate: 'active',
|
|
1294
|
+
status: 'live',
|
|
1295
|
+
owner: 'v2/ds/pins',
|
|
1296
|
+
parse: p({ revs: pinValues }),
|
|
1297
|
+
},
|
|
1298
|
+
'canvas-expired': { gate: 'frame', status: 'live', owner: 'h/use-shell-core', parse: none },
|
|
1299
|
+
// S4.9 — sent by annotations-layer after a write lands; the shell relays it to the annotation list
|
|
1300
|
+
// (ANNOTATIONS_CHANGED_EVENT) in the same slice that mounts the list (S4.17's mount point).
|
|
1301
|
+
'annotations-changed': {
|
|
1302
|
+
gate: 'active',
|
|
1303
|
+
status: 'live',
|
|
1304
|
+
orphan: 'no-handler',
|
|
1305
|
+
owner: 'annotations-layer (S4.9) → annotation-list (S4.17)',
|
|
1306
|
+
parse: p({ file: str }),
|
|
1307
|
+
},
|
|
1308
|
+
'annotation-to-comment': {
|
|
1309
|
+
gate: 'active',
|
|
1310
|
+
status: 'live',
|
|
1311
|
+
owner: 'annotations-layer (S4.12) → shell convert (routes/annotations.ts, S4.7)',
|
|
1312
|
+
parse: p({ id: annotationIdV }),
|
|
1313
|
+
},
|
|
1314
|
+
'annotation-selection': {
|
|
1315
|
+
gate: 'active',
|
|
1316
|
+
status: 'live',
|
|
1317
|
+
owner: 'annotations-layer (S4.12) → AI scope chip (S4.15, S5.8)',
|
|
1318
|
+
parse: p({
|
|
1319
|
+
ids: capped(500, arrOf(annotationIdV)),
|
|
1320
|
+
kinds: recOf(count, 16),
|
|
1321
|
+
artboards: capped(200, arrOf(shortStr(128))),
|
|
1322
|
+
}),
|
|
1323
|
+
},
|
|
1324
|
+
'annotation-toast': {
|
|
1325
|
+
gate: 'active',
|
|
1326
|
+
status: 'live',
|
|
1327
|
+
owner: 'annotations-layer (S4.12) → shell toast',
|
|
1328
|
+
parse: p({ v: lit(1), message: shortStr(300), undo: bool }),
|
|
1329
|
+
},
|
|
1330
|
+
'annotation-ask-ai': {
|
|
1331
|
+
gate: 'active',
|
|
1332
|
+
status: 'live',
|
|
1333
|
+
owner: 'annotations-layer (S4.12) → shell AI chat',
|
|
1334
|
+
parse: p({ v: lit(1) }),
|
|
1335
|
+
},
|
|
1336
|
+
// p8-dead-reasons (`history.object`) — the object menu / sticky menu row. The shell takes no path from it: the
|
|
1337
|
+
// object must be one the active frame already showed (its selection, its layers tree, its annotation
|
|
1338
|
+
// selection — client/v2/history/object-history-ask.js), and the panel opens through the registry action.
|
|
1339
|
+
'object-history': {
|
|
1340
|
+
gate: 'active',
|
|
1341
|
+
status: 'live',
|
|
1342
|
+
owner: 'editing/object-menu.tsx + annotations-layer (sticky menu) → shell history.object',
|
|
1343
|
+
parse: p({
|
|
1344
|
+
artboard: opt(linkArtboardIdV),
|
|
1345
|
+
element: opt(shortStr(128)),
|
|
1346
|
+
annotation: opt(annotationIdV),
|
|
1347
|
+
}),
|
|
1348
|
+
},
|
|
1349
|
+
'view-only-gesture': {
|
|
1350
|
+
gate: 'active',
|
|
1351
|
+
status: 'live',
|
|
1352
|
+
owner: 'view-only-gesture (S9.21b) → shell access host tip',
|
|
1353
|
+
parse: p({ v: lit(1), x: opt(intIn(0, 16384)), y: opt(intIn(0, 16384)) }),
|
|
1354
|
+
},
|
|
1355
|
+
'vote-cast': {
|
|
1356
|
+
gate: 'active',
|
|
1357
|
+
status: 'live',
|
|
1358
|
+
owner: 'annotations/ui/vote-dots (S4.14) → shell vote store (routes/votes.ts)',
|
|
1359
|
+
parse: p({ artboard: linkArtboardIdV, remove: opt(bool) }),
|
|
1360
|
+
},
|
|
1361
|
+
'vote-board': {
|
|
1362
|
+
gate: 'active',
|
|
1363
|
+
status: 'live',
|
|
1364
|
+
owner: 'annotations/ui/vote-dots + editing/artboard-menu (S4.14) → shell vote sheet',
|
|
1365
|
+
parse: p({
|
|
1366
|
+
artboards: capped(
|
|
1367
|
+
200,
|
|
1368
|
+
arrOf(shape({ id: linkArtboardIdV, label: shortStr(120), x: num, y: num, w: num, h: num }))
|
|
1369
|
+
),
|
|
1370
|
+
open: opt(bool),
|
|
1371
|
+
focus: opt(linkArtboardIdV),
|
|
1372
|
+
}),
|
|
1373
|
+
},
|
|
1374
|
+
'annotations-visibility': {
|
|
1375
|
+
gate: 'active',
|
|
1376
|
+
status: 'live',
|
|
1377
|
+
owner: 'annotations-layer ⇧P (S4.18) → shell use-photo-and-timeline',
|
|
1378
|
+
parse: p({ v: lit(1), visible: bool }),
|
|
1379
|
+
},
|
|
1380
|
+
'canvas-notice': {
|
|
1381
|
+
gate: 'active',
|
|
1382
|
+
status: 'live',
|
|
1383
|
+
owner: 'canvas-notice-message',
|
|
1384
|
+
parse: p({ message: str, kind: lit('info', 'success', 'error', 'warning', 'undo') }),
|
|
1385
|
+
},
|
|
1386
|
+
'embed-escape': { gate: 'active', status: 'live', owner: 'c/embed-view', parse: none },
|
|
1387
|
+
'select-set': {
|
|
1388
|
+
gate: 'active',
|
|
1389
|
+
status: 'live',
|
|
1390
|
+
owner: BR,
|
|
1391
|
+
parse: p({
|
|
1392
|
+
selection: nul((v) => (Array.isArray(v) ? arrOf(jsonObj)(v) : jsonObj(v))),
|
|
1393
|
+
refs: opt(arrOf(elementRef)),
|
|
1394
|
+
crumbs: opt(arrOf(crumb)),
|
|
1395
|
+
kind: opt(lit(...SELECTION_KINDS)),
|
|
1396
|
+
}),
|
|
1397
|
+
},
|
|
1398
|
+
'edit-text': {
|
|
1399
|
+
gate: 'active',
|
|
1400
|
+
status: 'live',
|
|
1401
|
+
owner: BR,
|
|
1402
|
+
parse: p({ id: str, file: str, text: str, occurrence: opt(num), before: opt(str) }),
|
|
1403
|
+
},
|
|
1404
|
+
'apply-edit': {
|
|
1405
|
+
gate: 'active',
|
|
1406
|
+
status: 'live',
|
|
1407
|
+
owner: 'client/apply-edit-request',
|
|
1408
|
+
parse: p({
|
|
1409
|
+
requestId: str,
|
|
1410
|
+
op: json,
|
|
1411
|
+
canvas: opt(json),
|
|
1412
|
+
id: opt(json),
|
|
1413
|
+
key: opt(json),
|
|
1414
|
+
value: opt(json),
|
|
1415
|
+
from: opt(json),
|
|
1416
|
+
occurrence: opt(json),
|
|
1417
|
+
}),
|
|
1418
|
+
},
|
|
1419
|
+
'undo-barrier': { gate: 'active', status: 'live', owner: BR, parse: p({ requestId: str }) },
|
|
1420
|
+
'undo-key': {
|
|
1421
|
+
gate: 'active',
|
|
1422
|
+
status: 'live',
|
|
1423
|
+
owner: 'v2/undo/use-undo-mode-lane (S2.20b)',
|
|
1424
|
+
parse: p({ redo: bool }),
|
|
1425
|
+
},
|
|
1426
|
+
'take-step': {
|
|
1427
|
+
gate: 'active',
|
|
1428
|
+
status: 'live',
|
|
1429
|
+
owner: 'v2/assets/takes (S8.16)',
|
|
1430
|
+
parse: p({ dir: lit('next', 'prev') }),
|
|
1431
|
+
},
|
|
1432
|
+
'edit-op': {
|
|
1433
|
+
gate: 'active',
|
|
1434
|
+
status: 'live',
|
|
1435
|
+
owner: 'editing (S2.1)',
|
|
1436
|
+
parse: p({
|
|
1437
|
+
requestId: str,
|
|
1438
|
+
op: str,
|
|
1439
|
+
targets: arrOf(elementRef),
|
|
1440
|
+
params: opt(jsonObj),
|
|
1441
|
+
expectRev: opt(str),
|
|
1442
|
+
}),
|
|
1443
|
+
},
|
|
1444
|
+
'asset-drop-target': {
|
|
1445
|
+
gate: 'active',
|
|
1446
|
+
status: 'live',
|
|
1447
|
+
owner: 'client/v2/assets/canvas-drop-catcher (r3)',
|
|
1448
|
+
parse: p({ requestId: shortStr(64), target: nul(assetDropTarget) }),
|
|
1449
|
+
},
|
|
1450
|
+
'active-artboard': { gate: 'active', status: 'live', owner: BR, parse: p({ id: nul(str) }) },
|
|
1451
|
+
'reorder-slot': {
|
|
1452
|
+
gate: 'active',
|
|
1453
|
+
status: 'live',
|
|
1454
|
+
owner: 'editing/reorder-slot',
|
|
1455
|
+
parse: (raw) => {
|
|
1456
|
+
const r = p<CanvasToShell['reorder-slot']>({
|
|
1457
|
+
index: intIn(0, MAX_ARR),
|
|
1458
|
+
total: intIn(0, MAX_ARR),
|
|
1459
|
+
parentId: opt(cdId),
|
|
1460
|
+
})(raw);
|
|
1461
|
+
// a slot lies inside its total and names its frame; index 0 is "the drag ended"
|
|
1462
|
+
if (!r || r.index > r.total) return null;
|
|
1463
|
+
if (r.index > 0 && r.parentId === undefined) return null;
|
|
1464
|
+
return r;
|
|
1465
|
+
},
|
|
1466
|
+
},
|
|
1467
|
+
'layers-tree': {
|
|
1468
|
+
gate: 'active',
|
|
1469
|
+
status: 'live',
|
|
1470
|
+
owner: BR,
|
|
1471
|
+
parse: p({ artboardId: nul(str), tree: arrOf(jsonObj) }),
|
|
1472
|
+
},
|
|
1473
|
+
'open-inspector': { gate: 'active', status: 'live', owner: BR, parse: p({ tab: opt(str) }) },
|
|
1474
|
+
'copy-style': { gate: 'active', status: 'live', owner: BR, parse: none },
|
|
1475
|
+
'paste-style': { gate: 'active', status: 'live', owner: BR, parse: p({ id: str }) },
|
|
1476
|
+
'insert-request': {
|
|
1477
|
+
gate: 'active',
|
|
1478
|
+
status: 'live',
|
|
1479
|
+
owner: BR,
|
|
1480
|
+
parse: p({ ...anchor, kind: lit('div', 'text', 'image'), src: opt(str) }),
|
|
1481
|
+
},
|
|
1482
|
+
'insert-image-request': { gate: 'active', status: 'live', owner: BR, parse: p(anchor) },
|
|
1483
|
+
'delete-request': {
|
|
1484
|
+
gate: 'active',
|
|
1485
|
+
status: 'live',
|
|
1486
|
+
owner: BR,
|
|
1487
|
+
parse: p({ id: str, idIndex: opt(num) }),
|
|
1488
|
+
},
|
|
1489
|
+
'duplicate-request': {
|
|
1490
|
+
gate: 'active',
|
|
1491
|
+
status: 'live',
|
|
1492
|
+
owner: BR,
|
|
1493
|
+
parse: p({ id: str, idIndex: opt(num) }),
|
|
1494
|
+
},
|
|
1495
|
+
'reorder-request': {
|
|
1496
|
+
gate: 'active',
|
|
1497
|
+
status: 'live',
|
|
1498
|
+
owner: BR,
|
|
1499
|
+
parse: p({ id: str, refId: str, position: str, idIndex: opt(num), refIndex: opt(num) }),
|
|
1500
|
+
},
|
|
1501
|
+
'reorder-revert': {
|
|
1502
|
+
gate: 'active',
|
|
1503
|
+
status: 'live',
|
|
1504
|
+
owner: BR,
|
|
1505
|
+
parse: p({ seq: num, dir: lit('undo', 'redo') }),
|
|
1506
|
+
},
|
|
1507
|
+
'reposition-request': {
|
|
1508
|
+
gate: 'active',
|
|
1509
|
+
status: 'live',
|
|
1510
|
+
owner: BR,
|
|
1511
|
+
parse: p({
|
|
1512
|
+
id: str,
|
|
1513
|
+
left: str,
|
|
1514
|
+
top: str,
|
|
1515
|
+
beforeLeft: opt(str),
|
|
1516
|
+
beforeTop: opt(str),
|
|
1517
|
+
idIndex: opt(num),
|
|
1518
|
+
}),
|
|
1519
|
+
},
|
|
1520
|
+
'resize-request': {
|
|
1521
|
+
gate: 'active',
|
|
1522
|
+
status: 'live',
|
|
1523
|
+
owner: BR,
|
|
1524
|
+
parse: p({ id: str, patch: strMap, before: opt(strMap), idIndex: opt(num) }),
|
|
1525
|
+
},
|
|
1526
|
+
'replace-media-request': {
|
|
1527
|
+
gate: 'active',
|
|
1528
|
+
status: 'live',
|
|
1529
|
+
owner: BR,
|
|
1530
|
+
parse: p({ id: str, before: opt(str) }),
|
|
1531
|
+
},
|
|
1532
|
+
'convert-to-absolute-request': {
|
|
1533
|
+
gate: 'active',
|
|
1534
|
+
status: 'live',
|
|
1535
|
+
owner: BR,
|
|
1536
|
+
parse: p({
|
|
1537
|
+
artboardId: opt(str),
|
|
1538
|
+
allowShared: opt(bool),
|
|
1539
|
+
containers: opt(arrOf(json)),
|
|
1540
|
+
dissolve: opt(arrOf(json)),
|
|
1541
|
+
containerId: opt(str),
|
|
1542
|
+
children: opt(arrOf(json)),
|
|
1543
|
+
containerSetRelative: opt(bool),
|
|
1544
|
+
}),
|
|
1545
|
+
},
|
|
1546
|
+
'delete-artboard-request': {
|
|
1547
|
+
gate: 'active',
|
|
1548
|
+
status: 'live',
|
|
1549
|
+
owner: BR,
|
|
1550
|
+
parse: p({ artboardId: str }),
|
|
1551
|
+
},
|
|
1552
|
+
'duplicate-artboard-request': {
|
|
1553
|
+
gate: 'active',
|
|
1554
|
+
status: 'live',
|
|
1555
|
+
owner: BR,
|
|
1556
|
+
parse: p({ artboardId: str, width: opt(num) }),
|
|
1557
|
+
},
|
|
1558
|
+
'rename-artboard-request': {
|
|
1559
|
+
gate: 'active',
|
|
1560
|
+
status: 'live',
|
|
1561
|
+
owner: BR,
|
|
1562
|
+
parse: p({ artboardId: str, label: str }),
|
|
1563
|
+
},
|
|
1564
|
+
'resize-artboard-request': {
|
|
1565
|
+
gate: 'active',
|
|
1566
|
+
status: 'live',
|
|
1567
|
+
owner: BR,
|
|
1568
|
+
parse: p({ artboardId: str, width: num, height: num }),
|
|
1569
|
+
},
|
|
1570
|
+
'set-artboard-kind-request': {
|
|
1571
|
+
gate: 'active',
|
|
1572
|
+
status: 'live',
|
|
1573
|
+
owner: BR,
|
|
1574
|
+
parse: p({ artboardId: str, kind: nul(str) }),
|
|
1575
|
+
},
|
|
1576
|
+
'open-timeline-request': {
|
|
1577
|
+
gate: 'active',
|
|
1578
|
+
status: 'live',
|
|
1579
|
+
owner: BR,
|
|
1580
|
+
parse: p({ artboardId: str }),
|
|
1581
|
+
},
|
|
1582
|
+
'replace-annotation-media-request': {
|
|
1583
|
+
gate: 'active',
|
|
1584
|
+
status: 'live',
|
|
1585
|
+
owner: BR,
|
|
1586
|
+
parse: p({ id: str, before: opt(str) }),
|
|
1587
|
+
},
|
|
1588
|
+
'edit-annotation-photo-request': {
|
|
1589
|
+
gate: 'active',
|
|
1590
|
+
status: 'live',
|
|
1591
|
+
owner: BR,
|
|
1592
|
+
parse: p({ id: str, asset: str }),
|
|
1593
|
+
},
|
|
1594
|
+
'comment-compose': {
|
|
1595
|
+
gate: 'active',
|
|
1596
|
+
status: 'live',
|
|
1597
|
+
owner: BR,
|
|
1598
|
+
parse: p({ selection: jsonObj }),
|
|
1599
|
+
},
|
|
1600
|
+
'comment-submit': {
|
|
1601
|
+
gate: 'active',
|
|
1602
|
+
status: 'live',
|
|
1603
|
+
owner: BR,
|
|
1604
|
+
parse: p({ payload: jsonObj }),
|
|
1605
|
+
},
|
|
1606
|
+
'comment-patch': {
|
|
1607
|
+
gate: 'active', // + owns-comment, in the handler
|
|
1608
|
+
status: 'live',
|
|
1609
|
+
owner: BR,
|
|
1610
|
+
parse: p({ id: str, patch: jsonObj }),
|
|
1611
|
+
},
|
|
1612
|
+
'comment-delete': { gate: 'active', status: 'live', owner: BR, parse: p({ id: str }) },
|
|
1613
|
+
'comment-click': { gate: 'active', status: 'live', owner: BR, parse: p({ id: str }) },
|
|
1614
|
+
// S9.22 — the shell runs the op as the session (the door judges it); an `add` is pinned to the
|
|
1615
|
+
// active canvas in the handler (client/v2/comments/comment-bridge.js), the iframe's `file` ignored.
|
|
1616
|
+
'comment-op': {
|
|
1617
|
+
gate: 'active',
|
|
1618
|
+
status: 'live',
|
|
1619
|
+
owner: 'v2/comments/comment-bridge (S9.22)',
|
|
1620
|
+
parse: p({ reqId: reqIdV, op: commentOpV }),
|
|
1621
|
+
},
|
|
1622
|
+
'comment-people-request': {
|
|
1623
|
+
gate: 'active',
|
|
1624
|
+
status: 'live',
|
|
1625
|
+
owner: 'v2/comments/comment-bridge (S9.22)',
|
|
1626
|
+
parse: p({ reqId: reqIdV }),
|
|
1627
|
+
},
|
|
1628
|
+
// A6b-2: S8.2 retired the in-canvas export dialog (export-dialog.tsx) that sent these two; the shell
|
|
1629
|
+
// still answers them (the gate in use-canvas-bridge stays), nothing in the tree asks.
|
|
1630
|
+
'export-request': {
|
|
1631
|
+
gate: 'active',
|
|
1632
|
+
status: 'live',
|
|
1633
|
+
owner: BR,
|
|
1634
|
+
orphan: 'no-sender',
|
|
1635
|
+
parse: p({ id: str, payload: jsonObj }),
|
|
1636
|
+
},
|
|
1637
|
+
'export-history-request': {
|
|
1638
|
+
gate: 'active',
|
|
1639
|
+
status: 'live',
|
|
1640
|
+
owner: BR,
|
|
1641
|
+
orphan: 'no-sender',
|
|
1642
|
+
parse: p({ id: str }),
|
|
1643
|
+
},
|
|
1644
|
+
'open-export': { gate: 'active', status: 'legacy', owner: BR, parse: p({ detail: jsonObj }) },
|
|
1645
|
+
'export-capture-progress': {
|
|
1646
|
+
gate: 'asked',
|
|
1647
|
+
status: 'live',
|
|
1648
|
+
owner: 'h/use-shell-core',
|
|
1649
|
+
parse: p({ id: str, current: num, total: num }),
|
|
1650
|
+
},
|
|
1651
|
+
'export-capture-done': {
|
|
1652
|
+
gate: 'asked',
|
|
1653
|
+
status: 'live',
|
|
1654
|
+
owner: 'h/use-shell-core',
|
|
1655
|
+
parse: p({ id: str, items: arrOf(jsonObj) }),
|
|
1656
|
+
},
|
|
1657
|
+
'export-capture-error': {
|
|
1658
|
+
gate: 'asked',
|
|
1659
|
+
status: 'live',
|
|
1660
|
+
owner: 'h/use-shell-core',
|
|
1661
|
+
parse: p({ id: str, message: str }),
|
|
1662
|
+
},
|
|
1663
|
+
'export-selection': {
|
|
1664
|
+
gate: 'asked',
|
|
1665
|
+
status: 'live',
|
|
1666
|
+
owner: 'c/app',
|
|
1667
|
+
parse: p({ id: str, selectors: arrOf(str) }),
|
|
1668
|
+
},
|
|
1669
|
+
'timeline-comps': {
|
|
1670
|
+
gate: 'active',
|
|
1671
|
+
status: 'live',
|
|
1672
|
+
owner: BR,
|
|
1673
|
+
parse: p({ comps: arrOf(jsonObj) }),
|
|
1674
|
+
},
|
|
1675
|
+
'timeline-frame': {
|
|
1676
|
+
gate: 'active',
|
|
1677
|
+
status: 'live',
|
|
1678
|
+
owner: BR,
|
|
1679
|
+
parse: p({ ...tlId, frame: num }),
|
|
1680
|
+
},
|
|
1681
|
+
'timeline-ended': { gate: 'active', status: 'live', owner: BR, parse: p(tlId) },
|
|
1682
|
+
// S7.8 — a click on the artboard's own play button (or any Player play / pause) tells the shell.
|
|
1683
|
+
'timeline-playing': {
|
|
1684
|
+
gate: 'active',
|
|
1685
|
+
status: 'live',
|
|
1686
|
+
owner: 'v2/timeline (S7.8)',
|
|
1687
|
+
parse: p({ ...tlId, playing: bool }),
|
|
1688
|
+
},
|
|
1689
|
+
key: {
|
|
1690
|
+
gate: 'active',
|
|
1691
|
+
status: 'live',
|
|
1692
|
+
owner: 'actions/registry (V2-1.3)',
|
|
1693
|
+
parse: p({ v: lit(1), chord: str, hint: opt(shape({ artboardId: opt(str) })) }),
|
|
1694
|
+
},
|
|
1695
|
+
'tool-cursor': { gate: 'active', status: 'live', owner: BR, parse: p({ tool: str }) },
|
|
1696
|
+
peers: {
|
|
1697
|
+
gate: 'active',
|
|
1698
|
+
status: 'live',
|
|
1699
|
+
owner: 'v2/shell/use-canvas-mode-lane (V2-4.3b)',
|
|
1700
|
+
parse: p({ peers: peerList }),
|
|
1701
|
+
},
|
|
1702
|
+
'hold-view': {
|
|
1703
|
+
gate: 'active',
|
|
1704
|
+
status: 'live',
|
|
1705
|
+
owner: 'v2/inspector/view-mode (S2.18)',
|
|
1706
|
+
parse: p({
|
|
1707
|
+
person: nul(shape({ name: holdText })),
|
|
1708
|
+
label: holdText,
|
|
1709
|
+
ai: nul(shape({ label: holdText, held: bool, mine: bool })),
|
|
1710
|
+
}),
|
|
1711
|
+
},
|
|
1712
|
+
select: {
|
|
1713
|
+
gate: 'active',
|
|
1714
|
+
status: 'legacy',
|
|
1715
|
+
owner: BR,
|
|
1716
|
+
orphan: 'no-sender',
|
|
1717
|
+
parse: p({ selection: jsonObj }),
|
|
1718
|
+
},
|
|
1719
|
+
'clear-select': {
|
|
1720
|
+
gate: 'active',
|
|
1721
|
+
status: 'legacy',
|
|
1722
|
+
owner: BR,
|
|
1723
|
+
orphan: 'no-sender',
|
|
1724
|
+
parse: none,
|
|
1725
|
+
},
|
|
1726
|
+
// S11.2 — live: the canvas reports its real artboard count (editing/empty-report.ts); the empty canvas
|
|
1727
|
+
// ("Your canvas is ready.") shows at 0.
|
|
1728
|
+
artboards: {
|
|
1729
|
+
gate: 'active',
|
|
1730
|
+
status: 'live',
|
|
1731
|
+
owner: 'v2/empty (S11.2); the shell bridge keeps the Layers count',
|
|
1732
|
+
parse: p({ count: num }),
|
|
1733
|
+
},
|
|
1734
|
+
// S11.2 — the shell draws the empty-artboard hint (Q5 of S11-slices): the copy lives in one table.
|
|
1735
|
+
'artboard-empty': {
|
|
1736
|
+
gate: 'active',
|
|
1737
|
+
status: 'live',
|
|
1738
|
+
owner: 'v2/empty (S11.2)',
|
|
1739
|
+
parse: p({ artboardId: nul(str), rect: nul(rect), label: opt(str), from: opt(str) }),
|
|
1740
|
+
},
|
|
1741
|
+
// S7.7 — the canvas says which artboard is selected and where; the shell's timeline island rises from a video.
|
|
1742
|
+
'artboard-anchor': {
|
|
1743
|
+
gate: 'active',
|
|
1744
|
+
status: 'live',
|
|
1745
|
+
owner: 'v2/timeline (S7.7)',
|
|
1746
|
+
parse: p({ artboardId: nul(str), kind: opt(str), label: opt(str), rect: opt(nul(rect)) }),
|
|
1747
|
+
},
|
|
1748
|
+
// P8 c6 — the artboard resize drag, live: the inspector's Preset / Size follow the pointer (client/v2/inspector/live-size.js).
|
|
1749
|
+
'artboard-live-size': {
|
|
1750
|
+
gate: 'active',
|
|
1751
|
+
status: 'live',
|
|
1752
|
+
owner: 'v2/inspector live size (P8 c6)',
|
|
1753
|
+
parse: p({ id: nul(str), w: opt(num), h: opt(num), preset: opt(nul(str)) }),
|
|
1754
|
+
},
|
|
1755
|
+
// S7.8 — tap Space = play, hold = Hand; the canvas decides on key-up (editing/space-tap.ts), the shell plays.
|
|
1756
|
+
'space-tap': {
|
|
1757
|
+
gate: 'active',
|
|
1758
|
+
status: 'live',
|
|
1759
|
+
owner: 'v2/timeline (S7.8)',
|
|
1760
|
+
parse: none,
|
|
1761
|
+
},
|
|
1762
|
+
// S7.17 — teammates' playheads + caption words for the timeline island (collab/timeline-presence → v2/timeline/peers).
|
|
1763
|
+
'timeline-peers': {
|
|
1764
|
+
gate: 'active',
|
|
1765
|
+
status: 'live',
|
|
1766
|
+
owner: 'v2/timeline/peers (S7.17)',
|
|
1767
|
+
parse: p({ peers: timelinePeerList }),
|
|
1768
|
+
},
|
|
1769
|
+
'ask-selection': {
|
|
1770
|
+
gate: 'active',
|
|
1771
|
+
status: 'live',
|
|
1772
|
+
owner: 'editing/ask-bubble (S2.19)',
|
|
1773
|
+
parse: p({
|
|
1774
|
+
refs: capped(200, arrOf(elementRef)),
|
|
1775
|
+
selection: opt(capped(12, arrOf(askLocator))),
|
|
1776
|
+
rect,
|
|
1777
|
+
artboard: opt(str),
|
|
1778
|
+
}),
|
|
1779
|
+
},
|
|
1780
|
+
'ask-selection-rect': {
|
|
1781
|
+
gate: 'active',
|
|
1782
|
+
status: 'live',
|
|
1783
|
+
owner: 'editing/ai-scope-outline (S2.19)',
|
|
1784
|
+
parse: p({ rect: nul(rect) }),
|
|
1785
|
+
},
|
|
1786
|
+
'insert-artboard-request': {
|
|
1787
|
+
gate: 'active',
|
|
1788
|
+
status: 'legacy',
|
|
1789
|
+
owner: BR,
|
|
1790
|
+
orphan: 'no-sender',
|
|
1791
|
+
parse: p({ id: opt(str), label: opt(str), width: opt(num), height: opt(num) }),
|
|
1792
|
+
},
|
|
1793
|
+
'mode-changed': {
|
|
1794
|
+
gate: 'active',
|
|
1795
|
+
status: 'live',
|
|
1796
|
+
owner: 'v2/shell/use-canvas-mode-lane (V2-4.3b)',
|
|
1797
|
+
parse: p({
|
|
1798
|
+
seq: num,
|
|
1799
|
+
mode,
|
|
1800
|
+
tool,
|
|
1801
|
+
present: nul(present),
|
|
1802
|
+
cause: lit('set-mode', 'tool', 'clamp', 'boot'),
|
|
1803
|
+
}),
|
|
1804
|
+
},
|
|
1805
|
+
'mode-request': {
|
|
1806
|
+
gate: 'active', // + no modal + role (M4), in the handler
|
|
1807
|
+
status: 'live',
|
|
1808
|
+
owner: 'v2/shell/use-canvas-mode-lane (V2-4.3b)',
|
|
1809
|
+
parse: p({
|
|
1810
|
+
mode: (v) => (v === 'back' ? v : mode(v)),
|
|
1811
|
+
tool: opt(tool),
|
|
1812
|
+
present: opt(present),
|
|
1813
|
+
cause: lit('key', 'esc', 'inspect', 'toolbar', 'link'),
|
|
1814
|
+
}),
|
|
1815
|
+
},
|
|
1816
|
+
'toolbar-rect': {
|
|
1817
|
+
gate: 'active',
|
|
1818
|
+
status: 'live',
|
|
1819
|
+
owner: 'tool-palette (V2-4.5a); shell tool panels (V2-4.5c)',
|
|
1820
|
+
parse: p({ mode, rect: nul(rect) }),
|
|
1821
|
+
},
|
|
1822
|
+
'tool-panel-open': {
|
|
1823
|
+
gate: 'active',
|
|
1824
|
+
status: 'live',
|
|
1825
|
+
owner: 'tool-palette (V2-4.5c); shell tool panels (V2-4.5c)',
|
|
1826
|
+
parse: p({
|
|
1827
|
+
panel: lit('stickers', 'components', 'templates', 'assets', 'sizes', 'image', 'generate'),
|
|
1828
|
+
anchor: nul(rect),
|
|
1829
|
+
replace: opt(str),
|
|
1830
|
+
}),
|
|
1831
|
+
},
|
|
1832
|
+
'size-place': {
|
|
1833
|
+
gate: 'active',
|
|
1834
|
+
status: 'live',
|
|
1835
|
+
owner: 'editing/size-ghost (S7.20); client/v2/kinds',
|
|
1836
|
+
parse: p({ presetId: shortStr(40), world: shape({ x: num, y: num }) }),
|
|
1837
|
+
},
|
|
1838
|
+
'stamp-disarmed': {
|
|
1839
|
+
gate: 'active',
|
|
1840
|
+
status: 'live',
|
|
1841
|
+
owner: 'annotations/ui/placement (15 an-stamps); shell tool panels (use-tool-panels.js)',
|
|
1842
|
+
parse: p({}),
|
|
1843
|
+
},
|
|
1844
|
+
// S3.2b — Present: the canvas posts its zoom for the pill (present/present-zoom.ts). S3.9 — canvas-lib's
|
|
1845
|
+
// ViewportZoomReporter posts it too; the shell's ZoomOnly readout (Preview) listens.
|
|
1846
|
+
'annotation-prefs-set': {
|
|
1847
|
+
gate: 'active',
|
|
1848
|
+
status: 'live',
|
|
1849
|
+
owner: 'annotations/ui/tool-state (S4.8); shell v2/shell/use-annotation-prefs (S4.8)',
|
|
1850
|
+
parse: p({ prefs: annotationPrefs }),
|
|
1851
|
+
},
|
|
1852
|
+
'viewport-zoom': {
|
|
1853
|
+
gate: 'active',
|
|
1854
|
+
status: 'live',
|
|
1855
|
+
owner:
|
|
1856
|
+
'present/present-zoom.ts (S3.2b) + v2/preview/zoom-only (S3.9) ← canvas-lib ViewportZoomReporter',
|
|
1857
|
+
parse: p({ zoom: num, fit: opt(bool) }),
|
|
1858
|
+
},
|
|
1859
|
+
// S3.1 — live: the Present stage (S3.2a) reports through canvas-mode-store `reportPresentPosition`;
|
|
1860
|
+
// the shell's mode store keeps it (use-canvas-mode-lane).
|
|
1861
|
+
'present-position': {
|
|
1862
|
+
gate: 'active',
|
|
1863
|
+
status: 'live',
|
|
1864
|
+
owner: 'v2/shell/use-canvas-mode-lane (S3.1)',
|
|
1865
|
+
parse: p({
|
|
1866
|
+
index: num,
|
|
1867
|
+
total: num,
|
|
1868
|
+
artboardId: str,
|
|
1869
|
+
sid: opt(sid),
|
|
1870
|
+
seq: opt(intIn(0, 2 ** 31 - 1)),
|
|
1871
|
+
}),
|
|
1872
|
+
},
|
|
1873
|
+
// S3.6b — the Present stage (present-stage.tsx `reportPresentRun`) → the presenter view's order map
|
|
1874
|
+
// (client/v2/present/presenter-host.jsx through use-canvas-mode-lane). A planted or oversized list is
|
|
1875
|
+
// refused whole.
|
|
1876
|
+
'present-run': {
|
|
1877
|
+
gate: 'active',
|
|
1878
|
+
status: 'live',
|
|
1879
|
+
owner: 'present/present-stage.tsx (S3.6b)',
|
|
1880
|
+
parse: p({
|
|
1881
|
+
artboards: presentRunList,
|
|
1882
|
+
}),
|
|
1883
|
+
},
|
|
1884
|
+
// S3.7a — the follower canvas (present-stage.tsx `usePresentFollow`) → its follower page.
|
|
1885
|
+
'present-follow-state': {
|
|
1886
|
+
gate: 'active',
|
|
1887
|
+
status: 'live',
|
|
1888
|
+
owner: 'v2/present/follow-view (S3.7a)',
|
|
1889
|
+
parse: p({
|
|
1890
|
+
live: bool,
|
|
1891
|
+
sid: nul(sid),
|
|
1892
|
+
presenterName,
|
|
1893
|
+
presenterIndex: intIn(0, 2000),
|
|
1894
|
+
index: intIn(0, 2000),
|
|
1895
|
+
total: intIn(0, 2000),
|
|
1896
|
+
watchers: intIn(0, 100000),
|
|
1897
|
+
ended: bool,
|
|
1898
|
+
}),
|
|
1899
|
+
},
|
|
1900
|
+
// S3.3 — live: the Present stage's media engine (present/present-media.ts) echoes the clip;
|
|
1901
|
+
// the shell lane (use-canvas-mode-lane) keeps it for the transport.
|
|
1902
|
+
'present-media': {
|
|
1903
|
+
gate: 'active',
|
|
1904
|
+
status: 'live',
|
|
1905
|
+
owner: 'present/present-media (S3.3)',
|
|
1906
|
+
parse: p({
|
|
1907
|
+
playing: bool,
|
|
1908
|
+
t: seconds,
|
|
1909
|
+
duration: seconds,
|
|
1910
|
+
muted: bool,
|
|
1911
|
+
sources: opt(mediaSources),
|
|
1912
|
+
missing: opt(bool),
|
|
1913
|
+
}),
|
|
1914
|
+
},
|
|
1915
|
+
// S3.10a — live: input-router's Preview branch posts it; the shell's link-follow plays it. Extra keys
|
|
1916
|
+
// (`target`, `url`, …) are dropped by `p`, so a planted canvas cannot hand the shell a destination.
|
|
1917
|
+
'link-follow': {
|
|
1918
|
+
gate: 'active', // + shell mode === 'preview' + no modal + ≤ 4/s, in the handler
|
|
1919
|
+
status: 'live',
|
|
1920
|
+
owner: 'S3 links (client/v2/preview/link-follow.js)',
|
|
1921
|
+
parse: p({ elementId: linkElementIdV, artboardId: nul(linkArtboardIdV) }),
|
|
1922
|
+
},
|
|
1923
|
+
'asset-relink-request': {
|
|
1924
|
+
gate: 'active',
|
|
1925
|
+
status: 'live',
|
|
1926
|
+
owner: 'client/v2/assets/asset-state-lane (S8.19)',
|
|
1927
|
+
parse: p({ rel: shortStr(512) }),
|
|
1928
|
+
},
|
|
1929
|
+
};
|
|
1930
|
+
|
|
1931
|
+
const s2c: S2C = {
|
|
1932
|
+
theme: {
|
|
1933
|
+
gate: 'any',
|
|
1934
|
+
target: 'parent',
|
|
1935
|
+
status: 'live',
|
|
1936
|
+
owner: CS,
|
|
1937
|
+
parse: p({ theme: lit('light', 'dark') }),
|
|
1938
|
+
},
|
|
1939
|
+
'view-chrome': {
|
|
1940
|
+
gate: 'any',
|
|
1941
|
+
target: 'parent',
|
|
1942
|
+
status: 'live',
|
|
1943
|
+
owner: CS,
|
|
1944
|
+
parse: p({
|
|
1945
|
+
minimap: opt(bool),
|
|
1946
|
+
zoom: opt(bool),
|
|
1947
|
+
present: opt(bool),
|
|
1948
|
+
guides: opt(bool),
|
|
1949
|
+
print: opt(bool),
|
|
1950
|
+
safeZones: opt(bool),
|
|
1951
|
+
zen: opt(bool),
|
|
1952
|
+
}),
|
|
1953
|
+
},
|
|
1954
|
+
'view-annotations': {
|
|
1955
|
+
gate: 'parent',
|
|
1956
|
+
status: 'live',
|
|
1957
|
+
owner: 'annotations-layer',
|
|
1958
|
+
parse: p({ visible: bool }),
|
|
1959
|
+
},
|
|
1960
|
+
'canvas-cap': { gate: 'parent', status: 'live', owner: 'tpl/_shell.html', parse: p({ t: str }) },
|
|
1961
|
+
// S10.4 — sent by client/v2/ds/follower-swap.js, honoured by the shell template's `ds-css` region
|
|
1962
|
+
'ds-css': {
|
|
1963
|
+
gate: 'parent',
|
|
1964
|
+
status: 'live',
|
|
1965
|
+
owner: 'tpl/_shell.html',
|
|
1966
|
+
parse: p({ tokens: opt(nul(dsCssPath)), components: opt(nul(dsCssPath)) }),
|
|
1967
|
+
},
|
|
1968
|
+
// S10.4 — sent by client/v2/ds/pins.js, loaded + scoped by the shell template's `ds-pins` region
|
|
1969
|
+
'ds-pins': {
|
|
1970
|
+
gate: 'parent',
|
|
1971
|
+
status: 'live',
|
|
1972
|
+
owner: 'tpl/_shell.html',
|
|
1973
|
+
parse: p({ revs: dsPinRevs, rootClass: nul(rootClassName) }),
|
|
1974
|
+
},
|
|
1975
|
+
// S10.8 — sent by client/v2/ds/update-dots.js, drawn by the shell template's `ds-update-dots` region
|
|
1976
|
+
'ds-update-dots': {
|
|
1977
|
+
gate: 'parent',
|
|
1978
|
+
status: 'live',
|
|
1979
|
+
owner: 'tpl/_shell.html',
|
|
1980
|
+
parse: p({ ids: dotIds }),
|
|
1981
|
+
},
|
|
1982
|
+
// S10.16c — sent by client/v2/ds/use-ds-frames.js (`ds.set-theme-preview`), read by ds/board/state.ts
|
|
1983
|
+
'ds-theme-preview': {
|
|
1984
|
+
gate: 'parent',
|
|
1985
|
+
status: 'live',
|
|
1986
|
+
owner: 'ds/board/state',
|
|
1987
|
+
parse: p({ mode: dsThemeMode }),
|
|
1988
|
+
},
|
|
1989
|
+
// S10.16c — sent by client/v2/ds/truth-host.jsx (`postDsMarks`), read by ds/board/state.ts
|
|
1990
|
+
'ds-marks': {
|
|
1991
|
+
gate: 'parent',
|
|
1992
|
+
status: 'live',
|
|
1993
|
+
owner: 'ds/board/state',
|
|
1994
|
+
parse: p({ outside: markNames, conflicts: markNames }),
|
|
1995
|
+
},
|
|
1996
|
+
// S10.16c — sent by client/v2/ds/make-host.jsx while a system is being made, read by ds/board/outline.tsx
|
|
1997
|
+
'ds-make-states': {
|
|
1998
|
+
gate: 'parent',
|
|
1999
|
+
status: 'live',
|
|
2000
|
+
owner: 'ds/board/outline',
|
|
2001
|
+
parse: p({ sections: dsMakeSections }),
|
|
2002
|
+
},
|
|
2003
|
+
// S10.9 — sent by client/v2/ds/reach-view.jsx, answered by the shell template's `ds-rects` region
|
|
2004
|
+
'ds-rects': {
|
|
2005
|
+
gate: 'parent',
|
|
2006
|
+
status: 'live',
|
|
2007
|
+
owner: 'tpl/_shell.html',
|
|
2008
|
+
parse: p({ seq: rectSeq, artboard: rectArtboard, ids: rectIds }),
|
|
2009
|
+
},
|
|
2010
|
+
'ai-activity': {
|
|
2011
|
+
gate: 'parent',
|
|
2012
|
+
status: 'live',
|
|
2013
|
+
owner: 'ai-banner',
|
|
2014
|
+
parse: p({ file: str, entry: nul(jsonObj) }),
|
|
2015
|
+
},
|
|
2016
|
+
'select-by-id': {
|
|
2017
|
+
gate: 'parent',
|
|
2018
|
+
status: 'live',
|
|
2019
|
+
owner: CS,
|
|
2020
|
+
parse: p({ id: opt(str), artboardId: opt(nul(str)), index: opt(num), add: opt(bool) }),
|
|
2021
|
+
},
|
|
2022
|
+
'select-by-selector': {
|
|
2023
|
+
gate: 'parent',
|
|
2024
|
+
status: 'live',
|
|
2025
|
+
owner: CS,
|
|
2026
|
+
parse: p({ selector: str }),
|
|
2027
|
+
},
|
|
2028
|
+
highlight: {
|
|
2029
|
+
gate: 'any',
|
|
2030
|
+
target: 'parent',
|
|
2031
|
+
status: 'live',
|
|
2032
|
+
owner: CS,
|
|
2033
|
+
parse: p({ id: nul(str), artboardId: opt(nul(str)), index: opt(num) }),
|
|
2034
|
+
},
|
|
2035
|
+
'request-layers': {
|
|
2036
|
+
gate: 'any',
|
|
2037
|
+
target: 'parent',
|
|
2038
|
+
status: 'live',
|
|
2039
|
+
owner: CS,
|
|
2040
|
+
parse: p({ artboardId: nul(str) }),
|
|
2041
|
+
},
|
|
2042
|
+
'force-clear': {
|
|
2043
|
+
gate: 'any',
|
|
2044
|
+
target: 'parent|self',
|
|
2045
|
+
status: 'live',
|
|
2046
|
+
owner: CS,
|
|
2047
|
+
parse: none,
|
|
2048
|
+
},
|
|
2049
|
+
'select-clear': {
|
|
2050
|
+
gate: 'any',
|
|
2051
|
+
target: 'parent|self',
|
|
2052
|
+
status: 'legacy',
|
|
2053
|
+
owner: CS,
|
|
2054
|
+
orphan: 'no-sender',
|
|
2055
|
+
parse: none,
|
|
2056
|
+
},
|
|
2057
|
+
'locked-set': { gate: 'parent', status: 'live', owner: CS, parse: p({ locked: arrOf(str) }) },
|
|
2058
|
+
'apply-style': {
|
|
2059
|
+
gate: 'parent',
|
|
2060
|
+
status: 'live',
|
|
2061
|
+
owner: CS,
|
|
2062
|
+
parse: p({
|
|
2063
|
+
id: str,
|
|
2064
|
+
artboardId: opt(nul(str)),
|
|
2065
|
+
index: opt(num),
|
|
2066
|
+
prop: str,
|
|
2067
|
+
value: nul(str),
|
|
2068
|
+
}),
|
|
2069
|
+
},
|
|
2070
|
+
'record-edit': { gate: 'parent', status: 'live', owner: CS, parse: p({ payload: jsonObj }) },
|
|
2071
|
+
'apply-edit-result': {
|
|
2072
|
+
gate: 'parent',
|
|
2073
|
+
status: 'live',
|
|
2074
|
+
owner: CS,
|
|
2075
|
+
parse: p({ requestId: str, ok: bool, error: opt(str), conflict: opt(bool) }),
|
|
2076
|
+
},
|
|
2077
|
+
'undo-barrier-ok': { gate: 'parent', status: 'live', owner: CS, parse: p({ requestId: str }) },
|
|
2078
|
+
'edit-op-result': {
|
|
2079
|
+
gate: 'parent',
|
|
2080
|
+
status: 'live',
|
|
2081
|
+
owner: 'editing (S2.1)',
|
|
2082
|
+
parse: p({
|
|
2083
|
+
requestId: str,
|
|
2084
|
+
ok: bool,
|
|
2085
|
+
actionId: opt(nul(str)),
|
|
2086
|
+
writeId: opt(str),
|
|
2087
|
+
rev: opt(str),
|
|
2088
|
+
refs: opt(arrOf(elementRef)),
|
|
2089
|
+
created: opt(arrOf(elementRef)),
|
|
2090
|
+
code: opt(lit(...EDIT_OP_CODES)),
|
|
2091
|
+
message: opt(str),
|
|
2092
|
+
}),
|
|
2093
|
+
},
|
|
2094
|
+
'edit-reverted': {
|
|
2095
|
+
gate: 'parent',
|
|
2096
|
+
status: 'live',
|
|
2097
|
+
owner: CS,
|
|
2098
|
+
parse: p({ op: str, id: opt(str), reason: opt(str) }),
|
|
2099
|
+
},
|
|
2100
|
+
'reorder-failed': { gate: 'parent', status: 'live', owner: CS, parse: none },
|
|
2101
|
+
'reposition-failed': { gate: 'parent', status: 'live', owner: CS, parse: none },
|
|
2102
|
+
'resize-failed': { gate: 'parent', status: 'live', owner: 'use-element-resize', parse: none },
|
|
2103
|
+
'resize-artboard-failed': {
|
|
2104
|
+
gate: 'parent',
|
|
2105
|
+
status: 'live',
|
|
2106
|
+
owner: 'use-element-resize',
|
|
2107
|
+
parse: none,
|
|
2108
|
+
},
|
|
2109
|
+
'freeze-and-set-kind': {
|
|
2110
|
+
gate: 'parent',
|
|
2111
|
+
status: 'live',
|
|
2112
|
+
owner: CS,
|
|
2113
|
+
parse: p({ artboardId: str, kind: nul(str), ask: opt(bool), freeze: opt(bool) }),
|
|
2114
|
+
},
|
|
2115
|
+
'op-toast': {
|
|
2116
|
+
gate: 'any',
|
|
2117
|
+
target: 'parent',
|
|
2118
|
+
status: 'live',
|
|
2119
|
+
owner: CS,
|
|
2120
|
+
parse: p({ message: str }),
|
|
2121
|
+
},
|
|
2122
|
+
'tool-set': {
|
|
2123
|
+
gate: 'parent',
|
|
2124
|
+
status: 'live',
|
|
2125
|
+
owner: 'use-tool-mode',
|
|
2126
|
+
// V2-4.8a: its shell sender was the in-app menubar's Tools menu; tools are armed by the canvas's
|
|
2127
|
+
// own toolbar and keys now (V2-4.5). The parent-gated handler stays until V2-8.0 retires the row.
|
|
2128
|
+
orphan: 'no-sender',
|
|
2129
|
+
parse: p({ tool: str }),
|
|
2130
|
+
},
|
|
2131
|
+
'insert-sticker': {
|
|
2132
|
+
gate: 'parent',
|
|
2133
|
+
status: 'live',
|
|
2134
|
+
owner: 'annotations-layer',
|
|
2135
|
+
parse: p({
|
|
2136
|
+
path: str,
|
|
2137
|
+
follow: opt(bool),
|
|
2138
|
+
preview: opt(imageDataUrl),
|
|
2139
|
+
sticker: opt(shape({ pack: str, id: str, flip: opt(bool) })),
|
|
2140
|
+
}),
|
|
2141
|
+
},
|
|
2142
|
+
'reveal-artboard': {
|
|
2143
|
+
gate: 'parent',
|
|
2144
|
+
status: 'live',
|
|
2145
|
+
// S1.3 sends it from the jump list once REVEAL_ARTBOARD_LIVE flips; the handler is canvas-shell's (A6c)
|
|
2146
|
+
owner: 'canvas-lib',
|
|
2147
|
+
parse: p({ artboardId: str, glide: bool, flash: bool }),
|
|
2148
|
+
},
|
|
2149
|
+
'convert-marks': {
|
|
2150
|
+
gate: 'parent',
|
|
2151
|
+
status: 'live',
|
|
2152
|
+
// the shell sends it from the Change-kind dialog's onDone (inspector/kinds/artboard-fixed.jsx); the canvas
|
|
2153
|
+
// paints the two marks (artboard-convert-marks.tsx) for a few seconds
|
|
2154
|
+
owner: 'artboard-convert-marks',
|
|
2155
|
+
parse: p({ v: lit(1), from: str, to: str, extraPct: num, fill: nul(shortStr(40)) }),
|
|
2156
|
+
},
|
|
2157
|
+
'shell-panels': {
|
|
2158
|
+
gate: 'parent',
|
|
2159
|
+
status: 'live',
|
|
2160
|
+
// sent by v2/shell/shell-panels-relay.js (the Stickers gallery / Assets panel opened or closed, and again to a frame
|
|
2161
|
+
// that has just loaded); read by canvas-shell.tsx into toolbars/shell-panels.ts, which the dock's panel slots follow
|
|
2162
|
+
owner: 'shell-panels',
|
|
2163
|
+
parse: p({ v: lit(1), open: nul(lit('stickers', 'assets', 'components')) }),
|
|
2164
|
+
},
|
|
2165
|
+
'ai-copies': {
|
|
2166
|
+
gate: 'parent',
|
|
2167
|
+
status: 'live',
|
|
2168
|
+
// sent by v2/ai/ring-relay.js beside `ai-runs`; drawn by artboard-ai-copies.tsx (more than AI_COPIES_MAX pairs is refused whole)
|
|
2169
|
+
owner: 'artboard-ai-copies',
|
|
2170
|
+
parse: p({ v: lit(1), copies: aiCopiesList }),
|
|
2171
|
+
},
|
|
2172
|
+
'ai-runs': {
|
|
2173
|
+
gate: 'parent',
|
|
2174
|
+
status: 'live',
|
|
2175
|
+
owner: 'artboard-activity-overlay',
|
|
2176
|
+
parse: p({
|
|
2177
|
+
artboards: recOf(
|
|
2178
|
+
shape({
|
|
2179
|
+
state: lit('running', 'needs-you', 'done'),
|
|
2180
|
+
who: shortStr(200),
|
|
2181
|
+
tag: shortStr(120),
|
|
2182
|
+
waiting: count,
|
|
2183
|
+
})
|
|
2184
|
+
),
|
|
2185
|
+
}),
|
|
2186
|
+
},
|
|
2187
|
+
'insert-template': {
|
|
2188
|
+
gate: 'parent',
|
|
2189
|
+
status: 'live',
|
|
2190
|
+
// S4.4 sends it (Templates panel, ⌘K rows); the annotations layer's handler is S4.13's (a pick that follows the pointer)
|
|
2191
|
+
owner: 'annotations-layer',
|
|
2192
|
+
parse: p({ id: str, follow: opt(bool) }),
|
|
2193
|
+
},
|
|
2194
|
+
'trashed-artboards': {
|
|
2195
|
+
gate: 'parent',
|
|
2196
|
+
status: 'live',
|
|
2197
|
+
owner: 'artboard-ghosts-overlay (S11.5)',
|
|
2198
|
+
parse: p({
|
|
2199
|
+
canvas: shortStr(1024),
|
|
2200
|
+
items: arrOf(shape({ id: shortStr(128), label: shortStr(200), rect: nul(rect) })),
|
|
2201
|
+
}),
|
|
2202
|
+
},
|
|
2203
|
+
'place-component': {
|
|
2204
|
+
gate: 'parent',
|
|
2205
|
+
status: 'live',
|
|
2206
|
+
owner: 'editing/place-ghost',
|
|
2207
|
+
parse: p({
|
|
2208
|
+
component: dsName,
|
|
2209
|
+
label: opt(shortStr(64)),
|
|
2210
|
+
variant: opt(dsSlug),
|
|
2211
|
+
glyph: opt(dsSlug),
|
|
2212
|
+
mode: lit('ghost', 'selection', 'preview', 'cancel'),
|
|
2213
|
+
}),
|
|
2214
|
+
},
|
|
2215
|
+
'place-image': {
|
|
2216
|
+
gate: 'parent',
|
|
2217
|
+
status: 'live',
|
|
2218
|
+
owner: 'editing/place-image (r2-p1 TD10); client/v2/shell/image-pick.js',
|
|
2219
|
+
parse: p({
|
|
2220
|
+
asset: shortStr(512),
|
|
2221
|
+
natural: opt(nul(shape({ w: num, h: num }))),
|
|
2222
|
+
label: opt(shortStr(200)),
|
|
2223
|
+
}),
|
|
2224
|
+
},
|
|
2225
|
+
// r3 — an Assets tile over / dropped on the canvas: the shell's catcher says where; editing/image-drop.tsx rings and answers.
|
|
2226
|
+
'asset-drag-over': {
|
|
2227
|
+
gate: 'parent',
|
|
2228
|
+
status: 'live',
|
|
2229
|
+
owner: 'editing/image-drop (r3)',
|
|
2230
|
+
parse: p({ x: nul(num), y: opt(num) }),
|
|
2231
|
+
},
|
|
2232
|
+
'asset-drop-at': {
|
|
2233
|
+
gate: 'parent',
|
|
2234
|
+
status: 'live',
|
|
2235
|
+
owner: 'editing/image-drop (r3)',
|
|
2236
|
+
parse: p({ requestId: shortStr(64), x: num, y: num }),
|
|
2237
|
+
},
|
|
2238
|
+
'asset-drop-done': {
|
|
2239
|
+
gate: 'parent',
|
|
2240
|
+
status: 'live',
|
|
2241
|
+
owner: 'editing/image-drop (r3)',
|
|
2242
|
+
parse: p({
|
|
2243
|
+
requestId: shortStr(64),
|
|
2244
|
+
ok: bool,
|
|
2245
|
+
created: opt(arrOf(elementRef)),
|
|
2246
|
+
message: opt(shortStr(400)),
|
|
2247
|
+
}),
|
|
2248
|
+
},
|
|
2249
|
+
// S7.9 — the drop chip on the followed video artboard while footage is in flight (editing/drop-chip.tsx).
|
|
2250
|
+
'timeline-drop-hint': {
|
|
2251
|
+
gate: 'parent',
|
|
2252
|
+
status: 'live',
|
|
2253
|
+
owner: 'editing/drop-chip (S7.9)',
|
|
2254
|
+
parse: p({ artboardId: str, on: bool }),
|
|
2255
|
+
},
|
|
2256
|
+
// S7.17 — the caption word this person is in; the canvas publishes it as awareness `editing` (collab/timeline-presence).
|
|
2257
|
+
'timeline-word': {
|
|
2258
|
+
gate: 'parent',
|
|
2259
|
+
status: 'live',
|
|
2260
|
+
owner: 'collab/timeline-presence (S7.17)',
|
|
2261
|
+
parse: p({ artboardId: nul(linkArtboardIdV), wordKey: opt(wordKeyV) }),
|
|
2262
|
+
},
|
|
2263
|
+
// S7.24b — the kind filter's dimming: ids of the artboards outside the kind, or null. Parent only; capped.
|
|
2264
|
+
'dim-artboards': {
|
|
2265
|
+
gate: 'parent',
|
|
2266
|
+
status: 'live',
|
|
2267
|
+
owner: 'editing/kind-dim (S7.24b) ← client/v2/kinds/kind-dim-relay',
|
|
2268
|
+
parse: p({ ids: nul(capped(DIM_IDS_MAX, arrOf(shortStr(128)))) }),
|
|
2269
|
+
},
|
|
2270
|
+
'size-ghost': {
|
|
2271
|
+
gate: 'parent',
|
|
2272
|
+
status: 'live',
|
|
2273
|
+
owner: 'editing/size-ghost (S7.20)',
|
|
2274
|
+
parse: p({
|
|
2275
|
+
preset: nul(
|
|
2276
|
+
shape({
|
|
2277
|
+
id: shortStr(40),
|
|
2278
|
+
label: shortStr(80),
|
|
2279
|
+
sizeText: shortStr(40),
|
|
2280
|
+
w: num,
|
|
2281
|
+
h: num,
|
|
2282
|
+
})
|
|
2283
|
+
),
|
|
2284
|
+
}),
|
|
2285
|
+
},
|
|
2286
|
+
'insert-annotation-media': {
|
|
2287
|
+
gate: 'parent',
|
|
2288
|
+
status: 'live',
|
|
2289
|
+
owner: 'annotations-layer',
|
|
2290
|
+
parse: p({ paths: arrOf(str) }),
|
|
2291
|
+
},
|
|
2292
|
+
'replace-annotation-media': {
|
|
2293
|
+
gate: 'parent',
|
|
2294
|
+
status: 'live',
|
|
2295
|
+
owner: 'annotations-layer',
|
|
2296
|
+
parse: p({ id: str, path: str, sticker: opt(shape({ pack: str, id: str, flip: opt(bool) })) }),
|
|
2297
|
+
},
|
|
2298
|
+
'photo-preview': {
|
|
2299
|
+
gate: 'any',
|
|
2300
|
+
target: 'parent',
|
|
2301
|
+
status: 'live',
|
|
2302
|
+
owner: 'canvas-lib (photo)',
|
|
2303
|
+
parse: p({ asset: str, edit: nul(jsonObj), use: opt(str) }),
|
|
2304
|
+
},
|
|
2305
|
+
'photo-busy': {
|
|
2306
|
+
gate: 'any',
|
|
2307
|
+
target: 'parent',
|
|
2308
|
+
status: 'live',
|
|
2309
|
+
owner: 'canvas-lib (photo)',
|
|
2310
|
+
parse: p({ asset: str, busy: bool }),
|
|
2311
|
+
},
|
|
2312
|
+
'comments-set': {
|
|
2313
|
+
gate: 'any',
|
|
2314
|
+
target: 'parent',
|
|
2315
|
+
status: 'live',
|
|
2316
|
+
owner: 'comments-overlay',
|
|
2317
|
+
parse: p({ comments: arrOf(jsonObj) }),
|
|
2318
|
+
},
|
|
2319
|
+
'comment-focus': {
|
|
2320
|
+
gate: 'any',
|
|
2321
|
+
target: 'parent',
|
|
2322
|
+
status: 'live',
|
|
2323
|
+
owner: 'comments-overlay',
|
|
2324
|
+
parse: p({ id: nul(str), reply: opt(lit(true)) }),
|
|
2325
|
+
},
|
|
2326
|
+
'comment-op-ack': {
|
|
2327
|
+
gate: 'parent',
|
|
2328
|
+
status: 'live',
|
|
2329
|
+
owner: 'comments-overlay (S9.22)',
|
|
2330
|
+
parse: p({ reqId: nul(reqIdV) }),
|
|
2331
|
+
},
|
|
2332
|
+
'comment-op-result': {
|
|
2333
|
+
gate: 'parent',
|
|
2334
|
+
status: 'live',
|
|
2335
|
+
owner: 'comments-overlay (S9.22)',
|
|
2336
|
+
parse: p({
|
|
2337
|
+
reqId: nul(reqIdV),
|
|
2338
|
+
ok: bool,
|
|
2339
|
+
comment: opt(nul(jsonObj)),
|
|
2340
|
+
status: opt(num),
|
|
2341
|
+
error: opt(str),
|
|
2342
|
+
}),
|
|
2343
|
+
},
|
|
2344
|
+
'comment-people': {
|
|
2345
|
+
gate: 'parent',
|
|
2346
|
+
status: 'live',
|
|
2347
|
+
owner: 'comments-overlay (S9.22)',
|
|
2348
|
+
parse: p({ reqId: nul(reqIdV), people: nul(arrOf(mentionPerson)) }),
|
|
2349
|
+
},
|
|
2350
|
+
// S4.17 sends them (client/v2/annotations/annotation-list-model.js); the annotations layer hears
|
|
2351
|
+
// them (S4.9, annotations/ui/visibility.ts).
|
|
2352
|
+
'annotation-select': {
|
|
2353
|
+
gate: 'parent',
|
|
2354
|
+
status: 'live',
|
|
2355
|
+
owner: 'annotations-layer (S4.9)',
|
|
2356
|
+
parse: p({ v: lit(1), ids: arrOf(shortStr(200)) }),
|
|
2357
|
+
},
|
|
2358
|
+
'annotation-filter': {
|
|
2359
|
+
gate: 'parent',
|
|
2360
|
+
status: 'live',
|
|
2361
|
+
owner: 'annotations-layer (S4.9)',
|
|
2362
|
+
parse: p({ v: lit(1), authors: arrOf(shortStr(200)) }),
|
|
2363
|
+
},
|
|
2364
|
+
'export-capture': {
|
|
2365
|
+
gate: 'parent',
|
|
2366
|
+
status: 'live',
|
|
2367
|
+
owner: 'canvas-lib (export)',
|
|
2368
|
+
parse: p({ id: str, format: str, artboardIds: arrOf(str), scale: num }),
|
|
2369
|
+
},
|
|
2370
|
+
'export-selection-query': {
|
|
2371
|
+
gate: 'parent',
|
|
2372
|
+
status: 'live',
|
|
2373
|
+
owner: 'canvas-lib (export)',
|
|
2374
|
+
parse: p({ id: str }),
|
|
2375
|
+
},
|
|
2376
|
+
// A6b-2: the answers to the two retired in-canvas export requests (see c2s `export-request`).
|
|
2377
|
+
'export-result': {
|
|
2378
|
+
gate: 'parent',
|
|
2379
|
+
status: 'live',
|
|
2380
|
+
owner: 'export-dialog',
|
|
2381
|
+
orphan: 'no-handler',
|
|
2382
|
+
parse: p({ id: str, ok: bool, browser: opt(bool), jobId: opt(str), error: opt(str) }),
|
|
2383
|
+
},
|
|
2384
|
+
'export-history-result': {
|
|
2385
|
+
gate: 'parent',
|
|
2386
|
+
status: 'live',
|
|
2387
|
+
owner: 'export-dialog',
|
|
2388
|
+
orphan: 'no-handler',
|
|
2389
|
+
parse: p({ id: str, history: arrOf(jsonObj) }),
|
|
2390
|
+
},
|
|
2391
|
+
'timeline-play': {
|
|
2392
|
+
gate: 'any',
|
|
2393
|
+
target: 'parent',
|
|
2394
|
+
status: 'live',
|
|
2395
|
+
owner: 'video-comp',
|
|
2396
|
+
parse: p(tlId),
|
|
2397
|
+
},
|
|
2398
|
+
'timeline-pause': {
|
|
2399
|
+
gate: 'any',
|
|
2400
|
+
target: 'parent',
|
|
2401
|
+
status: 'live',
|
|
2402
|
+
owner: 'video-comp',
|
|
2403
|
+
parse: p(tlId),
|
|
2404
|
+
},
|
|
2405
|
+
'timeline-seek': {
|
|
2406
|
+
gate: 'any',
|
|
2407
|
+
target: 'parent',
|
|
2408
|
+
status: 'live',
|
|
2409
|
+
owner: 'video-comp',
|
|
2410
|
+
parse: p({ ...tlId, frame: num }),
|
|
2411
|
+
},
|
|
2412
|
+
'timeline-loop': {
|
|
2413
|
+
gate: 'any',
|
|
2414
|
+
target: 'parent',
|
|
2415
|
+
status: 'live',
|
|
2416
|
+
owner: 'video-comp',
|
|
2417
|
+
parse: p({ ...tlId, loop: bool }),
|
|
2418
|
+
},
|
|
2419
|
+
'timeline-mute': {
|
|
2420
|
+
gate: 'any',
|
|
2421
|
+
target: 'parent',
|
|
2422
|
+
status: 'live',
|
|
2423
|
+
owner: 'video-comp',
|
|
2424
|
+
parse: p({ ...tlId, muted: bool }),
|
|
2425
|
+
},
|
|
2426
|
+
'timeline-volume': {
|
|
2427
|
+
gate: 'any',
|
|
2428
|
+
target: 'parent',
|
|
2429
|
+
status: 'live',
|
|
2430
|
+
owner: 'video-comp',
|
|
2431
|
+
parse: p({ ...tlId, volume: num }),
|
|
2432
|
+
},
|
|
2433
|
+
'timeline-request-comps': {
|
|
2434
|
+
gate: 'any',
|
|
2435
|
+
target: 'parent',
|
|
2436
|
+
status: 'live',
|
|
2437
|
+
owner: 'video-comp',
|
|
2438
|
+
parse: none,
|
|
2439
|
+
},
|
|
2440
|
+
'run-action': {
|
|
2441
|
+
gate: 'parent',
|
|
2442
|
+
status: 'live',
|
|
2443
|
+
owner: 'actions/registry (V2-1.3)',
|
|
2444
|
+
parse: p({ v: lit(1), id: str, params: opt(jsonObj) }),
|
|
2445
|
+
},
|
|
2446
|
+
'paste-data': {
|
|
2447
|
+
gate: 'parent',
|
|
2448
|
+
status: 'live',
|
|
2449
|
+
owner: 'bridge/paste-data (p8-sweep-leftovers)',
|
|
2450
|
+
parse: (raw) => {
|
|
2451
|
+
const d = parsePasteData(raw);
|
|
2452
|
+
return d ? { ...d } : null;
|
|
2453
|
+
},
|
|
2454
|
+
},
|
|
2455
|
+
'git-lifecycle': {
|
|
2456
|
+
gate: 'parent',
|
|
2457
|
+
status: 'legacy',
|
|
2458
|
+
owner: 'c/app',
|
|
2459
|
+
orphan: 'no-handler',
|
|
2460
|
+
parse: p({ payload: jsonObj }),
|
|
2461
|
+
},
|
|
2462
|
+
'set-mode': {
|
|
2463
|
+
gate: 'parent',
|
|
2464
|
+
status: 'live',
|
|
2465
|
+
owner: 'bridge/canvas-mode-store (V2-4.3b)',
|
|
2466
|
+
parse: p({ v: lit(2), seq: num, mode, present: nul(present), tool: opt(tool), caps }),
|
|
2467
|
+
},
|
|
2468
|
+
'occluded-insets': {
|
|
2469
|
+
gate: 'parent',
|
|
2470
|
+
status: 'new',
|
|
2471
|
+
owner: 'bridge/canvas-mode-store',
|
|
2472
|
+
parse: p({ seq: num, insets }),
|
|
2473
|
+
},
|
|
2474
|
+
// S3.1 — live: the shell lane's `step` sends it; canvas-mode-store keeps it for the Present stage.
|
|
2475
|
+
'present-step': {
|
|
2476
|
+
gate: 'parent',
|
|
2477
|
+
status: 'live',
|
|
2478
|
+
owner: 'bridge/canvas-mode-store (S3.1)',
|
|
2479
|
+
parse: p({ to: (v) => (v === 'next' || v === 'prev' ? v : num(v)) }),
|
|
2480
|
+
},
|
|
2481
|
+
// S3.7a — honoured only by a follower canvas (`follow=1`, present/follow.ts `isFollowCanvas`).
|
|
2482
|
+
'present-follow': {
|
|
2483
|
+
gate: 'parent',
|
|
2484
|
+
status: 'live',
|
|
2485
|
+
owner: 'bridge/canvas-mode-store (S3.7a)',
|
|
2486
|
+
parse: p({ sid: nul(sid), live: bool, locked: bool }),
|
|
2487
|
+
},
|
|
2488
|
+
// S3.3 — live: the shell transport's buttons; the Present stage's media engine applies it.
|
|
2489
|
+
'present-media-cmd': {
|
|
2490
|
+
gate: 'parent',
|
|
2491
|
+
status: 'live',
|
|
2492
|
+
owner: 'present/present-media (S3.3)',
|
|
2493
|
+
parse: p({ op: lit('play', 'pause', 'mute', 'unmute', 'captions-on', 'captions-off') }),
|
|
2494
|
+
},
|
|
2495
|
+
'key-prefs': {
|
|
2496
|
+
gate: 'parent',
|
|
2497
|
+
status: 'live',
|
|
2498
|
+
owner: 'bridge/canvas-mode-store (V2-4 gate)',
|
|
2499
|
+
parse: p({ singleKeys: bool }),
|
|
2500
|
+
},
|
|
2501
|
+
'annotation-prefs': {
|
|
2502
|
+
gate: 'parent',
|
|
2503
|
+
status: 'live',
|
|
2504
|
+
owner: 'annotations/ui/tool-state (S4.8)',
|
|
2505
|
+
parse: p({ prefs: annotationPrefs }),
|
|
2506
|
+
},
|
|
2507
|
+
// S4.14 — the parser IS the projection: a field it does not name never reaches the canvas.
|
|
2508
|
+
'vote-state': {
|
|
2509
|
+
gate: 'parent',
|
|
2510
|
+
status: 'live',
|
|
2511
|
+
owner: 'annotations/ui/vote-dots (S4.14)',
|
|
2512
|
+
parse: p({
|
|
2513
|
+
vote: nul(
|
|
2514
|
+
shape({
|
|
2515
|
+
id: annotationIdV,
|
|
2516
|
+
targets: capped(32, arrOf(shortStr(200))),
|
|
2517
|
+
state: lit('open', 'ended'),
|
|
2518
|
+
perVoter: intIn(1, 99),
|
|
2519
|
+
tallies: opt(recOf(count, 32)),
|
|
2520
|
+
})
|
|
2521
|
+
),
|
|
2522
|
+
mine: recOf(count, 32),
|
|
2523
|
+
}),
|
|
2524
|
+
},
|
|
2525
|
+
'hold-intent': {
|
|
2526
|
+
gate: 'parent',
|
|
2527
|
+
status: 'live',
|
|
2528
|
+
owner: 'editing/hold-rings (S2.18)',
|
|
2529
|
+
parse: p({ field: bool, app: bool, gesture: opt(bool) }),
|
|
2530
|
+
},
|
|
2531
|
+
// S9.22b — sent by the shell's run list (S5.11 runs-store → v2/ai/ring-relay.js `holdsFor`):
|
|
2532
|
+
// neutral tags from the state and the holder's name only, never the run's prompt
|
|
2533
|
+
'ai-holds': {
|
|
2534
|
+
gate: 'parent',
|
|
2535
|
+
status: 'live',
|
|
2536
|
+
owner: 'editing/hold-rings (S2.18)',
|
|
2537
|
+
parse: p({ holds: aiHoldList }),
|
|
2538
|
+
},
|
|
2539
|
+
'ai-seen': {
|
|
2540
|
+
gate: 'parent',
|
|
2541
|
+
status: 'live',
|
|
2542
|
+
owner: 'annotations/ui/ai-seen (S4.15); sent by v2/ai/seen-relay.js',
|
|
2543
|
+
parse: p({ targets: aiSeenList }),
|
|
2544
|
+
},
|
|
2545
|
+
'undo-preview': {
|
|
2546
|
+
gate: 'parent',
|
|
2547
|
+
status: 'live',
|
|
2548
|
+
owner: 'editing/undo-preview (S2.20)',
|
|
2549
|
+
parse: p({ artboards: arrOf(str), tag: nul(str) }),
|
|
2550
|
+
},
|
|
2551
|
+
'asset-state': {
|
|
2552
|
+
gate: 'parent',
|
|
2553
|
+
status: 'live',
|
|
2554
|
+
owner: 'canvas-lib asset placeholder frame (S8.19, L1)',
|
|
2555
|
+
parse: p({ items: assetStateList }),
|
|
2556
|
+
},
|
|
2557
|
+
'gen-takes': {
|
|
2558
|
+
gate: 'parent',
|
|
2559
|
+
status: 'live',
|
|
2560
|
+
owner: 'editing/take-keys (S8.16, L1)',
|
|
2561
|
+
parse: p({ assets: genTakeAssets }),
|
|
2562
|
+
},
|
|
2563
|
+
};
|
|
2564
|
+
|
|
2565
|
+
export const DGN_TABLE: { c2s: C2S; s2c: S2C } = { c2s, s2c };
|
|
2566
|
+
|
|
2567
|
+
// ─── accept + post helpers ────────────────────────────────────────────────────
|
|
2568
|
+
|
|
2569
|
+
// Messages are built with a computed key so the inventory (which reads `{ dgn: … }` literals as
|
|
2570
|
+
// send sites) sees only the real call sites, not these helpers.
|
|
2571
|
+
const DGN_KEY = 'dgn';
|
|
2572
|
+
const withType = (payload: unknown, type: string): Record<string, unknown> =>
|
|
2573
|
+
Object.assign({}, payload as object, { [DGN_KEY]: type });
|
|
2574
|
+
|
|
2575
|
+
export interface ShellAcceptCtx {
|
|
2576
|
+
canvasOrigin: string;
|
|
2577
|
+
active: Window | null | undefined;
|
|
2578
|
+
asked?: Window | null;
|
|
2579
|
+
frames?: () => Iterable<Window | null | undefined>;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
const own = (o: object, k: string) => Object.hasOwn(o, k);
|
|
2583
|
+
const typeOf = (data: unknown): string | null =>
|
|
2584
|
+
isPlain(data) && typeof data.dgn === 'string' ? data.dgn : null;
|
|
2585
|
+
|
|
2586
|
+
export function c2sSpec(type: string): DgnSpec<unknown, ShellGate> | null {
|
|
2587
|
+
return own(c2s, type) ? (c2s as Record<string, DgnSpec<unknown, ShellGate>>)[type] : null;
|
|
2588
|
+
}
|
|
2589
|
+
export function s2cSpec(type: string): DgnSpec<unknown, CanvasGate> | null {
|
|
2590
|
+
return own(s2c, type) ? (s2c as Record<string, DgnSpec<unknown, CanvasGate>>)[type] : null;
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
/** Does `e.source` satisfy a shell-side gate? `active`/`asked` never pass as `null === null`. */
|
|
2594
|
+
export function shellGateOk(gate: ShellGate, e: MessageEvent, ctx: ShellAcceptCtx): boolean {
|
|
2595
|
+
if (gate === 'any') return true;
|
|
2596
|
+
const src = e.source as unknown;
|
|
2597
|
+
if (gate === 'active') return !!ctx.active && src === ctx.active;
|
|
2598
|
+
if (gate === 'asked') return !!ctx.asked && src === ctx.asked;
|
|
2599
|
+
for (const w of ctx.frames?.() ?? []) if (w && src === w) return true;
|
|
2600
|
+
return false;
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
/** Does `e.source` satisfy a canvas-side gate, for the canvas document `win`? */
|
|
2604
|
+
export function canvasGateOk(gate: CanvasGate, e: MessageEvent, win: Window): boolean {
|
|
2605
|
+
if (gate === 'any') return true;
|
|
2606
|
+
const src = e.source as unknown;
|
|
2607
|
+
if (src === win.parent) return true;
|
|
2608
|
+
return gate === 'parent|self' && src === win;
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
/** Canvas side, for a listener that branches on many types: false when `e.data` is a shell→canvas
|
|
2612
|
+
* message this table gates and `e.source` fails that gate. Anything else is not this table's call
|
|
2613
|
+
* (true) — the listener's own branches decide. */
|
|
2614
|
+
export function canvasMayHandle(e: MessageEvent, win: Window): boolean {
|
|
2615
|
+
const t = typeOf(e.data);
|
|
2616
|
+
const spec = t ? s2cSpec(t) : null;
|
|
2617
|
+
return !spec || canvasGateOk(spec.gate, e, win);
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
/** The canvas→shell types gated `active` — the shell's one up-front source check. */
|
|
2621
|
+
export const C2S_ACTIVE: ReadonlySet<string> = new Set(
|
|
2622
|
+
Object.keys(c2s).filter((k) => c2sSpec(k)?.gate === 'active')
|
|
2623
|
+
);
|
|
2624
|
+
|
|
2625
|
+
/** Shell side: origin, gate and payload in one place; a handler only sees a validated message. */
|
|
2626
|
+
export function acceptFromCanvas(
|
|
2627
|
+
e: MessageEvent,
|
|
2628
|
+
ctx: ShellAcceptCtx
|
|
2629
|
+
): CanvasToShellMessage | null {
|
|
2630
|
+
if (e.origin !== ctx.canvasOrigin) return null;
|
|
2631
|
+
const t = typeOf(e.data);
|
|
2632
|
+
const spec = t ? c2sSpec(t) : null;
|
|
2633
|
+
if (!t || !spec || !shellGateOk(spec.gate, e, ctx)) return null;
|
|
2634
|
+
const parsed = spec.parse(e.data as Record<string, unknown>);
|
|
2635
|
+
return parsed ? (withType(parsed, t) as CanvasToShellMessage) : null;
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
/** Canvas side: gate and payload in one place (the canvas document is `win`). */
|
|
2639
|
+
export function acceptFromShell(e: MessageEvent, win: Window): ShellToCanvasMessage | null {
|
|
2640
|
+
const t = typeOf(e.data);
|
|
2641
|
+
const spec = t ? s2cSpec(t) : null;
|
|
2642
|
+
if (!t || !spec || !canvasGateOk(spec.gate, e, win)) return null;
|
|
2643
|
+
const parsed = spec.parse(e.data as Record<string, unknown>);
|
|
2644
|
+
return parsed ? (withType(parsed, t) as ShellToCanvasMessage) : null;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
/** Shell → one canvas window. */
|
|
2648
|
+
export function postToCanvas<K extends keyof ShellToCanvas>(
|
|
2649
|
+
target: Window | null | undefined,
|
|
2650
|
+
type: K,
|
|
2651
|
+
payload: ShellToCanvas[K],
|
|
2652
|
+
targetOrigin: string
|
|
2653
|
+
): void {
|
|
2654
|
+
try {
|
|
2655
|
+
target?.postMessage(withType(payload, type), targetOrigin);
|
|
2656
|
+
} catch {
|
|
2657
|
+
/* detached */
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
/** Canvas → its shell. */
|
|
2661
|
+
export function postToShell<K extends keyof CanvasToShell>(
|
|
2662
|
+
win: Window,
|
|
2663
|
+
type: K,
|
|
2664
|
+
payload: CanvasToShell[K]
|
|
2665
|
+
): void {
|
|
2666
|
+
try {
|
|
2667
|
+
win.parent.postMessage(withType(payload, type), '*');
|
|
2668
|
+
} catch {
|
|
2669
|
+
/* detached */
|
|
2670
|
+
}
|
|
2671
|
+
}
|