@1agh/maude 1.10.0 → 2.0.0-rc.2
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/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 +808 -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 +679 -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 +212 -0
- package/apps/studio/ai/run-doing.ts +106 -0
- package/apps/studio/ai/run-lifecycle.ts +337 -0
- package/apps/studio/ai/run-progress.ts +154 -0
- package/apps/studio/ai/runs.ts +1232 -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 +1553 -459
- 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-imports.ts +23 -4
- 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 +2918 -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/fonts/LICENSE-Inter-Tight.txt +93 -0
- package/apps/studio/client/fonts/LICENSE-Inter.txt +93 -0
- package/apps/studio/client/fonts/LICENSE-JetBrains-Mono.txt +93 -0
- package/apps/studio/client/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/inter-tight-latin-ext-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/inter-tight-latin-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- 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/index.html +0 -3
- 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 +185 -18
- package/apps/studio/client/styles/fonts.css +63 -0
- 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 +401 -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 +16 -1
- package/apps/studio/sync/file-ledger.ts +12 -0
- package/apps/studio/sync/file-membership.ts +123 -10
- package/apps/studio/sync/file-plane.ts +195 -12
- 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 +1499 -128
- package/apps/studio/sync/journal-client.ts +56 -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 +50 -0
- package/apps/studio/sync/presentation.ts +20 -2
- package/apps/studio/sync/project-config-push.ts +5 -2
- package/apps/studio/sync/projection.ts +208 -34
- package/apps/studio/sync/resync-trace.ts +220 -0
- package/apps/studio/sync/retry-after.ts +27 -0
- package/apps/studio/sync/status.ts +16 -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 +100 -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 +1 -0
- package/cli/commands/design.mjs +401 -72
- package/cli/commands/flow.mjs +12 -1
- package/cli/commands/help.mjs +8 -0
- package/cli/commands/migrate.mjs +55 -0
- package/cli/lib/bash-guard.mjs +1691 -0
- 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/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 +6 -10
- 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 +29 -10
- 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 +6 -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,9 @@ import {
|
|
|
41
41
|
} from './canvas-url.js';
|
|
42
42
|
import { applyEditRequest } from './apply-edit-request.ts';
|
|
43
43
|
import { createIndexLoader } from './index-loader.ts';
|
|
44
|
+
import { applyUiOpen, OPEN_LADDER_MS } from './ui-open.js';
|
|
45
|
+
import { dsGoToPlan, dsGoToPosts } from './v2/ds/go-to.js';
|
|
46
|
+
import { DsReviewHost } from './v2/ds/review-host.jsx';
|
|
44
47
|
import {
|
|
45
48
|
BROWSER_CAPTURE_FORMATS,
|
|
46
49
|
BROWSER_SERVABLE_FORMATS,
|
|
@@ -55,23 +58,27 @@ import { FileTree, FileTreeItem } from './file-tree.jsx';
|
|
|
55
58
|
import { useTreeDrag } from './use-tree-drag.js';
|
|
56
59
|
import ChatPanel from './panels/ChatPanel.jsx';
|
|
57
60
|
import DiffView from './panels/DiffView.jsx';
|
|
58
|
-
import GitPanel from './panels/GitPanel.jsx';
|
|
59
61
|
import SyncConsentDialog from './panels/SyncConsentDialog.jsx';
|
|
60
|
-
import SyncPanel from './panels/SyncPanel.jsx';
|
|
61
62
|
import CloudBar from './panels/CloudBar.jsx';
|
|
62
63
|
import { buildShareLinks, normalizeOpenPath, readOpenParam, withOpenParam } from './share-link.js';
|
|
63
64
|
import { isEmbedLocation } from './embed.js';
|
|
65
|
+
import { HomeApp } from './home/home-app.jsx';
|
|
66
|
+
import { bootShellMode } from './home/shell-mode.js';
|
|
64
67
|
import EmbedView from './embed-view.jsx';
|
|
65
|
-
import {
|
|
68
|
+
import { ShareSheet } from './v2/share/share-sheet.jsx';
|
|
66
69
|
import IdentityBar from './panels/IdentityBar.jsx';
|
|
67
|
-
import OnboardingWizard from './panels/OnboardingWizard.jsx';
|
|
68
70
|
import { ReadinessDialog } from './panels/ReadinessList.jsx';
|
|
69
71
|
import IntroVideoDialog from './panels/IntroVideoDialog.jsx';
|
|
70
72
|
import BrandUploadPanel from './panels/BrandUploadPanel.jsx';
|
|
71
73
|
import FigmaImportPanel from './panels/FigmaImportPanel.jsx';
|
|
72
74
|
import { FilePreview, prefetchPreviewImage, sanitizeDisplayText } from './panels/file-preview.jsx';
|
|
73
75
|
import SetupChecklistDialog, { useSetupReadiness } from './panels/SetupChecklist.jsx';
|
|
74
|
-
import TimelinePanel from './
|
|
76
|
+
import TimelinePanel from './v2/timeline/Timeline.jsx';
|
|
77
|
+
import TimelineHost from './v2/timeline/TimelineHost.jsx';
|
|
78
|
+
import { CommentStripHost } from './v2/timeline/comment-strip-host.jsx';
|
|
79
|
+
import { timelineSelection } from './v2/timeline/selection.js';
|
|
80
|
+
import { useTimelineKept } from './v2/timeline/timeline-store.js';
|
|
81
|
+
import TranscriptHost from './v2/transcript/TranscriptHost.jsx';
|
|
75
82
|
import { parseCompTimeline } from './panels/timeline-parse.js';
|
|
76
83
|
import {
|
|
77
84
|
activeComp,
|
|
@@ -80,10 +87,31 @@ import {
|
|
|
80
87
|
} from './panels/timeline-comp-target.js';
|
|
81
88
|
import { durationFramesForDrop, probeMediaDuration } from './panels/timeline-media-cache.js';
|
|
82
89
|
import GenerateDialog from './generate-dialog.jsx';
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import
|
|
90
|
+
import { migrateAtBoot } from './v2/settings/prefs-migrate.js';
|
|
91
|
+
import SettingsSheet from './v2/settings/settings-sheet.jsx';
|
|
92
|
+
import StickersGallery from './v2/annotations/stickers-gallery.jsx';
|
|
93
|
+
import TemplatesPanel from './v2/annotations/templates-panel.jsx';
|
|
94
|
+
import VoteHost from './v2/annotations/vote-bar.jsx';
|
|
95
|
+
import ComponentPicker from './v2/inspector/component-picker.jsx';
|
|
96
|
+
import SizePickerHost from './v2/kinds/SizePickerHost.jsx';
|
|
97
|
+
import { canvasTargetOrigin } from './v2/kinds/kind-dim-relay.js';
|
|
98
|
+
import { getPaletteEnv } from './v2/search/search-env.js';
|
|
99
|
+
import {
|
|
100
|
+
AlignPad,
|
|
101
|
+
AngleDial,
|
|
102
|
+
ColorField,
|
|
103
|
+
IconButtonGroup,
|
|
104
|
+
IconToggleGroup,
|
|
105
|
+
makeScrubHandler,
|
|
106
|
+
NumberField,
|
|
107
|
+
RadiusControl,
|
|
108
|
+
Segmented,
|
|
109
|
+
Select,
|
|
110
|
+
SliderField,
|
|
111
|
+
Toggle,
|
|
112
|
+
UnitSelect,
|
|
113
|
+
ValueTokenField,
|
|
114
|
+
} from './inspector-controls.jsx';
|
|
87
115
|
import {
|
|
88
116
|
ALargeSmall as LuALargeSmall,
|
|
89
117
|
AlignCenter as LuAlignCenter,
|
|
@@ -116,10 +144,10 @@ import {
|
|
|
116
144
|
} from 'lucide-react';
|
|
117
145
|
import { PhotoKnobs } from './photo-knobs.jsx';
|
|
118
146
|
import {
|
|
119
|
-
|
|
147
|
+
cloudSignInPrepare,
|
|
120
148
|
invoke,
|
|
121
149
|
isNativeApp,
|
|
122
|
-
|
|
150
|
+
onMenuAction,
|
|
123
151
|
onUpdateReady,
|
|
124
152
|
pickedMediaSource,
|
|
125
153
|
pickMediaFile,
|
|
@@ -134,9 +162,10 @@ import { USAGE_TOUR } from './tour/usage-tour.js';
|
|
|
134
162
|
import { dismissNotice, NotificationHost, notify, notifyCanvasText } from '../notifications.tsx';
|
|
135
163
|
import { uploadAsset } from '../asset-upload.ts';
|
|
136
164
|
import { acceptCanvasNotice } from '../canvas-notice-message.ts';
|
|
137
|
-
import {
|
|
165
|
+
import { ExportPanel, ExportToast, useExportCenter } from './export-center.jsx';
|
|
138
166
|
import { ReportBugDialog } from './report-bug.jsx';
|
|
139
|
-
import {
|
|
167
|
+
import { QuitDialog } from './v2/ai/QuitDialog.jsx';
|
|
168
|
+
import { useWhatsNew, WhatsNewPanel } from './whats-new.jsx';
|
|
140
169
|
import {
|
|
141
170
|
collectDirPaths,
|
|
142
171
|
isDirOpen,
|
|
@@ -147,25 +176,145 @@ import {
|
|
|
147
176
|
toggleSection as toggleSectionState,
|
|
148
177
|
useTreeExpansion,
|
|
149
178
|
} from './tree-expansion.js';
|
|
150
|
-
import {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
179
|
+
import {
|
|
180
|
+
ANNOT_STORE,
|
|
181
|
+
ATTENTION_NOTIFY_COOLDOWN_MS,
|
|
182
|
+
CANVAS_EXT_RE,
|
|
183
|
+
COLLAB_TOUR_STORE,
|
|
184
|
+
CP_MODE_STORE,
|
|
185
|
+
EMPTY_GROUPS,
|
|
186
|
+
LAYERS_MODE_STORE,
|
|
187
|
+
MDCC_VERSION,
|
|
188
|
+
MINIMAP_STORE,
|
|
189
|
+
MODE_HINT_SEEN,
|
|
190
|
+
PANEL_SIDES_STORE,
|
|
191
|
+
SHOW_HIDDEN_STORE,
|
|
192
|
+
SIDEBAR_STORE,
|
|
193
|
+
SYSTEM_TAB,
|
|
194
|
+
THEME_STORE,
|
|
195
|
+
USAGE_TOUR_STORE,
|
|
196
|
+
ZOOMCTL_STORE,
|
|
197
|
+
isModuleCanvasPath,
|
|
198
|
+
} from './shell/constants.js';
|
|
199
|
+
import {
|
|
200
|
+
basename,
|
|
201
|
+
buildTree,
|
|
202
|
+
displayName,
|
|
203
|
+
filterTree,
|
|
204
|
+
groupBySidecar,
|
|
205
|
+
layersTreeSig,
|
|
206
|
+
notifyDesktop,
|
|
207
|
+
openCount,
|
|
208
|
+
pathTestIdSlug,
|
|
209
|
+
persistUiPrefs,
|
|
210
|
+
previewKind,
|
|
211
|
+
readBoolStore,
|
|
212
|
+
readInitialTheme,
|
|
213
|
+
readJsonStore,
|
|
214
|
+
sectionDefaultOpen,
|
|
215
|
+
shellToast,
|
|
216
|
+
timeAgo,
|
|
217
|
+
totalCounts,
|
|
218
|
+
} from './shell/util.js';
|
|
219
|
+
import { Icon, Kbd, Lu, StIcon } from './shell/icons.jsx';
|
|
220
|
+
import {
|
|
221
|
+
DOCK_PANELS,
|
|
222
|
+
DockSlot,
|
|
223
|
+
PANEL_SIDES_DEFAULTS,
|
|
224
|
+
PanelGrip,
|
|
225
|
+
usePanelSize,
|
|
226
|
+
} from './shell/dock.jsx';
|
|
154
227
|
import { CommandPalette } from './dialogs/command-palette.jsx';
|
|
155
228
|
import { AssetPicker } from './dialogs/asset-picker.jsx';
|
|
229
|
+
import { importsWaitHereFrom } from './v2/assets/import-offline.js';
|
|
230
|
+
import { useLastFinishedAt } from './v2/export/last-finished.js';
|
|
156
231
|
import { ExportDialog, downloadCapturedBlob } from './dialogs/export-dialog.jsx';
|
|
157
232
|
import { Sidebar } from './tree/tree.jsx';
|
|
158
|
-
import {
|
|
233
|
+
import { CornerIcons } from './v2/shell/corner-icons.jsx';
|
|
234
|
+
import ShellErrorBoundary from './v2/shell/shell-error-boundary.jsx';
|
|
235
|
+
import { cutCopyPaste, createMenuHandlers, menuRunner } from './v2/shell/menu-runner.js';
|
|
236
|
+
import DiagnosticsHost from './v2/diagnostics/diagnostics-host.jsx';
|
|
237
|
+
import { useDiagnosticsMenu } from './v2/diagnostics/use-diagnostics-menu.js';
|
|
238
|
+
import { menuCtx, moveDestinations } from './v2/shell/project-menu-model.js';
|
|
239
|
+
import { useProjectSwitcher } from './panels/RepoBranchSwitcher.jsx';
|
|
240
|
+
import { ProjectPill } from './v2/shell/project-pill.jsx';
|
|
241
|
+
import { AskSelectionHost } from './v2/ai/AskSelectionHost.jsx';
|
|
242
|
+
import { EmptyHost } from './v2/empty/empty-host.jsx';
|
|
243
|
+
import { IntentHost } from './v2/create/intent-host.jsx';
|
|
244
|
+
import NameDialogHost from './v2/create/NameDialogHost.jsx';
|
|
245
|
+
import { useOnline } from './v2/empty/use-empty-canvas.js';
|
|
246
|
+
import { ShellShareCluster } from './v2/shell/share-cluster-host.jsx';
|
|
247
|
+
import { ShellUndoHistory } from './v2/undo/undo-history.jsx';
|
|
248
|
+
import { undoProjection } from './v2/undo/use-undo-projection.jsx';
|
|
249
|
+
import { ShellInspectPanel } from './v2/inspect/inspect-host.jsx';
|
|
250
|
+
import { ShellPreviewChrome, usePreviewMode } from './v2/preview/preview-chrome-host.jsx';
|
|
251
|
+
import { ShellTakes } from './v2/assets/takes-overlay.jsx';
|
|
252
|
+
import { ViewBarHost } from './v2/history/history-host.jsx';
|
|
253
|
+
import { SyncStatesHost } from './v2/sync-states/conflict-card.jsx';
|
|
254
|
+
import { markMine } from '../comments/mine-stamp.ts';
|
|
255
|
+
import { useQueuedMarkedByFile } from './v2/sync-states/row-words.js';
|
|
256
|
+
import { panelOpenDecision, rightMainWidth, rightPanelWidth } from './v2/shell/panel-layout.js';
|
|
257
|
+
import { aiSlotWidth, gripTarget, usePanelSizes } from './v2/shell/panel-sizes.js';
|
|
258
|
+
import { panelLayout, useHydratePanelLayout, usePanelLayout } from './v2/shell/use-panel-layout.js';
|
|
259
|
+
import { useFitOnAiPin } from './v2/shell/use-fit-on-ai-pin.js';
|
|
260
|
+
import { useFitWhileAiDrafts } from './v2/shell/use-fit-while-ai-drafts.js';
|
|
261
|
+
import { useAiRuns } from './v2/ai/runs-store.js';
|
|
262
|
+
import { yoursCount } from './v2/ai/runs-model.js';
|
|
263
|
+
import { useOccludedInsets } from './v2/shell/use-occluded-insets.js';
|
|
264
|
+
import { useShellPanelsRelay } from './v2/shell/shell-panels-relay.js';
|
|
265
|
+
import { useToolPanels } from './v2/shell/use-tool-panels.js';
|
|
266
|
+
import { useAssetStateLane } from './v2/assets/asset-state-lane.js';
|
|
267
|
+
import { useRelinkSheet } from './v2/assets/missing-frame.jsx';
|
|
159
268
|
import { HelpModal } from './dialogs/help-modal.jsx';
|
|
160
269
|
import { ShortcutsOverlay } from './dialogs/shortcuts-overlay.jsx';
|
|
161
|
-
import { Menubar } from './menus/menubar.jsx';
|
|
162
270
|
import { SystemView } from './system/system-view.jsx';
|
|
163
271
|
import { Viewport } from './shell/viewport.jsx';
|
|
164
|
-
import { StatusBar } from './shell/status-bar.jsx';
|
|
165
272
|
import { CommentsPanel } from './shell/comments-panel.jsx';
|
|
166
|
-
import {
|
|
167
|
-
import {
|
|
168
|
-
import {
|
|
273
|
+
import { ShellCallouts } from './v2/shell/callouts-host.jsx';
|
|
274
|
+
import { noteSaveHold } from './v2/shell/save-hold-notice.js';
|
|
275
|
+
import { ShellMentionCallouts, useCommentsShell } from './v2/comments/use-comments-shell.jsx';
|
|
276
|
+
import { commentFocusMessage, wantReplyFocus } from './v2/comments/reply-focus.js';
|
|
277
|
+
import { noteMadeByAi } from './v2/ai/made-by-ai.js';
|
|
278
|
+
import { getRunsStore, noteAiRuns } from './v2/ai/runs-store.js';
|
|
279
|
+
import { OPEN_AI_EVENT } from './v2/ai/needs-you-toast.js';
|
|
280
|
+
import { OPEN_ASSETS_EVENT } from './v2/ai/AttachMenu.jsx';
|
|
281
|
+
import { TRASH_CHANGED_EVENT } from './v2/left-panel/use-trash.js';
|
|
282
|
+
import { ACCESS_FRAME_EVENT, observerOn, sessionRole } from './v2/access/access-client.js';
|
|
283
|
+
import { isFollowLocation } from './v2/present/follow-location.js';
|
|
284
|
+
import FollowView from './v2/present/follow-view.jsx';
|
|
285
|
+
import { OrderNotesMount } from './v2/present/order-notes-mount.jsx';
|
|
286
|
+
import { ShellPresentChrome } from './v2/present/present-chrome-host.jsx';
|
|
287
|
+
import { PresenterViewHost } from './v2/present/presenter-host.jsx';
|
|
288
|
+
import {
|
|
289
|
+
CSS_ALIGN_SELF,
|
|
290
|
+
CSS_ASPECT_RATIO,
|
|
291
|
+
CSS_BLEND_MODES,
|
|
292
|
+
CSS_BORDER_STYLES,
|
|
293
|
+
CSS_DISPLAYS,
|
|
294
|
+
CSS_FONTS,
|
|
295
|
+
CSS_FONT_STYLE,
|
|
296
|
+
CSS_OBJECT_FIT,
|
|
297
|
+
CSS_POSITION,
|
|
298
|
+
CSS_TEXT_TRANSFORM,
|
|
299
|
+
CSS_UNITLESS,
|
|
300
|
+
CSS_UNITS,
|
|
301
|
+
CSS_WEIGHTS,
|
|
302
|
+
CSS_WHITE_SPACE,
|
|
303
|
+
GRID_TRACK_UNITS,
|
|
304
|
+
PROP_LEAD,
|
|
305
|
+
SCREEN_PRESETS,
|
|
306
|
+
replacedValue,
|
|
307
|
+
} from './inspector/css-vocab.jsx';
|
|
308
|
+
import {
|
|
309
|
+
clamp01,
|
|
310
|
+
cssColorToHex,
|
|
311
|
+
cssHint,
|
|
312
|
+
cssSplitUnit,
|
|
313
|
+
hexToRgb,
|
|
314
|
+
hsvToRgb,
|
|
315
|
+
rgbToHex,
|
|
316
|
+
rgbToHsv,
|
|
317
|
+
} from './inspector/color.js';
|
|
169
318
|
import { mergeSelClientFields } from './inspector/selection.js';
|
|
170
319
|
import { activeDsNameFor, useAllDsTokens } from './inspector/ds-tokens.js';
|
|
171
320
|
import { ColorPicker } from './inspector/color-picker.jsx';
|
|
@@ -174,65 +323,258 @@ import { GridTracksEditor } from './inspector/grid-tracks-editor.jsx';
|
|
|
174
323
|
import { CssKnobs, afterRecordableWrites, trackRecordableWrite } from './inspector/css-knobs.jsx';
|
|
175
324
|
import { LAYER_VOID_TAGS, LayerRow, moveLayerNode } from './inspector/layers.jsx';
|
|
176
325
|
import { InspectComputed } from './inspector/inspect-computed.jsx';
|
|
177
|
-
import { ArtboardKnobs, resolveArtboardIdFromSelection } from './inspector/artboard-knobs.jsx';
|
|
178
326
|
import { InspectorPanel, PHOTO_ASSET_RE } from './inspector/inspector-panel.jsx';
|
|
179
327
|
import { usePaletteAndPanels } from './hooks/use-palette-and-panels.jsx';
|
|
180
|
-
import {
|
|
328
|
+
import { useActionKeys } from './hooks/use-action-keys.jsx';
|
|
181
329
|
import { useCanvasBridge } from './hooks/use-canvas-bridge.jsx';
|
|
330
|
+
import { postDsThemePreview, useDsFrames } from './v2/ds/use-ds-frames.js';
|
|
182
331
|
import { useTabs } from './hooks/use-tabs.jsx';
|
|
183
332
|
import { useGitActions } from './hooks/use-git-actions.jsx';
|
|
184
333
|
import { useWebSocket } from './hooks/use-web-socket.jsx';
|
|
185
334
|
import { useProjectData } from './hooks/use-project-data.jsx';
|
|
186
335
|
import { usePhotoAndTimeline } from './hooks/use-photo-and-timeline.jsx';
|
|
187
336
|
import { useShellCore } from './hooks/use-shell-core.jsx';
|
|
188
|
-
import { exportSelectionFor, isOwnSelectEcho } from './selection-scope.js';
|
|
337
|
+
import { exportSelectionFor, exportSelectionV2, isOwnSelectEcho } from './selection-scope.js';
|
|
338
|
+
import { ShellStoreContext, useShellStore } from './stores/shell-store.jsx';
|
|
189
339
|
|
|
190
340
|
// ---------- App ----------
|
|
191
341
|
|
|
192
|
-
function
|
|
342
|
+
function ShellState({ children }) {
|
|
193
343
|
const {
|
|
194
|
-
activeArtboards,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
344
|
+
activeArtboards,
|
|
345
|
+
activeComps,
|
|
346
|
+
activePath,
|
|
347
|
+
addressMode,
|
|
348
|
+
agentActive,
|
|
349
|
+
agentIdleRef,
|
|
350
|
+
annotationsVisible,
|
|
351
|
+
assistantBusy,
|
|
352
|
+
assistantOpen,
|
|
353
|
+
assistantUnseen,
|
|
354
|
+
autoOpenInspector,
|
|
355
|
+
bodyRef,
|
|
356
|
+
brandUploadOpen,
|
|
357
|
+
canvasActiveArtboard,
|
|
358
|
+
canvasError,
|
|
359
|
+
canvasReloadNonce,
|
|
360
|
+
captureFromCanvas,
|
|
361
|
+
cellManaged,
|
|
362
|
+
cfg,
|
|
363
|
+
changesOpen,
|
|
364
|
+
cloudLinkedHub,
|
|
365
|
+
cloudManaged,
|
|
366
|
+
collabNudge,
|
|
367
|
+
commentsByFile,
|
|
368
|
+
commentsFilter,
|
|
369
|
+
commentsPanelOpen,
|
|
370
|
+
componentMap,
|
|
371
|
+
cpMode,
|
|
372
|
+
diffTarget,
|
|
373
|
+
dragSide,
|
|
374
|
+
editScope,
|
|
375
|
+
exportCenter,
|
|
376
|
+
exportDialog,
|
|
377
|
+
figmaImportOpen,
|
|
378
|
+
focusedCommentId,
|
|
379
|
+
generateOpen,
|
|
380
|
+
gitLifecycle,
|
|
381
|
+
gitStatus,
|
|
382
|
+
gitUser,
|
|
383
|
+
groups,
|
|
384
|
+
handleAssistantAttention,
|
|
385
|
+
handleAssistantFinished,
|
|
386
|
+
helpOpen,
|
|
387
|
+
iframesRef,
|
|
388
|
+
inspectorOpen,
|
|
389
|
+
inspectorTab,
|
|
390
|
+
introOpen,
|
|
391
|
+
lastLayersTreeRef,
|
|
392
|
+
lastLocalSelectRef,
|
|
393
|
+
layersBusyRef,
|
|
394
|
+
layersBusyTimerRef,
|
|
395
|
+
layersMode,
|
|
396
|
+
layersOpen,
|
|
397
|
+
assetsOpen,
|
|
398
|
+
layersTree,
|
|
399
|
+
loadServerConfig,
|
|
400
|
+
loadedPath,
|
|
401
|
+
loadingPath,
|
|
402
|
+
localProjectName,
|
|
403
|
+
markCollabSeen,
|
|
404
|
+
markUsageSeen,
|
|
405
|
+
maybeAutoOpenInspectorOnSelect,
|
|
406
|
+
minimapVisible,
|
|
407
|
+
onIframeLoad,
|
|
408
|
+
onPreview,
|
|
409
|
+
openMenu,
|
|
410
|
+
openPanelExclusive,
|
|
411
|
+
openRightPanel,
|
|
412
|
+
paletteOpen,
|
|
413
|
+
panelSide,
|
|
414
|
+
pendingReorderRef,
|
|
415
|
+
photoRev,
|
|
416
|
+
photoSel,
|
|
417
|
+
photoUndoRef,
|
|
418
|
+
postToActiveCanvas,
|
|
419
|
+
presentMode,
|
|
420
|
+
previewPath,
|
|
421
|
+
previousAddressPath,
|
|
422
|
+
printGuidesVisible,
|
|
423
|
+
project,
|
|
424
|
+
quickSetupOpen,
|
|
425
|
+
readinessOpen,
|
|
426
|
+
remoteSync,
|
|
427
|
+
reorderLayerRef,
|
|
428
|
+
reportBugOpen,
|
|
429
|
+
repositionElementRef,
|
|
430
|
+
resizeElementRef,
|
|
431
|
+
rpSize,
|
|
432
|
+
savingIsManaged,
|
|
433
|
+
savingIsManagedRef,
|
|
434
|
+
sbSize,
|
|
435
|
+
scheduleArtboardResync,
|
|
436
|
+
scheduleHaloRestore,
|
|
437
|
+
search,
|
|
438
|
+
sectionsExpanded,
|
|
439
|
+
selected,
|
|
440
|
+
selectedRef,
|
|
441
|
+
setActiveArtboards,
|
|
442
|
+
setActiveComps,
|
|
443
|
+
setActivePath,
|
|
444
|
+
setAgentActive,
|
|
445
|
+
setAnnotationsVisible,
|
|
446
|
+
setAssistantBusy,
|
|
447
|
+
setAssistantOpen,
|
|
448
|
+
setAutoOpenInspector,
|
|
449
|
+
setBrandUploadOpen,
|
|
450
|
+
setCanvasActiveArtboard,
|
|
451
|
+
setCanvasError,
|
|
452
|
+
setCanvasReloadNonce,
|
|
453
|
+
setCfg,
|
|
454
|
+
setChangesOpen,
|
|
455
|
+
setCloudLinkedHub,
|
|
456
|
+
setCommentsByFile,
|
|
457
|
+
setCommentsFilter,
|
|
458
|
+
setCpMode,
|
|
459
|
+
setDiffTarget,
|
|
460
|
+
setDragSide,
|
|
461
|
+
setExportDialog,
|
|
462
|
+
setFigmaImportOpen,
|
|
463
|
+
setFocusedCommentId,
|
|
464
|
+
setGenerateOpen,
|
|
465
|
+
setGitLifecycle,
|
|
466
|
+
setGitStatus,
|
|
467
|
+
setGitUser,
|
|
468
|
+
setGroups,
|
|
469
|
+
setHelpOpen,
|
|
470
|
+
setInspectorOpen,
|
|
471
|
+
setInspectorTab,
|
|
472
|
+
setIntroOpen,
|
|
473
|
+
setLayersMode,
|
|
474
|
+
setLayersOpen,
|
|
475
|
+
setLayersTree,
|
|
476
|
+
setLoadedPath,
|
|
477
|
+
setLoadingPath,
|
|
478
|
+
setLocalProjectName,
|
|
479
|
+
setMinimapVisible,
|
|
480
|
+
setOpenMenu,
|
|
481
|
+
setPaletteOpen,
|
|
482
|
+
setPanelSide,
|
|
483
|
+
setPhotoRev,
|
|
484
|
+
setPhotoSel,
|
|
485
|
+
setPresentMode,
|
|
486
|
+
setPreviewPath,
|
|
487
|
+
setPrintGuidesVisible,
|
|
488
|
+
setProject,
|
|
489
|
+
setQuickSetupOpen,
|
|
490
|
+
setReadinessOpen,
|
|
491
|
+
setRemoteSync,
|
|
492
|
+
setReportBugOpen,
|
|
493
|
+
setSearch,
|
|
494
|
+
setSelected,
|
|
495
|
+
setSettingsOpen,
|
|
496
|
+
setShareDialog,
|
|
497
|
+
setShortcutsOpen,
|
|
498
|
+
setShowHidden,
|
|
499
|
+
setSyncPanelOpen,
|
|
500
|
+
setSyncStatus,
|
|
501
|
+
setSystemData,
|
|
502
|
+
setTabs,
|
|
503
|
+
setTheme,
|
|
504
|
+
setTimelineArtboardId,
|
|
505
|
+
setTimelineAudio,
|
|
506
|
+
setTimelineFrame,
|
|
507
|
+
setTimelineHeight,
|
|
508
|
+
setTimelineLoop,
|
|
509
|
+
setTimelineMuted,
|
|
510
|
+
setTimelineOpen,
|
|
511
|
+
setTimelinePlaying,
|
|
512
|
+
setTimelineSelectedClip,
|
|
513
|
+
setTimelineSequences,
|
|
514
|
+
setTimelineTotal,
|
|
515
|
+
setTimelineTransitions,
|
|
516
|
+
setTimelineVolume,
|
|
517
|
+
setTourSteps,
|
|
518
|
+
setTreeLoadFailures,
|
|
519
|
+
setTreeLoaded,
|
|
520
|
+
setUiPrefsHydrated,
|
|
521
|
+
setUpdateReady,
|
|
522
|
+
setWsConnected,
|
|
523
|
+
setZoomCtlVisible,
|
|
524
|
+
settingsOpen,
|
|
525
|
+
settlePendingSelectionRef,
|
|
526
|
+
setupReadiness,
|
|
527
|
+
shareDialog,
|
|
528
|
+
shortcutsOpen,
|
|
529
|
+
showHidden,
|
|
530
|
+
sidebarOpen,
|
|
531
|
+
startTour,
|
|
532
|
+
syncPanelOpen,
|
|
533
|
+
syncStatus,
|
|
534
|
+
systemData,
|
|
535
|
+
tabs,
|
|
536
|
+
theme,
|
|
537
|
+
timelineArtboardId,
|
|
538
|
+
timelineArtboardIdRef,
|
|
539
|
+
timelineAudio,
|
|
540
|
+
timelineCompId,
|
|
541
|
+
timelineCompIdRef,
|
|
542
|
+
timelineFps,
|
|
543
|
+
timelineFrame,
|
|
544
|
+
timelineFrameRef,
|
|
545
|
+
timelineHeight,
|
|
546
|
+
timelineLoop,
|
|
547
|
+
timelineMuted,
|
|
548
|
+
timelineOpFailed,
|
|
549
|
+
timelineOpen,
|
|
550
|
+
timelinePlaying,
|
|
551
|
+
timelineRefresh,
|
|
552
|
+
timelineSelectedClip,
|
|
553
|
+
timelineSequences,
|
|
554
|
+
timelineTotal,
|
|
555
|
+
timelineTransitions,
|
|
556
|
+
timelineVolume,
|
|
557
|
+
togglePanel,
|
|
558
|
+
toggleRightPanel,
|
|
559
|
+
toggleTimeline,
|
|
560
|
+
tourBus,
|
|
561
|
+
tourSteps,
|
|
562
|
+
treeExp,
|
|
563
|
+
treeLoadFailures,
|
|
564
|
+
treeLoaded,
|
|
565
|
+
uiPrefsHydrated,
|
|
566
|
+
unsavedCount,
|
|
567
|
+
updateReady,
|
|
568
|
+
updateTreeExp,
|
|
569
|
+
usageNudge,
|
|
570
|
+
viewerMode,
|
|
571
|
+
whatsNew,
|
|
572
|
+
wsConnected,
|
|
573
|
+
wsRef,
|
|
574
|
+
zoomCtlVisible,
|
|
235
575
|
} = useShellCore({});
|
|
576
|
+
// S3.5 — Present ⌄ › Order and notes… (`present.order-notes`): the sheet on the active canvas.
|
|
577
|
+
const [orderNotesOpen, setOrderNotesOpen] = useState(false);
|
|
236
578
|
|
|
237
579
|
// Issue #125 — "Selection area" needs every selected item, canvas elements
|
|
238
580
|
// AND annotations; the shell tracks only one, so ask the canvas. Resolves
|
|
@@ -251,7 +593,9 @@ function App() {
|
|
|
251
593
|
if (e.source !== cw) return;
|
|
252
594
|
const m = e.data;
|
|
253
595
|
if (!m || m.dgn !== 'export-selection' || m.id !== id) return;
|
|
254
|
-
done(
|
|
596
|
+
done(
|
|
597
|
+
Array.isArray(m.selectors) ? m.selectors.filter((x) => typeof x === 'string') : null
|
|
598
|
+
);
|
|
255
599
|
};
|
|
256
600
|
const timer = setTimeout(() => done(null), 1500);
|
|
257
601
|
function done(v) {
|
|
@@ -269,23 +613,88 @@ function App() {
|
|
|
269
613
|
[activePath]
|
|
270
614
|
);
|
|
271
615
|
const {
|
|
272
|
-
askText,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
616
|
+
askText,
|
|
617
|
+
broadcastChrome,
|
|
618
|
+
exitPresent,
|
|
619
|
+
lockedKeys,
|
|
620
|
+
onPhotoEdit,
|
|
621
|
+
onPhotoRecordEdit,
|
|
622
|
+
onPhotoRemoveBackground,
|
|
623
|
+
performPhotoUndo,
|
|
624
|
+
pushTlUndo,
|
|
625
|
+
resolveClipRef,
|
|
626
|
+
settleShellPrompt,
|
|
627
|
+
shellPromptState,
|
|
628
|
+
timelineAddComment,
|
|
629
|
+
timelineClipVerb,
|
|
630
|
+
timelineRemoveClip,
|
|
631
|
+
timelineTransClips,
|
|
632
|
+
tlKeyRef,
|
|
633
|
+
toggleAnnotations,
|
|
634
|
+
toggleLockedKey,
|
|
635
|
+
toggleMinimap,
|
|
636
|
+
togglePresent,
|
|
637
|
+
togglePrintGuides,
|
|
638
|
+
toggleSection,
|
|
639
|
+
toggleZoomCtl,
|
|
277
640
|
} = usePhotoAndTimeline({
|
|
278
|
-
groups,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
641
|
+
groups,
|
|
642
|
+
treeLoaded,
|
|
643
|
+
activePath,
|
|
644
|
+
selected,
|
|
645
|
+
theme,
|
|
646
|
+
setTheme,
|
|
647
|
+
sidebarOpen,
|
|
648
|
+
showHidden,
|
|
649
|
+
treeExp,
|
|
650
|
+
updateTreeExp,
|
|
651
|
+
panelSide,
|
|
652
|
+
setPanelSide,
|
|
653
|
+
layersMode,
|
|
654
|
+
setLayersMode,
|
|
655
|
+
timelineOpen,
|
|
656
|
+
activeComps,
|
|
657
|
+
setActiveComps,
|
|
658
|
+
timelineFrame,
|
|
659
|
+
setTimelineFrame,
|
|
660
|
+
timelinePlaying,
|
|
661
|
+
setTimelinePlaying,
|
|
662
|
+
timelineLoop,
|
|
663
|
+
timelineMuted,
|
|
664
|
+
canvasActiveArtboard,
|
|
665
|
+
timelineSequences,
|
|
666
|
+
setTimelineSequences,
|
|
667
|
+
setTimelineAudio,
|
|
668
|
+
setTimelineTransitions,
|
|
669
|
+
timelineTotal,
|
|
670
|
+
setTimelineTotal,
|
|
671
|
+
timelineArtboardId,
|
|
672
|
+
setTimelineArtboardId,
|
|
673
|
+
timelineArtboardIdRef,
|
|
674
|
+
timelineCompId,
|
|
675
|
+
timelineSelectedClip,
|
|
676
|
+
setTimelineSelectedClip,
|
|
677
|
+
timelineRefresh,
|
|
678
|
+
timelineOpFailed,
|
|
679
|
+
photoUndoRef,
|
|
680
|
+
setPhotoRev,
|
|
681
|
+
autoOpenInspector,
|
|
682
|
+
setAutoOpenInspector,
|
|
683
|
+
annotationsVisible,
|
|
684
|
+
setAnnotationsVisible,
|
|
685
|
+
uiPrefsHydrated,
|
|
686
|
+
setUiPrefsHydrated,
|
|
687
|
+
minimapVisible,
|
|
688
|
+
setMinimapVisible,
|
|
689
|
+
zoomCtlVisible,
|
|
690
|
+
setZoomCtlVisible,
|
|
691
|
+
setPresentMode,
|
|
692
|
+
setPrintGuidesVisible,
|
|
693
|
+
setActiveArtboards,
|
|
694
|
+
setGitUser,
|
|
695
|
+
iframesRef,
|
|
696
|
+
postToActiveCanvas,
|
|
697
|
+
wsSend,
|
|
289
698
|
});
|
|
290
699
|
const treeExpansion = useMemo(
|
|
291
700
|
() => ({
|
|
@@ -294,7 +703,15 @@ function App() {
|
|
|
294
703
|
}),
|
|
295
704
|
[treeExp.state, updateTreeExp]
|
|
296
705
|
);
|
|
297
|
-
const { loadSystemData, loadTree, toggleTheme } = useProjectData({
|
|
706
|
+
const { loadSystemData, loadTree, toggleTheme } = useProjectData({
|
|
707
|
+
setGroups,
|
|
708
|
+
setTreeLoaded,
|
|
709
|
+
setTreeLoadFailures,
|
|
710
|
+
setProject,
|
|
711
|
+
setSystemData,
|
|
712
|
+
setCfg,
|
|
713
|
+
setTheme,
|
|
714
|
+
});
|
|
298
715
|
|
|
299
716
|
// ----- Comments — initial load of all files -----
|
|
300
717
|
const loadAllComments = useCallback(async () => {
|
|
@@ -307,6 +724,10 @@ function App() {
|
|
|
307
724
|
}
|
|
308
725
|
}, []);
|
|
309
726
|
const { canvasListChangeRef } = useWebSocket({ loadAllComments });
|
|
727
|
+
// V2-2.4b — `maude design open` (ws `ui-open`, client/ui-open.js). The socket handler below is
|
|
728
|
+
// installed once, so it reads the tab opener + present toggle through this ref (assigned after
|
|
729
|
+
// useTabs), never through a captured closure.
|
|
730
|
+
const uiOpenRef = useRef(null);
|
|
310
731
|
useEffect(() => {
|
|
311
732
|
// KEEPALIVE. The inspector feed only pushes on events (a comment, a
|
|
312
733
|
// selection, sync:status), so an idle designer's socket exchanges nothing
|
|
@@ -432,6 +853,47 @@ function App() {
|
|
|
432
853
|
// surface the native ACP chat sidepanel. Native-only (the panel
|
|
433
854
|
// doesn't exist on the web surface).
|
|
434
855
|
if (isNativeApp()) openRightPanel('assistant');
|
|
856
|
+
} else if (m.type === 'thumb-ready' && typeof m.key === 'string') {
|
|
857
|
+
// S1.14 — a picture landed: Version history looks again for the rows still drawing theirs.
|
|
858
|
+
window.dispatchEvent(new CustomEvent('maude:thumb-ready', { detail: { key: m.key } }));
|
|
859
|
+
} else if (m.type === 'index-changed') {
|
|
860
|
+
// S1.23 — a canvas's content moved (an artboard trashed or added): the Canvases panel re-reads
|
|
861
|
+
// the index so its artboard counts are not stale.
|
|
862
|
+
window.dispatchEvent(
|
|
863
|
+
new CustomEvent('maude:index-changed', { detail: { seq: m.seq, rels: m.rels } })
|
|
864
|
+
);
|
|
865
|
+
} else if (m.type === 'ai:runs') {
|
|
866
|
+
// S5.11 (V2-1.15 §5.4) — the run registry moved: the shell's run store re-reads it.
|
|
867
|
+
// S5.13's needs-you store hears the same window event (`maude:ai-runs`): one dispatch.
|
|
868
|
+
noteAiRuns(m.seq);
|
|
869
|
+
} else if (m.type === 'save-hold') {
|
|
870
|
+
// p8-a1-save-hold — a save waits behind an AI call / landed: the notice (and the close flush)
|
|
871
|
+
noteSaveHold(m);
|
|
872
|
+
} else if (m.type === 'project:action' && m.action) {
|
|
873
|
+
// S2.20 — an accepted action: the ⌘Z projection of every open canvas it touched.
|
|
874
|
+
// S5.15 — "Made by AI" (derived: an ai action marks its artboards, the next person's
|
|
875
|
+
// change clears them); it replaces S5.11's 6 s Done ring, which lit every action's.
|
|
876
|
+
undoProjection.onAction(m.action);
|
|
877
|
+
noteMadeByAi(m.action);
|
|
878
|
+
// Version history looks again (a local project has no applied revision to key a re-read on).
|
|
879
|
+
window.dispatchEvent(new CustomEvent('maude:project-action', { detail: m.action }));
|
|
880
|
+
} else if (m.type === 'trash:changed') {
|
|
881
|
+
// S1.7b — the shared Trash moved: the Trash view re-reads `GET /_api/trash`.
|
|
882
|
+
window.dispatchEvent(new CustomEvent(TRASH_CHANGED_EVENT, { detail: m.payload }));
|
|
883
|
+
} else if (m.type === 'access-changed') {
|
|
884
|
+
// p8-e2e-rolefix (2) — hubs.json changed (desktop): Viewing / editing follows the new claim.
|
|
885
|
+
loadServerConfig();
|
|
886
|
+
} else if (m.type === 'access' || m.type === 'access-request') {
|
|
887
|
+
// S9.21b — the hub's access notices (ws.ts: desktop shells only). The access host says them;
|
|
888
|
+
// a raised / narrowed role re-reads /_config (the server re-exchanged first), so the toolbar
|
|
889
|
+
// follows the new role.
|
|
890
|
+
if (m.type === 'access' && (m.change === 'raised' || m.change === 'narrowed'))
|
|
891
|
+
loadServerConfig();
|
|
892
|
+
window.dispatchEvent(new CustomEvent(ACCESS_FRAME_EVENT, { detail: m }));
|
|
893
|
+
} else if (m.type === 'ui-open') {
|
|
894
|
+
// V2-2.4b (contract V2-1.11 §5.3) — `maude design open <canvas>[#ab][@el]`: open the
|
|
895
|
+
// tab, then run the same registry actions the UI runs (zoom / select / present).
|
|
896
|
+
if (uiOpenRef.current) applyUiOpen(m.open, uiOpenRef.current);
|
|
435
897
|
} else if (m.type === 'git-status' && m.payload) {
|
|
436
898
|
// Phase 27 (E2) Task 5 — live dirty-state. Updates the Changes-panel
|
|
437
899
|
// count + tree M/A/D badges reactively, no polling.
|
|
@@ -494,12 +956,31 @@ function App() {
|
|
|
494
956
|
};
|
|
495
957
|
}, []);
|
|
496
958
|
const {
|
|
497
|
-
acceptedDiff,
|
|
498
|
-
|
|
499
|
-
|
|
959
|
+
acceptedDiff,
|
|
960
|
+
cloudHistory,
|
|
961
|
+
dirtyByPath,
|
|
962
|
+
gitCommit,
|
|
963
|
+
gitDiscard,
|
|
964
|
+
gitGetLatest,
|
|
965
|
+
gitLoadCloudLog,
|
|
966
|
+
gitLoadLog,
|
|
967
|
+
gitPublish,
|
|
968
|
+
gitResolveConflict,
|
|
969
|
+
loadAcceptedLog,
|
|
970
|
+
loadDiffLog,
|
|
971
|
+
projectHistoryOn,
|
|
972
|
+
projectHistoryRefresh,
|
|
973
|
+
refreshRemoteSync,
|
|
974
|
+
restoreProjectVersion,
|
|
975
|
+
setProjectHistoryOn,
|
|
500
976
|
} = useGitActions({
|
|
501
|
-
gitStatus,
|
|
502
|
-
|
|
977
|
+
gitStatus,
|
|
978
|
+
setGitStatus,
|
|
979
|
+
setRemoteSync,
|
|
980
|
+
diffTarget,
|
|
981
|
+
setDiffTarget,
|
|
982
|
+
savingIsManaged,
|
|
983
|
+
savingIsManagedRef,
|
|
503
984
|
});
|
|
504
985
|
|
|
505
986
|
// Phase 28 (E3) — keep remote ahead/behind fresh so the "Get latest" nudge
|
|
@@ -525,59 +1006,191 @@ function App() {
|
|
|
525
1006
|
return () => clearInterval(id);
|
|
526
1007
|
}, [savingIsManaged, gitStatus?.repo, changesOpen, refreshRemoteSync]);
|
|
527
1008
|
const {
|
|
528
|
-
assembleVideo,
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
1009
|
+
assembleVideo,
|
|
1010
|
+
clearSelected,
|
|
1011
|
+
closeTab,
|
|
1012
|
+
createBoard,
|
|
1013
|
+
createVideo,
|
|
1014
|
+
deleteBoard,
|
|
1015
|
+
deleteFileReq,
|
|
1016
|
+
deleteFolderReq,
|
|
1017
|
+
duplicateCanvasReq,
|
|
1018
|
+
moveCanvasReq,
|
|
1019
|
+
newFolderReq,
|
|
1020
|
+
openLinkedFile,
|
|
1021
|
+
openSystem,
|
|
1022
|
+
openTab,
|
|
1023
|
+
refreshTree,
|
|
1024
|
+
reloadActive,
|
|
1025
|
+
renameCanvasReq,
|
|
1026
|
+
renameFolderReq,
|
|
1027
|
+
replaceMediaViaPicker,
|
|
1028
|
+
retryCanvasLoad,
|
|
1029
|
+
shareLinksFor,
|
|
1030
|
+
sharePath,
|
|
1031
|
+
shareShell,
|
|
1032
|
+
showShare,
|
|
1033
|
+
treeRefreshing,
|
|
532
1034
|
} = useTabs({
|
|
533
|
-
groups,
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
1035
|
+
groups,
|
|
1036
|
+
treeLoaded,
|
|
1037
|
+
addressMode,
|
|
1038
|
+
previousAddressPath,
|
|
1039
|
+
project,
|
|
1040
|
+
tabs,
|
|
1041
|
+
setTabs,
|
|
1042
|
+
activePath,
|
|
1043
|
+
setActivePath,
|
|
1044
|
+
previewPath,
|
|
1045
|
+
setPreviewPath,
|
|
1046
|
+
onPreview,
|
|
1047
|
+
setSelected,
|
|
1048
|
+
cloudLinkedHub,
|
|
1049
|
+
localProjectName,
|
|
1050
|
+
systemData,
|
|
1051
|
+
setLoadingPath,
|
|
1052
|
+
setCanvasError,
|
|
1053
|
+
setCanvasReloadNonce,
|
|
1054
|
+
setLoadedPath,
|
|
1055
|
+
cfg,
|
|
1056
|
+
loadServerConfig,
|
|
1057
|
+
setFocusedCommentId,
|
|
1058
|
+
updateTreeExp,
|
|
1059
|
+
setShareDialog,
|
|
1060
|
+
setTimelineOpen,
|
|
1061
|
+
timelineArtboardId,
|
|
1062
|
+
iframesRef,
|
|
1063
|
+
pushTlUndo,
|
|
1064
|
+
askText,
|
|
1065
|
+
loadTree,
|
|
1066
|
+
loadSystemData,
|
|
1067
|
+
canvasListChangeRef,
|
|
1068
|
+
wsSend,
|
|
539
1069
|
});
|
|
1070
|
+
uiOpenRef.current = {
|
|
1071
|
+
openTab,
|
|
1072
|
+
runAction: (id) => menuRunner.run(id),
|
|
1073
|
+
frameFor: (f) => iframesRef.current.get(f),
|
|
1074
|
+
setPresent: (on) => {
|
|
1075
|
+
setPresentMode(on);
|
|
1076
|
+
broadcastChrome({ present: on });
|
|
1077
|
+
},
|
|
1078
|
+
};
|
|
540
1079
|
|
|
541
1080
|
// ----- Push comments to iframe whenever they change for active file -----
|
|
542
1081
|
// Presentation Mode hides comment pins: post an empty list while present
|
|
543
1082
|
// (re-posting the real list on exit, since this effect re-runs on the flag).
|
|
1083
|
+
// Round 11 (10 co-sync-offline): the comments the outbox still holds while offline carry `queued`.
|
|
1084
|
+
const commentsOnCanvas = useQueuedMarkedByFile(commentsByFile);
|
|
544
1085
|
useEffect(() => {
|
|
545
1086
|
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
546
1087
|
const el = iframesRef.current.get(activePath);
|
|
547
1088
|
if (!el || !el.contentWindow) return;
|
|
548
|
-
|
|
1089
|
+
// which are yours, said here: the canvas origin is never told this Mac's account name (rc.1 F08)
|
|
1090
|
+
const list = presentMode ? [] : markMine(commentsOnCanvas[activePath] || [], gitUser);
|
|
549
1091
|
try {
|
|
550
1092
|
el.contentWindow.postMessage({ dgn: 'comments-set', comments: list }, '*');
|
|
551
1093
|
} catch {}
|
|
552
|
-
}, [activePath,
|
|
1094
|
+
}, [activePath, commentsOnCanvas, presentMode, gitUser]);
|
|
553
1095
|
const {
|
|
554
|
-
applyOptimisticStyle,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
1096
|
+
applyOptimisticStyle,
|
|
1097
|
+
assetPickerReq,
|
|
1098
|
+
clearActiveCanvasSelection,
|
|
1099
|
+
deleteArtboardShell,
|
|
1100
|
+
deleteComment,
|
|
1101
|
+
detachInstanceShell,
|
|
1102
|
+
duplicateArtboardShell,
|
|
1103
|
+
insertGeneratedImage,
|
|
1104
|
+
onAssetPicked,
|
|
1105
|
+
onInsertArtboard,
|
|
1106
|
+
onPickMany,
|
|
1107
|
+
onReplaceMedia,
|
|
1108
|
+
onStickerPicked,
|
|
1109
|
+
recordSourceEdit,
|
|
1110
|
+
reopenComment,
|
|
1111
|
+
reorderLayer,
|
|
1112
|
+
resizeArtboardShell,
|
|
1113
|
+
resolveComment,
|
|
1114
|
+
setArtboardHugShell,
|
|
1115
|
+
setArtboardKindShell,
|
|
1116
|
+
setArtboardPrintShell,
|
|
1117
|
+
setArtboardStyleShell,
|
|
1118
|
+
setAssetPickerReq,
|
|
1119
|
+
setStickerPickerReq,
|
|
1120
|
+
stickerPickerReq,
|
|
560
1121
|
} = useCanvasBridge({
|
|
561
|
-
activePath,
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
1122
|
+
activePath,
|
|
1123
|
+
selected,
|
|
1124
|
+
setSelected,
|
|
1125
|
+
selectedRef,
|
|
1126
|
+
lastLocalSelectRef,
|
|
1127
|
+
scheduleHaloRestore,
|
|
1128
|
+
scheduleArtboardResync,
|
|
1129
|
+
pendingReorderRef,
|
|
1130
|
+
lastLayersTreeRef,
|
|
1131
|
+
settlePendingSelectionRef,
|
|
1132
|
+
reorderLayerRef,
|
|
1133
|
+
repositionElementRef,
|
|
1134
|
+
resizeElementRef,
|
|
1135
|
+
layersBusyRef,
|
|
1136
|
+
layersBusyTimerRef,
|
|
1137
|
+
layersTree,
|
|
1138
|
+
setLayersTree,
|
|
1139
|
+
setLoadingPath,
|
|
1140
|
+
setCanvasError,
|
|
1141
|
+
setLoadedPath,
|
|
1142
|
+
cfg,
|
|
1143
|
+
viewerMode,
|
|
1144
|
+
commentsByFile: commentsOnCanvas,
|
|
1145
|
+
focusedCommentId,
|
|
1146
|
+
setFocusedCommentId,
|
|
1147
|
+
theme,
|
|
1148
|
+
setPaletteOpen,
|
|
1149
|
+
setExportDialog,
|
|
1150
|
+
setSettingsOpen,
|
|
1151
|
+
setShortcutsOpen,
|
|
1152
|
+
setTimelineOpen,
|
|
1153
|
+
setActiveComps,
|
|
1154
|
+
setTimelineFrame,
|
|
1155
|
+
setTimelinePlaying,
|
|
1156
|
+
canvasActiveArtboard,
|
|
1157
|
+
setCanvasActiveArtboard,
|
|
1158
|
+
timelineFrameRef,
|
|
1159
|
+
timelineCompIdRef,
|
|
1160
|
+
setInspectorTab,
|
|
1161
|
+
setPhotoSel,
|
|
1162
|
+
openRightPanel,
|
|
1163
|
+
toggleRightPanel,
|
|
1164
|
+
maybeAutoOpenInspectorOnSelect,
|
|
1165
|
+
toggleTimeline,
|
|
1166
|
+
minimapVisible,
|
|
1167
|
+
zoomCtlVisible,
|
|
1168
|
+
presentMode,
|
|
1169
|
+
setPresentMode,
|
|
1170
|
+
setActiveArtboards,
|
|
1171
|
+
iframesRef,
|
|
1172
|
+
postToActiveCanvas,
|
|
1173
|
+
captureFromCanvas,
|
|
1174
|
+
broadcastChrome,
|
|
1175
|
+
wsSend,
|
|
1176
|
+
reloadActive,
|
|
1177
|
+
gitUser,
|
|
571
1178
|
});
|
|
1179
|
+
// S10.4 — a design system's revision per canvas frame: element pins answered into the frame that asked,
|
|
1180
|
+
// and the follower swap (a head that moved is applied at the NEXT LOOK; Present holds it).
|
|
1181
|
+
useDsFrames({ cfg, iframesRef, activePath, presentMode, canvasActiveArtboard });
|
|
572
1182
|
|
|
573
1183
|
// Jump from right-sidebar list to a comment: open file tab if needed, focus pin.
|
|
574
1184
|
// The iframe may be freshly mounted; the loaded handler also re-sends focus if focusedCommentId matches.
|
|
575
1185
|
const jumpToComment = useCallback(
|
|
576
|
-
(file, id) => {
|
|
1186
|
+
(file, id, opts) => {
|
|
577
1187
|
if (file && file !== activePath) {
|
|
578
1188
|
setTabs((prev) => (prev.find((t) => t.path === file) ? prev : [...prev, { path: file }]));
|
|
579
1189
|
setActivePath(file);
|
|
580
1190
|
}
|
|
1191
|
+
// S6.11b — a thread landing asks for the reply field (v2/comments/reply-focus.js)
|
|
1192
|
+
const reply = opts?.reply === true && id != null;
|
|
1193
|
+
wantReplyFocus(reply ? id : null);
|
|
581
1194
|
if (id == null) {
|
|
582
1195
|
setFocusedCommentId(null);
|
|
583
1196
|
return;
|
|
@@ -588,7 +1201,7 @@ function App() {
|
|
|
588
1201
|
const el = iframesRef.current.get(file);
|
|
589
1202
|
if (el && el.contentWindow) {
|
|
590
1203
|
try {
|
|
591
|
-
el.contentWindow.postMessage(
|
|
1204
|
+
el.contentWindow.postMessage(commentFocusMessage(id, reply), '*');
|
|
592
1205
|
} catch {}
|
|
593
1206
|
}
|
|
594
1207
|
};
|
|
@@ -597,39 +1210,1922 @@ function App() {
|
|
|
597
1210
|
},
|
|
598
1211
|
[activePath]
|
|
599
1212
|
);
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
1213
|
+
// V2-2.4 — the shell's one key listener (action registry); replaces the global
|
|
1214
|
+
// shortcuts, the timeline transport and the ⌫ guard.
|
|
1215
|
+
const { onShellContextMenu, registerIframe, totalOpen } = useActionKeys({
|
|
1216
|
+
activePath,
|
|
1217
|
+
selected,
|
|
1218
|
+
viewerMode,
|
|
1219
|
+
commentsByFile,
|
|
1220
|
+
focusedCommentId,
|
|
1221
|
+
setFocusedCommentId,
|
|
1222
|
+
sidebarOpen,
|
|
1223
|
+
setShowHidden,
|
|
1224
|
+
setHelpOpen,
|
|
1225
|
+
setShortcutsOpen,
|
|
1226
|
+
setPaletteOpen,
|
|
1227
|
+
setExportDialog,
|
|
1228
|
+
setSettingsOpen,
|
|
1229
|
+
inspectorTab,
|
|
1230
|
+
openPanelExclusive,
|
|
1231
|
+
togglePanel,
|
|
1232
|
+
toggleRightPanel,
|
|
1233
|
+
toggleTimeline,
|
|
1234
|
+
presentMode,
|
|
1235
|
+
iframesRef,
|
|
1236
|
+
postToActiveCanvas,
|
|
1237
|
+
performPhotoUndo,
|
|
1238
|
+
tlKeyRef,
|
|
1239
|
+
exitPresent,
|
|
1240
|
+
openSystem,
|
|
1241
|
+
closeTab,
|
|
1242
|
+
reloadActive,
|
|
1243
|
+
refreshTree,
|
|
1244
|
+
clearActiveCanvasSelection,
|
|
1245
|
+
deleteArtboardShell,
|
|
1246
|
+
setTimelineFrame,
|
|
1247
|
+
setTimelinePlaying,
|
|
606
1248
|
});
|
|
607
1249
|
const {
|
|
608
|
-
activeCanvasFile,
|
|
609
|
-
|
|
1250
|
+
activeCanvasFile,
|
|
1251
|
+
activeOpenComments,
|
|
1252
|
+
dockLabels,
|
|
1253
|
+
leftActive,
|
|
1254
|
+
leftHostsAssistant,
|
|
1255
|
+
leftIds,
|
|
1256
|
+
paletteActions,
|
|
1257
|
+
renderPanelBody,
|
|
1258
|
+
resizingFor,
|
|
1259
|
+
rightActive,
|
|
1260
|
+
rightHostsAssistant,
|
|
1261
|
+
rightIds,
|
|
610
1262
|
} = usePaletteAndPanels({
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
1263
|
+
activeArtboards,
|
|
1264
|
+
groups,
|
|
1265
|
+
treeLoaded,
|
|
1266
|
+
treeLoadFailures,
|
|
1267
|
+
project,
|
|
1268
|
+
activePath,
|
|
1269
|
+
previewPath,
|
|
1270
|
+
onPreview,
|
|
1271
|
+
selected,
|
|
1272
|
+
editScope,
|
|
1273
|
+
layersBusyRef,
|
|
1274
|
+
layersTree,
|
|
1275
|
+
componentMap,
|
|
1276
|
+
wsConnected,
|
|
1277
|
+
syncStatus,
|
|
1278
|
+
cloudLinkedHub,
|
|
1279
|
+
setCloudLinkedHub,
|
|
1280
|
+
localProjectName,
|
|
1281
|
+
setLocalProjectName,
|
|
1282
|
+
gitStatus,
|
|
1283
|
+
remoteSync,
|
|
1284
|
+
changesOpen,
|
|
1285
|
+
setChangesOpen,
|
|
1286
|
+
syncPanelOpen,
|
|
1287
|
+
setSyncPanelOpen,
|
|
1288
|
+
setDiffTarget,
|
|
1289
|
+
search,
|
|
1290
|
+
setSearch,
|
|
1291
|
+
systemData,
|
|
1292
|
+
dragSide,
|
|
1293
|
+
cfg,
|
|
1294
|
+
cellManaged,
|
|
1295
|
+
cloudManaged,
|
|
1296
|
+
savingIsManaged,
|
|
1297
|
+
viewerMode,
|
|
1298
|
+
commentsByFile,
|
|
1299
|
+
focusedCommentId,
|
|
1300
|
+
commentsPanelOpen,
|
|
1301
|
+
commentsFilter,
|
|
1302
|
+
setCommentsFilter,
|
|
1303
|
+
sidebarOpen,
|
|
1304
|
+
showHidden,
|
|
1305
|
+
treeExp,
|
|
1306
|
+
sectionsExpanded,
|
|
1307
|
+
setHelpOpen,
|
|
1308
|
+
setReportBugOpen,
|
|
1309
|
+
setShortcutsOpen,
|
|
1310
|
+
setExportDialog,
|
|
1311
|
+
setSettingsOpen,
|
|
1312
|
+
setGenerateOpen,
|
|
1313
|
+
inspectorOpen,
|
|
1314
|
+
setInspectorOpen,
|
|
1315
|
+
layersOpen,
|
|
1316
|
+
setLayersOpen,
|
|
1317
|
+
assetsOpen,
|
|
1318
|
+
panelSide,
|
|
1319
|
+
layersMode,
|
|
1320
|
+
assistantOpen,
|
|
1321
|
+
inspectorTab,
|
|
1322
|
+
setInspectorTab,
|
|
1323
|
+
photoSel,
|
|
1324
|
+
photoRev,
|
|
1325
|
+
openPanelExclusive,
|
|
1326
|
+
togglePanel,
|
|
1327
|
+
openRightPanel,
|
|
1328
|
+
toggleRightPanel,
|
|
1329
|
+
whatsNew,
|
|
1330
|
+
postToActiveCanvas,
|
|
1331
|
+
onPhotoEdit,
|
|
1332
|
+
onPhotoRecordEdit,
|
|
1333
|
+
performPhotoUndo,
|
|
1334
|
+
onPhotoRemoveBackground,
|
|
1335
|
+
lockedKeys,
|
|
1336
|
+
toggleLockedKey,
|
|
1337
|
+
toggleSection,
|
|
1338
|
+
treeExpansion,
|
|
1339
|
+
toggleTheme,
|
|
1340
|
+
gitCommit,
|
|
1341
|
+
gitDiscard,
|
|
1342
|
+
gitPublish,
|
|
1343
|
+
gitGetLatest,
|
|
1344
|
+
gitLoadLog,
|
|
1345
|
+
cloudHistory,
|
|
1346
|
+
gitLoadCloudLog,
|
|
1347
|
+
projectHistoryOn,
|
|
1348
|
+
setProjectHistoryOn,
|
|
1349
|
+
projectHistoryRefresh,
|
|
1350
|
+
loadAcceptedLog,
|
|
1351
|
+
restoreProjectVersion,
|
|
1352
|
+
dirtyByPath,
|
|
1353
|
+
openTab,
|
|
1354
|
+
openLinkedFile,
|
|
1355
|
+
sharePath,
|
|
1356
|
+
shareShell,
|
|
1357
|
+
shareLinksFor,
|
|
1358
|
+
showShare,
|
|
1359
|
+
openSystem,
|
|
1360
|
+
reloadActive,
|
|
1361
|
+
treeRefreshing,
|
|
1362
|
+
refreshTree,
|
|
1363
|
+
createBoard,
|
|
1364
|
+
createVideo,
|
|
1365
|
+
deleteBoard,
|
|
1366
|
+
moveCanvasReq,
|
|
1367
|
+
newFolderReq,
|
|
1368
|
+
deleteFolderReq,
|
|
1369
|
+
renameFolderReq,
|
|
1370
|
+
renameCanvasReq,
|
|
1371
|
+
duplicateCanvasReq,
|
|
1372
|
+
deleteFileReq,
|
|
1373
|
+
applyOptimisticStyle,
|
|
1374
|
+
recordSourceEdit,
|
|
1375
|
+
reorderLayer,
|
|
1376
|
+
detachInstanceShell,
|
|
1377
|
+
resizeArtboardShell,
|
|
1378
|
+
duplicateArtboardShell,
|
|
1379
|
+
setArtboardHugShell,
|
|
1380
|
+
setArtboardStyleShell,
|
|
1381
|
+
setArtboardKindShell,
|
|
1382
|
+
setArtboardPrintShell,
|
|
1383
|
+
onReplaceMedia,
|
|
1384
|
+
resolveComment,
|
|
1385
|
+
reopenComment,
|
|
1386
|
+
deleteComment,
|
|
1387
|
+
jumpToComment,
|
|
1388
|
+
gitUser,
|
|
1389
|
+
});
|
|
1390
|
+
// S9.22b — unread mentions (Share cluster count + toast), the comments.* runners, timeline flags.
|
|
1391
|
+
const comments = useCommentsShell({
|
|
1392
|
+
commentsByFile,
|
|
1393
|
+
me: gitUser,
|
|
1394
|
+
activePath,
|
|
1395
|
+
jumpToComment,
|
|
1396
|
+
setCommentsFilter,
|
|
1397
|
+
openRightPanel,
|
|
1398
|
+
});
|
|
1399
|
+
// V2-2.3: everything the render tree reads, grouped by the module seam it comes from.
|
|
1400
|
+
const shellStore = {
|
|
1401
|
+
comments,
|
|
1402
|
+
shellCore: {
|
|
1403
|
+
activeArtboards,
|
|
1404
|
+
activeComps,
|
|
1405
|
+
activePath,
|
|
1406
|
+
agentActive,
|
|
1407
|
+
annotationsVisible,
|
|
1408
|
+
assistantBusy,
|
|
1409
|
+
assistantOpen,
|
|
1410
|
+
assistantUnseen,
|
|
1411
|
+
autoOpenInspector,
|
|
1412
|
+
bodyRef,
|
|
1413
|
+
iframesRef,
|
|
1414
|
+
brandUploadOpen,
|
|
1415
|
+
canvasActiveArtboard,
|
|
1416
|
+
canvasError,
|
|
1417
|
+
canvasReloadNonce,
|
|
1418
|
+
captureFromCanvas,
|
|
1419
|
+
cfg,
|
|
1420
|
+
changesOpen,
|
|
1421
|
+
collabNudge,
|
|
1422
|
+
commentsByFile,
|
|
1423
|
+
commentsPanelOpen,
|
|
1424
|
+
cpMode,
|
|
1425
|
+
diffTarget,
|
|
1426
|
+
dragSide,
|
|
1427
|
+
exportCenter,
|
|
1428
|
+
exportDialog,
|
|
1429
|
+
figmaImportOpen,
|
|
1430
|
+
generateOpen,
|
|
1431
|
+
gitLifecycle,
|
|
1432
|
+
gitStatus,
|
|
1433
|
+
gitUser,
|
|
1434
|
+
// S6.2's viewport slot (v2/create/empty-project.jsx EmptyProjectSlot) reads these three
|
|
1435
|
+
groups,
|
|
1436
|
+
handleAssistantAttention,
|
|
1437
|
+
handleAssistantFinished,
|
|
1438
|
+
helpOpen,
|
|
1439
|
+
inspectorOpen,
|
|
1440
|
+
inspectorTab,
|
|
1441
|
+
introOpen,
|
|
1442
|
+
layersMode,
|
|
1443
|
+
loadedPath,
|
|
1444
|
+
loadingPath,
|
|
1445
|
+
markCollabSeen,
|
|
1446
|
+
markUsageSeen,
|
|
1447
|
+
minimapVisible,
|
|
1448
|
+
onIframeLoad,
|
|
1449
|
+
openMenu,
|
|
1450
|
+
openPanelExclusive,
|
|
1451
|
+
openRightPanel,
|
|
1452
|
+
paletteOpen,
|
|
1453
|
+
panelSide,
|
|
1454
|
+
postToActiveCanvas,
|
|
1455
|
+
presentMode,
|
|
1456
|
+
previewPath,
|
|
1457
|
+
printGuidesVisible,
|
|
1458
|
+
project,
|
|
1459
|
+
quickSetupOpen,
|
|
1460
|
+
readinessOpen,
|
|
1461
|
+
reportBugOpen,
|
|
1462
|
+
rpSize,
|
|
1463
|
+
savingIsManaged,
|
|
1464
|
+
sbSize,
|
|
1465
|
+
selected,
|
|
1466
|
+
setAssistantBusy,
|
|
1467
|
+
setAssistantOpen,
|
|
1468
|
+
setAutoOpenInspector,
|
|
1469
|
+
setBrandUploadOpen,
|
|
1470
|
+
setCpMode,
|
|
1471
|
+
setDiffTarget,
|
|
1472
|
+
setDragSide,
|
|
1473
|
+
setExportDialog,
|
|
1474
|
+
setFigmaImportOpen,
|
|
1475
|
+
setGenerateOpen,
|
|
1476
|
+
setGitLifecycle,
|
|
1477
|
+
setHelpOpen,
|
|
1478
|
+
setInspectorOpen,
|
|
1479
|
+
setInspectorTab,
|
|
1480
|
+
setIntroOpen,
|
|
1481
|
+
setLayersMode,
|
|
1482
|
+
setLayersOpen,
|
|
1483
|
+
setOpenMenu,
|
|
1484
|
+
setPaletteOpen,
|
|
1485
|
+
setPanelSide,
|
|
1486
|
+
setQuickSetupOpen,
|
|
1487
|
+
setReadinessOpen,
|
|
1488
|
+
setReportBugOpen,
|
|
1489
|
+
setSettingsOpen,
|
|
1490
|
+
setShareDialog,
|
|
1491
|
+
setShortcutsOpen,
|
|
1492
|
+
setCanvasActiveArtboard,
|
|
1493
|
+
setOrderNotesOpen,
|
|
1494
|
+
setShowHidden,
|
|
1495
|
+
setTheme,
|
|
1496
|
+
setTimelineFrame,
|
|
1497
|
+
setTimelineHeight,
|
|
1498
|
+
setTimelineLoop,
|
|
1499
|
+
setTimelineMuted,
|
|
1500
|
+
setTimelineOpen,
|
|
1501
|
+
setTimelinePlaying,
|
|
1502
|
+
setTimelineSelectedClip,
|
|
1503
|
+
setTimelineVolume,
|
|
1504
|
+
setTourSteps,
|
|
1505
|
+
setUpdateReady,
|
|
1506
|
+
settingsOpen,
|
|
1507
|
+
setupReadiness,
|
|
1508
|
+
shareDialog,
|
|
1509
|
+
shortcutsOpen,
|
|
1510
|
+
orderNotesOpen,
|
|
1511
|
+
showHidden,
|
|
1512
|
+
sidebarOpen,
|
|
1513
|
+
startTour,
|
|
1514
|
+
syncPanelOpen,
|
|
1515
|
+
syncStatus,
|
|
1516
|
+
systemData,
|
|
1517
|
+
tabs,
|
|
1518
|
+
theme,
|
|
1519
|
+
timelineArtboardId,
|
|
1520
|
+
timelineAudio,
|
|
1521
|
+
timelineCompId,
|
|
1522
|
+
timelineFps,
|
|
1523
|
+
timelineFrame,
|
|
1524
|
+
timelineHeight,
|
|
1525
|
+
timelineLoop,
|
|
1526
|
+
timelineMuted,
|
|
1527
|
+
timelineOpFailed,
|
|
1528
|
+
timelineOpen,
|
|
1529
|
+
timelinePlaying,
|
|
1530
|
+
timelineSelectedClip,
|
|
1531
|
+
timelineSequences,
|
|
1532
|
+
timelineTotal,
|
|
1533
|
+
timelineTransitions,
|
|
1534
|
+
timelineVolume,
|
|
1535
|
+
togglePanel,
|
|
1536
|
+
toggleRightPanel,
|
|
1537
|
+
toggleTimeline,
|
|
1538
|
+
tourBus,
|
|
1539
|
+
tourSteps,
|
|
1540
|
+
treeLoadFailures,
|
|
1541
|
+
treeLoaded,
|
|
1542
|
+
unsavedCount,
|
|
1543
|
+
updateReady,
|
|
1544
|
+
usageNudge,
|
|
1545
|
+
viewerMode,
|
|
1546
|
+
whatsNew,
|
|
1547
|
+
wsConnected,
|
|
1548
|
+
zoomCtlVisible,
|
|
1549
|
+
},
|
|
1550
|
+
local: {
|
|
1551
|
+
querySelectionFromCanvas,
|
|
1552
|
+
wsSend,
|
|
1553
|
+
},
|
|
1554
|
+
photoAndTimeline: {
|
|
1555
|
+
askText,
|
|
1556
|
+
exitPresent,
|
|
1557
|
+
pushTlUndo,
|
|
1558
|
+
resolveClipRef,
|
|
1559
|
+
settleShellPrompt,
|
|
1560
|
+
shellPromptState,
|
|
1561
|
+
timelineAddComment,
|
|
1562
|
+
timelineClipVerb,
|
|
1563
|
+
timelineRemoveClip,
|
|
1564
|
+
timelineTransClips,
|
|
1565
|
+
tlKeyRef,
|
|
1566
|
+
toggleAnnotations,
|
|
1567
|
+
toggleMinimap,
|
|
1568
|
+
togglePresent,
|
|
1569
|
+
togglePrintGuides,
|
|
1570
|
+
toggleZoomCtl,
|
|
1571
|
+
},
|
|
1572
|
+
projectData: {
|
|
1573
|
+
loadSystemData,
|
|
1574
|
+
loadTree,
|
|
1575
|
+
toggleTheme,
|
|
1576
|
+
},
|
|
1577
|
+
gitActions: {
|
|
1578
|
+
acceptedDiff,
|
|
1579
|
+
gitDiscard,
|
|
1580
|
+
gitGetLatest,
|
|
1581
|
+
gitResolveConflict,
|
|
1582
|
+
loadDiffLog,
|
|
1583
|
+
restoreProjectVersion,
|
|
1584
|
+
},
|
|
1585
|
+
tabs: {
|
|
1586
|
+
assembleVideo,
|
|
1587
|
+
clearSelected,
|
|
1588
|
+
closeTab,
|
|
1589
|
+
createBoard,
|
|
1590
|
+
duplicateCanvasReq,
|
|
1591
|
+
moveCanvasReq,
|
|
1592
|
+
openSystem,
|
|
1593
|
+
openTab,
|
|
1594
|
+
reloadActive,
|
|
1595
|
+
renameCanvasReq,
|
|
1596
|
+
replaceMediaViaPicker,
|
|
1597
|
+
retryCanvasLoad,
|
|
1598
|
+
shareLinksFor,
|
|
1599
|
+
sharePath,
|
|
1600
|
+
shareShell,
|
|
1601
|
+
showShare,
|
|
1602
|
+
},
|
|
1603
|
+
canvasBridge: {
|
|
1604
|
+
assetPickerReq,
|
|
1605
|
+
insertGeneratedImage,
|
|
1606
|
+
onAssetPicked,
|
|
1607
|
+
onInsertArtboard,
|
|
1608
|
+
onPickMany,
|
|
1609
|
+
onStickerPicked,
|
|
1610
|
+
setAssetPickerReq,
|
|
1611
|
+
setStickerPickerReq,
|
|
1612
|
+
stickerPickerReq,
|
|
1613
|
+
},
|
|
1614
|
+
keyboardShortcuts: {
|
|
1615
|
+
onShellContextMenu,
|
|
1616
|
+
registerIframe,
|
|
1617
|
+
totalOpen,
|
|
1618
|
+
},
|
|
1619
|
+
paletteAndPanels: {
|
|
1620
|
+
activeCanvasFile,
|
|
1621
|
+
activeOpenComments,
|
|
1622
|
+
dockLabels,
|
|
1623
|
+
leftActive,
|
|
1624
|
+
leftHostsAssistant,
|
|
1625
|
+
leftIds,
|
|
1626
|
+
paletteActions,
|
|
1627
|
+
renderPanelBody,
|
|
1628
|
+
resizingFor,
|
|
1629
|
+
rightActive,
|
|
1630
|
+
rightHostsAssistant,
|
|
1631
|
+
rightIds,
|
|
1632
|
+
},
|
|
1633
|
+
};
|
|
1634
|
+
return <ShellStoreContext.Provider value={shellStore}>{children}</ShellStoreContext.Provider>;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
// V2-4.2: the project pill and the one menu. Every row runs the shell's own function for that action
|
|
1638
|
+
// (v2/shell/menu-runner.js) — this component hands the runner this render's closures (through a ref, so
|
|
1639
|
+
// the handler map is built once), binds it (⌘K's twin rows call the same runner) and renders
|
|
1640
|
+
// PROJECT_MENU through the registry.
|
|
1641
|
+
function ShellProjectPill() {
|
|
1642
|
+
// P8 C4: the pill is the project switcher (a "Switch project" submenu in the desktop app).
|
|
1643
|
+
const switcher = useProjectSwitcher();
|
|
1644
|
+
const {
|
|
1645
|
+
shellCore: {
|
|
1646
|
+
activePath,
|
|
1647
|
+
annotationsVisible,
|
|
1648
|
+
autoOpenInspector,
|
|
1649
|
+
cfg,
|
|
1650
|
+
cloudLinkedHub,
|
|
1651
|
+
changesOpen,
|
|
1652
|
+
commentsPanelOpen,
|
|
1653
|
+
exportCenter,
|
|
1654
|
+
groups,
|
|
1655
|
+
inspectorOpen,
|
|
1656
|
+
iframesRef,
|
|
1657
|
+
minimapVisible,
|
|
1658
|
+
openPanelExclusive,
|
|
1659
|
+
openRightPanel,
|
|
1660
|
+
postToActiveCanvas,
|
|
1661
|
+
presentMode,
|
|
1662
|
+
printGuidesVisible,
|
|
1663
|
+
project,
|
|
1664
|
+
setAutoOpenInspector,
|
|
1665
|
+
setBrandUploadOpen,
|
|
1666
|
+
setExportDialog,
|
|
1667
|
+
setFigmaImportOpen,
|
|
1668
|
+
setGenerateOpen,
|
|
1669
|
+
setHelpOpen,
|
|
1670
|
+
setIntroOpen,
|
|
1671
|
+
setQuickSetupOpen,
|
|
1672
|
+
setReportBugOpen,
|
|
1673
|
+
setSettingsOpen,
|
|
1674
|
+
setShortcutsOpen,
|
|
1675
|
+
setOrderNotesOpen,
|
|
1676
|
+
setShowHidden,
|
|
1677
|
+
showHidden,
|
|
1678
|
+
layersMode,
|
|
1679
|
+
setLayersMode,
|
|
1680
|
+
setLayersOpen,
|
|
1681
|
+
assetsOpen,
|
|
1682
|
+
startTour,
|
|
1683
|
+
toggleRightPanel,
|
|
1684
|
+
toggleTimeline,
|
|
1685
|
+
syncStatus,
|
|
1686
|
+
tabs,
|
|
1687
|
+
viewerMode,
|
|
1688
|
+
whatsNew,
|
|
1689
|
+
wsConnected,
|
|
1690
|
+
zoomCtlVisible,
|
|
1691
|
+
},
|
|
1692
|
+
photoAndTimeline: {
|
|
1693
|
+
toggleAnnotations,
|
|
1694
|
+
toggleMinimap,
|
|
1695
|
+
togglePresent,
|
|
1696
|
+
togglePrintGuides,
|
|
1697
|
+
toggleZoomCtl,
|
|
1698
|
+
},
|
|
1699
|
+
tabs: {
|
|
1700
|
+
assembleVideo,
|
|
1701
|
+
closeTab,
|
|
1702
|
+
duplicateCanvasReq,
|
|
1703
|
+
moveCanvasReq,
|
|
1704
|
+
openSystem,
|
|
1705
|
+
openTab,
|
|
1706
|
+
reloadActive,
|
|
1707
|
+
renameCanvasReq,
|
|
1708
|
+
showShare,
|
|
1709
|
+
},
|
|
1710
|
+
canvasBridge: { onInsertArtboard },
|
|
1711
|
+
paletteAndPanels: { leftActive },
|
|
1712
|
+
comments,
|
|
1713
|
+
} = useShellStore();
|
|
1714
|
+
const { hidden: panelsHidden, pinned, userHidden: panelsUserHiddenLayout } = usePanelLayout();
|
|
1715
|
+
const native = isNativeApp();
|
|
1716
|
+
const online = useOnline();
|
|
1717
|
+
const canvasOpen = !!activePath && activePath !== SYSTEM_TAB;
|
|
1718
|
+
const [movePicker, setMovePicker] = useState(null);
|
|
1719
|
+
const pillRef = useRef(null);
|
|
1720
|
+
const openerRef = useRef(null);
|
|
1721
|
+
const live = useRef(null);
|
|
1722
|
+
live.current = {
|
|
1723
|
+
native,
|
|
1724
|
+
activePath,
|
|
1725
|
+
// S9.21 — Ask to edit names the open canvas designRoot-relative (the hub keys a grant that way)
|
|
1726
|
+
designRel: cfg?.designRel,
|
|
1727
|
+
canvasName: displayName(basename(activePath || '')),
|
|
1728
|
+
toast: (m, ok, action, extra) => shellToast(m, ok, action, extra),
|
|
1729
|
+
postToActiveCanvas,
|
|
1730
|
+
openPanelExclusive,
|
|
1731
|
+
toggleRightPanel,
|
|
1732
|
+
setExportDialog,
|
|
1733
|
+
setGenerateOpen,
|
|
1734
|
+
setSettingsOpen,
|
|
1735
|
+
setHelpOpen,
|
|
1736
|
+
setShortcutsOpen,
|
|
1737
|
+
setOrderNotesOpen,
|
|
1738
|
+
setReportBugOpen,
|
|
1739
|
+
onUsageTour: () => startTour(USAGE_TOUR),
|
|
1740
|
+
onCollabTour: () => startTour(COLLAB_TOUR),
|
|
1741
|
+
onQuickSetup: () => setQuickSetupOpen(true),
|
|
1742
|
+
onIntro: () => setIntroOpen(true),
|
|
1743
|
+
onWhatsNew: whatsNew.openPanel,
|
|
1744
|
+
onShare: () => showShare(),
|
|
1745
|
+
onReload: reloadActive,
|
|
1746
|
+
onCloseCanvas: () => activePath && closeTab(activePath),
|
|
1747
|
+
onAssembleVideo: assembleVideo,
|
|
1748
|
+
onToggleShowHidden: () => setShowHidden((v) => !v),
|
|
1749
|
+
// S9.22b — comments.filter-* / comments.open-thread (v2/comments/use-comments-shell.jsx)
|
|
1750
|
+
onCommentsFilter: (f) => comments?.showFilter(f),
|
|
1751
|
+
onOpenCommentThread: (file, id, opts) => comments?.openThread(file, id, opts),
|
|
1752
|
+
// V2-4.4a: View › Advanced › Layers as a panel — the Settings › Layout switch, from the menu.
|
|
1753
|
+
onToggleLayersMode: () => {
|
|
1754
|
+
const next = layersMode === 'separate' ? 'in-inspector' : 'separate';
|
|
1755
|
+
setLayersMode(next);
|
|
1756
|
+
// Leaving separate mode retires the standalone Layers panel.
|
|
1757
|
+
if (next !== 'separate') setLayersOpen(false);
|
|
1758
|
+
},
|
|
1759
|
+
onToggleAnnotations: toggleAnnotations,
|
|
1760
|
+
onToggleMinimap: toggleMinimap,
|
|
1761
|
+
onToggleZoomCtl: toggleZoomCtl,
|
|
1762
|
+
onTogglePresent: togglePresent,
|
|
1763
|
+
onTogglePrintGuides: togglePrintGuides,
|
|
1764
|
+
onToggleTimeline: toggleTimeline,
|
|
1765
|
+
onToggleAutoOpenInspector: () => setAutoOpenInspector((v) => !v),
|
|
1766
|
+
// V2-4.3a: Menu › View › Exports / ⌘K "Exports" / the Share cluster's Exports icon — the export center's list.
|
|
1767
|
+
onToggleExports: () =>
|
|
1768
|
+
exportCenter.panelOpen ? exportCenter.closePanel() : exportCenter.openPanel(),
|
|
1769
|
+
onInsertArtboard,
|
|
1770
|
+
onImportFigma: () => setFigmaImportOpen(true),
|
|
1771
|
+
onImportBrand: () => setBrandUploadOpen(true),
|
|
1772
|
+
onDuplicate: duplicateCanvasReq,
|
|
1773
|
+
onRename: renameCanvasReq,
|
|
1774
|
+
// Move to… — the Files tree row menu's destination list, opened under the pill.
|
|
1775
|
+
onPickMoveDestination: () => {
|
|
1776
|
+
const r = pillRef.current?.getBoundingClientRect();
|
|
1777
|
+
setMovePicker({
|
|
1778
|
+
view: 'move-to',
|
|
1779
|
+
x: r?.left ?? 16,
|
|
1780
|
+
y: (r?.bottom ?? 56) + 4,
|
|
1781
|
+
anchor: r
|
|
1782
|
+
? { top: r.top, bottom: r.bottom, left: r.left }
|
|
1783
|
+
: { top: 16, bottom: 56, left: 16 },
|
|
1784
|
+
anchorEl: pillRef.current,
|
|
1785
|
+
});
|
|
1786
|
+
},
|
|
1787
|
+
// V2-3.8: this project signs in as someone else — it moves onto a profile of its own and the
|
|
1788
|
+
// page reloads signed out. A project with no cloud sign-in has nothing to move.
|
|
1789
|
+
onSwitchAccount: () => {
|
|
1790
|
+
// V2-4.8a: in a cloud tab this is the menubar's "Sign out": a FORM POST, not a link — signing out
|
|
1791
|
+
// revokes the token server-side, so it is a write (no GET can force it on you).
|
|
1792
|
+
if (cfg?.cloud) {
|
|
1793
|
+
const form = document.createElement('form');
|
|
1794
|
+
form.method = 'post';
|
|
1795
|
+
form.action = '/auth/browser/signout';
|
|
1796
|
+
form.hidden = true;
|
|
1797
|
+
document.body.appendChild(form);
|
|
1798
|
+
form.submit();
|
|
1799
|
+
return;
|
|
1800
|
+
}
|
|
1801
|
+
cloudSignInPrepare().then(
|
|
1802
|
+
(moved) => {
|
|
1803
|
+
if (!moved) shellToast('Sign in from the Share panel to use another account.');
|
|
1804
|
+
},
|
|
1805
|
+
(e) => shellToast(String(e?.message || e || 'Could not switch accounts.'))
|
|
1806
|
+
);
|
|
1807
|
+
},
|
|
1808
|
+
onCutPaste: (kind) => cutCopyPaste(kind, openerRef.current, { postToActiveCanvas }),
|
|
1809
|
+
// S10.6 — `ds.set-theme-preview`: the Design system canvas shows its Light or its Dark (preview only).
|
|
1810
|
+
onDsThemePreview: (mode) =>
|
|
1811
|
+
postDsThemePreview(
|
|
1812
|
+
activePath ? iframesRef.current.get(activePath) : null,
|
|
1813
|
+
mode,
|
|
1814
|
+
cfg?.canvasOrigin || window.location.origin
|
|
1815
|
+
),
|
|
1816
|
+
// S10.8 — `ds.go-to`: open the Design system canvas, focus its artboard, select the token / master. The
|
|
1817
|
+
// canvas mounts its listener late, so the messages ride the `ui-open` ladder — only while it is still the
|
|
1818
|
+
// canvas on screen.
|
|
1819
|
+
onDsGoTo: (params) => {
|
|
1820
|
+
const plan = dsGoToPlan(params, cfg, activePath);
|
|
1821
|
+
if (!plan) return shellToast('There is no design system to go to.');
|
|
1822
|
+
// S10.13 — a system not yet on a canvas opens today's v1 view (S10 Q6)
|
|
1823
|
+
if (!plan.converted) return openSystem(plan.ds);
|
|
1824
|
+
// The tab is the tree's own path (`.design/system/…`): that is the `file` the canvas reports once it has
|
|
1825
|
+
// drawn, and the loading card waits for exactly that (a bare `system/…` never matched: "Opening…" for 15 s,
|
|
1826
|
+
// then "can't be drawn right now" over a canvas that had drawn).
|
|
1827
|
+
const designRel = (cfg?.designRel || '.design').replace(/^\/+|\/+$/g, '');
|
|
1828
|
+
const tabPath = `${designRel}/${plan.file}`;
|
|
1829
|
+
openTab(tabPath);
|
|
1830
|
+
const posts = dsGoToPosts(plan);
|
|
1831
|
+
for (const ms of OPEN_LADDER_MS)
|
|
1832
|
+
setTimeout(() => {
|
|
1833
|
+
if (live.current.activePath !== tabPath) return;
|
|
1834
|
+
for (const m of posts) live.current.postToActiveCanvas(m);
|
|
1835
|
+
}, ms);
|
|
1836
|
+
},
|
|
1837
|
+
// V2-4.8a: a cloud tab's "Back to Home" — the v1 menubar's "← Dashboard" link, same tab.
|
|
1838
|
+
onOpenDashboard: () => {
|
|
1839
|
+
const url = cfg?.cloud?.dashboardUrl;
|
|
1840
|
+
if (url) window.location.assign(url);
|
|
1841
|
+
else shellToast('This workspace has no dashboard to go back to.');
|
|
1842
|
+
},
|
|
1843
|
+
};
|
|
1844
|
+
const d = useMemo(() => new Proxy({}, { get: (_t, k) => live.current[k] }), []);
|
|
1845
|
+
const handlers = useMemo(() => createMenuHandlers(d), [d]);
|
|
1846
|
+
// V2-4.7b: the Diagnostics rows' status words (Sync · Server · AI setup) and the rows left out.
|
|
1847
|
+
const diag = useDiagnosticsMenu({
|
|
1848
|
+
syncStatus,
|
|
1849
|
+
project: cfg?.cloud?.projectName || project,
|
|
1850
|
+
wsConnected,
|
|
1851
|
+
cfg,
|
|
632
1852
|
});
|
|
1853
|
+
useEffect(() => {
|
|
1854
|
+
menuRunner.bind(handlers, {
|
|
1855
|
+
postToActiveCanvas: (m) => live.current.postToActiveCanvas(m),
|
|
1856
|
+
invokeNative: native ? invoke : null,
|
|
1857
|
+
});
|
|
1858
|
+
return () => menuRunner.unbind(handlers);
|
|
1859
|
+
}, [handlers, native]);
|
|
1860
|
+
// S5.13 — a "Needs you" / "Done" toast's Open lands in the AI chat (ChatPanel picks the chat itself).
|
|
1861
|
+
// S5.10 — the paperclip's From Assets opens the Assets panel, the same as View › Assets.
|
|
1862
|
+
useEffect(() => {
|
|
1863
|
+
const onOpenAi = (e) => {
|
|
1864
|
+
openRightPanel('assistant');
|
|
1865
|
+
// S5.18 (G4): a "needs you" toast's Open lands on the canvas that needs you, not only on its chat.
|
|
1866
|
+
const canvas = normalizeOpenPath(e?.detail?.canvas, cfg?.designRel || '.design');
|
|
1867
|
+
if (canvas) openTab(canvas);
|
|
1868
|
+
};
|
|
1869
|
+
const onAttachAssets = () => menuRunner.run('view.assets');
|
|
1870
|
+
window.addEventListener(OPEN_AI_EVENT, onOpenAi);
|
|
1871
|
+
window.addEventListener(OPEN_ASSETS_EVENT, onAttachAssets);
|
|
1872
|
+
return () => {
|
|
1873
|
+
window.removeEventListener(OPEN_AI_EVENT, onOpenAi);
|
|
1874
|
+
window.removeEventListener(OPEN_ASSETS_EVENT, onAttachAssets);
|
|
1875
|
+
};
|
|
1876
|
+
}, [openRightPanel, openTab, cfg?.designRel]);
|
|
1877
|
+
// S1.22c: the native tab menu's "Sign in as another account…" arrives as `menu://action
|
|
1878
|
+
// {id:'account.switch'}` (tabs.rs TabMenuItem::SwitchAccount); it is not a palette row, so the
|
|
1879
|
+
// palette's menu://action listener never runs it — the menu handler does.
|
|
1880
|
+
useEffect(() => {
|
|
1881
|
+
if (!native) return undefined;
|
|
1882
|
+
const p = onMenuAction((id) => {
|
|
1883
|
+
if (id === 'account.switch') handlers['account.switch']?.();
|
|
1884
|
+
});
|
|
1885
|
+
return () => {
|
|
1886
|
+
p?.then?.((fn) => fn?.());
|
|
1887
|
+
};
|
|
1888
|
+
}, [handlers, native]);
|
|
1889
|
+
|
|
1890
|
+
const isCloudTab = !!cfg?.cloud;
|
|
1891
|
+
// P8 G1a — the role on the OPEN canvas, as the server resolved it (`/_config.access`): a desktop linked to a
|
|
1892
|
+
// v2 hub has no `cloud.role`, so reading that alone gave a window narrowed to Can view the Can comment menu
|
|
1893
|
+
// (Export, ⇧⌘E). The same value feeds the Export sheet's access line and the vote sheet.
|
|
1894
|
+
const activeRel = activePath ? normalizeOpenPath(activePath, cfg?.designRel) : null;
|
|
1895
|
+
const activeRole = sessionRole(cfg, activeRel);
|
|
1896
|
+
const activeObserver = observerOn(cfg, activeRel);
|
|
1897
|
+
const ctx = useMemo(
|
|
1898
|
+
() =>
|
|
1899
|
+
menuCtx({
|
|
1900
|
+
native,
|
|
1901
|
+
cloudTab: isCloudTab,
|
|
1902
|
+
readOnly: viewerMode,
|
|
1903
|
+
observer: activeObserver,
|
|
1904
|
+
canvasOpen,
|
|
1905
|
+
presenting: presentMode,
|
|
1906
|
+
// S3.8 — Copy presentation link reads both: a cloud-linked desktop, and the network up.
|
|
1907
|
+
linkedHub: !!cloudLinkedHub?.url,
|
|
1908
|
+
online,
|
|
1909
|
+
}),
|
|
1910
|
+
[
|
|
1911
|
+
native,
|
|
1912
|
+
isCloudTab,
|
|
1913
|
+
viewerMode,
|
|
1914
|
+
activeObserver,
|
|
1915
|
+
canvasOpen,
|
|
1916
|
+
presentMode,
|
|
1917
|
+
cloudLinkedHub?.url,
|
|
1918
|
+
online,
|
|
1919
|
+
]
|
|
1920
|
+
);
|
|
1921
|
+
// V2-4.8a: the megaphone's unseen dot, as a word on the Help row; and no "Back to Home" in a hub that
|
|
1922
|
+
// serves one project (no dashboard to go back to — the v1 link was absent there too).
|
|
1923
|
+
const unseenNews = whatsNew.unseen.length;
|
|
1924
|
+
const timelineKept = useTimelineKept(); // S7.7 — ⇧⌘T's check mark is "kept open", not "the island is up"
|
|
1925
|
+
const noDashboard = isCloudTab && !cfg.cloud.dashboardUrl;
|
|
1926
|
+
// …and who you are, with the way to stop being them: the account row carries the account's email.
|
|
1927
|
+
const cloudUser = isCloudTab ? cfg.cloud.user || null : null;
|
|
1928
|
+
const state = useMemo(
|
|
1929
|
+
() => ({
|
|
1930
|
+
...diag.state,
|
|
1931
|
+
hidden: [
|
|
1932
|
+
...(diag.state.hidden ?? []),
|
|
1933
|
+
...(noDashboard ? ['nav.home'] : []),
|
|
1934
|
+
...(isCloudTab && !cloudUser ? ['account.switch'] : []),
|
|
1935
|
+
],
|
|
1936
|
+
status: {
|
|
1937
|
+
...diag.state.status,
|
|
1938
|
+
...(unseenNews > 0
|
|
1939
|
+
? { 'help.whats-new': { word: `${unseenNews} new`, tone: 'neutral' } }
|
|
1940
|
+
: {}),
|
|
1941
|
+
...(cloudUser
|
|
1942
|
+
? { 'account.switch': { word: cloudUser, tone: 'neutral', mono: true } }
|
|
1943
|
+
: {}),
|
|
1944
|
+
},
|
|
1945
|
+
panelsHidden,
|
|
1946
|
+
checked: {
|
|
1947
|
+
'view.pin-panels': pinned,
|
|
1948
|
+
'view.annotations': annotationsVisible,
|
|
1949
|
+
'view.minimap': minimapVisible,
|
|
1950
|
+
'view.zoom-controls': zoomCtlVisible,
|
|
1951
|
+
'view.print-guides': printGuidesVisible,
|
|
1952
|
+
'view.hidden-files': showHidden,
|
|
1953
|
+
'view.layers-panel': layersMode === 'separate',
|
|
1954
|
+
'view.assets': assetsOpen,
|
|
1955
|
+
'view.inspector-on-select': autoOpenInspector,
|
|
1956
|
+
'view.timeline-keep-open': timelineKept,
|
|
1957
|
+
'view.inspector': inspectorOpen,
|
|
1958
|
+
'view.comments': commentsPanelOpen,
|
|
1959
|
+
'view.exports': exportCenter.panelOpen,
|
|
1960
|
+
'history.open': changesOpen,
|
|
1961
|
+
'present.canvas': presentMode,
|
|
1962
|
+
},
|
|
1963
|
+
}),
|
|
1964
|
+
[
|
|
1965
|
+
diag.state,
|
|
1966
|
+
noDashboard,
|
|
1967
|
+
isCloudTab,
|
|
1968
|
+
cloudUser,
|
|
1969
|
+
unseenNews,
|
|
1970
|
+
panelsHidden,
|
|
1971
|
+
pinned,
|
|
1972
|
+
annotationsVisible,
|
|
1973
|
+
minimapVisible,
|
|
1974
|
+
zoomCtlVisible,
|
|
1975
|
+
printGuidesVisible,
|
|
1976
|
+
showHidden,
|
|
1977
|
+
layersMode,
|
|
1978
|
+
assetsOpen,
|
|
1979
|
+
autoOpenInspector,
|
|
1980
|
+
timelineKept,
|
|
1981
|
+
inspectorOpen,
|
|
1982
|
+
commentsPanelOpen,
|
|
1983
|
+
exportCenter.panelOpen,
|
|
1984
|
+
changesOpen,
|
|
1985
|
+
presentMode,
|
|
1986
|
+
]
|
|
1987
|
+
);
|
|
1988
|
+
const previewing = usePreviewMode();
|
|
1989
|
+
const destinations = useMemo(() => moveDestinations(groups), [groups]);
|
|
1990
|
+
const dir = activePath ? activePath.slice(0, activePath.lastIndexOf('/')) : '';
|
|
1991
|
+
|
|
1992
|
+
return (
|
|
1993
|
+
<>
|
|
1994
|
+
<ProjectPill
|
|
1995
|
+
pillRef={pillRef}
|
|
1996
|
+
project={project || cfg?.cloud?.projectName || ''}
|
|
1997
|
+
canvas={canvasOpen ? displayName(basename(activePath)) : ''}
|
|
1998
|
+
ctx={ctx}
|
|
1999
|
+
state={state}
|
|
2000
|
+
run={(id) => menuRunner.run(id)}
|
|
2001
|
+
switcher={switcher}
|
|
2002
|
+
docked={pinned && !panelsHidden && !!leftActive}
|
|
2003
|
+
// S3.9 — Preview folds the pill to its mark (04 md-preview).
|
|
2004
|
+
folded={previewing || panelsUserHiddenLayout}
|
|
2005
|
+
onOpen={(el) => {
|
|
2006
|
+
openerRef.current = el;
|
|
2007
|
+
diag.onMenuOpen();
|
|
2008
|
+
}}
|
|
2009
|
+
/>
|
|
2010
|
+
<TreeRowMenu
|
|
2011
|
+
state={movePicker}
|
|
2012
|
+
onClose={() => setMovePicker(null)}
|
|
2013
|
+
rootItems={[]}
|
|
2014
|
+
destinations={destinations.filter((x) => x.path !== dir)}
|
|
2015
|
+
onPickDestination={(dest) => activePath && moveCanvasReq(activePath, dest)}
|
|
2016
|
+
/>
|
|
2017
|
+
</>
|
|
2018
|
+
);
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
// V2-2.3: the TimelinePanel surface reads the shell store directly instead of being drilled through ShellTree.
|
|
2022
|
+
function ShellTimelinePanel() {
|
|
2023
|
+
const {
|
|
2024
|
+
shellCore: {
|
|
2025
|
+
activeComps,
|
|
2026
|
+
activePath,
|
|
2027
|
+
cfg,
|
|
2028
|
+
commentsByFile,
|
|
2029
|
+
postToActiveCanvas,
|
|
2030
|
+
setTimelineFrame,
|
|
2031
|
+
setTimelineHeight,
|
|
2032
|
+
setTimelineLoop,
|
|
2033
|
+
setTimelineMuted,
|
|
2034
|
+
setTimelineOpen,
|
|
2035
|
+
setTimelinePlaying,
|
|
2036
|
+
setTimelineSelectedClip,
|
|
2037
|
+
setTimelineVolume,
|
|
2038
|
+
timelineArtboardId,
|
|
2039
|
+
timelineAudio,
|
|
2040
|
+
timelineCompId,
|
|
2041
|
+
timelineFps,
|
|
2042
|
+
timelineFrame,
|
|
2043
|
+
timelineHeight,
|
|
2044
|
+
timelineLoop,
|
|
2045
|
+
timelineMuted,
|
|
2046
|
+
timelineOpFailed,
|
|
2047
|
+
timelinePlaying,
|
|
2048
|
+
timelineSelectedClip,
|
|
2049
|
+
timelineSequences,
|
|
2050
|
+
timelineTotal,
|
|
2051
|
+
timelineTransitions,
|
|
2052
|
+
timelineVolume,
|
|
2053
|
+
},
|
|
2054
|
+
local: { wsSend },
|
|
2055
|
+
photoAndTimeline: {
|
|
2056
|
+
askText,
|
|
2057
|
+
pushTlUndo,
|
|
2058
|
+
resolveClipRef,
|
|
2059
|
+
timelineAddComment,
|
|
2060
|
+
timelineClipVerb,
|
|
2061
|
+
timelineRemoveClip,
|
|
2062
|
+
timelineTransClips,
|
|
2063
|
+
tlKeyRef,
|
|
2064
|
+
},
|
|
2065
|
+
projectData: { loadTree },
|
|
2066
|
+
tabs: { openTab, replaceMediaViaPicker },
|
|
2067
|
+
} = useShellStore();
|
|
2068
|
+
return (
|
|
2069
|
+
<TimelinePanel
|
|
2070
|
+
comps={activeComps}
|
|
2071
|
+
compId={timelineCompId}
|
|
2072
|
+
sequences={timelineSequences}
|
|
2073
|
+
audio={timelineAudio}
|
|
2074
|
+
transitions={timelineTransitions}
|
|
2075
|
+
total={timelineTotal}
|
|
2076
|
+
frame={timelineFrame}
|
|
2077
|
+
playing={timelinePlaying}
|
|
2078
|
+
loop={timelineLoop}
|
|
2079
|
+
onSeek={(f) => {
|
|
2080
|
+
setTimelineFrame(f);
|
|
2081
|
+
setTimelinePlaying(false);
|
|
2082
|
+
postToActiveCanvas({ dgn: 'timeline-seek', frame: f, id: timelineCompId });
|
|
2083
|
+
}}
|
|
2084
|
+
onPlay={() => {
|
|
2085
|
+
setTimelinePlaying(true);
|
|
2086
|
+
// Sync mute + loop to the Player, then play (the artboard has no
|
|
2087
|
+
// chrome — the Timeline owns transport/sound/loop now).
|
|
2088
|
+
postToActiveCanvas({
|
|
2089
|
+
dgn: 'timeline-mute',
|
|
2090
|
+
muted: timelineMuted,
|
|
2091
|
+
id: timelineCompId,
|
|
2092
|
+
});
|
|
2093
|
+
postToActiveCanvas({ dgn: 'timeline-loop', loop: timelineLoop, id: timelineCompId });
|
|
2094
|
+
postToActiveCanvas({ dgn: 'timeline-play', id: timelineCompId });
|
|
2095
|
+
}}
|
|
2096
|
+
onPause={() => {
|
|
2097
|
+
setTimelinePlaying(false);
|
|
2098
|
+
postToActiveCanvas({ dgn: 'timeline-pause', id: timelineCompId });
|
|
2099
|
+
}}
|
|
2100
|
+
onToggleLoop={() =>
|
|
2101
|
+
setTimelineLoop((v) => {
|
|
2102
|
+
const next = !v;
|
|
2103
|
+
postToActiveCanvas({ dgn: 'timeline-loop', loop: next, id: timelineCompId });
|
|
2104
|
+
return next;
|
|
2105
|
+
})
|
|
2106
|
+
}
|
|
2107
|
+
muted={timelineMuted}
|
|
2108
|
+
onToggleMute={() => {
|
|
2109
|
+
setTimelineMuted((v) => {
|
|
2110
|
+
const next = !v;
|
|
2111
|
+
postToActiveCanvas({ dgn: 'timeline-mute', muted: next, id: timelineCompId });
|
|
2112
|
+
return next;
|
|
2113
|
+
});
|
|
2114
|
+
}}
|
|
2115
|
+
volume={timelineVolume}
|
|
2116
|
+
onVolume={(v) => {
|
|
2117
|
+
setTimelineVolume(v);
|
|
2118
|
+
// Dragging volume implies "I want to hear it" — unmute.
|
|
2119
|
+
if (v > 0 && timelineMuted) {
|
|
2120
|
+
setTimelineMuted(false);
|
|
2121
|
+
postToActiveCanvas({ dgn: 'timeline-mute', muted: false, id: timelineCompId });
|
|
2122
|
+
}
|
|
2123
|
+
postToActiveCanvas({ dgn: 'timeline-volume', volume: v, id: timelineCompId });
|
|
2124
|
+
}}
|
|
2125
|
+
onRetime={(clipRef, patch) => {
|
|
2126
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2127
|
+
// S7.9 — a trim or a move is one `clip.retime` edit op: one write, one undo step (the clip is
|
|
2128
|
+
// addressed by stableId + fingerprint, read fresh by the verb pipe).
|
|
2129
|
+
timelineClipVerb(clipRef, 'retime', patch);
|
|
2130
|
+
}}
|
|
2131
|
+
onRemove={timelineRemoveClip}
|
|
2132
|
+
onReplace={(clipRef) => {
|
|
2133
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2134
|
+
// DDR-150 P3 + dogfood #5 — replace a clip's media. The file picker
|
|
2135
|
+
// MUST open synchronously inside the click gesture: browsers revoke
|
|
2136
|
+
// the transient user-activation after an await/fetch round-trip, so
|
|
2137
|
+
// the old fetch-then-click() silently no-oped ("replace neotevře
|
|
2138
|
+
// žádné okno"). Picker first; resolve the target + upload in the
|
|
2139
|
+
// change handler.
|
|
2140
|
+
replaceMediaViaPicker({
|
|
2141
|
+
accept: 'video/*,image/*',
|
|
2142
|
+
resolveTarget: (cc) => {
|
|
2143
|
+
const clip = resolveClipRef(cc, clipRef);
|
|
2144
|
+
if (clip?.mediaArrayRef) return { arrayRef: clip.mediaArrayRef };
|
|
2145
|
+
if (clip?.mediaCdId) return { cdId: clip.mediaCdId };
|
|
2146
|
+
return null;
|
|
2147
|
+
},
|
|
2148
|
+
});
|
|
2149
|
+
}}
|
|
2150
|
+
onReplaceAudio={(index) => {
|
|
2151
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2152
|
+
// DDR-150 dogfood #5 — audio beds are addressable too: the
|
|
2153
|
+
// enumerator lists loose media (an <Audio> under the reel) with a
|
|
2154
|
+
// cd-id; ⇄ on the audio row swaps its src.
|
|
2155
|
+
replaceMediaViaPicker({
|
|
2156
|
+
accept: 'audio/*',
|
|
2157
|
+
resolveTarget: (cc) => {
|
|
2158
|
+
const beds =
|
|
2159
|
+
cc?.ok && Array.isArray(cc.media) ? cc.media.filter((m) => m.tag === 'Audio') : [];
|
|
2160
|
+
return beds[index]?.cdId ? { cdId: beds[index].cdId } : null;
|
|
2161
|
+
},
|
|
2162
|
+
});
|
|
2163
|
+
}}
|
|
2164
|
+
onReplaceLayer={(clipRef, layerIndex) => {
|
|
2165
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2166
|
+
// DDR-150 dogfood — replace a SPECIFIC layer inside an expanded clip
|
|
2167
|
+
// (the mp4 background separately from the title layer). Targets the
|
|
2168
|
+
// layer's own media (array-fed or literal-src) from the enumerator.
|
|
2169
|
+
const rowIndex = clipRef && typeof clipRef === 'object' ? clipRef.index : clipRef;
|
|
2170
|
+
const kind =
|
|
2171
|
+
timelineSequences[rowIndex]?.layers?.[layerIndex]?.kind === 'audio'
|
|
2172
|
+
? 'audio/*'
|
|
2173
|
+
: timelineSequences[rowIndex]?.layers?.[layerIndex]?.kind === 'image'
|
|
2174
|
+
? 'image/*'
|
|
2175
|
+
: 'video/*';
|
|
2176
|
+
replaceMediaViaPicker({
|
|
2177
|
+
accept: kind,
|
|
2178
|
+
resolveTarget: (cc) => {
|
|
2179
|
+
const ly = resolveClipRef(cc, clipRef)?.layers?.[layerIndex];
|
|
2180
|
+
if (ly?.mediaArrayRef) return { arrayRef: ly.mediaArrayRef };
|
|
2181
|
+
if (ly?.mediaCdId) return { cdId: ly.mediaCdId };
|
|
2182
|
+
return null;
|
|
2183
|
+
},
|
|
2184
|
+
});
|
|
2185
|
+
}}
|
|
2186
|
+
onReorder={(clipRef, direction) => {
|
|
2187
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2188
|
+
// DDR-150 P5 — z-order reorder: move a standalone <Sequence> before/
|
|
2189
|
+
// after a sibling (render stacking; later sibling paints on top).
|
|
2190
|
+
// ▲ forward = move AFTER the next sibling; ▼ backward = move BEFORE
|
|
2191
|
+
// the previous sibling. Both clips addressed by comp-scoped stableId +
|
|
2192
|
+
// fingerprint (via /_api/comp-clips); the engine refuses a TransitionSeries
|
|
2193
|
+
// clip + a stale/raced target, then reloads via the file watcher.
|
|
2194
|
+
const artboardId = timelineArtboardId || undefined;
|
|
2195
|
+
const ccUrl = `/_api/comp-clips?canvas=${encodeURIComponent(activePath)}${artboardId ? `&artboardId=${encodeURIComponent(artboardId)}` : ''}`;
|
|
2196
|
+
fetch(ccUrl)
|
|
2197
|
+
.then((r) => r.json().catch(() => ({})))
|
|
2198
|
+
.then((cc) => {
|
|
2199
|
+
const seqs =
|
|
2200
|
+
cc?.ok && Array.isArray(cc.clips)
|
|
2201
|
+
? cc.clips.filter((c) => c.kind === 'sequence')
|
|
2202
|
+
: [];
|
|
2203
|
+
const moved = resolveClipRef(cc, clipRef);
|
|
2204
|
+
const index = moved ? seqs.indexOf(moved) : -1;
|
|
2205
|
+
const refIdx = direction === 'forward' ? index + 1 : index - 1;
|
|
2206
|
+
const ref = index >= 0 ? seqs[refIdx] || null : null;
|
|
2207
|
+
const position = direction === 'forward' ? 'after' : 'before';
|
|
2208
|
+
if (!moved?.stableId || !ref?.stableId) return null;
|
|
2209
|
+
return fetch('/_api/reorder-sequence', {
|
|
2210
|
+
method: 'POST',
|
|
2211
|
+
headers: { 'content-type': 'application/json' },
|
|
2212
|
+
body: JSON.stringify({
|
|
2213
|
+
canvas: activePath,
|
|
2214
|
+
artboardId,
|
|
2215
|
+
stableId: moved.stableId,
|
|
2216
|
+
contentHash: moved.contentHash,
|
|
2217
|
+
refStableId: ref.stableId,
|
|
2218
|
+
refContentHash: ref.contentHash,
|
|
2219
|
+
position,
|
|
2220
|
+
}),
|
|
2221
|
+
});
|
|
2222
|
+
})
|
|
2223
|
+
.then((r) => (r ? r.json() : null))
|
|
2224
|
+
.then((j) => {
|
|
2225
|
+
if (j && !j.ok) {
|
|
2226
|
+
console.warn('[reorder-clip]', j.error || 'failed');
|
|
2227
|
+
timelineOpFailed('Reorder refused', j.error);
|
|
2228
|
+
} else if (j?.seq != null) {
|
|
2229
|
+
pushTlUndo(activePath, j.seq, 'reorder clip');
|
|
2230
|
+
}
|
|
2231
|
+
})
|
|
2232
|
+
.catch(() => {});
|
|
2233
|
+
}}
|
|
2234
|
+
onToggleHide={(clipRef) => {
|
|
2235
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2236
|
+
// DDR-150 dogfood — hide/show a clip (gates its body behind
|
|
2237
|
+
// {false && …}; the tag + time slot stay). Addressed by comp-scoped
|
|
2238
|
+
// stableId + fingerprint.
|
|
2239
|
+
const artboardId = timelineArtboardId || undefined;
|
|
2240
|
+
const ccUrl = `/_api/comp-clips?canvas=${encodeURIComponent(activePath)}${artboardId ? `&artboardId=${encodeURIComponent(artboardId)}` : ''}`;
|
|
2241
|
+
fetch(ccUrl)
|
|
2242
|
+
.then((r) => r.json().catch(() => ({})))
|
|
2243
|
+
.then((cc) => {
|
|
2244
|
+
const clip = resolveClipRef(cc, clipRef);
|
|
2245
|
+
if (!clip?.stableId) return null;
|
|
2246
|
+
return fetch('/_api/toggle-hide', {
|
|
2247
|
+
method: 'POST',
|
|
2248
|
+
headers: { 'content-type': 'application/json' },
|
|
2249
|
+
body: JSON.stringify({
|
|
2250
|
+
canvas: activePath,
|
|
2251
|
+
artboardId,
|
|
2252
|
+
stableId: clip.stableId,
|
|
2253
|
+
contentHash: clip.contentHash,
|
|
2254
|
+
}),
|
|
2255
|
+
});
|
|
2256
|
+
})
|
|
2257
|
+
.then((r) => (r ? r.json() : null))
|
|
2258
|
+
.then((j) => {
|
|
2259
|
+
if (j && !j.ok) timelineOpFailed('Hide refused', j.error);
|
|
2260
|
+
else if (j && j.ok) {
|
|
2261
|
+
shellToast(j.hidden ? 'Clip hidden.' : 'Clip shown.', true);
|
|
2262
|
+
if (j.seq != null)
|
|
2263
|
+
pushTlUndo(activePath, j.seq, j.hidden ? 'hide clip' : 'show clip');
|
|
2264
|
+
}
|
|
2265
|
+
})
|
|
2266
|
+
.catch(() => shellToast('Hide failed: network error'));
|
|
2267
|
+
}}
|
|
2268
|
+
onReorderMove={(movedRef2, targetRef, position) => {
|
|
2269
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2270
|
+
// S7.9 — the magnetic drag commit is one `clip.move` edit op (a real series MOVE, any distance).
|
|
2271
|
+
timelineClipVerb(movedRef2, 'move', { refRef: targetRef, position });
|
|
2272
|
+
}}
|
|
2273
|
+
onDropMedia={(files, pos) => {
|
|
2274
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2275
|
+
// DDR-150 P4 + Task 6 — drop media onto the timeline. With a caret
|
|
2276
|
+
// position: index-aware storyline insert / frame-anchored
|
|
2277
|
+
// overlay-audio insert; multiple files insert in order. Audio
|
|
2278
|
+
// files always land in the audio band. Without a position, the
|
|
2279
|
+
// legacy append path.
|
|
2280
|
+
const fps = timelineFps;
|
|
2281
|
+
const list = (Array.isArray(files) ? files : [files]).filter(Boolean);
|
|
2282
|
+
const fileStem = (n) => String(n || '').replace(/\.[A-Za-z0-9]{1,8}$/, '');
|
|
2283
|
+
(async () => {
|
|
2284
|
+
// Dogfood fix — dropping media on the timeline of a canvas with
|
|
2285
|
+
// NO video-comp used to dead-end in "Insert refused: no
|
|
2286
|
+
// video-comp for this artboard". Drop-first means drop-first:
|
|
2287
|
+
// upload the files and spin up a NEW video-comp canvas cut from
|
|
2288
|
+
// them (same engine as File → Assemble), then open it.
|
|
2289
|
+
if (!activeComps.length) {
|
|
2290
|
+
const clips = [];
|
|
2291
|
+
for (const file of list) {
|
|
2292
|
+
const mediaKind = file.type.startsWith('audio/')
|
|
2293
|
+
? 'audio'
|
|
2294
|
+
: file.type.startsWith('video/')
|
|
2295
|
+
? 'video'
|
|
2296
|
+
: null;
|
|
2297
|
+
if (!mediaKind) continue;
|
|
2298
|
+
try {
|
|
2299
|
+
const r = await fetch('/_api/asset', {
|
|
2300
|
+
method: 'POST',
|
|
2301
|
+
headers: { 'Content-Type': file.type || 'application/octet-stream' },
|
|
2302
|
+
body: file,
|
|
2303
|
+
});
|
|
2304
|
+
const up = await r.json().catch(() => ({}));
|
|
2305
|
+
if (up?.path) clips.push({ src: up.path, mediaKind, name: fileStem(file.name) });
|
|
2306
|
+
else shellToast(`Upload failed: ${up?.error || `HTTP ${r.status}`}`);
|
|
2307
|
+
} catch {
|
|
2308
|
+
shellToast('Upload failed: network error');
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
if (!clips.length) {
|
|
2312
|
+
shellToast('No video/audio files in the drop — nothing to cut.');
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2315
|
+
// 1) In-place upgrade: a `kind="video"` artboard on THIS
|
|
2316
|
+
// canvas gets a VideoComp injected and takes the clips as
|
|
2317
|
+
// storyline beats (server-side ensure). Falls through to a
|
|
2318
|
+
// fresh "New Cut" canvas only when no artboard opted in.
|
|
2319
|
+
let upgraded = false;
|
|
2320
|
+
const sized = [];
|
|
2321
|
+
for (const c of clips) {
|
|
2322
|
+
const probedSec = await probeMediaDuration(c.src).catch(() => null);
|
|
2323
|
+
sized.push({ c, durationInFrames: durationFramesForDrop(fps, probedSec) });
|
|
2324
|
+
}
|
|
2325
|
+
const asItem = (x) => ({
|
|
2326
|
+
mediaTag: x.c.mediaKind === 'audio' ? 'Audio' : 'Video',
|
|
2327
|
+
src: x.c.src,
|
|
2328
|
+
durationInFrames: x.durationInFrames,
|
|
2329
|
+
name: x.c.name,
|
|
2330
|
+
});
|
|
2331
|
+
// The first clip always opens the storyline; later audio goes to the audio band. S7.9: the whole
|
|
2332
|
+
// drop is ONE `clip.insert` per band (one write, one undo step), not one write per file.
|
|
2333
|
+
const story = sized.filter((x) => x.c.mediaKind !== 'audio' || x === sized[0]);
|
|
2334
|
+
const beds = sized.filter((x) => !story.includes(x));
|
|
2335
|
+
const jStory = await timelineClipVerb(
|
|
2336
|
+
null,
|
|
2337
|
+
'insert',
|
|
2338
|
+
{ lane: 'storyline', items: story.map(asItem) },
|
|
2339
|
+
{ quiet: true }
|
|
2340
|
+
);
|
|
2341
|
+
if (jStory?.ok) {
|
|
2342
|
+
upgraded = true; // else: no eligible artboard — New Cut fallback below
|
|
2343
|
+
if (beds.length) {
|
|
2344
|
+
const jBeds = await timelineClipVerb(
|
|
2345
|
+
null,
|
|
2346
|
+
'insert',
|
|
2347
|
+
{ lane: 'audio', from: 0, items: beds.map(asItem) },
|
|
2348
|
+
{ quiet: true }
|
|
2349
|
+
);
|
|
2350
|
+
if (!jBeds?.ok) timelineOpFailed('Drop refused', jBeds?.message || jBeds?.error);
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
if (upgraded) {
|
|
2354
|
+
shellToast('Artboard upgraded to a video comp — clips added to the storyline.', true);
|
|
2355
|
+
return;
|
|
2356
|
+
}
|
|
2357
|
+
for (let n = 0; n < 8; n += 1) {
|
|
2358
|
+
const name = n === 0 ? 'New Cut' : `New Cut ${n + 1}`;
|
|
2359
|
+
const r = await fetch('/_api/canvas', {
|
|
2360
|
+
method: 'POST',
|
|
2361
|
+
headers: { 'Content-Type': 'application/json' },
|
|
2362
|
+
body: JSON.stringify({ name, kind: 'video-comp', clips }),
|
|
2363
|
+
}).catch(() => null);
|
|
2364
|
+
const j = r ? await r.json().catch(() => ({})) : {};
|
|
2365
|
+
if (r?.status === 409) continue; // name taken — try the next
|
|
2366
|
+
if (!r?.ok || !j.ok) {
|
|
2367
|
+
shellToast(`New cut failed: ${j.error || 'create refused'}`);
|
|
2368
|
+
return;
|
|
2369
|
+
}
|
|
2370
|
+
await loadTree();
|
|
2371
|
+
openTab(j.file);
|
|
2372
|
+
shellToast(
|
|
2373
|
+
`Started a new cut from ${clips.length} clip${clips.length > 1 ? 's' : ''}.`,
|
|
2374
|
+
true
|
|
2375
|
+
);
|
|
2376
|
+
return;
|
|
2377
|
+
}
|
|
2378
|
+
shellToast('New cut failed: too many "New Cut" canvases — rename some.');
|
|
2379
|
+
return;
|
|
2380
|
+
}
|
|
2381
|
+
// S7.9 — upload and size every file first, then add each band's files in ONE `clip.insert`:
|
|
2382
|
+
// dropping three clips is one gesture, one write, one undo step.
|
|
2383
|
+
const groups = new Map();
|
|
2384
|
+
const add = (where, item) => {
|
|
2385
|
+
const key = JSON.stringify(where);
|
|
2386
|
+
if (!groups.has(key)) groups.set(key, { ...where, items: [] });
|
|
2387
|
+
groups.get(key).items.push(item);
|
|
2388
|
+
};
|
|
2389
|
+
for (const file of list) {
|
|
2390
|
+
const mediaTag = file.type.startsWith('video/')
|
|
2391
|
+
? 'Video'
|
|
2392
|
+
: file.type.startsWith('audio/')
|
|
2393
|
+
? 'Audio'
|
|
2394
|
+
: file.type.startsWith('image/')
|
|
2395
|
+
? 'Img'
|
|
2396
|
+
: null;
|
|
2397
|
+
if (!mediaTag) continue;
|
|
2398
|
+
let up;
|
|
2399
|
+
try {
|
|
2400
|
+
const r = await fetch('/_api/asset', {
|
|
2401
|
+
method: 'POST',
|
|
2402
|
+
headers: { 'Content-Type': file.type || 'application/octet-stream' },
|
|
2403
|
+
body: file,
|
|
2404
|
+
});
|
|
2405
|
+
up = await r.json().catch(() => ({}));
|
|
2406
|
+
} catch {
|
|
2407
|
+
up = null;
|
|
2408
|
+
}
|
|
2409
|
+
if (!up?.path) {
|
|
2410
|
+
shellToast(`Upload failed: ${up?.error || 'server unreachable — retry in a moment'}`);
|
|
2411
|
+
continue;
|
|
2412
|
+
}
|
|
2413
|
+
const isAudio = mediaTag === 'Audio';
|
|
2414
|
+
// Video clips carry a real duration — probe it so the drop
|
|
2415
|
+
// lands at the clip's own length instead of a fixed 3s that
|
|
2416
|
+
// the user then has to drag out by hand. Images have no
|
|
2417
|
+
// inherent duration, so they keep the fallback.
|
|
2418
|
+
const probedSec =
|
|
2419
|
+
mediaTag === 'Video' ? await probeMediaDuration(up.path).catch(() => null) : null;
|
|
2420
|
+
// p8-t-video-2 — the clip keeps the file's own name ("IMG_5120"), not the asset's content hash.
|
|
2421
|
+
const item = { mediaTag, src: up.path, name: fileStem(file.name) };
|
|
2422
|
+
if (pos && (isAudio || pos.lane === 'audio')) {
|
|
2423
|
+
// Default: stretch toward the end of the cut.
|
|
2424
|
+
const from = Math.max(0, pos.frame ?? 0);
|
|
2425
|
+
add(
|
|
2426
|
+
{ lane: 'audio', from },
|
|
2427
|
+
{ ...item, durationInFrames: Math.max(fps, timelineTotal - from) }
|
|
2428
|
+
);
|
|
2429
|
+
} else if (pos?.lane === 'storyline' && !isAudio) {
|
|
2430
|
+
add(
|
|
2431
|
+
{ lane: 'storyline', ...(pos.index != null ? { index: pos.index } : {}) },
|
|
2432
|
+
{ ...item, durationInFrames: durationFramesForDrop(fps, probedSec) }
|
|
2433
|
+
);
|
|
2434
|
+
} else if (pos?.lane === 'overlay' && !isAudio) {
|
|
2435
|
+
const dur = durationFramesForDrop(fps, probedSec);
|
|
2436
|
+
if ((timelineSequences || []).length === 0) {
|
|
2437
|
+
// First clip of a greenfield comp = the BASE layer →
|
|
2438
|
+
// storyline, wherever it was dropped.
|
|
2439
|
+
add({ lane: 'storyline' }, { ...item, durationInFrames: dur });
|
|
2440
|
+
} else {
|
|
2441
|
+
add(
|
|
2442
|
+
{ lane: 'overlay', from: Math.max(0, pos.frame ?? 0) },
|
|
2443
|
+
{ ...item, durationInFrames: dur }
|
|
2444
|
+
);
|
|
2445
|
+
}
|
|
2446
|
+
} else if (!isAudio) {
|
|
2447
|
+
// Default container rule: a video/image drop ANYWHERE on the
|
|
2448
|
+
// timeline lands in the storyline (append = hard cut at the
|
|
2449
|
+
// end; the caret gives it an index). The old lane-less
|
|
2450
|
+
// append refused hard-cut series ("no transition to clone").
|
|
2451
|
+
add(
|
|
2452
|
+
{ lane: 'storyline' },
|
|
2453
|
+
{ ...item, durationInFrames: durationFramesForDrop(fps, probedSec) }
|
|
2454
|
+
);
|
|
2455
|
+
} else {
|
|
2456
|
+
// Audio without a caret → audio band, from the start.
|
|
2457
|
+
add(
|
|
2458
|
+
{ lane: 'audio', from: 0 },
|
|
2459
|
+
{ ...item, durationInFrames: Math.max(fps, timelineTotal) }
|
|
2460
|
+
);
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
for (const g of groups.values()) await timelineClipVerb(null, 'insert', g);
|
|
2464
|
+
})();
|
|
2465
|
+
}}
|
|
2466
|
+
height={timelineHeight}
|
|
2467
|
+
onResize={setTimelineHeight}
|
|
2468
|
+
onClose={() => setTimelineOpen(false)}
|
|
2469
|
+
selectedClipId={timelineSelectedClip}
|
|
2470
|
+
onSelect={setTimelineSelectedClip}
|
|
2471
|
+
transitionClips={timelineTransClips}
|
|
2472
|
+
onClipVerb={timelineClipVerb}
|
|
2473
|
+
comments={(commentsByFile[activePath] || []).filter(
|
|
2474
|
+
(c) => c && (c.timeline || typeof c.t === 'number')
|
|
2475
|
+
)}
|
|
2476
|
+
promptText={askText}
|
|
2477
|
+
onAddComment={timelineAddComment}
|
|
2478
|
+
onResolveComment={(id) =>
|
|
2479
|
+
wsSend({ type: 'comments-patch', id, patch: { status: 'resolved' } })
|
|
2480
|
+
}
|
|
2481
|
+
onDeleteComment={(id) => wsSend({ type: 'comments-delete', id })}
|
|
2482
|
+
onSplitAtPlayhead={() => {
|
|
2483
|
+
const s = tlKeyRef.current;
|
|
2484
|
+
let ref = s.selected != null ? { stableId: s.selected } : null;
|
|
2485
|
+
if (!ref) {
|
|
2486
|
+
const rows = s.sequences || [];
|
|
2487
|
+
const under =
|
|
2488
|
+
rows.find((r2) => r2.series && s.frame >= r2.from && s.frame < r2.from + r2.duration) ||
|
|
2489
|
+
rows.find((r2) => s.frame >= r2.from && s.frame < r2.from + r2.duration);
|
|
2490
|
+
if (under?.stableId) ref = { stableId: under.stableId };
|
|
2491
|
+
}
|
|
2492
|
+
if (ref) timelineClipVerb(ref, 'split', { atFrame: s.frame });
|
|
2493
|
+
else shellToast('Nothing under the playhead to split.');
|
|
2494
|
+
}}
|
|
2495
|
+
onAddTitle={(frame) => {
|
|
2496
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2497
|
+
// Task 19 — "+ Title": inserts immediately with a default text —
|
|
2498
|
+
// edit it via double-click → inspector → Text (the artboard's
|
|
2499
|
+
// Player DOM isn't the canvas edit surface, so inline editing
|
|
2500
|
+
// happens in the timeline inspector).
|
|
2501
|
+
Promise.resolve('Title').then((text) => {
|
|
2502
|
+
if (!text) return;
|
|
2503
|
+
const fps = timelineFps;
|
|
2504
|
+
fetch('/_api/insert-sequence', {
|
|
2505
|
+
method: 'POST',
|
|
2506
|
+
headers: { 'content-type': 'application/json' },
|
|
2507
|
+
body: JSON.stringify({
|
|
2508
|
+
canvas: activePath,
|
|
2509
|
+
artboardId: timelineArtboardId || undefined,
|
|
2510
|
+
lane: 'overlay',
|
|
2511
|
+
from: frame,
|
|
2512
|
+
durationInFrames: Math.round(fps * 3),
|
|
2513
|
+
mediaTag: 'Title',
|
|
2514
|
+
src: text,
|
|
2515
|
+
}),
|
|
2516
|
+
})
|
|
2517
|
+
.then((r) => r.json().catch(() => null))
|
|
2518
|
+
.then((j) => {
|
|
2519
|
+
if (j && !j.ok) timelineOpFailed('Title refused', j.error);
|
|
2520
|
+
else if (j?.ok) {
|
|
2521
|
+
shellToast('Title added.', true);
|
|
2522
|
+
if (j.seq != null) pushTlUndo(activePath, j.seq, 'add title');
|
|
2523
|
+
// 07: the new title is selected, so the Title inspector (words, font, motion) is what opens next
|
|
2524
|
+
if (typeof j.stableId === 'string' && j.stableId) {
|
|
2525
|
+
// the canvas reloads the rewritten file and echoes a `select`: that must not release this pick
|
|
2526
|
+
timelineSelection.shield(2500);
|
|
2527
|
+
setTimelineSelectedClip(j.stableId);
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
})
|
|
2531
|
+
.catch(() => shellToast('Title failed: network error'));
|
|
2532
|
+
});
|
|
2533
|
+
}}
|
|
2534
|
+
onAddAiClip={() => {
|
|
2535
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2536
|
+
// Task 22 — "+ AI clip": a prompt-carrying slate beat at the end
|
|
2537
|
+
// of the storyline. NO modal (user steer 2026-07-30) — the slate
|
|
2538
|
+
// lands with a starter prompt the user rewrites IN PLACE
|
|
2539
|
+
// (double-click the slate text in the artboard, or Text tab).
|
|
2540
|
+
(async () => {
|
|
2541
|
+
const prompt = 'Describe this shot — double-click to edit';
|
|
2542
|
+
const kind = 'veo';
|
|
2543
|
+
const fps = timelineFps;
|
|
2544
|
+
fetch('/_api/insert-sequence', {
|
|
2545
|
+
method: 'POST',
|
|
2546
|
+
headers: { 'content-type': 'application/json' },
|
|
2547
|
+
body: JSON.stringify({
|
|
2548
|
+
canvas: activePath,
|
|
2549
|
+
artboardId: timelineArtboardId || undefined,
|
|
2550
|
+
lane: 'storyline',
|
|
2551
|
+
durationInFrames: Math.round(fps * 5),
|
|
2552
|
+
placeholder: { prompt, kind },
|
|
2553
|
+
}),
|
|
2554
|
+
})
|
|
2555
|
+
.then((r) => r.json().catch(() => null))
|
|
2556
|
+
.then((j) => {
|
|
2557
|
+
if (j && !j.ok) timelineOpFailed('AI clip refused', j.error);
|
|
2558
|
+
else if (j?.ok) {
|
|
2559
|
+
shellToast(
|
|
2560
|
+
'AI placeholder added — double-click its text to write the prompt, then right-click → Generate ✨.',
|
|
2561
|
+
true
|
|
2562
|
+
);
|
|
2563
|
+
if (j.seq != null) pushTlUndo(activePath, j.seq, 'add AI placeholder');
|
|
2564
|
+
}
|
|
2565
|
+
})
|
|
2566
|
+
.catch(() => shellToast('AI clip failed: network error'));
|
|
2567
|
+
})();
|
|
2568
|
+
}}
|
|
2569
|
+
onGeneratePlaceholder={(clipRef) => {
|
|
2570
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2571
|
+
// Task 22 — hand the prompt to the existing generation spine
|
|
2572
|
+
// (DDR-164), then poll the job and swap the slate in place. The
|
|
2573
|
+
// placeholder stays fully editable while the job runs; the final
|
|
2574
|
+
// swap re-resolves by stableId with a FRESH fingerprint.
|
|
2575
|
+
const canvas = activePath;
|
|
2576
|
+
const artboardId = timelineArtboardId || undefined;
|
|
2577
|
+
const ccUrl = `/_api/comp-clips?canvas=${encodeURIComponent(canvas)}${artboardId ? `&artboardId=${encodeURIComponent(artboardId)}` : ''}`;
|
|
2578
|
+
fetch(ccUrl)
|
|
2579
|
+
.then((r) => r.json().catch(() => ({})))
|
|
2580
|
+
.then((cc) => {
|
|
2581
|
+
const clip = resolveClipRef(cc, clipRef);
|
|
2582
|
+
const ph = clip?.placeholder;
|
|
2583
|
+
if (!clip?.stableId || !ph?.prompt) {
|
|
2584
|
+
shellToast('No AI placeholder prompt on this clip.');
|
|
2585
|
+
return;
|
|
2586
|
+
}
|
|
2587
|
+
const modality = ph.kind === 'image' ? 'image' : 'video';
|
|
2588
|
+
const prompt =
|
|
2589
|
+
ph.kind === 'motion'
|
|
2590
|
+
? `Clean, minimal motion-graphics animation (flat shapes, smooth easing): ${ph.prompt}`
|
|
2591
|
+
: ph.prompt;
|
|
2592
|
+
fetch('/_api/generate-jobs', {
|
|
2593
|
+
method: 'POST',
|
|
2594
|
+
headers: { 'content-type': 'application/json' },
|
|
2595
|
+
body: JSON.stringify({ provider: 'gemini', modality, prompt }),
|
|
2596
|
+
})
|
|
2597
|
+
.then(async (r) => (r.ok ? r.json() : Promise.reject(new Error(await r.text()))))
|
|
2598
|
+
.then((job) => {
|
|
2599
|
+
const jobId = job?.id;
|
|
2600
|
+
if (!jobId) throw new Error('no job id');
|
|
2601
|
+
shellToast(`Generating ${ph.kind}… (runs in the background)`, true);
|
|
2602
|
+
const stableId = clip.stableId;
|
|
2603
|
+
const poll = () => {
|
|
2604
|
+
fetch('/_api/generate-jobs')
|
|
2605
|
+
.then((r) => r.json().catch(() => ({})))
|
|
2606
|
+
.then((d) => {
|
|
2607
|
+
const j2 = (d?.jobs || []).find((x) => x.id === jobId);
|
|
2608
|
+
if (!j2 || j2.status === 'failed') {
|
|
2609
|
+
shellToast(`Generation failed: ${j2?.error || 'job lost'}`);
|
|
2610
|
+
return;
|
|
2611
|
+
}
|
|
2612
|
+
if (j2.status !== 'done') {
|
|
2613
|
+
setTimeout(poll, 4000);
|
|
2614
|
+
return;
|
|
2615
|
+
}
|
|
2616
|
+
const asset = j2.assets?.[0];
|
|
2617
|
+
if (!asset) {
|
|
2618
|
+
shellToast('Generation finished but produced no asset.');
|
|
2619
|
+
return;
|
|
2620
|
+
}
|
|
2621
|
+
// Fresh fingerprint at swap time (the clip may have
|
|
2622
|
+
// been retimed/moved meanwhile — that's fine).
|
|
2623
|
+
fetch(ccUrl)
|
|
2624
|
+
.then((r) => r.json().catch(() => ({})))
|
|
2625
|
+
.then((cc2) => {
|
|
2626
|
+
const live = resolveClipRef(cc2, { stableId });
|
|
2627
|
+
if (!live?.stableId) {
|
|
2628
|
+
shellToast(
|
|
2629
|
+
'Placeholder clip is gone — generated asset kept in assets/.'
|
|
2630
|
+
);
|
|
2631
|
+
return;
|
|
2632
|
+
}
|
|
2633
|
+
timelineClipVerb({ stableId: live.stableId }, 'resolve-placeholder', {
|
|
2634
|
+
src: asset,
|
|
2635
|
+
mediaKind: modality === 'image' ? 'image' : 'video',
|
|
2636
|
+
});
|
|
2637
|
+
});
|
|
2638
|
+
})
|
|
2639
|
+
.catch(() => setTimeout(poll, 6000));
|
|
2640
|
+
};
|
|
2641
|
+
setTimeout(poll, 3000);
|
|
2642
|
+
})
|
|
2643
|
+
.catch((e) =>
|
|
2644
|
+
shellToast(
|
|
2645
|
+
`Generate failed: ${e?.message || 'provider error'} — is a Gemini key set in Settings?`
|
|
2646
|
+
)
|
|
2647
|
+
);
|
|
2648
|
+
})
|
|
2649
|
+
.catch(() => shellToast('Generate failed: network error'));
|
|
2650
|
+
}}
|
|
2651
|
+
onAddImage={(frame) => {
|
|
2652
|
+
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
2653
|
+
// Task 19 — "+ Image": picker → content-addressed upload →
|
|
2654
|
+
// overlay-lane <Img> at the playhead. WKWebView can't open an
|
|
2655
|
+
// HTML file input, so native goes through the Rust pick dialog.
|
|
2656
|
+
const uploadPicked = (blob, type) => {
|
|
2657
|
+
const fps = timelineFps;
|
|
2658
|
+
fetch('/_api/asset', {
|
|
2659
|
+
method: 'POST',
|
|
2660
|
+
headers: { 'Content-Type': type || 'application/octet-stream' },
|
|
2661
|
+
body: blob,
|
|
2662
|
+
})
|
|
2663
|
+
.then((r) => r.json().catch(() => ({})))
|
|
2664
|
+
.then((up) => {
|
|
2665
|
+
if (!up?.path) {
|
|
2666
|
+
shellToast(`Upload failed: ${up?.error || 'unknown error'}`);
|
|
2667
|
+
return null;
|
|
2668
|
+
}
|
|
2669
|
+
return fetch('/_api/insert-sequence', {
|
|
2670
|
+
method: 'POST',
|
|
2671
|
+
headers: { 'content-type': 'application/json' },
|
|
2672
|
+
body: JSON.stringify({
|
|
2673
|
+
canvas: activePath,
|
|
2674
|
+
artboardId: timelineArtboardId || undefined,
|
|
2675
|
+
lane: 'overlay',
|
|
2676
|
+
from: frame,
|
|
2677
|
+
durationInFrames: Math.round(fps * 3),
|
|
2678
|
+
mediaTag: 'Img',
|
|
2679
|
+
src: up.path,
|
|
2680
|
+
}),
|
|
2681
|
+
});
|
|
2682
|
+
})
|
|
2683
|
+
.then((r) => (r ? r.json() : null))
|
|
2684
|
+
.then((j) => {
|
|
2685
|
+
if (j && !j.ok) timelineOpFailed('Image refused', j.error);
|
|
2686
|
+
else if (j?.ok) {
|
|
2687
|
+
shellToast('Image overlay added.', true);
|
|
2688
|
+
if (j.seq != null) pushTlUndo(activePath, j.seq, 'add image overlay');
|
|
2689
|
+
}
|
|
2690
|
+
})
|
|
2691
|
+
.catch(() => shellToast('Image failed: network error'));
|
|
2692
|
+
};
|
|
2693
|
+
if (isNativeApp()) {
|
|
2694
|
+
pickMediaFile()
|
|
2695
|
+
.then(async (picked) => {
|
|
2696
|
+
if (picked) uploadPicked(await readPickedMediaBlob(picked), '');
|
|
2697
|
+
})
|
|
2698
|
+
.catch((e2) => shellToast(`Image pick failed: ${e2?.message || 'dialog error'}`));
|
|
2699
|
+
return;
|
|
2700
|
+
}
|
|
2701
|
+
const input = document.createElement('input');
|
|
2702
|
+
input.type = 'file';
|
|
2703
|
+
input.accept = 'image/*';
|
|
2704
|
+
input.addEventListener('change', () => {
|
|
2705
|
+
const file = input.files?.[0];
|
|
2706
|
+
if (file) uploadPicked(file, file.type);
|
|
2707
|
+
});
|
|
2708
|
+
input.click();
|
|
2709
|
+
}}
|
|
2710
|
+
resolveMediaUrl={(p) =>
|
|
2711
|
+
`/${(cfg?.designRel || cfg?.designRoot || '.design').replace(/^\/+|\/+$/g, '')}/${p}`
|
|
2712
|
+
}
|
|
2713
|
+
/>
|
|
2714
|
+
);
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
// V2-2.3: the Settings surface reads the shell store directly instead of being drilled through ShellTree.
|
|
2718
|
+
// V2-4.7a: it is the v2 sheet — General · Connections · Advanced (client/v2/settings/).
|
|
2719
|
+
function ShellSettingsPanel() {
|
|
2720
|
+
const {
|
|
2721
|
+
shellCore: {
|
|
2722
|
+
activePath,
|
|
2723
|
+
annotationsVisible,
|
|
2724
|
+
autoOpenInspector,
|
|
2725
|
+
cfg,
|
|
2726
|
+
cpMode,
|
|
2727
|
+
layersMode,
|
|
2728
|
+
minimapVisible,
|
|
2729
|
+
panelSide,
|
|
2730
|
+
setAutoOpenInspector,
|
|
2731
|
+
setCloudLinkedHub,
|
|
2732
|
+
setCpMode,
|
|
2733
|
+
setLayersMode,
|
|
2734
|
+
setLayersOpen,
|
|
2735
|
+
setLocalProjectName,
|
|
2736
|
+
setPanelSide,
|
|
2737
|
+
setSettingsOpen,
|
|
2738
|
+
setTheme,
|
|
2739
|
+
setUpdateReady,
|
|
2740
|
+
settingsOpen,
|
|
2741
|
+
syncStatus,
|
|
2742
|
+
theme,
|
|
2743
|
+
updateReady,
|
|
2744
|
+
viewerMode,
|
|
2745
|
+
zoomCtlVisible,
|
|
2746
|
+
},
|
|
2747
|
+
photoAndTimeline: { toggleAnnotations, toggleMinimap, toggleZoomCtl },
|
|
2748
|
+
} = useShellStore();
|
|
2749
|
+
return (
|
|
2750
|
+
<SettingsSheet
|
|
2751
|
+
cloud={cfg.cloud}
|
|
2752
|
+
readOnly={viewerMode}
|
|
2753
|
+
onClose={() => setSettingsOpen(false)}
|
|
2754
|
+
initialTab={typeof settingsOpen === 'string' ? settingsOpen : undefined}
|
|
2755
|
+
update={updateReady}
|
|
2756
|
+
onUpdateLater={() => setUpdateReady(null)}
|
|
2757
|
+
syncStatus={syncStatus}
|
|
2758
|
+
onLinkedHub={setCloudLinkedHub}
|
|
2759
|
+
onLocalProject={setLocalProjectName}
|
|
2760
|
+
theme={theme}
|
|
2761
|
+
onSetTheme={setTheme}
|
|
2762
|
+
cpMode={cpMode}
|
|
2763
|
+
onSetCpMode={setCpMode}
|
|
2764
|
+
minimapVisible={minimapVisible}
|
|
2765
|
+
onToggleMinimap={toggleMinimap}
|
|
2766
|
+
zoomCtlVisible={zoomCtlVisible}
|
|
2767
|
+
onToggleZoomCtl={toggleZoomCtl}
|
|
2768
|
+
annotationsVisible={annotationsVisible}
|
|
2769
|
+
onToggleAnnotations={toggleAnnotations}
|
|
2770
|
+
autoOpenInspector={autoOpenInspector}
|
|
2771
|
+
onToggleAutoOpenInspector={() => setAutoOpenInspector((v) => !v)}
|
|
2772
|
+
hasCanvas={!!activePath && activePath !== SYSTEM_TAB}
|
|
2773
|
+
panelSide={panelSide}
|
|
2774
|
+
onSetPanelSide={(id, side) => setPanelSide((prev) => ({ ...prev, [id]: side }))}
|
|
2775
|
+
layersMode={layersMode}
|
|
2776
|
+
onSetLayersMode={(m) => {
|
|
2777
|
+
setLayersMode(m);
|
|
2778
|
+
// Leaving separate mode retires the standalone Layers panel.
|
|
2779
|
+
if (m !== 'separate') setLayersOpen(false);
|
|
2780
|
+
}}
|
|
2781
|
+
/>
|
|
2782
|
+
);
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
// V2-2.3: the Viewport surface reads the shell store directly instead of being drilled through ShellTree.
|
|
2786
|
+
function ShellViewport() {
|
|
2787
|
+
const {
|
|
2788
|
+
shellCore: {
|
|
2789
|
+
activePath,
|
|
2790
|
+
canvasError,
|
|
2791
|
+
canvasReloadNonce,
|
|
2792
|
+
cfg,
|
|
2793
|
+
loadedPath,
|
|
2794
|
+
loadingPath,
|
|
2795
|
+
onIframeLoad,
|
|
2796
|
+
previewPath,
|
|
2797
|
+
project,
|
|
2798
|
+
setQuickSetupOpen,
|
|
2799
|
+
setupReadiness,
|
|
2800
|
+
systemData,
|
|
2801
|
+
tabs,
|
|
2802
|
+
viewerMode,
|
|
2803
|
+
},
|
|
2804
|
+
projectData: { loadSystemData },
|
|
2805
|
+
tabs: { openTab, retryCanvasLoad },
|
|
2806
|
+
keyboardShortcuts: { registerIframe },
|
|
2807
|
+
} = useShellStore();
|
|
2808
|
+
return (
|
|
2809
|
+
<Viewport
|
|
2810
|
+
tabs={tabs}
|
|
2811
|
+
activePath={activePath}
|
|
2812
|
+
registerIframe={registerIframe}
|
|
2813
|
+
systemData={systemData}
|
|
2814
|
+
onOpenFromSystem={openTab}
|
|
2815
|
+
onSelectDs={loadSystemData}
|
|
2816
|
+
project={project}
|
|
2817
|
+
cfg={cfg}
|
|
2818
|
+
loadingPath={loadingPath}
|
|
2819
|
+
onIframeLoad={onIframeLoad}
|
|
2820
|
+
canvasError={canvasError}
|
|
2821
|
+
canvasReloadNonce={canvasReloadNonce}
|
|
2822
|
+
onRetryCanvasLoad={retryCanvasLoad}
|
|
2823
|
+
loadedPath={loadedPath}
|
|
2824
|
+
showQuickSetup={isNativeApp() && !viewerMode && !!setupReadiness && !setupReadiness.ready}
|
|
2825
|
+
onStartQuickSetup={() => setQuickSetupOpen(true)}
|
|
2826
|
+
previewPath={previewPath}
|
|
2827
|
+
/>
|
|
2828
|
+
);
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
// V2-2.3: the render tree. It reads the shell store; it owns no state and no effects.
|
|
2832
|
+
function ShellTree() {
|
|
2833
|
+
const {
|
|
2834
|
+
shellCore: {
|
|
2835
|
+
activeArtboards,
|
|
2836
|
+
activeComps,
|
|
2837
|
+
activePath,
|
|
2838
|
+
assetsOpen,
|
|
2839
|
+
assistantBusy,
|
|
2840
|
+
assistantOpen,
|
|
2841
|
+
bodyRef,
|
|
2842
|
+
iframesRef,
|
|
2843
|
+
postToActiveCanvas,
|
|
2844
|
+
brandUploadOpen,
|
|
2845
|
+
canvasActiveArtboard,
|
|
2846
|
+
captureFromCanvas,
|
|
2847
|
+
cfg,
|
|
2848
|
+
diffTarget,
|
|
2849
|
+
dragSide,
|
|
2850
|
+
exportCenter,
|
|
2851
|
+
exportDialog,
|
|
2852
|
+
figmaImportOpen,
|
|
2853
|
+
generateOpen,
|
|
2854
|
+
gitLifecycle,
|
|
2855
|
+
handleAssistantAttention,
|
|
2856
|
+
handleAssistantFinished,
|
|
2857
|
+
helpOpen,
|
|
2858
|
+
introOpen,
|
|
2859
|
+
markUsageSeen,
|
|
2860
|
+
openPanelExclusive,
|
|
2861
|
+
paletteOpen,
|
|
2862
|
+
presentMode,
|
|
2863
|
+
printGuidesVisible,
|
|
2864
|
+
project,
|
|
2865
|
+
quickSetupOpen,
|
|
2866
|
+
readinessOpen,
|
|
2867
|
+
reportBugOpen,
|
|
2868
|
+
rpSize,
|
|
2869
|
+
sbSize,
|
|
2870
|
+
selected,
|
|
2871
|
+
setAssistantBusy,
|
|
2872
|
+
setAssistantOpen,
|
|
2873
|
+
setBrandUploadOpen,
|
|
2874
|
+
setDiffTarget,
|
|
2875
|
+
setDragSide,
|
|
2876
|
+
setExportDialog,
|
|
2877
|
+
setFigmaImportOpen,
|
|
2878
|
+
setGenerateOpen,
|
|
2879
|
+
setGitLifecycle,
|
|
2880
|
+
setHelpOpen,
|
|
2881
|
+
setIntroOpen,
|
|
2882
|
+
setPaletteOpen,
|
|
2883
|
+
setQuickSetupOpen,
|
|
2884
|
+
setReadinessOpen,
|
|
2885
|
+
setReportBugOpen,
|
|
2886
|
+
setShareDialog,
|
|
2887
|
+
setShortcutsOpen,
|
|
2888
|
+
setOrderNotesOpen,
|
|
2889
|
+
setTourSteps,
|
|
2890
|
+
setUpdateReady,
|
|
2891
|
+
settingsOpen,
|
|
2892
|
+
shareDialog,
|
|
2893
|
+
shortcutsOpen,
|
|
2894
|
+
orderNotesOpen,
|
|
2895
|
+
startTour,
|
|
2896
|
+
syncStatus,
|
|
2897
|
+
tabs,
|
|
2898
|
+
wsConnected,
|
|
2899
|
+
theme,
|
|
2900
|
+
togglePanel,
|
|
2901
|
+
tourBus,
|
|
2902
|
+
tourSteps,
|
|
2903
|
+
updateReady,
|
|
2904
|
+
usageNudge,
|
|
2905
|
+
viewerMode,
|
|
2906
|
+
whatsNew,
|
|
2907
|
+
},
|
|
2908
|
+
local: { querySelectionFromCanvas },
|
|
2909
|
+
photoAndTimeline: { settleShellPrompt, shellPromptState },
|
|
2910
|
+
projectData: { loadTree },
|
|
2911
|
+
gitActions: {
|
|
2912
|
+
acceptedDiff,
|
|
2913
|
+
gitDiscard,
|
|
2914
|
+
gitResolveConflict,
|
|
2915
|
+
loadDiffLog,
|
|
2916
|
+
restoreProjectVersion,
|
|
2917
|
+
},
|
|
2918
|
+
tabs: { openSystem, shareLinksFor, shareShell },
|
|
2919
|
+
canvasBridge: {
|
|
2920
|
+
assetPickerReq,
|
|
2921
|
+
insertGeneratedImage,
|
|
2922
|
+
onAssetPicked,
|
|
2923
|
+
onPickMany,
|
|
2924
|
+
onStickerPicked,
|
|
2925
|
+
setAssetPickerReq,
|
|
2926
|
+
setStickerPickerReq,
|
|
2927
|
+
stickerPickerReq,
|
|
2928
|
+
},
|
|
2929
|
+
keyboardShortcuts: { onShellContextMenu },
|
|
2930
|
+
paletteAndPanels: {
|
|
2931
|
+
activeCanvasFile,
|
|
2932
|
+
activeOpenComments,
|
|
2933
|
+
dockLabels,
|
|
2934
|
+
leftActive,
|
|
2935
|
+
leftHostsAssistant,
|
|
2936
|
+
leftIds,
|
|
2937
|
+
paletteActions,
|
|
2938
|
+
renderPanelBody,
|
|
2939
|
+
resizingFor,
|
|
2940
|
+
rightActive,
|
|
2941
|
+
rightHostsAssistant,
|
|
2942
|
+
rightIds,
|
|
2943
|
+
},
|
|
2944
|
+
} = useShellStore();
|
|
2945
|
+
// P8 G1a — the server's role on the open canvas (Export sheet access line, vote sheet), never `cloud.role` alone
|
|
2946
|
+
const activeRole = sessionRole(
|
|
2947
|
+
cfg,
|
|
2948
|
+
activePath ? normalizeOpenPath(activePath, cfg?.designRel) : null
|
|
2949
|
+
);
|
|
2950
|
+
|
|
2951
|
+
// V2-4.1 — panel layout (⌘\ hide, View › Advanced pin) and the insets the islands cause.
|
|
2952
|
+
const {
|
|
2953
|
+
hidden: panelsHidden,
|
|
2954
|
+
pinned,
|
|
2955
|
+
folded: panelsFolded,
|
|
2956
|
+
userHidden: panelsUserHidden,
|
|
2957
|
+
} = usePanelLayout();
|
|
2958
|
+
useHydratePanelLayout();
|
|
2959
|
+
// S8.9 — the Export sheet's "From 14:05" while AI is working: the open canvas's last landed change
|
|
2960
|
+
const exportLastFinishedAt = useLastFinishedAt({
|
|
2961
|
+
open: !!exportDialog,
|
|
2962
|
+
activePath,
|
|
2963
|
+
designRel: (cfg?.designRel || cfg?.designRoot || '.design').replace(/^\/+|\/+$/g, ''),
|
|
2964
|
+
});
|
|
2965
|
+
const floating = !pinned;
|
|
2966
|
+
// V2-8.5 C2 — the Inspector is a 264 px card (14 `.k-insp`), not the user's panel width
|
|
2967
|
+
// P8-C8 — Version history is the 372 px island of 11 `.pn-vh` (pictures 72×54 need the room)
|
|
2968
|
+
// P8 C3 (03 ai-long-pinned): the AI chat pinned to the side is the board's 420 column, not the 304 default of the
|
|
2969
|
+
// other right panels (the canvas then re-fits to the room left of it - `layoutKey` carries the width)
|
|
2970
|
+
// (declared here, above the widths that read `aiInFold` — a const below would be in its temporal dead zone)
|
|
2971
|
+
const [rightInFold, setRightInFold] = useState(false);
|
|
2972
|
+
// P8 C8 (04 md-draw): the AI chat opened during Preview's fold shows by itself (Canvases stay folded)
|
|
2973
|
+
const [aiInFold, setAiInFold] = useState(false);
|
|
2974
|
+
// rc.1 finding 16: the Inspector, Version history and the AI chat each own a width (panel-sizes.js) and the grip
|
|
2975
|
+
// resizes the widest island in its slot. The AI chat (floating or docked) counts toward the slot it is hosted in.
|
|
2976
|
+
const sizes = usePanelSizes();
|
|
2977
|
+
const aiSlotW = aiSlotWidth({ w: sizes.get('ai'), full: sizes.aiFull(), pinned });
|
|
2978
|
+
const rightAiShown = rightHostsAssistant && assistantOpen && (!panelsFolded || aiInFold);
|
|
2979
|
+
const leftAiShown = leftHostsAssistant && assistantOpen;
|
|
2980
|
+
const rightOwn =
|
|
2981
|
+
rightActive === 'inspector' || rightActive === 'changes' ? sizes.get(rightActive) : null;
|
|
2982
|
+
const rpMainW = rightActive
|
|
2983
|
+
? rightMainWidth({ active: rightActive, base: rpSize.w, own: rightOwn })
|
|
2984
|
+
: 0;
|
|
2985
|
+
const rpW = rightPanelWidth({
|
|
2986
|
+
active: rightActive,
|
|
2987
|
+
base: rpSize.w,
|
|
2988
|
+
own: rightOwn,
|
|
2989
|
+
aiW: rightAiShown ? aiSlotW : 0,
|
|
2990
|
+
});
|
|
2991
|
+
const leftW = leftAiShown ? (leftActive ? Math.max(sbSize.w, aiSlotW) : aiSlotW) : sbSize.w;
|
|
2992
|
+
const rightGrip = gripTarget({
|
|
2993
|
+
active: rightActive,
|
|
2994
|
+
mainW: rpMainW,
|
|
2995
|
+
aiW: rightAiShown ? aiSlotW : 0,
|
|
2996
|
+
generic: 'rp',
|
|
2997
|
+
});
|
|
2998
|
+
const leftGrip = gripTarget({
|
|
2999
|
+
active: leftActive,
|
|
3000
|
+
mainW: leftActive ? sbSize.w : 0,
|
|
3001
|
+
aiW: leftAiShown ? aiSlotW : 0,
|
|
3002
|
+
generic: 'sb',
|
|
3003
|
+
});
|
|
3004
|
+
// Opening a panel while ⌘\ hides them brings them all back (the open panel must be seen). V2-4.4b — the AI
|
|
3005
|
+
// chat is its own island: its opening un-hides the panels like any other panel's does. P8 C5 — Preview's fold
|
|
3006
|
+
// is the mode's: an opening does not end it (`panelOpenDecision`); a right panel opened in it (Inspect on a
|
|
3007
|
+
// ⌘-click, Comments) shows by itself, the Canvases and AI chat panels stay folded.
|
|
3008
|
+
const shownRef = useRef({ l: leftActive, r: rightActive, ai: assistantOpen });
|
|
3009
|
+
useEffect(() => {
|
|
3010
|
+
const prev = shownRef.current;
|
|
3011
|
+
const next = { l: leftActive, r: rightActive, ai: assistantOpen };
|
|
3012
|
+
shownRef.current = next;
|
|
3013
|
+
const d = panelOpenDecision({
|
|
3014
|
+
prev,
|
|
3015
|
+
next,
|
|
3016
|
+
userHidden: panelsUserHidden,
|
|
3017
|
+
folded: panelsFolded,
|
|
3018
|
+
rightInFold,
|
|
3019
|
+
aiInFold,
|
|
3020
|
+
});
|
|
3021
|
+
if (d.rightInFold !== rightInFold) setRightInFold(d.rightInFold);
|
|
3022
|
+
if (d.aiInFold !== aiInFold) setAiInFold(d.aiInFold);
|
|
3023
|
+
if (d.show) panelLayout.show();
|
|
3024
|
+
}, [
|
|
3025
|
+
leftActive,
|
|
3026
|
+
rightActive,
|
|
3027
|
+
assistantOpen,
|
|
3028
|
+
panelsUserHidden,
|
|
3029
|
+
panelsFolded,
|
|
3030
|
+
rightInFold,
|
|
3031
|
+
aiInFold,
|
|
3032
|
+
]);
|
|
3033
|
+
// P8 C8 (01 cf-open-big): the panels' hide key folds the canvas toolbar too (the project pill and the share
|
|
3034
|
+
// cluster follow it); every open frame hears it, a frame opened later is seeded on load.
|
|
3035
|
+
useEffect(() => {
|
|
3036
|
+
for (const el of iframesRef.current.values()) {
|
|
3037
|
+
try {
|
|
3038
|
+
// V2-8.9 defender L2 (C6): the frame's canvas origin, never '*'
|
|
3039
|
+
const origin = canvasTargetOrigin(el);
|
|
3040
|
+
if (origin)
|
|
3041
|
+
el.contentWindow.postMessage({ dgn: 'view-chrome', zen: panelsUserHidden }, origin);
|
|
3042
|
+
} catch {}
|
|
3043
|
+
}
|
|
3044
|
+
}, [panelsUserHidden, iframesRef]);
|
|
3045
|
+
const rightMainHidden = panelsHidden && !(rightInFold && !panelsUserHidden);
|
|
3046
|
+
const aiFoldShown = aiInFold && !panelsUserHidden && rightHostsAssistant && assistantOpen;
|
|
3047
|
+
const rightHidden = rightMainHidden && !aiFoldShown;
|
|
3048
|
+
// P8 c5 (03 ai-long-pinned): the chat docked as a column narrows the canvas frame - Fit the canvas to what is left
|
|
3049
|
+
useFitOnAiPin({
|
|
3050
|
+
iframesRef,
|
|
3051
|
+
aiPinned:
|
|
3052
|
+
pinned && !panelsHidden && assistantOpen && (leftHostsAssistant || rightHostsAssistant),
|
|
3053
|
+
});
|
|
3054
|
+
// P8 c6 (01 cf-ai-drafting): while an AI run of yours draws, the camera frames every artboard that has landed
|
|
3055
|
+
const { view: aiRunsView } = useAiRuns();
|
|
3056
|
+
useFitWhileAiDrafts({
|
|
3057
|
+
iframesRef,
|
|
3058
|
+
count: activeArtboards,
|
|
3059
|
+
working: yoursCount(aiRunsView) > 0,
|
|
3060
|
+
});
|
|
3061
|
+
useOccludedInsets({
|
|
3062
|
+
bodyRef,
|
|
3063
|
+
iframesRef,
|
|
3064
|
+
presenting: presentMode,
|
|
3065
|
+
layoutKey: `${pinned}|${panelsHidden}|${rightHidden}|${leftActive}|${rightActive}|${assistantOpen}|${leftW}|${rpW}`,
|
|
3066
|
+
});
|
|
3067
|
+
// V2-4.5c — the canvas toolbar's panels (Stickers, Assets) are the shell's: `toolbar-rect` +
|
|
3068
|
+
// `tool-panel-open`, active canvas only.
|
|
3069
|
+
// S4.4 — the Templates panel the Section tool's "Templates" slot opens (same gate as Stickers).
|
|
3070
|
+
const [templatesReq, setTemplatesReq] = useState(null);
|
|
3071
|
+
// S2.16 — the Component picker (⇧I): same gate, same anchoring as Stickers.
|
|
3072
|
+
const [componentsReq, setComponentsReq] = useState(null);
|
|
3073
|
+
// S7.20 — the F size picker (F over empty canvas): same gate, same anchoring.
|
|
3074
|
+
const [sizesReq, setSizesReq] = useState(null);
|
|
3075
|
+
useToolPanels({
|
|
3076
|
+
activePath,
|
|
3077
|
+
iframesRef,
|
|
3078
|
+
cfg,
|
|
3079
|
+
canEdit: !viewerMode,
|
|
3080
|
+
openStickers: setStickerPickerReq,
|
|
3081
|
+
closeStickers: () => setStickerPickerReq(null),
|
|
3082
|
+
openTemplates: setTemplatesReq,
|
|
3083
|
+
openComponents: setComponentsReq,
|
|
3084
|
+
openSizes: setSizesReq,
|
|
3085
|
+
openAssets: () => {
|
|
3086
|
+
panelLayout.show();
|
|
3087
|
+
openPanelExclusive('assets');
|
|
3088
|
+
},
|
|
3089
|
+
});
|
|
3090
|
+
// V2-8.5 c7 - the open panel reaches the canvas dock (Stickers · E, Image · I press while theirs is up)
|
|
3091
|
+
useShellPanelsRelay({
|
|
3092
|
+
stickersOpen: !!stickerPickerReq,
|
|
3093
|
+
assetsOpen,
|
|
3094
|
+
componentsOpen: !!componentsReq,
|
|
3095
|
+
});
|
|
3096
|
+
// S8.19 — "Waiting for Jonas's Mac" vs Missing: each open canvas hears its pictures' states
|
|
3097
|
+
// (dgn `asset-state`); a Missing frame's Relink… (and the Inspector's box) opens the relink sheet (S8.19c).
|
|
3098
|
+
const relink = useRelinkSheet({ canEdit: !viewerMode });
|
|
3099
|
+
useAssetStateLane({
|
|
3100
|
+
onRelink: relink.onRelink,
|
|
3101
|
+
syncStatus,
|
|
3102
|
+
wsConnected,
|
|
3103
|
+
canvasOrigin: () => cfg?.canvasOrigin || window.location.origin,
|
|
3104
|
+
activeWindow: () =>
|
|
3105
|
+
activePath ? (iframesRef.current.get(activePath)?.contentWindow ?? null) : null,
|
|
3106
|
+
});
|
|
3107
|
+
// The AI chat island's body. Always mounted (the island is `hidden`, not removed), so its stream survives
|
|
3108
|
+
// a Hide (DDR-123).
|
|
3109
|
+
const renderAssistant = () => (
|
|
3110
|
+
<ChatPanel
|
|
3111
|
+
hidden={!assistantOpen}
|
|
3112
|
+
activeCanvas={activeCanvasFile}
|
|
3113
|
+
selected={selected}
|
|
3114
|
+
openComments={activeOpenComments}
|
|
3115
|
+
// S5.8 — the scope chip's "this artboard" is the one the canvas view is on
|
|
3116
|
+
viewArtboardId={canvasActiveArtboard}
|
|
3117
|
+
designRel={(cfg?.designRel || cfg?.designRoot || '.design').replace(/^\/+|\/+$/g, '')}
|
|
3118
|
+
resizing={resizingFor('assistant')}
|
|
3119
|
+
onClose={() => setAssistantOpen(false)}
|
|
3120
|
+
onBusyChange={setAssistantBusy}
|
|
3121
|
+
onFinished={handleAssistantFinished}
|
|
3122
|
+
onPermissionRequest={handleAssistantAttention}
|
|
3123
|
+
onElicitationRequest={handleAssistantAttention}
|
|
3124
|
+
// S5.12 — the chat list's role gate (a Can view session reads, never writes) and its project chip
|
|
3125
|
+
readOnly={viewerMode}
|
|
3126
|
+
projectName={cfg?.cloud?.projectName || project || ''}
|
|
3127
|
+
/>
|
|
3128
|
+
);
|
|
633
3129
|
|
|
634
3130
|
return (
|
|
635
3131
|
<div
|
|
@@ -637,1017 +3133,180 @@ function App() {
|
|
|
637
3133
|
data-theme={theme}
|
|
638
3134
|
onContextMenu={onShellContextMenu}
|
|
639
3135
|
>
|
|
640
|
-
{
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
<
|
|
644
|
-
<
|
|
3136
|
+
{/* V2-4.8b — the top banners (sync diverged / rejected, role, update, repo changed, format gate) are
|
|
3137
|
+
callouts now, ONE stack. A child of `.maude`, not of `.sh-body`: Presentation mode must not hide a
|
|
3138
|
+
fail-closed sync warning (DDR-102, phase-28 audit F-1). */}
|
|
3139
|
+
<ShellCallouts />
|
|
3140
|
+
<ShellMentionCallouts />
|
|
645
3141
|
{/* First-upgrade consent (Task 2) — global on purpose: a consent that
|
|
646
3142
|
only appears if you happen to open the Sync panel is not consent.
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
<NotificationHost
|
|
650
|
-
|
|
651
|
-
|
|
3143
|
+
(S6.15: there is no first-run wizard to stack under any more.) */}
|
|
3144
|
+
<SyncConsentDialog status={syncStatus} cloud={cfg.cloud} />
|
|
3145
|
+
<NotificationHost
|
|
3146
|
+
paused={!!tourSteps}
|
|
3147
|
+
hiddenGroups={exportCenter.panelOpen ? ['exports'] : []}
|
|
3148
|
+
/>
|
|
652
3149
|
<ExportToast center={exportCenter} />
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
try {
|
|
662
|
-
window.location.reload();
|
|
663
|
-
} catch {}
|
|
664
|
-
}}
|
|
665
|
-
>
|
|
666
|
-
Reload
|
|
667
|
-
</button>
|
|
668
|
-
<button type="button" className="btn btn--ghost btn--sm" onClick={() => setGitLifecycle(null)}>
|
|
669
|
-
Dismiss
|
|
670
|
-
</button>
|
|
671
|
-
</div>
|
|
672
|
-
)}
|
|
673
|
-
<div className="st-shell">
|
|
674
|
-
<Menubar
|
|
675
|
-
sharePath={sharePath}
|
|
676
|
-
onShare={() => showShare()}
|
|
677
|
-
readOnly={viewerMode}
|
|
678
|
-
// Cloud Phase 27 C2/C4 — the ONE cloud-only input the shared chrome
|
|
679
|
-
// takes. A prop, not the whole `cfg`: the Menubar needs to know it is
|
|
680
|
-
// in a browser tab on somebody else's machine, and nothing else.
|
|
681
|
-
cloud={cfg.cloud}
|
|
682
|
-
activePath={activePath}
|
|
683
|
-
project={project}
|
|
684
|
-
tabsCount={tabs.length}
|
|
685
|
-
openMenu={openMenu}
|
|
686
|
-
setOpenMenu={setOpenMenu}
|
|
687
|
-
commentsPanelOpen={commentsPanelOpen}
|
|
688
|
-
onToggleComments={() => toggleRightPanel('comments')}
|
|
689
|
-
changesOpen={changesOpen}
|
|
690
|
-
changesCount={unsavedCount}
|
|
691
|
-
onToggleChanges={() => toggleRightPanel('changes')}
|
|
692
|
-
onOpenSystem={openSystem}
|
|
693
|
-
sidebarOpen={sidebarOpen}
|
|
694
|
-
onToggleSidebar={() => togglePanel('tree')}
|
|
695
|
-
showHidden={showHidden}
|
|
696
|
-
onToggleShowHidden={() => setShowHidden((v) => !v)}
|
|
697
|
-
onOpenHelp={() => setHelpOpen(true)}
|
|
698
|
-
onOpenShortcuts={() => setShortcutsOpen(true)}
|
|
699
|
-
onReportBug={() => setReportBugOpen(true)}
|
|
700
|
-
onStartTour={() => startTour(USAGE_TOUR)}
|
|
701
|
-
onStartCollabTour={() => startTour(COLLAB_TOUR)}
|
|
702
|
-
annotationsVisible={annotationsVisible}
|
|
703
|
-
onToggleAnnotations={toggleAnnotations}
|
|
704
|
-
minimapVisible={minimapVisible}
|
|
705
|
-
onToggleMinimap={toggleMinimap}
|
|
706
|
-
zoomCtlVisible={zoomCtlVisible}
|
|
707
|
-
onToggleZoomCtl={toggleZoomCtl}
|
|
708
|
-
presentMode={presentMode}
|
|
709
|
-
onTogglePresent={togglePresent}
|
|
710
|
-
printGuidesVisible={printGuidesVisible}
|
|
711
|
-
onTogglePrintGuides={togglePrintGuides}
|
|
712
|
-
postToActiveCanvas={postToActiveCanvas}
|
|
713
|
-
onOpenReadiness={() => setReadinessOpen(true)}
|
|
714
|
-
onOpenQuickSetup={() => setQuickSetupOpen(true)}
|
|
715
|
-
onWatchIntro={() => setIntroOpen(true)}
|
|
716
|
-
onOpenWhatsNew={whatsNew.openPanel}
|
|
717
|
-
whatsNewCount={whatsNew.unseen.length}
|
|
718
|
-
exportCenter={exportCenter}
|
|
719
|
-
artboardCount={activeArtboards}
|
|
720
|
-
inspectorOpen={inspectorOpen}
|
|
721
|
-
inspectorTab={inspectorTab}
|
|
722
|
-
onToggleInspector={() => toggleRightPanel('inspector')}
|
|
723
|
-
autoOpenInspector={autoOpenInspector}
|
|
724
|
-
onToggleAutoOpenInspector={() => setAutoOpenInspector((v) => !v)}
|
|
725
|
-
onInsertArtboard={onInsertArtboard}
|
|
726
|
-
timelineOpen={timelineOpen}
|
|
727
|
-
onToggleTimeline={toggleTimeline}
|
|
728
|
-
hasComps={activeComps.length > 0}
|
|
729
|
-
assistantOpen={assistantOpen}
|
|
730
|
-
onToggleAssistant={() => toggleRightPanel('assistant')}
|
|
731
|
-
assistantBusy={assistantBusy}
|
|
732
|
-
assistantUnseen={assistantUnseen}
|
|
733
|
-
onOpenLayers={() => {
|
|
734
|
-
// feature-configurable-panel-docking — Layers is its own dockable
|
|
735
|
-
// panel when layersMode==='separate' (toggle it), else it's the
|
|
736
|
-
// Inspector's Layers tab (open the inspector on that tab).
|
|
737
|
-
if (layersMode === 'separate') {
|
|
738
|
-
togglePanel('layers');
|
|
739
|
-
} else if (inspectorOpen && inspectorTab === 'layers') {
|
|
740
|
-
setInspectorOpen(false);
|
|
741
|
-
} else {
|
|
742
|
-
setInspectorTab('layers');
|
|
743
|
-
openPanelExclusive('inspector');
|
|
744
|
-
}
|
|
745
|
-
}}
|
|
746
|
-
onNewCanvas={() => {
|
|
747
|
-
openPanelExclusive('tree');
|
|
748
|
-
setTimeout(
|
|
749
|
-
() => document.querySelector('[aria-label="New blank brief board"]')?.click(),
|
|
750
|
-
60
|
|
751
|
-
);
|
|
752
|
-
}}
|
|
753
|
-
onAssembleVideo={assembleVideo}
|
|
754
|
-
onOpenExport={(mode) => setExportDialog({ mode })}
|
|
755
|
-
onOpenSettings={() => setSettingsOpen(true)}
|
|
756
|
-
onOpenGenerate={() => setGenerateOpen(true)}
|
|
757
|
-
onReload={reloadActive}
|
|
758
|
-
onCloseCanvas={() => activePath && closeTab(activePath)}
|
|
759
|
-
presence={
|
|
760
|
-
<>
|
|
761
|
-
<StAvatar
|
|
762
|
-
initials={initialsOf(gitUser || 'you')}
|
|
763
|
-
hue="var(--accent)"
|
|
764
|
-
title={gitUser ? `${gitUser} (you)` : 'You'}
|
|
765
|
-
/>
|
|
766
|
-
{agentActive && (
|
|
767
|
-
<StAvatar
|
|
768
|
-
initials="C"
|
|
769
|
-
hue="var(--presence-agent)"
|
|
770
|
-
title="Claude · editing"
|
|
771
|
-
pulse
|
|
772
|
-
/>
|
|
773
|
-
)}
|
|
774
|
-
</>
|
|
3150
|
+
<div className="sh-shell">
|
|
3151
|
+
{/* V2-4.1 — the canvas is the whole window body. Floating (default): the dock slots are
|
|
3152
|
+
`.island`s over it and the folded corner icons are the way back; pinned (View › Advanced):
|
|
3153
|
+
today's docked columns. ⌘\ hides every panel either way. Every island root carries
|
|
3154
|
+
`data-occludes` and the insets reach the canvas through useOccludedInsets. */}
|
|
3155
|
+
<div
|
|
3156
|
+
className={
|
|
3157
|
+
'sh-body' + (floating ? ' sh-body--float' : '') + (dragSide ? ' is-resizing' : '')
|
|
775
3158
|
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
<
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
3159
|
+
ref={bodyRef}
|
|
3160
|
+
style={{ '--sb-w': `${leftW}px`, '--rp-w': `${rpW}px` }}
|
|
3161
|
+
>
|
|
3162
|
+
<ShellProjectPill />
|
|
3163
|
+
{/* V2-4.7b — Menu › Diagnostics: Logs · Server · AI setup · Sync (today's Sync panel, whole). */}
|
|
3164
|
+
<DiagnosticsHost toast={shellToast} />
|
|
3165
|
+
{/* V2-4.3a — the Share cluster, top-right: faces, status word, comments, Exports, Hide panels, Share. */}
|
|
3166
|
+
<ShellShareCluster />
|
|
3167
|
+
{/* S2.20 — Menu › Edit › Undo history… (the ⌘Z projection's popover). */}
|
|
3168
|
+
<ShellUndoHistory />
|
|
3169
|
+
{/* S3.9 — Preview's own islands: "Previewing <canvas> · esc to edit" top centre, the zoom readout
|
|
3170
|
+
bottom left. Nothing in the other modes. */}
|
|
3171
|
+
<ShellPreviewChrome />
|
|
3172
|
+
{/* S8.16 — a generated picture selected: "Take 3 of 4" ‹ › ← → and "Picture made by AI". */}
|
|
3173
|
+
<ShellTakes />
|
|
3174
|
+
{/* S3.11 — Inspect: the specs of the element a ⌘-click (Preview) / click (Viewing) points at. */}
|
|
3175
|
+
<ShellInspectPanel />
|
|
3176
|
+
{/* S1.14 — "Viewing “…” · 5 Oct, 18:40 · Jonas · esc back to now" while the mode store holds a past version. */}
|
|
3177
|
+
<ViewBarHost activePath={activePath} />
|
|
3178
|
+
{/* S10.8 — "Update N canvases" (the design-system review) and the Canvases rows' update word. */}
|
|
3179
|
+
<DsReviewHost
|
|
3180
|
+
cfg={cfg}
|
|
3181
|
+
activePath={activePath}
|
|
3182
|
+
toast={shellToast}
|
|
3183
|
+
scope={project}
|
|
3184
|
+
reloadTree={loadTree}
|
|
3185
|
+
frameFor={() => (activePath ? iframesRef.current.get(activePath) : null)}
|
|
788
3186
|
/>
|
|
3187
|
+
{/* S11.2 — "Your canvas is ready." on a canvas with no artboards, the empty-artboard hint, Ask AI to fill. */}
|
|
3188
|
+
<EmptyHost />
|
|
3189
|
+
{/* S7.7 — the timeline is an island tied to the selected video artboard (it was a bottom dock, DDR-148). */}
|
|
3190
|
+
<TimelineHost>
|
|
3191
|
+
<ShellTimelinePanel />
|
|
3192
|
+
</TimelineHost>
|
|
3193
|
+
{/* Round 11 (10 co-comment-video): Preview's read-only comment strip under a video board. */}
|
|
3194
|
+
<CommentStripHost />
|
|
3195
|
+
{/* S7.11 — the Transcript panel (left slot, Q17) and the feed that keeps a video's words fresh. */}
|
|
3196
|
+
<TranscriptHost />
|
|
3197
|
+
{/* S6.3 — the intent Home parked for this window (a canvas from one sentence, an import): taken once. */}
|
|
3198
|
+
<IntentHost />
|
|
3199
|
+
{/* R3 (6) — "New canvas" / "New brief canvas" ask for the name in a centered dialog, from any door. */}
|
|
3200
|
+
<NameDialogHost />
|
|
3201
|
+
{/* S2.19 — ⌘/ on a selection: the bubble under it, and the asked line while AI works. */}
|
|
3202
|
+
<AskSelectionHost />
|
|
3203
|
+
{/* S9.24 — offline foot, the back-online toast, the "2 versions" mark and the conflict card. */}
|
|
3204
|
+
<SyncStatesHost />
|
|
3205
|
+
{/* LEFT dock slot (feature-configurable-panel-docking). V2-4.4b — Canvases · Layers · Assets keep a
|
|
3206
|
+
tab strip in the panel's OWN header; the AI chat, when docked here, is a separate island under it
|
|
3207
|
+
(always mounted, so its stream survives — DDR-123). Folded, the corner icon below is the way back. */}
|
|
789
3208
|
{(leftActive || leftHostsAssistant) && (
|
|
790
3209
|
<DockSlot
|
|
791
3210
|
side="left"
|
|
792
|
-
width={
|
|
3211
|
+
width={leftW}
|
|
3212
|
+
mainWidth={leftW > sbSize.w ? sbSize.w : 0}
|
|
793
3213
|
open={!!leftActive}
|
|
794
3214
|
ids={leftIds}
|
|
795
3215
|
activeId={leftActive}
|
|
796
|
-
|
|
3216
|
+
// r2-p3 F27: a tab selects; only Hide (the fold) closes — the active tab no longer hides the panel
|
|
3217
|
+
onPick={(id) => id !== leftActive && togglePanel(id)}
|
|
3218
|
+
onFold={() => leftActive && togglePanel(leftActive)}
|
|
797
3219
|
labels={dockLabels}
|
|
3220
|
+
floating={floating}
|
|
3221
|
+
hidden={panelsHidden}
|
|
3222
|
+
aiShown={leftHostsAssistant && assistantOpen}
|
|
3223
|
+
ai={leftHostsAssistant ? renderAssistant() : null}
|
|
798
3224
|
>
|
|
799
|
-
{
|
|
800
|
-
<ChatPanel
|
|
801
|
-
hidden={leftActive !== 'assistant'}
|
|
802
|
-
activeCanvas={activeCanvasFile}
|
|
803
|
-
selected={selected}
|
|
804
|
-
openComments={activeOpenComments}
|
|
805
|
-
designRel={(cfg?.designRel || cfg?.designRoot || '.design').replace(/^\/+|\/+$/g, '')}
|
|
806
|
-
resizing={resizingFor('assistant')}
|
|
807
|
-
onClose={() => setAssistantOpen(false)}
|
|
808
|
-
onBusyChange={setAssistantBusy}
|
|
809
|
-
onFinished={handleAssistantFinished}
|
|
810
|
-
onPermissionRequest={handleAssistantAttention}
|
|
811
|
-
onElicitationRequest={handleAssistantAttention}
|
|
812
|
-
/>
|
|
813
|
-
)}
|
|
814
|
-
{leftActive && leftActive !== 'assistant' && renderPanelBody(leftActive)}
|
|
3225
|
+
{leftActive && renderPanelBody(leftActive)}
|
|
815
3226
|
</DockSlot>
|
|
816
3227
|
)}
|
|
817
|
-
{leftActive && (
|
|
3228
|
+
{(leftActive || (leftHostsAssistant && assistantOpen)) && !panelsHidden && (
|
|
818
3229
|
<PanelGrip
|
|
819
3230
|
label="Resize left panel"
|
|
820
|
-
size={sbSize}
|
|
3231
|
+
size={leftGrip === 'ai' ? sizes.handle('ai') : sbSize}
|
|
821
3232
|
active={dragSide === 'sb'}
|
|
822
3233
|
onPointerDown={(e) => {
|
|
823
3234
|
e.preventDefault();
|
|
824
3235
|
e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
3236
|
+
sizes.setTarget(leftGrip);
|
|
825
3237
|
setDragSide('sb');
|
|
826
3238
|
}}
|
|
827
3239
|
/>
|
|
828
3240
|
)}
|
|
829
3241
|
<div className="main">
|
|
830
|
-
<
|
|
831
|
-
tabs={tabs}
|
|
832
|
-
activePath={activePath}
|
|
833
|
-
registerIframe={registerIframe}
|
|
834
|
-
systemData={systemData}
|
|
835
|
-
onOpenFromSystem={openTab}
|
|
836
|
-
onSelectDs={loadSystemData}
|
|
837
|
-
project={project}
|
|
838
|
-
cfg={cfg}
|
|
839
|
-
loadingPath={loadingPath}
|
|
840
|
-
onIframeLoad={onIframeLoad}
|
|
841
|
-
canvasError={canvasError}
|
|
842
|
-
canvasReloadNonce={canvasReloadNonce}
|
|
843
|
-
onRetryCanvasLoad={retryCanvasLoad}
|
|
844
|
-
loadedPath={loadedPath}
|
|
845
|
-
showQuickSetup={
|
|
846
|
-
isNativeApp() && !viewerMode && !!setupReadiness && !setupReadiness.ready
|
|
847
|
-
}
|
|
848
|
-
onStartQuickSetup={() => setQuickSetupOpen(true)}
|
|
849
|
-
previewPath={previewPath}
|
|
850
|
-
/>
|
|
3242
|
+
<ShellViewport />
|
|
851
3243
|
</div>
|
|
852
|
-
{rightActive && (
|
|
3244
|
+
{(rightActive || (rightHostsAssistant && assistantOpen)) && !rightHidden && (
|
|
853
3245
|
<PanelGrip
|
|
854
3246
|
label="Resize right panel"
|
|
855
3247
|
dir="rtl"
|
|
856
|
-
size={rpSize}
|
|
3248
|
+
size={rightGrip === 'rp' ? rpSize : sizes.handle(rightGrip)}
|
|
857
3249
|
active={dragSide === 'rp'}
|
|
858
3250
|
onPointerDown={(e) => {
|
|
859
3251
|
e.preventDefault();
|
|
860
3252
|
e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
3253
|
+
sizes.setTarget(rightGrip);
|
|
861
3254
|
setDragSide('rp');
|
|
862
3255
|
}}
|
|
863
3256
|
/>
|
|
864
3257
|
)}
|
|
865
|
-
{/* RIGHT dock slot (feature-configurable-panel-docking).
|
|
866
|
-
|
|
867
|
-
|
|
3258
|
+
{/* RIGHT dock slot (feature-configurable-panel-docking). V2-4.4b — separate islands, no tab strip:
|
|
3259
|
+
the main island is Inspector / Comments / Changes / Sync (opening one replaces another; each has
|
|
3260
|
+
its own opener), the AI chat its own island, native-only. */}
|
|
868
3261
|
{(rightActive || rightHostsAssistant) && (
|
|
869
3262
|
<DockSlot
|
|
870
3263
|
side="right"
|
|
871
|
-
width={
|
|
872
|
-
|
|
3264
|
+
width={rpW}
|
|
3265
|
+
mainWidth={rightMainWidth({ active: rightActive, base: rpSize.w, own: rightOwn })}
|
|
3266
|
+
open={!!rightActive && !rightMainHidden}
|
|
873
3267
|
ids={rightIds}
|
|
874
3268
|
activeId={rightActive}
|
|
875
|
-
onPick={togglePanel}
|
|
3269
|
+
onPick={(id) => id !== rightActive && togglePanel(id)}
|
|
3270
|
+
onFold={() => rightActive && togglePanel(rightActive)}
|
|
876
3271
|
labels={dockLabels}
|
|
3272
|
+
floating={floating}
|
|
3273
|
+
hidden={rightHidden}
|
|
3274
|
+
aiShown={rightAiShown}
|
|
3275
|
+
ai={rightHostsAssistant ? renderAssistant() : null}
|
|
877
3276
|
>
|
|
878
|
-
{
|
|
879
|
-
<ChatPanel
|
|
880
|
-
hidden={rightActive !== 'assistant'}
|
|
881
|
-
activeCanvas={activeCanvasFile}
|
|
882
|
-
selected={selected}
|
|
883
|
-
openComments={activeOpenComments}
|
|
884
|
-
designRel={(cfg?.designRel || cfg?.designRoot || '.design').replace(/^\/+|\/+$/g, '')}
|
|
885
|
-
resizing={resizingFor('assistant')}
|
|
886
|
-
onClose={() => setAssistantOpen(false)}
|
|
887
|
-
onBusyChange={setAssistantBusy}
|
|
888
|
-
onFinished={handleAssistantFinished}
|
|
889
|
-
onPermissionRequest={handleAssistantAttention}
|
|
890
|
-
onElicitationRequest={handleAssistantAttention}
|
|
891
|
-
/>
|
|
892
|
-
)}
|
|
893
|
-
{rightActive && rightActive !== 'assistant' && renderPanelBody(rightActive)}
|
|
3277
|
+
{rightActive && renderPanelBody(rightActive)}
|
|
894
3278
|
</DockSlot>
|
|
895
3279
|
)}
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
setTimelinePlaying(false);
|
|
913
|
-
postToActiveCanvas({ dgn: 'timeline-seek', frame: f, id: timelineCompId });
|
|
914
|
-
}}
|
|
915
|
-
onPlay={() => {
|
|
916
|
-
setTimelinePlaying(true);
|
|
917
|
-
// Sync mute + loop to the Player, then play (the artboard has no
|
|
918
|
-
// chrome — the Timeline owns transport/sound/loop now).
|
|
919
|
-
postToActiveCanvas({ dgn: 'timeline-mute', muted: timelineMuted, id: timelineCompId });
|
|
920
|
-
postToActiveCanvas({ dgn: 'timeline-loop', loop: timelineLoop, id: timelineCompId });
|
|
921
|
-
postToActiveCanvas({ dgn: 'timeline-play', id: timelineCompId });
|
|
922
|
-
}}
|
|
923
|
-
onPause={() => {
|
|
924
|
-
setTimelinePlaying(false);
|
|
925
|
-
postToActiveCanvas({ dgn: 'timeline-pause', id: timelineCompId });
|
|
926
|
-
}}
|
|
927
|
-
onToggleLoop={() =>
|
|
928
|
-
setTimelineLoop((v) => {
|
|
929
|
-
const next = !v;
|
|
930
|
-
postToActiveCanvas({ dgn: 'timeline-loop', loop: next, id: timelineCompId });
|
|
931
|
-
return next;
|
|
932
|
-
})
|
|
933
|
-
}
|
|
934
|
-
muted={timelineMuted}
|
|
935
|
-
onToggleMute={() => {
|
|
936
|
-
setTimelineMuted((v) => {
|
|
937
|
-
const next = !v;
|
|
938
|
-
postToActiveCanvas({ dgn: 'timeline-mute', muted: next, id: timelineCompId });
|
|
939
|
-
return next;
|
|
940
|
-
});
|
|
941
|
-
}}
|
|
942
|
-
volume={timelineVolume}
|
|
943
|
-
onVolume={(v) => {
|
|
944
|
-
setTimelineVolume(v);
|
|
945
|
-
// Dragging volume implies "I want to hear it" — unmute.
|
|
946
|
-
if (v > 0 && timelineMuted) {
|
|
947
|
-
setTimelineMuted(false);
|
|
948
|
-
postToActiveCanvas({ dgn: 'timeline-mute', muted: false, id: timelineCompId });
|
|
949
|
-
}
|
|
950
|
-
postToActiveCanvas({ dgn: 'timeline-volume', volume: v, id: timelineCompId });
|
|
951
|
-
}}
|
|
952
|
-
onRetime={(clipRef, patch) => {
|
|
953
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
954
|
-
// DDR-150 P2 / Task 3 — the panel hands a { stableId, index }
|
|
955
|
-
// clipRef; stableId addressing wins (multi-comp-safe), the row
|
|
956
|
-
// index stays as the legacy fallback when the enumerator is
|
|
957
|
-
// unavailable.
|
|
958
|
-
const artboardId = timelineArtboardId || undefined;
|
|
959
|
-
const ccUrl = `/_api/comp-clips?canvas=${encodeURIComponent(activePath)}${artboardId ? `&artboardId=${encodeURIComponent(artboardId)}` : ''}`;
|
|
960
|
-
fetch(ccUrl)
|
|
961
|
-
.then((r) => r.json().catch(() => ({})))
|
|
962
|
-
.then((cc) => {
|
|
963
|
-
const clip = resolveClipRef(cc, clipRef);
|
|
964
|
-
const legacyIndex =
|
|
965
|
-
clipRef && typeof clipRef === 'object' ? clipRef.index : clipRef;
|
|
966
|
-
const body = clip?.stableId
|
|
967
|
-
? {
|
|
968
|
-
canvas: activePath,
|
|
969
|
-
artboardId,
|
|
970
|
-
stableId: clip.stableId,
|
|
971
|
-
contentHash: clip.contentHash,
|
|
972
|
-
...patch,
|
|
973
|
-
}
|
|
974
|
-
: { canvas: activePath, index: legacyIndex, ...patch };
|
|
975
|
-
return fetch('/_api/retime-sequence', {
|
|
976
|
-
method: 'POST',
|
|
977
|
-
headers: { 'content-type': 'application/json' },
|
|
978
|
-
body: JSON.stringify(body),
|
|
979
|
-
});
|
|
980
|
-
})
|
|
981
|
-
.then((r) => r.json())
|
|
982
|
-
.then((j) => {
|
|
983
|
-
if (!j?.ok) {
|
|
984
|
-
console.warn('[retime]', j?.error || 'failed');
|
|
985
|
-
timelineOpFailed('Retime refused', j?.error);
|
|
986
|
-
} else {
|
|
987
|
-
shellToast(patch.from != null ? 'Clip moved.' : 'Clip trimmed.', true);
|
|
988
|
-
if (j?.seq != null)
|
|
989
|
-
pushTlUndo(activePath, j.seq, patch.from != null ? 'move clip' : 'trim clip');
|
|
990
|
-
}
|
|
991
|
-
// The file watcher reloads the canvas → re-announce → the
|
|
992
|
-
// source-fetch effect re-parses the new timing.
|
|
993
|
-
})
|
|
994
|
-
.catch(() => {});
|
|
995
|
-
}}
|
|
996
|
-
onRemove={timelineRemoveClip}
|
|
997
|
-
onReplace={(clipRef) => {
|
|
998
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
999
|
-
// DDR-150 P3 + dogfood #5 — replace a clip's media. The file picker
|
|
1000
|
-
// MUST open synchronously inside the click gesture: browsers revoke
|
|
1001
|
-
// the transient user-activation after an await/fetch round-trip, so
|
|
1002
|
-
// the old fetch-then-click() silently no-oped ("replace neotevře
|
|
1003
|
-
// žádné okno"). Picker first; resolve the target + upload in the
|
|
1004
|
-
// change handler.
|
|
1005
|
-
replaceMediaViaPicker({
|
|
1006
|
-
accept: 'video/*,image/*',
|
|
1007
|
-
resolveTarget: (cc) => {
|
|
1008
|
-
const clip = resolveClipRef(cc, clipRef);
|
|
1009
|
-
if (clip?.mediaArrayRef) return { arrayRef: clip.mediaArrayRef };
|
|
1010
|
-
if (clip?.mediaCdId) return { cdId: clip.mediaCdId };
|
|
1011
|
-
return null;
|
|
1012
|
-
},
|
|
1013
|
-
});
|
|
1014
|
-
}}
|
|
1015
|
-
onReplaceAudio={(index) => {
|
|
1016
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1017
|
-
// DDR-150 dogfood #5 — audio beds are addressable too: the
|
|
1018
|
-
// enumerator lists loose media (an <Audio> under the reel) with a
|
|
1019
|
-
// cd-id; ⇄ on the audio row swaps its src.
|
|
1020
|
-
replaceMediaViaPicker({
|
|
1021
|
-
accept: 'audio/*',
|
|
1022
|
-
resolveTarget: (cc) => {
|
|
1023
|
-
const beds =
|
|
1024
|
-
cc?.ok && Array.isArray(cc.media)
|
|
1025
|
-
? cc.media.filter((m) => m.tag === 'Audio')
|
|
1026
|
-
: [];
|
|
1027
|
-
return beds[index]?.cdId ? { cdId: beds[index].cdId } : null;
|
|
1028
|
-
},
|
|
1029
|
-
});
|
|
1030
|
-
}}
|
|
1031
|
-
onReplaceLayer={(clipRef, layerIndex) => {
|
|
1032
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1033
|
-
// DDR-150 dogfood — replace a SPECIFIC layer inside an expanded clip
|
|
1034
|
-
// (the mp4 background separately from the title layer). Targets the
|
|
1035
|
-
// layer's own media (array-fed or literal-src) from the enumerator.
|
|
1036
|
-
const rowIndex = clipRef && typeof clipRef === 'object' ? clipRef.index : clipRef;
|
|
1037
|
-
const kind =
|
|
1038
|
-
timelineSequences[rowIndex]?.layers?.[layerIndex]?.kind === 'audio'
|
|
1039
|
-
? 'audio/*'
|
|
1040
|
-
: timelineSequences[rowIndex]?.layers?.[layerIndex]?.kind === 'image'
|
|
1041
|
-
? 'image/*'
|
|
1042
|
-
: 'video/*';
|
|
1043
|
-
replaceMediaViaPicker({
|
|
1044
|
-
accept: kind,
|
|
1045
|
-
resolveTarget: (cc) => {
|
|
1046
|
-
const ly = resolveClipRef(cc, clipRef)?.layers?.[layerIndex];
|
|
1047
|
-
if (ly?.mediaArrayRef) return { arrayRef: ly.mediaArrayRef };
|
|
1048
|
-
if (ly?.mediaCdId) return { cdId: ly.mediaCdId };
|
|
1049
|
-
return null;
|
|
1050
|
-
},
|
|
1051
|
-
});
|
|
1052
|
-
}}
|
|
1053
|
-
onReorder={(clipRef, direction) => {
|
|
1054
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1055
|
-
// DDR-150 P5 — z-order reorder: move a standalone <Sequence> before/
|
|
1056
|
-
// after a sibling (render stacking; later sibling paints on top).
|
|
1057
|
-
// ▲ forward = move AFTER the next sibling; ▼ backward = move BEFORE
|
|
1058
|
-
// the previous sibling. Both clips addressed by comp-scoped stableId +
|
|
1059
|
-
// fingerprint (via /_api/comp-clips); the engine refuses a TransitionSeries
|
|
1060
|
-
// clip + a stale/raced target, then reloads via the file watcher.
|
|
1061
|
-
const artboardId = timelineArtboardId || undefined;
|
|
1062
|
-
const ccUrl = `/_api/comp-clips?canvas=${encodeURIComponent(activePath)}${artboardId ? `&artboardId=${encodeURIComponent(artboardId)}` : ''}`;
|
|
1063
|
-
fetch(ccUrl)
|
|
1064
|
-
.then((r) => r.json().catch(() => ({})))
|
|
1065
|
-
.then((cc) => {
|
|
1066
|
-
const seqs =
|
|
1067
|
-
cc?.ok && Array.isArray(cc.clips)
|
|
1068
|
-
? cc.clips.filter((c) => c.kind === 'sequence')
|
|
1069
|
-
: [];
|
|
1070
|
-
const moved = resolveClipRef(cc, clipRef);
|
|
1071
|
-
const index = moved ? seqs.indexOf(moved) : -1;
|
|
1072
|
-
const refIdx = direction === 'forward' ? index + 1 : index - 1;
|
|
1073
|
-
const ref = index >= 0 ? seqs[refIdx] || null : null;
|
|
1074
|
-
const position = direction === 'forward' ? 'after' : 'before';
|
|
1075
|
-
if (!moved?.stableId || !ref?.stableId) return null;
|
|
1076
|
-
return fetch('/_api/reorder-sequence', {
|
|
1077
|
-
method: 'POST',
|
|
1078
|
-
headers: { 'content-type': 'application/json' },
|
|
1079
|
-
body: JSON.stringify({
|
|
1080
|
-
canvas: activePath,
|
|
1081
|
-
artboardId,
|
|
1082
|
-
stableId: moved.stableId,
|
|
1083
|
-
contentHash: moved.contentHash,
|
|
1084
|
-
refStableId: ref.stableId,
|
|
1085
|
-
refContentHash: ref.contentHash,
|
|
1086
|
-
position,
|
|
1087
|
-
}),
|
|
1088
|
-
});
|
|
1089
|
-
})
|
|
1090
|
-
.then((r) => (r ? r.json() : null))
|
|
1091
|
-
.then((j) => {
|
|
1092
|
-
if (j && !j.ok) {
|
|
1093
|
-
console.warn('[reorder-clip]', j.error || 'failed');
|
|
1094
|
-
timelineOpFailed('Reorder refused', j.error);
|
|
1095
|
-
} else if (j?.seq != null) {
|
|
1096
|
-
pushTlUndo(activePath, j.seq, 'reorder clip');
|
|
1097
|
-
}
|
|
1098
|
-
})
|
|
1099
|
-
.catch(() => {});
|
|
1100
|
-
}}
|
|
1101
|
-
onToggleHide={(clipRef) => {
|
|
1102
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1103
|
-
// DDR-150 dogfood — hide/show a clip (gates its body behind
|
|
1104
|
-
// {false && …}; the tag + time slot stay). Addressed by comp-scoped
|
|
1105
|
-
// stableId + fingerprint.
|
|
1106
|
-
const artboardId = timelineArtboardId || undefined;
|
|
1107
|
-
const ccUrl = `/_api/comp-clips?canvas=${encodeURIComponent(activePath)}${artboardId ? `&artboardId=${encodeURIComponent(artboardId)}` : ''}`;
|
|
1108
|
-
fetch(ccUrl)
|
|
1109
|
-
.then((r) => r.json().catch(() => ({})))
|
|
1110
|
-
.then((cc) => {
|
|
1111
|
-
const clip = resolveClipRef(cc, clipRef);
|
|
1112
|
-
if (!clip?.stableId) return null;
|
|
1113
|
-
return fetch('/_api/toggle-hide', {
|
|
1114
|
-
method: 'POST',
|
|
1115
|
-
headers: { 'content-type': 'application/json' },
|
|
1116
|
-
body: JSON.stringify({
|
|
1117
|
-
canvas: activePath,
|
|
1118
|
-
artboardId,
|
|
1119
|
-
stableId: clip.stableId,
|
|
1120
|
-
contentHash: clip.contentHash,
|
|
1121
|
-
}),
|
|
1122
|
-
});
|
|
1123
|
-
})
|
|
1124
|
-
.then((r) => (r ? r.json() : null))
|
|
1125
|
-
.then((j) => {
|
|
1126
|
-
if (j && !j.ok) timelineOpFailed('Hide refused', j.error);
|
|
1127
|
-
else if (j && j.ok) {
|
|
1128
|
-
shellToast(j.hidden ? 'Clip hidden.' : 'Clip shown.', true);
|
|
1129
|
-
if (j.seq != null) pushTlUndo(activePath, j.seq, j.hidden ? 'hide clip' : 'show clip');
|
|
1130
|
-
}
|
|
1131
|
-
})
|
|
1132
|
-
.catch(() => shellToast('Hide failed: network error'));
|
|
1133
|
-
}}
|
|
1134
|
-
onReorderMove={(movedRef2, targetRef, position) => {
|
|
1135
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1136
|
-
// Task 6 — the magnetic drag commit: a real series MOVE (any
|
|
1137
|
-
// distance), addressed by stableId pair + fingerprints.
|
|
1138
|
-
const artboardId = timelineArtboardId || undefined;
|
|
1139
|
-
const ccUrl = `/_api/comp-clips?canvas=${encodeURIComponent(activePath)}${artboardId ? `&artboardId=${encodeURIComponent(artboardId)}` : ''}`;
|
|
1140
|
-
fetch(ccUrl)
|
|
1141
|
-
.then((r) => r.json().catch(() => ({})))
|
|
1142
|
-
.then((cc) => {
|
|
1143
|
-
const moved = resolveClipRef(cc, movedRef2);
|
|
1144
|
-
const ref = resolveClipRef(cc, targetRef);
|
|
1145
|
-
if (!moved?.stableId || !ref?.stableId) return null;
|
|
1146
|
-
return fetch('/_api/reorder-sequence', {
|
|
1147
|
-
method: 'POST',
|
|
1148
|
-
headers: { 'content-type': 'application/json' },
|
|
1149
|
-
body: JSON.stringify({
|
|
1150
|
-
canvas: activePath,
|
|
1151
|
-
artboardId,
|
|
1152
|
-
stableId: moved.stableId,
|
|
1153
|
-
contentHash: moved.contentHash,
|
|
1154
|
-
refStableId: ref.stableId,
|
|
1155
|
-
refContentHash: ref.contentHash,
|
|
1156
|
-
position,
|
|
1157
|
-
mode: 'move',
|
|
1158
|
-
}),
|
|
1159
|
-
});
|
|
1160
|
-
})
|
|
1161
|
-
.then((r) => (r ? r.json() : null))
|
|
1162
|
-
.then((j) => {
|
|
1163
|
-
if (j && !j.ok) {
|
|
1164
|
-
console.warn('[reorder-move]', j.error || 'failed');
|
|
1165
|
-
timelineOpFailed('Reorder refused', j.error);
|
|
1166
|
-
} else if (j?.ok) {
|
|
1167
|
-
shellToast('Clip moved.', true);
|
|
1168
|
-
if (j.seq != null) pushTlUndo(activePath, j.seq, 'move clip');
|
|
1169
|
-
}
|
|
1170
|
-
})
|
|
1171
|
-
.catch(() => shellToast('Reorder failed: network error'));
|
|
1172
|
-
}}
|
|
1173
|
-
onDropMedia={(files, pos) => {
|
|
1174
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1175
|
-
// DDR-150 P4 + Task 6 — drop media onto the timeline. With a caret
|
|
1176
|
-
// position: index-aware storyline insert / frame-anchored
|
|
1177
|
-
// overlay-audio insert; multiple files insert in order. Audio
|
|
1178
|
-
// files always land in the audio band. Without a position, the
|
|
1179
|
-
// legacy append path.
|
|
1180
|
-
const artboardId = timelineArtboardId || undefined;
|
|
1181
|
-
const fps = timelineFps;
|
|
1182
|
-
const canvas = activePath;
|
|
1183
|
-
const list = (Array.isArray(files) ? files : [files]).filter(Boolean);
|
|
1184
|
-
(async () => {
|
|
1185
|
-
// Dogfood fix — dropping media on the timeline of a canvas with
|
|
1186
|
-
// NO video-comp used to dead-end in "Insert refused: no
|
|
1187
|
-
// video-comp for this artboard". Drop-first means drop-first:
|
|
1188
|
-
// upload the files and spin up a NEW video-comp canvas cut from
|
|
1189
|
-
// them (same engine as File → Assemble), then open it.
|
|
1190
|
-
if (!activeComps.length) {
|
|
1191
|
-
const clips = [];
|
|
1192
|
-
for (const file of list) {
|
|
1193
|
-
const mediaKind = file.type.startsWith('audio/')
|
|
1194
|
-
? 'audio'
|
|
1195
|
-
: file.type.startsWith('video/')
|
|
1196
|
-
? 'video'
|
|
1197
|
-
: null;
|
|
1198
|
-
if (!mediaKind) continue;
|
|
1199
|
-
try {
|
|
1200
|
-
const r = await fetch('/_api/asset', {
|
|
1201
|
-
method: 'POST',
|
|
1202
|
-
headers: { 'Content-Type': file.type || 'application/octet-stream' },
|
|
1203
|
-
body: file,
|
|
1204
|
-
});
|
|
1205
|
-
const up = await r.json().catch(() => ({}));
|
|
1206
|
-
if (up?.path) clips.push({ src: up.path, mediaKind });
|
|
1207
|
-
else shellToast(`Upload failed: ${up?.error || `HTTP ${r.status}`}`);
|
|
1208
|
-
} catch {
|
|
1209
|
-
shellToast('Upload failed: network error');
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
if (!clips.length) {
|
|
1213
|
-
shellToast('No video/audio files in the drop — nothing to cut.');
|
|
1214
|
-
return;
|
|
1215
|
-
}
|
|
1216
|
-
// 1) In-place upgrade: a `kind="video"` artboard on THIS
|
|
1217
|
-
// canvas gets a VideoComp injected and takes the clips as
|
|
1218
|
-
// storyline beats (server-side ensure). Falls through to a
|
|
1219
|
-
// fresh "New Cut" canvas only when no artboard opted in.
|
|
1220
|
-
let upgraded = false;
|
|
1221
|
-
for (const c of clips) {
|
|
1222
|
-
const probedSec = await probeMediaDuration(c.src).catch(() => null);
|
|
1223
|
-
const body = {
|
|
1224
|
-
canvas,
|
|
1225
|
-
lane: c.mediaKind === 'audio' && upgraded ? 'audio' : 'storyline',
|
|
1226
|
-
durationInFrames: durationFramesForDrop(fps, probedSec),
|
|
1227
|
-
mediaTag: c.mediaKind === 'audio' ? 'Audio' : 'Video',
|
|
1228
|
-
src: c.src,
|
|
1229
|
-
};
|
|
1230
|
-
if (body.lane === 'audio') body.from = 0;
|
|
1231
|
-
const r = await fetch('/_api/insert-sequence', {
|
|
1232
|
-
method: 'POST',
|
|
1233
|
-
headers: { 'content-type': 'application/json' },
|
|
1234
|
-
body: JSON.stringify(body),
|
|
1235
|
-
}).catch(() => null);
|
|
1236
|
-
const j = r ? await r.json().catch(() => null) : null;
|
|
1237
|
-
if (j?.ok) {
|
|
1238
|
-
upgraded = true;
|
|
1239
|
-
if (j.seq != null) pushTlUndo(canvas, j.seq, 'add clip');
|
|
1240
|
-
} else if (!upgraded) {
|
|
1241
|
-
break; // no eligible artboard — New Cut fallback below
|
|
1242
|
-
} else {
|
|
1243
|
-
timelineOpFailed('Insert refused', j?.error);
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
if (upgraded) {
|
|
1247
|
-
shellToast('Artboard upgraded to a video comp — clips added to the storyline.', true);
|
|
1248
|
-
return;
|
|
1249
|
-
}
|
|
1250
|
-
for (let n = 0; n < 8; n += 1) {
|
|
1251
|
-
const name = n === 0 ? 'New Cut' : `New Cut ${n + 1}`;
|
|
1252
|
-
const r = await fetch('/_api/canvas', {
|
|
1253
|
-
method: 'POST',
|
|
1254
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1255
|
-
body: JSON.stringify({ name, kind: 'video-comp', clips }),
|
|
1256
|
-
}).catch(() => null);
|
|
1257
|
-
const j = r ? await r.json().catch(() => ({})) : {};
|
|
1258
|
-
if (r?.status === 409) continue; // name taken — try the next
|
|
1259
|
-
if (!r?.ok || !j.ok) {
|
|
1260
|
-
shellToast(`New cut failed: ${j.error || 'create refused'}`);
|
|
1261
|
-
return;
|
|
1262
|
-
}
|
|
1263
|
-
await loadTree();
|
|
1264
|
-
openTab(j.file);
|
|
1265
|
-
shellToast(`Started a new cut from ${clips.length} clip${clips.length > 1 ? 's' : ''}.`, true);
|
|
1266
|
-
return;
|
|
1267
|
-
}
|
|
1268
|
-
shellToast('New cut failed: too many "New Cut" canvases — rename some.');
|
|
1269
|
-
return;
|
|
1270
|
-
}
|
|
1271
|
-
let slot = pos?.lane === 'storyline' ? pos.index : undefined;
|
|
1272
|
-
for (const file of list) {
|
|
1273
|
-
const mediaTag = file.type.startsWith('video/')
|
|
1274
|
-
? 'Video'
|
|
1275
|
-
: file.type.startsWith('audio/')
|
|
1276
|
-
? 'Audio'
|
|
1277
|
-
: file.type.startsWith('image/')
|
|
1278
|
-
? 'Img'
|
|
1279
|
-
: null;
|
|
1280
|
-
if (!mediaTag) continue;
|
|
1281
|
-
let up;
|
|
1282
|
-
try {
|
|
1283
|
-
const r = await fetch('/_api/asset', {
|
|
1284
|
-
method: 'POST',
|
|
1285
|
-
headers: { 'Content-Type': file.type || 'application/octet-stream' },
|
|
1286
|
-
body: file,
|
|
1287
|
-
});
|
|
1288
|
-
up = await r.json().catch(() => ({}));
|
|
1289
|
-
} catch {
|
|
1290
|
-
up = null;
|
|
1291
|
-
}
|
|
1292
|
-
if (!up?.path) {
|
|
1293
|
-
shellToast(`Upload failed: ${up?.error || 'server unreachable — retry in a moment'}`);
|
|
1294
|
-
continue;
|
|
1295
|
-
}
|
|
1296
|
-
const isAudio = mediaTag === 'Audio';
|
|
1297
|
-
// Video clips carry a real duration — probe it so the drop
|
|
1298
|
-
// lands at the clip's own length instead of a fixed 3s that
|
|
1299
|
-
// the user then has to drag out by hand. Images have no
|
|
1300
|
-
// inherent duration, so they keep the fallback.
|
|
1301
|
-
const probedSec =
|
|
1302
|
-
mediaTag === 'Video' ? await probeMediaDuration(up.path).catch(() => null) : null;
|
|
1303
|
-
const body = { canvas, artboardId, mediaTag, src: up.path };
|
|
1304
|
-
if (pos && (isAudio || pos.lane === 'audio')) {
|
|
1305
|
-
body.lane = 'audio';
|
|
1306
|
-
body.from = Math.max(0, pos.frame ?? 0);
|
|
1307
|
-
// Default: stretch toward the end of the cut.
|
|
1308
|
-
body.durationInFrames = Math.max(fps, timelineTotal - body.from);
|
|
1309
|
-
} else if (pos?.lane === 'storyline' && !isAudio) {
|
|
1310
|
-
body.lane = 'storyline';
|
|
1311
|
-
if (slot != null) {
|
|
1312
|
-
body.index = slot;
|
|
1313
|
-
slot += 1; // multiple files insert in order
|
|
1314
|
-
}
|
|
1315
|
-
body.durationInFrames = durationFramesForDrop(fps, probedSec);
|
|
1316
|
-
} else if (pos?.lane === 'overlay' && !isAudio) {
|
|
1317
|
-
if ((timelineSequences || []).length === 0) {
|
|
1318
|
-
// First clip of a greenfield comp = the BASE layer →
|
|
1319
|
-
// storyline, wherever it was dropped.
|
|
1320
|
-
body.lane = 'storyline';
|
|
1321
|
-
} else {
|
|
1322
|
-
body.lane = 'overlay';
|
|
1323
|
-
body.from = Math.max(0, pos.frame ?? 0);
|
|
1324
|
-
}
|
|
1325
|
-
body.durationInFrames = durationFramesForDrop(fps, probedSec);
|
|
1326
|
-
} else if (!isAudio) {
|
|
1327
|
-
// Default container rule: a video/image drop ANYWHERE on the
|
|
1328
|
-
// timeline lands in the storyline (append = hard cut at the
|
|
1329
|
-
// end; the caret gives it an index). The old lane-less
|
|
1330
|
-
// append refused hard-cut series ("no transition to clone").
|
|
1331
|
-
body.lane = 'storyline';
|
|
1332
|
-
body.durationInFrames = durationFramesForDrop(fps, probedSec);
|
|
1333
|
-
} else {
|
|
1334
|
-
// Audio without a caret → audio band, from the start.
|
|
1335
|
-
body.lane = 'audio';
|
|
1336
|
-
body.from = 0;
|
|
1337
|
-
body.durationInFrames = Math.max(fps, timelineTotal);
|
|
1338
|
-
}
|
|
1339
|
-
try {
|
|
1340
|
-
const r = await fetch('/_api/insert-sequence', {
|
|
1341
|
-
method: 'POST',
|
|
1342
|
-
headers: { 'content-type': 'application/json' },
|
|
1343
|
-
body: JSON.stringify(body),
|
|
1344
|
-
});
|
|
1345
|
-
const j = await r.json().catch(() => null);
|
|
1346
|
-
if (j && !j.ok) {
|
|
1347
|
-
console.warn('[insert-clip]', j.error || 'failed');
|
|
1348
|
-
timelineOpFailed('Insert refused', j.error);
|
|
1349
|
-
} else if (j?.ok) {
|
|
1350
|
-
shellToast('Clip added to the timeline.', true);
|
|
1351
|
-
if (j.seq != null) pushTlUndo(canvas, j.seq, 'add clip');
|
|
1352
|
-
}
|
|
1353
|
-
} catch {
|
|
1354
|
-
shellToast('Insert failed: network error');
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
})();
|
|
1358
|
-
}}
|
|
1359
|
-
height={timelineHeight}
|
|
1360
|
-
onResize={setTimelineHeight}
|
|
1361
|
-
onClose={() => setTimelineOpen(false)}
|
|
1362
|
-
selectedClipId={timelineSelectedClip}
|
|
1363
|
-
onSelect={setTimelineSelectedClip}
|
|
1364
|
-
transitionClips={timelineTransClips}
|
|
1365
|
-
onClipVerb={timelineClipVerb}
|
|
1366
|
-
comments={(commentsByFile[activePath] || []).filter((c) => c && c.timeline)}
|
|
1367
|
-
promptText={askText}
|
|
1368
|
-
onAddComment={timelineAddComment}
|
|
1369
|
-
onResolveComment={(id) =>
|
|
1370
|
-
wsSend({ type: 'comments-patch', id, patch: { status: 'resolved' } })
|
|
1371
|
-
}
|
|
1372
|
-
onDeleteComment={(id) => wsSend({ type: 'comments-delete', id })}
|
|
1373
|
-
onSplitAtPlayhead={() => {
|
|
1374
|
-
const s = tlKeyRef.current;
|
|
1375
|
-
let ref = s.selected != null ? { stableId: s.selected } : null;
|
|
1376
|
-
if (!ref) {
|
|
1377
|
-
const rows = s.sequences || [];
|
|
1378
|
-
const under =
|
|
1379
|
-
rows.find(
|
|
1380
|
-
(r2) => r2.series && s.frame >= r2.from && s.frame < r2.from + r2.duration
|
|
1381
|
-
) || rows.find((r2) => s.frame >= r2.from && s.frame < r2.from + r2.duration);
|
|
1382
|
-
if (under?.stableId) ref = { stableId: under.stableId };
|
|
1383
|
-
}
|
|
1384
|
-
if (ref) timelineClipVerb(ref, 'split', { atFrame: s.frame });
|
|
1385
|
-
else shellToast('Nothing under the playhead to split.');
|
|
1386
|
-
}}
|
|
1387
|
-
onAddTitle={(frame) => {
|
|
1388
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1389
|
-
// Task 19 — "+ Title": inserts immediately with a default text —
|
|
1390
|
-
// edit it via double-click → inspector → Text (the artboard's
|
|
1391
|
-
// Player DOM isn't the canvas edit surface, so inline editing
|
|
1392
|
-
// happens in the timeline inspector).
|
|
1393
|
-
Promise.resolve('Title').then((text) => {
|
|
1394
|
-
if (!text) return;
|
|
1395
|
-
const fps = timelineFps;
|
|
1396
|
-
fetch('/_api/insert-sequence', {
|
|
1397
|
-
method: 'POST',
|
|
1398
|
-
headers: { 'content-type': 'application/json' },
|
|
1399
|
-
body: JSON.stringify({
|
|
1400
|
-
canvas: activePath,
|
|
1401
|
-
artboardId: timelineArtboardId || undefined,
|
|
1402
|
-
lane: 'overlay',
|
|
1403
|
-
from: frame,
|
|
1404
|
-
durationInFrames: Math.round(fps * 3),
|
|
1405
|
-
mediaTag: 'Title',
|
|
1406
|
-
src: text,
|
|
1407
|
-
}),
|
|
1408
|
-
})
|
|
1409
|
-
.then((r) => r.json().catch(() => null))
|
|
1410
|
-
.then((j) => {
|
|
1411
|
-
if (j && !j.ok) timelineOpFailed('Title refused', j.error);
|
|
1412
|
-
else if (j?.ok) {
|
|
1413
|
-
shellToast('Title added.', true);
|
|
1414
|
-
if (j.seq != null) pushTlUndo(activePath, j.seq, 'add title');
|
|
1415
|
-
}
|
|
1416
|
-
})
|
|
1417
|
-
.catch(() => shellToast('Title failed: network error'));
|
|
1418
|
-
});
|
|
1419
|
-
}}
|
|
1420
|
-
onAddAiClip={() => {
|
|
1421
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1422
|
-
// Task 22 — "+ AI clip": a prompt-carrying slate beat at the end
|
|
1423
|
-
// of the storyline. NO modal (user steer 2026-07-30) — the slate
|
|
1424
|
-
// lands with a starter prompt the user rewrites IN PLACE
|
|
1425
|
-
// (double-click the slate text in the artboard, or Text tab).
|
|
1426
|
-
(async () => {
|
|
1427
|
-
const prompt = 'Describe this shot — double-click to edit';
|
|
1428
|
-
const kind = 'veo';
|
|
1429
|
-
const fps = timelineFps;
|
|
1430
|
-
fetch('/_api/insert-sequence', {
|
|
1431
|
-
method: 'POST',
|
|
1432
|
-
headers: { 'content-type': 'application/json' },
|
|
1433
|
-
body: JSON.stringify({
|
|
1434
|
-
canvas: activePath,
|
|
1435
|
-
artboardId: timelineArtboardId || undefined,
|
|
1436
|
-
lane: 'storyline',
|
|
1437
|
-
durationInFrames: Math.round(fps * 5),
|
|
1438
|
-
placeholder: { prompt, kind },
|
|
1439
|
-
}),
|
|
1440
|
-
})
|
|
1441
|
-
.then((r) => r.json().catch(() => null))
|
|
1442
|
-
.then((j) => {
|
|
1443
|
-
if (j && !j.ok) timelineOpFailed('AI clip refused', j.error);
|
|
1444
|
-
else if (j?.ok) {
|
|
1445
|
-
shellToast('AI placeholder added — double-click its text to write the prompt, then right-click → Generate ✨.', true);
|
|
1446
|
-
if (j.seq != null) pushTlUndo(activePath, j.seq, 'add AI placeholder');
|
|
3280
|
+
{/* V2-4.4b — the corner icons are the only way back for a panel that is not showing, in every layout:
|
|
3281
|
+
they replaced the pinned layout's old collapsed rail (Expand · Search · Files) along with it. */}
|
|
3282
|
+
<CornerIcons
|
|
3283
|
+
hidden={panelsHidden}
|
|
3284
|
+
folded={panelsFolded && !panelsUserHidden}
|
|
3285
|
+
leftActive={leftActive}
|
|
3286
|
+
rightActive={rightActive}
|
|
3287
|
+
leftIds={leftIds}
|
|
3288
|
+
rightIds={rightIds}
|
|
3289
|
+
assistant={
|
|
3290
|
+
leftHostsAssistant || rightHostsAssistant
|
|
3291
|
+
? {
|
|
3292
|
+
side: leftHostsAssistant ? 'left' : 'right',
|
|
3293
|
+
shown: assistantOpen,
|
|
3294
|
+
busy: assistantBusy,
|
|
3295
|
+
inFold: aiFoldShown,
|
|
1447
3296
|
}
|
|
1448
|
-
|
|
1449
|
-
.catch(() => shellToast('AI clip failed: network error'));
|
|
1450
|
-
})();
|
|
1451
|
-
}}
|
|
1452
|
-
onGeneratePlaceholder={(clipRef) => {
|
|
1453
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1454
|
-
// Task 22 — hand the prompt to the existing generation spine
|
|
1455
|
-
// (DDR-164), then poll the job and swap the slate in place. The
|
|
1456
|
-
// placeholder stays fully editable while the job runs; the final
|
|
1457
|
-
// swap re-resolves by stableId with a FRESH fingerprint.
|
|
1458
|
-
const canvas = activePath;
|
|
1459
|
-
const artboardId = timelineArtboardId || undefined;
|
|
1460
|
-
const ccUrl = `/_api/comp-clips?canvas=${encodeURIComponent(canvas)}${artboardId ? `&artboardId=${encodeURIComponent(artboardId)}` : ''}`;
|
|
1461
|
-
fetch(ccUrl)
|
|
1462
|
-
.then((r) => r.json().catch(() => ({})))
|
|
1463
|
-
.then((cc) => {
|
|
1464
|
-
const clip = resolveClipRef(cc, clipRef);
|
|
1465
|
-
const ph = clip?.placeholder;
|
|
1466
|
-
if (!clip?.stableId || !ph?.prompt) {
|
|
1467
|
-
shellToast('No AI placeholder prompt on this clip.');
|
|
1468
|
-
return;
|
|
1469
|
-
}
|
|
1470
|
-
const modality = ph.kind === 'image' ? 'image' : 'video';
|
|
1471
|
-
const prompt =
|
|
1472
|
-
ph.kind === 'motion'
|
|
1473
|
-
? `Clean, minimal motion-graphics animation (flat shapes, smooth easing): ${ph.prompt}`
|
|
1474
|
-
: ph.prompt;
|
|
1475
|
-
fetch('/_api/generate-jobs', {
|
|
1476
|
-
method: 'POST',
|
|
1477
|
-
headers: { 'content-type': 'application/json' },
|
|
1478
|
-
body: JSON.stringify({ provider: 'gemini', modality, prompt }),
|
|
1479
|
-
})
|
|
1480
|
-
.then(async (r) => (r.ok ? r.json() : Promise.reject(new Error(await r.text()))))
|
|
1481
|
-
.then((job) => {
|
|
1482
|
-
const jobId = job?.id;
|
|
1483
|
-
if (!jobId) throw new Error('no job id');
|
|
1484
|
-
shellToast(`Generating ${ph.kind}… (runs in the background)`, true);
|
|
1485
|
-
const stableId = clip.stableId;
|
|
1486
|
-
const poll = () => {
|
|
1487
|
-
fetch('/_api/generate-jobs')
|
|
1488
|
-
.then((r) => r.json().catch(() => ({})))
|
|
1489
|
-
.then((d) => {
|
|
1490
|
-
const j2 = (d?.jobs || []).find((x) => x.id === jobId);
|
|
1491
|
-
if (!j2 || j2.status === 'failed') {
|
|
1492
|
-
shellToast(`Generation failed: ${j2?.error || 'job lost'}`);
|
|
1493
|
-
return;
|
|
1494
|
-
}
|
|
1495
|
-
if (j2.status !== 'done') {
|
|
1496
|
-
setTimeout(poll, 4000);
|
|
1497
|
-
return;
|
|
1498
|
-
}
|
|
1499
|
-
const asset = j2.assets?.[0];
|
|
1500
|
-
if (!asset) {
|
|
1501
|
-
shellToast('Generation finished but produced no asset.');
|
|
1502
|
-
return;
|
|
1503
|
-
}
|
|
1504
|
-
// Fresh fingerprint at swap time (the clip may have
|
|
1505
|
-
// been retimed/moved meanwhile — that's fine).
|
|
1506
|
-
fetch(ccUrl)
|
|
1507
|
-
.then((r) => r.json().catch(() => ({})))
|
|
1508
|
-
.then((cc2) => {
|
|
1509
|
-
const live = resolveClipRef(cc2, { stableId });
|
|
1510
|
-
if (!live?.stableId) {
|
|
1511
|
-
shellToast('Placeholder clip is gone — generated asset kept in assets/.');
|
|
1512
|
-
return;
|
|
1513
|
-
}
|
|
1514
|
-
timelineClipVerb({ stableId: live.stableId }, 'resolve-placeholder', {
|
|
1515
|
-
src: asset,
|
|
1516
|
-
mediaKind: modality === 'image' ? 'image' : 'video',
|
|
1517
|
-
});
|
|
1518
|
-
});
|
|
1519
|
-
})
|
|
1520
|
-
.catch(() => setTimeout(poll, 6000));
|
|
1521
|
-
};
|
|
1522
|
-
setTimeout(poll, 3000);
|
|
1523
|
-
})
|
|
1524
|
-
.catch((e) =>
|
|
1525
|
-
shellToast(`Generate failed: ${e?.message || 'provider error'} — is a Gemini key set in Settings?`)
|
|
1526
|
-
);
|
|
1527
|
-
})
|
|
1528
|
-
.catch(() => shellToast('Generate failed: network error'));
|
|
1529
|
-
}}
|
|
1530
|
-
onAddImage={(frame) => {
|
|
1531
|
-
if (!activePath || activePath === SYSTEM_TAB) return;
|
|
1532
|
-
// Task 19 — "+ Image": picker → content-addressed upload →
|
|
1533
|
-
// overlay-lane <Img> at the playhead. WKWebView can't open an
|
|
1534
|
-
// HTML file input, so native goes through the Rust pick dialog.
|
|
1535
|
-
const uploadPicked = (blob, type) => {
|
|
1536
|
-
const fps = timelineFps;
|
|
1537
|
-
fetch('/_api/asset', {
|
|
1538
|
-
method: 'POST',
|
|
1539
|
-
headers: { 'Content-Type': type || 'application/octet-stream' },
|
|
1540
|
-
body: blob,
|
|
1541
|
-
})
|
|
1542
|
-
.then((r) => r.json().catch(() => ({})))
|
|
1543
|
-
.then((up) => {
|
|
1544
|
-
if (!up?.path) {
|
|
1545
|
-
shellToast(`Upload failed: ${up?.error || 'unknown error'}`);
|
|
1546
|
-
return null;
|
|
1547
|
-
}
|
|
1548
|
-
return fetch('/_api/insert-sequence', {
|
|
1549
|
-
method: 'POST',
|
|
1550
|
-
headers: { 'content-type': 'application/json' },
|
|
1551
|
-
body: JSON.stringify({
|
|
1552
|
-
canvas: activePath,
|
|
1553
|
-
artboardId: timelineArtboardId || undefined,
|
|
1554
|
-
lane: 'overlay',
|
|
1555
|
-
from: frame,
|
|
1556
|
-
durationInFrames: Math.round(fps * 3),
|
|
1557
|
-
mediaTag: 'Img',
|
|
1558
|
-
src: up.path,
|
|
1559
|
-
}),
|
|
1560
|
-
});
|
|
1561
|
-
})
|
|
1562
|
-
.then((r) => (r ? r.json() : null))
|
|
1563
|
-
.then((j) => {
|
|
1564
|
-
if (j && !j.ok) timelineOpFailed('Image refused', j.error);
|
|
1565
|
-
else if (j?.ok) {
|
|
1566
|
-
shellToast('Image overlay added.', true);
|
|
1567
|
-
if (j.seq != null) pushTlUndo(activePath, j.seq, 'add image overlay');
|
|
1568
|
-
}
|
|
1569
|
-
})
|
|
1570
|
-
.catch(() => shellToast('Image failed: network error'));
|
|
1571
|
-
};
|
|
1572
|
-
if (isNativeApp()) {
|
|
1573
|
-
pickMediaFile()
|
|
1574
|
-
.then(async (picked) => {
|
|
1575
|
-
if (picked) uploadPicked(await readPickedMediaBlob(picked), '');
|
|
1576
|
-
})
|
|
1577
|
-
.catch((e2) => shellToast(`Image pick failed: ${e2?.message || 'dialog error'}`));
|
|
1578
|
-
return;
|
|
1579
|
-
}
|
|
1580
|
-
const input = document.createElement('input');
|
|
1581
|
-
input.type = 'file';
|
|
1582
|
-
input.accept = 'image/*';
|
|
1583
|
-
input.addEventListener('change', () => {
|
|
1584
|
-
const file = input.files?.[0];
|
|
1585
|
-
if (file) uploadPicked(file, file.type);
|
|
1586
|
-
});
|
|
1587
|
-
input.click();
|
|
1588
|
-
}}
|
|
1589
|
-
resolveMediaUrl={(p) =>
|
|
1590
|
-
`/${(cfg?.designRel || cfg?.designRoot || '.design').replace(/^\/+|\/+$/g, '')}/${p}`
|
|
3297
|
+
: null
|
|
1591
3298
|
}
|
|
3299
|
+
onShowAi={() => setAiInFold(true)}
|
|
3300
|
+
onOpen={openPanelExclusive}
|
|
3301
|
+
onShow={panelLayout.show}
|
|
1592
3302
|
/>
|
|
1593
|
-
|
|
1594
|
-
<StatusBar
|
|
1595
|
-
activePath={activePath}
|
|
1596
|
-
selected={selected}
|
|
1597
|
-
wsConnected={wsConnected}
|
|
1598
|
-
openCount={totalOpen}
|
|
1599
|
-
theme={theme}
|
|
1600
|
-
onToggleTheme={toggleTheme}
|
|
1601
|
-
onClearSelected={clearSelected}
|
|
1602
|
-
syncStatus={syncStatus}
|
|
1603
|
-
syncProject={cfg?.cloud?.projectName || project}
|
|
1604
|
-
syncOpen={syncPanelOpen}
|
|
1605
|
-
// Toggle through the dock helpers so the one-panel-per-side invariant
|
|
1606
|
-
// holds (opening Sync closes whatever else the right slot shows).
|
|
1607
|
-
onOpenSync={syncStatus ? () => toggleRightPanel('sync') : undefined}
|
|
1608
|
-
changesCount={unsavedCount}
|
|
1609
|
-
// `unpushed` is a LOCAL-git offer ("N to publish"), and the panel has
|
|
1610
|
-
// withdrawn Publish under either managed posture — so the chip must
|
|
1611
|
-
// not keep advertising it either.
|
|
1612
|
-
unpushed={savingIsManaged ? 0 : gitStatus?.unpushed || 0}
|
|
1613
|
-
savingIsManaged={savingIsManaged}
|
|
1614
|
-
changesOpen={changesOpen}
|
|
1615
|
-
// A REPO IS NOT THE ONLY REASON THIS PANEL HAS SOMETHING TO SHOW.
|
|
1616
|
-
// Under managed saving the panel IS the project's history — every
|
|
1617
|
-
// accepted action with its author, and Undo on the ones that are
|
|
1618
|
-
// yours — and it comes from the hub, not from git. A managed copy on
|
|
1619
|
-
// a designer's machine has no `.git`, so gating the chip on a repo
|
|
1620
|
-
// left the invited designer with no visible way in at all: the View
|
|
1621
|
-
// menu and ⌘⇧G worked, and nothing on screen said so. The chip's own
|
|
1622
|
-
// `savingIsManaged` branch below was already written for this case
|
|
1623
|
-
// and was simply unreachable here. Found running S20 against a live
|
|
1624
|
-
// deployment; asserted in `team-project.e2e.ts` step 4b.
|
|
1625
|
-
onOpenChanges={
|
|
1626
|
-
gitStatus?.repo || savingIsManaged ? () => openRightPanel('changes') : undefined
|
|
1627
|
-
}
|
|
1628
|
-
version={cfg?.version}
|
|
1629
|
-
/>
|
|
3303
|
+
</div>
|
|
1630
3304
|
</div>
|
|
1631
|
-
{
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
aria-label="Exit presentation mode"
|
|
1637
|
-
title="Exit presentation mode (Esc)"
|
|
1638
|
-
>
|
|
1639
|
-
<svg viewBox="0 0 16 16" width="13" height="13" fill="none" aria-hidden="true">
|
|
1640
|
-
<path
|
|
1641
|
-
d="M4 4l8 8M12 4l-8 8"
|
|
1642
|
-
stroke="currentColor"
|
|
1643
|
-
strokeWidth="1.6"
|
|
1644
|
-
strokeLinecap="round"
|
|
1645
|
-
/>
|
|
1646
|
-
</svg>
|
|
1647
|
-
<span>Exit presentation</span>
|
|
1648
|
-
<kbd className="st-present-exit-kbd">Esc</kbd>
|
|
1649
|
-
</button>
|
|
1650
|
-
)}
|
|
3305
|
+
{/* S3.2b — the only chrome Present shows: the controls (Artboards) or the pill (the canvas). It replaces
|
|
3306
|
+
the v1 `pv-present-exit` button; the pill keeps that class. */}
|
|
3307
|
+
{presentMode && <ShellPresentChrome />}
|
|
3308
|
+
{/* S3.6b — Presenter view on the Mac (only when the person turned it on and another display exists). */}
|
|
3309
|
+
{presentMode && <PresenterViewHost />}
|
|
1651
3310
|
<CommandPalette
|
|
1652
3311
|
open={paletteOpen}
|
|
1653
3312
|
onClose={() => setPaletteOpen(false)}
|
|
@@ -1655,19 +3314,24 @@ function App() {
|
|
|
1655
3314
|
/>
|
|
1656
3315
|
{shellPromptState && (
|
|
1657
3316
|
<div
|
|
1658
|
-
className="
|
|
3317
|
+
className="sh-scrim"
|
|
1659
3318
|
role="presentation"
|
|
1660
3319
|
onMouseDown={(e) => {
|
|
1661
3320
|
if (e.target === e.currentTarget) settleShellPrompt(null);
|
|
1662
3321
|
}}
|
|
1663
3322
|
>
|
|
1664
|
-
<div
|
|
1665
|
-
|
|
1666
|
-
|
|
3323
|
+
<div
|
|
3324
|
+
className="sh-dialog sh-prompt"
|
|
3325
|
+
role="dialog"
|
|
3326
|
+
aria-modal="true"
|
|
3327
|
+
aria-label={shellPromptState.title}
|
|
3328
|
+
>
|
|
3329
|
+
<div className="sh-dialog-hd">
|
|
3330
|
+
<span className="sh-dialog-title">{shellPromptState.title}</span>
|
|
1667
3331
|
</div>
|
|
1668
|
-
<div className="
|
|
3332
|
+
<div className="sh-dialog-bd">
|
|
1669
3333
|
<input
|
|
1670
|
-
className="
|
|
3334
|
+
className="sh-input"
|
|
1671
3335
|
data-testid="shell-prompt-input"
|
|
1672
3336
|
autoFocus
|
|
1673
3337
|
defaultValue={shellPromptState.value}
|
|
@@ -1687,7 +3351,7 @@ function App() {
|
|
|
1687
3351
|
data-testid="shell-prompt-ok"
|
|
1688
3352
|
onClick={(e) =>
|
|
1689
3353
|
settleShellPrompt(
|
|
1690
|
-
e.currentTarget.closest('.
|
|
3354
|
+
e.currentTarget.closest('.sh-dialog')?.querySelector('input')?.value ?? ''
|
|
1691
3355
|
)
|
|
1692
3356
|
}
|
|
1693
3357
|
>
|
|
@@ -1698,12 +3362,35 @@ function App() {
|
|
|
1698
3362
|
</div>
|
|
1699
3363
|
</div>
|
|
1700
3364
|
)}
|
|
1701
|
-
{
|
|
3365
|
+
{relink.sheet}
|
|
3366
|
+
{shareDialog && (
|
|
3367
|
+
<ShareSheet
|
|
3368
|
+
target={shareDialog}
|
|
3369
|
+
links={shareLinksFor(shareDialog.path)}
|
|
3370
|
+
shell={shareShell}
|
|
3371
|
+
project={cfg?.cloud?.projectName || project}
|
|
3372
|
+
onClose={() => setShareDialog(null)}
|
|
3373
|
+
// P5/TD8 — a local project's "Only need a file?" opens the one Export sheet
|
|
3374
|
+
onExport={() => {
|
|
3375
|
+
setShareDialog(null);
|
|
3376
|
+
setExportDialog({ mode: 'export' });
|
|
3377
|
+
}}
|
|
3378
|
+
/>
|
|
3379
|
+
)}
|
|
1702
3380
|
{exportDialog && (
|
|
1703
3381
|
<ExportDialog
|
|
1704
3382
|
mode={exportDialog.mode}
|
|
1705
3383
|
initialScope={exportDialog.scope}
|
|
3384
|
+
request={exportDialog}
|
|
3385
|
+
designRel={(cfg?.designRel || cfg?.designRoot || '.design').replace(/^\/+|\/+$/g, '')}
|
|
3386
|
+
projectName={cfg?.cloud?.projectName || cfg?.name || project || ''}
|
|
3387
|
+
// S8.9 — Can comment gets the sheet with one line on top; the server is the lock
|
|
3388
|
+
access={{ canEdit: !viewerMode, role: activeRole }}
|
|
3389
|
+
lastFinishedAt={exportLastFinishedAt}
|
|
3390
|
+
{...exportSelectionV2(selected, activePath)}
|
|
1706
3391
|
activePath={activePath}
|
|
3392
|
+
// S8.7 — Show on canvas turns the dashed safe margin on only when it is off
|
|
3393
|
+
printGuidesVisible={printGuidesVisible}
|
|
1707
3394
|
hasComps={activeComps.length > 0}
|
|
1708
3395
|
comps={activeComps}
|
|
1709
3396
|
// Which artboard "Active artboard" scope targets. The shell can't query
|
|
@@ -1718,34 +3405,7 @@ function App() {
|
|
|
1718
3405
|
onClose={() => setExportDialog(null)}
|
|
1719
3406
|
/>
|
|
1720
3407
|
)}
|
|
1721
|
-
{settingsOpen &&
|
|
1722
|
-
<SettingsPanel
|
|
1723
|
-
cloud={cfg.cloud}
|
|
1724
|
-
onClose={() => setSettingsOpen(false)}
|
|
1725
|
-
initialTab={typeof settingsOpen === 'string' ? settingsOpen : undefined}
|
|
1726
|
-
theme={theme}
|
|
1727
|
-
onSetTheme={setTheme}
|
|
1728
|
-
cpMode={cpMode}
|
|
1729
|
-
onSetCpMode={setCpMode}
|
|
1730
|
-
minimapVisible={minimapVisible}
|
|
1731
|
-
onToggleMinimap={toggleMinimap}
|
|
1732
|
-
zoomCtlVisible={zoomCtlVisible}
|
|
1733
|
-
onToggleZoomCtl={toggleZoomCtl}
|
|
1734
|
-
annotationsVisible={annotationsVisible}
|
|
1735
|
-
onToggleAnnotations={toggleAnnotations}
|
|
1736
|
-
autoOpenInspector={autoOpenInspector}
|
|
1737
|
-
onToggleAutoOpenInspector={() => setAutoOpenInspector((v) => !v)}
|
|
1738
|
-
hasCanvas={!!activePath && activePath !== SYSTEM_TAB}
|
|
1739
|
-
panelSide={panelSide}
|
|
1740
|
-
onSetPanelSide={(id, side) => setPanelSide((prev) => ({ ...prev, [id]: side }))}
|
|
1741
|
-
layersMode={layersMode}
|
|
1742
|
-
onSetLayersMode={(m) => {
|
|
1743
|
-
setLayersMode(m);
|
|
1744
|
-
// Leaving separate mode retires the standalone Layers panel.
|
|
1745
|
-
if (m !== 'separate') setLayersOpen(false);
|
|
1746
|
-
}}
|
|
1747
|
-
/>
|
|
1748
|
-
)}
|
|
3408
|
+
{settingsOpen && <ShellSettingsPanel />}
|
|
1749
3409
|
{generateOpen && (
|
|
1750
3410
|
<GenerateDialog onClose={() => setGenerateOpen(false)} onInsert={insertGeneratedImage} />
|
|
1751
3411
|
)}
|
|
@@ -1757,11 +3417,50 @@ function App() {
|
|
|
1757
3417
|
multiple={!!assetPickerReq.multiple}
|
|
1758
3418
|
hasArtboardAnchor={!!assetPickerReq.hasArtboardAnchor}
|
|
1759
3419
|
onPickMany={onPickMany}
|
|
3420
|
+
// S8.22b — the one line per arrival, and "Kept on this Mac" while a linked project is offline
|
|
3421
|
+
toast={shellToast}
|
|
3422
|
+
isOffline={() => importsWaitHereFrom({ cfg, syncStatus })}
|
|
1760
3423
|
/>
|
|
1761
3424
|
)}
|
|
1762
3425
|
{stickerPickerReq && (
|
|
1763
|
-
<
|
|
3426
|
+
<StickersGallery
|
|
3427
|
+
onPick={onStickerPicked}
|
|
3428
|
+
onPickStamp={
|
|
3429
|
+
stickerPickerReq.replace ? undefined : (id) => onStickerPicked({ pack: 'stamps', id })
|
|
3430
|
+
}
|
|
3431
|
+
onClose={() => setStickerPickerReq(null)}
|
|
3432
|
+
anchor={stickerPickerReq.anchor ?? null}
|
|
3433
|
+
/>
|
|
1764
3434
|
)}
|
|
3435
|
+
{/* S4.14 — the vote bar + the Start a vote sheet for the active canvas (Gate 0 A18) */}
|
|
3436
|
+
<VoteHost
|
|
3437
|
+
iframesRef={iframesRef}
|
|
3438
|
+
activePath={activePath}
|
|
3439
|
+
canEdit={!viewerMode}
|
|
3440
|
+
role={activeRole}
|
|
3441
|
+
notify={notify}
|
|
3442
|
+
/>
|
|
3443
|
+
{templatesReq && (
|
|
3444
|
+
<TemplatesPanel
|
|
3445
|
+
onPick={({ id }) => postToActiveCanvas({ dgn: 'insert-template', id, follow: true })}
|
|
3446
|
+
onDescribe={(text) => getPaletteEnv().askAI(text)}
|
|
3447
|
+
canAsk={getPaletteEnv().canAskAI()}
|
|
3448
|
+
onClose={() => setTemplatesReq(null)}
|
|
3449
|
+
anchor={templatesReq.anchor ?? null}
|
|
3450
|
+
/>
|
|
3451
|
+
)}
|
|
3452
|
+
{componentsReq && (
|
|
3453
|
+
<ComponentPicker
|
|
3454
|
+
canvas={componentsReq.canvas}
|
|
3455
|
+
canEdit={!viewerMode}
|
|
3456
|
+
anchor={componentsReq.anchor ?? null}
|
|
3457
|
+
onPlace={(msg) => postToActiveCanvas(msg)}
|
|
3458
|
+
onPreview={(msg) => postToActiveCanvas(msg)}
|
|
3459
|
+
onOpenDesignSystem={openSystem}
|
|
3460
|
+
onClose={() => setComponentsReq(null)}
|
|
3461
|
+
/>
|
|
3462
|
+
)}
|
|
3463
|
+
<SizePickerHost req={sizesReq} onOpen={setSizesReq} onClose={() => setSizesReq(null)} />
|
|
1765
3464
|
{diffTarget && (
|
|
1766
3465
|
<DiffView
|
|
1767
3466
|
target={diffTarget}
|
|
@@ -1770,7 +3469,10 @@ function App() {
|
|
|
1770
3469
|
onClose={() => setDiffTarget(null)}
|
|
1771
3470
|
onRestore={async (file, version) => {
|
|
1772
3471
|
const res = acceptedDiff
|
|
1773
|
-
? await restoreProjectVersion(
|
|
3472
|
+
? await restoreProjectVersion(
|
|
3473
|
+
file,
|
|
3474
|
+
/^r\d+$/.test(version || '') ? Number(version.slice(1)) : NaN
|
|
3475
|
+
)
|
|
1774
3476
|
: await gitDiscard([file]);
|
|
1775
3477
|
if (res?.ok) setDiffTarget(null);
|
|
1776
3478
|
else window.alert(res?.error || 'Could not restore that version. Try again.');
|
|
@@ -1784,12 +3486,27 @@ function App() {
|
|
|
1784
3486
|
if (res.ok) {
|
|
1785
3487
|
setDiffTarget(null);
|
|
1786
3488
|
} else {
|
|
1787
|
-
window.alert(
|
|
3489
|
+
window.alert(
|
|
3490
|
+
res.error || 'Could not finish the merge. Get the latest again, then retry.'
|
|
3491
|
+
);
|
|
1788
3492
|
}
|
|
1789
3493
|
}}
|
|
1790
3494
|
/>
|
|
1791
3495
|
)}
|
|
1792
|
-
|
|
3496
|
+
{/* S3.5 — Present ⌄ › Order and notes… (editors; the server refuses the rest) */}
|
|
3497
|
+
{orderNotesOpen && activePath && activePath !== SYSTEM_TAB && !viewerMode ? (
|
|
3498
|
+
<OrderNotesMount
|
|
3499
|
+
key={activePath}
|
|
3500
|
+
path={activePath}
|
|
3501
|
+
canvasName={displayName(basename(activePath))}
|
|
3502
|
+
onClose={() => setOrderNotesOpen(false)}
|
|
3503
|
+
/>
|
|
3504
|
+
) : null}
|
|
3505
|
+
<ShortcutsOverlay
|
|
3506
|
+
open={shortcutsOpen}
|
|
3507
|
+
onClose={() => setShortcutsOpen(false)}
|
|
3508
|
+
readOnly={viewerMode}
|
|
3509
|
+
/>
|
|
1793
3510
|
<HelpModal
|
|
1794
3511
|
open={helpOpen}
|
|
1795
3512
|
onClose={() => setHelpOpen(false)}
|
|
@@ -1797,6 +3514,7 @@ function App() {
|
|
|
1797
3514
|
setHelpOpen(false);
|
|
1798
3515
|
startTour(USAGE_TOUR);
|
|
1799
3516
|
}}
|
|
3517
|
+
canAddGuides={!viewerMode}
|
|
1800
3518
|
/>
|
|
1801
3519
|
{/* `activeCanvas` is THIS window's truth. The server's `_active.json` is
|
|
1802
3520
|
global and sticky — it survives closing every tab and is written by any
|
|
@@ -1808,8 +3526,13 @@ function App() {
|
|
|
1808
3526
|
activeCanvas={activePath}
|
|
1809
3527
|
onClose={() => setReportBugOpen(false)}
|
|
1810
3528
|
/>
|
|
3529
|
+
{/* S5.14: the shell's "Quit while AI is working?" (quit://ask) — desktop only. */}
|
|
3530
|
+
<QuitDialog />
|
|
1811
3531
|
<WhatsNewPanel wn={whatsNew} onStartTour={startTour} />
|
|
1812
|
-
<ExportPanel
|
|
3532
|
+
<ExportPanel
|
|
3533
|
+
center={exportCenter}
|
|
3534
|
+
projectName={cfg?.cloud?.projectName || cfg?.name || project || ''}
|
|
3535
|
+
/>
|
|
1813
3536
|
<ReadinessDialog open={readinessOpen} onClose={() => setReadinessOpen(false)} />
|
|
1814
3537
|
<IntroVideoDialog open={introOpen} onClose={() => setIntroOpen(false)} />
|
|
1815
3538
|
<SetupChecklistDialog
|
|
@@ -1824,59 +3547,10 @@ function App() {
|
|
|
1824
3547
|
<FigmaImportPanel
|
|
1825
3548
|
onClose={() => setFigmaImportOpen(false)}
|
|
1826
3549
|
onImported={() => loadTree()}
|
|
3550
|
+
activePath={activePath}
|
|
1827
3551
|
/>
|
|
1828
3552
|
)}
|
|
1829
|
-
{
|
|
1830
|
-
<div className="mdcc-tour-nudge" role="status" aria-live="polite">
|
|
1831
|
-
<div className="mdcc-tour-nudge__body">
|
|
1832
|
-
New here? Take a 60-second tour of the canvas browser.
|
|
1833
|
-
</div>
|
|
1834
|
-
<button
|
|
1835
|
-
type="button"
|
|
1836
|
-
className="mdcc-tour-nudge__cta"
|
|
1837
|
-
onClick={() => {
|
|
1838
|
-
markUsageSeen();
|
|
1839
|
-
startTour(USAGE_TOUR);
|
|
1840
|
-
}}
|
|
1841
|
-
>
|
|
1842
|
-
Start
|
|
1843
|
-
</button>
|
|
1844
|
-
<button
|
|
1845
|
-
type="button"
|
|
1846
|
-
className="mdcc-tour-nudge__skip"
|
|
1847
|
-
aria-label="Dismiss"
|
|
1848
|
-
onClick={markUsageSeen}
|
|
1849
|
-
>
|
|
1850
|
-
×
|
|
1851
|
-
</button>
|
|
1852
|
-
</div>
|
|
1853
|
-
)}
|
|
1854
|
-
{/* Phase 29 (E4) — the collab "rychlý kurz", offered once after onboarding. */}
|
|
1855
|
-
{collabNudge && !tourSteps && (
|
|
1856
|
-
<div className="mdcc-tour-nudge" role="status" aria-live="polite">
|
|
1857
|
-
<div className="mdcc-tour-nudge__body">
|
|
1858
|
-
New to working with a team? See how saving & sharing works — 60 seconds.
|
|
1859
|
-
</div>
|
|
1860
|
-
<button
|
|
1861
|
-
type="button"
|
|
1862
|
-
className="mdcc-tour-nudge__cta"
|
|
1863
|
-
onClick={() => {
|
|
1864
|
-
markCollabSeen();
|
|
1865
|
-
startTour(COLLAB_TOUR);
|
|
1866
|
-
}}
|
|
1867
|
-
>
|
|
1868
|
-
Start
|
|
1869
|
-
</button>
|
|
1870
|
-
<button
|
|
1871
|
-
type="button"
|
|
1872
|
-
className="mdcc-tour-nudge__skip"
|
|
1873
|
-
aria-label="Dismiss"
|
|
1874
|
-
onClick={markCollabSeen}
|
|
1875
|
-
>
|
|
1876
|
-
×
|
|
1877
|
-
</button>
|
|
1878
|
-
</div>
|
|
1879
|
-
)}
|
|
3553
|
+
{/* V2-4.9 — the first-run tour offers are callouts now (client/v2/shell/callouts-model.js tourCallout). */}
|
|
1880
3554
|
<TourOverlay
|
|
1881
3555
|
steps={tourSteps ?? []}
|
|
1882
3556
|
open={!!tourSteps}
|
|
@@ -1890,6 +3564,47 @@ function App() {
|
|
|
1890
3564
|
);
|
|
1891
3565
|
}
|
|
1892
3566
|
|
|
3567
|
+
function App() {
|
|
3568
|
+
return (
|
|
3569
|
+
<ShellState>
|
|
3570
|
+
<ShellTree />
|
|
3571
|
+
</ShellState>
|
|
3572
|
+
);
|
|
3573
|
+
}
|
|
3574
|
+
|
|
3575
|
+
// The web fonts (Inter, Inter Tight, JetBrains Mono) are self-hosted: `client/styles/fonts.css` declares them from
|
|
3576
|
+
// `/_client/fonts/` with `font-display: swap`, so the app makes no request to Google Fonts (#175 item 4) and the
|
|
3577
|
+
// first paint waits on nothing (v2.0.0-rc.1's white Home was a parser-blocking Google stylesheet).
|
|
3578
|
+
|
|
1893
3579
|
// DDR-247 — `?embed=1` is a different root, not a mode of <App>: nothing the
|
|
1894
3580
|
// shell does (prefs, address bar, panels) runs inside another app's frame.
|
|
1895
|
-
|
|
3581
|
+
// V2-3.3 — so is Home (`/_config.mode === 'home'`, client/home/shell-mode.js).
|
|
3582
|
+
const root = createRoot(document.getElementById('root'));
|
|
3583
|
+
// S3.7a — a follow link (`?present=follow`, or any `audience` URL) is the follower page: never the editor.
|
|
3584
|
+
// sec-a C3 — every root sits in the shell error boundary: one render throw shows a Reload card
|
|
3585
|
+
// instead of unmounting the whole window.
|
|
3586
|
+
if (isFollowLocation(location))
|
|
3587
|
+
root.render(
|
|
3588
|
+
<ShellErrorBoundary>
|
|
3589
|
+
<FollowView />
|
|
3590
|
+
</ShellErrorBoundary>
|
|
3591
|
+
);
|
|
3592
|
+
else if (isEmbedLocation(location))
|
|
3593
|
+
root.render(
|
|
3594
|
+
<ShellErrorBoundary>
|
|
3595
|
+
<EmbedView />
|
|
3596
|
+
</ShellErrorBoundary>
|
|
3597
|
+
);
|
|
3598
|
+
else {
|
|
3599
|
+
// S11.13 (Gate 0 D20) — the 1.x preferences move to their v2 homes once per origin, before the
|
|
3600
|
+
// first v2 home is read (a second boot is a no-op without a request). Bounded: a slow server
|
|
3601
|
+
// never holds the first paint, and a failure leaves the 1.x keys where they are.
|
|
3602
|
+
const migrated = migrateAtBoot().catch(() => {});
|
|
3603
|
+
Promise.race([migrated, new Promise((r) => setTimeout(r, 1500))]).then(() =>
|
|
3604
|
+
bootShellMode((mode) =>
|
|
3605
|
+
root.render(
|
|
3606
|
+
<ShellErrorBoundary>{mode === 'home' ? <HomeApp /> : <App />}</ShellErrorBoundary>
|
|
3607
|
+
)
|
|
3608
|
+
)
|
|
3609
|
+
);
|
|
3610
|
+
}
|