@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
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
* ColorSwatch Square + label for a color token.
|
|
42
42
|
* TypeScaleRow One row of a type-ladder specimen.
|
|
43
43
|
* ThemeToggle Light/dark <button> group writing data-theme on <html>.
|
|
44
|
+
* DSRoot <div class="ds" data-theme> — the system-agnostic theme wrapper (V2-1.13 §5.11).
|
|
44
45
|
*
|
|
45
46
|
* Hooks ──────────────────────────────────────────────────────────────────
|
|
46
47
|
* useTokens(prefix?) Resolves CSS custom properties from <html> computed style.
|
|
@@ -84,6 +85,7 @@ import {
|
|
|
84
85
|
useReducedMotion as _useReducedMotion,
|
|
85
86
|
} from 'motion/react';
|
|
86
87
|
import {
|
|
88
|
+
type ComponentProps,
|
|
87
89
|
type CSSProperties,
|
|
88
90
|
createContext,
|
|
89
91
|
Fragment,
|
|
@@ -99,16 +101,43 @@ import {
|
|
|
99
101
|
useMemo,
|
|
100
102
|
useRef,
|
|
101
103
|
useState,
|
|
104
|
+
useSyncExternalStore,
|
|
102
105
|
} from 'react';
|
|
103
106
|
|
|
107
|
+
import { canvasKeyIndex, resolveCanvasKey } from './actions/canvas-keys.ts';
|
|
104
108
|
import { ArtboardActivityOverlay } from './artboard-activity-overlay.tsx';
|
|
109
|
+
import { ArtboardConvertMarks } from './artboard-convert-marks.tsx';
|
|
110
|
+
import { ArtboardGapMark } from './artboard-gap-mark.tsx';
|
|
111
|
+
import { ArtboardGhostsLayer } from './artboard-ghosts-overlay.tsx';
|
|
112
|
+
import { ArtboardGrowthTag, useGrowthDelta } from './artboard-growth-tag.tsx';
|
|
105
113
|
import {
|
|
106
114
|
ArtboardGuidesOverlay,
|
|
107
115
|
type GuideDefinitions,
|
|
108
116
|
type OverlayVisibility,
|
|
109
117
|
} from './artboard-guides-overlay.tsx';
|
|
118
|
+
import { ArtboardNewSection, useNewSection } from './artboard-new-section.tsx';
|
|
119
|
+
import {
|
|
120
|
+
ArtboardWarnMark,
|
|
121
|
+
ArtboardWarnOutlines,
|
|
122
|
+
madeFromLabel,
|
|
123
|
+
useArtboardWarnings,
|
|
124
|
+
warningsAttr,
|
|
125
|
+
} from './artboard-warn-mark.tsx';
|
|
126
|
+
import { AssetPlaceholderLayer } from './asset-placeholder.tsx';
|
|
127
|
+
import { modeShows } from './bridge/mode-shows.ts';
|
|
128
|
+
import { DsIcon } from './canvas-ds-icons.tsx';
|
|
129
|
+
import { flowRows, isDsCanvasIds } from './canvas-rows.ts';
|
|
110
130
|
import { CanvasShell } from './canvas-shell.tsx';
|
|
131
|
+
import { registerCanvasThemeSystem } from './canvas-theme.ts';
|
|
132
|
+
import { pressStartsPan } from './input-router.tsx';
|
|
133
|
+
import { summaryWords } from './kinds/warnings.ts';
|
|
134
|
+
import { presentHidesCss, usePresentStage } from './present/present-stage.tsx';
|
|
135
|
+
import { usePreviewCamera, usePreviewing } from './preview/preview-camera.tsx';
|
|
136
|
+
import { previewWheelPassthrough } from './preview/wheel-scroll.ts';
|
|
111
137
|
import type { ArtboardPrintProp } from './print/units.ts';
|
|
138
|
+
import { useGovernedMode } from './use-governed-mode.ts';
|
|
139
|
+
import { VideoLinksLayer } from './video-links-overlay.tsx';
|
|
140
|
+
import { viewportAtFit } from './viewport-fit.ts';
|
|
112
141
|
// feature-2-print-artboards T3 — side-effect import: registers the print
|
|
113
142
|
// kind's overlay content (bleed/trim/margin) into artboard-guides-overlay's
|
|
114
143
|
// registry at module load, per that file's own "call registerKindOverlay at
|
|
@@ -120,10 +149,30 @@ import './print-overlay-content.tsx';
|
|
|
120
149
|
// registration above, for the 'web' kind's breakpoint-band chip.
|
|
121
150
|
import './web-overlay-content.tsx';
|
|
122
151
|
import {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
152
|
+
type AutoFit,
|
|
153
|
+
canvasInsets,
|
|
154
|
+
canvasModeStore,
|
|
155
|
+
canvasSingleKeys,
|
|
156
|
+
onFirstInsets,
|
|
157
|
+
shouldBootRefit,
|
|
158
|
+
shouldResizeRefit,
|
|
159
|
+
} from './bridge/canvas-mode-store.ts';
|
|
160
|
+
import { type Insets, visibleRect, ZERO_INSETS } from './bridge/occlusion.ts';
|
|
161
|
+
import { buildMoveArtboardsRecord, type LayoutRider } from './commands/move-artboards-command.ts';
|
|
126
162
|
import { scopedCdSelector, selectorIndex, shortText } from './dom-selection.ts';
|
|
163
|
+
import {
|
|
164
|
+
type CommitPositionsOptions,
|
|
165
|
+
type CommitRider,
|
|
166
|
+
canvasMetaBody,
|
|
167
|
+
createDragBusCore,
|
|
168
|
+
type DragBusCore,
|
|
169
|
+
type DragFrame,
|
|
170
|
+
type LayoutRect,
|
|
171
|
+
} from './drag-bus.ts';
|
|
172
|
+
import { routeDrop } from './editing/duplicate-rhythm.ts';
|
|
173
|
+
import { growCh, nextRenameId, RENAME_EVENT, requestRename } from './editing/rename-order.ts';
|
|
174
|
+
import { createSpaceTap, sendSpaceTap } from './editing/space-tap.ts';
|
|
175
|
+
import { playSelectedVideos } from './editing/video-play.ts';
|
|
127
176
|
import { applyCaptureChrome } from './exporters/capture-chrome.ts';
|
|
128
177
|
import {
|
|
129
178
|
type DomToSvgApi,
|
|
@@ -139,8 +188,14 @@ import {
|
|
|
139
188
|
// (photo/pipeline.ts, which imports pixi.js) is loaded via a DYNAMIC import
|
|
140
189
|
// inside <PhotoLayer> only when an edited photo actually mounts — see there.
|
|
141
190
|
import { isDefaultEdit, type PhotoEdit } from './photo/schema.ts';
|
|
142
|
-
import {
|
|
143
|
-
|
|
191
|
+
import {
|
|
192
|
+
isEmbedCanvas,
|
|
193
|
+
isFollowCanvas,
|
|
194
|
+
isReadOnlyCanvas,
|
|
195
|
+
persistsCanvasMeta,
|
|
196
|
+
} from './read-only-mode.ts';
|
|
197
|
+
import { hoverFocusHeld } from './toolbars/tool-panel.ts';
|
|
198
|
+
import { AgentPresenceProvider } from './use-agent-presence.tsx';
|
|
144
199
|
import { type DragState, useArtboardDrag } from './use-artboard-drag.tsx';
|
|
145
200
|
import {
|
|
146
201
|
CanvasActivityProvider,
|
|
@@ -157,10 +212,30 @@ import { UndoStackProvider, useUndoSinks, useUndoStackOptional } from './use-und
|
|
|
157
212
|
// `remotion`/`@remotion/player` imports resolve through the canvas importmap
|
|
158
213
|
// (RUNTIME_PACKAGES), same as react/motion.
|
|
159
214
|
import { VideoComp } from './video-comp.tsx';
|
|
215
|
+
import { VideoPlayLayer } from './video-play-overlay.tsx';
|
|
160
216
|
|
|
161
217
|
export type { CompSnapshot, VideoCompMeta, VideoCompProps } from './video-comp.tsx';
|
|
218
|
+
// S7.5 — the comp vocabulary (V2-1.10 §5.3): literal-prop components; the build injects their
|
|
219
|
+
// derived data (`__words`, `__speech`, video/inject.ts). A 1.x build lacks these exports, so a
|
|
220
|
+
// canvas that uses them says "This canvas uses Maude 2" there (V2-1.12 §5.8).
|
|
221
|
+
export type {
|
|
222
|
+
CaptionsProps,
|
|
223
|
+
DuckProps,
|
|
224
|
+
PlaceProps,
|
|
225
|
+
ReframeProps,
|
|
226
|
+
TitleMotionProps,
|
|
227
|
+
} from './video-vocab.tsx';
|
|
228
|
+
export { Captions, Duck, Place, Reframe, TitleMotion } from './video-vocab.tsx';
|
|
162
229
|
export { VideoComp };
|
|
163
230
|
|
|
231
|
+
/** The viewport's zoom keys, resolved from the registry (V2-3.11) — `useViewportController`'s keydown. */
|
|
232
|
+
const CANVAS_ZOOM_KEYS = canvasKeyIndex([
|
|
233
|
+
'view.zoom-in',
|
|
234
|
+
'view.zoom-out',
|
|
235
|
+
'view.zoom-fit',
|
|
236
|
+
'view.zoom-actual',
|
|
237
|
+
]);
|
|
238
|
+
|
|
164
239
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
165
240
|
// AIPlaceholder — feature-enhanced-video-editing (Task 21). A prompt-carrying
|
|
166
241
|
// slate clip: occupies real timeline space inside a video-comp until the
|
|
@@ -306,10 +381,9 @@ const ENGINE_CSS = `
|
|
|
306
381
|
down on zoom-out. Inherited, so this covers every descendant. No-op on Blink. */
|
|
307
382
|
-webkit-text-size-adjust: 100%;
|
|
308
383
|
text-size-adjust: 100%;
|
|
309
|
-
/* DDR-046 —
|
|
310
|
-
never visually melts into the selection halo during a drag-snap gesture.
|
|
311
|
-
|
|
312
|
-
--guide-magenta: oklch(62% 0.28 350);
|
|
384
|
+
/* DDR-046 — the guide colour (--guide, was --guide-magenta) is distinct from --accent so the snap chrome
|
|
385
|
+
never visually melts into the selection halo during a drag-snap gesture. It is defined once, by the
|
|
386
|
+
generated HUD block (canvas-hud-tokens.gen.ts, from maude-v2); the literal below is the fallback only. */
|
|
313
387
|
/* Canvas-shell chrome — the workspace plane + dotted grid follow the Maude
|
|
314
388
|
chrome theme (--maude-chrome-*), NOT the DS palette. See canvas-shell.tsx
|
|
315
389
|
HUD_TOKENS_CSS. Artboards (.dc-artboard) keep the DS theme. */
|
|
@@ -329,8 +403,8 @@ const ENGINE_CSS = `
|
|
|
329
403
|
transform-origin: center;
|
|
330
404
|
}
|
|
331
405
|
.dc-snap-guide--sibling {
|
|
332
|
-
background: var(--guide
|
|
333
|
-
box-shadow: 0 0 4px color-mix(in oklab, var(--guide
|
|
406
|
+
background: var(--guide, oklch(0.55 0.20 328));
|
|
407
|
+
box-shadow: 0 0 4px color-mix(in oklab, var(--guide, oklch(0.55 0.20 328)) 35%, transparent);
|
|
334
408
|
}
|
|
335
409
|
.dc-snap-guide--grid {
|
|
336
410
|
background: color-mix(in oklab, var(--maude-chrome-fg-1, #4a3f30) 40%, transparent);
|
|
@@ -339,12 +413,12 @@ const ENGINE_CSS = `
|
|
|
339
413
|
position: fixed;
|
|
340
414
|
pointer-events: none;
|
|
341
415
|
z-index: 7;
|
|
342
|
-
font-family: var(--maude-chrome-font-
|
|
416
|
+
font-family: var(--maude-chrome-font-body, system-ui, -apple-system, sans-serif);
|
|
343
417
|
font-size: 11px;
|
|
344
418
|
font-weight: 600;
|
|
345
419
|
line-height: 1;
|
|
346
|
-
color: #fff;
|
|
347
|
-
background: var(--guide
|
|
420
|
+
color: var(--guide-fg, #fff);
|
|
421
|
+
background: var(--guide, oklch(0.55 0.20 328));
|
|
348
422
|
padding: 3px 6px;
|
|
349
423
|
border-radius: 3px;
|
|
350
424
|
white-space: nowrap;
|
|
@@ -359,9 +433,19 @@ const ENGINE_CSS = `
|
|
|
359
433
|
from { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
|
|
360
434
|
to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
|
|
361
435
|
}
|
|
436
|
+
/* A6c — reveal-artboard's flash (S1.3 jump list, S1.15 Compare): one ring, then gone. */
|
|
437
|
+
.dc-reveal-flash {
|
|
438
|
+
animation: dc-reveal-flash 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
439
|
+
}
|
|
440
|
+
@keyframes dc-reveal-flash {
|
|
441
|
+
0% { box-shadow: 0 0 0 0 transparent; }
|
|
442
|
+
25% { box-shadow: 0 0 0 4px var(--guide, oklch(0.55 0.20 328)); }
|
|
443
|
+
100% { box-shadow: 0 0 0 0 transparent; }
|
|
444
|
+
}
|
|
362
445
|
@media (prefers-reduced-motion: reduce) {
|
|
363
446
|
.dc-snap-guide,
|
|
364
|
-
.dc-snap-pill
|
|
447
|
+
.dc-snap-pill,
|
|
448
|
+
.dc-reveal-flash {
|
|
365
449
|
animation: none !important;
|
|
366
450
|
}
|
|
367
451
|
}
|
|
@@ -423,31 +507,50 @@ const ENGINE_CSS = `
|
|
|
423
507
|
will-change: transform;
|
|
424
508
|
}
|
|
425
509
|
.dc-canvas .dc-artboard.dc-positioned { position: absolute; }
|
|
510
|
+
/* gate-a-polish - a placed artboard's NAME sits above the frame (04/14 canvases, _kit.css .k-ab-name): a constant
|
|
511
|
+
11 px sans label in screen px at every zoom, not a strip inside the frame. It has to paint outside the frame, so
|
|
512
|
+
the frame stops clipping (overflow / paint containment) and the BODY carries both - the design surface still
|
|
513
|
+
clips, the compositor layer (will-change + isolation, above) is unchanged. */
|
|
514
|
+
.dc-canvas .dc-artboard.dc-positioned {
|
|
515
|
+
overflow: visible;
|
|
516
|
+
contain: none;
|
|
517
|
+
}
|
|
518
|
+
.dc-canvas .dc-artboard.dc-positioned > .dc-artboard-body {
|
|
519
|
+
contain: paint;
|
|
520
|
+
}
|
|
521
|
+
/* S3.14 - Present draws the work only (04 md-present-*): the editor chrome list is present/present-stage.tsx
|
|
522
|
+
PRESENT_HIDES, keyed on the root attribute the stage sets while any Present is on. */
|
|
523
|
+
${presentHidesCss()}
|
|
426
524
|
.dc-canvas .dc-artboard-label {
|
|
427
525
|
flex-shrink: 0;
|
|
428
|
-
background: var(--bg-2, #e8e3d8);
|
|
429
|
-
border-bottom: 1px solid var(--
|
|
526
|
+
background: var(--maude-chrome-bg-2, #e8e3d8);
|
|
527
|
+
border-bottom: 1px solid var(--maude-chrome-border, #2a2520);
|
|
430
528
|
padding: 6px 14px;
|
|
431
529
|
font-size: 10px;
|
|
432
530
|
letter-spacing: 0.06em;
|
|
433
531
|
text-transform: uppercase;
|
|
434
|
-
color: var(--fg-1, #4a3f30);
|
|
435
|
-
font-family: var(--font-
|
|
532
|
+
color: var(--maude-chrome-fg-1, #4a3f30);
|
|
533
|
+
font-family: var(--maude-chrome-font-body, system-ui, -apple-system, sans-serif);
|
|
436
534
|
}
|
|
437
|
-
/*
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
535
|
+
/* P8 C5 (08 RC-3) - every label keeps its kind glyph (the DS family: web / digital / video / print), in the label's
|
|
536
|
+
own colour. The strip header tints a non-digital kind from the HUD accent, never from the project's tokens. */
|
|
537
|
+
.dc-canvas .dc-artboard:not(.dc-positioned)[data-dc-kind]:not([data-dc-kind='digital']) .dc-artboard-label {
|
|
538
|
+
background: color-mix(in oklab, var(--maude-hud-accent, var(--maude-chrome-fg-2, #4a3f30)) 10%, var(--maude-chrome-bg-2, #e8e3d8));
|
|
539
|
+
}
|
|
540
|
+
.dc-canvas .dc-artboard[data-dc-kind='video'] > .dc-artboard-label[data-dc-vtail]::after {
|
|
541
|
+
content: attr(data-dc-vtail);
|
|
542
|
+
font-weight: 400;
|
|
543
|
+
font-variant-numeric: tabular-nums;
|
|
544
|
+
opacity: 0.86;
|
|
545
|
+
white-space: pre;
|
|
442
546
|
}
|
|
443
547
|
.dc-canvas .dc-artboard-kind-chip {
|
|
444
548
|
display: inline-flex;
|
|
445
549
|
align-items: center;
|
|
446
550
|
justify-content: center;
|
|
447
551
|
margin-right: 6px;
|
|
448
|
-
color:
|
|
449
|
-
|
|
450
|
-
vertical-align: -1px;
|
|
552
|
+
color: inherit;
|
|
553
|
+
vertical-align: -2px;
|
|
451
554
|
}
|
|
452
555
|
.dc-canvas .dc-artboard-body {
|
|
453
556
|
flex: 1;
|
|
@@ -466,6 +569,13 @@ const ENGINE_CSS = `
|
|
|
466
569
|
frontend-design guidance steers mocks off them. (NB: no backticks in this
|
|
467
570
|
comment — it lives inside the ENGINE_CSS template literal.) */
|
|
468
571
|
container-type: inline-size;
|
|
572
|
+
/* r4 #5 - the live zoom stops here. writeTransform sets --dc-zoom on the world every zoom frame for the chrome
|
|
573
|
+
that holds a screen size (the name and badge are children of the frame, the guides and marks siblings of it -
|
|
574
|
+
none of them is inside this body). A custom property inherits, so without this reset every zoom frame changed
|
|
575
|
+
the computed style of every element of every design and WebKit re-resolved all of it: 90-240 ms a frame on the
|
|
576
|
+
Design system canvas, where a pan (no --dc-zoom change) took 18 ms. Reset to the guaranteed-invalid value, a
|
|
577
|
+
zoom frame recomputes one element per artboard; a design never sees the camera (var fallbacks apply). */
|
|
578
|
+
--dc-zoom: initial;
|
|
469
579
|
}
|
|
470
580
|
button.dc-artboard-label {
|
|
471
581
|
appearance: none;
|
|
@@ -488,6 +598,60 @@ input.dc-artboard-rename {
|
|
|
488
598
|
outline: 2px solid var(--maude-hud-accent, #d63b1f);
|
|
489
599
|
outline-offset: -2px;
|
|
490
600
|
}
|
|
601
|
+
/* gate-a-polish - the placed artboard's name (and its rename field). Out of flow above the frame; scale(1 / zoom)
|
|
602
|
+
cancels the world's zoom (CSS zoom on Chromium, transform scale on WebKit) so it is 11 screen px at 8% and 800%.
|
|
603
|
+
Its box is the size of the text, capped to the frame's on-screen width. Unselected it reads --maude-chrome-fg-1;
|
|
604
|
+
selected (editing/artboard-handles.tsx) it is the accent pill with --maude-hud-accent-fg. */
|
|
605
|
+
.dc-canvas .dc-artboard.dc-positioned > .dc-artboard-label {
|
|
606
|
+
position: absolute;
|
|
607
|
+
left: 0;
|
|
608
|
+
bottom: 100%;
|
|
609
|
+
margin-bottom: 4px;
|
|
610
|
+
z-index: 2;
|
|
611
|
+
display: block;
|
|
612
|
+
width: auto;
|
|
613
|
+
min-width: 0;
|
|
614
|
+
/* r3-ds-rows: capped to the frame's on-screen width, and collapsed to nothing when that is under 24 screen px — a
|
|
615
|
+
name that narrow is only a glyph, and the Design system canvas's seven sections (80 px apart) stacked theirs into
|
|
616
|
+
one clump at 2 % zoom. The second term is huge while the frame is wide enough (so min() keeps the first) and
|
|
617
|
+
negative (clamped to 0) once it is not. */
|
|
618
|
+
max-width: min(calc(100% * var(--dc-zoom, 1)), calc((100% * var(--dc-zoom, 1) - 24px) * 1000));
|
|
619
|
+
box-sizing: border-box;
|
|
620
|
+
padding: 2px 4px;
|
|
621
|
+
border: 0;
|
|
622
|
+
border-radius: 4px;
|
|
623
|
+
background: transparent;
|
|
624
|
+
color: var(--maude-chrome-fg-1, #4a3f30);
|
|
625
|
+
font-family: var(--maude-chrome-font-body, system-ui, sans-serif);
|
|
626
|
+
font-size: 11px;
|
|
627
|
+
font-weight: 500;
|
|
628
|
+
line-height: 1.36;
|
|
629
|
+
letter-spacing: 0;
|
|
630
|
+
text-transform: none;
|
|
631
|
+
white-space: nowrap;
|
|
632
|
+
overflow: hidden;
|
|
633
|
+
text-overflow: ellipsis;
|
|
634
|
+
transform: scale(calc(1 / var(--dc-zoom, 1)));
|
|
635
|
+
transform-origin: 0 100%;
|
|
636
|
+
}
|
|
637
|
+
/* V2-8.8 (WebKit M7) - on the WebKit scale path (transform, see writeTransform) the name and the video badge get
|
|
638
|
+
their OWN compositor layer. They are re-sized every zoom frame by the counter-scale above and paint outside the
|
|
639
|
+
frame, so inside the board's layer (will-change, the per-board raster freeze) they moved its bounds every frame
|
|
640
|
+
and WebKit re-rastered every board on every zoom frame. Blink (CSS zoom) relayouts the world anyway; untouched. */
|
|
641
|
+
.dc-world[data-dc-scale='transform'] .dc-artboard.dc-positioned > .dc-artboard-label,
|
|
642
|
+
.dc-world[data-dc-scale='transform'] .dc-artboard.dc-positioned > .dc-artboard-video-badge {
|
|
643
|
+
will-change: transform;
|
|
644
|
+
}
|
|
645
|
+
.dc-canvas .dc-artboard.dc-positioned > .dc-artboard-label:focus-visible { outline-offset: 0; }
|
|
646
|
+
.dc-canvas .dc-artboard.dc-positioned > input.dc-artboard-rename {
|
|
647
|
+
background: var(--maude-chrome-bg-2, #fff);
|
|
648
|
+
color: var(--maude-chrome-fg-0, #2a2520);
|
|
649
|
+
padding: 2px 8px;
|
|
650
|
+
max-width: none;
|
|
651
|
+
text-overflow: clip;
|
|
652
|
+
outline-offset: 0;
|
|
653
|
+
}
|
|
654
|
+
.dc-canvas .dc-artboard.dc-positioned > .dc-artboard-label .dc-artboard-kind-chip { margin-right: 4px; }
|
|
491
655
|
/* DDR-148 — video-artboard badge, overlaid top-right of the header. Opens
|
|
492
656
|
the timeline panel (same postMessage the context-menu entry sends). */
|
|
493
657
|
.dc-canvas .dc-artboard-video-badge {
|
|
@@ -503,12 +667,26 @@ input.dc-artboard-rename {
|
|
|
503
667
|
padding: 0;
|
|
504
668
|
appearance: none;
|
|
505
669
|
border: none;
|
|
506
|
-
border-radius: 3px;
|
|
507
|
-
background: var(--bg-
|
|
508
|
-
color: var(--fg-1, #4a3f30);
|
|
670
|
+
border-radius: var(--maude-hud-radius-xs, 3px);
|
|
671
|
+
background: var(--maude-chrome-bg-3, #e8e3d8);
|
|
672
|
+
color: var(--maude-chrome-fg-1, #4a3f30);
|
|
509
673
|
cursor: pointer;
|
|
510
674
|
}
|
|
511
|
-
|
|
675
|
+
/* gate-a-polish - the badge rides the name row above the frame, at the right end, in screen px. */
|
|
676
|
+
.dc-canvas .dc-artboard.dc-positioned > .dc-artboard-video-badge {
|
|
677
|
+
top: auto;
|
|
678
|
+
right: 0;
|
|
679
|
+
bottom: 100%;
|
|
680
|
+
margin-bottom: 4px;
|
|
681
|
+
transform: scale(calc(1 / var(--dc-zoom, 1)));
|
|
682
|
+
transform-origin: 100% 100%;
|
|
683
|
+
/* V2-8.5 c4-video (07): the board's label row is the kind glyph, the name and the length — no camera chip at its
|
|
684
|
+
right end. The badge stays (a door to the timeline for a keyboard or a hover) but is quiet until one arrives. */
|
|
685
|
+
opacity: 0;
|
|
686
|
+
}
|
|
687
|
+
.dc-canvas .dc-artboard.dc-positioned:hover > .dc-artboard-video-badge,
|
|
688
|
+
.dc-canvas .dc-artboard.dc-positioned > .dc-artboard-video-badge:focus-visible { opacity: 1; }
|
|
689
|
+
.dc-canvas .dc-artboard-video-badge:hover { background: color-mix(in oklab, var(--maude-chrome-fg-0, #2a2520) 12%, var(--maude-chrome-bg-3, #e8e3d8)); }
|
|
512
690
|
.dc-canvas .dc-artboard-video-badge:focus-visible { outline: 2px solid var(--maude-hud-accent, #d63b1f); outline-offset: 1px; }
|
|
513
691
|
/* Active-artboard ring is in canvas-shell HALO_CSS (subtle 1 px tint). */
|
|
514
692
|
/* Phase 4.2 — drag chrome. */
|
|
@@ -615,7 +793,7 @@ export function useWorldRefContext(): RefObject<HTMLDivElement | null> | null {
|
|
|
615
793
|
|
|
616
794
|
const VP_GRID = { cols: 3, w: 1280, h: 820, gutter: 80 } as const;
|
|
617
795
|
|
|
618
|
-
interface ArtboardSeed {
|
|
796
|
+
export interface ArtboardSeed {
|
|
619
797
|
id: string;
|
|
620
798
|
w: number;
|
|
621
799
|
h: number;
|
|
@@ -696,7 +874,7 @@ function subtreeHasVideoComp(children: ReactNode): boolean {
|
|
|
696
874
|
return visit(children);
|
|
697
875
|
}
|
|
698
876
|
|
|
699
|
-
function synthDefaultGrid(seeds: ArtboardSeed[]): ArtboardRect[] {
|
|
877
|
+
export function synthDefaultGrid(seeds: ArtboardSeed[]): ArtboardRect[] {
|
|
700
878
|
// Render order (the order DCArtboards appear in JSX), not alphabetical —
|
|
701
879
|
// authors label artboards DS-01 / DS-02 / CV-01 etc. and expect that
|
|
702
880
|
// numeric order to show top-left → bottom-right, but their ids are usually
|
|
@@ -724,7 +902,15 @@ function synthDefaultGrid(seeds: ArtboardSeed[]): ArtboardRect[] {
|
|
|
724
902
|
|
|
725
903
|
// Exported for the same reason as `clampZoom` above — lets a unit test prove
|
|
726
904
|
// the raw fit computation for a wide board isn't what's clamping the zoom.
|
|
727
|
-
|
|
905
|
+
// V2-2.10 (V2-1.2 §5.6) — `insets`: the shell's occluded insets. The fit centres the union in the
|
|
906
|
+
// VISIBLE rect (bridge/occlusion.ts visibleRect); all-zero / absent insets are byte-identical to
|
|
907
|
+
// the whole-host fit (I3, test/occlusion-geometry.test.ts).
|
|
908
|
+
export function computeFit(
|
|
909
|
+
rects: ArtboardRect[],
|
|
910
|
+
hostEl: HTMLElement,
|
|
911
|
+
pad = 24,
|
|
912
|
+
insets: Readonly<Insets> = ZERO_INSETS
|
|
913
|
+
): ViewportState {
|
|
728
914
|
if (rects.length === 0) return { x: 0, y: 0, zoom: 1 };
|
|
729
915
|
let xMin = Number.POSITIVE_INFINITY;
|
|
730
916
|
let yMin = Number.POSITIVE_INFINITY;
|
|
@@ -741,9 +927,10 @@ export function computeFit(rects: ArtboardRect[], hostEl: HTMLElement, pad = 24)
|
|
|
741
927
|
const vw = hostEl.clientWidth;
|
|
742
928
|
const vh = hostEl.clientHeight;
|
|
743
929
|
if (!vw || !vh || bw <= 0 || bh <= 0) return { x: 0, y: 0, zoom: 1 };
|
|
744
|
-
const
|
|
745
|
-
const
|
|
746
|
-
const
|
|
930
|
+
const v = visibleRect(vw, vh, insets);
|
|
931
|
+
const zoom = Math.min((v.w - pad * 2) / bw, (v.h - pad * 2) / bh, 1.0);
|
|
932
|
+
const x = v.x + (v.w - bw * zoom) / 2 - xMin * zoom;
|
|
933
|
+
const y = v.y + (v.h - bh * zoom) / 2 - yMin * zoom;
|
|
747
934
|
return { x, y, zoom };
|
|
748
935
|
}
|
|
749
936
|
|
|
@@ -823,15 +1010,21 @@ export function isMetaSelfEcho(now: number = Date.now()): boolean {
|
|
|
823
1010
|
return now - last < META_SELF_ECHO_WINDOW_MS;
|
|
824
1011
|
}
|
|
825
1012
|
|
|
826
|
-
function patchCanvasMeta(
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
1013
|
+
function patchCanvasMeta(
|
|
1014
|
+
patch: {
|
|
1015
|
+
viewport?: ViewportState;
|
|
1016
|
+
layout?: { artboards: ArtboardRect[] };
|
|
1017
|
+
},
|
|
1018
|
+
/** S2.9b — annotations riding with the layout (one action); `onRefused` when the server refuses. */
|
|
1019
|
+
rider?: LayoutRider & { onRefused?: () => void }
|
|
1020
|
+
): void {
|
|
830
1021
|
if (typeof window === 'undefined' || typeof fetch === 'undefined') return;
|
|
831
1022
|
// DDR-247 — an embedded view persists nothing, camera included: its fit is
|
|
832
1023
|
// not the designer's view, and the next time they open the canvas in the
|
|
833
|
-
// studio it must be where they left it.
|
|
834
|
-
|
|
1024
|
+
// studio it must be where they left it. S3.7a — nor does a Present follower: its camera is the
|
|
1025
|
+
// presenter's, and the audience window shares the designer's own `_canvas-state/` view file.
|
|
1026
|
+
// S1.14 — nor does a past version (`?sha=`, Version history's Viewing): it is not the designer's view.
|
|
1027
|
+
if (!persistsCanvasMeta()) return;
|
|
835
1028
|
// Cloud Phase 25 C2 — a read-only session persists its CAMERA (per-user
|
|
836
1029
|
// `_canvas-state/` view, DDR-115) but never the LAYOUT lane (versioned
|
|
837
1030
|
// `.meta.json`). The dev-server refuses the layout lane too (http.ts);
|
|
@@ -876,13 +1069,19 @@ function patchCanvasMeta(patch: {
|
|
|
876
1069
|
// (PATCH → server write → fs:json broadcast → iframe message) lands
|
|
877
1070
|
// safely inside the echo window even on a fast network.
|
|
878
1071
|
window.__maude_last_meta_self_write_at = Date.now();
|
|
1072
|
+
const body = canvasMetaBody(file, sanitized, rider);
|
|
879
1073
|
fetch('/_api/canvas-meta', {
|
|
880
1074
|
method: 'PATCH',
|
|
881
1075
|
headers: { 'content-type': 'application/json' },
|
|
882
|
-
body: JSON.stringify(
|
|
883
|
-
})
|
|
884
|
-
|
|
885
|
-
|
|
1076
|
+
body: JSON.stringify(body),
|
|
1077
|
+
})
|
|
1078
|
+
.then((res) => {
|
|
1079
|
+
// A refused rider refused the whole move (nothing was written): show what the disk holds.
|
|
1080
|
+
if (body.annotations && !res.ok) rider?.onRefused?.();
|
|
1081
|
+
})
|
|
1082
|
+
.catch((err) => {
|
|
1083
|
+
console.warn('[canvas-lib] persist viewport failed:', err);
|
|
1084
|
+
});
|
|
886
1085
|
}
|
|
887
1086
|
|
|
888
1087
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -897,6 +1096,8 @@ function patchCanvasMeta(patch: {
|
|
|
897
1096
|
// T5 can persist the viewport without flooding writes during a drag.
|
|
898
1097
|
|
|
899
1098
|
export interface ViewportControllerOptions {
|
|
1099
|
+
/** r4 #1 — a quick Space tap: return true when the canvas took it itself (a selected `<video>` plays / pauses). */
|
|
1100
|
+
onSpaceTap?: () => boolean;
|
|
900
1101
|
hostRef: RefObject<HTMLDivElement | null>;
|
|
901
1102
|
worldRef: RefObject<HTMLDivElement | null>;
|
|
902
1103
|
/** Computes a fit-to-screen viewport for the current artboard set. */
|
|
@@ -922,7 +1123,18 @@ export interface ViewportControllerOptions {
|
|
|
922
1123
|
* state. Omit / return `false` to keep the Phase-4 behavior (drag only
|
|
923
1124
|
* with Space or middle-mouse).
|
|
924
1125
|
*/
|
|
925
|
-
isPanDragActive?: () => boolean;
|
|
1126
|
+
isPanDragActive?: (e: PointerEvent) => boolean;
|
|
1127
|
+
/**
|
|
1128
|
+
* S3.9 (Preview) — true hands this wheel event to the design underneath instead of panning (a web
|
|
1129
|
+
* artboard scrolling inside itself). Read per event; omit to keep today's wheel (always the canvas').
|
|
1130
|
+
*/
|
|
1131
|
+
wheelPassthrough?: (e: WheelEvent) => boolean;
|
|
1132
|
+
/**
|
|
1133
|
+
* Called on every camera move the controller applies for someone — a gesture, Fit, Actual size, zoom,
|
|
1134
|
+
* a jump, a set — and never for the runtime's own placements (the initial camera, `refitBoot`, the
|
|
1135
|
+
* zero-size re-fit), which write the camera directly.
|
|
1136
|
+
*/
|
|
1137
|
+
onMove?: () => void;
|
|
926
1138
|
}
|
|
927
1139
|
|
|
928
1140
|
export interface ViewportControllerHandle {
|
|
@@ -936,6 +1148,11 @@ export interface ViewportControllerHandle {
|
|
|
936
1148
|
zoomAt: (factor: number, cx: number, cy: number) => void;
|
|
937
1149
|
/** Cmd+0 — fit-to-screen on the artboard union. */
|
|
938
1150
|
fit: () => void;
|
|
1151
|
+
/**
|
|
1152
|
+
* V2-1.2 §5.6 I2 — the boot re-fit: re-run the boot fit in place (crisp, no ease, no settle), so the
|
|
1153
|
+
* camera is still a boot camera — nothing is persisted, exactly like the boot fit itself.
|
|
1154
|
+
*/
|
|
1155
|
+
refitBoot: () => void;
|
|
939
1156
|
/** Cmd+1 — actual size (zoom = 1.0), recentered on viewport midpoint. */
|
|
940
1157
|
reset: () => void;
|
|
941
1158
|
/** Cmd+= — zoom in 1.2× at host center. */
|
|
@@ -982,8 +1199,8 @@ function prefersReducedMotion(): boolean {
|
|
|
982
1199
|
}
|
|
983
1200
|
}
|
|
984
1201
|
|
|
985
|
-
function fitRectIntoHost(rect: ArtboardRect, hostEl: HTMLElement, pad = 24): ViewportState {
|
|
986
|
-
return computeFit([rect], hostEl, pad);
|
|
1202
|
+
export function fitRectIntoHost(rect: ArtboardRect, hostEl: HTMLElement, pad = 24): ViewportState {
|
|
1203
|
+
return computeFit([rect], hostEl, pad, canvasInsets());
|
|
987
1204
|
}
|
|
988
1205
|
|
|
989
1206
|
// RC3 (rca/issue-canvas-hmr-optimistic-update-consistency) — the LIVE camera,
|
|
@@ -999,6 +1216,22 @@ function fitRectIntoHost(rect: ArtboardRect, hostEl: HTMLElement, pad = 24): Vie
|
|
|
999
1216
|
// outlives the subtree. A full page load clears it — correct, view.json seeds
|
|
1000
1217
|
// then. Written on every applyViewport (exact — no settle/publish lag).
|
|
1001
1218
|
let liveViewport: ViewportState | null = null;
|
|
1219
|
+
// V2-8.5 c7 — where the last Zoom to fit put the camera (viewport-fit.ts); the reporter tells the shell while it still sits there.
|
|
1220
|
+
let fitMark: ViewportState | null = null;
|
|
1221
|
+
|
|
1222
|
+
// r2-export-size-race — the `.dc-world` style the runtime itself last wrote, per world element. A capture
|
|
1223
|
+
// shim (`bin/_png-playwright.mjs` and its siblings) zeroes the world's zoom/transform straight in the DOM
|
|
1224
|
+
// and then shrinks the viewport to the artboard; the runtime's own state still says "boot fit", so a
|
|
1225
|
+
// re-fit on that resize used to re-place the camera behind the capture's back (a PNG of the whole canvas
|
|
1226
|
+
// shrunk into the artboard's box, or — on a loaded machine — a file a fraction of the artboard's size).
|
|
1227
|
+
// A world style the runtime did not write is a camera someone else placed: the runtime never re-fits it.
|
|
1228
|
+
const runtimeWorldStyle = new WeakMap<HTMLElement, string>();
|
|
1229
|
+
const worldStyleKey = (el: HTMLElement) =>
|
|
1230
|
+
`${el.style.zoom}|${el.style.transform}|${el.style.transformOrigin}`;
|
|
1231
|
+
/** True while `.dc-world` still carries exactly the camera the runtime wrote (false: nothing written yet, or someone else wrote it). */
|
|
1232
|
+
export function worldPlacedByRuntime(el: HTMLElement | null): boolean {
|
|
1233
|
+
return !!el && runtimeWorldStyle.get(el) === worldStyleKey(el);
|
|
1234
|
+
}
|
|
1002
1235
|
|
|
1003
1236
|
/**
|
|
1004
1237
|
* The current pan/zoom, read from OUTSIDE the React tree — the
|
|
@@ -1096,9 +1329,18 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1096
1329
|
onSettle,
|
|
1097
1330
|
jumpTargets,
|
|
1098
1331
|
isPanDragActive,
|
|
1332
|
+
wheelPassthrough,
|
|
1333
|
+
onMove,
|
|
1334
|
+
onSpaceTap,
|
|
1099
1335
|
} = opts;
|
|
1100
|
-
const
|
|
1336
|
+
const onMoveRef = useRef(onMove);
|
|
1337
|
+
onMoveRef.current = onMove;
|
|
1338
|
+
const onSpaceTapRef = useRef(onSpaceTap);
|
|
1339
|
+
onSpaceTapRef.current = onSpaceTap;
|
|
1340
|
+
const isPanDragActiveRef = useRef<((e: PointerEvent) => boolean) | undefined>(isPanDragActive);
|
|
1101
1341
|
isPanDragActiveRef.current = isPanDragActive;
|
|
1342
|
+
const wheelPassthroughRef = useRef<((e: WheelEvent) => boolean) | undefined>(wheelPassthrough);
|
|
1343
|
+
wheelPassthroughRef.current = wheelPassthrough;
|
|
1102
1344
|
|
|
1103
1345
|
// Canonical viewport in a ref — synchronous, drives the world transform.
|
|
1104
1346
|
const vpRef = useRef<ViewportState>({ x: 0, y: 0, zoom: 1 });
|
|
@@ -1178,6 +1420,7 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1178
1420
|
// (RCA addendum: the LOD toggle was reverted for visible flicker).
|
|
1179
1421
|
el.style.setProperty('--dc-zoom', String(z));
|
|
1180
1422
|
el.style.visibility = 'visible';
|
|
1423
|
+
runtimeWorldStyle.set(el, worldStyleKey(el));
|
|
1181
1424
|
}, []);
|
|
1182
1425
|
|
|
1183
1426
|
const schedulePublish = useCallback(() => {
|
|
@@ -1256,6 +1499,7 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1256
1499
|
if (!opts?.defer) schedulePublish();
|
|
1257
1500
|
scheduleSettle();
|
|
1258
1501
|
markInteracting();
|
|
1502
|
+
onMoveRef.current?.();
|
|
1259
1503
|
},
|
|
1260
1504
|
[writeTransform, schedulePublish, scheduleSettle, markInteracting]
|
|
1261
1505
|
);
|
|
@@ -1302,11 +1546,26 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1302
1546
|
const PROGRAMMATIC_EASE_MS = 200;
|
|
1303
1547
|
const fit = useCallback(() => {
|
|
1304
1548
|
const next = computeFitRef.current();
|
|
1549
|
+
fitMark = { ...next, zoom: clampZoom(next.zoom) };
|
|
1550
|
+
// already on the target: nothing moves, so republish the same camera and let the reporter say "fit"
|
|
1551
|
+
if (viewportAtFit(vpRef.current, fitMark)) setViewportPublished({ ...vpRef.current });
|
|
1305
1552
|
const a = animateToRef.current;
|
|
1306
1553
|
if (a) a(next, PROGRAMMATIC_EASE_MS);
|
|
1307
1554
|
else applyViewport(next);
|
|
1308
1555
|
}, [applyViewport]);
|
|
1309
1556
|
|
|
1557
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: refs only — stable identity by design.
|
|
1558
|
+
const refitBoot = useCallback(() => {
|
|
1559
|
+
if (interactingRef.current) return;
|
|
1560
|
+
// r2-export-size-race — a camera someone else wrote into the DOM (a capture at zoom 1) is theirs.
|
|
1561
|
+
if (!worldPlacedByRuntime(worldRef.current)) return;
|
|
1562
|
+
const next = computeFitRef.current();
|
|
1563
|
+
vpRef.current = { ...next };
|
|
1564
|
+
liveViewport = { ...next };
|
|
1565
|
+
writeTransform(vpRef.current, { crisp: true });
|
|
1566
|
+
setViewportPublished({ ...vpRef.current });
|
|
1567
|
+
}, []);
|
|
1568
|
+
|
|
1310
1569
|
const reset = useCallback(() => {
|
|
1311
1570
|
const host = hostRef.current;
|
|
1312
1571
|
if (!host) {
|
|
@@ -1437,6 +1696,9 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1437
1696
|
// passing over it inside another app's dialog would pull keyboard focus
|
|
1438
1697
|
// out of that app and strand its Escape. A click still focuses it.
|
|
1439
1698
|
if (isEmbedCanvas()) return;
|
|
1699
|
+
// r1 #11 — a shell panel the canvas asked for sits over it and closes on the shell's blur: hover keeps out
|
|
1700
|
+
// until the next press in the canvas (toolbars/tool-panel.ts)
|
|
1701
|
+
if (hoverFocusHeld()) return;
|
|
1440
1702
|
try {
|
|
1441
1703
|
const active = document.activeElement as HTMLElement | null;
|
|
1442
1704
|
// Never steal focus from something being TYPED into. An editor that
|
|
@@ -1457,6 +1719,8 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1457
1719
|
};
|
|
1458
1720
|
|
|
1459
1721
|
const spaceHeld = { current: false };
|
|
1722
|
+
// S7.8 — a tap on Space (up inside 200 ms, no drag between) is "play", not the Hand; the shell plays.
|
|
1723
|
+
const spaceTap = createSpaceTap();
|
|
1460
1724
|
const panState: {
|
|
1461
1725
|
active: boolean;
|
|
1462
1726
|
pointerId: number;
|
|
@@ -1546,11 +1810,12 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1546
1810
|
const onPointerDown = (e: PointerEvent) => {
|
|
1547
1811
|
const isMiddle = e.button === 1;
|
|
1548
1812
|
const isLeftWithSpace = e.button === 0 && spaceHeld.current;
|
|
1813
|
+
if (isLeftWithSpace) spaceTap.drag(); // the Hand panned: this Space was never a tap
|
|
1549
1814
|
// Phase 4.1 hand tool: bare left-button initiates pan when the consumer
|
|
1550
1815
|
// signals hand-mode via `isPanDragActive`. Read per-event so the live
|
|
1551
1816
|
// tool state controls the gate.
|
|
1552
1817
|
const isLeftWithHandTool =
|
|
1553
|
-
e.button === 0 && !spaceHeld.current && !!isPanDragActiveRef.current?.();
|
|
1818
|
+
e.button === 0 && !spaceHeld.current && !!isPanDragActiveRef.current?.(e);
|
|
1554
1819
|
if (!isMiddle && !isLeftWithSpace && !isLeftWithHandTool) return;
|
|
1555
1820
|
e.preventDefault();
|
|
1556
1821
|
try {
|
|
@@ -1590,15 +1855,15 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1590
1855
|
// Spacebar pan affordance — only when no input is focused.
|
|
1591
1856
|
if (e.code === 'Space' && !isEditableTarget(e.target)) {
|
|
1592
1857
|
spaceHeld.current = true;
|
|
1858
|
+
spaceTap.down(e.timeStamp);
|
|
1593
1859
|
host.style.cursor = panState.active ? 'grabbing' : 'grab';
|
|
1594
1860
|
e.preventDefault();
|
|
1595
1861
|
return;
|
|
1596
1862
|
}
|
|
1597
1863
|
const mod = e.metaKey || e.ctrlKey;
|
|
1598
|
-
if (!mod) return;
|
|
1599
1864
|
// Cmd+Option+1..9 → jump to artboard N (Option avoids Chrome's
|
|
1600
1865
|
// Cmd+1..9 tab-switching shortcut).
|
|
1601
|
-
if (e.altKey && /^Digit[1-9]$/.test(e.code)) {
|
|
1866
|
+
if (mod && e.altKey && /^Digit[1-9]$/.test(e.code)) {
|
|
1602
1867
|
const n = Number(e.code.slice(-1));
|
|
1603
1868
|
const target = jumpTargetsRef.current?.[n - 1];
|
|
1604
1869
|
if (target) {
|
|
@@ -1608,21 +1873,22 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1608
1873
|
return;
|
|
1609
1874
|
}
|
|
1610
1875
|
if (e.altKey) return;
|
|
1611
|
-
|
|
1612
|
-
|
|
1876
|
+
// V2-3.11 — the zoom keys come from the registry (⌘= / ⌘+ / ⌘− / ⌘0 Fit / ⇧0 Actual size).
|
|
1877
|
+
// ⌘1…⌘9 are the native tab accelerators: this listener must never prevent them.
|
|
1878
|
+
switch (resolveCanvasKey(CANVAS_ZOOM_KEYS, e, false, undefined, canvasSingleKeys())) {
|
|
1879
|
+
case 'view.zoom-fit':
|
|
1613
1880
|
e.preventDefault();
|
|
1614
1881
|
fit();
|
|
1615
1882
|
return;
|
|
1616
|
-
case '
|
|
1883
|
+
case 'view.zoom-actual':
|
|
1617
1884
|
e.preventDefault();
|
|
1618
1885
|
reset();
|
|
1619
1886
|
return;
|
|
1620
|
-
case '
|
|
1621
|
-
case '+':
|
|
1887
|
+
case 'view.zoom-in':
|
|
1622
1888
|
e.preventDefault();
|
|
1623
1889
|
zoomIn();
|
|
1624
1890
|
return;
|
|
1625
|
-
case '-':
|
|
1891
|
+
case 'view.zoom-out':
|
|
1626
1892
|
e.preventDefault();
|
|
1627
1893
|
zoomOut();
|
|
1628
1894
|
return;
|
|
@@ -1631,6 +1897,8 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1631
1897
|
const onKeyUp = (e: KeyboardEvent) => {
|
|
1632
1898
|
if (e.code === 'Space') {
|
|
1633
1899
|
spaceHeld.current = false;
|
|
1900
|
+
// r4 #1 — a selected <video> element plays / pauses right here; otherwise the shell plays a video artboard
|
|
1901
|
+
if (spaceTap.up(e.timeStamp) && onSpaceTapRef.current?.() !== true) sendSpaceTap(window);
|
|
1634
1902
|
host.style.cursor = panState.active ? 'grabbing' : '';
|
|
1635
1903
|
}
|
|
1636
1904
|
};
|
|
@@ -1647,6 +1915,7 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1647
1915
|
const doc = host.ownerDocument || document;
|
|
1648
1916
|
const captureWheel = (e: WheelEvent) => {
|
|
1649
1917
|
if (!host.contains(e.target as Node)) return;
|
|
1918
|
+
if (wheelPassthroughRef.current?.(e)) return; // S3.9: Preview — the design scrolls itself
|
|
1650
1919
|
onWheel(e);
|
|
1651
1920
|
};
|
|
1652
1921
|
const captureKeyDown = (e: KeyboardEvent) => {
|
|
@@ -1706,6 +1975,7 @@ export function useViewportController(opts: ViewportControllerOptions): Viewport
|
|
|
1706
1975
|
panBy,
|
|
1707
1976
|
zoomAt,
|
|
1708
1977
|
fit,
|
|
1978
|
+
refitBoot,
|
|
1709
1979
|
reset,
|
|
1710
1980
|
zoomIn,
|
|
1711
1981
|
zoomOut,
|
|
@@ -1734,38 +2004,75 @@ export function useViewportControllerContext(): ViewportControllerHandle | null
|
|
|
1734
2004
|
return useContext(ControllerContext);
|
|
1735
2005
|
}
|
|
1736
2006
|
|
|
2007
|
+
export type { MovedArtboard } from './drag-bus.ts';
|
|
1737
2008
|
// Drag-state context (Phase 4.2) — published by DesignCanvas so SnapGuideOverlay
|
|
1738
2009
|
// (mounted by CanvasShell) can read the active drag's snap guides + so each
|
|
1739
2010
|
// DCArtboard can know whether it's being dragged as a follower (multi-select
|
|
1740
2011
|
// drag). A single source-of-truth: only one drag can be active at a time, so
|
|
1741
2012
|
// the bus holds a single DragState. Each DCArtboard's hook writes here when
|
|
1742
2013
|
// non-idle and resets to idle on release.
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
* HUD / undo-stack label override. Default = `"move N artboard(s)"`.
|
|
1747
|
-
* Distribute / align gestures pass their own label so undo HUD reads
|
|
1748
|
-
* `"Undo: equal-space 4 artboards"` instead of `"Undo: move 4 artboards"`.
|
|
1749
|
-
*/
|
|
1750
|
-
label?: string;
|
|
1751
|
-
}
|
|
2014
|
+
// S2.9b — the bus's stable half (frames, riders, layoutRects, the commit door) lives in
|
|
2015
|
+
// drag-bus.ts; contract client/v2/contracts/S2-S4-artboard-motion-ids.md §1–§2.
|
|
2016
|
+
export type { CommitPositionsOptions, CommitRider, DragFrame, LayoutRect };
|
|
1752
2017
|
|
|
1753
|
-
interface DragStateBus {
|
|
2018
|
+
interface DragStateBus extends DragBusCore {
|
|
1754
2019
|
current: DragState;
|
|
1755
2020
|
setCurrent: (s: DragState) => void;
|
|
1756
|
-
/** Commit drag positions — DesignCanvas wires this to patchCanvasMeta. */
|
|
1757
|
-
commitPositions: (
|
|
1758
|
-
moved: { id: string; x: number; y: number }[],
|
|
1759
|
-
opts?: CommitPositionsOptions
|
|
1760
|
-
) => void;
|
|
1761
2021
|
}
|
|
1762
2022
|
|
|
1763
2023
|
const DragStateContext = createContext<DragStateBus | null>(null);
|
|
2024
|
+
/** S2.9b — the same stable core, in a context whose value never changes during a drag. */
|
|
2025
|
+
const DragFramesContext = createContext<DragBusCore | null>(null);
|
|
1764
2026
|
|
|
1765
2027
|
export function useDragStateContext(): DragStateBus | null {
|
|
1766
2028
|
return useContext(DragStateContext);
|
|
1767
2029
|
}
|
|
1768
2030
|
|
|
2031
|
+
/**
|
|
2032
|
+
* S2.9b — `subscribeFrames` / `onCommit` / `layoutRects` without re-rendering per frame: a layer
|
|
2033
|
+
* that moves 200 stickies at 60 fps reads the bus here, not through `useDragStateContext` (whose
|
|
2034
|
+
* value changes with `current`).
|
|
2035
|
+
*/
|
|
2036
|
+
export function useDragFrames(): DragBusCore | null {
|
|
2037
|
+
return useContext(DragFramesContext);
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
/** S4.10 — the handlers a layer rides the bus with (contract §1–§2). */
|
|
2041
|
+
export interface DragBusRide {
|
|
2042
|
+
/** Every drag frame, synchronously, outside React. */
|
|
2043
|
+
frame?: (f: DragFrame) => void;
|
|
2044
|
+
/** The ops that ride with a position commit (one undo group). */
|
|
2045
|
+
rider?: CommitRider;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
/**
|
|
2049
|
+
* S4.10 — subscribe a frame handler and a commit rider to `bus` THROUGH A REF: the
|
|
2050
|
+
* handlers may change on every render, the subscription does not, and a frame never
|
|
2051
|
+
* sets React state — a layer moving 200 members at 60 fps renders nothing per frame
|
|
2052
|
+
* (S4 Risk 1). Returns the bus (null outside a DesignCanvas: nothing rides).
|
|
2053
|
+
*/
|
|
2054
|
+
export function useDragBusRideOn(bus: DragBusCore | null, ride: DragBusRide): DragBusCore | null {
|
|
2055
|
+
const ref = useRef(ride);
|
|
2056
|
+
ref.current = ride;
|
|
2057
|
+
useEffect(() => {
|
|
2058
|
+
if (!bus) return;
|
|
2059
|
+
const offFrames = bus.subscribeFrames((f) => ref.current.frame?.(f));
|
|
2060
|
+
const offRider = bus.onCommit(
|
|
2061
|
+
(moved, undoGroup) => ref.current.rider?.(moved, undoGroup) ?? null
|
|
2062
|
+
);
|
|
2063
|
+
return () => {
|
|
2064
|
+
offFrames();
|
|
2065
|
+
offRider();
|
|
2066
|
+
};
|
|
2067
|
+
}, [bus]);
|
|
2068
|
+
return bus;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
/** `useDragBusRideOn` on this DesignCanvas's bus. */
|
|
2072
|
+
export function useDragBusRide(ride: DragBusRide): DragBusCore | null {
|
|
2073
|
+
return useDragBusRideOn(useDragFrames(), ride);
|
|
2074
|
+
}
|
|
2075
|
+
|
|
1769
2076
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
1770
2077
|
// Frame envelope
|
|
1771
2078
|
|
|
@@ -1803,7 +2110,8 @@ export function DesignCanvas(props: DesignCanvasProps) {
|
|
|
1803
2110
|
// CollabProvider is omitted; useCollab() falls back gracefully to null.
|
|
1804
2111
|
const collabSlug = canvasSlugFromPath(canvasFile);
|
|
1805
2112
|
const inner = (
|
|
1806
|
-
|
|
2113
|
+
// V2-4.3b — this instance owns the toolbar, so it is the one the shell's `set-mode` governs.
|
|
2114
|
+
<MaybeToolProvider governed>
|
|
1807
2115
|
<DesignCanvasInner {...props} />
|
|
1808
2116
|
</MaybeToolProvider>
|
|
1809
2117
|
);
|
|
@@ -2052,6 +2360,8 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
2052
2360
|
// server but the local React state stayed frozen at mount-time. Users had
|
|
2053
2361
|
// to switch canvases (forcing a reload) to see the new position.
|
|
2054
2362
|
const [artboards, setArtboards] = useState<ArtboardRect[]>(initialArtboards);
|
|
2363
|
+
// true once a layout was committed or undone in this session (applyArtboardLayout) — see the row flow below
|
|
2364
|
+
const arrangedRef = useRef(false);
|
|
2055
2365
|
|
|
2056
2366
|
// Re-seed when JSX children change (HMR after canvas TSX edit). The seed
|
|
2057
2367
|
// signature is identity-stable across renders that don't change the JSX,
|
|
@@ -2080,10 +2390,19 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
2080
2390
|
const artboardsRef = useRef(artboards);
|
|
2081
2391
|
artboardsRef.current = artboards;
|
|
2082
2392
|
|
|
2393
|
+
// V2-1.2 §5.6 I2 — the camera getInitial() fitted at boot (null: persisted / resumed / already inset).
|
|
2394
|
+
const bootFitRef = useRef<ViewportState | null>(null);
|
|
2395
|
+
// p8-edit-multi-flake — the camera the runtime placed by itself and the host size it fits (null: persisted /
|
|
2396
|
+
// resumed, or the camera has moved since). A host that grows from a placeholder size re-fits (below).
|
|
2397
|
+
const autoFitRef = useRef<AutoFit | null>(null);
|
|
2398
|
+
const dropAutoFit = useCallback(() => {
|
|
2399
|
+
autoFitRef.current = null;
|
|
2400
|
+
}, []);
|
|
2401
|
+
|
|
2083
2402
|
const computeFitForArtboards = useCallback((): ViewportState => {
|
|
2084
2403
|
const host = hostRef.current;
|
|
2085
2404
|
if (!host) return { x: 0, y: 0, zoom: 1 };
|
|
2086
|
-
return computeFit(artboardsRef.current, host);
|
|
2405
|
+
return computeFit(artboardsRef.current, host, 24, canvasInsets());
|
|
2087
2406
|
}, []);
|
|
2088
2407
|
|
|
2089
2408
|
const getInitial = useCallback((): ViewportState | null => {
|
|
@@ -2098,7 +2417,12 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
2098
2417
|
}
|
|
2099
2418
|
const host = hostRef.current;
|
|
2100
2419
|
if (!host) return null;
|
|
2101
|
-
|
|
2420
|
+
const fit = computeFit(artboardsRef.current, host, 24, canvasInsets());
|
|
2421
|
+
// §5.6 I2 — remember the boot fit only if no insets had arrived yet (else it already honours them).
|
|
2422
|
+
bootFitRef.current =
|
|
2423
|
+
typeof window !== 'undefined' && canvasModeStore(window).get().insetsSeq < 0 ? fit : null;
|
|
2424
|
+
autoFitRef.current = { camera: { ...fit }, w: host.clientWidth, h: host.clientHeight };
|
|
2425
|
+
return fit;
|
|
2102
2426
|
}, []);
|
|
2103
2427
|
|
|
2104
2428
|
const onSettle = useCallback((v: ViewportState) => {
|
|
@@ -2108,8 +2432,21 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
2108
2432
|
const toolModeCtx = useToolModeOptional();
|
|
2109
2433
|
const toolRef = useRef(toolModeCtx?.tool ?? 'move');
|
|
2110
2434
|
toolRef.current = toolModeCtx?.tool ?? 'move';
|
|
2111
|
-
|
|
2435
|
+
// S3.9 — Hand pans anywhere; Preview's Hand (`browse`) pans only off the design (V2-1.2 Q3).
|
|
2436
|
+
const isPanDragActive = useCallback(
|
|
2437
|
+
(e: PointerEvent) => pressStartsPan(toolRef.current, e.target),
|
|
2438
|
+
[]
|
|
2439
|
+
);
|
|
2440
|
+
// S3.9 — a web artboard scrolls inside itself in Preview; any other wheel pans as before.
|
|
2441
|
+
const wheelPassthrough = useCallback(
|
|
2442
|
+
(e: WheelEvent) => previewWheelPassthrough(e, canvasModeStore(window).get().mode),
|
|
2443
|
+
[]
|
|
2444
|
+
);
|
|
2112
2445
|
|
|
2446
|
+
// r4 #1 — what Space plays: the selected <video> element(s), read at the tap (a ref, so the camera hook never re-binds)
|
|
2447
|
+
const tapSel = useSelectionSetOptional();
|
|
2448
|
+
const tapSelRef = useRef(tapSel);
|
|
2449
|
+
tapSelRef.current = tapSel;
|
|
2113
2450
|
const controller = useViewportController({
|
|
2114
2451
|
hostRef,
|
|
2115
2452
|
worldRef,
|
|
@@ -2118,8 +2455,86 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
2118
2455
|
onSettle,
|
|
2119
2456
|
jumpTargets: artboards,
|
|
2120
2457
|
isPanDragActive,
|
|
2458
|
+
wheelPassthrough,
|
|
2459
|
+
// V2-8.9 attacker I3 — a camera someone placed is theirs at once: no later host resize re-fits it,
|
|
2460
|
+
// even when it lands back on the boot fit's exact camera (a pan, then ⌘0).
|
|
2461
|
+
onMove: dropAutoFit,
|
|
2462
|
+
onSpaceTap: () => playSelectedVideos(document, tapSelRef.current?.selected),
|
|
2121
2463
|
});
|
|
2122
2464
|
|
|
2465
|
+
// S3.9 — Edit ⇄ Preview: the camera eases onto the artboard in view, once (preview/preview-camera.tsx).
|
|
2466
|
+
usePreviewCamera({
|
|
2467
|
+
hostRef,
|
|
2468
|
+
artboards,
|
|
2469
|
+
controller,
|
|
2470
|
+
getCamera: getLiveViewport,
|
|
2471
|
+
fit: (rect) => {
|
|
2472
|
+
const host = hostRef.current;
|
|
2473
|
+
return host ? computeFit([rect], host, 24, canvasInsets()) : { x: 0, y: 0, zoom: 1 };
|
|
2474
|
+
},
|
|
2475
|
+
});
|
|
2476
|
+
|
|
2477
|
+
// V2-1.2 §5.6 I2 — boot re-fit, once only. The shell's first `occluded-insets` usually lands after
|
|
2478
|
+
// the boot fit (the runtime listener installs after `loaded`), which would leave a fresh canvas fitted
|
|
2479
|
+
// under a floating panel. Re-fit once if the camera is still exactly the boot fit; any later inset
|
|
2480
|
+
// change never moves the camera (I1).
|
|
2481
|
+
const controllerRef = useRef(controller);
|
|
2482
|
+
controllerRef.current = controller;
|
|
2483
|
+
useEffect(() => {
|
|
2484
|
+
if (typeof window === 'undefined') return;
|
|
2485
|
+
return onFirstInsets(canvasModeStore(window), (s) => {
|
|
2486
|
+
const c = controllerRef.current;
|
|
2487
|
+
const boot = bootFitRef.current;
|
|
2488
|
+
bootFitRef.current = null;
|
|
2489
|
+
if (shouldBootRefit(boot, c.viewport, c.isInteracting, s.insets)) {
|
|
2490
|
+
c.refitBoot();
|
|
2491
|
+
const host = hostRef.current;
|
|
2492
|
+
const now = getLiveViewport();
|
|
2493
|
+
if (host && now)
|
|
2494
|
+
autoFitRef.current = { camera: now, w: host.clientWidth, h: host.clientHeight };
|
|
2495
|
+
}
|
|
2496
|
+
});
|
|
2497
|
+
}, []);
|
|
2498
|
+
|
|
2499
|
+
// p8-edit-multi-flake — the boot fit follows the host until the camera moves. A frame can lay out at an
|
|
2500
|
+
// iframe's 300 x 150 default before the shell sizes it; a camera fitted then stayed thumbnail-small on the
|
|
2501
|
+
// full-size frame. Re-fit in place (crisp, nothing persisted — still a boot camera) while the camera is
|
|
2502
|
+
// exactly the runtime's own fit; drop the record the first time it is not.
|
|
2503
|
+
useEffect(() => {
|
|
2504
|
+
const host = hostRef.current;
|
|
2505
|
+
if (!host || typeof ResizeObserver === 'undefined') return;
|
|
2506
|
+
const ro = new ResizeObserver(() => {
|
|
2507
|
+
const auto = autoFitRef.current;
|
|
2508
|
+
if (!auto) return;
|
|
2509
|
+
// r2-export-size-race — the capture shim reset the world to zoom 1 and is now sizing the
|
|
2510
|
+
// viewport to the artboard: that camera is the capture's, never re-fit it.
|
|
2511
|
+
if (!worldPlacedByRuntime(worldRef.current)) {
|
|
2512
|
+
autoFitRef.current = null;
|
|
2513
|
+
return;
|
|
2514
|
+
}
|
|
2515
|
+
const c = controllerRef.current;
|
|
2516
|
+
const now = getLiveViewport();
|
|
2517
|
+
const w = host.clientWidth;
|
|
2518
|
+
const h = host.clientHeight;
|
|
2519
|
+
if (shouldResizeRefit(auto, now, c.isInteracting, w, h)) {
|
|
2520
|
+
c.refitBoot();
|
|
2521
|
+
const after = getLiveViewport();
|
|
2522
|
+
autoFitRef.current = after ? { camera: after, w, h } : null;
|
|
2523
|
+
} else if (
|
|
2524
|
+
now &&
|
|
2525
|
+
(now.x !== auto.camera.x || now.y !== auto.camera.y || now.zoom !== auto.camera.zoom)
|
|
2526
|
+
) {
|
|
2527
|
+
autoFitRef.current = null;
|
|
2528
|
+
}
|
|
2529
|
+
});
|
|
2530
|
+
ro.observe(host);
|
|
2531
|
+
return () => ro.disconnect();
|
|
2532
|
+
}, []);
|
|
2533
|
+
|
|
2534
|
+
// S3.2a — Present · Artboards: inert until the shell's `set-mode` says so (present/present-stage.tsx).
|
|
2535
|
+
const presentSelection = useSelectionSetOptional();
|
|
2536
|
+
usePresentStage({ hostRef, worldRef, artboards, controller, selection: presentSelection });
|
|
2537
|
+
|
|
2123
2538
|
const rectById = useMemo(() => {
|
|
2124
2539
|
const m = new Map<string, ArtboardRect>();
|
|
2125
2540
|
for (const r of artboards) m.set(r.id, r);
|
|
@@ -2187,6 +2602,24 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
2187
2602
|
});
|
|
2188
2603
|
}, []);
|
|
2189
2604
|
|
|
2605
|
+
// r3-ds-rows — the Design system canvas is a generated grid of rows whose pages hug their content. Written
|
|
2606
|
+
// at a fixed pitch it left thousands of px of air under a short row and let a tall page run into the next one
|
|
2607
|
+
// (Michal: "radek artboards by mel mit vzdy jen takovou vysku jako je jeho nejdelsi artboard"). Once the pages
|
|
2608
|
+
// report their height, re-pitch the rows: each is as tall as its tallest artboard, one gap between them. Runtime
|
|
2609
|
+
// only (never written to the meta: heights change with content, and a flow saved there would churn it on every
|
|
2610
|
+
// open); a person's arrangement is left alone — `flowRows` refuses any layout that is no longer the generated
|
|
2611
|
+
// grid, and `arrangedRef` stops it for the rest of the session once a layout was committed or undone.
|
|
2612
|
+
const rowFlowOn = useMemo(() => isDsCanvasIds(seeds.map((s) => s.id)), [seeds]);
|
|
2613
|
+
const declaredSizes = useMemo(
|
|
2614
|
+
() => new Map(seeds.map((s) => [s.id, { w: s.w, h: s.h }] as const)),
|
|
2615
|
+
[seeds]
|
|
2616
|
+
);
|
|
2617
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: `artboards` is the trigger (a measured height arrived); the setter reads the latest through `prev`.
|
|
2618
|
+
useEffect(() => {
|
|
2619
|
+
if (!rowFlowOn || arrangedRef.current) return;
|
|
2620
|
+
setArtboards((prev) => flowRows(prev, { declared: declaredSizes }));
|
|
2621
|
+
}, [artboards, rowFlowOn, declaredSizes]);
|
|
2622
|
+
|
|
2190
2623
|
const ctxValue = useMemo<WorldContextValue>(
|
|
2191
2624
|
() => ({
|
|
2192
2625
|
rectFor,
|
|
@@ -2221,9 +2654,14 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
2221
2654
|
* undo stack — both the initial commit (do) and every undo/redo replay
|
|
2222
2655
|
* route through here, so React state always tracks the server.
|
|
2223
2656
|
*/
|
|
2224
|
-
const applyArtboardLayout = useCallback((layout: unknown) => {
|
|
2657
|
+
const applyArtboardLayout = useCallback((layout: unknown, rider?: LayoutRider) => {
|
|
2658
|
+
const was = artboardsRef.current;
|
|
2659
|
+
arrangedRef.current = true; // a person's layout (drag, align, undo): the row flow stays out of it
|
|
2225
2660
|
setArtboards(layout as ArtboardRect[]);
|
|
2226
|
-
patchCanvasMeta(
|
|
2661
|
+
patchCanvasMeta(
|
|
2662
|
+
{ layout: { artboards: layout as ArtboardRect[] } },
|
|
2663
|
+
rider ? { ...rider, onRefused: () => setArtboards(was) } : undefined
|
|
2664
|
+
);
|
|
2227
2665
|
}, []);
|
|
2228
2666
|
|
|
2229
2667
|
// Register the layout patch sink with the undo provider so the rebuilt
|
|
@@ -2234,43 +2672,46 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
2234
2672
|
return () => undoSinks.setSink('layoutPatchFn', undefined);
|
|
2235
2673
|
}, [undoSinks, applyArtboardLayout]);
|
|
2236
2674
|
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
void undoStackRef.current.push(record);
|
|
2257
|
-
},
|
|
2675
|
+
// S2.9b — the bus core: one per mount, stable across drags (frames, riders, layoutRects and
|
|
2676
|
+
// the commit door every artboard-position commit goes through — drag, nudge, align, Tidy).
|
|
2677
|
+
// Phase 20's no-op skip (click without movement) lives in the core.
|
|
2678
|
+
const busCore = useMemo(
|
|
2679
|
+
() =>
|
|
2680
|
+
createDragBusCore({
|
|
2681
|
+
layout: () => artboardsRef.current,
|
|
2682
|
+
commit: (after, before, opts) => {
|
|
2683
|
+
const record = buildMoveArtboardsRecord({
|
|
2684
|
+
before,
|
|
2685
|
+
after,
|
|
2686
|
+
...(opts.label ? { label: opts.label } : {}),
|
|
2687
|
+
...(opts.rider ? { rider: opts.rider } : {}),
|
|
2688
|
+
});
|
|
2689
|
+
// push() invokes the rebuilt cmd.do() = applyArtboardLayout(next, rider) BEFORE
|
|
2690
|
+
// updating the stack, so the optimistic local + PATCH flow is preserved.
|
|
2691
|
+
void undoStackRef.current.push(record);
|
|
2692
|
+
},
|
|
2693
|
+
}),
|
|
2258
2694
|
[]
|
|
2259
2695
|
);
|
|
2260
2696
|
|
|
2261
2697
|
const dragBus = useMemo<DragStateBus>(
|
|
2262
|
-
() => ({
|
|
2263
|
-
|
|
2264
|
-
setCurrent: setDragCurrent,
|
|
2265
|
-
commitPositions: commitArtboardPositions,
|
|
2266
|
-
}),
|
|
2267
|
-
[dragCurrent, commitArtboardPositions]
|
|
2698
|
+
() => ({ ...busCore, current: dragCurrent, setCurrent: setDragCurrent }),
|
|
2699
|
+
[dragCurrent, busCore]
|
|
2268
2700
|
);
|
|
2269
2701
|
|
|
2270
2702
|
const inner = (
|
|
2271
2703
|
<div className="dc-canvas" ref={hostRef}>
|
|
2272
|
-
<div
|
|
2704
|
+
<div
|
|
2705
|
+
className="dc-world"
|
|
2706
|
+
ref={worldRef}
|
|
2707
|
+
style={worldStyle}
|
|
2708
|
+
data-dc-scale={IS_WEBKIT ? 'transform' : 'zoom'}
|
|
2709
|
+
>
|
|
2273
2710
|
{children}
|
|
2711
|
+
{/* S11.5 — the outlines an all-trashed canvas keeps (world coords, no hit area, shell-told). */}
|
|
2712
|
+
<ArtboardGhostsLayer />
|
|
2713
|
+
{/* S7.13 — the link glyphs between linked video artboards, and "Unlinked copy — its own cut" (derived, never exported). */}
|
|
2714
|
+
<VideoLinksLayer />
|
|
2274
2715
|
</div>
|
|
2275
2716
|
{showMiniMap ? <DCMiniMap /> : null}
|
|
2276
2717
|
{/* Plan C F6 — separate bottom-left zoom pill (the design's ZoomHud).
|
|
@@ -2279,15 +2720,23 @@ function DesignCanvasInner({ children, controls }: DesignCanvasProps) {
|
|
|
2279
2720
|
ToolPalette's inline zoom is removed in tool-palette.tsx). It carries
|
|
2280
2721
|
MORE than the mock — fit + actual-size — so no capability is lost. */}
|
|
2281
2722
|
{showZoom ? <DCZoomToolbar /> : null}
|
|
2723
|
+
<ViewportZoomReporter />
|
|
2724
|
+
{/* ── S8.19 (L1) placeholder frames ── "Waiting for Jonas's Mac" / Missing over a picture
|
|
2725
|
+
that failed to load; driven only by the shell's dgn `asset-state` (asset-placeholder.tsx). */}
|
|
2726
|
+
<AssetPlaceholderLayer />
|
|
2727
|
+
{/* r5-2 — a play / pause button over a placed or annotation clip (hover / selected), in Edit and Preview. */}
|
|
2728
|
+
<VideoPlayLayer />
|
|
2282
2729
|
</div>
|
|
2283
2730
|
);
|
|
2284
2731
|
|
|
2285
2732
|
return (
|
|
2286
2733
|
<WorldContext.Provider value={ctxValue}>
|
|
2287
2734
|
<ControllerContext.Provider value={controller}>
|
|
2288
|
-
<
|
|
2289
|
-
<
|
|
2290
|
-
|
|
2735
|
+
<DragFramesContext.Provider value={busCore}>
|
|
2736
|
+
<DragStateContext.Provider value={dragBus}>
|
|
2737
|
+
<CanvasShell hostRef={hostRef}>{inner}</CanvasShell>
|
|
2738
|
+
</DragStateContext.Provider>
|
|
2739
|
+
</DragFramesContext.Provider>
|
|
2291
2740
|
</ControllerContext.Provider>
|
|
2292
2741
|
</WorldContext.Provider>
|
|
2293
2742
|
);
|
|
@@ -2335,53 +2784,11 @@ export function DCSection({
|
|
|
2335
2784
|
DCSection.displayName = 'DCSection';
|
|
2336
2785
|
|
|
2337
2786
|
/**
|
|
2338
|
-
*
|
|
2339
|
-
*
|
|
2340
|
-
* `currentColor`, ~1.2px stroke) for chrome consistency. `video` reuses that
|
|
2341
|
-
* exact badge glyph.
|
|
2787
|
+
* The kind glyph before an artboard's name (T3, 08 RC-3): the DS family's `web` / `digital` / `video` / `print`
|
|
2788
|
+
* (`canvas-ds-icons.tsx`, pinned path-for-path to the kit), 12 px, `currentColor`. Every kind has one - digital too.
|
|
2342
2789
|
*/
|
|
2343
2790
|
function ArtboardKindIcon({ kind }: { kind: ArtboardKind }) {
|
|
2344
|
-
|
|
2345
|
-
return (
|
|
2346
|
-
<svg viewBox="0 0 16 16" width="10" height="10" fill="none" aria-hidden="true">
|
|
2347
|
-
<rect
|
|
2348
|
-
x="3"
|
|
2349
|
-
y="1.5"
|
|
2350
|
-
width="10"
|
|
2351
|
-
height="5"
|
|
2352
|
-
rx="0.5"
|
|
2353
|
-
stroke="currentColor"
|
|
2354
|
-
strokeWidth="1.2"
|
|
2355
|
-
/>
|
|
2356
|
-
<rect x="1.5" y="6" width="13" height="6" rx="1" stroke="currentColor" strokeWidth="1.2" />
|
|
2357
|
-
<rect x="4.5" y="10.5" width="7" height="4" stroke="currentColor" strokeWidth="1.1" />
|
|
2358
|
-
</svg>
|
|
2359
|
-
);
|
|
2360
|
-
}
|
|
2361
|
-
if (kind === 'web') {
|
|
2362
|
-
return (
|
|
2363
|
-
<svg viewBox="0 0 16 16" width="10" height="10" fill="none" aria-hidden="true">
|
|
2364
|
-
<circle cx="8" cy="8" r="6" stroke="currentColor" strokeWidth="1.2" />
|
|
2365
|
-
<path
|
|
2366
|
-
d="M2 8h12M8 2c2 2 2 10 0 12M8 2c-2 2-2 10 0 12"
|
|
2367
|
-
stroke="currentColor"
|
|
2368
|
-
strokeWidth="1.1"
|
|
2369
|
-
/>
|
|
2370
|
-
</svg>
|
|
2371
|
-
);
|
|
2372
|
-
}
|
|
2373
|
-
// video — same glyph as the corner Timeline badge.
|
|
2374
|
-
return (
|
|
2375
|
-
<svg viewBox="0 0 16 16" width="10" height="10" fill="none" aria-hidden="true">
|
|
2376
|
-
<rect x="1.5" y="4.5" width="8" height="7" rx="1.2" stroke="currentColor" strokeWidth="1.3" />
|
|
2377
|
-
<path
|
|
2378
|
-
d="M9.5 7l4-2.3v6.6l-4-2.3"
|
|
2379
|
-
stroke="currentColor"
|
|
2380
|
-
strokeWidth="1.3"
|
|
2381
|
-
strokeLinejoin="round"
|
|
2382
|
-
/>
|
|
2383
|
-
</svg>
|
|
2384
|
-
);
|
|
2791
|
+
return <DsIcon name={kind} size={12} />;
|
|
2385
2792
|
}
|
|
2386
2793
|
ArtboardKindIcon.displayName = 'ArtboardKindIcon';
|
|
2387
2794
|
|
|
@@ -2392,7 +2799,7 @@ ArtboardKindIcon.displayName = 'ArtboardKindIcon';
|
|
|
2392
2799
|
* layout has no matching id. Outside DesignCanvas (DS specimens, legacy
|
|
2393
2800
|
* uses) it renders a plain fixed-size block.
|
|
2394
2801
|
*/
|
|
2395
|
-
|
|
2802
|
+
function DCArtboardBody({
|
|
2396
2803
|
id,
|
|
2397
2804
|
label,
|
|
2398
2805
|
width,
|
|
@@ -2405,6 +2812,7 @@ export function DCArtboard({
|
|
|
2405
2812
|
kind,
|
|
2406
2813
|
guides,
|
|
2407
2814
|
print,
|
|
2815
|
+
safeZones,
|
|
2408
2816
|
children,
|
|
2409
2817
|
}: {
|
|
2410
2818
|
id: string;
|
|
@@ -2439,11 +2847,19 @@ export function DCArtboard({
|
|
|
2439
2847
|
* Only meaningful when `kind="print"`; the overlay (T3) reads it to draw
|
|
2440
2848
|
* bleed/trim/margin guides against THIS artboard's own resolved px size. */
|
|
2441
2849
|
print?: ArtboardPrintProp;
|
|
2850
|
+
/** S7.22 — where a platform's own interface covers this artboard: one preset id from
|
|
2851
|
+
* `kinds/safe-zones.ts` ("instagram-story", "instagram-reels", "instagram-grid", "tiktok",
|
|
2852
|
+
* "youtube-shorts", "facebook-event-cover"). Design intent (DDR-181); whether it is DRAWN is per-person
|
|
2853
|
+
* view state (`overlays.safeZones`). The bands are canvas-only and never exported. A 1.x peer ignores it. */
|
|
2854
|
+
safeZones?: string;
|
|
2442
2855
|
children: ReactNode;
|
|
2443
2856
|
}) {
|
|
2444
2857
|
countRender('artboardRenders');
|
|
2445
2858
|
const ctx = useWorldContext();
|
|
2446
|
-
|
|
2859
|
+
// No `useViewportControllerContext()` here: its value was never read, and subscribing to it
|
|
2860
|
+
// re-rendered EVERY board each time a gesture burst started, ended or published the viewport
|
|
2861
|
+
// (V2-8.8: 1,785 / 5,440 renders per fit-all gesture at 21 / 64 boards, against 966 / 2,944
|
|
2862
|
+
// before v2). What a board needs from the viewport it takes from `useLiveViewport()` below it.
|
|
2447
2863
|
const toolMode = useToolModeOptional();
|
|
2448
2864
|
const chrome = useChromeVisibility();
|
|
2449
2865
|
const selSet = useSelectionSetOptional();
|
|
@@ -2451,15 +2867,15 @@ export function DCArtboard({
|
|
|
2451
2867
|
// Phase 13 / DDR-029 — live "agent works here" overlay. Inert (present=false)
|
|
2452
2868
|
// outside CanvasActivityProvider, so specimens / legacy mounts never show it.
|
|
2453
2869
|
const activity = useCanvasActivity();
|
|
2454
|
-
// Phase 13.2 / DDR-078 — when an agent is the editor, tint the overlay with
|
|
2455
|
-
// its presence color + show its funny name instead of the generic file label.
|
|
2456
|
-
const agent = useAgentPresence();
|
|
2457
2870
|
const rect = ctx ? ctx.rectFor(id) : null;
|
|
2458
2871
|
// T1/T2 — explicit `kind` wins; `subtreeHasVideoComp` is the fallback that
|
|
2459
2872
|
// keeps existing unmigrated video canvases badged identically without
|
|
2460
2873
|
// requiring a JSX edit (Design Decision 1).
|
|
2461
2874
|
const hasVideoContent = useMemo(() => subtreeHasVideoComp(children), [children]);
|
|
2462
|
-
|
|
2875
|
+
// a kind the four do not know (an old `kind="social"`) resolves like no kind: the inspector's rows, the Layers
|
|
2876
|
+
// filter and the label all match on digital · web · print · video
|
|
2877
|
+
const resolvedKind: ArtboardKind =
|
|
2878
|
+
kind && ARTBOARD_KINDS.has(kind) ? kind : hasVideoContent ? 'video' : 'digital';
|
|
2463
2879
|
// DDR-148 — badge video artboards in the header; clicking the badge opens
|
|
2464
2880
|
// the timeline panel via the same postMessage the context-menu "Open
|
|
2465
2881
|
// Timeline" entry already sends (canvas-shell.tsx artboardHasVideo/handler).
|
|
@@ -2490,9 +2906,14 @@ export function DCArtboard({
|
|
|
2490
2906
|
// Cloud Phase 25 C2 — a read-only canvas keeps the Move tool for
|
|
2491
2907
|
// selection, but artboards don't drag (editing is absent, not hidden).
|
|
2492
2908
|
enabled: !!ctx && (toolMode?.tool ?? 'move') === 'move' && !isReadOnlyCanvas(),
|
|
2493
|
-
|
|
2494
|
-
|
|
2909
|
+
// S2.9b — the ⌥-drag duplicate gesture carries no riders (contract §2: annotations are not
|
|
2910
|
+
// duplicated with an artboard in v2.0); every other drop rides.
|
|
2911
|
+
onCommit: (moved, { alt }) => {
|
|
2912
|
+
// S2.10 — an ⌥ drop copies (the originals stay; `editing/artboard-commands.tsx` writes the copy);
|
|
2913
|
+
// with nothing listening (an embed, a specimen) it is the v1 move, without riders (contract §2).
|
|
2914
|
+
if (dragBus) routeDrop(alt, moved, window, (m, o) => dragBus.commitPositions(m, o));
|
|
2495
2915
|
},
|
|
2916
|
+
onFrame: (f) => dragBus?.emitFrame(f),
|
|
2496
2917
|
});
|
|
2497
2918
|
|
|
2498
2919
|
// Publish this artboard's drag state to the bus. Only push when non-idle;
|
|
@@ -2521,6 +2942,17 @@ export function DCArtboard({
|
|
|
2521
2942
|
// shell writes the `label` prop), Escape or an unchanged name cancels.
|
|
2522
2943
|
const [renaming, setRenaming] = useState(false);
|
|
2523
2944
|
const renameDoneRef = useRef(false);
|
|
2945
|
+
// S2.10 — the registry's `artboard.rename` and Tab from the previous name open this one's field.
|
|
2946
|
+
useEffect(() => {
|
|
2947
|
+
if (typeof window === 'undefined') return;
|
|
2948
|
+
const open = (e: Event) => {
|
|
2949
|
+
if ((e as CustomEvent<{ id?: string }>).detail?.id !== id || isReadOnlyCanvas()) return;
|
|
2950
|
+
renameDoneRef.current = false;
|
|
2951
|
+
setRenaming(true);
|
|
2952
|
+
};
|
|
2953
|
+
window.addEventListener(RENAME_EVENT, open);
|
|
2954
|
+
return () => window.removeEventListener(RENAME_EVENT, open);
|
|
2955
|
+
}, [id]);
|
|
2524
2956
|
const commitRename = (value: string) => {
|
|
2525
2957
|
if (renameDoneRef.current) return;
|
|
2526
2958
|
renameDoneRef.current = true;
|
|
@@ -2537,19 +2969,80 @@ export function DCArtboard({
|
|
|
2537
2969
|
}
|
|
2538
2970
|
};
|
|
2539
2971
|
const articleRef = useRef<HTMLElement | null>(null);
|
|
2540
|
-
|
|
2972
|
+
// half a CSS px: Blink's zoom re-measures the frame with sub-pixel noise on every pinch frame (V2-8.8)
|
|
2973
|
+
const measured = useArtboardBounds(articleRef as RefObject<HTMLElement | null>, 0.5);
|
|
2541
2974
|
useEffect(() => {
|
|
2542
|
-
|
|
2975
|
+
// Fixed artboards report too: their frame is label + the declared body,
|
|
2976
|
+
// so the model rect must be the measured frame like a hug board's. Never
|
|
2977
|
+
// a feedback loop — the fixed body height reads the `height` prop, not
|
|
2978
|
+
// rect.h — and never persisted (patchCanvasMeta strips w/h, DDR-027).
|
|
2979
|
+
if (!ctx) return;
|
|
2543
2980
|
if (dragHook.dragState.kind !== 'idle') return;
|
|
2544
2981
|
if (measured.height <= 0) return;
|
|
2545
2982
|
ctx.reportMeasuredHeight(id, Math.round(measured.height));
|
|
2546
|
-
}, [ctx,
|
|
2983
|
+
}, [ctx, dragHook.dragState.kind, measured.height, id]);
|
|
2984
|
+
// S7.21 (08 ak-web-hug) — "+ 373 px" beside a web page that just grew (a hugging page only; never exported)
|
|
2985
|
+
const growth = useGrowthDelta(resolvedKind === 'web' && !fixed, measured.height, id);
|
|
2986
|
+
// P8 C3 (04 X1) - the breakpoint chip and the growth tag are Edit's chrome (the what-shows `object-tools` cell;
|
|
2987
|
+
// an ungoverned canvas keeps v1): Preview / Viewing / Present show the design, not Maude's marks on it.
|
|
2988
|
+
const governedMode = useGovernedMode();
|
|
2989
|
+
const artboardEditChrome = modeShows(governedMode, 'object-tools');
|
|
2990
|
+
|
|
2991
|
+
// The design surface (`.dc-artboard-body`) inside the frame, in world px —
|
|
2992
|
+
// offsets are layout values, untouched by the world's pan/zoom transform.
|
|
2993
|
+
// Guides (print bleed/trim/margins, layout grids) describe the DESIGN, so
|
|
2994
|
+
// they are drawn over it, not over the frame with its label strip.
|
|
2995
|
+
const bodyRef = useRef<HTMLDivElement | null>(null);
|
|
2996
|
+
// ... and the section that arrived, framed and named beside it (08 ak-web-hug "Rozpis zápasů · new section")
|
|
2997
|
+
const newSection = useNewSection(bodyRef, resolvedKind === 'web' && !fixed, measured.height, id);
|
|
2998
|
+
// S7.25 — the one warning style: this artboard checks itself (print · web · video) and marks its label
|
|
2999
|
+
const warnings = useArtboardWarnings({
|
|
3000
|
+
id,
|
|
3001
|
+
kind: resolvedKind,
|
|
3002
|
+
width: typeof width === 'number' ? width : undefined,
|
|
3003
|
+
height: typeof height === 'number' ? height : undefined,
|
|
3004
|
+
fixed: !!fixed,
|
|
3005
|
+
print,
|
|
3006
|
+
bodyRef,
|
|
3007
|
+
});
|
|
3008
|
+
const [surface, setSurface] = useState<{ dx: number; dy: number; w: number; h: number } | null>(
|
|
3009
|
+
null
|
|
3010
|
+
);
|
|
3011
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: the measured frame size is the re-measure trigger; refs are read inside.
|
|
3012
|
+
useLayoutEffect(() => {
|
|
3013
|
+
const a = articleRef.current;
|
|
3014
|
+
const b = bodyRef.current;
|
|
3015
|
+
if (!a || !b) return;
|
|
3016
|
+
const next = {
|
|
3017
|
+
dx: a.clientLeft + b.offsetLeft,
|
|
3018
|
+
dy: a.clientTop + b.offsetTop,
|
|
3019
|
+
w: b.offsetWidth,
|
|
3020
|
+
h: b.offsetHeight,
|
|
3021
|
+
};
|
|
3022
|
+
setSurface((prev) =>
|
|
3023
|
+
prev && prev.dx === next.dx && prev.dy === next.dy && prev.w === next.w && prev.h === next.h
|
|
3024
|
+
? prev
|
|
3025
|
+
: next
|
|
3026
|
+
);
|
|
3027
|
+
}, [measured.width, measured.height]);
|
|
2547
3028
|
|
|
2548
3029
|
// Phase 2 — background/padding/layout/gap apply to the BODY (content box),
|
|
2549
3030
|
// not the frame (label header stays chrome-styled). Undefined keys are
|
|
2550
3031
|
// simply absent from the style object — no engine-CSS default is clobbered.
|
|
2551
3032
|
const bodyStyle = useMemo<CSSProperties>(() => {
|
|
2552
3033
|
const st: CSSProperties = {};
|
|
3034
|
+
// V2-2.8 "fixed artboard loses 24 px" — a FIXED artboard's declared height
|
|
3035
|
+
// is its design surface: the body is exactly `height` tall (border-box, so
|
|
3036
|
+
// a padding knob stays inside it) and never flexes. The label strip sits
|
|
3037
|
+
// ABOVE it inside the frame, as before, so nothing on an existing canvas
|
|
3038
|
+
// moves; the frame simply grows by the label at the bottom instead of the
|
|
3039
|
+
// body losing the label's height (which clipped the foot and made the
|
|
3040
|
+
// canvas disagree with the export, where the label is hidden).
|
|
3041
|
+
if (fixed) {
|
|
3042
|
+
st.height = heightFloor;
|
|
3043
|
+
st.flex = 'none';
|
|
3044
|
+
st.boxSizing = 'border-box';
|
|
3045
|
+
}
|
|
2553
3046
|
if (background) st.background = background;
|
|
2554
3047
|
// number → px; string → a var(--token) binding (validated server-side).
|
|
2555
3048
|
if (typeof padding === 'number' || typeof padding === 'string') st.padding = padding;
|
|
@@ -2564,7 +3057,7 @@ export function DCArtboard({
|
|
|
2564
3057
|
st.display = 'grid';
|
|
2565
3058
|
}
|
|
2566
3059
|
return st;
|
|
2567
|
-
}, [background, padding, gap, layout]);
|
|
3060
|
+
}, [fixed, heightFloor, background, padding, gap, layout]);
|
|
2568
3061
|
|
|
2569
3062
|
// Read-back surface for the Inspector's ArtboardKnobs panel — the SAME
|
|
2570
3063
|
// generic "custom HTML attributes" escape hatch dom-selection.ts already
|
|
@@ -2572,6 +3065,8 @@ export function DCArtboard({
|
|
|
2572
3065
|
// panel pre-fills current state with no new plumbing. React omits an
|
|
2573
3066
|
// attribute entirely when its value is `undefined`.
|
|
2574
3067
|
const readBackAttrs = {
|
|
3068
|
+
// S2.22 G1 — the artboard's own name, so the inspector title says "Desktop", not the id "desktop".
|
|
3069
|
+
'data-dc-label': typeof label === 'string' && label ? label : undefined,
|
|
2575
3070
|
'data-dc-fixed': fixed ? 'true' : undefined,
|
|
2576
3071
|
'data-dc-bg': background,
|
|
2577
3072
|
'data-dc-padding': padding != null ? String(padding) : undefined,
|
|
@@ -2588,6 +3083,13 @@ export function DCArtboard({
|
|
|
2588
3083
|
// Inspector editor. Small object (≤ ~150 bytes), so a plain JSON attr is
|
|
2589
3084
|
// simpler than adding parallel data-dc-print-* scalar attrs per field.
|
|
2590
3085
|
'data-dc-print': print ? JSON.stringify(print) : undefined,
|
|
3086
|
+
// S7.22 — read-back for the Inspector's Safe zones row (same "stamp the resolved prop" shape as print).
|
|
3087
|
+
'data-dc-safe-zones': typeof safeZones === 'string' && safeZones ? safeZones : undefined,
|
|
3088
|
+
// S7.23 — read-back for the Inspector's Advanced › Guides row (same "stamp the resolved prop" shape as print).
|
|
3089
|
+
'data-dc-guides': guides ? JSON.stringify(guides) : undefined,
|
|
3090
|
+
// S7.25 — the Inspector's top rows (the warnings) and "Made from" (Change kind's copy), read back like print
|
|
3091
|
+
'data-dc-warnings': warningsAttr(warnings),
|
|
3092
|
+
'data-dc-made-from': madeFromLabel(id) ?? undefined,
|
|
2591
3093
|
};
|
|
2592
3094
|
|
|
2593
3095
|
if (!ctx || !rect) {
|
|
@@ -2596,11 +3098,11 @@ export function DCArtboard({
|
|
|
2596
3098
|
className="dc-artboard"
|
|
2597
3099
|
data-dc-screen={id}
|
|
2598
3100
|
ref={articleRef}
|
|
2599
|
-
style={fixed ? { width
|
|
3101
|
+
style={fixed ? { width } : { width, height: 'auto', minHeight: heightFloor }}
|
|
2600
3102
|
{...readBackAttrs}
|
|
2601
3103
|
>
|
|
2602
3104
|
<header className="dc-artboard-label sku">{label}</header>
|
|
2603
|
-
<div className="dc-artboard-body" style={bodyStyle}>
|
|
3105
|
+
<div className="dc-artboard-body" ref={bodyRef} style={bodyStyle}>
|
|
2604
3106
|
{children}
|
|
2605
3107
|
</div>
|
|
2606
3108
|
</article>
|
|
@@ -2642,12 +3144,8 @@ export function DCArtboard({
|
|
|
2642
3144
|
// this artboard (null scope = file-level = every artboard). Rendered as a
|
|
2643
3145
|
// world-coord sibling of the <article> so it pans/zooms with the artboard.
|
|
2644
3146
|
const showActivity = activity.present && matchesArtboard(activity.artboardIds, id);
|
|
2645
|
-
//
|
|
2646
|
-
|
|
2647
|
-
? agent.name
|
|
2648
|
-
: activity.artboardIds
|
|
2649
|
-
? `${activity.fileLabel}:${label}`
|
|
2650
|
-
: activity.fileLabel;
|
|
3147
|
+
// P8 C3 (04 X8) - the tag speaks as the AI ("AI’s new Desktop — shown live"), in the agent's colour; it names the
|
|
3148
|
+
// artboard, never the file or the agent's nickname (v1's `editing — Combine-kampan.tsx`).
|
|
2651
3149
|
|
|
2652
3150
|
return (
|
|
2653
3151
|
<>
|
|
@@ -2662,9 +3160,11 @@ export function DCArtboard({
|
|
|
2662
3160
|
top: liveY,
|
|
2663
3161
|
width: rect.w,
|
|
2664
3162
|
// Hug default: height:auto + minHeight floor, content dictates the
|
|
2665
|
-
// box
|
|
2666
|
-
//
|
|
2667
|
-
|
|
3163
|
+
// box. Fixed: the BODY carries the exact declared height (bodyStyle)
|
|
3164
|
+
// and the frame hugs label + body. Either way the ResizeObserver
|
|
3165
|
+
// above mirrors the settled frame size back into rect.h for other
|
|
3166
|
+
// consumers (fit, snapping, the minimap, culling).
|
|
3167
|
+
...(fixed ? { height: 'auto' } : { height: 'auto', minHeight: heightFloor }),
|
|
2668
3168
|
// Off-screen artboards skip layout+paint. On a large multi-board
|
|
2669
3169
|
// canvas (e.g. an 18-board moodboard) every board otherwise paints
|
|
2670
3170
|
// onto one huge .dc-world plane whose device-pixel size exceeds
|
|
@@ -2674,8 +3174,7 @@ export function DCArtboard({
|
|
|
2674
3174
|
// box so the model-based fit math (computeFit reads ArtboardRects,
|
|
2675
3175
|
// never the DOM) and drag hit-testing are unaffected. RCA:
|
|
2676
3176
|
// .ai/logs/rca/issue-canvas-pan-zoom-jank-large-moodboard.md
|
|
2677
|
-
|
|
2678
|
-
containIntrinsicSize: `${rect.w}px ${rect.h}px`,
|
|
3177
|
+
// gate-a-polish - the culling lives on the BODY (the frame no longer clips, so its name can sit above it).
|
|
2679
3178
|
}}
|
|
2680
3179
|
{...handleProps}
|
|
2681
3180
|
>
|
|
@@ -2686,6 +3185,12 @@ export function DCArtboard({
|
|
|
2686
3185
|
aria-label="Artboard name"
|
|
2687
3186
|
defaultValue={label}
|
|
2688
3187
|
maxLength={80}
|
|
3188
|
+
// S2.10 — the field is as wide as the whole name (never the artboard's width, which would hide
|
|
3189
|
+
// the end of a long one); it grows with every key.
|
|
3190
|
+
style={{ width: 'max-content', minWidth: `${growCh(label)}ch` }}
|
|
3191
|
+
onInput={(e) => {
|
|
3192
|
+
e.currentTarget.style.minWidth = `${growCh(e.currentTarget.value)}ch`;
|
|
3193
|
+
}}
|
|
2689
3194
|
// biome-ignore lint/a11y/noAutofocus: the rename field opens on the designer's own double-click
|
|
2690
3195
|
autoFocus
|
|
2691
3196
|
onFocus={(e) => e.currentTarget.select()}
|
|
@@ -2696,7 +3201,13 @@ export function DCArtboard({
|
|
|
2696
3201
|
onKeyDown={(e) => {
|
|
2697
3202
|
e.stopPropagation();
|
|
2698
3203
|
if (e.key === 'Enter') commitRename(e.currentTarget.value);
|
|
2699
|
-
else if (e.key === '
|
|
3204
|
+
else if (e.key === 'Tab') {
|
|
3205
|
+
// S2.10 — save, then the next artboard's name opens (reading order; ⇧ goes back)
|
|
3206
|
+
e.preventDefault();
|
|
3207
|
+
const to = nextRenameId(ctx?.artboards ?? [], id, e.shiftKey);
|
|
3208
|
+
commitRename(e.currentTarget.value);
|
|
3209
|
+
if (to) requestRename(to);
|
|
3210
|
+
} else if (e.key === 'Escape') {
|
|
2700
3211
|
renameDoneRef.current = true;
|
|
2701
3212
|
setRenaming(false);
|
|
2702
3213
|
}
|
|
@@ -2717,18 +3228,17 @@ export function DCArtboard({
|
|
|
2717
3228
|
// redundant with the Inspector's Kind picker), so a non-digital kind
|
|
2718
3229
|
// must still reach the artboard's own accessible name or it's
|
|
2719
3230
|
// invisible to AT users entirely.
|
|
2720
|
-
aria-label={
|
|
3231
|
+
aria-label={`${
|
|
2721
3232
|
resolvedKind !== 'digital'
|
|
2722
3233
|
? `Artboard ${label}, ${resolvedKind}`
|
|
2723
3234
|
: `Artboard ${label}`
|
|
2724
|
-
}
|
|
3235
|
+
}${warnings.length ? `, ${summaryWords(warnings.length)}` : ''}`}
|
|
2725
3236
|
>
|
|
2726
|
-
|
|
2727
|
-
<
|
|
2728
|
-
|
|
2729
|
-
</span>
|
|
2730
|
-
) : null}
|
|
3237
|
+
<span className="dc-artboard-kind-chip" aria-hidden="true">
|
|
3238
|
+
<ArtboardKindIcon kind={resolvedKind} />
|
|
3239
|
+
</span>
|
|
2731
3240
|
{label}
|
|
3241
|
+
<ArtboardWarnMark count={warnings.length} />
|
|
2732
3242
|
</button>
|
|
2733
3243
|
)}
|
|
2734
3244
|
{hasVideo ? (
|
|
@@ -2758,16 +3268,25 @@ export function DCArtboard({
|
|
|
2758
3268
|
</svg>
|
|
2759
3269
|
</button>
|
|
2760
3270
|
) : null}
|
|
2761
|
-
<div
|
|
3271
|
+
<div
|
|
3272
|
+
className="dc-artboard-body"
|
|
3273
|
+
ref={bodyRef}
|
|
3274
|
+
style={{
|
|
3275
|
+
...bodyStyle,
|
|
3276
|
+
contentVisibility: 'auto',
|
|
3277
|
+
containIntrinsicSize: `${rect.w}px ${rect.h}px`,
|
|
3278
|
+
}}
|
|
3279
|
+
>
|
|
2762
3280
|
{children}
|
|
2763
3281
|
</div>
|
|
2764
3282
|
</article>
|
|
2765
3283
|
{showActivity ? (
|
|
2766
3284
|
<ArtboardActivityOverlay
|
|
2767
3285
|
rect={{ x: liveX, y: liveY, w: rect.w, h: rect.h }}
|
|
2768
|
-
label={
|
|
3286
|
+
label={label}
|
|
2769
3287
|
active={activity.active}
|
|
2770
|
-
|
|
3288
|
+
// 04 md-edge-ai: the AI is the spark token, whoever the agent is — the rim and its tag carry no
|
|
3289
|
+
// per-agent presence colour (that hue read purple on a light canvas); `agent.color` stays for presence.
|
|
2771
3290
|
/>
|
|
2772
3291
|
) : null}
|
|
2773
3292
|
{/* T4 — world-coord sibling, same reasoning as ArtboardActivityOverlay
|
|
@@ -2775,15 +3294,78 @@ export function DCArtboard({
|
|
|
2775
3294
|
content-visibility subtree so guides are never culled/frozen with
|
|
2776
3295
|
exported content (they're never exported at all). */}
|
|
2777
3296
|
<ArtboardGuidesOverlay
|
|
2778
|
-
rect={
|
|
3297
|
+
rect={
|
|
3298
|
+
surface
|
|
3299
|
+
? { x: liveX + surface.dx, y: liveY + surface.dy, w: surface.w, h: surface.h }
|
|
3300
|
+
: { x: liveX, y: liveY, w: rect.w, h: rect.h }
|
|
3301
|
+
}
|
|
2779
3302
|
kind={resolvedKind}
|
|
2780
3303
|
guides={guides}
|
|
2781
3304
|
print={print}
|
|
2782
|
-
|
|
3305
|
+
safeZones={safeZones}
|
|
3306
|
+
artboardId={id}
|
|
3307
|
+
visibility={{
|
|
3308
|
+
guides: chrome?.guides ?? false,
|
|
3309
|
+
print: chrome?.print ?? false,
|
|
3310
|
+
safeZones: chrome?.safeZones ?? true,
|
|
3311
|
+
editChrome: artboardEditChrome,
|
|
3312
|
+
}}
|
|
3313
|
+
/>
|
|
3314
|
+
<ArtboardWarnOutlines
|
|
3315
|
+
warnings={warnings}
|
|
3316
|
+
bodyRef={bodyRef}
|
|
3317
|
+
rect={
|
|
3318
|
+
surface
|
|
3319
|
+
? { x: liveX + surface.dx, y: liveY + surface.dy, w: surface.w, h: surface.h }
|
|
3320
|
+
: { x: liveX, y: liveY, w: rect.w, h: rect.h }
|
|
3321
|
+
}
|
|
3322
|
+
show={artboardEditChrome}
|
|
3323
|
+
/>
|
|
3324
|
+
<ArtboardGrowthTag
|
|
3325
|
+
x={liveX + rect.w}
|
|
3326
|
+
bottom={liveY + rect.h}
|
|
3327
|
+
delta={artboardEditChrome ? growth : null}
|
|
2783
3328
|
/>
|
|
3329
|
+
<ArtboardNewSection
|
|
3330
|
+
x={liveX + (surface?.dx ?? 0)}
|
|
3331
|
+
y={liveY + (surface?.dy ?? 0)}
|
|
3332
|
+
section={artboardEditChrome ? newSection : null}
|
|
3333
|
+
/>
|
|
3334
|
+
{/* V2-8.5 c7 (08 ak-convert-after) — "✓ Unchanged" / "+ 13 % height · Ink fill" after Make A6 print */}
|
|
3335
|
+
<ArtboardConvertMarks
|
|
3336
|
+
id={id}
|
|
3337
|
+
x={liveX}
|
|
3338
|
+
y={liveY}
|
|
3339
|
+
w={rect.w}
|
|
3340
|
+
h={rect.h}
|
|
3341
|
+
show={artboardEditChrome}
|
|
3342
|
+
/>
|
|
3343
|
+
{/* V2-8.5 c7 (01 cf-duplicate-done) — the gap to the source and the shared left edge after a menu duplicate */}
|
|
3344
|
+
<ArtboardGapMark id={id} show={artboardEditChrome} />
|
|
2784
3345
|
</>
|
|
2785
3346
|
);
|
|
2786
3347
|
}
|
|
3348
|
+
DCArtboardBody.displayName = 'DCArtboardBody';
|
|
3349
|
+
|
|
3350
|
+
let thumbOnlyMemo: { search: string; id: string | null } | null = null;
|
|
3351
|
+
/**
|
|
3352
|
+
* The thumbnail renderer's hint (`?thumb-only=<artboard id>`, added on the read-only capture origin
|
|
3353
|
+
* for a version picture): mount that one artboard and none of the others (V2-8.14). Absent = no
|
|
3354
|
+
* filtering. Read per render — it is a string compare — so a test can move the URL.
|
|
3355
|
+
*/
|
|
3356
|
+
function thumbOnly(): string | null {
|
|
3357
|
+
if (typeof window === 'undefined') return null;
|
|
3358
|
+
const search = window.location.search;
|
|
3359
|
+
if (thumbOnlyMemo?.search !== search)
|
|
3360
|
+
thumbOnlyMemo = { search, id: new URLSearchParams(search).get('thumb-only') };
|
|
3361
|
+
return thumbOnlyMemo.id;
|
|
3362
|
+
}
|
|
3363
|
+
|
|
3364
|
+
export function DCArtboard(props: ComponentProps<typeof DCArtboardBody>) {
|
|
3365
|
+
const only = thumbOnly();
|
|
3366
|
+
if (only !== null && props.id !== only) return null;
|
|
3367
|
+
return <DCArtboardBody {...props} />;
|
|
3368
|
+
}
|
|
2787
3369
|
DCArtboard.displayName = 'DCArtboard';
|
|
2788
3370
|
|
|
2789
3371
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -2814,6 +3396,8 @@ export interface CanvasRectsElement {
|
|
|
2814
3396
|
h: number;
|
|
2815
3397
|
tag: string;
|
|
2816
3398
|
text: string;
|
|
3399
|
+
/** S7.25 — a picture's own pixel width, for the effective-ppi warning (absent for anything else) */
|
|
3400
|
+
naturalW?: number;
|
|
2817
3401
|
}
|
|
2818
3402
|
|
|
2819
3403
|
export interface CanvasRectsManifest {
|
|
@@ -2826,7 +3410,7 @@ export interface CanvasRectsManifest {
|
|
|
2826
3410
|
// mirrors the pickSpecimenEl chrome denylist (canvas-comment-mount.tsx) plus
|
|
2827
3411
|
// the annotation layer's own root.
|
|
2828
3412
|
const RECTS_CHROME_SELECTOR =
|
|
2829
|
-
'.cm-composer, .cm-thread, .cm-mention-popup, .cm-pin, [data-mc-hover-halo], [data-mdcc-annotations], .dc-minimap, .dc-zoom-toolbar';
|
|
3413
|
+
'.cm-composer, .cm-thread, .cm-mention-popup, .cm-pin, [data-mc-hover-halo], [data-mdcc-annotations], .dc-minimap, .dc-zoom-toolbar, .dc-absent-layer, .dc-vplay-layer';
|
|
2830
3414
|
|
|
2831
3415
|
const RECTS_INTERACTIVE_TAGS = new Set([
|
|
2832
3416
|
'button',
|
|
@@ -2879,7 +3463,17 @@ function buildCanvasRectsManifest(): CanvasRectsManifest {
|
|
|
2879
3463
|
const artboards: ArtboardRect[] = [];
|
|
2880
3464
|
const artboardEls = Array.from(document.querySelectorAll('[data-dc-screen]'));
|
|
2881
3465
|
for (const el of artboardEls) {
|
|
2882
|
-
|
|
3466
|
+
// An artboard's geometry is its DESIGN SURFACE (`.dc-artboard-body`) — the
|
|
3467
|
+
// box that exports, at the size the canvas declares — not the frame with
|
|
3468
|
+
// its label strip and 1 px border around it (V2-2.8: a fixed 1080×1350
|
|
3469
|
+
// artboard reports 1080×1350). Falls back to the element itself for a
|
|
3470
|
+
// `[data-dc-screen]` that has no body (legacy/specimen markup).
|
|
3471
|
+
const body = Array.from(el.children).find((c) => c.classList.contains('dc-artboard-body'));
|
|
3472
|
+
const bodyRect = body ? (body as HTMLElement).getBoundingClientRect() : null;
|
|
3473
|
+
const rect =
|
|
3474
|
+
bodyRect && bodyRect.width > 0 && bodyRect.height > 0
|
|
3475
|
+
? bodyRect
|
|
3476
|
+
: (el as HTMLElement).getBoundingClientRect();
|
|
2883
3477
|
if (rect.width <= 0 || rect.height <= 0) continue;
|
|
2884
3478
|
const id = el.getAttribute('data-dc-screen');
|
|
2885
3479
|
if (!id) continue;
|
|
@@ -2919,6 +3513,9 @@ function buildCanvasRectsManifest(): CanvasRectsManifest {
|
|
|
2919
3513
|
...toWorld(rect),
|
|
2920
3514
|
tag: el.tagName.toLowerCase(),
|
|
2921
3515
|
text: shortText(el, 120),
|
|
3516
|
+
...(el instanceof HTMLImageElement && el.naturalWidth > 0
|
|
3517
|
+
? { naturalW: el.naturalWidth }
|
|
3518
|
+
: {}),
|
|
2922
3519
|
});
|
|
2923
3520
|
}
|
|
2924
3521
|
|
|
@@ -3245,6 +3842,59 @@ export function extractAssetRef(el: Element): string | null {
|
|
|
3245
3842
|
return photoRefOf(el).match(ASSET_REF_RE)?.[0] ?? null;
|
|
3246
3843
|
}
|
|
3247
3844
|
|
|
3845
|
+
// S8.15 — one use of a photo can carry its own edit: the authored attribute
|
|
3846
|
+
// `data-photo-edit="<edit8>"` names `assets/<img8>.<edit8>.photo.json` (contract
|
|
3847
|
+
// S8-asset-sidecars §5.1). Render order: that use's edit when its file is valid,
|
|
3848
|
+
// else the every-use `assets/<img8>.photo.json`, else the original. The bridge keys
|
|
3849
|
+
// its work by PHOTO KEY — `assets/<img8>.<ext>` for every use, `…#<edit8>` for one
|
|
3850
|
+
// use — so two uses of one picture bake apart. A 1.x canvas-lib never reads the
|
|
3851
|
+
// attribute and shows the every-use look.
|
|
3852
|
+
const PHOTO_EDIT_NAME_RE = /^[0-9a-f]{8,16}$/;
|
|
3853
|
+
|
|
3854
|
+
/** The photo key of an element: its asset, plus `#<edit8>` when it carries its own edit. */
|
|
3855
|
+
export function photoKeyOf(el: Element): string | null {
|
|
3856
|
+
const asset = extractAssetRef(el);
|
|
3857
|
+
if (!asset) return null;
|
|
3858
|
+
const edit = el.getAttribute('data-photo-edit');
|
|
3859
|
+
return edit && PHOTO_EDIT_NAME_RE.test(edit) ? `${asset}#${edit}` : asset;
|
|
3860
|
+
}
|
|
3861
|
+
|
|
3862
|
+
const keyAsset = (key: string): string => key.split('#')[0] as string;
|
|
3863
|
+
|
|
3864
|
+
/**
|
|
3865
|
+
* Every element showing `key` — or, with `use` (the `data-cd-id` of the one use the
|
|
3866
|
+
* inspector is editing), that element only, whatever its key: its first edit has no
|
|
3867
|
+
* name yet.
|
|
3868
|
+
*/
|
|
3869
|
+
export function findPhotoEls(key: string, use?: string): Element[] {
|
|
3870
|
+
if (typeof document === 'undefined') return [];
|
|
3871
|
+
const asset = keyAsset(key);
|
|
3872
|
+
const out: Element[] = [];
|
|
3873
|
+
for (const n of document.querySelectorAll('img, image')) {
|
|
3874
|
+
if (use !== undefined) {
|
|
3875
|
+
if (n.getAttribute('data-cd-id') === use && extractAssetRef(n) === asset) out.push(n);
|
|
3876
|
+
} else if (photoKeyOf(n) === key) out.push(n);
|
|
3877
|
+
}
|
|
3878
|
+
return out;
|
|
3879
|
+
}
|
|
3880
|
+
|
|
3881
|
+
/** The edit a key shows: its own file, else the every-use file (render order above). */
|
|
3882
|
+
async function fetchEditFor(key: string): Promise<PhotoEdit | null> {
|
|
3883
|
+
const [asset, edit] = key.split('#') as [string, string | undefined];
|
|
3884
|
+
const get = (q: string): Promise<Record<string, unknown> | null> =>
|
|
3885
|
+
fetch(`/_api/photo-edit?${q}`)
|
|
3886
|
+
.then((r) => (r.ok ? r.json() : null))
|
|
3887
|
+
.catch(() => null);
|
|
3888
|
+
const a = `asset=${encodeURIComponent(asset)}`;
|
|
3889
|
+
if (edit) {
|
|
3890
|
+
const own = await get(`${a}&edit=${edit}`);
|
|
3891
|
+
if (own && Object.keys(own).length > 0 && !isDefaultEdit(own as PhotoEdit))
|
|
3892
|
+
return own as PhotoEdit;
|
|
3893
|
+
}
|
|
3894
|
+
const every = await get(a);
|
|
3895
|
+
return every && Object.keys(every).length > 0 ? (every as PhotoEdit) : null;
|
|
3896
|
+
}
|
|
3897
|
+
|
|
3248
3898
|
function setPhotoElSrc(el: Element, url: string): void {
|
|
3249
3899
|
if (el.tagName.toLowerCase() === 'image') {
|
|
3250
3900
|
el.setAttribute(el.hasAttribute('xlink:href') ? 'xlink:href' : 'href', url);
|
|
@@ -3280,44 +3930,49 @@ export function PhotoPreviewBridge() {
|
|
|
3280
3930
|
[]
|
|
3281
3931
|
);
|
|
3282
3932
|
|
|
3283
|
-
const bake = useCallback(
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
.
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3933
|
+
const bake = useCallback(
|
|
3934
|
+
(slot: string, original: string, edit: PhotoEdit, key: string, use?: string) => {
|
|
3935
|
+
const token = (tokenRef.current.get(slot) ?? 0) + 1;
|
|
3936
|
+
tokenRef.current.set(slot, token);
|
|
3937
|
+
import('./photo/pipeline.ts')
|
|
3938
|
+
.then(({ renderPhotoDataUrl }) => renderPhotoDataUrl({ source: original, edit }))
|
|
3939
|
+
.then((dataUrl) => {
|
|
3940
|
+
if (tokenRef.current.get(slot) !== token) return; // superseded by a newer edit
|
|
3941
|
+
for (const live of findPhotoEls(key, use)) setPhotoElSrc(live, dataUrl);
|
|
3942
|
+
})
|
|
3943
|
+
.catch((err) => {
|
|
3944
|
+
console.error('[PhotoPreviewBridge] bake failed', err);
|
|
3945
|
+
});
|
|
3946
|
+
},
|
|
3947
|
+
[]
|
|
3948
|
+
);
|
|
3297
3949
|
|
|
3298
3950
|
const apply = useCallback(
|
|
3299
|
-
(
|
|
3300
|
-
const
|
|
3301
|
-
if (
|
|
3302
|
-
|
|
3951
|
+
(key: string, edit: PhotoEdit | null, use?: string) => {
|
|
3952
|
+
const els = findPhotoEls(key, use);
|
|
3953
|
+
if (els.length === 0) return;
|
|
3954
|
+
const asset = keyAsset(key);
|
|
3955
|
+
for (const el of els)
|
|
3956
|
+
if (!el.hasAttribute('data-photo-asset')) el.setAttribute('data-photo-asset', asset);
|
|
3303
3957
|
if (!originalRef.current.has(asset)) {
|
|
3304
|
-
const orig =
|
|
3305
|
-
|
|
3306
|
-
originalRef.current.set(asset, orig);
|
|
3958
|
+
const orig = photoRefOf(els[0] as Element);
|
|
3959
|
+
if (!orig.startsWith('data:')) originalRef.current.set(asset, orig);
|
|
3307
3960
|
}
|
|
3308
3961
|
const original = originalRef.current.get(asset) ?? '';
|
|
3962
|
+
// One bake slot per key — or per use while the inspector previews one use.
|
|
3963
|
+
const slot = use === undefined ? key : `${key}@${use}`;
|
|
3309
3964
|
const timers = bakeTimers.current;
|
|
3310
|
-
clearTimeout(timers.get(
|
|
3965
|
+
clearTimeout(timers.get(slot));
|
|
3311
3966
|
if (!edit || isDefaultEdit(edit)) {
|
|
3312
|
-
timers.delete(
|
|
3967
|
+
timers.delete(slot);
|
|
3313
3968
|
// A bake already rendering an earlier edit must not land over this.
|
|
3314
|
-
tokenRef.current.set(
|
|
3315
|
-
setPhotoElSrc(el, original);
|
|
3969
|
+
tokenRef.current.set(slot, (tokenRef.current.get(slot) ?? 0) + 1);
|
|
3970
|
+
if (original) for (const el of els) setPhotoElSrc(el, original);
|
|
3316
3971
|
return;
|
|
3317
3972
|
}
|
|
3318
3973
|
timers.set(
|
|
3319
|
-
|
|
3320
|
-
setTimeout(() => bake(
|
|
3974
|
+
slot,
|
|
3975
|
+
setTimeout(() => bake(slot, original, edit, key, use), BAKE_DEBOUNCE_MS)
|
|
3321
3976
|
);
|
|
3322
3977
|
},
|
|
3323
3978
|
[bake]
|
|
@@ -3340,27 +3995,24 @@ export function PhotoPreviewBridge() {
|
|
|
3340
3995
|
const onRefreshed = (e: Event) => {
|
|
3341
3996
|
const sha8 = (e as CustomEvent<{ sha8?: unknown }>).detail?.sha8;
|
|
3342
3997
|
if (typeof sha8 !== 'string' || !/^[0-9a-f]{8}$/i.test(sha8)) return;
|
|
3343
|
-
// Resolve
|
|
3344
|
-
//
|
|
3345
|
-
|
|
3998
|
+
// Resolve every photo key of that asset from the live DOM — the event
|
|
3999
|
+
// carries only the hash (the sidecar name has no extension), and each use
|
|
4000
|
+
// with its own edit (S8.15) is a key of its own.
|
|
4001
|
+
const keys = new Set<string>();
|
|
3346
4002
|
for (const n of document.querySelectorAll('img, image')) {
|
|
3347
|
-
const
|
|
3348
|
-
if (
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
4003
|
+
const key = photoKeyOf(n);
|
|
4004
|
+
if (key?.includes(`assets/${sha8}.`)) keys.add(key);
|
|
4005
|
+
}
|
|
4006
|
+
for (const target of keys) {
|
|
4007
|
+
const g = nextFetchGen(target);
|
|
4008
|
+
fetchEditFor(target)
|
|
4009
|
+
.then((edit) => {
|
|
4010
|
+
if (!isLatestFetch(target, g)) return; // a newer answer owns the render
|
|
4011
|
+
// A deleted/reset edit applies as null → restores the original src.
|
|
4012
|
+
apply(target, edit && !isDefaultEdit(edit) ? edit : null);
|
|
4013
|
+
})
|
|
4014
|
+
.catch(() => {});
|
|
3352
4015
|
}
|
|
3353
|
-
if (!asset) return; // no photo on this canvas uses that asset
|
|
3354
|
-
const target = asset;
|
|
3355
|
-
const g = nextFetchGen(target);
|
|
3356
|
-
fetch(`/_api/photo-edit?asset=${encodeURIComponent(target)}`)
|
|
3357
|
-
.then((r) => (r.ok ? r.json() : null))
|
|
3358
|
-
.then((edit) => {
|
|
3359
|
-
if (!isLatestFetch(target, g)) return; // a newer answer owns the render
|
|
3360
|
-
// A deleted/reset edit applies as null → restores the original src.
|
|
3361
|
-
apply(target, edit && !isDefaultEdit(edit) ? (edit as PhotoEdit) : null);
|
|
3362
|
-
})
|
|
3363
|
-
.catch(() => {});
|
|
3364
4016
|
};
|
|
3365
4017
|
document.addEventListener('maude:photo-edit-refreshed', onRefreshed);
|
|
3366
4018
|
return () => document.removeEventListener('maude:photo-edit-refreshed', onRefreshed);
|
|
@@ -3368,7 +4020,13 @@ export function PhotoPreviewBridge() {
|
|
|
3368
4020
|
|
|
3369
4021
|
useEffect(() => {
|
|
3370
4022
|
const onMsg = (e: MessageEvent) => {
|
|
3371
|
-
const m = e.data as {
|
|
4023
|
+
const m = e.data as {
|
|
4024
|
+
dgn?: string;
|
|
4025
|
+
asset?: unknown;
|
|
4026
|
+
edit?: unknown;
|
|
4027
|
+
busy?: unknown;
|
|
4028
|
+
use?: unknown;
|
|
4029
|
+
} | null;
|
|
3372
4030
|
if (!m) return;
|
|
3373
4031
|
// Background-removal busy shimmer (Task 12 reveal) — a `data-photo-busy`
|
|
3374
4032
|
// attribute toggle on the real element, styled by inspect.ts's single CSS
|
|
@@ -3388,8 +4046,16 @@ export function PhotoPreviewBridge() {
|
|
|
3388
4046
|
if (m.dgn !== 'photo-preview' || typeof m.asset !== 'string') return;
|
|
3389
4047
|
const asset = m.asset;
|
|
3390
4048
|
const edit = (m.edit ?? null) as PhotoEdit | null;
|
|
3391
|
-
|
|
3392
|
-
|
|
4049
|
+
// S8.15 — `use` (a `data-cd-id`) previews that one use; without it, every use
|
|
4050
|
+
// that has no edit of its own.
|
|
4051
|
+
const use = typeof m.use === 'string' && m.use ? m.use : undefined;
|
|
4052
|
+
if (use !== undefined) {
|
|
4053
|
+
for (const el of findPhotoEls(asset, use)) {
|
|
4054
|
+
const key = photoKeyOf(el);
|
|
4055
|
+
if (key) nextFetchGen(key);
|
|
4056
|
+
}
|
|
4057
|
+
} else nextFetchGen(asset);
|
|
4058
|
+
apply(asset, edit, use);
|
|
3393
4059
|
};
|
|
3394
4060
|
window.addEventListener('message', onMsg);
|
|
3395
4061
|
return () => window.removeEventListener('message', onMsg);
|
|
@@ -3423,16 +4089,15 @@ export function PhotoPreviewBridge() {
|
|
|
3423
4089
|
const scan = () => {
|
|
3424
4090
|
let scanned = 0;
|
|
3425
4091
|
for (const n of document.querySelectorAll('img, image')) {
|
|
3426
|
-
const
|
|
3427
|
-
if (!
|
|
4092
|
+
const key = photoKeyOf(n);
|
|
4093
|
+
if (!key || attempted.has(key)) continue;
|
|
3428
4094
|
if (++scanned > MAX_SCAN_PER_PASS) break;
|
|
3429
|
-
attempted.add(
|
|
3430
|
-
const g = nextFetchGen(
|
|
3431
|
-
|
|
3432
|
-
.then((r) => (r.ok ? r.json() : null))
|
|
4095
|
+
attempted.add(key);
|
|
4096
|
+
const g = nextFetchGen(key);
|
|
4097
|
+
fetchEditFor(key)
|
|
3433
4098
|
.then((edit) => {
|
|
3434
|
-
if (cancelled || !isLatestFetch(
|
|
3435
|
-
apply(
|
|
4099
|
+
if (cancelled || !isLatestFetch(key, g) || !edit || isDefaultEdit(edit)) return;
|
|
4100
|
+
apply(key, edit);
|
|
3436
4101
|
})
|
|
3437
4102
|
.catch(() => {});
|
|
3438
4103
|
}
|
|
@@ -3446,7 +4111,7 @@ export function PhotoPreviewBridge() {
|
|
|
3446
4111
|
childList: true,
|
|
3447
4112
|
subtree: true,
|
|
3448
4113
|
attributes: true,
|
|
3449
|
-
attributeFilter: ['src', 'href'],
|
|
4114
|
+
attributeFilter: ['src', 'href', 'data-photo-edit'],
|
|
3450
4115
|
});
|
|
3451
4116
|
return () => {
|
|
3452
4117
|
cancelled = true;
|
|
@@ -3576,7 +4241,7 @@ export function SnapGuideOverlay() {
|
|
|
3576
4241
|
{s.snap.guides.map((g, i) => {
|
|
3577
4242
|
const kindClass = g.kind === 'grid' ? 'dc-snap-guide--grid' : 'dc-snap-guide--sibling';
|
|
3578
4243
|
const delta = g.delta ?? 0;
|
|
3579
|
-
const showPill = g.kind !== 'grid' && Math.abs(delta) > 0;
|
|
4244
|
+
const showPill = g.kind !== 'grid' && Math.round(Math.abs(delta)) > 0; // "Δ0" says nothing (14 ed-ab-arrange)
|
|
3580
4245
|
if (g.axis === 'x') {
|
|
3581
4246
|
const sx = vp.x + g.pos * vp.zoom;
|
|
3582
4247
|
const sFrom = vp.y + g.from * vp.zoom;
|
|
@@ -3685,7 +4350,7 @@ const OVERLAY_CSS = `
|
|
|
3685
4350
|
background: var(--maude-chrome-bg-0, #ffffff);
|
|
3686
4351
|
border: 1px solid var(--maude-chrome-fg-0, #1c1917);
|
|
3687
4352
|
border-radius: ${FLOATING_RADIUS};
|
|
3688
|
-
font-family: var(--maude-chrome-font-
|
|
4353
|
+
font-family: var(--maude-chrome-font-body, system-ui, -apple-system, sans-serif);
|
|
3689
4354
|
font-size: 10px;
|
|
3690
4355
|
color: var(--maude-chrome-fg-1, rgba(40,30,20,0.7));
|
|
3691
4356
|
z-index: 6;
|
|
@@ -3731,14 +4396,16 @@ const OVERLAY_CSS = `
|
|
|
3731
4396
|
.dc-zoom-tb {
|
|
3732
4397
|
position: absolute;
|
|
3733
4398
|
left: 16px;
|
|
3734
|
-
|
|
4399
|
+
/* P8 C3: the shell's Undo · Redo · zoom % island owns the bottom-left corner (16px + 40px tall + a gap); this
|
|
4400
|
+
fit / 1:1 pill (View › Zoom controls) stacks above it instead of under it. */
|
|
4401
|
+
bottom: 64px;
|
|
3735
4402
|
display: flex;
|
|
3736
4403
|
align-items: stretch;
|
|
3737
4404
|
background: var(--maude-chrome-bg-0, #ffffff);
|
|
3738
4405
|
border: 1px solid var(--maude-chrome-fg-0, #1c1917);
|
|
3739
4406
|
border-radius: ${FLOATING_RADIUS};
|
|
3740
4407
|
overflow: hidden;
|
|
3741
|
-
font-family: var(--maude-chrome-font-
|
|
4408
|
+
font-family: var(--maude-chrome-font-body, system-ui, -apple-system, sans-serif);
|
|
3742
4409
|
font-size: 11px;
|
|
3743
4410
|
color: var(--maude-chrome-fg-1, rgba(40,30,20,0.85));
|
|
3744
4411
|
z-index: 6;
|
|
@@ -3958,7 +4625,9 @@ export function DCZoomToolbar() {
|
|
|
3958
4625
|
// Before the early returns — hooks cannot sit behind a branch. Live, because
|
|
3959
4626
|
// a zoom readout that only updates on settle reads as a frozen UI.
|
|
3960
4627
|
const liveVp = useLiveViewport();
|
|
3961
|
-
|
|
4628
|
+
// S3.9 — Preview shows the shell's ZoomOnly readout instead (04 md-preview), so this pill steps aside.
|
|
4629
|
+
const previewing = usePreviewing();
|
|
4630
|
+
if (!controller || previewing) return null;
|
|
3962
4631
|
// Menubar "View ▸ Zoom controls" toggle + Presentation Mode.
|
|
3963
4632
|
if (chrome && (!chrome.zoom || chrome.present)) return null;
|
|
3964
4633
|
const pct = Math.round(liveVp.zoom * 100);
|
|
@@ -3989,6 +4658,43 @@ export function DCZoomToolbar() {
|
|
|
3989
4658
|
}
|
|
3990
4659
|
DCZoomToolbar.displayName = 'DCZoomToolbar';
|
|
3991
4660
|
|
|
4661
|
+
/**
|
|
4662
|
+
* S3.9 — tells the shell the zoom (`viewport-zoom`): its ZoomOnly readout in Preview (and ZoomUndo later)
|
|
4663
|
+
* draws it. `useLiveViewport` is the same ≤ 20 Hz cadence the pill above reads — live during a gesture,
|
|
4664
|
+
* the settled value after — and an unchanged percentage posts nothing.
|
|
4665
|
+
*/
|
|
4666
|
+
function ViewportZoomReporter() {
|
|
4667
|
+
const vp = useLiveViewport();
|
|
4668
|
+
// A fresh `set-mode` (the shell seeds a canvas that just became the active one) re-posts the zoom: the
|
|
4669
|
+
// shell only listens to the ACTIVE canvas, so a background canvas' last post was dropped.
|
|
4670
|
+
const store = typeof window === 'undefined' ? null : canvasModeStore(window);
|
|
4671
|
+
const modeSeq = useSyncExternalStore(
|
|
4672
|
+
store ? store.subscribe : () => () => {},
|
|
4673
|
+
() => (store ? store.get().modeSeq : -1),
|
|
4674
|
+
() => -1
|
|
4675
|
+
);
|
|
4676
|
+
const lastKey = useRef('');
|
|
4677
|
+
useEffect(() => {
|
|
4678
|
+
if (typeof window === 'undefined' || window.parent === window) return;
|
|
4679
|
+
const fitted = viewportAtFit(vp, fitMark);
|
|
4680
|
+
const key = `${Math.round(vp.zoom * 100)}|${modeSeq}|${fitted ? 'fit' : ''}`;
|
|
4681
|
+
if (key === lastKey.current) return;
|
|
4682
|
+
lastKey.current = key;
|
|
4683
|
+
try {
|
|
4684
|
+
window.parent.postMessage(
|
|
4685
|
+
fitted
|
|
4686
|
+
? { dgn: 'viewport-zoom', zoom: vp.zoom, fit: true }
|
|
4687
|
+
: { dgn: 'viewport-zoom', zoom: vp.zoom },
|
|
4688
|
+
'*'
|
|
4689
|
+
);
|
|
4690
|
+
} catch {
|
|
4691
|
+
/* detached */
|
|
4692
|
+
}
|
|
4693
|
+
}, [vp, modeSeq]);
|
|
4694
|
+
return null;
|
|
4695
|
+
}
|
|
4696
|
+
ViewportZoomReporter.displayName = 'ViewportZoomReporter';
|
|
4697
|
+
|
|
3992
4698
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
3993
4699
|
// Specimen helpers
|
|
3994
4700
|
|
|
@@ -4088,6 +4794,57 @@ export function TypeScaleRow({
|
|
|
4088
4794
|
);
|
|
4089
4795
|
}
|
|
4090
4796
|
|
|
4797
|
+
// ── <DSRoot> + the canvas's design system (V2-1.13 §5.11) ─────────────────
|
|
4798
|
+
// The generated `@maude/ds` module (canvas-build.ts) calls `__registerDesignSystem` on import
|
|
4799
|
+
// with the canvas's system, so the default theme travels with the canvas code into every render
|
|
4800
|
+
// path — the shell, exports and the handoff inline alike. A canvas that never imports
|
|
4801
|
+
// `@maude/ds` registers nothing, and `<DSRoot>` then writes no data-theme.
|
|
4802
|
+
|
|
4803
|
+
let registeredDesignSystem: { name: string; themeDefault: string | null } | null = null;
|
|
4804
|
+
|
|
4805
|
+
/** Called by the generated `@maude/ds` module. Idempotent; the last import wins. */
|
|
4806
|
+
export function __registerDesignSystem(ds: { name: string; themeDefault?: string | null }): void {
|
|
4807
|
+
const next = { name: ds.name, themeDefault: ds.themeDefault ?? null };
|
|
4808
|
+
const prev = registeredDesignSystem;
|
|
4809
|
+
if (
|
|
4810
|
+
prev &&
|
|
4811
|
+
prev.name !== next.name &&
|
|
4812
|
+
!(typeof process !== 'undefined' && process.env?.NODE_ENV === 'production')
|
|
4813
|
+
) {
|
|
4814
|
+
console.warn(
|
|
4815
|
+
`[@maude/ds] two design systems registered in one canvas bundle ("${prev.name}", then "${next.name}"); the last one wins.`
|
|
4816
|
+
);
|
|
4817
|
+
}
|
|
4818
|
+
registeredDesignSystem = next;
|
|
4819
|
+
// r4 #6 — the canvas's Light | Dark starts at this system's own default theme
|
|
4820
|
+
registerCanvasThemeSystem(next);
|
|
4821
|
+
}
|
|
4822
|
+
|
|
4823
|
+
/**
|
|
4824
|
+
* The theme wrapper a canvas can switch systems under: `class="ds"` plus `data-theme` from the
|
|
4825
|
+
* `theme` prop, else the registered system's default, else none (S6-clean, unlike a wrapper
|
|
4826
|
+
* carrying a system's rootClass).
|
|
4827
|
+
*/
|
|
4828
|
+
export function DSRoot({
|
|
4829
|
+
theme,
|
|
4830
|
+
as: Tag = 'div',
|
|
4831
|
+
className,
|
|
4832
|
+
children,
|
|
4833
|
+
...rest
|
|
4834
|
+
}: {
|
|
4835
|
+
theme?: string;
|
|
4836
|
+
as?: 'div' | 'section' | 'main' | 'article' | 'span';
|
|
4837
|
+
className?: string;
|
|
4838
|
+
children?: ReactNode;
|
|
4839
|
+
} & Record<string, unknown>) {
|
|
4840
|
+
const dataTheme = theme ?? registeredDesignSystem?.themeDefault ?? undefined;
|
|
4841
|
+
return (
|
|
4842
|
+
<Tag {...rest} className={className ? `ds ${className}` : 'ds'} data-theme={dataTheme}>
|
|
4843
|
+
{children}
|
|
4844
|
+
</Tag>
|
|
4845
|
+
);
|
|
4846
|
+
}
|
|
4847
|
+
|
|
4091
4848
|
/** Light/dark toggle. Writes `data-theme` on `<html>` and persists to memory. */
|
|
4092
4849
|
export function ThemeToggle() {
|
|
4093
4850
|
const { theme, setTheme } = useTheme();
|
|
@@ -4177,8 +4934,17 @@ export function useTheme(): { theme: string; setTheme: (t: string) => void } {
|
|
|
4177
4934
|
/**
|
|
4178
4935
|
* ResizeObserver wrapper. Pass a ref to any element (typically the active
|
|
4179
4936
|
* artboard); returns its current `{ width, height }` in CSS pixels.
|
|
4937
|
+
*
|
|
4938
|
+
* An unchanged size keeps the same object (no re-render). `minDelta` also
|
|
4939
|
+
* ignores changes smaller than that many CSS px: under Blink's CSS `zoom` the
|
|
4940
|
+
* observer fires on every zoom frame with sub-pixel layout noise
|
|
4941
|
+
* (1279.875 ↔ 1279.92 for a 1280 px board), which re-rendered every artboard
|
|
4942
|
+
* ~2× per frame of a pinch (V2-8.8). Default 0 = every real change.
|
|
4180
4943
|
*/
|
|
4181
|
-
export function useArtboardBounds(
|
|
4944
|
+
export function useArtboardBounds(
|
|
4945
|
+
ref: RefObject<HTMLElement | null>,
|
|
4946
|
+
minDelta = 0
|
|
4947
|
+
): {
|
|
4182
4948
|
width: number;
|
|
4183
4949
|
height: number;
|
|
4184
4950
|
} {
|
|
@@ -4190,11 +4956,15 @@ export function useArtboardBounds(ref: RefObject<HTMLElement | null>): {
|
|
|
4190
4956
|
const e = entries[0];
|
|
4191
4957
|
if (!e) return;
|
|
4192
4958
|
const r = e.contentRect;
|
|
4193
|
-
setBounds(
|
|
4959
|
+
setBounds((prev) =>
|
|
4960
|
+
Math.abs(prev.width - r.width) <= minDelta && Math.abs(prev.height - r.height) <= minDelta
|
|
4961
|
+
? prev
|
|
4962
|
+
: { width: r.width, height: r.height }
|
|
4963
|
+
);
|
|
4194
4964
|
});
|
|
4195
4965
|
ro.observe(el);
|
|
4196
4966
|
return () => ro.disconnect();
|
|
4197
|
-
}, [ref]);
|
|
4967
|
+
}, [ref, minDelta]);
|
|
4198
4968
|
return bounds;
|
|
4199
4969
|
}
|
|
4200
4970
|
|