@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.
Files changed (1985) hide show
  1. package/apps/hub/src/project-transactions/baseline.mjs +276 -0
  2. package/apps/hub/src/project-transactions/kernel.mjs +1756 -0
  3. package/apps/hub/src/project-transactions/lanes.mjs +287 -0
  4. package/apps/hub/src/project-transactions/runs-core.mjs +639 -0
  5. package/apps/hub/src/project-transactions/store-core.mjs +831 -0
  6. package/apps/studio/access/closure.ts +1075 -0
  7. package/apps/studio/access/filters.ts +1193 -0
  8. package/apps/studio/access/frame.ts +365 -0
  9. package/apps/studio/access/known-canvases.ts +82 -0
  10. package/apps/studio/access/request.ts +637 -0
  11. package/apps/studio/access/roles.ts +187 -0
  12. package/apps/studio/access/scope.ts +407 -0
  13. package/apps/studio/access/share-map.ts +434 -0
  14. package/apps/studio/acp/adapter-stderr.ts +22 -0
  15. package/apps/studio/acp/agent-path.ts +39 -0
  16. package/apps/studio/acp/ask-queue.ts +238 -0
  17. package/apps/studio/acp/audience.ts +615 -0
  18. package/apps/studio/acp/bootstrap-brief.ts +32 -15
  19. package/apps/studio/acp/bridge.ts +890 -114
  20. package/apps/studio/acp/chat-search.ts +195 -0
  21. package/apps/studio/acp/connected-fact.ts +83 -0
  22. package/apps/studio/acp/design-write-verb.ts +71 -0
  23. package/apps/studio/acp/env.ts +86 -0
  24. package/apps/studio/acp/index.ts +808 -58
  25. package/apps/studio/acp/login-state.ts +15 -1
  26. package/apps/studio/acp/may-scope.ts +771 -0
  27. package/apps/studio/acp/plugin-bootstrap.ts +90 -5
  28. package/apps/studio/acp/probe.ts +18 -4
  29. package/apps/studio/acp/repo-private.ts +73 -0
  30. package/apps/studio/acp/running.ts +50 -5
  31. package/apps/studio/acp/transcript.ts +356 -21
  32. package/apps/studio/acp/write-scope.ts +141 -11
  33. package/apps/studio/actions/agents.ts +2068 -0
  34. package/apps/studio/actions/canvas-keys.ts +41 -0
  35. package/apps/studio/actions/ctx.ts +118 -0
  36. package/apps/studio/actions/defs/_v1.ts +55 -0
  37. package/apps/studio/actions/defs/ai-runs.ts +56 -0
  38. package/apps/studio/actions/defs/annotation.ts +164 -0
  39. package/apps/studio/actions/defs/app.ts +269 -0
  40. package/apps/studio/actions/defs/canvas.ts +281 -0
  41. package/apps/studio/actions/defs/chat.ts +158 -0
  42. package/apps/studio/actions/defs/diagnostics.ts +52 -0
  43. package/apps/studio/actions/defs/ds.ts +139 -0
  44. package/apps/studio/actions/defs/edit.ts +986 -0
  45. package/apps/studio/actions/defs/export.ts +221 -0
  46. package/apps/studio/actions/defs/history.ts +175 -0
  47. package/apps/studio/actions/defs/native.ts +264 -0
  48. package/apps/studio/actions/defs/presence.ts +53 -0
  49. package/apps/studio/actions/defs/search.ts +90 -0
  50. package/apps/studio/actions/defs/sync.ts +47 -0
  51. package/apps/studio/actions/defs/timeline.ts +254 -0
  52. package/apps/studio/actions/defs/tool.ts +152 -0
  53. package/apps/studio/actions/defs/ui.ts +38 -0
  54. package/apps/studio/actions/defs/video.ts +115 -0
  55. package/apps/studio/actions/defs/view.ts +556 -0
  56. package/apps/studio/actions/documents.ts +32 -0
  57. package/apps/studio/actions/forward.ts +48 -0
  58. package/apps/studio/actions/help.ts +115 -0
  59. package/apps/studio/actions/index.ts +51 -0
  60. package/apps/studio/actions/keymap.gen.ts +1170 -0
  61. package/apps/studio/actions/keys.ts +271 -0
  62. package/apps/studio/actions/legacy.ts +250 -0
  63. package/apps/studio/actions/manifest-version.ts +18 -0
  64. package/apps/studio/actions/menu.ts +203 -0
  65. package/apps/studio/actions/native-menu.ts +132 -0
  66. package/apps/studio/actions/resolve.ts +118 -0
  67. package/apps/studio/actions/types.ts +266 -0
  68. package/apps/studio/actions/uniqueness.ts +119 -0
  69. package/apps/studio/actions/verbs.ts +306 -0
  70. package/apps/studio/actions.manifest.json +7826 -0
  71. package/apps/studio/actions.parity.json +268 -0
  72. package/apps/studio/activity.ts +4 -31
  73. package/apps/studio/agent-runs.ts +679 -0
  74. package/apps/studio/ai/attach-grants.ts +497 -0
  75. package/apps/studio/ai/copy-meta.ts +204 -0
  76. package/apps/studio/ai/create-claim.ts +88 -0
  77. package/apps/studio/ai/lease-home.ts +212 -0
  78. package/apps/studio/ai/run-doing.ts +106 -0
  79. package/apps/studio/ai/run-lifecycle.ts +337 -0
  80. package/apps/studio/ai/run-progress.ts +154 -0
  81. package/apps/studio/ai/runs.ts +1232 -0
  82. package/apps/studio/ai/save-hold.ts +565 -0
  83. package/apps/studio/ai/watch-progress.ts +182 -0
  84. package/apps/studio/ai/write-claim-scope.ts +39 -0
  85. package/apps/studio/ai/write-claim.ts +193 -0
  86. package/apps/studio/ai-banner.tsx +8 -14
  87. package/apps/studio/annotations/ai-read.ts +289 -1
  88. package/apps/studio/annotations/ai-write.ts +281 -23
  89. package/apps/studio/annotations/artboard-members.ts +86 -0
  90. package/apps/studio/annotations/board-ops.ts +358 -0
  91. package/apps/studio/annotations/board-schema.ts +81 -0
  92. package/apps/studio/annotations/constants.ts +2 -0
  93. package/apps/studio/annotations/elements/_shared.ts +290 -1
  94. package/apps/studio/annotations/elements/arrow.model.ts +29 -2
  95. package/apps/studio/annotations/elements/ballot.model.ts +110 -0
  96. package/apps/studio/annotations/elements/media.model.ts +11 -1
  97. package/apps/studio/annotations/elements/section.model.ts +3 -1
  98. package/apps/studio/annotations/elements/stamp.model.ts +83 -0
  99. package/apps/studio/annotations/elements/sticky.model.ts +235 -0
  100. package/apps/studio/annotations/elements/vote.model.ts +71 -0
  101. package/apps/studio/annotations/fields.ts +51 -0
  102. package/apps/studio/annotations/figjam-into.ts +119 -0
  103. package/apps/studio/annotations/hosts.ts +231 -0
  104. package/apps/studio/annotations/migrate-v1.ts +21 -2
  105. package/apps/studio/annotations/ops.ts +23 -0
  106. package/apps/studio/annotations/registry.ts +154 -16
  107. package/apps/studio/annotations/route.ts +268 -0
  108. package/apps/studio/annotations/run-tag.ts +150 -0
  109. package/apps/studio/annotations/stamp-kinds.ts +66 -0
  110. package/apps/studio/annotations/templates.ts +154 -0
  111. package/apps/studio/annotations/text-steps.ts +253 -0
  112. package/apps/studio/annotations/time-marks.ts +140 -0
  113. package/apps/studio/annotations/types.ts +22 -0
  114. package/apps/studio/annotations/ui/ai-marks.tsx +64 -0
  115. package/apps/studio/annotations/ui/ai-seen.tsx +117 -0
  116. package/apps/studio/annotations/ui/arrow-bind.ts +347 -0
  117. package/apps/studio/annotations/ui/arrow-cards.tsx +396 -0
  118. package/apps/studio/annotations/ui/arrow-kinds.ts +90 -0
  119. package/apps/studio/annotations/ui/bar-place.ts +18 -0
  120. package/apps/studio/annotations/ui/element-node.tsx +300 -52
  121. package/apps/studio/annotations/ui/host-view.ts +99 -0
  122. package/apps/studio/annotations/ui/locked.tsx +83 -0
  123. package/apps/studio/annotations/ui/lod.tsx +246 -0
  124. package/apps/studio/annotations/ui/placement.tsx +270 -0
  125. package/apps/studio/annotations/ui/pointer-pipeline.ts +10 -0
  126. package/apps/studio/annotations/ui/posture.ts +124 -0
  127. package/apps/studio/annotations/ui/quiet-tip.ts +28 -0
  128. package/apps/studio/annotations/ui/render-model.ts +27 -2
  129. package/apps/studio/annotations/ui/rest-route.ts +152 -0
  130. package/apps/studio/annotations/ui/ride.ts +957 -0
  131. package/apps/studio/annotations/ui/scene.tsx +59 -11
  132. package/apps/studio/annotations/ui/section-fold.ts +95 -0
  133. package/apps/studio/annotations/ui/shell-asks.ts +62 -0
  134. package/apps/studio/annotations/ui/stamps.ts +221 -0
  135. package/apps/studio/annotations/ui/stamps.tsx +272 -0
  136. package/apps/studio/annotations/ui/sticker-drop.ts +147 -0
  137. package/apps/studio/annotations/ui/sticker-preview.ts +41 -0
  138. package/apps/studio/annotations/ui/sticky-resolve.ts +106 -0
  139. package/apps/studio/annotations/ui/template-place.ts +108 -0
  140. package/apps/studio/annotations/ui/text-editor.tsx +6 -4
  141. package/apps/studio/annotations/ui/text-session.ts +63 -1
  142. package/apps/studio/annotations/ui/text-style.ts +11 -3
  143. package/apps/studio/annotations/ui/time-pins.tsx +134 -0
  144. package/apps/studio/annotations/ui/tool-prefs.ts +242 -0
  145. package/apps/studio/annotations/ui/tool-state.ts +211 -0
  146. package/apps/studio/annotations/ui/visibility.ts +76 -0
  147. package/apps/studio/annotations/ui/vote-dots.tsx +283 -0
  148. package/apps/studio/annotations/v1-adapter.ts +88 -5
  149. package/apps/studio/annotations/validate-board.ts +257 -0
  150. package/apps/studio/annotations/vote-guard.ts +48 -0
  151. package/apps/studio/annotations/votes-local.ts +481 -0
  152. package/apps/studio/annotations-bindings.ts +54 -8
  153. package/apps/studio/annotations-context-toolbar.tsx +612 -150
  154. package/apps/studio/annotations-layer.tsx +1768 -674
  155. package/apps/studio/annotations-model.ts +80 -5
  156. package/apps/studio/api.ts +1553 -459
  157. package/apps/studio/artboard-activity-overlay.tsx +530 -3
  158. package/apps/studio/artboard-ai-copies.tsx +187 -0
  159. package/apps/studio/artboard-convert-marks.tsx +142 -0
  160. package/apps/studio/artboard-gap-mark.tsx +177 -0
  161. package/apps/studio/artboard-ghosts-overlay.tsx +106 -0
  162. package/apps/studio/artboard-growth-memory.ts +56 -0
  163. package/apps/studio/artboard-growth-tag.tsx +115 -0
  164. package/apps/studio/artboard-guides-overlay.tsx +86 -26
  165. package/apps/studio/artboard-marquee.tsx +21 -6
  166. package/apps/studio/artboard-new-section.tsx +188 -0
  167. package/apps/studio/artboard-warn-mark.tsx +330 -0
  168. package/apps/studio/asset-details.ts +339 -0
  169. package/apps/studio/asset-generated.ts +99 -0
  170. package/apps/studio/asset-origins.ts +147 -0
  171. package/apps/studio/asset-placeholder.tsx +481 -0
  172. package/apps/studio/asset-rename.ts +171 -0
  173. package/apps/studio/asset-trash.ts +176 -0
  174. package/apps/studio/asset-upload-bars.tsx +167 -0
  175. package/apps/studio/asset-upload.ts +145 -1
  176. package/apps/studio/attribute-artboards.ts +327 -0
  177. package/apps/studio/bin/_ab-headless.sh +35 -0
  178. package/apps/studio/bin/_ab-park.sh +83 -0
  179. package/apps/studio/bin/_agent-browser-safe.mjs +36 -3
  180. package/apps/studio/bin/_annotate-post.mjs +137 -0
  181. package/apps/studio/bin/_assets.mjs +213 -0
  182. package/apps/studio/bin/_brand-colours.mjs +189 -0
  183. package/apps/studio/bin/_brand-fonts.mjs +158 -0
  184. package/apps/studio/bin/_brand-site.mjs +309 -0
  185. package/apps/studio/bin/_canvas-errors.mjs +143 -0
  186. package/apps/studio/bin/_canvas-rects-playwright.mjs +6 -3
  187. package/apps/studio/bin/_canvas-rects-static.mjs +1 -1
  188. package/apps/studio/bin/_check.mjs +122 -0
  189. package/apps/studio/bin/_comments.mjs +274 -0
  190. package/apps/studio/bin/_curl-local.mjs +122 -3
  191. package/apps/studio/bin/_decode-webaudio.mjs +120 -0
  192. package/apps/studio/bin/_describe.mjs +220 -0
  193. package/apps/studio/bin/_ds-check.mjs +26 -0
  194. package/apps/studio/bin/_ds-prove-playwright.mjs +327 -0
  195. package/apps/studio/bin/_ds-upgrade.mjs +14 -0
  196. package/apps/studio/bin/_ds.mjs +82 -0
  197. package/apps/studio/bin/_enumerate-artboards-playwright.mjs +6 -3
  198. package/apps/studio/bin/_exports.mjs +244 -0
  199. package/apps/studio/bin/_fetch-asset.mjs +209 -15
  200. package/apps/studio/bin/_history.mjs +509 -0
  201. package/apps/studio/bin/_html-playwright.mjs +10 -3
  202. package/apps/studio/bin/_import-asset.mjs +446 -15
  203. package/apps/studio/bin/_import-brand.mjs +40 -156
  204. package/apps/studio/bin/_import-figma.mjs +878 -20
  205. package/apps/studio/bin/_import-tokens.mjs +8 -118
  206. package/apps/studio/bin/_index-cli.mjs +126 -0
  207. package/apps/studio/bin/_layout-check.mjs +35 -0
  208. package/apps/studio/bin/_logs.mjs +130 -0
  209. package/apps/studio/bin/_motion-sample-playwright.mjs +6 -3
  210. package/apps/studio/bin/_no-egress.sh +36 -0
  211. package/apps/studio/bin/_pdf-playwright.mjs +9 -3
  212. package/apps/studio/bin/_perf-probe-safari.mjs +327 -37
  213. package/apps/studio/bin/_perf-probe-studio.mjs +259 -0
  214. package/apps/studio/bin/_perf-probe.mjs +35 -1
  215. package/apps/studio/bin/_perf-shared.mjs +377 -12
  216. package/apps/studio/bin/_place.mjs +35 -0
  217. package/apps/studio/bin/_png-playwright.mjs +27 -7
  218. package/apps/studio/bin/_pptx-playwright.mjs +4 -3
  219. package/apps/studio/bin/_pw-launch.mjs +124 -2
  220. package/apps/studio/bin/_record-shot.sh +65 -0
  221. package/apps/studio/bin/_rects-input.mjs +69 -0
  222. package/apps/studio/bin/_reel-place.mjs +160 -0
  223. package/apps/studio/bin/_region.mjs +37 -1
  224. package/apps/studio/bin/_runs.mjs +178 -0
  225. package/apps/studio/bin/_screenshot-playwright.mjs +6 -3
  226. package/apps/studio/bin/_studio-verb.mjs +220 -0
  227. package/apps/studio/bin/_svg-playwright.mjs +4 -3
  228. package/apps/studio/bin/_sync.mjs +179 -0
  229. package/apps/studio/bin/_thumbs-playwright.mjs +704 -0
  230. package/apps/studio/bin/_tile-draw.mjs +74 -0
  231. package/apps/studio/bin/_transcribe-local.mjs +243 -0
  232. package/apps/studio/bin/_transcribe.mjs +48 -56
  233. package/apps/studio/bin/_trash.mjs +287 -0
  234. package/apps/studio/bin/_url-guard.mjs +88 -0
  235. package/apps/studio/bin/_url-guard.sh +16 -0
  236. package/apps/studio/bin/_video-playwright.mjs +9 -3
  237. package/apps/studio/bin/_video-verbs.mjs +403 -0
  238. package/apps/studio/bin/_write-claim.mjs +124 -0
  239. package/apps/studio/bin/annotate.mjs +348 -330
  240. package/apps/studio/bin/assets.sh +28 -0
  241. package/apps/studio/bin/beats.mjs +237 -0
  242. package/apps/studio/bin/beats.sh +24 -0
  243. package/apps/studio/bin/bootstrap-check.sh +2 -1
  244. package/apps/studio/bin/canvas-edit.sh +17 -9
  245. package/apps/studio/bin/canvas-errors.sh +18 -0
  246. package/apps/studio/bin/canvas-rects.sh +14 -0
  247. package/apps/studio/bin/canvas-source.sh +18 -0
  248. package/apps/studio/bin/captions.sh +13 -0
  249. package/apps/studio/bin/chat-open.sh +2 -2
  250. package/apps/studio/bin/check.sh +27 -0
  251. package/apps/studio/bin/comments.sh +20 -0
  252. package/apps/studio/bin/cut-to-beat.sh +13 -0
  253. package/apps/studio/bin/cut-words.sh +13 -0
  254. package/apps/studio/bin/describe.sh +28 -0
  255. package/apps/studio/bin/draw-proof.sh +41 -8
  256. package/apps/studio/bin/ds-check.sh +30 -0
  257. package/apps/studio/bin/ds-upgrade.sh +30 -0
  258. package/apps/studio/bin/ds.sh +29 -0
  259. package/apps/studio/bin/exports.sh +19 -0
  260. package/apps/studio/bin/generate.sh +45 -3
  261. package/apps/studio/bin/handoff.sh +60 -1
  262. package/apps/studio/bin/history.sh +24 -0
  263. package/apps/studio/bin/import-brand.sh +5 -3
  264. package/apps/studio/bin/index.sh +26 -0
  265. package/apps/studio/bin/layout-check.sh +20 -0
  266. package/apps/studio/bin/logs.sh +17 -0
  267. package/apps/studio/bin/perf.sh +93 -3
  268. package/apps/studio/bin/photo-bg-remove.sh +49 -7
  269. package/apps/studio/bin/place.sh +20 -0
  270. package/apps/studio/bin/read-annotations.mjs +52 -1
  271. package/apps/studio/bin/reel-place.sh +15 -0
  272. package/apps/studio/bin/runs.sh +19 -0
  273. package/apps/studio/bin/screenshot.sh +37 -21
  274. package/apps/studio/bin/server-up.sh +50 -13
  275. package/apps/studio/bin/smoke.sh +10 -0
  276. package/apps/studio/bin/sync.sh +18 -0
  277. package/apps/studio/bin/to-lottie.sh +1 -1
  278. package/apps/studio/bin/transcribe-local.sh +27 -0
  279. package/apps/studio/bin/trash.sh +23 -0
  280. package/apps/studio/bin/visual-sanity.sh +1 -0
  281. package/apps/studio/bridge/canvas-mode-store.ts +301 -0
  282. package/apps/studio/bridge/canvas-modes.ts +548 -0
  283. package/apps/studio/bridge/dgn-protocol.ts +2671 -0
  284. package/apps/studio/bridge/esc-ladder.ts +98 -0
  285. package/apps/studio/bridge/link-target.ts +157 -0
  286. package/apps/studio/bridge/mode-shows.ts +167 -0
  287. package/apps/studio/bridge/occlusion.ts +108 -0
  288. package/apps/studio/bridge/paste-data.ts +101 -0
  289. package/apps/studio/build.ts +12 -1
  290. package/apps/studio/bunfig.toml +4 -0
  291. package/apps/studio/canvas-build-sandbox.ts +34 -5
  292. package/apps/studio/canvas-build-worker.ts +23 -1
  293. package/apps/studio/canvas-build.ts +419 -15
  294. package/apps/studio/canvas-comment-mount.tsx +113 -25
  295. package/apps/studio/canvas-create.ts +285 -49
  296. package/apps/studio/canvas-cursors.ts +12 -0
  297. package/apps/studio/canvas-ds-icons.tsx +241 -0
  298. package/apps/studio/canvas-edit.ts +1188 -172
  299. package/apps/studio/canvas-hud-tokens.gen.ts +120 -0
  300. package/apps/studio/canvas-icons.tsx +47 -0
  301. package/apps/studio/canvas-imports.ts +23 -4
  302. package/apps/studio/canvas-lib-inline.ts +57 -3
  303. package/apps/studio/canvas-lib.tsx +1033 -263
  304. package/apps/studio/canvas-list-watch.ts +73 -2
  305. package/apps/studio/canvas-meta.schema.json +11 -0
  306. package/apps/studio/canvas-notifications.tsx +28 -3
  307. package/apps/studio/canvas-pipeline.ts +43 -8
  308. package/apps/studio/canvas-replay-keys.ts +65 -0
  309. package/apps/studio/canvas-rows.ts +116 -0
  310. package/apps/studio/canvas-shell.tsx +784 -698
  311. package/apps/studio/canvas-source/errors.ts +315 -0
  312. package/apps/studio/canvas-source/source-map.ts +69 -0
  313. package/apps/studio/canvas-theme-pill.tsx +164 -0
  314. package/apps/studio/canvas-theme.ts +133 -0
  315. package/apps/studio/canvas-top-level.ts +69 -0
  316. package/apps/studio/check/ids.ts +28 -0
  317. package/apps/studio/check/index.ts +586 -0
  318. package/apps/studio/check/link-resolver.ts +75 -0
  319. package/apps/studio/check/meta.ts +79 -0
  320. package/apps/studio/check/video.ts +352 -0
  321. package/apps/studio/client/actions/shell-key-handlers.js +450 -0
  322. package/apps/studio/client/app.jsx +2918 -1203
  323. package/apps/studio/client/canvas-url.js +241 -5
  324. package/apps/studio/client/clipboard-relay.ts +144 -0
  325. package/apps/studio/client/command-palette-match.js +4 -2
  326. package/apps/studio/client/comments-overlay.css +529 -144
  327. package/apps/studio/client/dialogs/asset-picker.jsx +77 -32
  328. package/apps/studio/client/dialogs/command-palette.jsx +453 -67
  329. package/apps/studio/client/dialogs/export-dialog.jsx +6 -781
  330. package/apps/studio/client/dialogs/help-modal.jsx +31 -2
  331. package/apps/studio/client/dialogs/shortcuts-overlay.jsx +201 -106
  332. package/apps/studio/client/edit-op-relay.ts +77 -0
  333. package/apps/studio/client/embed-view.jsx +25 -5
  334. package/apps/studio/client/export-bridge-scope.js +72 -0
  335. package/apps/studio/client/export-center.jsx +179 -369
  336. package/apps/studio/client/export-lane.js +117 -0
  337. package/apps/studio/client/export-region.ts +25 -0
  338. package/apps/studio/client/file-tree.jsx +4 -4
  339. package/apps/studio/client/fonts/LICENSE-Inter-Tight.txt +93 -0
  340. package/apps/studio/client/fonts/LICENSE-Inter.txt +93 -0
  341. package/apps/studio/client/fonts/LICENSE-JetBrains-Mono.txt +93 -0
  342. package/apps/studio/client/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  343. package/apps/studio/client/fonts/inter-latin-wght-normal.woff2 +0 -0
  344. package/apps/studio/client/fonts/inter-tight-latin-ext-wght-normal.woff2 +0 -0
  345. package/apps/studio/client/fonts/inter-tight-latin-wght-normal.woff2 +0 -0
  346. package/apps/studio/client/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  347. package/apps/studio/client/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  348. package/apps/studio/client/frame-cap.js +132 -0
  349. package/apps/studio/client/generate-dialog.jsx +38 -36
  350. package/apps/studio/client/github.js +85 -26
  351. package/apps/studio/client/home/HomeAsk.jsx +220 -0
  352. package/apps/studio/client/home/InviteSheet.jsx +150 -0
  353. package/apps/studio/client/home/Shelves.jsx +216 -0
  354. package/apps/studio/client/home/Starters.jsx +42 -0
  355. package/apps/studio/client/home/TargetChip.jsx +152 -0
  356. package/apps/studio/client/home/home-api.js +275 -0
  357. package/apps/studio/client/home/home-app.jsx +1884 -0
  358. package/apps/studio/client/home/home-icons.jsx +143 -0
  359. package/apps/studio/client/home/home-menu.js +43 -0
  360. package/apps/studio/client/home/home-model.js +514 -0
  361. package/apps/studio/client/home/home-starters.js +136 -0
  362. package/apps/studio/client/home/home.css +1681 -0
  363. package/apps/studio/client/home/invite-flow.js +422 -0
  364. package/apps/studio/client/home/shell-mode.js +49 -0
  365. package/apps/studio/client/hooks/annotations-hidden-toast.js +21 -0
  366. package/apps/studio/client/hooks/canvas-origin-probe.js +26 -0
  367. package/apps/studio/client/hooks/edit-scope-query.js +16 -0
  368. package/apps/studio/client/hooks/use-action-keys.jsx +121 -0
  369. package/apps/studio/client/hooks/use-canvas-bridge.jsx +881 -247
  370. package/apps/studio/client/hooks/use-git-actions.jsx +33 -12
  371. package/apps/studio/client/hooks/use-palette-and-panels.jsx +722 -287
  372. package/apps/studio/client/hooks/use-photo-and-timeline.jsx +268 -307
  373. package/apps/studio/client/hooks/use-project-data.jsx +23 -2
  374. package/apps/studio/client/hooks/use-shell-core.jsx +582 -126
  375. package/apps/studio/client/hooks/use-tabs.jsx +268 -126
  376. package/apps/studio/client/index-loader.ts +3 -1
  377. package/apps/studio/client/index.html +0 -3
  378. package/apps/studio/client/inspector/color-picker.jsx +29 -18
  379. package/apps/studio/client/inspector/css-knobs.jsx +765 -436
  380. package/apps/studio/client/inspector/css-vocab.jsx +37 -4
  381. package/apps/studio/client/inspector/ds-tokens.js +127 -15
  382. package/apps/studio/client/inspector/grid-tracks-editor.jsx +21 -15
  383. package/apps/studio/client/inspector/inspect-computed.jsx +17 -15
  384. package/apps/studio/client/inspector/inspector-panel.jsx +314 -207
  385. package/apps/studio/client/inspector/layers.jsx +90 -65
  386. package/apps/studio/client/inspector/selection.js +20 -0
  387. package/apps/studio/client/inspector/token-popover.jsx +42 -28
  388. package/apps/studio/client/inspector-controls.jsx +453 -106
  389. package/apps/studio/client/panels/BrandUploadPanel.jsx +8 -229
  390. package/apps/studio/client/panels/ChatPanel.jsx +391 -1674
  391. package/apps/studio/client/panels/CloudBar.jsx +548 -252
  392. package/apps/studio/client/panels/CollabModelInfographic.jsx +77 -20
  393. package/apps/studio/client/panels/CreateProject.jsx +224 -40
  394. package/apps/studio/client/panels/DiffView.jsx +27 -10
  395. package/apps/studio/client/panels/ElicitationPrompt.jsx +4 -3
  396. package/apps/studio/client/panels/FigmaImportPanel.jsx +12 -263
  397. package/apps/studio/client/panels/IdentityBar.jsx +262 -74
  398. package/apps/studio/client/panels/IntroVideoDialog.jsx +6 -1
  399. package/apps/studio/client/panels/PermissionPrompt.jsx +85 -9
  400. package/apps/studio/client/panels/ReadinessList.jsx +71 -46
  401. package/apps/studio/client/panels/RepoBranchSwitcher.jsx +124 -745
  402. package/apps/studio/client/panels/SettingsPanel.jsx +492 -608
  403. package/apps/studio/client/panels/SetupChecklist.jsx +10 -3
  404. package/apps/studio/client/panels/SourceConflictPanel.jsx +96 -20
  405. package/apps/studio/client/panels/SyncConsentDialog.jsx +14 -13
  406. package/apps/studio/client/panels/TeamProjects.jsx +365 -119
  407. package/apps/studio/client/panels/ToolGroup.jsx +6 -2
  408. package/apps/studio/client/panels/acp-runtime.js +127 -22
  409. package/apps/studio/client/panels/acp-usage.js +4 -1
  410. package/apps/studio/client/panels/chat-context.js +74 -5
  411. package/apps/studio/client/panels/chat-header.jsx +67 -0
  412. package/apps/studio/client/panels/chat-markdown.jsx +6 -2
  413. package/apps/studio/client/panels/file-deep-link-dialog.jsx +88 -17
  414. package/apps/studio/client/panels/file-preview.jsx +50 -24
  415. package/apps/studio/client/panels/git-grouping.js +9 -2
  416. package/apps/studio/client/panels/slash-commands.gen.js +171 -0
  417. package/apps/studio/client/panels/slash-commands.js +65 -25
  418. package/apps/studio/client/panels/timeline-media-cache.js +68 -2
  419. package/apps/studio/client/panels/timeline-parse.js +62 -22
  420. package/apps/studio/client/panels/timeline-snap.js +4 -1
  421. package/apps/studio/client/panels/transcript-view.js +9 -0
  422. package/apps/studio/client/photo-knobs.jsx +225 -46
  423. package/apps/studio/client/prefs-migrate.js +79 -0
  424. package/apps/studio/client/report-bug.jsx +59 -26
  425. package/apps/studio/client/selection-scope.js +215 -0
  426. package/apps/studio/client/share-link.js +104 -8
  427. package/apps/studio/client/shell/account-tone.js +28 -0
  428. package/apps/studio/client/shell/banners.jsx +21 -188
  429. package/apps/studio/client/shell/comments-panel.jsx +5 -176
  430. package/apps/studio/client/shell/constants.js +1 -0
  431. package/apps/studio/client/shell/dock.jsx +217 -31
  432. package/apps/studio/client/shell/drop-guard.js +52 -0
  433. package/apps/studio/client/shell/icons.jsx +165 -23
  434. package/apps/studio/client/shell/util.js +20 -33
  435. package/apps/studio/client/shell/viewport.jsx +249 -95
  436. package/apps/studio/client/shell-bus.js +82 -0
  437. package/apps/studio/client/shell-events.js +251 -0
  438. package/apps/studio/client/stamp-follow.js +62 -0
  439. package/apps/studio/client/stores/shell-store.jsx +15 -0
  440. package/apps/studio/client/styles/0-reset.css +79 -16
  441. package/apps/studio/client/styles/1-tokens-maude-v2.css +367 -0
  442. package/apps/studio/client/styles/1-tokens-shell.css +374 -0
  443. package/apps/studio/client/styles/2-layout.css +404 -24
  444. package/apps/studio/client/styles/3-kit-maude-v2.css +683 -0
  445. package/apps/studio/client/styles/_index.css +185 -18
  446. package/apps/studio/client/styles/fonts.css +63 -0
  447. package/apps/studio/client/system/system-view.jsx +52 -6
  448. package/apps/studio/client/tour/collab-tour.js +43 -38
  449. package/apps/studio/client/tour/overlay.jsx +61 -19
  450. package/apps/studio/client/tour/quick-setup-tour.js +27 -20
  451. package/apps/studio/client/tour/tour-model.js +36 -0
  452. package/apps/studio/client/tour/usage-tour.js +43 -24
  453. package/apps/studio/client/tree/tree.jsx +661 -409
  454. package/apps/studio/client/tree-expansion.js +5 -2
  455. package/apps/studio/client/tree-row-menu.jsx +43 -29
  456. package/apps/studio/client/ui-open.js +104 -0
  457. package/apps/studio/client/use-tree-drag.js +2 -0
  458. package/apps/studio/client/v2/access/access-card.jsx +54 -0
  459. package/apps/studio/client/v2/access/access-client.js +525 -0
  460. package/apps/studio/client/v2/access/access-host.jsx +328 -0
  461. package/apps/studio/client/v2/access/access.css +163 -0
  462. package/apps/studio/client/v2/access/ask-to-edit.jsx +97 -0
  463. package/apps/studio/client/v2/access/disabled-reason.js +50 -0
  464. package/apps/studio/client/v2/access/link-off-card.jsx +37 -0
  465. package/apps/studio/client/v2/access/trashed-banner.jsx +123 -0
  466. package/apps/studio/client/v2/advanced/where-matrix.js +231 -0
  467. package/apps/studio/client/v2/ai/AChip.jsx +158 -0
  468. package/apps/studio/client/v2/ai/Advanced.jsx +640 -0
  469. package/apps/studio/client/v2/ai/AiChatIsland.jsx +108 -0
  470. package/apps/studio/client/v2/ai/AskSelectionHost.jsx +173 -0
  471. package/apps/studio/client/v2/ai/AttachMenu.jsx +190 -0
  472. package/apps/studio/client/v2/ai/BigChat.jsx +195 -0
  473. package/apps/studio/client/v2/ai/ChatList.jsx +614 -0
  474. package/apps/studio/client/v2/ai/ChatUndo.jsx +164 -0
  475. package/apps/studio/client/v2/ai/ChoiceCard.jsx +178 -0
  476. package/apps/studio/client/v2/ai/Composer.jsx +655 -0
  477. package/apps/studio/client/v2/ai/ConnectSheet.jsx +118 -0
  478. package/apps/studio/client/v2/ai/Consent.jsx +66 -0
  479. package/apps/studio/client/v2/ai/DropOverlay.jsx +113 -0
  480. package/apps/studio/client/v2/ai/Feed.jsx +589 -0
  481. package/apps/studio/client/v2/ai/FoldNeeds.jsx +23 -0
  482. package/apps/studio/client/v2/ai/NeedsYouSlot.jsx +250 -0
  483. package/apps/studio/client/v2/ai/NotReady.jsx +110 -0
  484. package/apps/studio/client/v2/ai/OfferCard.jsx +165 -0
  485. package/apps/studio/client/v2/ai/PermissionCard.jsx +168 -0
  486. package/apps/studio/client/v2/ai/PickedShots.jsx +33 -0
  487. package/apps/studio/client/v2/ai/ProblemCard.jsx +41 -0
  488. package/apps/studio/client/v2/ai/QuitDialog.jsx +127 -0
  489. package/apps/studio/client/v2/ai/RawLog.jsx +68 -0
  490. package/apps/studio/client/v2/ai/Result.jsx +144 -0
  491. package/apps/studio/client/v2/ai/RunList.jsx +352 -0
  492. package/apps/studio/client/v2/ai/RunSurface.jsx +248 -0
  493. package/apps/studio/client/v2/ai/ScopeChip.jsx +239 -0
  494. package/apps/studio/client/v2/ai/SentStrip.jsx +70 -0
  495. package/apps/studio/client/v2/ai/StoppedDivider.jsx +84 -0
  496. package/apps/studio/client/v2/ai/Suggest.jsx +153 -0
  497. package/apps/studio/client/v2/ai/TurnResult.jsx +95 -0
  498. package/apps/studio/client/v2/ai/WaitingCard.jsx +133 -0
  499. package/apps/studio/client/v2/ai/WillChange.jsx +40 -0
  500. package/apps/studio/client/v2/ai/Working.jsx +74 -0
  501. package/apps/studio/client/v2/ai/advanced-handlers.js +56 -0
  502. package/apps/studio/client/v2/ai/advanced-model.js +214 -0
  503. package/apps/studio/client/v2/ai/ai-list-advanced.css +625 -0
  504. package/apps/studio/client/v2/ai/ai-may.js +75 -0
  505. package/apps/studio/client/v2/ai/ai-offer.js +178 -0
  506. package/apps/studio/client/v2/ai/ai-run.css +281 -0
  507. package/apps/studio/client/v2/ai/ai-send.js +164 -0
  508. package/apps/studio/client/v2/ai/ai.css +261 -0
  509. package/apps/studio/client/v2/ai/answer-note.js +44 -0
  510. package/apps/studio/client/v2/ai/ask-frame.js +131 -0
  511. package/apps/studio/client/v2/ai/ask-selection-lane.js +100 -0
  512. package/apps/studio/client/v2/ai/ask-selection.css +142 -0
  513. package/apps/studio/client/v2/ai/ask-selection.js +84 -0
  514. package/apps/studio/client/v2/ai/attach.css +366 -0
  515. package/apps/studio/client/v2/ai/attach.js +186 -0
  516. package/apps/studio/client/v2/ai/chat-list-model.js +333 -0
  517. package/apps/studio/client/v2/ai/chat-store-api.js +93 -0
  518. package/apps/studio/client/{styles/6-acp-chat.css → v2/ai/chat.css} +1152 -797
  519. package/apps/studio/client/v2/ai/connect-flow.js +75 -0
  520. package/apps/studio/client/v2/ai/gate-lines.js +121 -0
  521. package/apps/studio/client/v2/ai/icons.jsx +66 -0
  522. package/apps/studio/client/v2/ai/jump-model.js +61 -0
  523. package/apps/studio/client/v2/ai/made-by-ai.js +179 -0
  524. package/apps/studio/client/v2/ai/needs-you-store.js +112 -0
  525. package/apps/studio/client/v2/ai/needs-you-toast.js +104 -0
  526. package/apps/studio/client/v2/ai/needs-you.css +554 -0
  527. package/apps/studio/client/v2/ai/needs-you.js +401 -0
  528. package/apps/studio/client/v2/ai/panel-focus.js +71 -0
  529. package/apps/studio/client/v2/ai/panel.css +88 -0
  530. package/apps/studio/client/v2/ai/paste-chips.jsx +108 -0
  531. package/apps/studio/client/v2/ai/picked-shots.js +48 -0
  532. package/apps/studio/client/v2/ai/quit.css +64 -0
  533. package/apps/studio/client/v2/ai/result-shown.js +50 -0
  534. package/apps/studio/client/v2/ai/ring-relay.js +143 -0
  535. package/apps/studio/client/v2/ai/row-slots-lane.js +67 -0
  536. package/apps/studio/client/v2/ai/run-api.js +137 -0
  537. package/apps/studio/client/v2/ai/run-cards.js +31 -0
  538. package/apps/studio/client/v2/ai/run-compare.js +60 -0
  539. package/apps/studio/client/v2/ai/run-icons.jsx +53 -0
  540. package/apps/studio/client/v2/ai/run-model.js +348 -0
  541. package/apps/studio/client/v2/ai/runs-model.js +568 -0
  542. package/apps/studio/client/v2/ai/runs-store.js +161 -0
  543. package/apps/studio/client/v2/ai/runs.css +226 -0
  544. package/apps/studio/client/v2/ai/scope.js +298 -0
  545. package/apps/studio/client/v2/ai/seen-relay.js +95 -0
  546. package/apps/studio/client/v2/ai/sent-attachments.js +77 -0
  547. package/apps/studio/client/v2/ai/stopped.js +69 -0
  548. package/apps/studio/client/v2/ai/suggest-why.js +200 -0
  549. package/apps/studio/client/v2/ai/use-ai-scope.js +198 -0
  550. package/apps/studio/client/v2/ai/use-ask-ai.js +63 -0
  551. package/apps/studio/client/v2/ai/use-ask-selection.js +41 -0
  552. package/apps/studio/client/v2/ai/use-attachments.js +239 -0
  553. package/apps/studio/client/v2/ai/use-chat-runs.js +32 -0
  554. package/apps/studio/client/v2/ai/use-run-versions.js +39 -0
  555. package/apps/studio/client/v2/ai/video/ClipsAttached.jsx +23 -0
  556. package/apps/studio/client/v2/ai/video/LeftOut.jsx +29 -0
  557. package/apps/studio/client/v2/ai/video/WatchProgress.jsx +65 -0
  558. package/apps/studio/client/v2/ai/video/card-model.js +107 -0
  559. package/apps/studio/client/v2/ai/video/cards.jsx +51 -0
  560. package/apps/studio/client/v2/ai/video/clip-pic.js +12 -0
  561. package/apps/studio/client/v2/ai/video/video-cards.css +168 -0
  562. package/apps/studio/client/v2/annotations/annotation-asks.js +171 -0
  563. package/apps/studio/client/v2/annotations/annotation-list-model.js +238 -0
  564. package/apps/studio/client/v2/annotations/annotation-list.css +277 -0
  565. package/apps/studio/client/v2/annotations/annotation-list.jsx +433 -0
  566. package/apps/studio/client/v2/annotations/recent-stickers.js +64 -0
  567. package/apps/studio/client/v2/annotations/stamp-row.jsx +66 -0
  568. package/apps/studio/client/v2/annotations/stamps-glyphs.jsx +35 -0
  569. package/apps/studio/client/v2/annotations/sticker-preload.js +44 -0
  570. package/apps/studio/client/v2/annotations/sticker-search.js +155 -0
  571. package/apps/studio/client/v2/annotations/stickers-gallery.css +295 -0
  572. package/apps/studio/client/v2/annotations/stickers-gallery.jsx +454 -0
  573. package/apps/studio/client/v2/annotations/templates-panel.css +344 -0
  574. package/apps/studio/client/v2/annotations/templates-panel.jsx +240 -0
  575. package/apps/studio/client/v2/annotations/v2-scope.js +20 -0
  576. package/apps/studio/client/v2/annotations/vote-bar.jsx +212 -0
  577. package/apps/studio/client/v2/annotations/vote-sheet.jsx +200 -0
  578. package/apps/studio/client/v2/annotations/vote-store.js +392 -0
  579. package/apps/studio/client/v2/annotations/vote.css +153 -0
  580. package/apps/studio/client/v2/assets/ask-once.js +65 -0
  581. package/apps/studio/client/v2/assets/asset-drop-session.js +238 -0
  582. package/apps/studio/client/v2/assets/asset-state-lane.js +267 -0
  583. package/apps/studio/client/v2/assets/assets-bus.js +109 -0
  584. package/apps/studio/client/v2/assets/browse-model.js +90 -0
  585. package/apps/studio/client/v2/assets/browse-view.jsx +202 -0
  586. package/apps/studio/client/v2/assets/canvas-drop-catcher.jsx +114 -0
  587. package/apps/studio/client/v2/assets/connect-key-sheet.jsx +69 -0
  588. package/apps/studio/client/v2/assets/copy-asset.js +37 -0
  589. package/apps/studio/client/v2/assets/describe-client.js +156 -0
  590. package/apps/studio/client/v2/assets/describe-consent.jsx +184 -0
  591. package/apps/studio/client/v2/assets/describe.css +72 -0
  592. package/apps/studio/client/v2/assets/details-advanced.jsx +76 -0
  593. package/apps/studio/client/v2/assets/details-model.js +233 -0
  594. package/apps/studio/client/v2/assets/details.jsx +292 -0
  595. package/apps/studio/client/v2/assets/generate-ask.jsx +506 -0
  596. package/apps/studio/client/v2/assets/generated.js +83 -0
  597. package/apps/studio/client/v2/assets/import-lines.js +228 -0
  598. package/apps/studio/client/v2/assets/import-offline.js +32 -0
  599. package/apps/studio/client/v2/assets/import-toast.js +56 -0
  600. package/apps/studio/client/v2/assets/just-added.js +32 -0
  601. package/apps/studio/client/v2/assets/kinds-chip.jsx +77 -0
  602. package/apps/studio/client/v2/assets/library-foot.js +42 -0
  603. package/apps/studio/client/v2/assets/missing-frame.css +60 -0
  604. package/apps/studio/client/v2/assets/missing-frame.jsx +218 -0
  605. package/apps/studio/client/v2/assets/multi-select.js +58 -0
  606. package/apps/studio/client/v2/assets/place-asset.js +128 -0
  607. package/apps/studio/client/v2/assets/relink.js +96 -0
  608. package/apps/studio/client/v2/assets/rename-asset.js +83 -0
  609. package/apps/studio/client/v2/assets/search-marks.jsx +75 -0
  610. package/apps/studio/client/v2/assets/takes-overlay.jsx +86 -0
  611. package/apps/studio/client/v2/assets/takes.css +177 -0
  612. package/apps/studio/client/v2/assets/takes.js +224 -0
  613. package/apps/studio/client/v2/assets/tidy.jsx +144 -0
  614. package/apps/studio/client/v2/assets/tile-drag.js +53 -0
  615. package/apps/studio/client/v2/assets/tile-menu.jsx +119 -0
  616. package/apps/studio/client/v2/assets/tile.jsx +131 -0
  617. package/apps/studio/client/v2/assets/trash-assets.js +98 -0
  618. package/apps/studio/client/v2/assets/use-asset-details.js +58 -0
  619. package/apps/studio/client/v2/assets/use-assets.js +121 -0
  620. package/apps/studio/client/v2/assets/use-takes-lane.js +150 -0
  621. package/apps/studio/client/v2/canvases/canvas-icons.jsx +107 -0
  622. package/apps/studio/client/v2/canvases/canvases-panel.jsx +1466 -0
  623. package/apps/studio/client/v2/canvases/canvases.css +699 -0
  624. package/apps/studio/client/v2/canvases/covers.js +32 -0
  625. package/apps/studio/client/v2/canvases/inline-rename.jsx +122 -0
  626. package/apps/studio/client/v2/canvases/jump-list.jsx +100 -0
  627. package/apps/studio/client/v2/canvases/jump-model.js +102 -0
  628. package/apps/studio/client/v2/canvases/kept-on-this-mac.jsx +192 -0
  629. package/apps/studio/client/v2/canvases/last-canvas.js +36 -0
  630. package/apps/studio/client/v2/canvases/move-model.js +45 -0
  631. package/apps/studio/client/v2/canvases/move-sheet.jsx +91 -0
  632. package/apps/studio/client/v2/canvases/open-link.js +154 -0
  633. package/apps/studio/client/v2/canvases/panel-search.js +156 -0
  634. package/apps/studio/client/v2/canvases/rename-model.js +134 -0
  635. package/apps/studio/client/v2/canvases/row-menu.jsx +145 -0
  636. package/apps/studio/client/v2/canvases/row-slots.js +224 -0
  637. package/apps/studio/client/v2/canvases/sort.js +132 -0
  638. package/apps/studio/client/v2/canvases/support-model.js +68 -0
  639. package/apps/studio/client/v2/canvases/trash-canvas.js +120 -0
  640. package/apps/studio/client/v2/canvases/tree-model.js +760 -0
  641. package/apps/studio/client/v2/canvases/use-canvas-index.js +50 -0
  642. package/apps/studio/client/v2/canvases/use-canvases-sort.js +59 -0
  643. package/apps/studio/client/v2/canvases/use-move.js +61 -0
  644. package/apps/studio/client/v2/canvases/use-pins.js +80 -0
  645. package/apps/studio/client/v2/cloud/browser-door.js +152 -0
  646. package/apps/studio/client/v2/cloud/cloud-name.js +38 -0
  647. package/apps/studio/client/v2/code/canvas-error-card.jsx +407 -0
  648. package/apps/studio/client/v2/code/canvas-imports-card.jsx +31 -0
  649. package/apps/studio/client/v2/code/code-bus.js +63 -0
  650. package/apps/studio/client/v2/code/code-view.jsx +277 -0
  651. package/apps/studio/client/v2/code/code.css +373 -0
  652. package/apps/studio/client/v2/code/highlight.js +163 -0
  653. package/apps/studio/client/v2/code/use-canvas-source.js +338 -0
  654. package/apps/studio/client/v2/comments/comment-bridge.js +154 -0
  655. package/apps/studio/client/v2/comments/comment-client.js +84 -0
  656. package/apps/studio/client/v2/comments/comment-tool.js +18 -0
  657. package/apps/studio/client/v2/comments/comments-model.js +213 -0
  658. package/apps/studio/client/v2/comments/comments-panel.jsx +400 -0
  659. package/apps/studio/client/v2/comments/comments.css +305 -0
  660. package/apps/studio/client/v2/comments/mention-callouts.jsx +90 -0
  661. package/apps/studio/client/v2/comments/mention-model.js +118 -0
  662. package/apps/studio/client/v2/comments/native-mention-notice.js +73 -0
  663. package/apps/studio/client/v2/comments/reply-focus.js +30 -0
  664. package/apps/studio/client/v2/comments/use-comments-shell.jsx +176 -0
  665. package/apps/studio/client/v2/create/NameDialog.jsx +95 -0
  666. package/apps/studio/client/v2/create/NameDialogHost.jsx +141 -0
  667. package/apps/studio/client/v2/create/create-project.css +260 -0
  668. package/apps/studio/client/v2/create/duplicate-done.js +45 -0
  669. package/apps/studio/client/v2/create/empty-project.css +113 -0
  670. package/apps/studio/client/v2/create/empty-project.jsx +162 -0
  671. package/apps/studio/client/v2/create/first-draft.js +30 -0
  672. package/apps/studio/client/v2/create/intent-host.jsx +40 -0
  673. package/apps/studio/client/v2/create/name-dialog-bus.js +41 -0
  674. package/apps/studio/client/v2/create/name-dialog.css +36 -0
  675. package/apps/studio/client/v2/create/new-canvas.js +64 -0
  676. package/apps/studio/client/v2/create/open-sizes.js +41 -0
  677. package/apps/studio/client/v2/create/render-error.css +29 -0
  678. package/apps/studio/client/v2/create/render-error.jsx +107 -0
  679. package/apps/studio/client/v2/create/repair-offer.js +36 -0
  680. package/apps/studio/client/v2/create/take-intent.js +154 -0
  681. package/apps/studio/client/v2/create/use-project-empty.js +85 -0
  682. package/apps/studio/client/v2/create/use-render-error.js +116 -0
  683. package/apps/studio/client/v2/diagnostics/diagnostics-bus.js +47 -0
  684. package/apps/studio/client/v2/diagnostics/diagnostics-handlers.js +108 -0
  685. package/apps/studio/client/v2/diagnostics/diagnostics-host.jsx +196 -0
  686. package/apps/studio/client/v2/diagnostics/diagnostics-model.js +253 -0
  687. package/apps/studio/client/v2/diagnostics/diagnostics-sheet.jsx +557 -0
  688. package/apps/studio/client/v2/diagnostics/diagnostics.css +612 -0
  689. package/apps/studio/client/v2/diagnostics/resync-model.js +51 -0
  690. package/apps/studio/client/v2/diagnostics/resync-run.js +79 -0
  691. package/apps/studio/client/v2/diagnostics/sync-actions.js +38 -0
  692. package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +241 -0
  693. package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +392 -0
  694. package/apps/studio/client/v2/diagnostics/use-diagnostics-menu.js +58 -0
  695. package/apps/studio/client/v2/ds/advanced-bus.js +40 -0
  696. package/apps/studio/client/v2/ds/advanced-host.jsx +228 -0
  697. package/apps/studio/client/v2/ds/advanced-model.js +110 -0
  698. package/apps/studio/client/v2/ds/advanced-store.js +47 -0
  699. package/apps/studio/client/v2/ds/advanced.css +277 -0
  700. package/apps/studio/client/v2/ds/advanced.jsx +203 -0
  701. package/apps/studio/client/v2/ds/check-card.jsx +80 -0
  702. package/apps/studio/client/v2/ds/colour-picker.jsx +121 -0
  703. package/apps/studio/client/v2/ds/colour-words.js +48 -0
  704. package/apps/studio/client/v2/ds/conflict-pick.jsx +151 -0
  705. package/apps/studio/client/v2/ds/contrast-warning.jsx +80 -0
  706. package/apps/studio/client/v2/ds/contrast.js +137 -0
  707. package/apps/studio/client/v2/ds/convert-dialog.jsx +133 -0
  708. package/apps/studio/client/v2/ds/convert-host.jsx +143 -0
  709. package/apps/studio/client/v2/ds/convert-model.js +221 -0
  710. package/apps/studio/client/v2/ds/default-write.js +69 -0
  711. package/apps/studio/client/v2/ds/direction-bar.jsx +287 -0
  712. package/apps/studio/client/v2/ds/door-write.js +163 -0
  713. package/apps/studio/client/v2/ds/edge-model.js +151 -0
  714. package/apps/studio/client/v2/ds/edge-write.js +91 -0
  715. package/apps/studio/client/v2/ds/edges.css +152 -0
  716. package/apps/studio/client/v2/ds/follower-swap.js +88 -0
  717. package/apps/studio/client/v2/ds/go-to.js +71 -0
  718. package/apps/studio/client/v2/ds/kinds/master.jsx +214 -0
  719. package/apps/studio/client/v2/ds/kinds/token.jsx +546 -0
  720. package/apps/studio/client/v2/ds/library-bus.js +43 -0
  721. package/apps/studio/client/v2/ds/library-card.jsx +379 -0
  722. package/apps/studio/client/v2/ds/library-host.jsx +436 -0
  723. package/apps/studio/client/v2/ds/library-model.js +305 -0
  724. package/apps/studio/client/v2/ds/library-store.js +45 -0
  725. package/apps/studio/client/v2/ds/library.css +148 -0
  726. package/apps/studio/client/v2/ds/make-host.jsx +244 -0
  727. package/apps/studio/client/v2/ds/make-model.js +208 -0
  728. package/apps/studio/client/v2/ds/make-sheet.jsx +264 -0
  729. package/apps/studio/client/v2/ds/make-write.js +90 -0
  730. package/apps/studio/client/v2/ds/make.css +242 -0
  731. package/apps/studio/client/v2/ds/master-write.js +145 -0
  732. package/apps/studio/client/v2/ds/new-canvas-default.js +89 -0
  733. package/apps/studio/client/v2/ds/off-system-host.jsx +107 -0
  734. package/apps/studio/client/v2/ds/off-system.jsx +101 -0
  735. package/apps/studio/client/v2/ds/outside-banner.jsx +153 -0
  736. package/apps/studio/client/v2/ds/pinned-rows.js +138 -0
  737. package/apps/studio/client/v2/ds/pins.js +102 -0
  738. package/apps/studio/client/v2/ds/preview-bar.jsx +220 -0
  739. package/apps/studio/client/v2/ds/preview-doors.js +47 -0
  740. package/apps/studio/client/v2/ds/preview-mode.js +163 -0
  741. package/apps/studio/client/v2/ds/reach-data.js +68 -0
  742. package/apps/studio/client/v2/ds/reach-model.js +184 -0
  743. package/apps/studio/client/v2/ds/reach-view.jsx +577 -0
  744. package/apps/studio/client/v2/ds/reach.css +298 -0
  745. package/apps/studio/client/v2/ds/rename-write.js +88 -0
  746. package/apps/studio/client/v2/ds/review-bus.js +41 -0
  747. package/apps/studio/client/v2/ds/review-host.jsx +438 -0
  748. package/apps/studio/client/v2/ds/review-model.js +307 -0
  749. package/apps/studio/client/v2/ds/review-sheet.jsx +390 -0
  750. package/apps/studio/client/v2/ds/review.css +894 -0
  751. package/apps/studio/client/v2/ds/row-dots.js +41 -0
  752. package/apps/studio/client/v2/ds/switch-bus.js +56 -0
  753. package/apps/studio/client/v2/ds/switch-host.jsx +241 -0
  754. package/apps/studio/client/v2/ds/switch-model.js +254 -0
  755. package/apps/studio/client/v2/ds/switch-sheet.jsx +364 -0
  756. package/apps/studio/client/v2/ds/switch.css +263 -0
  757. package/apps/studio/client/v2/ds/system-menu.jsx +81 -0
  758. package/apps/studio/client/v2/ds/system-rename.jsx +102 -0
  759. package/apps/studio/client/v2/ds/token-write.js +241 -0
  760. package/apps/studio/client/v2/ds/token.css +185 -0
  761. package/apps/studio/client/v2/ds/trash-token-sheet.jsx +112 -0
  762. package/apps/studio/client/v2/ds/truth-card.jsx +85 -0
  763. package/apps/studio/client/v2/ds/truth-host.jsx +239 -0
  764. package/apps/studio/client/v2/ds/truth-model.js +315 -0
  765. package/apps/studio/client/v2/ds/truth-store.js +45 -0
  766. package/apps/studio/client/v2/ds/truth.css +143 -0
  767. package/apps/studio/client/v2/ds/update-available.jsx +261 -0
  768. package/apps/studio/client/v2/ds/update-dots.js +103 -0
  769. package/apps/studio/client/v2/ds/update-model.js +295 -0
  770. package/apps/studio/client/v2/ds/upgrade-bus.js +40 -0
  771. package/apps/studio/client/v2/ds/upgrade-host.jsx +185 -0
  772. package/apps/studio/client/v2/ds/upgrade-model.js +266 -0
  773. package/apps/studio/client/v2/ds/upgrade-offers.js +34 -0
  774. package/apps/studio/client/v2/ds/upgrade-sheet.jsx +277 -0
  775. package/apps/studio/client/v2/ds/upgrade.css +166 -0
  776. package/apps/studio/client/v2/ds/use-covers.js +27 -0
  777. package/apps/studio/client/v2/ds/use-ds-frames.js +165 -0
  778. package/apps/studio/client/v2/ds/use-ds-model.js +61 -0
  779. package/apps/studio/client/v2/ds/use-ds-search.js +61 -0
  780. package/apps/studio/client/v2/ds/use-ds-state.js +65 -0
  781. package/apps/studio/client/v2/ds/uses-link.jsx +58 -0
  782. package/apps/studio/client/v2/empty/all-trashed-model.js +321 -0
  783. package/apps/studio/client/v2/empty/all-trashed-relay.js +65 -0
  784. package/apps/studio/client/v2/empty/all-trashed.jsx +229 -0
  785. package/apps/studio/client/v2/empty/arriving.jsx +180 -0
  786. package/apps/studio/client/v2/empty/artboard-hint.jsx +47 -0
  787. package/apps/studio/client/v2/empty/ask-button.jsx +35 -0
  788. package/apps/studio/client/v2/empty/confetti.jsx +46 -0
  789. package/apps/studio/client/v2/empty/empty-canvas.jsx +96 -0
  790. package/apps/studio/client/v2/empty/empty-copy.js +265 -0
  791. package/apps/studio/client/v2/empty/empty-hint-store.js +31 -0
  792. package/apps/studio/client/v2/empty/empty-host.jsx +168 -0
  793. package/apps/studio/client/v2/empty/empty.css +440 -0
  794. package/apps/studio/client/v2/empty/empty.jsx +162 -0
  795. package/apps/studio/client/v2/empty/fill-ask.js +22 -0
  796. package/apps/studio/client/v2/empty/free-centre.js +11 -0
  797. package/apps/studio/client/v2/empty/index.js +40 -0
  798. package/apps/studio/client/v2/empty/layers-empty.jsx +22 -0
  799. package/apps/studio/client/v2/empty/not-local.jsx +111 -0
  800. package/apps/studio/client/v2/empty/select-new-artboard.js +32 -0
  801. package/apps/studio/client/v2/empty/skeleton.jsx +51 -0
  802. package/apps/studio/client/v2/empty/spot-art.jsx +923 -0
  803. package/apps/studio/client/v2/empty/spot.jsx +96 -0
  804. package/apps/studio/client/v2/empty/suggestions.jsx +18 -0
  805. package/apps/studio/client/v2/empty/use-empty-canvas.js +251 -0
  806. package/apps/studio/client/v2/export/access-line.jsx +48 -0
  807. package/apps/studio/client/v2/export/advanced/advanced-copy.js +77 -0
  808. package/apps/studio/client/v2/export/advanced/advanced.css +252 -0
  809. package/apps/studio/client/v2/export/advanced/advanced.jsx +148 -0
  810. package/apps/studio/client/v2/export/advanced/command.js +128 -0
  811. package/apps/studio/client/v2/export/advanced/command.jsx +50 -0
  812. package/apps/studio/client/v2/export/advanced/fields.jsx +132 -0
  813. package/apps/studio/client/v2/export/advanced/image.jsx +124 -0
  814. package/apps/studio/client/v2/export/advanced/model.js +199 -0
  815. package/apps/studio/client/v2/export/advanced/names.jsx +65 -0
  816. package/apps/studio/client/v2/export/advanced/print.jsx +99 -0
  817. package/apps/studio/client/v2/export/advanced/render.jsx +63 -0
  818. package/apps/studio/client/v2/export/advanced/video.jsx +76 -0
  819. package/apps/studio/client/v2/export/annotations-policy.js +28 -0
  820. package/apps/studio/client/v2/export/cloud-queue.js +69 -0
  821. package/apps/studio/client/v2/export/copy-command.js +72 -0
  822. package/apps/studio/client/v2/export/copy-png.js +144 -0
  823. package/apps/studio/client/v2/export/done-toast.jsx +89 -0
  824. package/apps/studio/client/v2/export/edges.css +74 -0
  825. package/apps/studio/client/v2/export/export-copy.js +352 -0
  826. package/apps/studio/client/v2/export/export-sheet.jsx +804 -0
  827. package/apps/studio/client/v2/export/export-sizes.js +217 -0
  828. package/apps/studio/client/v2/export/export.css +832 -0
  829. package/apps/studio/client/v2/export/exports-model.js +383 -0
  830. package/apps/studio/client/v2/export/exports-panel.css +192 -0
  831. package/apps/studio/client/v2/export/exports-panel.jsx +164 -0
  832. package/apps/studio/client/v2/export/file-rows.jsx +84 -0
  833. package/apps/studio/client/v2/export/inspector-export.jsx +335 -0
  834. package/apps/studio/client/v2/export/job-row.jsx +358 -0
  835. package/apps/studio/client/v2/export/last-finished.js +34 -0
  836. package/apps/studio/client/v2/export/native-save.js +160 -0
  837. package/apps/studio/client/v2/export/other-formats.jsx +199 -0
  838. package/apps/studio/client/v2/export/parts.jsx +117 -0
  839. package/apps/studio/client/v2/export/preflight/fonts.js +27 -0
  840. package/apps/studio/client/v2/export/preflight/paper.jsx +177 -0
  841. package/apps/studio/client/v2/export/preflight/safe-margin.js +24 -0
  842. package/apps/studio/client/v2/export/preflight/use-preflight.js +74 -0
  843. package/apps/studio/client/v2/export/preview.jsx +79 -0
  844. package/apps/studio/client/v2/export/print.css +219 -0
  845. package/apps/studio/client/v2/export/run-export.js +177 -0
  846. package/apps/studio/client/v2/export/scope-bar.jsx +70 -0
  847. package/apps/studio/client/v2/export/sections/batch-model.js +224 -0
  848. package/apps/studio/client/v2/export/sections/batch.jsx +235 -0
  849. package/apps/studio/client/v2/export/sections/image.jsx +93 -0
  850. package/apps/studio/client/v2/export/sections/print-copy.js +41 -0
  851. package/apps/studio/client/v2/export/sections/print.jsx +285 -0
  852. package/apps/studio/client/v2/export/sections/render-row.jsx +81 -0
  853. package/apps/studio/client/v2/export/sections/version.jsx +176 -0
  854. package/apps/studio/client/v2/export/sections/video-copy.js +92 -0
  855. package/apps/studio/client/v2/export/sections/video-model.js +127 -0
  856. package/apps/studio/client/v2/export/sections/video.jsx +397 -0
  857. package/apps/studio/client/v2/export/sections/web.jsx +151 -0
  858. package/apps/studio/client/v2/export/share-hint.jsx +51 -0
  859. package/apps/studio/client/v2/export/use-export-spec.js +546 -0
  860. package/apps/studio/client/v2/export/video-content.js +75 -0
  861. package/apps/studio/client/v2/export/video.css +221 -0
  862. package/apps/studio/client/v2/fold/advanced-fold.jsx +96 -0
  863. package/apps/studio/client/v2/fold/fold-store.js +151 -0
  864. package/apps/studio/client/v2/fold/fold.css +59 -0
  865. package/apps/studio/client/v2/fold/use-fold.js +36 -0
  866. package/apps/studio/client/v2/handoff/edges.jsx +74 -0
  867. package/apps/studio/client/v2/handoff/handoff-sheet.jsx +469 -0
  868. package/apps/studio/client/v2/handoff/handoff.css +181 -0
  869. package/apps/studio/client/v2/handoff/ready-card.jsx +84 -0
  870. package/apps/studio/client/v2/handoff/targets.js +111 -0
  871. package/apps/studio/client/v2/help/add-guides.js +43 -0
  872. package/apps/studio/client/v2/help/help.css +995 -0
  873. package/apps/studio/client/v2/history/blame.js +161 -0
  874. package/apps/studio/client/v2/history/branch-actions.js +214 -0
  875. package/apps/studio/client/v2/history/change-list.jsx +102 -0
  876. package/apps/studio/client/v2/history/clear-band.js +144 -0
  877. package/apps/studio/client/v2/history/compare-store.js +80 -0
  878. package/apps/studio/client/v2/history/compare-view.jsx +318 -0
  879. package/apps/studio/client/v2/history/compare-words.js +8 -0
  880. package/apps/studio/client/v2/history/git-advanced.jsx +580 -0
  881. package/apps/studio/client/v2/history/git-io.js +58 -0
  882. package/apps/studio/client/v2/history/git-model.js +526 -0
  883. package/apps/studio/client/v2/history/git-parts.jsx +662 -0
  884. package/apps/studio/client/v2/history/history-host.jsx +78 -0
  885. package/apps/studio/client/v2/history/history-panel.jsx +599 -0
  886. package/apps/studio/client/v2/history/history.css +1477 -0
  887. package/apps/studio/client/v2/history/name-dialog.jsx +109 -0
  888. package/apps/studio/client/v2/history/object-filter.js +143 -0
  889. package/apps/studio/client/v2/history/object-history-ask.js +62 -0
  890. package/apps/studio/client/v2/history/object-view.jsx +236 -0
  891. package/apps/studio/client/v2/history/rows.ts +445 -0
  892. package/apps/studio/client/v2/history/use-versions.js +391 -0
  893. package/apps/studio/client/v2/history/view-bar.jsx +80 -0
  894. package/apps/studio/client/v2/import/brand-model.js +145 -0
  895. package/apps/studio/client/v2/import/brand-result.jsx +197 -0
  896. package/apps/studio/client/v2/import/brand-sheet.jsx +434 -0
  897. package/apps/studio/client/v2/import/brand.css +378 -0
  898. package/apps/studio/client/v2/import/figma-artboard.jsx +121 -0
  899. package/apps/studio/client/v2/import/figma-model.js +237 -0
  900. package/apps/studio/client/v2/import/figma-prefill.js +23 -0
  901. package/apps/studio/client/v2/import/figma-sheet.jsx +525 -0
  902. package/apps/studio/client/v2/import/figma-summary.jsx +62 -0
  903. package/apps/studio/client/v2/import/figma.css +179 -0
  904. package/apps/studio/client/v2/import/frame-picker.jsx +57 -0
  905. package/apps/studio/client/v2/inspect/inspect-host.jsx +53 -0
  906. package/apps/studio/client/v2/inspect/inspect-model.js +132 -0
  907. package/apps/studio/client/v2/inspect/inspect-panel.jsx +214 -0
  908. package/apps/studio/client/v2/inspect/inspect.css +87 -0
  909. package/apps/studio/client/v2/inspector/advanced-rows-default.jsx +773 -0
  910. package/apps/studio/client/v2/inspector/advanced-rows.js +106 -0
  911. package/apps/studio/client/v2/inspector/advanced.jsx +286 -0
  912. package/apps/studio/client/v2/inspector/blocks.js +57 -0
  913. package/apps/studio/client/v2/inspector/colour-groups.js +129 -0
  914. package/apps/studio/client/v2/inspector/component-picker.css +133 -0
  915. package/apps/studio/client/v2/inspector/component-picker.jsx +367 -0
  916. package/apps/studio/client/v2/inspector/crumbs.jsx +89 -0
  917. package/apps/studio/client/v2/inspector/css-text.js +179 -0
  918. package/apps/studio/client/v2/inspector/css-write.js +204 -0
  919. package/apps/studio/client/v2/inspector/element-code.js +39 -0
  920. package/apps/studio/client/v2/inspector/element-id.js +70 -0
  921. package/apps/studio/client/v2/inspector/formats-ui.js +101 -0
  922. package/apps/studio/client/v2/inspector/formats-write.js +60 -0
  923. package/apps/studio/client/v2/inspector/frame.jsx +336 -0
  924. package/apps/studio/client/v2/inspector/inspector-actions.js +60 -0
  925. package/apps/studio/client/v2/inspector/inspector.css +2872 -0
  926. package/apps/studio/client/v2/inspector/jsx-slice.js +219 -0
  927. package/apps/studio/client/v2/inspector/kinds/add-width.js +55 -0
  928. package/apps/studio/client/v2/inspector/kinds/artboard-advanced-rows.jsx +89 -0
  929. package/apps/studio/client/v2/inspector/kinds/artboard-advanced.jsx +62 -0
  930. package/apps/studio/client/v2/inspector/kinds/artboard-fixed.jsx +111 -0
  931. package/apps/studio/client/v2/inspector/kinds/artboard-kinds-model.js +171 -0
  932. package/apps/studio/client/v2/inspector/kinds/artboard-model.js +155 -0
  933. package/apps/studio/client/v2/inspector/kinds/artboard-multi.jsx +142 -0
  934. package/apps/studio/client/v2/inspector/kinds/artboard-print-advanced.jsx +210 -0
  935. package/apps/studio/client/v2/inspector/kinds/artboard-print-model.js +112 -0
  936. package/apps/studio/client/v2/inspector/kinds/artboard-print.jsx +268 -0
  937. package/apps/studio/client/v2/inspector/kinds/artboard-rows.jsx +124 -0
  938. package/apps/studio/client/v2/inspector/kinds/artboard-video.jsx +144 -0
  939. package/apps/studio/client/v2/inspector/kinds/artboard-web.jsx +170 -0
  940. package/apps/studio/client/v2/inspector/kinds/artboard.jsx +168 -0
  941. package/apps/studio/client/v2/inspector/kinds/caption.jsx +203 -0
  942. package/apps/studio/client/v2/inspector/kinds/clip-model.js +190 -0
  943. package/apps/studio/client/v2/inspector/kinds/clip.css +157 -0
  944. package/apps/studio/client/v2/inspector/kinds/clip.jsx +447 -0
  945. package/apps/studio/client/v2/inspector/kinds/frame.jsx +118 -0
  946. package/apps/studio/client/v2/inspector/kinds/image.jsx +267 -0
  947. package/apps/studio/client/v2/inspector/kinds/index.js +180 -0
  948. package/apps/studio/client/v2/inspector/kinds/instance.jsx +377 -0
  949. package/apps/studio/client/v2/inspector/kinds/multi-artboard.jsx +129 -0
  950. package/apps/studio/client/v2/inspector/kinds/multi.jsx +220 -0
  951. package/apps/studio/client/v2/inspector/kinds/music.jsx +294 -0
  952. package/apps/studio/client/v2/inspector/kinds/path.jsx +174 -0
  953. package/apps/studio/client/v2/inspector/kinds/shape.jsx +59 -0
  954. package/apps/studio/client/v2/inspector/kinds/text.jsx +518 -0
  955. package/apps/studio/client/v2/inspector/kinds/title-rows.jsx +135 -0
  956. package/apps/studio/client/v2/inspector/kinds/video-facts.js +142 -0
  957. package/apps/studio/client/v2/inspector/layers-row-tools.jsx +93 -0
  958. package/apps/studio/client/v2/inspector/layers-slot.jsx +93 -0
  959. package/apps/studio/client/v2/inspector/link-write.js +52 -0
  960. package/apps/studio/client/v2/inspector/live-size.js +96 -0
  961. package/apps/studio/client/v2/inspector/model.js +228 -0
  962. package/apps/studio/client/v2/inspector/path-point.js +104 -0
  963. package/apps/studio/client/v2/inspector/print-write.js +85 -0
  964. package/apps/studio/client/v2/inspector/safe-zones-write.js +88 -0
  965. package/apps/studio/client/v2/inspector/sections/add-requests.js +35 -0
  966. package/apps/studio/client/v2/inspector/sections/border.jsx +141 -0
  967. package/apps/studio/client/v2/inspector/sections/color-control.jsx +246 -0
  968. package/apps/studio/client/v2/inspector/sections/colour-custom.jsx +826 -0
  969. package/apps/studio/client/v2/inspector/sections/colour-model.js +404 -0
  970. package/apps/studio/client/v2/inspector/sections/colour-popover.jsx +631 -0
  971. package/apps/studio/client/v2/inspector/sections/colour-words.js +131 -0
  972. package/apps/studio/client/v2/inspector/sections/corners.jsx +177 -0
  973. package/apps/studio/client/v2/inspector/sections/effects.jsx +67 -0
  974. package/apps/studio/client/v2/inspector/sections/export-slot.jsx +60 -0
  975. package/apps/studio/client/v2/inspector/sections/fill.jsx +187 -0
  976. package/apps/studio/client/v2/inspector/sections/formats.jsx +209 -0
  977. package/apps/studio/client/v2/inspector/sections/index.js +74 -0
  978. package/apps/studio/client/v2/inspector/sections/interaction.jsx +204 -0
  979. package/apps/studio/client/v2/inspector/sections/layout.jsx +314 -0
  980. package/apps/studio/client/v2/inspector/sections/opacity-row.jsx +37 -0
  981. package/apps/studio/client/v2/inspector/sections/point.jsx +102 -0
  982. package/apps/studio/client/v2/inspector/sections/position.jsx +259 -0
  983. package/apps/studio/client/v2/inspector/sections/recent-colours.js +106 -0
  984. package/apps/studio/client/v2/inspector/sections/row.jsx +91 -0
  985. package/apps/studio/client/v2/inspector/sections/safe-zones.jsx +174 -0
  986. package/apps/studio/client/v2/inspector/sections/sections.css +1474 -0
  987. package/apps/studio/client/v2/inspector/sections/size.jsx +104 -0
  988. package/apps/studio/client/v2/inspector/sections/type.jsx +168 -0
  989. package/apps/studio/client/v2/inspector/sections/warnings.css +44 -0
  990. package/apps/studio/client/v2/inspector/sections/warnings.jsx +137 -0
  991. package/apps/studio/client/v2/inspector/sections.js +226 -0
  992. package/apps/studio/client/v2/inspector/slots.js +110 -0
  993. package/apps/studio/client/v2/inspector/token-chip.jsx +315 -0
  994. package/apps/studio/client/v2/inspector/view-mode.jsx +193 -0
  995. package/apps/studio/client/v2/inspector/warning-fix.js +111 -0
  996. package/apps/studio/client/v2/kinds/ConvertDialog.jsx +183 -0
  997. package/apps/studio/client/v2/kinds/KindChips.jsx +60 -0
  998. package/apps/studio/client/v2/kinds/KindDimHost.jsx +35 -0
  999. package/apps/studio/client/v2/kinds/LayersKindFilter.jsx +108 -0
  1000. package/apps/studio/client/v2/kinds/SizePicker.jsx +566 -0
  1001. package/apps/studio/client/v2/kinds/SizePickerHost.jsx +104 -0
  1002. package/apps/studio/client/v2/kinds/advanced-rows.js +40 -0
  1003. package/apps/studio/client/v2/kinds/convert-api.js +116 -0
  1004. package/apps/studio/client/v2/kinds/convert.css +87 -0
  1005. package/apps/studio/client/v2/kinds/kind-dim-relay.js +93 -0
  1006. package/apps/studio/client/v2/kinds/kind-filter-model.js +106 -0
  1007. package/apps/studio/client/v2/kinds/kind-filter-store.js +71 -0
  1008. package/apps/studio/client/v2/kinds/kind-filter.css +105 -0
  1009. package/apps/studio/client/v2/kinds/layers-kind-model.js +99 -0
  1010. package/apps/studio/client/v2/kinds/size-picker-model.js +189 -0
  1011. package/apps/studio/client/v2/kinds/size-picker.css +393 -0
  1012. package/apps/studio/client/v2/layers/artboard-layers.jsx +105 -0
  1013. package/apps/studio/client/v2/layers/layers.css +94 -0
  1014. package/apps/studio/client/v2/left-panel/advanced-model.js +98 -0
  1015. package/apps/studio/client/v2/left-panel/assets-panel.jsx +1203 -0
  1016. package/apps/studio/client/v2/left-panel/canvas-file-menu.js +115 -0
  1017. package/apps/studio/client/v2/left-panel/canvases-advanced.jsx +270 -0
  1018. package/apps/studio/client/v2/left-panel/canvases-pinned.jsx +274 -0
  1019. package/apps/studio/client/v2/left-panel/layers-advanced.jsx +179 -0
  1020. package/apps/studio/client/v2/left-panel/left-panel-bus.js +83 -0
  1021. package/apps/studio/client/v2/left-panel/left-panel-model.js +184 -0
  1022. package/apps/studio/client/v2/left-panel/left-panel.css +1846 -0
  1023. package/apps/studio/client/v2/left-panel/selector-scope.js +42 -0
  1024. package/apps/studio/client/v2/left-panel/trash-model.js +282 -0
  1025. package/apps/studio/client/v2/left-panel/trash-view.jsx +257 -0
  1026. package/apps/studio/client/v2/left-panel/use-trash.js +172 -0
  1027. package/apps/studio/client/v2/left-panel/view-prefs.js +84 -0
  1028. package/apps/studio/client/v2/onboarding/AdvSheet.jsx +114 -0
  1029. package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +239 -0
  1030. package/apps/studio/client/v2/onboarding/CliSheet.jsx +101 -0
  1031. package/apps/studio/client/v2/onboarding/ConnectAiSheet.jsx +60 -0
  1032. package/apps/studio/client/v2/onboarding/FigmaSheet.jsx +96 -0
  1033. package/apps/studio/client/v2/onboarding/FolderGithubSheet.jsx +77 -0
  1034. package/apps/studio/client/v2/onboarding/GithubSegment.jsx +241 -0
  1035. package/apps/studio/client/v2/onboarding/HubSheet.jsx +244 -0
  1036. package/apps/studio/client/v2/onboarding/connect-ai-home.js +94 -0
  1037. package/apps/studio/client/v2/onboarding/github-home.js +84 -0
  1038. package/apps/studio/client/v2/onboarding/onboarding-model.js +106 -0
  1039. package/apps/studio/client/v2/onboarding/onboarding.css +546 -0
  1040. package/apps/studio/client/v2/photo/apply-every-use-sheet.jsx +196 -0
  1041. package/apps/studio/client/v2/photo/canvas-rel.js +20 -0
  1042. package/apps/studio/client/v2/photo/looks.js +129 -0
  1043. package/apps/studio/client/v2/photo/photo-section.jsx +625 -0
  1044. package/apps/studio/client/v2/photo/photo.css +218 -0
  1045. package/apps/studio/client/v2/portal-scope.jsx +14 -0
  1046. package/apps/studio/client/v2/presence/faces.jsx +356 -0
  1047. package/apps/studio/client/v2/presence/presence.css +187 -0
  1048. package/apps/studio/client/v2/presence/use-presence-host.js +83 -0
  1049. package/apps/studio/client/v2/present/audience-window.js +63 -0
  1050. package/apps/studio/client/v2/present/canvas-pill.jsx +55 -0
  1051. package/apps/studio/client/v2/present/copy-link.js +82 -0
  1052. package/apps/studio/client/v2/present/follow-location.js +82 -0
  1053. package/apps/studio/client/v2/present/follow-model.js +68 -0
  1054. package/apps/studio/client/v2/present/follow-view.jsx +354 -0
  1055. package/apps/studio/client/v2/present/follow.css +91 -0
  1056. package/apps/studio/client/v2/present/order-map.jsx +64 -0
  1057. package/apps/studio/client/v2/present/order-notes-artboards.js +88 -0
  1058. package/apps/studio/client/v2/present/order-notes-model.js +141 -0
  1059. package/apps/studio/client/v2/present/order-notes-mount.jsx +26 -0
  1060. package/apps/studio/client/v2/present/order-notes-sheet.jsx +293 -0
  1061. package/apps/studio/client/v2/present/order-notes.css +150 -0
  1062. package/apps/studio/client/v2/present/present-chrome-host.jsx +95 -0
  1063. package/apps/studio/client/v2/present/present-controls-model.js +114 -0
  1064. package/apps/studio/client/v2/present/present-controls.jsx +263 -0
  1065. package/apps/studio/client/v2/present/present-zoom-store.js +33 -0
  1066. package/apps/studio/client/v2/present/present.css +258 -0
  1067. package/apps/studio/client/v2/present/presenter-button.jsx +25 -0
  1068. package/apps/studio/client/v2/present/presenter-host.jsx +246 -0
  1069. package/apps/studio/client/v2/present/presenter-model.js +167 -0
  1070. package/apps/studio/client/v2/present/presenter-store.js +140 -0
  1071. package/apps/studio/client/v2/present/presenter-view.css +298 -0
  1072. package/apps/studio/client/v2/present/presenter-view.jsx +241 -0
  1073. package/apps/studio/client/v2/present/video-present-model.js +92 -0
  1074. package/apps/studio/client/v2/present/video-present.css +164 -0
  1075. package/apps/studio/client/v2/present/video-present.jsx +331 -0
  1076. package/apps/studio/client/v2/preview/external-link-confirm.jsx +245 -0
  1077. package/apps/studio/client/v2/preview/link-follow.js +109 -0
  1078. package/apps/studio/client/v2/preview/open-in-app.jsx +46 -0
  1079. package/apps/studio/client/v2/preview/preview-back.js +21 -0
  1080. package/apps/studio/client/v2/preview/preview-bar.jsx +86 -0
  1081. package/apps/studio/client/v2/preview/preview-chrome-host.jsx +234 -0
  1082. package/apps/studio/client/v2/preview/preview-history.js +61 -0
  1083. package/apps/studio/client/v2/preview/preview.css +262 -0
  1084. package/apps/studio/client/v2/preview/zoom-only.jsx +58 -0
  1085. package/apps/studio/client/v2/search/help-model.js +275 -0
  1086. package/apps/studio/client/v2/search/moved-keys.js +74 -0
  1087. package/apps/studio/client/v2/search/palette-icons.js +45 -0
  1088. package/apps/studio/client/v2/search/search-ds.js +142 -0
  1089. package/apps/studio/client/v2/search/search-env.js +110 -0
  1090. package/apps/studio/client/v2/search/search-keywords.js +162 -0
  1091. package/apps/studio/client/v2/search/search-model.js +623 -0
  1092. package/apps/studio/client/v2/search/search-projects.js +214 -0
  1093. package/apps/studio/client/v2/search/search-recent.js +94 -0
  1094. package/apps/studio/client/v2/search/search-remote.js +30 -0
  1095. package/apps/studio/client/v2/search/search.css +519 -0
  1096. package/apps/studio/client/v2/settings/account.jsx +164 -0
  1097. package/apps/studio/client/v2/settings/advanced-prefs.js +91 -0
  1098. package/apps/studio/client/v2/settings/advanced-section.jsx +308 -0
  1099. package/apps/studio/client/v2/settings/connection-row.jsx +79 -0
  1100. package/apps/studio/client/v2/settings/connections-model.js +138 -0
  1101. package/apps/studio/client/v2/settings/connections-section.jsx +663 -0
  1102. package/apps/studio/client/v2/settings/general-section.jsx +155 -0
  1103. package/apps/studio/client/v2/settings/parts.jsx +48 -0
  1104. package/apps/studio/client/v2/settings/prefs-migrate.js +141 -0
  1105. package/apps/studio/client/v2/settings/project-sync-settings.jsx +255 -0
  1106. package/apps/studio/client/v2/settings/reset-section.jsx +164 -0
  1107. package/apps/studio/client/v2/settings/settings-handlers.js +46 -0
  1108. package/apps/studio/client/v2/settings/settings-model.js +523 -0
  1109. package/apps/studio/client/v2/settings/settings-sheet.jsx +204 -0
  1110. package/apps/studio/client/v2/settings/settings.css +975 -0
  1111. package/apps/studio/client/v2/settings/theme-auto.js +75 -0
  1112. package/apps/studio/client/v2/settings/use-advanced-prefs.js +32 -0
  1113. package/apps/studio/client/v2/settings/use-connections.js +485 -0
  1114. package/apps/studio/client/v2/share/glyphs.jsx +92 -0
  1115. package/apps/studio/client/v2/share/invite-row.jsx +68 -0
  1116. package/apps/studio/client/v2/share/link-dialog.js +53 -0
  1117. package/apps/studio/client/v2/share/link-row.jsx +38 -0
  1118. package/apps/studio/client/v2/share/move-to-cloud.jsx +88 -0
  1119. package/apps/studio/client/v2/share/people-list.jsx +151 -0
  1120. package/apps/studio/client/v2/share/person.jsx +26 -0
  1121. package/apps/studio/client/v2/share/role-menu.jsx +145 -0
  1122. package/apps/studio/client/v2/share/share-advanced.jsx +411 -0
  1123. package/apps/studio/client/v2/share/share-model.js +469 -0
  1124. package/apps/studio/client/v2/share/share-sheet.jsx +602 -0
  1125. package/apps/studio/client/v2/share/share.css +828 -0
  1126. package/apps/studio/client/v2/shell/account-card-model.js +114 -0
  1127. package/apps/studio/client/v2/shell/account-card.jsx +177 -0
  1128. package/apps/studio/client/v2/shell/annotation-prefs-store.js +105 -0
  1129. package/apps/studio/client/v2/shell/ask-to-edit.js +33 -0
  1130. package/apps/studio/client/v2/shell/callouts-host.jsx +151 -0
  1131. package/apps/studio/client/v2/shell/callouts-model.js +358 -0
  1132. package/apps/studio/client/v2/shell/callouts.css +164 -0
  1133. package/apps/studio/client/v2/shell/callouts.jsx +162 -0
  1134. package/apps/studio/client/v2/shell/canvas-mode.js +393 -0
  1135. package/apps/studio/client/v2/shell/contrast.css +37 -0
  1136. package/apps/studio/client/v2/shell/corner-icons.jsx +153 -0
  1137. package/apps/studio/client/v2/shell/dock-rail-homes.js +106 -0
  1138. package/apps/studio/client/v2/shell/f6-cycle.js +124 -0
  1139. package/apps/studio/client/v2/shell/floating-panels.css +2858 -0
  1140. package/apps/studio/client/v2/shell/fold-ghost.js +70 -0
  1141. package/apps/studio/client/v2/shell/format-update.css +43 -0
  1142. package/apps/studio/client/v2/shell/format-update.js +487 -0
  1143. package/apps/studio/client/v2/shell/format-update.jsx +479 -0
  1144. package/apps/studio/client/v2/shell/held-conflict.js +51 -0
  1145. package/apps/studio/client/v2/shell/image-pick.js +140 -0
  1146. package/apps/studio/client/v2/shell/insets-now.js +35 -0
  1147. package/apps/studio/client/v2/shell/inspector-follow.js +113 -0
  1148. package/apps/studio/client/v2/shell/menu-runner.js +711 -0
  1149. package/apps/studio/client/v2/shell/modal-focus.js +259 -0
  1150. package/apps/studio/client/v2/shell/mode-switch.jsx +418 -0
  1151. package/apps/studio/client/v2/shell/native-doors.js +121 -0
  1152. package/apps/studio/client/v2/shell/occlusion-insets.js +116 -0
  1153. package/apps/studio/client/v2/shell/panel-availability.js +27 -0
  1154. package/apps/studio/client/v2/shell/panel-layout.js +144 -0
  1155. package/apps/studio/client/v2/shell/panel-sizes.js +150 -0
  1156. package/apps/studio/client/v2/shell/paste-forward.js +43 -0
  1157. package/apps/studio/client/v2/shell/present-from-label.js +19 -0
  1158. package/apps/studio/client/v2/shell/project-menu-model.js +216 -0
  1159. package/apps/studio/client/v2/shell/project-pill.css +214 -0
  1160. package/apps/studio/client/v2/shell/project-pill.jsx +456 -0
  1161. package/apps/studio/client/v2/shell/recovery-store.js +139 -0
  1162. package/apps/studio/client/v2/shell/role-denial.js +73 -0
  1163. package/apps/studio/client/v2/shell/role-gate.js +29 -0
  1164. package/apps/studio/client/v2/shell/save-hold-notice.js +69 -0
  1165. package/apps/studio/client/v2/shell/save-status.js +191 -0
  1166. package/apps/studio/client/v2/shell/scroll-lock.js +49 -0
  1167. package/apps/studio/client/v2/shell/share-cluster-host.jsx +389 -0
  1168. package/apps/studio/client/v2/shell/share-cluster.css +608 -0
  1169. package/apps/studio/client/v2/shell/share-cluster.jsx +255 -0
  1170. package/apps/studio/client/v2/shell/shell-error-boundary.jsx +81 -0
  1171. package/apps/studio/client/v2/shell/shell-panels-relay.js +95 -0
  1172. package/apps/studio/client/v2/shell/shell-parity.js +457 -0
  1173. package/apps/studio/client/v2/shell/shell-parity.json +2106 -0
  1174. package/apps/studio/client/v2/shell/single-keys-store.js +49 -0
  1175. package/apps/studio/client/v2/shell/tool-panels.css +39 -0
  1176. package/apps/studio/client/v2/shell/tool-panels.js +156 -0
  1177. package/apps/studio/client/v2/shell/use-account.js +59 -0
  1178. package/apps/studio/client/v2/shell/use-annotation-prefs.js +77 -0
  1179. package/apps/studio/client/v2/shell/use-canvas-mode-lane.js +388 -0
  1180. package/apps/studio/client/v2/shell/use-dismiss-outside.js +35 -0
  1181. package/apps/studio/client/v2/shell/use-fit-on-ai-pin.js +42 -0
  1182. package/apps/studio/client/v2/shell/use-fit-while-ai-drafts.js +37 -0
  1183. package/apps/studio/client/v2/shell/use-occluded-insets.js +107 -0
  1184. package/apps/studio/client/v2/shell/use-panel-layout.js +45 -0
  1185. package/apps/studio/client/v2/shell/use-single-keys.js +56 -0
  1186. package/apps/studio/client/v2/shell/use-tool-panels.js +205 -0
  1187. package/apps/studio/client/v2/signin/CreateLocalSheet.jsx +155 -0
  1188. package/apps/studio/client/v2/signin/SignInCard.jsx +284 -0
  1189. package/apps/studio/client/v2/signin/SignInToast.jsx +22 -0
  1190. package/apps/studio/client/v2/signin/WhatsNewLine.jsx +64 -0
  1191. package/apps/studio/client/v2/signin/advanced-rows.js +40 -0
  1192. package/apps/studio/client/v2/signin/signin-model.js +138 -0
  1193. package/apps/studio/client/v2/signin/signin.css +484 -0
  1194. package/apps/studio/client/v2/signin/use-signin.js +209 -0
  1195. package/apps/studio/client/v2/signin/use-whats-new-line.js +94 -0
  1196. package/apps/studio/client/v2/sync-states/back-online.jsx +61 -0
  1197. package/apps/studio/client/v2/sync-states/conflict-card.jsx +326 -0
  1198. package/apps/studio/client/v2/sync-states/offline-foot.jsx +79 -0
  1199. package/apps/studio/client/v2/sync-states/row-words.js +83 -0
  1200. package/apps/studio/client/v2/sync-states/sync-states-model.js +264 -0
  1201. package/apps/studio/client/v2/sync-states/sync-states.css +232 -0
  1202. package/apps/studio/client/v2/timeline/Timeline.jsx +3194 -0
  1203. package/apps/studio/client/v2/timeline/TimelineHost.jsx +360 -0
  1204. package/apps/studio/client/v2/timeline/advanced/actions.js +27 -0
  1205. package/apps/studio/client/v2/timeline/advanced/advanced-store.js +116 -0
  1206. package/apps/studio/client/v2/timeline/advanced/advanced.css +323 -0
  1207. package/apps/studio/client/v2/timeline/advanced/cut-as-code.jsx +127 -0
  1208. package/apps/studio/client/v2/timeline/advanced/easing-curve.jsx +200 -0
  1209. package/apps/studio/client/v2/timeline/advanced/foot.jsx +210 -0
  1210. package/apps/studio/client/v2/timeline/advanced/model.js +121 -0
  1211. package/apps/studio/client/v2/timeline/advanced/render-settings.jsx +62 -0
  1212. package/apps/studio/client/v2/timeline/advanced/video-cap.js +174 -0
  1213. package/apps/studio/client/v2/timeline/ai-edge-model.js +111 -0
  1214. package/apps/studio/client/v2/timeline/ai-edge.css +104 -0
  1215. package/apps/studio/client/v2/timeline/ai-edge.jsx +113 -0
  1216. package/apps/studio/client/v2/timeline/anchor-lane.js +80 -0
  1217. package/apps/studio/client/v2/timeline/anchor.js +80 -0
  1218. package/apps/studio/client/v2/timeline/assemble-video.js +64 -0
  1219. package/apps/studio/client/v2/timeline/clip-search.js +88 -0
  1220. package/apps/studio/client/v2/timeline/clip-verb.js +224 -0
  1221. package/apps/studio/client/v2/timeline/comment-strip-host.jsx +93 -0
  1222. package/apps/studio/client/v2/timeline/comment-strip-model.js +103 -0
  1223. package/apps/studio/client/v2/timeline/comment-strip.jsx +82 -0
  1224. package/apps/studio/client/v2/timeline/edit/clip-menu.js +118 -0
  1225. package/apps/studio/client/v2/timeline/edit/clip-menu.jsx +48 -0
  1226. package/apps/studio/client/v2/timeline/edit/drop.jsx +101 -0
  1227. package/apps/studio/client/v2/timeline/edit/move.jsx +43 -0
  1228. package/apps/studio/client/v2/timeline/edit/ripple.js +43 -0
  1229. package/apps/studio/client/v2/timeline/edit/trim.jsx +52 -0
  1230. package/apps/studio/client/v2/timeline/edit/words.js +65 -0
  1231. package/apps/studio/client/v2/timeline/fit-fill.jsx +172 -0
  1232. package/apps/studio/client/v2/timeline/fit-model.js +137 -0
  1233. package/apps/studio/client/v2/timeline/fold.js +128 -0
  1234. package/apps/studio/client/v2/timeline/footage-rows.jsx +46 -0
  1235. package/apps/studio/client/v2/timeline/footage-state.js +135 -0
  1236. package/apps/studio/client/v2/timeline/glyphs.jsx +118 -0
  1237. package/apps/studio/client/v2/timeline/island-context.js +29 -0
  1238. package/apps/studio/client/v2/timeline/island-controls.jsx +83 -0
  1239. package/apps/studio/client/v2/timeline/island.jsx +54 -0
  1240. package/apps/studio/client/v2/timeline/joins/join-model.js +133 -0
  1241. package/apps/studio/client/v2/timeline/joins/joins.css +277 -0
  1242. package/apps/studio/client/v2/timeline/joins/transition-picker.jsx +240 -0
  1243. package/apps/studio/client/v2/timeline/keys.js +74 -0
  1244. package/apps/studio/client/v2/timeline/lanes/caption-lane.jsx +149 -0
  1245. package/apps/studio/client/v2/timeline/lanes/music-lane.jsx +294 -0
  1246. package/apps/studio/client/v2/timeline/lanes/music-media.js +200 -0
  1247. package/apps/studio/client/v2/timeline/lanes/music-model.js +190 -0
  1248. package/apps/studio/client/v2/timeline/loop-handle.jsx +70 -0
  1249. package/apps/studio/client/v2/timeline/marker-store.js +117 -0
  1250. package/apps/studio/client/v2/timeline/markers.js +79 -0
  1251. package/apps/studio/client/v2/timeline/marks.jsx +152 -0
  1252. package/apps/studio/client/v2/timeline/music-hint.jsx +98 -0
  1253. package/apps/studio/client/v2/timeline/other-takes-model.js +103 -0
  1254. package/apps/studio/client/v2/timeline/other-takes-store.js +49 -0
  1255. package/apps/studio/client/v2/timeline/other-takes.css +98 -0
  1256. package/apps/studio/client/v2/timeline/other-takes.jsx +269 -0
  1257. package/apps/studio/client/v2/timeline/peers.jsx +246 -0
  1258. package/apps/studio/client/v2/timeline/playhead.js +97 -0
  1259. package/apps/studio/client/v2/timeline/poster.js +109 -0
  1260. package/apps/studio/client/v2/timeline/reframe-island.jsx +478 -0
  1261. package/apps/studio/client/v2/timeline/reframe-model.js +135 -0
  1262. package/apps/studio/client/v2/timeline/reframe.css +150 -0
  1263. package/apps/studio/client/v2/timeline/ruler.js +61 -0
  1264. package/apps/studio/client/v2/timeline/selection.js +110 -0
  1265. package/apps/studio/client/v2/timeline/timeline-empty.jsx +108 -0
  1266. package/apps/studio/client/v2/timeline/timeline-store.js +147 -0
  1267. package/apps/studio/client/v2/timeline/timeline.css +2879 -0
  1268. package/apps/studio/client/v2/timeline/together.css +85 -0
  1269. package/apps/studio/client/v2/timeline/track-toggle.js +56 -0
  1270. package/apps/studio/client/v2/timeline/tracks.js +68 -0
  1271. package/apps/studio/client/v2/timeline/transport.js +66 -0
  1272. package/apps/studio/client/v2/timeline/zoom.js +37 -0
  1273. package/apps/studio/client/v2/transcript/TranscriptHost.jsx +162 -0
  1274. package/apps/studio/client/v2/transcript/TranscriptPanel.jsx +358 -0
  1275. package/apps/studio/client/v2/transcript/captions-api.js +297 -0
  1276. package/apps/studio/client/v2/transcript/captions-file-flag.js +38 -0
  1277. package/apps/studio/client/v2/transcript/comp-media-store.js +89 -0
  1278. package/apps/studio/client/v2/transcript/transcript-model.js +240 -0
  1279. package/apps/studio/client/v2/transcript/transcript.css +262 -0
  1280. package/apps/studio/client/v2/undo/projection.js +291 -0
  1281. package/apps/studio/client/v2/undo/undo-history.jsx +286 -0
  1282. package/apps/studio/client/v2/undo/undo.css +81 -0
  1283. package/apps/studio/client/v2/undo/use-undo-mode-lane.js +96 -0
  1284. package/apps/studio/client/v2/undo/use-undo-projection.jsx +460 -0
  1285. package/apps/studio/client/v2/undo/zoom-undo.jsx +79 -0
  1286. package/apps/studio/client/whats-new-seen.js +40 -0
  1287. package/apps/studio/client/whats-new.jsx +65 -62
  1288. package/apps/studio/clip-ops.ts +38 -6
  1289. package/apps/studio/cloud/config-path.ts +42 -0
  1290. package/apps/studio/cloud/endpoints.ts +212 -50
  1291. package/apps/studio/cloud/renew.ts +29 -16
  1292. package/apps/studio/collab/ai-activity.ts +19 -0
  1293. package/apps/studio/collab/awareness-bridge.ts +131 -4
  1294. package/apps/studio/collab/git-lifecycle.ts +52 -20
  1295. package/apps/studio/collab/holds.ts +69 -0
  1296. package/apps/studio/collab/index.ts +25 -0
  1297. package/apps/studio/collab/protocol.ts +64 -0
  1298. package/apps/studio/collab/registry.ts +59 -6
  1299. package/apps/studio/collab/room.ts +374 -16
  1300. package/apps/studio/collab/timeline-awareness.ts +123 -0
  1301. package/apps/studio/collab/timeline-presence.tsx +219 -0
  1302. package/apps/studio/commands/move-artboards-command.ts +45 -4
  1303. package/apps/studio/comments/anchors.ts +147 -0
  1304. package/apps/studio/comments/author-face.ts +41 -0
  1305. package/apps/studio/comments/from-line.ts +43 -0
  1306. package/apps/studio/comments/imported-from.ts +113 -0
  1307. package/apps/studio/comments/local-author.ts +41 -0
  1308. package/apps/studio/comments/mentions.ts +115 -0
  1309. package/apps/studio/comments/mine-stamp.ts +78 -0
  1310. package/apps/studio/comments/ops.ts +293 -0
  1311. package/apps/studio/comments/people.ts +66 -0
  1312. package/apps/studio/comments/where.ts +136 -0
  1313. package/apps/studio/comments-overlay.tsx +1220 -253
  1314. package/apps/studio/config.schema.json +33 -0
  1315. package/apps/studio/context-menu.tsx +126 -42
  1316. package/apps/studio/context.ts +178 -13
  1317. package/apps/studio/cursors-overlay.tsx +28 -11
  1318. package/apps/studio/debug-bundle.ts +21 -5
  1319. package/apps/studio/describe/batch.ts +414 -0
  1320. package/apps/studio/describe/budget.ts +147 -0
  1321. package/apps/studio/describe/claude.ts +273 -0
  1322. package/apps/studio/describe/consent.ts +120 -0
  1323. package/apps/studio/describe/validate.ts +192 -0
  1324. package/apps/studio/design-setup-readiness.ts +2 -2
  1325. package/apps/studio/diagnostics/store.ts +220 -0
  1326. package/apps/studio/dist/client.bundle.js +2429 -2329
  1327. package/apps/studio/dist/comment-mount.js +12 -9
  1328. package/apps/studio/dist/styles.css +1 -1
  1329. package/apps/studio/dom-selection.ts +239 -23
  1330. package/apps/studio/drag-bus.ts +211 -0
  1331. package/apps/studio/draw/serialize-animate.ts +4 -4
  1332. package/apps/studio/ds/board/board-specimen.css +199 -0
  1333. package/apps/studio/ds/board/board.css +674 -0
  1334. package/apps/studio/ds/board/brand-notes.ts +92 -0
  1335. package/apps/studio/ds/board/build-model.ts +418 -0
  1336. package/apps/studio/ds/board/component-states.ts +111 -0
  1337. package/apps/studio/ds/board/directions-model.ts +145 -0
  1338. package/apps/studio/ds/board/directions.css +169 -0
  1339. package/apps/studio/ds/board/directions.tsx +100 -0
  1340. package/apps/studio/ds/board/ds-bar.tsx +107 -0
  1341. package/apps/studio/ds/board/index.tsx +71 -0
  1342. package/apps/studio/ds/board/logo-paint.ts +118 -0
  1343. package/apps/studio/ds/board/outline.tsx +127 -0
  1344. package/apps/studio/ds/board/parts.tsx +160 -0
  1345. package/apps/studio/ds/board/section-brand.tsx +148 -0
  1346. package/apps/studio/ds/board/section-colour.tsx +160 -0
  1347. package/apps/studio/ds/board/section-components.tsx +146 -0
  1348. package/apps/studio/ds/board/section-motion.tsx +106 -0
  1349. package/apps/studio/ds/board/section-patterns.tsx +89 -0
  1350. package/apps/studio/ds/board/section-space.tsx +109 -0
  1351. package/apps/studio/ds/board/section-type.tsx +129 -0
  1352. package/apps/studio/ds/board/specimen.tsx +61 -0
  1353. package/apps/studio/ds/board/state.ts +105 -0
  1354. package/apps/studio/ds/board/template.ts +152 -0
  1355. package/apps/studio/ds/board/types.ts +346 -0
  1356. package/apps/studio/ds/canvas-check.ts +914 -0
  1357. package/apps/studio/ds/canvas-cli.ts +346 -0
  1358. package/apps/studio/ds/check-system-verb.ts +88 -0
  1359. package/apps/studio/ds/check-system.ts +293 -0
  1360. package/apps/studio/ds/check.ts +541 -0
  1361. package/apps/studio/ds/cli.ts +348 -0
  1362. package/apps/studio/ds/component-list.ts +150 -0
  1363. package/apps/studio/ds/contrast.ts +438 -0
  1364. package/apps/studio/ds/convert-map.ts +126 -0
  1365. package/apps/studio/ds/convert.ts +603 -0
  1366. package/apps/studio/ds/css-scan.ts +292 -0
  1367. package/apps/studio/ds/default-components.tsx +377 -0
  1368. package/apps/studio/ds/default.ts +58 -0
  1369. package/apps/studio/ds/design-system.tsx.tpl +40 -0
  1370. package/apps/studio/ds/ds-resolver.ts +205 -0
  1371. package/apps/studio/ds/ds-verb.ts +563 -0
  1372. package/apps/studio/ds/edges.ts +412 -0
  1373. package/apps/studio/ds/emit.ts +217 -0
  1374. package/apps/studio/ds/engine.ts +1652 -0
  1375. package/apps/studio/ds/fallbacks.ts +116 -0
  1376. package/apps/studio/ds/generate.ts +746 -0
  1377. package/apps/studio/ds/head.ts +372 -0
  1378. package/apps/studio/ds/instance-info.ts +90 -0
  1379. package/apps/studio/ds/library.ts +1137 -0
  1380. package/apps/studio/ds/make.ts +726 -0
  1381. package/apps/studio/ds/migrate-emitter.ts +42 -0
  1382. package/apps/studio/ds/nearest.ts +163 -0
  1383. package/apps/studio/ds/outside.ts +343 -0
  1384. package/apps/studio/ds/override-map.ts +213 -0
  1385. package/apps/studio/ds/pairing-css.ts +145 -0
  1386. package/apps/studio/ds/pin-scope.ts +268 -0
  1387. package/apps/studio/ds/registry.ts +228 -0
  1388. package/apps/studio/ds/rename.ts +104 -0
  1389. package/apps/studio/ds/render-rev.ts +144 -0
  1390. package/apps/studio/ds/revision.ts +268 -0
  1391. package/apps/studio/ds/shell-fallbacks.ts +84 -0
  1392. package/apps/studio/ds/switch.ts +426 -0
  1393. package/apps/studio/ds/system-files.ts +251 -0
  1394. package/apps/studio/ds/system.ts +312 -0
  1395. package/apps/studio/ds/undo-hook.ts +46 -0
  1396. package/apps/studio/ds/upgrade-apply.ts +258 -0
  1397. package/apps/studio/ds/upgrade-cli.ts +216 -0
  1398. package/apps/studio/ds/upgrade-codemod.ts +116 -0
  1399. package/apps/studio/ds/upgrade-progress.ts +153 -0
  1400. package/apps/studio/ds/upgrade-prove.ts +429 -0
  1401. package/apps/studio/ds/upgrade-stage.ts +387 -0
  1402. package/apps/studio/ds/upgrade.ts +394 -0
  1403. package/apps/studio/ds/value-types.ts +190 -0
  1404. package/apps/studio/edit-ops/align.ts +43 -0
  1405. package/apps/studio/edit-ops/arrange.ts +93 -0
  1406. package/apps/studio/edit-ops/artboard-facts.ts +70 -0
  1407. package/apps/studio/edit-ops/artboard-resize.ts +50 -0
  1408. package/apps/studio/edit-ops/artboard-trash.ts +77 -0
  1409. package/apps/studio/edit-ops/clear-link.ts +16 -0
  1410. package/apps/studio/edit-ops/clip/captions.ts +154 -0
  1411. package/apps/studio/edit-ops/clip/comp.ts +124 -0
  1412. package/apps/studio/edit-ops/clip/cut-source-range.ts +100 -0
  1413. package/apps/studio/edit-ops/clip/cut-to-beat.ts +136 -0
  1414. package/apps/studio/edit-ops/clip/duck.ts +123 -0
  1415. package/apps/studio/edit-ops/clip/easing.ts +76 -0
  1416. package/apps/studio/edit-ops/clip/formats.ts +163 -0
  1417. package/apps/studio/edit-ops/clip/gestures.ts +161 -0
  1418. package/apps/studio/edit-ops/clip/index.ts +543 -0
  1419. package/apps/studio/edit-ops/clip/jsx.ts +251 -0
  1420. package/apps/studio/edit-ops/clip/place.ts +127 -0
  1421. package/apps/studio/edit-ops/clip/reframe.ts +194 -0
  1422. package/apps/studio/edit-ops/clip/take-swap.ts +53 -0
  1423. package/apps/studio/edit-ops/clip/title-motion.ts +103 -0
  1424. package/apps/studio/edit-ops/clip/title-style.ts +177 -0
  1425. package/apps/studio/edit-ops/clip/track.ts +102 -0
  1426. package/apps/studio/edit-ops/clipboard.ts +482 -0
  1427. package/apps/studio/edit-ops/combine.ts +264 -0
  1428. package/apps/studio/edit-ops/constraints.ts +148 -0
  1429. package/apps/studio/edit-ops/convert-kind.ts +203 -0
  1430. package/apps/studio/edit-ops/corner-radius.ts +86 -0
  1431. package/apps/studio/edit-ops/crop.ts +303 -0
  1432. package/apps/studio/edit-ops/czech-ties.ts +84 -0
  1433. package/apps/studio/edit-ops/detach-instance.ts +119 -0
  1434. package/apps/studio/edit-ops/dispatch.ts +552 -0
  1435. package/apps/studio/edit-ops/distribute.ts +31 -0
  1436. package/apps/studio/edit-ops/ds-instance-update.ts +46 -0
  1437. package/apps/studio/edit-ops/ds-use-nearest.ts +72 -0
  1438. package/apps/studio/edit-ops/duplicate-at-width.ts +241 -0
  1439. package/apps/studio/edit-ops/frame.ts +68 -0
  1440. package/apps/studio/edit-ops/guides.ts +67 -0
  1441. package/apps/studio/edit-ops/hide.ts +30 -0
  1442. package/apps/studio/edit-ops/hover-rules.ts +94 -0
  1443. package/apps/studio/edit-ops/image-fit.ts +571 -0
  1444. package/apps/studio/edit-ops/insert-component.ts +344 -0
  1445. package/apps/studio/edit-ops/insert-preset.ts +151 -0
  1446. package/apps/studio/edit-ops/insert-shape.ts +326 -0
  1447. package/apps/studio/edit-ops/instance-model.ts +286 -0
  1448. package/apps/studio/edit-ops/instance-tree.ts +215 -0
  1449. package/apps/studio/edit-ops/layout-patch.ts +81 -0
  1450. package/apps/studio/edit-ops/lock.ts +30 -0
  1451. package/apps/studio/edit-ops/op-label.ts +155 -0
  1452. package/apps/studio/edit-ops/path-model.ts +671 -0
  1453. package/apps/studio/edit-ops/path.ts +172 -0
  1454. package/apps/studio/edit-ops/photo-every-use.ts +64 -0
  1455. package/apps/studio/edit-ops/photo-use.ts +41 -0
  1456. package/apps/studio/edit-ops/place-freely.ts +47 -0
  1457. package/apps/studio/edit-ops/place-plan.ts +60 -0
  1458. package/apps/studio/edit-ops/print.ts +104 -0
  1459. package/apps/studio/edit-ops/references.ts +231 -0
  1460. package/apps/studio/edit-ops/relink.ts +49 -0
  1461. package/apps/studio/edit-ops/reorder.ts +104 -0
  1462. package/apps/studio/edit-ops/reset-overrides.ts +75 -0
  1463. package/apps/studio/edit-ops/revert.ts +63 -0
  1464. package/apps/studio/edit-ops/rotate.ts +58 -0
  1465. package/apps/studio/edit-ops/safe-zones.ts +38 -0
  1466. package/apps/studio/edit-ops/scope-names.ts +151 -0
  1467. package/apps/studio/edit-ops/select-matching.ts +48 -0
  1468. package/apps/studio/edit-ops/set-gap.ts +65 -0
  1469. package/apps/studio/edit-ops/set-id.ts +42 -0
  1470. package/apps/studio/edit-ops/set-link.ts +39 -0
  1471. package/apps/studio/edit-ops/siblings.ts +105 -0
  1472. package/apps/studio/edit-ops/slot-defaults.ts +48 -0
  1473. package/apps/studio/edit-ops/stamp.ts +27 -0
  1474. package/apps/studio/edit-ops/swap-variant.ts +163 -0
  1475. package/apps/studio/edit-ops/text-copy.ts +146 -0
  1476. package/apps/studio/edit-ops/text-detach.ts +62 -0
  1477. package/apps/studio/edit-ops/text-style-ops.ts +131 -0
  1478. package/apps/studio/edit-ops/text-style.ts +141 -0
  1479. package/apps/studio/edit-ops/tidy.ts +72 -0
  1480. package/apps/studio/edit-ops/types.ts +229 -0
  1481. package/apps/studio/edit-ops/unframe.ts +53 -0
  1482. package/apps/studio/edit-ops/words-css.ts +487 -0
  1483. package/apps/studio/edit-ops/words-paint.ts +521 -0
  1484. package/apps/studio/edit-ops/z-order.ts +81 -0
  1485. package/apps/studio/editing/ai-point-ring.tsx +158 -0
  1486. package/apps/studio/editing/ai-scope-outline.tsx +180 -0
  1487. package/apps/studio/editing/align-bar.tsx +510 -0
  1488. package/apps/studio/editing/anchor-report.ts +123 -0
  1489. package/apps/studio/editing/anchor-reporter.tsx +64 -0
  1490. package/apps/studio/editing/aria-live.tsx +162 -0
  1491. package/apps/studio/editing/arrange.ts +345 -0
  1492. package/apps/studio/editing/artboard-actions.ts +275 -0
  1493. package/apps/studio/editing/artboard-commands.tsx +232 -0
  1494. package/apps/studio/editing/artboard-guides.tsx +265 -0
  1495. package/apps/studio/editing/artboard-handles.tsx +524 -0
  1496. package/apps/studio/editing/artboard-menu.tsx +153 -0
  1497. package/apps/studio/editing/artboard-resize.ts +306 -0
  1498. package/apps/studio/editing/ask-bubble.tsx +161 -0
  1499. package/apps/studio/editing/asset-drag.ts +70 -0
  1500. package/apps/studio/editing/click-to-type.ts +207 -0
  1501. package/apps/studio/editing/clipboard-actions.ts +91 -0
  1502. package/apps/studio/editing/clipboard.ts +194 -0
  1503. package/apps/studio/editing/clipped-grab.ts +45 -0
  1504. package/apps/studio/editing/corner-dots.tsx +394 -0
  1505. package/apps/studio/editing/crop-geometry.ts +128 -0
  1506. package/apps/studio/editing/crop-mode.tsx +522 -0
  1507. package/apps/studio/editing/crumbs.ts +158 -0
  1508. package/apps/studio/editing/draw-geometry.ts +151 -0
  1509. package/apps/studio/editing/draw-tools.tsx +490 -0
  1510. package/apps/studio/editing/drop-chip.tsx +105 -0
  1511. package/apps/studio/editing/duplicate-rhythm.ts +166 -0
  1512. package/apps/studio/editing/edit-chrome-gate.tsx +58 -0
  1513. package/apps/studio/editing/edit-op.ts +90 -0
  1514. package/apps/studio/editing/empty-report.ts +182 -0
  1515. package/apps/studio/editing/empty-reporter.tsx +74 -0
  1516. package/apps/studio/editing/figma-paste.ts +71 -0
  1517. package/apps/studio/editing/finder-drop-model.ts +130 -0
  1518. package/apps/studio/editing/finder-drop.tsx +400 -0
  1519. package/apps/studio/editing/focus-model.tsx +429 -0
  1520. package/apps/studio/editing/gap-bands.tsx +257 -0
  1521. package/apps/studio/editing/hold-rings.tsx +461 -0
  1522. package/apps/studio/editing/image-drop.tsx +193 -0
  1523. package/apps/studio/editing/index.tsx +402 -0
  1524. package/apps/studio/editing/instance-actions.ts +152 -0
  1525. package/apps/studio/editing/kids-summary.ts +75 -0
  1526. package/apps/studio/editing/kind-dim.tsx +54 -0
  1527. package/apps/studio/editing/layout-actions.ts +159 -0
  1528. package/apps/studio/editing/lock-badge.tsx +178 -0
  1529. package/apps/studio/editing/long-page.ts +102 -0
  1530. package/apps/studio/editing/minimap-context.tsx +161 -0
  1531. package/apps/studio/editing/nudge.tsx +212 -0
  1532. package/apps/studio/editing/object-actions.ts +156 -0
  1533. package/apps/studio/editing/object-keys.ts +58 -0
  1534. package/apps/studio/editing/object-menu.tsx +216 -0
  1535. package/apps/studio/editing/object-ops.ts +114 -0
  1536. package/apps/studio/editing/paste-bar.tsx +388 -0
  1537. package/apps/studio/editing/pen/combine-run.ts +113 -0
  1538. package/apps/studio/editing/pen/draw.tsx +364 -0
  1539. package/apps/studio/editing/pen/index.tsx +48 -0
  1540. package/apps/studio/editing/pen/overlay.tsx +147 -0
  1541. package/apps/studio/editing/pen/pen-geometry.ts +234 -0
  1542. package/apps/studio/editing/pen/point-store.ts +64 -0
  1543. package/apps/studio/editing/pen/points.tsx +421 -0
  1544. package/apps/studio/editing/place-freely.tsx +389 -0
  1545. package/apps/studio/editing/place-ghost.tsx +418 -0
  1546. package/apps/studio/editing/place-image.tsx +219 -0
  1547. package/apps/studio/editing/preset-ruler.tsx +218 -0
  1548. package/apps/studio/editing/rename-order.ts +58 -0
  1549. package/apps/studio/editing/reorder-slot.tsx +567 -0
  1550. package/apps/studio/editing/rotate-handle.tsx +353 -0
  1551. package/apps/studio/editing/selection.tsx +319 -0
  1552. package/apps/studio/editing/set-gap.ts +55 -0
  1553. package/apps/studio/editing/size-ghost.tsx +343 -0
  1554. package/apps/studio/editing/space-tap.ts +56 -0
  1555. package/apps/studio/editing/sticky-name.tsx +112 -0
  1556. package/apps/studio/editing/tab-order.tsx +298 -0
  1557. package/apps/studio/editing/take-keys.ts +115 -0
  1558. package/apps/studio/editing/text-actions.ts +214 -0
  1559. package/apps/studio/editing/text-in-place.tsx +187 -0
  1560. package/apps/studio/editing/tidy-preview.tsx +83 -0
  1561. package/apps/studio/editing/token-ruler.tsx +231 -0
  1562. package/apps/studio/editing/type-role.ts +122 -0
  1563. package/apps/studio/editing/undo-preview.tsx +120 -0
  1564. package/apps/studio/editing/video-label.ts +66 -0
  1565. package/apps/studio/editing/video-play.ts +65 -0
  1566. package/apps/studio/editing/world-menu.ts +36 -0
  1567. package/apps/studio/element-ids.ts +1030 -0
  1568. package/apps/studio/equal-spacing-handles.tsx +1 -1
  1569. package/apps/studio/exporters/_runtime.ts +64 -24
  1570. package/apps/studio/exporters/audio.ts +136 -0
  1571. package/apps/studio/exporters/door-fingerprint.ts +202 -0
  1572. package/apps/studio/exporters/estimate.ts +314 -0
  1573. package/apps/studio/exporters/file-names.ts +197 -0
  1574. package/apps/studio/exporters/format-scopes.ts +7 -1
  1575. package/apps/studio/exporters/hub-render-door.ts +368 -0
  1576. package/apps/studio/exporters/index.ts +53 -7
  1577. package/apps/studio/exporters/jobs.ts +484 -80
  1578. package/apps/studio/exporters/jpg.ts +21 -0
  1579. package/apps/studio/exporters/pdf-fonts.ts +102 -0
  1580. package/apps/studio/exporters/pdf.ts +133 -14
  1581. package/apps/studio/exporters/png.ts +136 -9
  1582. package/apps/studio/exporters/print-back.ts +92 -0
  1583. package/apps/studio/exporters/print-preflight.ts +373 -0
  1584. package/apps/studio/exporters/rects-runner.ts +130 -0
  1585. package/apps/studio/exporters/remote.ts +726 -3
  1586. package/apps/studio/exporters/render-seconds.ts +57 -0
  1587. package/apps/studio/exporters/replay.ts +48 -0
  1588. package/apps/studio/exporters/scope.ts +560 -15
  1589. package/apps/studio/exporters/spec-run.ts +270 -0
  1590. package/apps/studio/exporters/spec-v2.ts +408 -0
  1591. package/apps/studio/exporters/video-cap.ts +280 -0
  1592. package/apps/studio/exporters/wait-ai.ts +192 -0
  1593. package/apps/studio/figma/client.ts +67 -0
  1594. package/apps/studio/figma/comments-to-pins.ts +249 -0
  1595. package/apps/studio/figma/comments-to-strokes.ts +6 -1
  1596. package/apps/studio/figma/into-board.ts +141 -0
  1597. package/apps/studio/figma/to-strokes.ts +54 -0
  1598. package/apps/studio/format.ts +172 -30
  1599. package/apps/studio/fs-watch.ts +28 -1
  1600. package/apps/studio/generation/adapters/gemini.ts +3 -0
  1601. package/apps/studio/generation/adapters/stub.ts +133 -0
  1602. package/apps/studio/generation/gen-sidecar.ts +108 -0
  1603. package/apps/studio/generation/registry.ts +16 -5
  1604. package/apps/studio/generation/takes.ts +398 -0
  1605. package/apps/studio/generation/types.ts +7 -0
  1606. package/apps/studio/git/service.ts +143 -14
  1607. package/apps/studio/github/endpoints.ts +1 -1
  1608. package/apps/studio/github/identity-cache.ts +53 -14
  1609. package/apps/studio/handoff/blockers.ts +120 -0
  1610. package/apps/studio/handoff/run.ts +233 -0
  1611. package/apps/studio/handoff/targets.ts +334 -0
  1612. package/apps/studio/handoff/write-scopes.ts +57 -0
  1613. package/apps/studio/handoff.ts +24 -5
  1614. package/apps/studio/history/changes.ts +199 -0
  1615. package/apps/studio/history/describe-annotations.ts +216 -0
  1616. package/apps/studio/history/describe-css.ts +592 -0
  1617. package/apps/studio/history/describe-match.ts +866 -0
  1618. package/apps/studio/history/describe-meta.ts +281 -0
  1619. package/apps/studio/history/describe-version.ts +89 -0
  1620. package/apps/studio/history/describe-words.ts +513 -0
  1621. package/apps/studio/history/describe.ts +1452 -0
  1622. package/apps/studio/history/last-good.ts +123 -0
  1623. package/apps/studio/history/links.ts +112 -0
  1624. package/apps/studio/history/object-history.ts +535 -0
  1625. package/apps/studio/history/render-ok-signal.ts +81 -0
  1626. package/apps/studio/history/restore-artboard-action.ts +183 -0
  1627. package/apps/studio/history/restore-artboard.ts +607 -0
  1628. package/apps/studio/history/restore-object.ts +168 -0
  1629. package/apps/studio/history/run-label.ts +18 -0
  1630. package/apps/studio/history/surface-requests.ts +115 -0
  1631. package/apps/studio/history/titles.ts +259 -0
  1632. package/apps/studio/history/trash.ts +314 -0
  1633. package/apps/studio/history/version-lanes.ts +115 -0
  1634. package/apps/studio/history/versions.ts +458 -0
  1635. package/apps/studio/hmr-broadcast.ts +55 -1
  1636. package/apps/studio/home/ai.ts +79 -0
  1637. package/apps/studio/home/cli.ts +221 -0
  1638. package/apps/studio/home/cloud.ts +297 -0
  1639. package/apps/studio/home/create-local.ts +164 -0
  1640. package/apps/studio/home/github.ts +99 -0
  1641. package/apps/studio/home/hub.ts +340 -0
  1642. package/apps/studio/home/index-gc.ts +288 -0
  1643. package/apps/studio/home/index-reader.ts +338 -0
  1644. package/apps/studio/home/invite.ts +204 -0
  1645. package/apps/studio/home/main.ts +159 -0
  1646. package/apps/studio/home/pid.ts +12 -0
  1647. package/apps/studio/home/routes.ts +591 -0
  1648. package/apps/studio/home/signin.ts +285 -0
  1649. package/apps/studio/home/user-state.ts +177 -0
  1650. package/apps/studio/home/whats-new.ts +42 -0
  1651. package/apps/studio/http.ts +2589 -947
  1652. package/apps/studio/index/assets-response.ts +34 -0
  1653. package/apps/studio/index/assets.ts +335 -0
  1654. package/apps/studio/index/ds-usage.ts +983 -0
  1655. package/apps/studio/index/extract.ts +348 -0
  1656. package/apps/studio/index/extractors/asset-usage.ts +349 -0
  1657. package/apps/studio/index/extractors/attribution-cache.ts +225 -0
  1658. package/apps/studio/index/history-refs.ts +301 -0
  1659. package/apps/studio/index/history-source.ts +39 -0
  1660. package/apps/studio/index/match.ts +307 -0
  1661. package/apps/studio/index/scan-kick.ts +47 -0
  1662. package/apps/studio/index/service.ts +367 -0
  1663. package/apps/studio/index/snapshot.ts +135 -0
  1664. package/apps/studio/index/types.ts +139 -0
  1665. package/apps/studio/index/version-feed.ts +71 -0
  1666. package/apps/studio/input-router.tsx +522 -55
  1667. package/apps/studio/inspect-canvas.ts +86 -0
  1668. package/apps/studio/inspect-overlay.tsx +192 -0
  1669. package/apps/studio/inspect.ts +96 -33
  1670. package/apps/studio/kinds/convert.ts +175 -0
  1671. package/apps/studio/kinds/export-defaults.ts +42 -0
  1672. package/apps/studio/kinds/meta.ts +237 -0
  1673. package/apps/studio/kinds/physical.ts +84 -0
  1674. package/apps/studio/kinds/presets.ts +452 -0
  1675. package/apps/studio/kinds/print-custom.ts +165 -0
  1676. package/apps/studio/kinds/print-edit.ts +130 -0
  1677. package/apps/studio/kinds/print-guides.ts +23 -0
  1678. package/apps/studio/kinds/safe-zones.ts +250 -0
  1679. package/apps/studio/kinds/warnings.ts +422 -0
  1680. package/apps/studio/layer-name.ts +148 -0
  1681. package/apps/studio/layout/free-space.ts +131 -0
  1682. package/apps/studio/link-chip-overlay.tsx +175 -0
  1683. package/apps/studio/link-import.ts +617 -0
  1684. package/apps/studio/loopback-listen.ts +105 -0
  1685. package/apps/studio/macro-guard.ts +67 -0
  1686. package/apps/studio/managed-projects.ts +63 -14
  1687. package/apps/studio/marquee-overlay.tsx +2 -2
  1688. package/apps/studio/measure-overlay.tsx +10 -4
  1689. package/apps/studio/migrate/cli.ts +164 -0
  1690. package/apps/studio/migrate/ds-registry.ts +42 -0
  1691. package/apps/studio/migrate/engine.ts +926 -0
  1692. package/apps/studio/migrate/hub.ts +219 -0
  1693. package/apps/studio/migrate/steps.ts +627 -0
  1694. package/apps/studio/notifications.tsx +197 -52
  1695. package/apps/studio/outbox/content.ts +139 -0
  1696. package/apps/studio/outbox/drain.ts +269 -0
  1697. package/apps/studio/outbox/hub-reachability.ts +58 -0
  1698. package/apps/studio/outbox/index.ts +57 -0
  1699. package/apps/studio/outbox/policy.ts +859 -0
  1700. package/apps/studio/outbox/senders/export-cloud.ts +116 -0
  1701. package/apps/studio/outbox/store.ts +336 -0
  1702. package/apps/studio/outbox/types.ts +160 -0
  1703. package/apps/studio/participants-chrome.tsx +178 -60
  1704. package/apps/studio/paths.ts +8 -0
  1705. package/apps/studio/photo-store.ts +230 -1
  1706. package/apps/studio/port.ts +93 -0
  1707. package/apps/studio/presence/canvas-presence.tsx +522 -0
  1708. package/apps/studio/presence/fields.ts +93 -0
  1709. package/apps/studio/presence/model.ts +296 -0
  1710. package/apps/studio/presence/tones.ts +39 -0
  1711. package/apps/studio/present/fit.ts +138 -0
  1712. package/apps/studio/present/follow.ts +142 -0
  1713. package/apps/studio/present/media-presence.ts +105 -0
  1714. package/apps/studio/present/meta-schema.ts +612 -0
  1715. package/apps/studio/present/order.ts +153 -0
  1716. package/apps/studio/present/pointer-dot.tsx +379 -0
  1717. package/apps/studio/present/pointer-point.ts +24 -0
  1718. package/apps/studio/present/present-media.ts +446 -0
  1719. package/apps/studio/present/present-stage.tsx +1018 -0
  1720. package/apps/studio/present/present-zoom.ts +63 -0
  1721. package/apps/studio/present/relay-strip.ts +136 -0
  1722. package/apps/studio/preview/preview-camera.tsx +442 -0
  1723. package/apps/studio/preview/wheel-scroll.ts +85 -0
  1724. package/apps/studio/print/units.ts +3 -0
  1725. package/apps/studio/print-overlay-content.tsx +127 -10
  1726. package/apps/studio/read-only-mode.ts +83 -0
  1727. package/apps/studio/readiness.ts +18 -3
  1728. package/apps/studio/ripple.ts +19 -1
  1729. package/apps/studio/routes/agent.ts +1025 -0
  1730. package/apps/studio/routes/ai.ts +422 -0
  1731. package/apps/studio/routes/annotations.ts +649 -0
  1732. package/apps/studio/routes/asset-details.ts +87 -0
  1733. package/apps/studio/routes/asset-rename.ts +60 -0
  1734. package/apps/studio/routes/asset-state.ts +137 -0
  1735. package/apps/studio/routes/asset-trash.ts +77 -0
  1736. package/apps/studio/routes/assets.ts +217 -0
  1737. package/apps/studio/routes/availability.ts +94 -0
  1738. package/apps/studio/routes/canvas-meta-rider.ts +304 -0
  1739. package/apps/studio/routes/canvas-origin.ts +88 -0
  1740. package/apps/studio/routes/canvas-source.ts +315 -0
  1741. package/apps/studio/routes/chat-attach.ts +335 -0
  1742. package/apps/studio/routes/chat.ts +137 -0
  1743. package/apps/studio/routes/cloud-move.ts +364 -0
  1744. package/apps/studio/routes/cloud-plan.ts +36 -0
  1745. package/apps/studio/routes/comments.ts +118 -0
  1746. package/apps/studio/routes/connections.ts +132 -0
  1747. package/apps/studio/routes/describe.ts +122 -0
  1748. package/apps/studio/routes/diagnostics.ts +118 -0
  1749. package/apps/studio/routes/ds-check.ts +124 -0
  1750. package/apps/studio/routes/ds-convert.ts +55 -0
  1751. package/apps/studio/routes/ds-edges.ts +136 -0
  1752. package/apps/studio/routes/ds-library.ts +194 -0
  1753. package/apps/studio/routes/ds-make.ts +91 -0
  1754. package/apps/studio/routes/ds-switch.ts +68 -0
  1755. package/apps/studio/routes/ds-upgrade.ts +139 -0
  1756. package/apps/studio/routes/ds.ts +808 -0
  1757. package/apps/studio/routes/edit.ts +658 -0
  1758. package/apps/studio/routes/element-links.ts +155 -0
  1759. package/apps/studio/routes/export.ts +486 -0
  1760. package/apps/studio/routes/figma.ts +200 -0
  1761. package/apps/studio/routes/generate.ts +443 -0
  1762. package/apps/studio/routes/handoff.ts +319 -0
  1763. package/apps/studio/routes/help-guides.ts +37 -0
  1764. package/apps/studio/routes/history.ts +739 -0
  1765. package/apps/studio/routes/import-link.ts +186 -0
  1766. package/apps/studio/routes/index.ts +293 -0
  1767. package/apps/studio/routes/kinds.ts +257 -0
  1768. package/apps/studio/routes/links.ts +72 -0
  1769. package/apps/studio/routes/outbox.ts +87 -0
  1770. package/apps/studio/routes/photo-every-use.ts +241 -0
  1771. package/apps/studio/routes/pins.ts +66 -0
  1772. package/apps/studio/routes/present.ts +187 -0
  1773. package/apps/studio/routes/project-format.ts +148 -0
  1774. package/apps/studio/routes/project-undo.ts +497 -0
  1775. package/apps/studio/routes/settings.ts +179 -0
  1776. package/apps/studio/routes/share.ts +463 -0
  1777. package/apps/studio/routes/shell.ts +137 -0
  1778. package/apps/studio/routes/sync-conflicts.ts +150 -0
  1779. package/apps/studio/routes/sync.ts +172 -0
  1780. package/apps/studio/routes/table.ts +224 -0
  1781. package/apps/studio/routes/trash.ts +393 -0
  1782. package/apps/studio/routes/video.ts +395 -0
  1783. package/apps/studio/routes/votes.ts +486 -0
  1784. package/apps/studio/safe-zones-overlay.tsx +269 -0
  1785. package/apps/studio/scaffold-design.ts +72 -124
  1786. package/apps/studio/schema/annotations.v2.schema.json +2303 -0
  1787. package/apps/studio/schema/beats.v1.schema.json +94 -0
  1788. package/apps/studio/schema/canvas-meta.v2.schema.json +264 -0
  1789. package/apps/studio/schema/canvas-tsx.md +357 -0
  1790. package/apps/studio/schema/comments.v2.schema.json +125 -0
  1791. package/apps/studio/schema/ds-components-v1.schema.json +96 -0
  1792. package/apps/studio/schema/ds-formats.md +146 -0
  1793. package/apps/studio/schema/ds-head-v1.schema.json +67 -0
  1794. package/apps/studio/schema/ds-revision-v1.schema.json +31 -0
  1795. package/apps/studio/schema/ds-schema-v1.fallbacks.css +118 -0
  1796. package/apps/studio/schema/ds-schema-v1.json +2029 -0
  1797. package/apps/studio/schema/ds-schema-v1.schema.json +663 -0
  1798. package/apps/studio/schema/ds-tokens-v1.schema.json +210 -0
  1799. package/apps/studio/schema/edl.v1.schema.json +124 -0
  1800. package/apps/studio/schema/formats.ts +175 -0
  1801. package/apps/studio/schema/gen.v1.schema.json +33 -0
  1802. package/apps/studio/schema/transcript.v1.schema.json +133 -0
  1803. package/apps/studio/server.ts +454 -166
  1804. package/apps/studio/shell/info-file.ts +54 -0
  1805. package/apps/studio/shell/parent-watch.ts +97 -0
  1806. package/apps/studio/shell/profile.ts +61 -0
  1807. package/apps/studio/shell-canvas-file.ts +36 -0
  1808. package/apps/studio/skip-dirs.ts +455 -0
  1809. package/apps/studio/spoof-chars.ts +17 -0
  1810. package/apps/studio/static-lane.ts +212 -0
  1811. package/apps/studio/sync/accepted-cold-start.ts +35 -13
  1812. package/apps/studio/sync/accepted-link.ts +524 -27
  1813. package/apps/studio/sync/access-notices.ts +143 -0
  1814. package/apps/studio/sync/action-feed.ts +145 -0
  1815. package/apps/studio/sync/action-stage.ts +831 -165
  1816. package/apps/studio/sync/asset-push.ts +24 -2
  1817. package/apps/studio/sync/asset-state.ts +391 -0
  1818. package/apps/studio/sync/atomic-write.ts +42 -1
  1819. package/apps/studio/sync/availability.ts +185 -0
  1820. package/apps/studio/sync/canvas-path.ts +70 -6
  1821. package/apps/studio/sync/cell-pairing.ts +5 -24
  1822. package/apps/studio/sync/comment-door.ts +104 -0
  1823. package/apps/studio/sync/conflict-record.ts +186 -0
  1824. package/apps/studio/sync/create-collision.ts +297 -0
  1825. package/apps/studio/sync/ctl-provider.ts +16 -1
  1826. package/apps/studio/sync/file-ledger.ts +12 -0
  1827. package/apps/studio/sync/file-membership.ts +123 -10
  1828. package/apps/studio/sync/file-plane.ts +195 -12
  1829. package/apps/studio/sync/format-sync.ts +13 -7
  1830. package/apps/studio/sync/history-fields.ts +61 -0
  1831. package/apps/studio/sync/hub-link.ts +24 -4
  1832. package/apps/studio/sync/hub-text-undo.ts +178 -0
  1833. package/apps/studio/sync/hubs-config.ts +122 -20
  1834. package/apps/studio/sync/index.ts +1499 -128
  1835. package/apps/studio/sync/journal-client.ts +56 -0
  1836. package/apps/studio/sync/keep-both.ts +187 -0
  1837. package/apps/studio/sync/link-consent.ts +390 -0
  1838. package/apps/studio/sync/local-kernel.ts +2725 -0
  1839. package/apps/studio/sync/media-gate.ts +97 -0
  1840. package/apps/studio/sync/object-conflict.ts +199 -0
  1841. package/apps/studio/sync/poke.ts +50 -0
  1842. package/apps/studio/sync/presentation.ts +20 -2
  1843. package/apps/studio/sync/project-config-push.ts +5 -2
  1844. package/apps/studio/sync/projection.ts +208 -34
  1845. package/apps/studio/sync/resync-trace.ts +220 -0
  1846. package/apps/studio/sync/retry-after.ts +27 -0
  1847. package/apps/studio/sync/status.ts +16 -1
  1848. package/apps/studio/sync/supervisor.ts +20 -2
  1849. package/apps/studio/sync/transaction-client.ts +364 -34
  1850. package/apps/studio/sync/trash-clear-copies.ts +120 -0
  1851. package/apps/studio/sync/trash-watch.ts +157 -0
  1852. package/apps/studio/sync/trash.ts +50 -2
  1853. package/apps/studio/sync/undo-target.ts +110 -0
  1854. package/apps/studio/sync/workspace-signin.ts +14 -3
  1855. package/apps/studio/sync/write-hold.ts +238 -0
  1856. package/apps/studio/sync/writer-registry.ts +380 -5
  1857. package/apps/studio/sync-name-key.ts +59 -0
  1858. package/apps/studio/thumbs/keys.ts +147 -0
  1859. package/apps/studio/thumbs/routes.ts +68 -0
  1860. package/apps/studio/thumbs/service.ts +884 -0
  1861. package/apps/studio/thumbs/store.ts +114 -0
  1862. package/apps/studio/thumbs/validate.ts +62 -0
  1863. package/apps/studio/tool-palette.tsx +782 -563
  1864. package/apps/studio/toolbars/marker-tip.ts +22 -0
  1865. package/apps/studio/toolbars/shell-panels.ts +55 -0
  1866. package/apps/studio/toolbars/tool-panel.ts +89 -0
  1867. package/apps/studio/toolbars/toolbar-css.ts +283 -0
  1868. package/apps/studio/toolbars/toolbar-icons.tsx +135 -0
  1869. package/apps/studio/toolbars/toolbar-rect.ts +82 -0
  1870. package/apps/studio/ui-prefs-migrate.ts +467 -0
  1871. package/apps/studio/ui-prefs.ts +305 -3
  1872. package/apps/studio/undo-stack.ts +10 -0
  1873. package/apps/studio/use-annotation-resize.tsx +23 -17
  1874. package/apps/studio/use-artboard-drag.tsx +156 -15
  1875. package/apps/studio/use-canvas-keys.ts +58 -0
  1876. package/apps/studio/use-chrome-visibility.tsx +13 -0
  1877. package/apps/studio/use-collab.tsx +556 -56
  1878. package/apps/studio/use-element-resize.tsx +13 -9
  1879. package/apps/studio/use-governed-mode.ts +23 -0
  1880. package/apps/studio/use-keyboard-discipline.tsx +114 -49
  1881. package/apps/studio/use-selection-set.tsx +110 -9
  1882. package/apps/studio/use-snap-guides.tsx +74 -5
  1883. package/apps/studio/use-spacing-handles.tsx +90 -27
  1884. package/apps/studio/use-tool-mode.tsx +204 -10
  1885. package/apps/studio/use-undo-stack.tsx +19 -23
  1886. package/apps/studio/video/beats.ts +484 -0
  1887. package/apps/studio/video/decode-webaudio.ts +115 -0
  1888. package/apps/studio/video/decode.ts +288 -0
  1889. package/apps/studio/video/derive.ts +647 -0
  1890. package/apps/studio/video/format-ids.ts +158 -0
  1891. package/apps/studio/video/framing.ts +246 -0
  1892. package/apps/studio/video/inject.ts +324 -0
  1893. package/apps/studio/video/keyframes.ts +356 -0
  1894. package/apps/studio/video/link-groups.ts +40 -0
  1895. package/apps/studio/video/linked-formats.ts +142 -0
  1896. package/apps/studio/video/mask-comments.ts +36 -0
  1897. package/apps/studio/video/media-analysis.ts +169 -0
  1898. package/apps/studio/video/reel-place.ts +286 -0
  1899. package/apps/studio/video/reframe-read.ts +90 -0
  1900. package/apps/studio/video/schema.ts +422 -0
  1901. package/apps/studio/video/speech.ts +129 -0
  1902. package/apps/studio/video/title-motion.ts +85 -0
  1903. package/apps/studio/video/transcript-cut.ts +91 -0
  1904. package/apps/studio/video/whisper-parse.ts +123 -0
  1905. package/apps/studio/video/words-run.ts +210 -0
  1906. package/apps/studio/video/words-timing.ts +222 -0
  1907. package/apps/studio/video-comp.tsx +238 -9
  1908. package/apps/studio/video-links-overlay.tsx +272 -0
  1909. package/apps/studio/video-natural.ts +73 -0
  1910. package/apps/studio/video-play-chrome.tsx +229 -0
  1911. package/apps/studio/video-play-overlay.tsx +190 -0
  1912. package/apps/studio/video-vocab.tsx +460 -0
  1913. package/apps/studio/view-only-gesture.tsx +101 -0
  1914. package/apps/studio/viewport-fit.ts +28 -0
  1915. package/apps/studio/web-overlay-content.tsx +4 -2
  1916. package/apps/studio/whats-new.json +100 -20
  1917. package/apps/studio/whats-new.schema.json +10 -0
  1918. package/apps/studio/whats-new.ts +4 -0
  1919. package/apps/studio/workspace-mode.ts +10 -0
  1920. package/apps/studio/ws.ts +299 -8
  1921. package/cli/bin/maude.mjs +1 -0
  1922. package/cli/commands/design.mjs +401 -72
  1923. package/cli/commands/flow.mjs +12 -1
  1924. package/cli/commands/help.mjs +8 -0
  1925. package/cli/commands/migrate.mjs +55 -0
  1926. package/cli/lib/bash-guard.mjs +1691 -0
  1927. package/cli/lib/confine-out.mjs +150 -0
  1928. package/cli/lib/confine-read.mjs +179 -0
  1929. package/cli/lib/confine-root.mjs +157 -0
  1930. package/cli/lib/design-help.gen.mjs +119 -0
  1931. package/cli/lib/design-hook.mjs +1764 -0
  1932. package/cli/lib/design-link.mjs +68 -4
  1933. package/cli/lib/design-open.mjs +238 -0
  1934. package/cli/lib/export-spec.mjs +394 -0
  1935. package/cli/lib/finding-text.mjs +63 -0
  1936. package/cli/lib/flow-usage.mjs +6 -10
  1937. package/cli/lib/gitignore-block.mjs +1 -0
  1938. package/cli/lib/handoff.mjs +285 -0
  1939. package/cli/lib/handoff.schema.json +336 -0
  1940. package/cli/lib/hubs-config.mjs +10 -0
  1941. package/cli/lib/json-schema-lite.mjs +260 -0
  1942. package/cli/lib/project-links.mjs +88 -0
  1943. package/cli/lib/studio-locate.mjs +83 -0
  1944. package/cli/lib/sub-verbs.mjs +111 -0
  1945. package/cli/lib/workspace-plan.mjs +16 -3
  1946. package/package.json +29 -10
  1947. package/plugins/design/README.md +46 -0
  1948. package/plugins/design/templates/_shell.html +749 -69
  1949. package/plugins/design/templates/blank-canvas.tsx.template +26 -0
  1950. package/plugins/design/templates/brief-board.tsx.template +12 -11
  1951. package/plugins/design/templates/canvas.tsx.template +3 -3
  1952. package/plugins/design/templates/design-system-inspiration/core/README.philosophy.md.tpl +104 -0
  1953. package/plugins/design/templates/design-system-inspiration/core/colors_and_type.css.tpl +38 -3
  1954. package/plugins/design/templates/design-system-inspiration/core/components.json.tpl +127 -0
  1955. package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +1 -0
  1956. package/plugins/design/templates/design-system-inspiration/core/preview/_components.css.tpl +111 -0
  1957. package/plugins/flow/.claude-plugin/config.schema.json +6 -1
  1958. package/apps/studio/annotations/ui/edit-actions.ts +0 -551
  1959. package/apps/studio/canvas-header.ts +0 -165
  1960. package/apps/studio/client/hmr.mjs +0 -113
  1961. package/apps/studio/client/hooks/use-keyboard-shortcuts.jsx +0 -297
  1962. package/apps/studio/client/iframe-lazy.mjs +0 -121
  1963. package/apps/studio/client/inspector/artboard-knobs.jsx +0 -456
  1964. package/apps/studio/client/menus/menubar.jsx +0 -856
  1965. package/apps/studio/client/panels/CapabilityBar.jsx +0 -101
  1966. package/apps/studio/client/panels/ClipInspector.jsx +0 -409
  1967. package/apps/studio/client/panels/GitPanel.jsx +0 -1026
  1968. package/apps/studio/client/panels/OnboardingWizard.jsx +0 -642
  1969. package/apps/studio/client/panels/StickerPicker.jsx +0 -160
  1970. package/apps/studio/client/panels/SyncPanel.jsx +0 -1190
  1971. package/apps/studio/client/panels/TimelinePanel.jsx +0 -2259
  1972. package/apps/studio/client/share-dialog.jsx +0 -91
  1973. package/apps/studio/client/shell/collapsed-rail.jsx +0 -23
  1974. package/apps/studio/client/shell/status-bar.jsx +0 -215
  1975. package/apps/studio/client/styles/1-tokens-maude.css +0 -296
  1976. package/apps/studio/client/styles/1-tokens.css +0 -304
  1977. package/apps/studio/client/styles/3-shell-maude.css +0 -3158
  1978. package/apps/studio/client/styles/3-shell.css +0 -1036
  1979. package/apps/studio/client/styles/4-components-maude.css +0 -134
  1980. package/apps/studio/client/styles/4-components.css +0 -2204
  1981. package/apps/studio/client/styles/5-maude-overrides.css +0 -162
  1982. package/apps/studio/client/styles.css +0 -1264
  1983. package/apps/studio/contextual-toolbar.tsx +0 -512
  1984. package/apps/studio/export-dialog.tsx +0 -827
  1985. package/apps/studio/undo-hud.tsx +0 -16
@@ -35,12 +35,22 @@ import {
35
35
  useRef,
36
36
  useState,
37
37
  } from 'react';
38
-
39
- import { AiBanner } from './ai-banner.tsx';
38
+ import { createPortal } from 'react-dom';
40
39
  import { AnnotationsLayer } from './annotations-layer.tsx';
40
+ import { ArtboardRingsLayer } from './artboard-activity-overlay.tsx';
41
+ import { AiCopyLinks } from './artboard-ai-copies.tsx';
42
+ import { setConvertMarks } from './artboard-convert-marks.tsx';
41
43
  import { ArtboardMarqueeOverlay } from './artboard-marquee.tsx';
44
+ import { canvasInsets, canvasModeStore } from './bridge/canvas-mode-store.ts';
45
+ import { canvasMayHandle } from './bridge/dgn-protocol.ts';
46
+ import { escClearsSelection, runEscRung } from './bridge/esc-ladder.ts';
47
+ import { modeShows } from './bridge/mode-shows.ts';
48
+ import { type Insets, revealViewBox } from './bridge/occlusion.ts';
49
+ import { dispatchPasteData, parsePasteData } from './bridge/paste-data.ts';
50
+ import { HUD_TOKENS_CSS } from './canvas-hud-tokens.gen.ts';
42
51
  import {
43
52
  type ArtboardRect,
53
+ fitRectIntoHost,
44
54
  PhotoPreviewBridge,
45
55
  SnapGuideOverlay,
46
56
  useArtboardsContext,
@@ -48,6 +58,10 @@ import {
48
58
  useViewportControllerContext,
49
59
  type ViewportControllerHandle,
50
60
  } from './canvas-lib.tsx';
61
+ import { replayActionKey, replayToolKey } from './canvas-replay-keys.ts';
62
+ import { getCanvasTheme, subscribeCanvasTheme } from './canvas-theme.ts';
63
+ import { CanvasThemePill } from './canvas-theme-pill.tsx';
64
+ import { scopedMatches } from './client/v2/left-panel/selector-scope.js';
51
65
  import {
52
66
  buildEditSourceRecord,
53
67
  type EditSourceApplyFn,
@@ -64,7 +78,6 @@ import {
64
78
  type MenuItem,
65
79
  useContextMenu,
66
80
  } from './context-menu.tsx';
67
- import { ContextualToolbar } from './contextual-toolbar.tsx';
68
81
  import { CursorsOverlay } from './cursors-overlay.tsx';
69
82
  import {
70
83
  buildComposeSelection,
@@ -76,21 +89,55 @@ import {
76
89
  resolveSelectionEl,
77
90
  } from './dom-selection.ts';
78
91
  import { setElementDragActive } from './drag-state.ts';
92
+ import { useBoardModel } from './ds/board/state.ts';
93
+ import { useArtboardActions } from './editing/artboard-actions.ts';
94
+ import { type ArtboardMenuDeps, artboardMenuSections } from './editing/artboard-menu.tsx';
95
+ import { useClipboard } from './editing/clipboard-actions.ts';
96
+ import { clippedGrab } from './editing/clipped-grab.ts';
97
+ import { drawToolOfAction } from './editing/draw-geometry.ts';
98
+ import { EditingLayer } from './editing/index.tsx';
99
+ import { selectWhenRendered, useObjectOps } from './editing/object-actions.ts';
100
+ import { type ObjectMenuDeps, objectMenuSections } from './editing/object-menu.tsx';
101
+ // S2.11 — the reorder slot's state + the ⌥-copy / drag-out drops (editing/reorder-slot.tsx)
102
+ import {
103
+ copyPlacedTo,
104
+ duplicateObject,
105
+ liftCard,
106
+ panelMotion,
107
+ reorderSlot,
108
+ takeOver,
109
+ } from './editing/reorder-slot.tsx';
110
+ import { isLockedDom, lockedClickSelection, stepOut } from './editing/selection.tsx';
111
+ import { commitTextInPlace, lockedTextLine, textOpDeps } from './editing/text-actions.ts';
112
+ import { worldMenuSections } from './editing/world-menu.ts';
79
113
  import { EqualSpacingHandles } from './equal-spacing-handles.tsx';
80
- import { ExportDialogProvider } from './export-dialog.tsx';
81
114
  import {
82
115
  crossedDragThreshold,
116
+ dropPageRoot,
83
117
  type HoverTarget,
118
+ pageRootOf,
84
119
  resolveHoverTarget,
85
120
  useInputRouter,
86
121
  } from './input-router.tsx';
122
+ import { inspectedSelection, shouldFlipToMove } from './inspect-canvas.ts';
123
+ import { InspectOverlay, measureNeighbour } from './inspect-overlay.tsx';
124
+ import { displayLayerName, isPictureTag, saysItsText } from './layer-name.ts';
125
+ import { LinkChipOverlay } from './link-chip-overlay.tsx';
87
126
  import { ElementMarqueeOverlay } from './marquee-overlay.tsx';
88
127
  import { MeasureOverlay } from './measure-overlay.tsx';
89
128
  import { ParticipantsChrome } from './participants-chrome.tsx';
90
- import { installEmbedEscapeRelay, isEmbedCanvas, isReadOnlyCanvas } from './read-only-mode.ts';
129
+ import { usePresentSelection } from './present/present-stage.tsx';
130
+ import { usePreviewing } from './preview/preview-camera.tsx';
131
+ import { clampsEngineScroll } from './preview/wheel-scroll.ts';
132
+ import {
133
+ installEmbedEscapeRelay,
134
+ isEmbedCanvas,
135
+ isFollowCanvas,
136
+ isReadOnlyCanvas,
137
+ } from './read-only-mode.ts';
91
138
  import { mountCaret, placeCaretAt } from './text-caret.ts';
92
139
  import { ToolPalette } from './tool-palette.tsx';
93
- import { UndoHud } from './undo-hud.tsx';
140
+ import { setShellPanelOpen } from './toolbars/shell-panels.ts';
94
141
  import {
95
142
  AnnotationSelectionProvider,
96
143
  useAnnotationSelection,
@@ -112,6 +159,7 @@ import {
112
159
  import { SpacingHandlesOverlay } from './use-spacing-handles.tsx';
113
160
  import { useToolMode } from './use-tool-mode.tsx';
114
161
  import { useUndoSinks, useUndoStack } from './use-undo-stack.tsx';
162
+ import { ViewOnlyGesture } from './view-only-gesture.tsx';
115
163
 
116
164
  // ─────────────────────────────────────────────────────────────────────────────
117
165
  // Styles — halos render as `position: fixed` siblings of the canvas. Reading
@@ -144,7 +192,7 @@ import { useUndoSinks, useUndoStack } from './use-undo-stack.tsx';
144
192
  // attribute on the iframe `documentElement`, propagated over the existing
145
193
  // `dgn:*` postMessage bridge (see CanvasRouter onMessage + app.jsx).
146
194
  //
147
- // Values mirror the Maude app-chrome neutrals (client/styles/1-tokens.css) so
195
+ // Values mirror the Maude app-chrome neutrals (client/styles/1-tokens-shell.css) so
148
196
  // the in-iframe chrome and the outer shell read as one product. The DARK set is
149
197
  // also the default (attribute absent / "dark") so a canvas that never receives
150
198
  // a theme message renders coherent-dark — matching the dev-server's own default
@@ -156,43 +204,8 @@ import { useUndoSinks, useUndoStack } from './use-undo-stack.tsx';
156
204
  // with the rewritten outer shell. Accent-fg is the maude dark navy (NOT white):
157
205
  // maude's bright indigo accent needs a dark fg for WCAG contrast (white/indigo
158
206
  // ≈ 3:1, fails AA; navy/indigo ≈ 6.3:1). Token-only swap — no overlay logic
159
- // changes (DDR-054). Values lifted from `.design/system/maude/colors_and_type.css`.
160
- const HUD_TOKENS_CSS = `
161
- :root,
162
- :root[data-maude-theme="dark"] {
163
- --maude-hud-accent: oklch(0.680 0.180 268);
164
- --maude-hud-accent-hover: oklch(0.730 0.170 268);
165
- --maude-hud-accent-active: oklch(0.630 0.180 268);
166
- --maude-hud-accent-fg: oklch(0.180 0.030 268);
167
- --maude-hud-accent-tint: color-mix(in oklab, oklch(0.680 0.180 268) 16%, transparent);
168
-
169
- --maude-chrome-bg-0: oklch(0.165 0.012 255);
170
- --maude-chrome-bg-1: oklch(0.198 0.012 255);
171
- --maude-chrome-bg-2: oklch(0.232 0.013 255);
172
- --maude-chrome-fg-0: oklch(0.955 0.005 250);
173
- --maude-chrome-fg-1: oklch(0.790 0.008 250);
174
- --maude-chrome-border: oklch(0.290 0.012 255);
175
- --maude-chrome-dot: oklch(0.340 0.012 255);
176
- --maude-chrome-shadow: rgba(0, 0, 0, 0.46);
177
- --maude-chrome-font-mono: 'JetBrains Mono', 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
178
- }
179
- :root[data-maude-theme="light"] {
180
- --maude-hud-accent: oklch(0.520 0.195 268);
181
- --maude-hud-accent-hover: oklch(0.470 0.195 268);
182
- --maude-hud-accent-active: oklch(0.430 0.190 268);
183
- --maude-hud-accent-fg: oklch(0.995 0.004 268);
184
- --maude-hud-accent-tint: color-mix(in oklab, oklch(0.520 0.195 268) 12%, transparent);
185
-
186
- --maude-chrome-bg-0: oklch(0.975 0.004 255);
187
- --maude-chrome-bg-1: oklch(1.000 0 0);
188
- --maude-chrome-bg-2: oklch(0.987 0.003 255);
189
- --maude-chrome-fg-0: oklch(0.225 0.015 260);
190
- --maude-chrome-fg-1: oklch(0.400 0.014 260);
191
- --maude-chrome-border: oklch(0.922 0.005 255);
192
- --maude-chrome-dot: oklch(0.860 0.008 255);
193
- --maude-chrome-shadow: color-mix(in oklab, oklch(0.225 0.015 260) 14%, transparent);
194
- }
195
- `;
207
+ // changes (DDR-054). V2-2.6: the block is GENERATED from the DS (scripts/gen-tokens.mjs →
208
+ // canvas-hud-tokens.gen.ts), byte-identical to the hand-lifted copy it replaces.
196
209
 
197
210
  // DDR-046 — Three-state halo language. Each state has its own border weight,
198
211
  // color treatment, and geometric idiom so 8+ semantic states (hover / selected
@@ -211,22 +224,24 @@ const HALO_CSS = `
211
224
  /* Hover — lighter 1.5px tinted line + white inner ring for contrast on dark
212
225
  elements. NO ring, NO ticks. Synchronous paint (no debounce). */
213
226
  .dc-cv-halo--hover {
214
- border: 1.5px solid color-mix(in oklab, var(--maude-hud-accent, #0d99ff) 60%, transparent);
215
- box-shadow: inset 0 0 0 1px var(--maude-chrome-bg-0, #ffffff);
227
+ border: 1px solid var(--maude-hud-accent, #0d99ff);
228
+ opacity: 0.7;
216
229
  }
217
- /* Selected (single) — 2px solid + 18% ring halo + 4 filled corner ticks.
218
- Ticks are <i class="tick tick-*"> children at inset:-3px, 8x8, accent fill. */
230
+ /* Selected (single) — P8 C5 (14 R2, board .ed-sel): a 1.5 px accent outline, no halo, no corner ticks; the
231
+ eight square handles (use-element-resize) are the only marks. The tick children stay in the DOM for the
232
+ callers that still place them, drawn as nothing. */
219
233
  .dc-cv-halo--selected {
220
- border: 2px solid var(--maude-hud-accent, #0d99ff);
221
- box-shadow: 0 0 0 4px color-mix(in oklab, var(--maude-hud-accent, #0d99ff) 18%, transparent);
234
+ border: 1.5px solid var(--maude-hud-accent, #0d99ff);
235
+ box-shadow: none;
222
236
  }
223
237
  .dc-cv-halo--selected .tick {
224
- position: absolute;
225
- width: 8px;
226
- height: 8px;
227
- background: var(--maude-hud-accent, #0d99ff);
228
- border-radius: 1px;
229
- box-shadow: 0 0 0 1px var(--maude-chrome-bg-0, #ffffff);
238
+ display: none;
239
+ }
240
+ /* P8 C7 (13 · ds-edit-colour): a Design system swatch / master is a thing drawn on the board, not a frame — its
241
+ ring is the board's own: 2 px, 4 px clear of the swatch. */
242
+ .dc-cv-halo--selected[data-ring] {
243
+ border-width: 2px;
244
+ border-radius: 6px;
230
245
  }
231
246
  .dc-cv-halo--selected .tick-tl { top: -3px; left: -3px; }
232
247
  .dc-cv-halo--selected .tick-tr { top: -3px; right: -3px; }
@@ -266,6 +281,22 @@ const HALO_CSS = `
266
281
  .dc-cv-group-bbox .tick-tr { top: -3px; right: -3px; }
267
282
  .dc-cv-group-bbox .tick-bl { bottom: -3px; left: -3px; }
268
283
  .dc-cv-group-bbox .tick-br { bottom: -3px; right: -3px; }
284
+ .dc-cv-group-bbox .tick-t { top: -3px; left: calc(50% - 3px); }
285
+ .dc-cv-group-bbox .tick-b { bottom: -3px; left: calc(50% - 3px); }
286
+ .dc-cv-group-bbox .tick-l { left: -3px; top: calc(50% - 3px); }
287
+ .dc-cv-group-bbox .tick-r { right: -3px; top: calc(50% - 3px); }
288
+ /* P8 round 7 (12 · ia-placed \`.ia-groupsel-tag\`) — a group of photos says how many, inside its top-left corner */
289
+ .dc-cv-group-tag {
290
+ position: absolute;
291
+ left: 4px;
292
+ top: 4px;
293
+ padding: 1px 4px;
294
+ border-radius: 3px;
295
+ background: var(--maude-hud-accent, #0d99ff);
296
+ color: #fff;
297
+ font: 600 11px/16px system-ui, -apple-system, sans-serif;
298
+ white-space: nowrap;
299
+ }
269
300
  /*
270
301
  * Active-artboard indicator — the artboard whose center sits closest to the
271
302
  * viewport midpoint after pan settles is "active" (DesignCanvas tracks this
@@ -278,7 +309,9 @@ const HALO_CSS = `
278
309
  (3 px ring + hard 6×6×0 offset) was readable but visually expensive once
279
310
  the frame itself lost its brutalist treatment. A 2 px ring on a 22 %
280
311
  tinted hairline reads unambiguous without claiming subject-ness. */
281
- box-shadow: 0 0 0 2px var(--maude-hud-accent, #0d99ff);
312
+ /* P8 C5 (07 ve-none) — the boards draw no rim on an artboard nobody selected: the active one is a keyboard /
313
+ context anchor (aria-current), not a mark. A selected artboard wears its own frame + handles. */
314
+ box-shadow: none;
282
315
  transition: box-shadow 120ms cubic-bezier(0.4, 0, 0.2, 1);
283
316
  }
284
317
  /* Respect prefers-reduced-motion across all chrome transitions. */
@@ -327,6 +360,8 @@ const HALO_CSS = `
327
360
  [contenteditable].dc-text-editing {
328
361
  outline: 2px solid var(--maude-hud-accent, #0d99ff);
329
362
  outline-offset: 1px;
363
+ /* 14 ed-text-edit: the ring wears an accent-tint halo */
364
+ box-shadow: 0 0 0 5px color-mix(in oklch, var(--maude-hud-accent, #0d99ff) 18%, transparent);
330
365
  border-radius: 1px;
331
366
  cursor: text;
332
367
  /* Unify the caret with the annotation editors (CARET_FIX_STYLE in
@@ -335,6 +370,11 @@ const HALO_CSS = `
335
370
  blinking the native caret. */
336
371
  caret-color: var(--maude-hud-accent, #4a63e7);
337
372
  }
373
+ /* 14 ed-text-edit - while a text is typed in place the board draws ONLY the edit ring: no resize handles, no size
374
+ tag, no bands or badges over it. */
375
+ body:has([contenteditable].dc-text-editing) :is(.dc-el-resize-handle, .dc-el-resize-readout, .ed-name-tag, .ed-parent-outline, .dc-spacing-handle, .ed-band, .ed-order, .ed-focus-ring) {
376
+ display: none !important;
377
+ }
338
378
  /* Dogfood fix — hover affordance for the same leaf-text elements the dblclick
339
379
  handler above enters edit mode on. The :not(:empty):not(:has(> *)) selector
340
380
  proxies "all children are text nodes" (the exact isLeafText check happens
@@ -418,6 +458,8 @@ interface LayerNode {
418
458
  * route CssKnobs uses), so this must reflect the SOURCE value, not a
419
459
  * client-only preview flag (see app.jsx `toggleVisibility`). */
420
460
  hidden: boolean;
461
+ /** S2.6 — the shared lock (`data-cd-locked` in the TSX): the Layers padlock's source of truth. */
462
+ locked?: boolean;
421
463
  /** feature-4 T7 — a SYNTHETIC group row for an unstamped wrapper that holds
422
464
  * stamped descendants. It's a structural stand-in so the tree mirrors real
423
465
  * nesting instead of hoisting descendants up a level (the "some elements
@@ -439,17 +481,25 @@ function kebabToTitle(s: string): string {
439
481
  .join(' ');
440
482
  }
441
483
 
442
- // Human label: data-dc-element (Title Case) → aria-label → role → tag(.class).
484
+ // Human label: data-dc-element (Title Case) → aria-label → what the element says (its words, a picture's alt or
485
+ // file — P8 C7) → the plain word for its role / tag ("Heading", "Text", "Frame" — P8 C5: never the code's own
486
+ // `div` / `h1` / `div.hero`).
443
487
  function layerLabel(el: Element): string {
444
488
  const dc = el.getAttribute('data-dc-element');
445
489
  if (dc) return kebabToTitle(dc);
446
490
  const aria = el.getAttribute('aria-label');
447
491
  if (aria) return aria.slice(0, 40);
448
- const role = el.getAttribute('role');
449
- if (role) return role;
450
- const tag = el.tagName.toLowerCase();
451
- const cls = realClasses(el).split(/\s+/).filter(Boolean)[0];
452
- return cls ? `${tag}.${cls}` : tag;
492
+ // P8 c10 (14 ed-pen): a drawn shape is what it is — "Path", "Rectangle" — not the svg's "Icon"
493
+ const shape = el.getAttribute('data-shape');
494
+ if (shape && /^[a-z][a-z-]{0,23}$/.test(shape)) return kebabToTitle(shape);
495
+ const picture = isPictureTag(el.tagName);
496
+ return displayLayerName({
497
+ tag: el.tagName,
498
+ role: el.getAttribute('role'),
499
+ text: saysItsText(el.tagName) ? el.textContent : null,
500
+ alt: picture ? (el.getAttribute('alt') ?? el.querySelector('img')?.getAttribute('alt')) : null,
501
+ src: picture ? (el.getAttribute('src') ?? el.querySelector('img')?.getAttribute('src')) : null,
502
+ });
453
503
  }
454
504
 
455
505
  function layerType(el: Element): string {
@@ -563,7 +613,9 @@ export function serializeArtboardTree(root: Element): LayerNode[] {
563
613
  label: layerLabel(child),
564
614
  type: layerType(child),
565
615
  index: idx,
566
- hidden: (child as HTMLElement).style.display === 'none',
616
+ hidden:
617
+ (child as HTMLElement).style.display === 'none' || child.hasAttribute('data-cd-hidden'),
618
+ locked: child.hasAttribute('data-cd-locked'),
567
619
  dcElement: child.getAttribute('data-dc-element'),
568
620
  children: walk(child),
569
621
  });
@@ -602,7 +654,16 @@ export function serializeArtboardTree(root: Element): LayerNode[] {
602
654
  }
603
655
  return out;
604
656
  }
605
- return walk(root);
657
+ const top = walk(root);
658
+ // V2-8.5 round 4 — the page root IS the artboard (14 Editing: Layers lists Nav · Hero · Services directly under
659
+ // "Desktop"; decision v2-c3-page-root-is-the-artboard): the one filling root is not a row, its objects are the top
660
+ // level. A page that does not fill the artboard (a lone card) stays a row — it is an object like any other.
661
+ const body = root.querySelector('.dc-artboard-body');
662
+ const page = body ? pageRootOf(body) : null;
663
+ const only = top[0];
664
+ if (page && top.length === 1 && only && only.id === page.getAttribute('data-cd-id'))
665
+ return only.children ?? [];
666
+ return top;
606
667
  }
607
668
 
608
669
  // The artboard whose Layers tree the shell is currently showing. Set every time
@@ -715,25 +776,18 @@ export function CanvasShell({
715
776
  }) {
716
777
  ensureHaloStyles();
717
778
 
718
- // theme-default-follow — every un-pinned artboard tracks the chrome theme.
719
- // When it flips (the theme postMessage handler in CanvasRouter updates
720
- // `data-maude-theme` on <html>), re-theme them. A single observer per canvas
721
- // (cleaned up on unmount) — no per-artboard listeners to leak. The rule is a
722
- // CSS block keyed by data-dc-screen (see rebuildArtboardThemeStyle), so it
723
- // survives React re-renders without flicker.
779
+ // r4 #6 — every artboard shows the canvas's Light | Dark. When the mode flips (the pill; canvas-theme.ts), re-theme
780
+ // them. The rule is a CSS block keyed by data-dc-screen (see rebuildArtboardThemeStyle), so it survives React
781
+ // re-renders without flicker.
724
782
  useEffect(() => {
725
- if (typeof MutationObserver === 'undefined' || typeof document === 'undefined') return;
726
- const obs = new MutationObserver(() => applyArtboardFollowers());
727
- obs.observe(document.documentElement, {
728
- attributes: true,
729
- attributeFilter: ['data-maude-theme'],
730
- });
731
- // Initial follow — theme every un-pinned artboard once the DS stylesheet has
732
- // parsed. The observer only fires on a `data-maude-theme` CHANGE, which may
733
- // not happen on first paint (the chrome theme can already equal the canvas
734
- // default), so first paint needs its own trigger. `window 'load'` guarantees
735
- // every <link>/<style> sheet is parsed → collectThemeDeclarations sees the
736
- // DS tokens. Runs immediately if the document is already complete.
783
+ const offTheme = subscribeCanvasTheme(applyArtboardFollowers);
784
+ const offProbe = subscribeDsThemeProbe(applyArtboardFollowers);
785
+ const off = () => {
786
+ offTheme();
787
+ offProbe();
788
+ };
789
+ // First paint needs its own trigger: `window 'load'` guarantees every <link>/<style> sheet is parsed →
790
+ // collectThemeDeclarations sees the DS tokens. Runs immediately if the document is already complete.
737
791
  let onLoad: (() => void) | null = null;
738
792
  if (document.readyState === 'complete') {
739
793
  applyArtboardFollowers();
@@ -742,7 +796,7 @@ export function CanvasShell({
742
796
  window.addEventListener('load', onLoad, { once: true });
743
797
  }
744
798
  return () => {
745
- obs.disconnect();
799
+ off();
746
800
  if (onLoad) window.removeEventListener('load', onLoad);
747
801
  };
748
802
  }, []);
@@ -765,6 +819,27 @@ export function CanvasShell({
765
819
  );
766
820
  }
767
821
 
822
+ /**
823
+ * r4 #6 — the Light | Dark pill every ordinary canvas carries. It steps aside where the canvas is not the person's own
824
+ * to edit or is shown to others: Preview, Present, an embed, a Present follower — and on the Design system canvas,
825
+ * which draws its own bar (ds/board/ds-bar.tsx) over the same mode. Lifted out of the transformed world (a portal to
826
+ * `<body>`) so it stays put while the canvas pans and zooms, as the DS bar does.
827
+ */
828
+ function CanvasThemePillMount() {
829
+ const chrome = useChromeVisibility();
830
+ const previewing = usePreviewing();
831
+ const board = useBoardModel();
832
+ if (typeof document === 'undefined' || !document.body) return null;
833
+ if (previewing || chrome?.present || board || isEmbedCanvas() || isFollowCanvas()) return null;
834
+ return createPortal(
835
+ <CanvasThemePill
836
+ bothThemes={() => detectDsThemeSupport().supported}
837
+ onProbeStale={subscribeDsThemeProbe}
838
+ />,
839
+ document.body
840
+ );
841
+ }
842
+
768
843
  // ─────────────────────────────────────────────────────────────────────────────
769
844
  // CanvasCore — sits inside SelectionSetProvider, builds the menu registry
770
845
  // against the live viewport controller + selection set, then mounts
@@ -1069,6 +1144,10 @@ function CanvasCore({
1069
1144
  [controller, artboardsCtx]
1070
1145
  );
1071
1146
 
1147
+ // V2-clipboard-objects — the object / artboard menus' Cut · Copy · Paste (editing/clipboard-actions.ts)
1148
+ const clipboard = useClipboard();
1149
+ const objectOps = useObjectOps(clipboard);
1150
+ const artboardActions = useArtboardActions(clipboard);
1072
1151
  const registry = useMemo<ContextRegistry>(
1073
1152
  () =>
1074
1153
  buildRegistry({
@@ -1078,38 +1157,45 @@ function CanvasCore({
1078
1157
  distributeArtboards,
1079
1158
  alignArtboards,
1080
1159
  focusArtboard,
1160
+ objectMenu: objectOps.menuDeps,
1161
+ artboardMenu: artboardActions.menuDeps,
1081
1162
  }),
1082
- [controller, selSet, distributeArtboards, alignArtboards, focusArtboard]
1163
+ [
1164
+ controller,
1165
+ selSet,
1166
+ distributeArtboards,
1167
+ alignArtboards,
1168
+ focusArtboard,
1169
+ objectOps,
1170
+ artboardActions,
1171
+ ]
1083
1172
  );
1084
1173
 
1085
- // Distribute is reached via the MultiArtboardToolbar (floating chrome
1086
- // anchored above the group bbox) + context menu. No keyboard shortcut —
1174
+ // Distribute is reached via the align bar (editing/align-bar.tsx, above the
1175
+ // group bbox) + context menu. No keyboard shortcut —
1087
1176
  // user feedback (post-Wave-2) preferred the toolbar over global hotkeys.
1088
1177
 
1089
1178
  return (
1090
- <ExportDialogProvider>
1091
- <ContextMenuProvider registry={registry}>
1092
- <CanvasRouter
1093
- hostRef={hostRef}
1094
- distributeArtboards={distributeArtboards}
1095
- alignArtboards={alignArtboards}
1096
- >
1097
- {children}
1098
- </CanvasRouter>
1099
- </ContextMenuProvider>
1100
- </ExportDialogProvider>
1179
+ <ContextMenuProvider registry={registry}>
1180
+ <CanvasRouter
1181
+ hostRef={hostRef}
1182
+ distributeArtboards={distributeArtboards}
1183
+ alignArtboards={alignArtboards}
1184
+ >
1185
+ {children}
1186
+ </CanvasRouter>
1187
+ </ContextMenuProvider>
1101
1188
  );
1102
1189
  }
1103
1190
 
1104
1191
  // ─────────────────────────────────────────────────────────────────────────────
1105
- // Artboard theme (D9 + theme-default-follow, 2026-05-31). The status-bar theme
1106
- // toggle (vpravo dole) is the SINGLE SOURCE OF TRUTH: the canvas-shell chrome
1107
- // AND every artboard follow it by default via `data-maude-theme`. The right-
1108
- // click `Theme ▸ DS default / Light / Dark / Follow chrome` submenu PINS one
1109
- // artboard to override that default — re-themed by stamping its content wrapper
1110
- // with the DS's theme-wrapper convention. (Before this date the default was the
1111
- // inverse — artboards kept their own DS theme and following was opt-in — which
1112
- // produced the recurring "canvas dark / chrome light" mismatch.)
1192
+ // Canvas theme (D9 → r4 #6, decision `v2-michal-r4-global-light-dark`). ONE Light | Dark per canvas, switched by the
1193
+ // pill at the top (canvas-theme-pill.tsx; the mode and where it is remembered: canvas-theme.ts). EVERY artboard shows
1194
+ // that mode — a person no longer pins artboards one by one, and "Follow chrome" (the app's own theme) is gone: the
1195
+ // canvas starts in its design system's own default and the person moves it from there. (Before r4 the artboards
1196
+ // followed the app's theme, which is why a design system canvas switched only its seven sections and left the
1197
+ // specimen pages in Light.) The mode is applied by re-declaring that theme's tokens on every artboard's content
1198
+ // wrapper with an injected stylesheet (see rebuildArtboardThemeStyle).
1113
1199
  //
1114
1200
  // DS theme-wrapper conventions vary (`.maude[data-theme]`, `.mdcc[data-theme]`,
1115
1201
  // `.app[data-theme]`, bare `[data-theme]`, …) and there's no reliable config
@@ -1147,7 +1233,19 @@ let _dsThemeSupport: DsThemeSupport | null = null;
1147
1233
  // precisely instead: the negative answer holds until a stylesheet is added to
1148
1234
  // or finishes loading in the document, then the next call probes again.
1149
1235
  let _dsThemeUnsupported = false;
1236
+ // Did the negative probe see a DS wrapper (an element carrying `data-theme`) in the document? If not, the answer is
1237
+ // "I could not tell yet" (the artboards had not mounted), not "this system has one theme" — a wrapper appearing
1238
+ // later must re-ask (r5-7: the pill asked before the artboard content mounted and stayed greyed for good).
1239
+ let _dsThemeSawWrapper = false;
1150
1240
  let _dsThemeWatch = false;
1241
+ const _probeSubs = new Set<() => void>();
1242
+ /** Called when a cached "this design system has one theme" may be stale (a stylesheet or the first wrapper arrived). */
1243
+ export function subscribeDsThemeProbe(f: () => void): () => void {
1244
+ _probeSubs.add(f);
1245
+ return () => {
1246
+ _probeSubs.delete(f);
1247
+ };
1248
+ }
1151
1249
  const _unsupported: DsThemeSupport = { supported: false, wrapperClass: '' };
1152
1250
 
1153
1251
  function watchStylesheetsOnce(): void {
@@ -1155,16 +1253,31 @@ function watchStylesheetsOnce(): void {
1155
1253
  _dsThemeWatch = true;
1156
1254
  const invalidate = (): void => {
1157
1255
  _dsThemeUnsupported = false;
1256
+ for (const f of [..._probeSubs]) f(); // whoever drew a greyed answer asks again
1158
1257
  };
1159
1258
  try {
1160
1259
  new MutationObserver((records) => {
1260
+ if (!_dsThemeUnsupported) return; // nothing cached that could be stale
1161
1261
  for (const r of records) {
1262
+ // the probe's own scratch nodes and the follow rule's own <style> are not news: re-asking on them
1263
+ // re-ran the probe forever on a canvas with no Dark (r5 full-suite hang)
1264
+ if ((r.target as Element | null)?.hasAttribute?.('data-dc-probe')) continue;
1162
1265
  for (const n of Array.from(r.addedNodes)) {
1163
- const tag = (n as Element).tagName;
1266
+ const el = n as Element;
1267
+ if (el.nodeType !== 1) continue;
1268
+ if (el.hasAttribute?.('data-dc-probe') || el.id === 'dc-artboard-theme-css') continue;
1269
+ const tag = el.tagName;
1164
1270
  if (tag === 'STYLE' || tag === 'LINK') return invalidate();
1271
+ // the first DS wrapper arriving after a probe that had none to look at
1272
+ if (
1273
+ !_dsThemeSawWrapper &&
1274
+ el.nodeType === 1 &&
1275
+ (el.hasAttribute?.('data-theme') || el.querySelector?.('[data-theme]'))
1276
+ )
1277
+ return invalidate();
1165
1278
  }
1166
1279
  }
1167
- }).observe(document.head ?? document.documentElement, { childList: true, subtree: true });
1280
+ }).observe(document.documentElement, { childList: true, subtree: true });
1168
1281
  // A <link> that was already in the DOM finishing its load (capture: load
1169
1282
  // does not bubble).
1170
1283
  document.addEventListener(
@@ -1183,7 +1296,10 @@ function watchStylesheetsOnce(): void {
1183
1296
  export function __resetDsThemeProbeForTests(): void {
1184
1297
  _dsThemeSupport = null;
1185
1298
  _dsThemeUnsupported = false;
1299
+ _dsThemeSawWrapper = false;
1186
1300
  _dsThemeWatch = false; // its observer watched the previous file's document
1301
+ _themeDecls.light = undefined; // the token scan read the previous file's stylesheets
1302
+ _themeDecls.dark = undefined;
1187
1303
  }
1188
1304
 
1189
1305
  export function detectDsThemeSupport(): DsThemeSupport {
@@ -1194,6 +1310,7 @@ export function detectDsThemeSupport(): DsThemeSupport {
1194
1310
  try {
1195
1311
  const host = document.createElement('div');
1196
1312
  host.setAttribute('aria-hidden', 'true');
1313
+ host.setAttribute('data-dc-probe', '');
1197
1314
  host.style.cssText =
1198
1315
  'position:absolute;left:-9999px;top:0;width:0;height:0;overflow:hidden;pointer-events:none;';
1199
1316
  document.body.appendChild(host);
@@ -1211,14 +1328,21 @@ export function detectDsThemeSupport(): DsThemeSupport {
1211
1328
  // the full className ("maude di-root") and each individual token ("maude",
1212
1329
  // "di-root"). Bare `''` first (cleanest), historical guesses last as a
1213
1330
  // pre-mount fallback. A Set de-dupes; insertion order keeps DOM-derived first.
1331
+ // A wrapper's className is often several classes (`maude-v2 k-v2 k-stage`, the kit's artboards): the DS scopes
1332
+ // its theme blocks to ONE of them, and the others differ from board to board. So each single token is tried
1333
+ // first (the selector that then matches EVERY wrapper), the whole string only as a fallback for a DS whose
1334
+ // blocks are scoped to a compound (`.a.b[data-theme]`) — the selector is built per class, never one escaped string.
1214
1335
  const candidates = new Set<string>(['']);
1215
- for (const el of Array.from(document.querySelectorAll('[data-theme]'))) {
1336
+ const wrappers = Array.from(document.querySelectorAll('[data-theme]'));
1337
+ const compounds: string[] = [];
1338
+ for (const el of wrappers) {
1216
1339
  const cn = (el as HTMLElement).className;
1217
1340
  if (typeof cn === 'string' && cn.trim()) {
1218
- candidates.add(cn.trim());
1219
1341
  for (const tok of cn.trim().split(/\s+/)) candidates.add(tok);
1342
+ compounds.push(cn.trim());
1220
1343
  }
1221
1344
  }
1345
+ for (const c of compounds) candidates.add(c);
1222
1346
  candidates.add('mdcc');
1223
1347
  candidates.add('app');
1224
1348
  let found = fallback;
@@ -1239,6 +1363,7 @@ export function detectDsThemeSupport(): DsThemeSupport {
1239
1363
  if (found.supported) _dsThemeSupport = found;
1240
1364
  else {
1241
1365
  _dsThemeUnsupported = true;
1366
+ _dsThemeSawWrapper = wrappers.length > 0;
1242
1367
  watchStylesheetsOnce();
1243
1368
  }
1244
1369
  return found;
@@ -1310,41 +1435,24 @@ function collectThemeDeclarations(theme: 'light' | 'dark'): string {
1310
1435
  return decls;
1311
1436
  }
1312
1437
 
1313
- // Every artboard FOLLOWS the chrome theme by default (the status-bar toggle is
1314
- // the source of truth). A per-artboard pin OVERRIDES that: 'ds' = the design
1315
- // system's native theme (opt out of following entirely), 'light' / 'dark' = a
1316
- // fixed theme. Absence from this map = follow chrome.
1317
- type ArtboardPin = 'ds' | 'light' | 'dark';
1318
- const _artboardPins = new Map<string, ArtboardPin>();
1319
-
1320
1438
  function cssEsc(v: string): string {
1321
1439
  return typeof CSS !== 'undefined' && CSS.escape ? CSS.escape(v) : v;
1322
1440
  }
1323
1441
 
1324
- // Selector targeting the artboard's content wrapper (where the DS theme block
1325
- // is re-established). Beats `.<wrapper>[data-theme="…"]` because the injected
1326
- // <style> is appended after the DS stylesheet (later-wins on equal specificity).
1327
- function artboardScopeSelector(screenId: string): string {
1328
- const { wrapperClass } = detectDsThemeSupport();
1329
- const base = `[data-dc-screen="${cssEsc(screenId)}"]`;
1330
- if (wrapperClass) {
1331
- const c = cssEsc(wrapperClass);
1332
- return `${base} .${c},${base}.${c}`;
1333
- }
1334
- return `${base} [data-theme],${base}[data-theme]`;
1335
- }
1336
-
1337
- // Like artboardScopeSelector but matches EVERY artboard except the pinned ones —
1338
- // backs the default-follow rule, which themes all un-pinned artboards in one
1339
- // declaration. Pinned ids are :not()-excluded so the per-screen pin rule never
1340
- // has to out-specify this global one (they target disjoint elements).
1341
- function globalArtboardScopeSelector(excludeIds: string[]): string {
1442
+ // Selector matching the content wrapper of EVERY artboard — where the DS theme block is re-established. Beats
1443
+ // `.<wrapper>[data-theme="…"]` because the injected <style> is appended after the DS stylesheet (later-wins on equal
1444
+ // specificity).
1445
+ function globalArtboardScopeSelector(): string {
1342
1446
  const { wrapperClass } = detectDsThemeSupport();
1343
- const not = excludeIds.map((id) => `:not([data-dc-screen="${cssEsc(id)}"])`).join('');
1344
- const base = `[data-dc-screen]${not}`;
1447
+ const base = '[data-dc-screen]';
1345
1448
  if (wrapperClass) {
1346
- const c = cssEsc(wrapperClass);
1347
- return `${base} .${c},${base}.${c}`;
1449
+ // `wrapperClass` can be a compound ("a b" = both classes on one element): one `.x` per class, never one escaped string
1450
+ const c = wrapperClass
1451
+ .split(/\s+/)
1452
+ .filter(Boolean)
1453
+ .map((t) => `.${cssEsc(t)}`)
1454
+ .join('');
1455
+ return `${base} ${c},${base}${c}`;
1348
1456
  }
1349
1457
  return `${base} [data-theme],${base}[data-theme]`;
1350
1458
  }
@@ -1357,51 +1465,16 @@ function rebuildArtboardThemeStyle(): void {
1357
1465
  el.id = 'dc-artboard-theme-css';
1358
1466
  document.head.appendChild(el);
1359
1467
  }
1360
- let css = '';
1361
- // (1) Default — every un-pinned artboard follows the chrome theme. Pinned
1362
- // artboards are :not()-excluded so this rule never competes with their
1363
- // per-screen rule below. When the DS doesn't define the chrome theme's tokens
1364
- // (collectThemeDeclarations → ''), nothing is emitted and the artboard keeps
1365
- // its native DS theme — there's no alternate palette to follow to.
1366
- const pinnedIds = [..._artboardPins.keys()];
1367
- const followDecls = collectThemeDeclarations(currentChromeTheme());
1368
- if (followDecls) css += `${globalArtboardScopeSelector(pinnedIds)}{${followDecls}}\n`;
1369
- // (2) Explicit per-artboard pins. 'ds' emits nothing (the :not() above already
1370
- // released that artboard back to its native DS theme); 'light' / 'dark'
1371
- // re-declare the chosen theme's tokens scoped to that one artboard.
1372
- for (const [screenId, pin] of _artboardPins) {
1373
- if (pin === 'ds') continue;
1374
- const decls = collectThemeDeclarations(pin);
1375
- if (decls) css += `${artboardScopeSelector(screenId)}{${decls}}\n`;
1376
- }
1377
- el.textContent = css;
1378
- }
1379
-
1380
- /** Current canvas-shell chrome theme (mirrors `data-maude-theme` on <html>). */
1381
- function currentChromeTheme(): 'light' | 'dark' {
1382
- if (typeof document === 'undefined') return 'dark';
1383
- return document.documentElement.dataset.maudeTheme === 'light' ? 'light' : 'dark';
1384
- }
1385
-
1386
- /**
1387
- * Pin a single artboard's theme (keyed by its stable `data-dc-screen` id), or
1388
- * clear the pin so it returns to the default — following the chrome theme.
1389
- * 'follow' → remove the pin (default: track the chrome theme toggle)
1390
- * 'ds' → pin to the design system's native theme (stop following)
1391
- * 'light' / 'dark' → pin to a fixed theme
1392
- */
1393
- function setArtboardTheme(screenId: string, mode: 'follow' | ArtboardPin): void {
1394
- if (mode === 'follow') _artboardPins.delete(screenId);
1395
- else _artboardPins.set(screenId, mode);
1396
- rebuildArtboardThemeStyle();
1468
+ // Every artboard shows the canvas's mode. When the DS doesn't define that mode's tokens
1469
+ // (collectThemeDeclarations → ''), nothing is emitted and the artboards keep their native DS theme — there's no
1470
+ // alternate palette to switch to (the pill greys the mode out in that case).
1471
+ const decls = collectThemeDeclarations(getCanvasTheme());
1472
+ el.textContent = decls ? `${globalArtboardScopeSelector()}{${decls}}\n` : '';
1397
1473
  }
1398
1474
 
1399
1475
  /**
1400
- * Re-theme every following artboard when the chrome theme flips. The
1401
- * default-follow rule in rebuildArtboardThemeStyle reads currentChromeTheme()
1402
- * live, so a plain rebuild re-points every un-pinned artboard at the new theme
1403
- * in one shot. Kept under the original name so the MutationObserver call site
1404
- * and the initial 'load' trigger stay untouched.
1476
+ * Re-theme every artboard when the canvas's mode flips (the pill, the app's ds-theme preview) or when the DS
1477
+ * stylesheet has finished loading. A plain rebuild re-points every artboard in one shot.
1405
1478
  */
1406
1479
  function applyArtboardFollowers(): void {
1407
1480
  rebuildArtboardThemeStyle();
@@ -1417,6 +1490,10 @@ function buildRegistry(deps: {
1417
1490
  distributeArtboards: (axis: 'x' | 'y') => void;
1418
1491
  alignArtboards: (mode: 'left' | 'right' | 'center-x' | 'top' | 'bottom' | 'center-y') => void;
1419
1492
  focusArtboard: (artboardId: string) => void;
1493
+ /** S2.6 — what the object menu's rows run (editing/object-actions.ts) */
1494
+ objectMenu: ObjectMenuDeps;
1495
+ /** S2.10 — what the artboard menu's rows run (editing/artboard-actions.ts) */
1496
+ artboardMenu: ArtboardMenuDeps;
1420
1497
  }): ContextRegistry {
1421
1498
  const { controller, clearSelection, selSet, distributeArtboards, alignArtboards, focusArtboard } =
1422
1499
  deps;
@@ -1449,16 +1526,17 @@ function buildRegistry(deps: {
1449
1526
  openCommentComposer(sel, target.clientX, target.clientY);
1450
1527
  };
1451
1528
 
1529
+ // P5 (F17) — the View menu's words and keys: view.zoom-fit "Zoom to fit ⌘0", view.zoom-actual "Actual size ⇧0".
1452
1530
  const fitItem: MenuItem = {
1453
1531
  id: 'fit-view',
1454
- label: 'Fit to view',
1455
- shortcut: '1',
1532
+ label: 'Zoom to fit',
1533
+ shortcut: '⌘0',
1456
1534
  onSelect: () => controller?.fit(),
1457
1535
  };
1458
1536
  const resetItem: MenuItem = {
1459
1537
  id: 'reset-view',
1460
- label: 'Reset view',
1461
- shortcut: '⌘0',
1538
+ label: 'Actual size',
1539
+ shortcut: '⇧0',
1462
1540
  onSelect: () => controller?.reset(),
1463
1541
  };
1464
1542
 
@@ -1466,72 +1544,25 @@ function buildRegistry(deps: {
1466
1544
  // event the dialog provider listens for; this avoids prop-drilling the
1467
1545
  // dialog handle through every menu callback. The scope arg prefills the
1468
1546
  // dialog's scope dropdown so the user lands on the right resolution.
1547
+ const openExportSheet = (scope?: string): void => {
1548
+ try {
1549
+ // S8.2 — the iframe's own export dialog is gone: the entry names a scope (none: the shell picks it from
1550
+ // the selection, the current canvas when nothing is selected) and the shell's one Export sheet opens
1551
+ // (the shell re-checks the frame before it acts, use-canvas-bridge).
1552
+ window.parent.postMessage({ dgn: 'open-export', detail: scope ? { scope } : {} }, '*');
1553
+ } catch {
1554
+ /* non-window environments */
1555
+ }
1556
+ };
1469
1557
  const exportItem = (id: string, label: string, scope: string, shortcut?: string): MenuItem => ({
1470
1558
  id,
1471
1559
  label,
1472
1560
  shortcut,
1473
- onSelect: () => {
1474
- try {
1475
- window.dispatchEvent(new CustomEvent('maude:open-export', { detail: { scope } }));
1476
- } catch {
1477
- /* non-window environments */
1478
- }
1479
- },
1561
+ onSelect: () => openExportSheet(scope),
1480
1562
  });
1481
1563
 
1482
- // Per-artboard theme PIN, keyed by the stable `data-dc-screen` id
1483
- // (target.artboardId) via an injected stylesheet (see setArtboardTheme).
1484
- // Following the chrome theme is the default; this submenu overrides it for one
1485
- // artboard. The DS-supports-both probe gates Light / Dark / "Follow chrome"
1486
- // (all no-ops on a single-theme DS); only "DS default" is always meaningful.
1487
- const themeSupport = detectDsThemeSupport();
1488
- const themeHint = 'This design system defines only one theme';
1489
- const themeItem: MenuItem = {
1490
- id: 'theme',
1491
- label: 'Theme',
1492
- onSelect: () => {
1493
- /* parent of a submenu — never invoked directly */
1494
- },
1495
- submenu: [
1496
- {
1497
- id: 'theme-ds-default',
1498
- label: 'DS default',
1499
- onSelect: (target) => {
1500
- if (target.artboardId) setArtboardTheme(target.artboardId, 'ds');
1501
- },
1502
- },
1503
- {
1504
- id: 'theme-light',
1505
- label: 'Light',
1506
- disabled: !themeSupport.supported,
1507
- disabledHint: themeHint,
1508
- onSelect: (target) => {
1509
- if (target.artboardId) setArtboardTheme(target.artboardId, 'light');
1510
- },
1511
- },
1512
- {
1513
- id: 'theme-dark',
1514
- label: 'Dark',
1515
- disabled: !themeSupport.supported,
1516
- disabledHint: themeHint,
1517
- onSelect: (target) => {
1518
- if (target.artboardId) setArtboardTheme(target.artboardId, 'dark');
1519
- },
1520
- },
1521
- {
1522
- id: 'theme-follow',
1523
- label: 'Follow chrome (default)',
1524
- disabled: !themeSupport.supported,
1525
- disabledHint: themeHint,
1526
- onSelect: (target) => {
1527
- if (target.artboardId) setArtboardTheme(target.artboardId, 'follow');
1528
- },
1529
- },
1530
- ],
1531
- };
1532
-
1533
1564
  // feature-1-artboard-kinds-foundation, T8 — kind-switch submenu, same
1534
- // shape as themeItem above (a parent-only MenuItem whose onSelect never
1565
+ // shape as kindItem below (a parent-only MenuItem whose onSelect never
1535
1566
  // fires). The write is main-origin-only (DDR-054): post to the parent
1536
1567
  // shell (dgn:'set-artboard-kind-request'), which calls
1537
1568
  // api.setArtboardKindOp and records undo — mirrors delete-artboard-request.
@@ -1897,6 +1928,12 @@ function buildRegistry(deps: {
1897
1928
  }
1898
1929
  await runSubtreeConvert(containerEl, containerId, artboardId);
1899
1930
  };
1931
+ // S2.11 — the registry action `layout.convert-to-absolute` (⌘K, Layout › Advanced) runs this same
1932
+ // function: editing/layout-actions.ts calls it through the window.
1933
+ if (typeof window !== 'undefined')
1934
+ (
1935
+ window as unknown as { __maudeConvertToAbsolute?: (el: HTMLElement) => Promise<void> }
1936
+ ).__maudeConvertToAbsolute = postConvertToAbsolute;
1900
1937
  // Artboard-level (context menu + kind switch).
1901
1938
  const postConvertArtboardToAbsolute = async (
1902
1939
  artboardId: string,
@@ -2116,11 +2153,19 @@ function buildRegistry(deps: {
2116
2153
  // Task L3 — main-origin source duplicate; post to the parent shell.
2117
2154
  onSelect: (target) => {
2118
2155
  if (!target.cdId) return;
2119
- try {
2120
- window.parent.postMessage({ dgn: 'duplicate-request', id: target.cdId }, '*');
2121
- } catch {
2122
- /* detached / cross-origin */
2123
- }
2156
+ const id = target.cdId;
2157
+ // r1 #15 (Michal) — the same as ⌘D: a placed object's copy lands +10 / +10, selected
2158
+ duplicateObject(
2159
+ target.el ?? null,
2160
+ () => {
2161
+ try {
2162
+ window.parent.postMessage({ dgn: 'duplicate-request', id }, '*');
2163
+ } catch {
2164
+ /* detached / cross-origin */
2165
+ }
2166
+ },
2167
+ (created) => selectWhenRendered(created, (s) => selSet.replace(s))
2168
+ );
2124
2169
  },
2125
2170
  },
2126
2171
  {
@@ -2245,7 +2290,7 @@ function buildRegistry(deps: {
2245
2290
  [
2246
2291
  // G7 — align commands. Six modes; gated on ≥ 2 selected artboards
2247
2292
  // (alignment is well-defined with 2). Primary surface is the
2248
- // MultiArtboardToolbar; menu entries are discoverability backup.
2293
+ // align bar; menu entries are discoverability backup.
2249
2294
  {
2250
2295
  id: 'align-left',
2251
2296
  label: 'Align left',
@@ -2285,7 +2330,7 @@ function buildRegistry(deps: {
2285
2330
  ],
2286
2331
  [
2287
2332
  // T24 — distribute commands. Primary surface is the floating
2288
- // MultiArtboardToolbar above the group bbox; the menu entries are
2333
+ // align bar above the group bbox; the menu entries are
2289
2334
  // a discoverability backup. Disabled when fewer than 3 artboards
2290
2335
  // are selected.
2291
2336
  {
@@ -2301,7 +2346,7 @@ function buildRegistry(deps: {
2301
2346
  onSelect: () => distributeArtboards('y'),
2302
2347
  },
2303
2348
  ],
2304
- [themeItem, kindItem, duplicateAtBreakpointItem],
2349
+ [kindItem, duplicateAtBreakpointItem],
2305
2350
  [
2306
2351
  {
2307
2352
  id: 'delete-artboard',
@@ -2326,26 +2371,23 @@ function buildRegistry(deps: {
2326
2371
  ],
2327
2372
  [exportItem('export-artboard', 'Export this artboard…', 'artboard')],
2328
2373
  ],
2329
- world: [
2330
- // issue-90 — right-click on empty canvas background (no artboard, no
2331
- // element) had no "Add comment" entry at all. Anchors at the click
2332
- // point, same as the comment tool's own floating-pin fallback.
2333
- [
2334
- {
2335
- id: 'add-comment',
2336
- label: 'Add comment',
2337
- shortcut: 'C',
2338
- onSelect: postComposeForTarget,
2339
- },
2340
- ],
2341
- [fitItem, resetItem],
2342
- [
2343
- exportItem('export-canvas', 'Export canvas as separate…', 'canvas-as-separate'),
2344
- exportItem('export-project', 'Export project (ZIP)…', 'project-raw'),
2345
- ],
2346
- ],
2374
+ // P5 (F17) — Add comment · Paste · Zoom to fit · Actual size · Export… (editing/world-menu.ts)
2375
+ world: worldMenuSections({
2376
+ addComment: postComposeForTarget,
2377
+ fit: () => controller?.fit(),
2378
+ actualSize: () => controller?.reset(),
2379
+ paste: deps.artboardMenu.paste,
2380
+ openExport: () => openExportSheet(),
2381
+ }),
2347
2382
  overlay: [],
2348
2383
  };
2384
+ // S2.6 — the v1 element rows above, laid out as the v2 object menu (editing/object-menu.tsx)
2385
+ registry.element = objectMenuSections(registry.element, deps.objectMenu);
2386
+ // S2.10 — the v1 artboard rows, laid out as the v2 artboard menu (editing/artboard-menu.tsx)
2387
+ registry['artboard-chrome'] = artboardMenuSections(
2388
+ registry['artboard-chrome'],
2389
+ deps.artboardMenu
2390
+ );
2349
2391
  return filterRegistryForReadOnly(registry);
2350
2392
  }
2351
2393
 
@@ -2367,6 +2409,7 @@ const READ_ONLY_MENU_IDS = new Set([
2367
2409
  'copy-style',
2368
2410
  'inspect',
2369
2411
  'select-layer',
2412
+ 'select-matching',
2370
2413
  'deselect',
2371
2414
  'export-selection',
2372
2415
  'export-artboard',
@@ -2379,7 +2422,17 @@ function filterRegistryForReadOnly(registry: ContextRegistry): ContextRegistry {
2379
2422
  const out = {} as ContextRegistry;
2380
2423
  for (const key of Object.keys(registry) as (keyof ContextRegistry)[]) {
2381
2424
  out[key] = registry[key]
2382
- .map((section) => section.filter((item) => READ_ONLY_MENU_IDS.has(item.id)))
2425
+ .map((section) =>
2426
+ section.flatMap((item) => {
2427
+ if (READ_ONLY_MENU_IDS.has(item.id)) return [item];
2428
+ // S2.6 — the object menu's Advanced ▸ holds read rows (Copy CSS, Inspect…): keep those
2429
+ if (item.id === 'advanced' && Array.isArray(item.submenu)) {
2430
+ const kept = item.submenu.filter((sub) => READ_ONLY_MENU_IDS.has(sub.id));
2431
+ return kept.length ? [{ ...item, submenu: kept }] : [];
2432
+ }
2433
+ return [];
2434
+ })
2435
+ )
2383
2436
  .filter((section) => section.length > 0);
2384
2437
  }
2385
2438
  return out;
@@ -2432,9 +2485,12 @@ export function revealAxisDelta(
2432
2485
  export function revealElementViaCamera(
2433
2486
  host: HTMLElement,
2434
2487
  target: HTMLElement,
2435
- controller: ViewportControllerHandle
2488
+ controller: ViewportControllerHandle,
2489
+ // V2-2.10 (V2-1.2 §5.6) — the view a reveal targets is the host minus the shell's occluded
2490
+ // insets; zero insets keep the whole host, exactly as before.
2491
+ insets: Readonly<Insets> = canvasInsets()
2436
2492
  ): void {
2437
- const hostRect = host.getBoundingClientRect();
2493
+ const hostRect = revealViewBox(host.getBoundingClientRect(), insets);
2438
2494
  const r = target.getBoundingClientRect();
2439
2495
  if (r.width <= 0 && r.height <= 0) return; // detached / display:none — nothing to reveal
2440
2496
  const dx = revealAxisDelta(r.left, r.right, hostRect.left, hostRect.right, REVEAL_MARGIN_PX);
@@ -2466,6 +2522,9 @@ function lockedKeySet(): Set<string> {
2466
2522
  * artboard body (same occurrence math the Layers rows use). */
2467
2523
  function isLockedElement(el: Element | null, cdId: string | null): boolean {
2468
2524
  if (!el || !cdId) return false;
2525
+ // S2.6 — the shared lock is the attribute in the TSX (V2-1.4 §5.5); the per-user key set below
2526
+ // only carries locks made before it, until V2-2.14 migrates them.
2527
+ if (el.hasAttribute('data-cd-locked')) return true;
2469
2528
  const locked = lockedKeySet();
2470
2529
  if (locked.size === 0) return false;
2471
2530
  const body = el.closest('.dc-artboard-body');
@@ -2528,6 +2587,7 @@ function CanvasRouter({
2528
2587
  const { tool, setTool, resetTool, clearSticky } = useToolMode();
2529
2588
  const selSet = useSelectionSet();
2530
2589
  const annotSel = useAnnotationSelection();
2590
+ usePresentSelection(selSet, annotSel); // S3.14 - no halo for the audience; back as left on the way out
2531
2591
  const ctxMenu = useContextMenu();
2532
2592
  const undoStack = useUndoStack();
2533
2593
  const undoSinks = useUndoSinks();
@@ -2535,6 +2595,17 @@ function CanvasRouter({
2535
2595
  // without making them a hook dependency — avoids re-binding on every undo op.
2536
2596
  const undoStackRef = useRef(undoStack);
2537
2597
  undoStackRef.current = undoStack;
2598
+ // S2.20b — ⌘Z / ⇧⌘Z from this canvas (its keys, or the shell's `run-action edit.undo`): after the
2599
+ // shell's pending writes settle, the op log's projection runs it — `undo-key` to the shell. The canvas
2600
+ // keeps no stack of its own (p8-v1-drop deleted the legacy one and its undo-mode state message).
2601
+ const canvasUndoKey = (redo: boolean) =>
2602
+ void afterShellRecords().then(() => {
2603
+ try {
2604
+ window.parent.postMessage({ dgn: 'undo-key', redo }, '*');
2605
+ } catch {
2606
+ /* detached */
2607
+ }
2608
+ });
2538
2609
  // Selection readback can refresh while the user is typing (e.g. the shell's
2539
2610
  // post-HMR halo restore). Keep the editor's lifetime tied to its host, not
2540
2611
  // the changing selection snapshot, or effect cleanup silently ends typing.
@@ -2663,9 +2734,11 @@ function CanvasRouter({
2663
2734
  };
2664
2735
  const overlays = w.__canvas_meta__?.overlays;
2665
2736
  if (!overlays) return;
2666
- const patch: { guides?: boolean; print?: boolean } = {};
2737
+ const patch: { guides?: boolean; print?: boolean; safeZones?: boolean } = {};
2667
2738
  if (overlays.guides === true) patch.guides = true;
2668
2739
  if (overlays.print === true) patch.print = true;
2740
+ // S7.22 — the one overlay that defaults to SHOWN; only an explicit false (the person turned it off) hides.
2741
+ if (overlays.safeZones === false) patch.safeZones = false;
2669
2742
  if (Object.keys(patch).length > 0) chromeCtx.setChrome(patch);
2670
2743
  }, [chromeCtx]);
2671
2744
 
@@ -2687,11 +2760,8 @@ function CanvasRouter({
2687
2760
  const clamp = (e: Event) => {
2688
2761
  const t = e.target;
2689
2762
  if (!(t instanceof HTMLElement)) return;
2690
- const isEngineClip =
2691
- t === host ||
2692
- t.classList.contains('dc-artboard-body') ||
2693
- t.classList.contains('dc-artboard');
2694
- if (!isEngineClip) return;
2763
+ // S3.15 (md-preview-combine) — Preview lets a web artboard's body scroll inside itself.
2764
+ if (!clampsEngineScroll(t, host, canvasModeStore(window).get().mode)) return;
2695
2765
  if (t.scrollLeft !== 0) t.scrollLeft = 0;
2696
2766
  if (t.scrollTop !== 0) t.scrollTop = 0;
2697
2767
  };
@@ -2751,13 +2821,83 @@ function CanvasRouter({
2751
2821
  const onMessage = (e: MessageEvent) => {
2752
2822
  const m = e.data as { dgn?: string } | null;
2753
2823
  if (!m || typeof m !== 'object' || !m.dgn) return;
2754
- if (m.dgn === 'force-clear' || m.dgn === 'select-clear' || m.dgn === 'selection-clear') {
2824
+ // V2-2.10 — the typed table's gate for every shell→canvas type this listener
2825
+ // handles (bridge/dgn-protocol.ts; the branches keep their own checks).
2826
+ if (!canvasMayHandle(e, window)) return;
2827
+ if (m.dgn === 'force-clear' || m.dgn === 'select-clear') {
2755
2828
  selSet.clear();
2756
2829
  annotSel.clear();
2757
2830
  setHoverEl(null);
2758
2831
  return;
2759
2832
  }
2833
+ // p8-sweep-leftovers — Menu › Edit › Paste: the shell read the clipboard (this frame may not) and
2834
+ // forwards it; replayed as a paste event so ⌘V's own listeners handle it. Only from the shell itself.
2835
+ if (m.dgn === 'paste-data') {
2836
+ if (e.source !== window.parent) return;
2837
+ const data = parsePasteData(m);
2838
+ if (data) dispatchPasteData(data, document);
2839
+ return;
2840
+ }
2841
+ // V2-1.3 §5.7 — the shell runs one of this listener's canvas actions:
2842
+ // `{dgn:'run-action', v:1, id, params?}`, only from the shell itself
2843
+ // (`e.source === window.parent` — a sibling canvas must not undo or move the
2844
+ // active one, V2-2.8 S1). Replaces the `undo` / `redo` / `zoom` /
2845
+ // `selection-clear` lanes (V2-2.4); `select.all-annotations` is
2846
+ // annotations-layer's.
2847
+ if (m.dgn === 'run-action') {
2848
+ if (e.source !== window.parent || (m as { v?: unknown }).v !== 1) return;
2849
+ const { id, params } = m as { id?: unknown; params?: { id?: unknown } };
2850
+ if (id === 'select.none') {
2851
+ selSet.clear();
2852
+ annotSel.clear();
2853
+ setHoverEl(null);
2854
+ } else if (id === 'edit.undo' || id === 'edit.redo') {
2855
+ // Plan C — Edit menu (shell) bridges to the in-canvas undo stack. S2.20b — on the op log
2856
+ // the iframe keeps no stack: the key goes back to the shell's projection.
2857
+ canvasUndoKey(id === 'edit.redo');
2858
+ } else if (
2859
+ id === 'tool.key' &&
2860
+ (params as { key?: unknown } | undefined)?.key === 'L' &&
2861
+ canvasModeStore(window).get().mode === 'present'
2862
+ ) {
2863
+ // S3.14 (G7) - L in Present is the Pointer's, and present/pointer-dot.tsx hears this very message
2864
+ // itself: replaying the key as well toggled the dot on and straight off again.
2865
+ } else if (replayToolKey(id, params)) {
2866
+ // V2-4.5b — a toolbar key pressed with the shell focused; the router decides.
2867
+ } else if (drawToolOfAction(id)) {
2868
+ // S2.13 — ⌘K / the menu arm a drag tool (Line · Ellipse · Polygon · Export area have no key)
2869
+ setTool(drawToolOfAction(id) as never);
2870
+ } else if (replayActionKey(id)) {
2871
+ // V2-4.2 — Select all / Copy properties / Paste properties from the project menu: the
2872
+ // canvas replays the action's own chord, so the key handler is the one implementation.
2873
+ } else if (zoomController) {
2874
+ // Shell View-menu zoom items — route to the live viewport controller
2875
+ // (the same methods the in-canvas zoom pill calls).
2876
+ if (id === 'view.zoom-in') zoomController.zoomIn();
2877
+ else if (id === 'view.zoom-out') zoomController.zoomOut();
2878
+ else if (id === 'view.zoom-fit') zoomController.fit();
2879
+ else if (id === 'view.zoom-actual') zoomController.reset();
2880
+ else if (id === 'view.zoom-to-artboard') {
2881
+ // DDR-247 — the embed view's `&artboard=<id>`: frame one artboard,
2882
+ // found by its `data-dc-screen` id through the same world-coordinate
2883
+ // manifest the whiteboard toolkit reads. Unknown id ⇒ nothing moves.
2884
+ const aid = params?.id;
2885
+ const rect =
2886
+ typeof aid === 'string'
2887
+ ? window.__maudeCanvasRects?.().artboards.find((a) => a.id === aid)
2888
+ : undefined;
2889
+ if (rect) zoomController.jumpTo(rect);
2890
+ }
2891
+ }
2892
+ return;
2893
+ }
2894
+ // V2-2.8 S1 — `tool-set`, `locked-set` and `select-by-id` are honoured only
2895
+ // from the shell itself (`e.source === window.parent`, run-action's gate): a
2896
+ // sibling canvas frame (same canvasOrigin, reachable via `parent.frames`,
2897
+ // DDR-054 untrusted) must not arm a tool, rewrite the locked set or move
2898
+ // the selection (and camera) of the active canvas.
2760
2899
  if (m.dgn === 'tool-set') {
2900
+ if (e.source !== window.parent) return;
2761
2901
  const t = (m as { tool?: string }).tool;
2762
2902
  if (typeof t === 'string') setTool(t as never);
2763
2903
  return;
@@ -2831,6 +2971,7 @@ function CanvasRouter({
2831
2971
  }
2832
2972
  // feature-4 T7b — live locked-layer set from the shell's Layers panel.
2833
2973
  if (m.dgn === 'locked-set') {
2974
+ if (e.source !== window.parent) return;
2834
2975
  const arr = (m as { locked?: unknown }).locked;
2835
2976
  if (Array.isArray(arr)) {
2836
2977
  const s = lockedKeySet();
@@ -2839,21 +2980,13 @@ function CanvasRouter({
2839
2980
  }
2840
2981
  return;
2841
2982
  }
2842
- // Plan C — Edit menu (shell) bridges to the in-canvas undo stack.
2843
- if (m.dgn === 'undo') {
2844
- void afterShellRecords().then(() => undoStackRef.current.undo());
2845
- return;
2846
- }
2847
- if (m.dgn === 'redo') {
2848
- void afterShellRecords().then(() => undoStackRef.current.redo());
2849
- return;
2850
- }
2851
2983
  // Phase 12 Task 4 (DDR-103) — Layers-tree round-trip. select-by-id resolves
2852
2984
  // the node + replaces the selection (which posts select-set back, updating
2853
2985
  // the Inspect/CSS tabs + halos); highlight shows the transient hover halo;
2854
2986
  // request-layers re-walks + posts the tree for an artboard.
2855
2987
  if (m.dgn === 'select-by-id') {
2856
- const mm = m as { id?: string; artboardId?: string | null; index?: number };
2988
+ if (e.source !== window.parent) return; // V2-2.8 S1 (see tool-set above)
2989
+ const mm = m as { id?: string; artboardId?: string | null; index?: number; add?: boolean };
2857
2990
  // Dogfood follow-up — a bare ARTBOARD selection (no data-cd-id, the
2858
2991
  // ArtboardKnobs panel's own case) has no `mm.id` to resolve by, so
2859
2992
  // the element branch below never ran for it: after a structural
@@ -2885,13 +3018,19 @@ function CanvasRouter({
2885
3018
  one.id === mm.id &&
2886
3019
  (mm.index == null || one.index == null || one.index === mm.index)
2887
3020
  : !!one && !one.id && one.artboardId === (mm.artboardId ?? null);
2888
- selSet.replace(
2889
- hoverTargetToSelection({
2890
- el: target,
2891
- cdId: mm.id,
2892
- artboardId: mm.artboardId ?? null,
2893
- } as HoverTarget)
2894
- );
3021
+ const picked = hoverTargetToSelection({
3022
+ el: target,
3023
+ cdId: mm.id,
3024
+ artboardId: mm.artboardId ?? null,
3025
+ } as HoverTarget);
3026
+ // P8 round 7 (12 · ia-placed) — `add` grows the selection (the photos a place made, as one group)
3027
+ // r2-first-canvas-inspector — the shell sends back what IT holds; a pick made here that it has not heard
3028
+ // yet (inside the post's debounce) wins, or a restore rung undid a ⌘-click (use-selection-set.tsx).
3029
+ const applied =
3030
+ mm.add && mm.id && !sameSelection
3031
+ ? selSet.addFromShell(picked)
3032
+ : selSet.replaceFromShell(picked);
3033
+ if (!applied) return;
2895
3034
  // Task A1 — reveal THROUGH the camera, not host scroll. The old
2896
3035
  // `scrollIntoView` scrolled the overflow:hidden `.dc-canvas` /
2897
3036
  // `.dc-artboard-body` clip layers, desyncing the `.dc-world`
@@ -2904,6 +3043,72 @@ function CanvasRouter({
2904
3043
  }
2905
3044
  return;
2906
3045
  }
3046
+ // S11.9 — Layers › Advanced › Select by selector. The selector is typed in the shell; the match is
3047
+ // scoped to the artboards and capped (selector-scope.js), so a planted `*` cannot select the page.
3048
+ if (m.dgn === 'select-by-selector') {
3049
+ if (e.source !== window.parent) return;
3050
+ const found = scopedMatches(document, (m as { selector?: unknown }).selector as string);
3051
+ if (found.ok && found.els.length > 0) {
3052
+ selSet.replace(
3053
+ found.els.map((el) =>
3054
+ hoverTargetToSelection({
3055
+ el,
3056
+ cdId: el.getAttribute('data-cd-id') ?? undefined,
3057
+ artboardId: el.closest('[data-dc-screen]')?.getAttribute('data-dc-screen') ?? null,
3058
+ } as HoverTarget)
3059
+ )
3060
+ );
3061
+ }
3062
+ return;
3063
+ }
3064
+ // S1.3 L1 (A6c) — the jump list's / Compare's camera move: glide (or cut, under reduced motion or
3065
+ // `glide: false`) to one artboard and flash it. Parent-only like select-by-id: a sibling canvas
3066
+ // frame must not move this camera. An unknown id moves nothing.
3067
+ // V2-8.5 c7 (15 an-stk-gallery, 04 md-edit-image) - which shell panel is open, so the dock's Stickers / Image slot
3068
+ // presses. Parent-only; two words or null, anything else is ignored.
3069
+ if (m.dgn === 'shell-panels') {
3070
+ if (e.source !== window.parent) return;
3071
+ const open = (m as { open?: unknown }).open;
3072
+ setShellPanelOpen(
3073
+ open === 'stickers' || open === 'assets' || open === 'components' ? open : null
3074
+ );
3075
+ return;
3076
+ }
3077
+ // V2-8.5 c7 (08 ak-convert-after) — the two marks after "Make A6 print". Parent-only, like the rest of this block:
3078
+ // a sibling canvas frame must not paint marks on this canvas. The strings are built here from the facts.
3079
+ if (m.dgn === 'convert-marks') {
3080
+ if (e.source !== window.parent) return;
3081
+ const mm = m as { from?: unknown; to?: unknown; extraPct?: unknown; fill?: unknown };
3082
+ if (typeof mm.from !== 'string' || typeof mm.to !== 'string') return;
3083
+ setConvertMarks({
3084
+ from: mm.from,
3085
+ to: mm.to,
3086
+ extraPct: typeof mm.extraPct === 'number' && mm.extraPct > 0 ? mm.extraPct : 0,
3087
+ fill: typeof mm.fill === 'string' && mm.fill ? mm.fill : null,
3088
+ });
3089
+ return;
3090
+ }
3091
+ if (m.dgn === 'reveal-artboard') {
3092
+ if (e.source !== window.parent) return;
3093
+ const mm = m as { artboardId?: unknown; glide?: unknown; flash?: unknown };
3094
+ if (typeof mm.artboardId !== 'string' || !mm.artboardId) return;
3095
+ const aid = mm.artboardId;
3096
+ const board = document.querySelector<HTMLElement>(`[data-dc-screen="${CSS.escape(aid)}"]`);
3097
+ if (!board) return;
3098
+ const rect = window.__maudeCanvasRects?.().artboards.find((a) => a.id === aid);
3099
+ const host = hostRef.current;
3100
+ if (rect && zoomController) {
3101
+ if (mm.glide === true || !host) zoomController.jumpTo(rect);
3102
+ else zoomController.animateTo(fitRectIntoHost(rect, host), 0);
3103
+ }
3104
+ if (mm.flash === true) {
3105
+ board.classList.remove('dc-reveal-flash');
3106
+ void board.offsetWidth; // restart the ring when the same board is revealed twice
3107
+ board.classList.add('dc-reveal-flash');
3108
+ window.setTimeout(() => board.classList.remove('dc-reveal-flash'), 900);
3109
+ }
3110
+ return;
3111
+ }
2907
3112
  if (m.dgn === 'highlight') {
2908
3113
  const mm = m as { id?: string; artboardId?: string | null; index?: number };
2909
3114
  setHoverEl(
@@ -2967,6 +3172,10 @@ function CanvasRouter({
2967
3172
  if (e.source !== window.parent) return;
2968
3173
  const p = (m as { payload?: Partial<EditSourcePayload> & { seq?: number; label?: string } })
2969
3174
  .payload;
3175
+ // S2.2b / S2.10b / S7.6 — a landed edit-op the SHELL made (the inspector's Element id rename,
3176
+ // ⌫ Move to trash, a Timeline clip verb) is a kernel action: it undoes through the op log, so
3177
+ // the canvas records nothing (the legacy `revert {writeId}` record went with p8-v1-drop).
3178
+ if (p && (p as { op?: string }).op === 'edit-op') return;
2970
3179
  // Phase 12.1 — a landed reorder (drag / keyboard move). The shell POSTed
2971
3180
  // /_api/reorder already; record so Cmd+Z reverts via the server's log.
2972
3181
  if (p && (p as { op?: string }).op === 'reorder') {
@@ -3016,27 +3225,6 @@ function CanvasRouter({
3016
3225
  }
3017
3226
  return;
3018
3227
  }
3019
- // Shell View-menu zoom items — route to the live viewport controller
3020
- // (the same methods the in-canvas zoom pill calls).
3021
- if (m.dgn === 'zoom' && zoomController) {
3022
- const op = (m as { op?: string }).op;
3023
- if (op === 'in') zoomController.zoomIn();
3024
- else if (op === 'out') zoomController.zoomOut();
3025
- else if (op === 'fit') zoomController.fit();
3026
- else if (op === 'actual') zoomController.reset();
3027
- else if (op === 'artboard') {
3028
- // DDR-247 — the embed view's `&artboard=<id>`: frame one artboard,
3029
- // found by its `data-dc-screen` id through the same world-coordinate
3030
- // manifest the whiteboard toolkit reads. Unknown id ⇒ nothing moves.
3031
- const id = (m as { id?: unknown }).id;
3032
- const rect =
3033
- typeof id === 'string'
3034
- ? window.__maudeCanvasRects?.().artboards.find((a) => a.id === id)
3035
- : undefined;
3036
- if (rect) zoomController.jumpTo(rect);
3037
- }
3038
- return;
3039
- }
3040
3228
  // Shell View-menu chrome toggles + Presentation Mode. Only the fields the
3041
3229
  // shell sends are merged, so a `{ present: true }` enter keeps the user's
3042
3230
  // individual minimap/zoom toggles for the eventual exit. `guides` (T6) is
@@ -3050,6 +3238,8 @@ function CanvasRouter({
3050
3238
  present?: boolean;
3051
3239
  guides?: boolean;
3052
3240
  print?: boolean;
3241
+ safeZones?: boolean;
3242
+ zen?: boolean;
3053
3243
  };
3054
3244
  const patch: {
3055
3245
  minimap?: boolean;
@@ -3057,7 +3247,11 @@ function CanvasRouter({
3057
3247
  present?: boolean;
3058
3248
  guides?: boolean;
3059
3249
  print?: boolean;
3250
+ safeZones?: boolean;
3251
+ zen?: boolean;
3060
3252
  } = {};
3253
+ // P8 C8 (01 cf-open-big) - the panels are hidden: the toolbar folds to its current tool. Shell-driven.
3254
+ if (typeof mm.zen === 'boolean') patch.zen = mm.zen;
3061
3255
  if (typeof mm.minimap === 'boolean') patch.minimap = mm.minimap;
3062
3256
  if (typeof mm.zoom === 'boolean') patch.zoom = mm.zoom;
3063
3257
  if (typeof mm.present === 'boolean') patch.present = mm.present;
@@ -3065,6 +3259,8 @@ function CanvasRouter({
3065
3259
  // feature-2-print-artboards T3 — "Show print guides" (bleed/trim/
3066
3260
  // margin overlay). Same per-canvas-persisted shape as `guides`.
3067
3261
  if (typeof mm.print === 'boolean') patch.print = mm.print;
3262
+ // S7.22 — "Show on canvas" on the Safe zones row; mirrored below like guides/print.
3263
+ if (typeof mm.safeZones === 'boolean') patch.safeZones = mm.safeZones;
3068
3264
  // Dogfood follow-up — mirror `guides`/`print` into the in-iframe
3069
3265
  // `window.__canvas_meta__.overlays` snapshot, exactly like the
3070
3266
  // existing viewport/layout mirror in canvas-lib.tsx's onSettle (DDR-
@@ -3078,7 +3274,11 @@ function CanvasRouter({
3078
3274
  // guide back to hidden even though the View-menu checkbox still
3079
3275
  // shows it checked. Same class of bug DDR-138 fixed for the camera;
3080
3276
  // this is its `overlays` counterpart.
3081
- if (patch.guides !== undefined || patch.print !== undefined) {
3277
+ if (
3278
+ patch.guides !== undefined ||
3279
+ patch.print !== undefined ||
3280
+ patch.safeZones !== undefined
3281
+ ) {
3082
3282
  const w = window as unknown as {
3083
3283
  __canvas_meta__?: { overlays?: Record<string, boolean> };
3084
3284
  };
@@ -3087,6 +3287,7 @@ function CanvasRouter({
3087
3287
  ...w.__canvas_meta__.overlays,
3088
3288
  ...(patch.guides !== undefined ? { guides: patch.guides } : {}),
3089
3289
  ...(patch.print !== undefined ? { print: patch.print } : {}),
3290
+ ...(patch.safeZones !== undefined ? { safeZones: patch.safeZones } : {}),
3090
3291
  };
3091
3292
  }
3092
3293
  }
@@ -3110,6 +3311,9 @@ function CanvasRouter({
3110
3311
  if (!host) return;
3111
3312
  let editing: HTMLElement | null = null;
3112
3313
  let original = '';
3314
+ // r2-text-tool — a text the Text tool has just made: esc keeps what was typed (there is nothing of yours to
3315
+ // restore; restoring would put back the placeholder "Text"). Any other text: esc restores, as before.
3316
+ let escKeeps = false;
3113
3317
  // Unified custom blinking caret (text-caret.ts) — mounted for the whole
3114
3318
  // edit session, disposed in teardown. Hides the native caret while up.
3115
3319
  let caretDispose: (() => void) | null = null;
@@ -3122,7 +3326,7 @@ function CanvasRouter({
3122
3326
  const onKey = (e: KeyboardEvent): void => {
3123
3327
  if (e.key === 'Escape') {
3124
3328
  e.preventDefault();
3125
- commitEdit(false);
3329
+ commitEdit(escKeeps);
3126
3330
  } else if (e.key === 'Enter' && !e.shiftKey) {
3127
3331
  e.preventDefault();
3128
3332
  (e.currentTarget as HTMLElement | null)?.blur?.();
@@ -3161,40 +3365,57 @@ function CanvasRouter({
3161
3365
  } catch {
3162
3366
  /* querySelectorAll/CSS.escape unavailable — occurrence stays 0 */
3163
3367
  }
3164
- try {
3165
- window.parent.postMessage(
3166
- { dgn: 'edit-text', id: cdId, file, text, occurrence, before: original.trim() },
3167
- '*'
3368
+ // S2.12 — the copy goes as ONE edit-op (`text.set`: one write, one undo step, Czech ties when the
3369
+ // text is Czech). A studio that has no `text.set` (an older build) takes the legacy post below.
3370
+ const original0 = original;
3371
+ const legacy = (): void => {
3372
+ try {
3373
+ window.parent.postMessage(
3374
+ { dgn: 'edit-text', id: cdId, file, text, occurrence, before: original0.trim() },
3375
+ '*'
3376
+ );
3377
+ } catch {
3378
+ /* detached / cross-origin */
3379
+ }
3380
+ // Stash the optimistic edit so a shell rejection can revert it (DDR-150 P1).
3381
+ lastTextCommit = { el: elx, original: original0 };
3382
+ // Record onto the in-canvas undo stack so Cmd+Z reverts the rewrite. The
3383
+ // edit already posted above (record, don't re-run do()). before/after are
3384
+ // the trimmed bodies the edit-text endpoint persists.
3385
+ //
3386
+ // ONLY the record is gated on `file`. An earlier version of this guard
3387
+ // sat above the `postMessage` and returned out of the whole function —
3388
+ // which silently dropped THE EDIT ITSELF, not just an unusable undo
3389
+ // entry. `deriveFile` returning undefined must not cost the user their
3390
+ // typing; it costs them only a Cmd+Z step they could not have applied
3391
+ // anyway (a record with no canvas is one undo can never target).
3392
+ if (!file) return;
3393
+ undoStackRef.current.record(
3394
+ buildEditSourceRecord({
3395
+ op: 'text',
3396
+ canvas: file,
3397
+ id: cdId,
3398
+ key: '',
3399
+ before: original0.trim(),
3400
+ after: text,
3401
+ // Carry the occurrence so undo/redo can re-target a `{variable}` edit
3402
+ // (the .map()/component-prop resolution needs it — canvas-edit.ts).
3403
+ occurrence,
3404
+ })
3168
3405
  );
3169
- } catch {
3170
- /* detached / cross-origin */
3171
- }
3172
- // Stash the optimistic edit so a shell rejection can revert it (DDR-150 P1).
3173
- lastTextCommit = { el: elx, original };
3174
- // Record onto the in-canvas undo stack so Cmd+Z reverts the rewrite. The
3175
- // edit already posted above (record, don't re-run do()). before/after are
3176
- // the trimmed bodies the edit-text endpoint persists.
3177
- //
3178
- // ONLY the record is gated on `file`. An earlier version of this guard
3179
- // sat above the `postMessage` and returned out of the whole function —
3180
- // which silently dropped THE EDIT ITSELF, not just an unusable undo
3181
- // entry. `deriveFile` returning undefined must not cost the user their
3182
- // typing; it costs them only a Cmd+Z step they could not have applied
3183
- // anyway (a record with no canvas is one undo can never target).
3184
- if (!file) return;
3185
- undoStackRef.current.record(
3186
- buildEditSourceRecord({
3187
- op: 'text',
3188
- canvas: file,
3189
- id: cdId,
3190
- key: '',
3191
- before: original.trim(),
3192
- after: text,
3193
- // Carry the occurrence so undo/redo can re-target a `{variable}` edit
3194
- // (the .map()/component-prop resolution needs it — canvas-edit.ts).
3195
- occurrence,
3196
- })
3197
- );
3406
+ };
3407
+ void commitTextInPlace(
3408
+ { el: elx, text, before: original0.trim() },
3409
+ {
3410
+ ...textOpDeps.current,
3411
+ record: (rec) => undoStackRef.current.record(rec),
3412
+ revert: () => {
3413
+ elx.textContent = original0;
3414
+ },
3415
+ }
3416
+ ).then((handled) => {
3417
+ if (!handled) legacy();
3418
+ });
3198
3419
  }
3199
3420
  // Enter contenteditable edit mode on a leaf-text `stamped` element, caret
3200
3421
  // placed at (clientX, clientY) rather than a full select-all (that used to
@@ -3210,15 +3431,23 @@ function CanvasRouter({
3210
3431
  stamped: HTMLElement,
3211
3432
  clientX: number,
3212
3433
  clientY: number,
3213
- opts?: { selectAll?: boolean }
3434
+ opts?: { selectAll?: boolean; escKeeps?: boolean }
3214
3435
  ): void {
3215
3436
  if (editing) return;
3216
3437
  // Cloud Phase 25 C2 — inline text edit is a source write; a read-only
3217
3438
  // canvas never enters edit mode (one gate for BOTH entry points: the
3218
3439
  // dblclick drill and the annotation Text-tool click-through).
3219
3440
  if (isReadOnlyCanvas()) return;
3441
+ // p8-lock-reasons — a shared-locked text refuses the save (409 locked): the caret never opens on it, and
3442
+ // the lock line says why (one gate for the dblclick and the ↵ / Text-tool entry)
3443
+ const lockedLine = lockedTextLine(stamped);
3444
+ if (lockedLine) {
3445
+ textOpDeps.current.toast?.(lockedLine, 'info');
3446
+ return;
3447
+ }
3220
3448
  editing = stamped;
3221
3449
  original = stamped.textContent ?? '';
3450
+ escKeeps = opts?.escKeeps === true;
3222
3451
  stamped.setAttribute('contenteditable', 'plaintext-only');
3223
3452
  stamped.classList.add('dc-text-editing');
3224
3453
  stamped.addEventListener('blur', onBlur, true);
@@ -3250,7 +3479,7 @@ function CanvasRouter({
3250
3479
  if (editing) return;
3251
3480
  // feature-4 — browse is a pure pass-through: no drill-select, no inline
3252
3481
  // text-edit. The mock owns its own double-clicks. Press V to edit.
3253
- if (dblToolRef.current === 'browse') return;
3482
+ if (dblToolRef.current === 'browse' || dblToolRef.current === 'inspect') return;
3254
3483
  const t = e.target as HTMLElement | null;
3255
3484
  const stamped = (t?.closest?.('[data-cd-id]') as HTMLElement | null) ?? null;
3256
3485
  if (!stamped) return;
@@ -3271,7 +3500,8 @@ function CanvasRouter({
3271
3500
  // progressively deeper; the chain's last rung is the clicked element
3272
3501
  // itself); default to the outermost rung when nothing in the chain is
3273
3502
  // currently selected.
3274
- const chain = stampedChainToBody(stamped);
3503
+ // V2-8.5 round 3 — the page root is the artboard, so the ladder starts one rung below it.
3504
+ const chain = dropPageRoot(stampedChainToBody(stamped));
3275
3505
  if (chain.length > 0) {
3276
3506
  const curIdx = currentId
3277
3507
  ? chain.findIndex((n) => n.getAttribute('data-cd-id') === currentId)
@@ -3316,10 +3546,21 @@ function CanvasRouter({
3316
3546
  // `[data-cd-id]` element; canvas-shell owns the DOM/contentEditable side
3317
3547
  // of editing, so it's the one that must act on it.
3318
3548
  const onEnterTextEdit = (e: Event): void => {
3319
- const detail = (e as CustomEvent<{ el?: HTMLElement; clientX?: number; clientY?: number }>)
3320
- .detail;
3549
+ const detail = (
3550
+ e as CustomEvent<{
3551
+ el?: HTMLElement;
3552
+ clientX?: number;
3553
+ clientY?: number;
3554
+ selectAll?: boolean;
3555
+ escKeeps?: boolean;
3556
+ }>
3557
+ ).detail;
3321
3558
  if (!detail?.el || !host.contains(detail.el)) return;
3322
- enterEditModeAt(detail.el, detail.clientX ?? 0, detail.clientY ?? 0);
3559
+ // V2-8.7 — ↵ on a selected text arrives with selectAll (the keyboard door has no caret point)
3560
+ enterEditModeAt(detail.el, detail.clientX ?? 0, detail.clientY ?? 0, {
3561
+ selectAll: detail.selectAll === true,
3562
+ escKeeps: detail.escKeeps === true,
3563
+ });
3323
3564
  };
3324
3565
  // The shell rejected the last inline text edit — revert the optimistic
3325
3566
  // contenteditable text so the canvas reflects the true (unsaved) source
@@ -3380,14 +3621,22 @@ function CanvasRouter({
3380
3621
  // it actually captured something.
3381
3622
  return;
3382
3623
  }
3383
- // feature-4 T7b — a locked layer can't be selected from the canvas
3384
- // (the Layers panel row still can, so it stays reachable to unlock).
3385
- if (isLockedElement(target.el, target.cdId)) return;
3624
+ // feature-4 T7b + S2.1 — a click on a locked object selects its nearest unlocked parent
3625
+ // (or the artboard); the Layers row still selects the object itself, so it stays
3626
+ // reachable to unlock. The lock is the shared `data-cd-locked` (V2-1.4) or the v1 key.
3627
+ const lockedAt = (el: Element) =>
3628
+ isLockedDom(el) || isLockedElement(el, el.getAttribute('data-cd-id'));
3629
+ if (target.el && lockedAt(target.el)) {
3630
+ const up = lockedClickSelection(target.el, lockedAt);
3631
+ if (up) selSet.replace(up);
3632
+ return;
3633
+ }
3386
3634
  // feature-4 escape hatch (user steer 2026-07-19) — a Cmd+click select
3387
3635
  // from BROWSE means "I want to edit now": flip to the Move (select)
3388
3636
  // tool so the follow-up gestures (drag, dblclick drill, keyboard)
3389
3637
  // work without a separate V press.
3390
- if (tool === 'browse') setTool('move');
3638
+ // S3.11 — only on a canvas no shell governs: in a governed Preview ⌘-click INSPECTS (↵ asks for Edit).
3639
+ if (shouldFlipToMove(tool, canvasModeStore(window).get().mode)) setTool('move');
3391
3640
  // feature-4 dogfood fix (2026-07-19) — Figma's "entered group" context:
3392
3641
  // a bare (top-mode) click INSIDE the currently selected element keeps
3393
3642
  // that selection instead of resetting to the top-level ancestor.
@@ -3413,7 +3662,15 @@ function CanvasRouter({
3413
3662
  }
3414
3663
  }
3415
3664
  }
3416
- const sel = hoverTargetToSelection(target);
3665
+ let sel = hoverTargetToSelection(target);
3666
+ // S3.11 — an inspection carries the gap to its nearest sibling for the Inspect panel's rows
3667
+ // S3.15 — and is MARKED `inspected`: the shell opens the panel for that selection only, never for one
3668
+ // made in Edit and carried into Preview (04 md-model).
3669
+ sel = inspectedSelection(sel, canvasModeStore(window).get().mode, tool);
3670
+ if ((sel as { inspected?: boolean }).inspected) {
3671
+ const neighbour = measureNeighbour(target.el);
3672
+ if (neighbour) sel = { ...sel, neighbour } as typeof sel;
3673
+ }
3417
3674
  if (mode === 'replace') selSet.replace(sel);
3418
3675
  else selSet.add(sel);
3419
3676
  // Phase 12 Task 4 — refresh the Layers tree for the selected artboard.
@@ -3430,31 +3687,72 @@ function CanvasRouter({
3430
3687
  clientX,
3431
3688
  clientY,
3432
3689
  };
3690
+ // P8 C3 (14 ed-ab-menu / ed-obj-order): the artboard or object you right-clicked is the selection under its
3691
+ // menu (chip + handles), unless it already is part of it - then the menu acts on the whole selection.
3692
+ if (
3693
+ target &&
3694
+ (kind === 'element' || kind === 'artboard-chrome') &&
3695
+ !isReadOnlyCanvas() &&
3696
+ modeShows(canvasModeStore(window).get().mode, 'object-tools')
3697
+ ) {
3698
+ const sel = hoverTargetToSelection(target);
3699
+ const same = (a: { selector: string; index?: number }) =>
3700
+ a.selector === sel.selector && (a.index ?? 0) === (sel.index ?? 0);
3701
+ if (!selSet.selected.some(same)) {
3702
+ selSet.replace(sel);
3703
+ postLayersTree(target.artboardId);
3704
+ }
3705
+ }
3433
3706
  ctxMenu.open(ctxTarget);
3434
3707
  },
3435
3708
  onTool: ({ tool: t }) => setTool(t),
3436
- onUndo: () => {
3437
- void afterShellRecords().then(() => undoStackRef.current.undo());
3438
- },
3439
- onRedo: () => {
3440
- void afterShellRecords().then(() => undoStackRef.current.redo());
3441
- },
3709
+ onUndo: () => canvasUndoKey(false),
3710
+ onRedo: () => canvasUndoKey(true),
3442
3711
  onEscape: () => {
3443
- // T21 — abort any mid-stroke draw FIRST. The annotations layer
3444
- // listens for `maude:cancel-stroke` and drops the in-progress
3445
- // shape without committing.
3712
+ const governed = canvasModeStore(window).get().mode;
3713
+ if (governed) {
3714
+ // S3.12 — a governed canvas takes ONE rung per press (bridge/esc-ladder.ts, 04 md-esc): a cleared
3715
+ // selection, a left tool or a set-down stroke is the step; the mode steps back only when none applied.
3716
+ const outcome = runEscRung(governed, tool, {
3717
+ stroke: () => {
3718
+ // T21 — abort any mid-stroke draw. The annotations layer listens for `maude:cancel-stroke`,
3719
+ // drops the in-progress shape without committing, and marks the event when it did.
3720
+ const detail = { cancelled: false };
3721
+ try {
3722
+ document.dispatchEvent(new CustomEvent('maude:cancel-stroke', { detail }));
3723
+ } catch {
3724
+ /* non-DOM env */
3725
+ }
3726
+ return detail.cancelled;
3727
+ },
3728
+ selection: () => {
3729
+ if (selSet.selected.length === 0 && annotSel.selectedIds.length === 0) return false;
3730
+ // S2.1 — `object.step-out`, esc's selection rung: one level up; at the top, deselect.
3731
+ // S3.15 — an inspection (Preview, Viewing) has no level to step to: esc clears it (md-esc).
3732
+ if (escClearsSelection(governed) || !stepOut(selSet)) selSet.clear();
3733
+ annotSel.clear();
3734
+ return true;
3735
+ },
3736
+ tool: () => {
3737
+ // T19 — clear the sticky-tool lock and flip back to the mode's resting tool.
3738
+ clearSticky();
3739
+ resetTool();
3740
+ return true;
3741
+ },
3742
+ });
3743
+ setHoverEl(null);
3744
+ return outcome !== 'back' && outcome !== 'stay';
3745
+ }
3746
+ // An ungoverned canvas (no shell yet): v1's single-press ladder, byte for byte.
3446
3747
  try {
3447
3748
  document.dispatchEvent(new CustomEvent('maude:cancel-stroke'));
3448
3749
  } catch {
3449
3750
  /* non-DOM env */
3450
3751
  }
3451
- // T19 — clear sticky-tool lock + flip back to the mode's resting tool
3452
- // (DDR-223: move in edit, browse in preview). Esc is the canonical
3453
- // "back to default state" gesture across canvas apps.
3454
3752
  clearSticky();
3455
3753
  resetTool();
3456
3754
  ctxMenu.close();
3457
- selSet.clear();
3755
+ if (!stepOut(selSet)) selSet.clear();
3458
3756
  annotSel.clear();
3459
3757
  setHoverEl(null);
3460
3758
  },
@@ -3477,10 +3775,17 @@ function CanvasRouter({
3477
3775
  (canvas-comment-mount.tsx), not here — single instance per surface. */}
3478
3776
  <AnnotationsLayer />
3479
3777
  <ToolPalette />
3778
+ <CanvasThemePillMount />
3480
3779
  <ArtboardMarqueeOverlay />
3780
+ <ArtboardRingsLayer />
3781
+ {/* V2-8.5 c7 (03 ai-copy) - "Copied from <name>" + the dashed link beside a copy "Run on a copy" made */}
3782
+ <AiCopyLinks />
3481
3783
  <ElementMarqueeOverlay />
3482
3784
  <HoverHalo el={hoverEl} />
3483
3785
  <SelectionHalos />
3786
+ {/* S3.10a — the link chip: Edit only, read-only (the component gates its own mode) */}
3787
+ <LinkChipOverlay />
3788
+ <EditingLayer />
3484
3789
  {!readOnly && <ElementResizeOverlay />}
3485
3790
  {!readOnly && <SpacingHandlesOverlay />}
3486
3791
  {!readOnly && <GridTrackHandlesOverlay />}
@@ -3488,325 +3793,24 @@ function CanvasRouter({
3488
3793
  <LayersLiveSync />
3489
3794
  <GroupBbox />
3490
3795
  {!readOnly && <EqualSpacingHandles />}
3796
+ {/* S9.21b — a view-only drag on the design tells the shell (its tip says why nothing moved) */}
3797
+ {readOnly && <ViewOnlyGesture />}
3491
3798
  <MeasureOverlay />
3492
- {!readOnly && <ContextualToolbar />}
3493
- {!readOnly && (
3494
- <MultiArtboardToolbar
3495
- distributeArtboards={distributeArtboards}
3496
- alignArtboards={alignArtboards}
3497
- />
3498
- )}
3799
+ <InspectOverlay />
3800
+ {/* S2.7 — align / distribute for objects AND artboards is editing/align-bar.tsx (mounted by EditingLayer); the v1 MultiArtboardToolbar is deleted (S2.9) */}
3499
3801
  <SnapGuideOverlay />
3500
3802
  <PhotoPreviewBridge />
3501
- <UndoHud />
3502
3803
  {/* DDR-247 — an embed inside another app shows the design, not who
3503
- else is in the room: collaborator cursors, the AI banner and the
3504
- avatar stack are studio chrome. */}
3804
+ else is in the room: collaborator cursors and the avatar stack are
3805
+ studio chrome. */}
3505
3806
  {!isEmbedCanvas() && <CursorsOverlay />}
3506
- {!isEmbedCanvas() && <AiBanner />}
3807
+ {/* P8 C3 (03 ai-working): no v1 "AI is editing this canvas" banner - the dashed spark ring + tag on the
3808
+ artboard (ArtboardRingsLayer) say it for every run, the board draws nothing else. */}
3507
3809
  {!isEmbedCanvas() && <ParticipantsChrome />}
3508
3810
  </>
3509
3811
  );
3510
3812
  }
3511
3813
 
3512
- // ─────────────────────────────────────────────────────────────────────────────
3513
- // MultiArtboardToolbar — floating chrome anchored above the group bbox when
3514
- // ≥ 2 artboards are multi-selected. Primary surface for the distribute
3515
- // commands (post-Wave-2 feedback preferred this over global ⌘⌥H / ⌘⌥V
3516
- // hotkeys). Disabled state when fewer than 3 artboards are selected — the
3517
- // math is undefined for 2.
3518
-
3519
- const MULTI_TOOLBAR_CSS = `
3520
- .dc-multi-artboard-tb {
3521
- position: fixed;
3522
- pointer-events: auto;
3523
- z-index: 6;
3524
- display: none;
3525
- align-items: stretch;
3526
- gap: 2px;
3527
- padding: 4px;
3528
- background: var(--maude-chrome-bg-0, #ffffff);
3529
- border: 1px solid var(--maude-chrome-fg-0, #1c1917);
3530
- border-radius: 8px;
3531
- box-shadow: 0 6px 24px var(--maude-chrome-shadow, color-mix(in oklab, #1c1917 10%, transparent));
3532
- font-family: var(--maude-chrome-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
3533
- font-size: 11px;
3534
- letter-spacing: 0.02em;
3535
- color: var(--maude-chrome-fg-0, #1a1a1a);
3536
- user-select: none;
3537
- }
3538
- .dc-multi-artboard-tb button {
3539
- appearance: none;
3540
- background: transparent;
3541
- border: 0;
3542
- border-radius: 6px;
3543
- padding: 4px 10px;
3544
- font: inherit;
3545
- cursor: pointer;
3546
- color: inherit;
3547
- display: inline-flex;
3548
- align-items: center;
3549
- gap: 6px;
3550
- transition: background-color 80ms linear;
3551
- }
3552
- .dc-multi-artboard-tb button:hover:not(:disabled) {
3553
- background: color-mix(in oklab, var(--maude-hud-accent, #d63b1f) 8%, transparent);
3554
- }
3555
- .dc-multi-artboard-tb button:disabled {
3556
- cursor: default;
3557
- opacity: 0.4;
3558
- }
3559
- .dc-multi-artboard-tb .dc-mab-count {
3560
- padding: 4px 8px 4px 10px;
3561
- color: var(--maude-chrome-fg-1, rgba(40,30,20,0.7));
3562
- border-right: 1px solid var(--maude-chrome-border, rgba(0,0,0,0.08));
3563
- margin-right: 2px;
3564
- font-variant-numeric: tabular-nums;
3565
- }
3566
- .dc-multi-artboard-tb .dc-mab-icon {
3567
- display: inline-flex;
3568
- align-items: center;
3569
- justify-content: center;
3570
- }
3571
- .dc-multi-artboard-tb .dc-mab-divider {
3572
- width: 1px;
3573
- align-self: stretch;
3574
- background: var(--maude-chrome-border, rgba(0,0,0,0.10));
3575
- margin: 0 4px;
3576
- }
3577
- @media (prefers-reduced-motion: reduce) {
3578
- .dc-multi-artboard-tb button { transition: none; }
3579
- }
3580
- `.trim();
3581
-
3582
- function ensureMultiToolbarStyles(): void {
3583
- if (typeof document === 'undefined') return;
3584
- if (document.getElementById('dc-multi-artboard-tb-css')) return;
3585
- const s = document.createElement('style');
3586
- s.id = 'dc-multi-artboard-tb-css';
3587
- s.textContent = MULTI_TOOLBAR_CSS;
3588
- document.head.appendChild(s);
3589
- }
3590
-
3591
- function MultiArtboardToolbar({
3592
- distributeArtboards,
3593
- alignArtboards,
3594
- }: {
3595
- distributeArtboards: (axis: 'x' | 'y') => void;
3596
- alignArtboards: (mode: 'left' | 'right' | 'center-x' | 'top' | 'bottom' | 'center-y') => void;
3597
- }) {
3598
- ensureMultiToolbarStyles();
3599
- const { selected } = useSelectionSet();
3600
- const ref = useRef<HTMLDivElement | null>(null);
3601
- const rafRef = useRef<number | null>(null);
3602
-
3603
- const artboardSelections = useMemo(() => selected.filter((s) => !!s.artboardId), [selected]);
3604
- const artboardCount = artboardSelections.length;
3605
- const distributeOk = artboardCount >= 3;
3606
- const alignOk = artboardCount >= 2;
3607
-
3608
- useEffect(() => {
3609
- const div = ref.current;
3610
- if (!div) return;
3611
- if (artboardCount < 2) {
3612
- div.style.display = 'none';
3613
- return;
3614
- }
3615
- // Track the screen-coord union bbox of all selected artboards each
3616
- // frame. Anchor toolbar centered horizontally above the bbox top
3617
- // edge with a 14 px gap; flip BELOW if the top edge is < 60 px from
3618
- // the viewport top.
3619
- const tick = () => {
3620
- rafRef.current = null;
3621
- let xMin = Number.POSITIVE_INFINITY;
3622
- let yMin = Number.POSITIVE_INFINITY;
3623
- let xMax = Number.NEGATIVE_INFINITY;
3624
- let yMax = Number.NEGATIVE_INFINITY;
3625
- let any = false;
3626
- for (const sel of artboardSelections) {
3627
- const el = document.querySelector(`[data-dc-screen="${sel.artboardId}"]`);
3628
- if (!el) continue;
3629
- const r = (el as HTMLElement).getBoundingClientRect();
3630
- if (r.width === 0 && r.height === 0) continue;
3631
- any = true;
3632
- if (r.left < xMin) xMin = r.left;
3633
- if (r.top < yMin) yMin = r.top;
3634
- if (r.right > xMax) xMax = r.right;
3635
- if (r.bottom > yMax) yMax = r.bottom;
3636
- }
3637
- if (!any) {
3638
- div.style.display = 'none';
3639
- rafRef.current = requestAnimationFrame(tick);
3640
- return;
3641
- }
3642
- // Make the toolbar visible OFFSCREEN first to measure its own
3643
- // width, then move it to the anchor. (Cheap: only re-anchors on
3644
- // every frame after the first.)
3645
- div.style.display = 'flex';
3646
- const tw = div.offsetWidth || 0;
3647
- const centerX = (xMin + xMax) / 2;
3648
- const top = yMin;
3649
- const gap = 14;
3650
- let anchorY = top - div.offsetHeight - gap;
3651
- if (anchorY < 60) anchorY = yMax + gap; // flip below
3652
- div.style.left = `${Math.round(centerX - tw / 2)}px`;
3653
- div.style.top = `${Math.round(anchorY)}px`;
3654
- rafRef.current = requestAnimationFrame(tick);
3655
- };
3656
- rafRef.current = requestAnimationFrame(tick);
3657
- return () => {
3658
- if (rafRef.current != null) cancelAnimationFrame(rafRef.current);
3659
- };
3660
- }, [artboardCount, artboardSelections]);
3661
-
3662
- if (artboardCount < 2) {
3663
- return <div ref={ref} className="dc-multi-artboard-tb" aria-hidden="true" />;
3664
- }
3665
-
3666
- return (
3667
- <div
3668
- ref={ref}
3669
- className="dc-multi-artboard-tb"
3670
- role="toolbar"
3671
- aria-label="Multi-artboard actions"
3672
- >
3673
- <span className="dc-mab-count">{artboardCount} artboards</span>
3674
- {/* G7 — align cluster. Icon-only to keep the toolbar narrow; full
3675
- label lives in the tooltip + the right-click menu. Enabled at ≥ 2
3676
- artboards (alignment is well-defined with 2). */}
3677
- <button
3678
- type="button"
3679
- disabled={!alignOk}
3680
- title={alignOk ? 'Align left' : 'Select at least 2 artboards to align'}
3681
- aria-label="Align left"
3682
- onClick={() => alignArtboards('left')}
3683
- >
3684
- <span className="dc-mab-icon" aria-hidden="true">
3685
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
3686
- <line x1="0.5" y1="0.5" x2="0.5" y2="13.5" stroke="currentColor" />
3687
- <rect x="1" y="2" width="7" height="3" fill="currentColor" />
3688
- <rect x="1" y="9" width="11" height="3" fill="currentColor" />
3689
- </svg>
3690
- </span>
3691
- </button>
3692
- <button
3693
- type="button"
3694
- disabled={!alignOk}
3695
- title={alignOk ? 'Align center (horizontal)' : 'Select at least 2 artboards to align'}
3696
- aria-label="Align center horizontally"
3697
- onClick={() => alignArtboards('center-x')}
3698
- >
3699
- <span className="dc-mab-icon" aria-hidden="true">
3700
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
3701
- <line x1="7" y1="0.5" x2="7" y2="13.5" stroke="currentColor" />
3702
- <rect x="3.5" y="2" width="7" height="3" fill="currentColor" />
3703
- <rect x="1.5" y="9" width="11" height="3" fill="currentColor" />
3704
- </svg>
3705
- </span>
3706
- </button>
3707
- <button
3708
- type="button"
3709
- disabled={!alignOk}
3710
- title={alignOk ? 'Align right' : 'Select at least 2 artboards to align'}
3711
- aria-label="Align right"
3712
- onClick={() => alignArtboards('right')}
3713
- >
3714
- <span className="dc-mab-icon" aria-hidden="true">
3715
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
3716
- <line x1="13.5" y1="0.5" x2="13.5" y2="13.5" stroke="currentColor" />
3717
- <rect x="6" y="2" width="7" height="3" fill="currentColor" />
3718
- <rect x="2" y="9" width="11" height="3" fill="currentColor" />
3719
- </svg>
3720
- </span>
3721
- </button>
3722
- <button
3723
- type="button"
3724
- disabled={!alignOk}
3725
- title={alignOk ? 'Align top' : 'Select at least 2 artboards to align'}
3726
- aria-label="Align top"
3727
- onClick={() => alignArtboards('top')}
3728
- >
3729
- <span className="dc-mab-icon" aria-hidden="true">
3730
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
3731
- <line x1="0.5" y1="0.5" x2="13.5" y2="0.5" stroke="currentColor" />
3732
- <rect x="2" y="1" width="3" height="7" fill="currentColor" />
3733
- <rect x="9" y="1" width="3" height="11" fill="currentColor" />
3734
- </svg>
3735
- </span>
3736
- </button>
3737
- <button
3738
- type="button"
3739
- disabled={!alignOk}
3740
- title={alignOk ? 'Align center (vertical)' : 'Select at least 2 artboards to align'}
3741
- aria-label="Align center vertically"
3742
- onClick={() => alignArtboards('center-y')}
3743
- >
3744
- <span className="dc-mab-icon" aria-hidden="true">
3745
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
3746
- <line x1="0.5" y1="7" x2="13.5" y2="7" stroke="currentColor" />
3747
- <rect x="2" y="3.5" width="3" height="7" fill="currentColor" />
3748
- <rect x="9" y="1.5" width="3" height="11" fill="currentColor" />
3749
- </svg>
3750
- </span>
3751
- </button>
3752
- <button
3753
- type="button"
3754
- disabled={!alignOk}
3755
- title={alignOk ? 'Align bottom' : 'Select at least 2 artboards to align'}
3756
- aria-label="Align bottom"
3757
- onClick={() => alignArtboards('bottom')}
3758
- >
3759
- <span className="dc-mab-icon" aria-hidden="true">
3760
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
3761
- <line x1="0.5" y1="13.5" x2="13.5" y2="13.5" stroke="currentColor" />
3762
- <rect x="2" y="6" width="3" height="7" fill="currentColor" />
3763
- <rect x="9" y="2" width="3" height="11" fill="currentColor" />
3764
- </svg>
3765
- </span>
3766
- </button>
3767
- <span className="dc-mab-divider" aria-hidden="true" />
3768
- <button
3769
- type="button"
3770
- disabled={!distributeOk}
3771
- title={
3772
- distributeOk
3773
- ? 'Distribute horizontally — equal gaps between artboards'
3774
- : 'Select at least 3 artboards to distribute'
3775
- }
3776
- aria-label="Distribute horizontally"
3777
- onClick={() => distributeArtboards('x')}
3778
- >
3779
- <span className="dc-mab-icon" aria-hidden="true">
3780
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
3781
- <rect x="0.5" y="3" width="3" height="8" fill="currentColor" />
3782
- <rect x="5.5" y="3" width="3" height="8" fill="currentColor" />
3783
- <rect x="10.5" y="3" width="3" height="8" fill="currentColor" />
3784
- </svg>
3785
- </span>
3786
- </button>
3787
- <button
3788
- type="button"
3789
- disabled={!distributeOk}
3790
- title={
3791
- distributeOk
3792
- ? 'Distribute vertically — equal gaps between artboards'
3793
- : 'Select at least 3 artboards to distribute'
3794
- }
3795
- aria-label="Distribute vertically"
3796
- onClick={() => distributeArtboards('y')}
3797
- >
3798
- <span className="dc-mab-icon" aria-hidden="true">
3799
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
3800
- <rect x="3" y="0.5" width="8" height="3" fill="currentColor" />
3801
- <rect x="3" y="5.5" width="8" height="3" fill="currentColor" />
3802
- <rect x="3" y="10.5" width="8" height="3" fill="currentColor" />
3803
- </svg>
3804
- </span>
3805
- </button>
3806
- </div>
3807
- );
3808
- }
3809
-
3810
3814
  // ─────────────────────────────────────────────────────────────────────────────
3811
3815
  // HoverHalo — single floating overlay tracking the hovered element's screen
3812
3816
  // bounds. Updates on every animation frame while mounted. Position: fixed so
@@ -3861,6 +3865,8 @@ function HoverHalo({ el }: { el: Element | null }) {
3861
3865
  // the lighter 1px tinted outline (no ticks). The GroupBbox renders the loud
3862
3866
  // signal when selected.length > 1.
3863
3867
  const TICK_CLASSES = ['tick-tl', 'tick-tr', 'tick-bl', 'tick-br'] as const;
3868
+ // S2.9 — the parent box of a multi-selection carries eight marks: the four corners and four edge midpoints
3869
+ const GROUP_TICK_CLASSES = [...TICK_CLASSES, 'tick-t', 'tick-r', 'tick-b', 'tick-l'] as const;
3864
3870
 
3865
3871
  function makeSelectedNode(withTicks: boolean): HTMLDivElement {
3866
3872
  const child = document.createElement('div');
@@ -3933,14 +3939,18 @@ function SelectionHalos() {
3933
3939
  // `left/top` in real-time), so the halo can follow via
3934
3940
  // getBoundingClientRect — no special drag suppression needed.
3935
3941
  const r = (el as HTMLElement).getBoundingClientRect();
3942
+ // a swatch / master of the Design system board rings 4 px clear of itself (see HALO_CSS `[data-ring]`)
3943
+ const gap = el.hasAttribute('data-ds-token') || el.hasAttribute('data-ds-master') ? 4 : 0;
3944
+ if (gap) child.setAttribute('data-ring', 'true');
3945
+ else child.removeAttribute('data-ring');
3936
3946
  if (r.width === 0 && r.height === 0) {
3937
3947
  child.style.display = 'none';
3938
3948
  } else {
3939
3949
  child.style.display = 'block';
3940
- child.style.left = `${Math.round(r.left)}px`;
3941
- child.style.top = `${Math.round(r.top)}px`;
3942
- child.style.width = `${Math.round(r.width)}px`;
3943
- child.style.height = `${Math.round(r.height)}px`;
3950
+ child.style.left = `${Math.round(r.left) - gap}px`;
3951
+ child.style.top = `${Math.round(r.top) - gap}px`;
3952
+ child.style.width = `${Math.round(r.width) + gap * 2}px`;
3953
+ child.style.height = `${Math.round(r.height) + gap * 2}px`;
3944
3954
  }
3945
3955
  }
3946
3956
  rafRef.current = requestAnimationFrame(tick);
@@ -4033,6 +4043,8 @@ function ReorderDrag() {
4033
4043
  settleKey: string | null;
4034
4044
  /** The last PREVIEWED (already reflowed) drop, committed on release. */
4035
4045
  applied: { refId: string; position: 'before' | 'after' | 'inside-end' } | null;
4046
+ /** S2.11 — the neighbour element `applied` names (⌥ copy needs the node, not the id). */
4047
+ appliedRef: HTMLElement | null;
4036
4048
  /** Stamped [data-cd-id] nodes in their ORIGINAL order — for computing a
4037
4049
  * reused instance's occurrence index even after the DOM reflowed. */
4038
4050
  snapshot: Element[] | null;
@@ -4167,7 +4179,7 @@ function ReorderDrag() {
4167
4179
  // its own cursor-following transform. Deltas divide by each element's own
4168
4180
  // zoom (screen px → world px), same math as the float. Respects
4169
4181
  // prefers-reduced-motion (skips straight to the end state).
4170
- const REFLOW_MS = 180;
4182
+ // S2.11 — neighbours slide on --dur-panel / --ease-out (panelMotion), not a private 180 ms.
4171
4183
  const animateReflow = (moved: HTMLElement, act: () => void) => {
4172
4184
  if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
4173
4185
  act();
@@ -4199,8 +4211,9 @@ function ReorderDrag() {
4199
4211
  }
4200
4212
  if (!anims.length) return;
4201
4213
  void document.body.offsetWidth; // flush the inverted state
4214
+ const motion = panelMotion();
4202
4215
  for (const a of anims) {
4203
- a.el.style.transition = `transform ${REFLOW_MS}ms ease`;
4216
+ a.el.style.transition = `transform ${motion.ms}ms ${motion.easing}`;
4204
4217
  a.el.style.transform = 'translate(0px, 0px)';
4205
4218
  }
4206
4219
  setTimeout(() => {
@@ -4209,7 +4222,7 @@ function ReorderDrag() {
4209
4222
  a.el.style.transition = a.prevTransition;
4210
4223
  a.el.style.transform = a.prevTransform;
4211
4224
  }
4212
- }, REFLOW_MS + 40);
4225
+ }, motion.ms + 40);
4213
4226
  };
4214
4227
 
4215
4228
  // Move the node to match the target (used by the settle preview AND the
@@ -4259,6 +4272,7 @@ function ReorderDrag() {
4259
4272
  if (!drop) return;
4260
4273
  animateReflow(d.el, () => applyDrop(d.el, t));
4261
4274
  d.applied = drop;
4275
+ d.appliedRef = t.kind === 'inside' ? t.container : t.el;
4262
4276
  d.el.style.transform = 'none';
4263
4277
  const rect = d.el.getBoundingClientRect();
4264
4278
  d.zoom = d.el.offsetWidth ? rect.width / d.el.offsetWidth : 1;
@@ -4288,6 +4302,7 @@ function ReorderDrag() {
4288
4302
  else d.el.setAttribute('style', d.prevStyle);
4289
4303
  setHighlight(null);
4290
4304
  hideDivider();
4305
+ reorderSlot.end();
4291
4306
  suppressNextCanvasClick();
4292
4307
  drag = null;
4293
4308
  setElementDragActive(false);
@@ -4301,7 +4316,8 @@ function ReorderDrag() {
4301
4316
  };
4302
4317
 
4303
4318
  const onDown = (e: PointerEvent) => {
4304
- if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
4319
+ // r1 #15 — ⌥ is allowed: an ⌥-drag of the selected object drops a copy (decided at the drop, as before)
4320
+ if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey) return;
4305
4321
  if (toolRef.current !== 'move') return;
4306
4322
  const sel = selRef.current;
4307
4323
  const one = sel && sel.length === 1 ? sel[0] : null;
@@ -4313,7 +4329,15 @@ function ReorderDrag() {
4313
4329
  // the Layers panel, but the canvas won't move it).
4314
4330
  if (isLockedElement(el, cdId)) return;
4315
4331
  const t = e.target;
4316
- if (!(t instanceof Node) || !el.contains(t)) return;
4332
+ // r1 #12 — or a press inside its box where its artboard clips it (it was dragged off the artboard)
4333
+ const grabbed =
4334
+ t instanceof Node && !el.contains(t) && clippedGrab(document, e.clientX, e.clientY, t, sel);
4335
+ if (!(t instanceof Node) || (!el.contains(t) && !grabbed)) return;
4336
+ // the marquee on empty canvas must not also take this press (it would clear the selection)
4337
+ if (grabbed) e.stopImmediatePropagation();
4338
+ // r1 #15 — ⌥ on the selected object is this drag's: the artboard's own ⌥-drag (copy the ARTBOARD) must not
4339
+ // also take the press, or ⌥-dragging a shape duplicated the whole artboard
4340
+ else if (e.altKey) e.stopPropagation();
4317
4341
  // Candidate — do NOT claim yet (a plain click must still work). We only
4318
4342
  // become a drag once the pointer crosses the threshold in onMove.
4319
4343
  const outOfFlowPos = getComputedStyle(el).position;
@@ -4335,6 +4359,7 @@ function ReorderDrag() {
4335
4359
  settle: null,
4336
4360
  settleKey: null,
4337
4361
  applied: null,
4362
+ appliedRef: null,
4338
4363
  snapshot: null,
4339
4364
  outOfFlow: outOfFlowPos === 'absolute' || outOfFlowPos === 'fixed',
4340
4365
  originLeft: 0,
@@ -4364,6 +4389,7 @@ function ReorderDrag() {
4364
4389
  // reflect the pre-drag layout, not the reflowed one.
4365
4390
  d.snapshot = [...document.querySelectorAll('[data-cd-id]')];
4366
4391
  d.prevStyle = d.el.getAttribute('style');
4392
+ if (!d.outOfFlow) reorderSlot.begin(d.el, d.origin?.parent ?? null);
4367
4393
  if (d.outOfFlow) {
4368
4394
  // Resolved (used) value in px — matches the unit space `left`/`top`
4369
4395
  // are written back in, regardless of an ancestor's zoom transform
@@ -4378,9 +4404,8 @@ function ReorderDrag() {
4378
4404
  }
4379
4405
  d.el.style.zIndex = '9990';
4380
4406
  d.el.style.pointerEvents = 'none'; // so elementFromPoint sees what's beneath
4381
- d.el.style.opacity = '0.9';
4382
4407
  d.el.style.cursor = 'grabbing';
4383
- d.el.style.boxShadow = '0 10px 28px rgba(0, 0, 0, 0.28)';
4408
+ liftCard(d.el); // 14 ed-lay-reorder: tilted, accent-ringed, deep shadow, opaque
4384
4409
  d.el.style.willChange = 'transform';
4385
4410
  d.el.style.transition = 'none';
4386
4411
  }
@@ -4399,6 +4424,7 @@ function ReorderDrag() {
4399
4424
  const target = computeTarget(e.clientX, e.clientY, d);
4400
4425
  const current = target ? isCurrentPosition(target, d) : false;
4401
4426
  d.target = target && !current ? target : null;
4427
+ reorderSlot.move(e.clientX, e.clientY, e.altKey, !!target);
4402
4428
  if (!d.target) {
4403
4429
  clearSettle(d);
4404
4430
  setHighlight(null);
@@ -4429,9 +4455,12 @@ function ReorderDrag() {
4429
4455
  setElementDragActive(false);
4430
4456
  setHighlight(null);
4431
4457
  hideDivider();
4458
+ const slot = reorderSlot.end();
4432
4459
  if (!d || e.pointerId !== d.pointerId) return;
4433
4460
  if (!d.dragging) return; // a plain click — leave it to native handlers
4434
4461
  clearSettle(d);
4462
+ // S2.11 — where the float was when the pointer let go (screen px), before it is un-floated
4463
+ const floatRect = d.el.getBoundingClientRect();
4435
4464
  // Occurrence index of a node among its like-id siblings, read from the
4436
4465
  // PRE-drag snapshot (the live DOM already reflowed for an in-flow drop). For
4437
4466
  // a reused component (many DOM nodes share one internal id) the server maps
@@ -4461,6 +4490,12 @@ function ReorderDrag() {
4461
4490
  if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return; // negligible — nothing to persist
4462
4491
  const left = Math.round(d.originLeft + dx);
4463
4492
  const top = Math.round(d.originTop + dy);
4493
+ if (e.altKey) {
4494
+ // r1 #15 — ⌥-drop: the original stays put, a copy lands here (one edit-op, one ⌘Z)
4495
+ suppressNextCanvasClick();
4496
+ void copyPlacedTo(d.el, { left, top });
4497
+ return;
4498
+ }
4464
4499
  d.el.style.left = `${left}px`;
4465
4500
  d.el.style.top = `${top}px`;
4466
4501
  lastPosition = { el: d.el, prevStyle: d.prevStyle };
@@ -4482,6 +4517,43 @@ function ReorderDrag() {
4482
4517
  // Un-float: restore the element's exact original inline style.
4483
4518
  if (d.prevStyle == null) d.el.removeAttribute('style');
4484
4519
  else d.el.setAttribute('style', d.prevStyle);
4520
+ // S2.11 — a drop outside the frame places the card freely; ⌥ drops a copy in the slot. Both
4521
+ // are edit-ops (editing/reorder-slot.tsx); the card goes back to where it was lifted from so
4522
+ // the canvas shows what the file has until the remount.
4523
+ if (slot && (slot.out || e.altKey)) {
4524
+ const fresh = d.target ? targetToDrop(d.target) : null;
4525
+ const drop = fresh ?? d.applied;
4526
+ const refEl = fresh
4527
+ ? d.target?.kind === 'inside'
4528
+ ? d.target.container
4529
+ : (d.target?.el ?? null)
4530
+ : d.appliedRef;
4531
+ if (d.applied && d.origin) {
4532
+ try {
4533
+ d.origin.parent.insertBefore(d.el, d.origin.next);
4534
+ } catch {
4535
+ /* origin gone — remount re-syncs */
4536
+ }
4537
+ }
4538
+ if (
4539
+ takeOver({
4540
+ el: d.el,
4541
+ floatRect: {
4542
+ left: floatRect.left,
4543
+ top: floatRect.top,
4544
+ width: floatRect.width,
4545
+ height: floatRect.height,
4546
+ },
4547
+ ref: refEl,
4548
+ position: drop?.position ?? null,
4549
+ altKey: e.altKey,
4550
+ out: slot.out,
4551
+ })
4552
+ ) {
4553
+ suppressNextCanvasClick();
4554
+ return;
4555
+ }
4556
+ }
4485
4557
  // Commit priority: a fresh (un-settled) target under the cursor wins;
4486
4558
  // otherwise the last settled preview (the layout the user is LOOKING at).
4487
4559
  let drop = d.target ? targetToDrop(d.target) : null;
@@ -4561,6 +4633,14 @@ function ReorderDrag() {
4561
4633
  return null;
4562
4634
  }
4563
4635
 
4636
+ // ─────────────────────────────────────────────────────────────────────────────
4637
+ // P8 round 7 (12 · ia-placed) — a selection of two or more pictures and nothing else is "N photos" on the group box.
4638
+ export function groupPhotoCount(els: ReadonlyArray<Element | null | undefined>): number {
4639
+ if (els.length < 2) return 0;
4640
+ for (const el of els) if (!el || el.tagName !== 'IMG') return 0;
4641
+ return els.length;
4642
+ }
4643
+
4564
4644
  // ─────────────────────────────────────────────────────────────────────────────
4565
4645
  // GroupBbox — dashed outline around the union of selected elements when N > 1.
4566
4646
 
@@ -4616,11 +4696,17 @@ function GroupBbox() {
4616
4696
  }, [selected]);
4617
4697
 
4618
4698
  if (selected.length < 2) return null;
4699
+ const photos = groupPhotoCount(selected.map((sel) => resolveSelectionEl(document, sel)));
4619
4700
  return (
4620
4701
  <div ref={ref} className="dc-cv-group-bbox" aria-hidden="true">
4621
- {TICK_CLASSES.map((cls) => (
4702
+ {GROUP_TICK_CLASSES.map((cls) => (
4622
4703
  <i key={cls} className={`tick ${cls}`} />
4623
4704
  ))}
4705
+ {photos ? (
4706
+ <span className="dc-cv-group-tag" data-testid="canvas-group-tag">
4707
+ {photos} photos
4708
+ </span>
4709
+ ) : null}
4624
4710
  </div>
4625
4711
  );
4626
4712
  }