@opengeni/react 1.0.1 → 1.0.2-canary.37202341988001

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 (632) hide show
  1. package/README.md +660 -21
  2. package/dist/accounts.d.ts +64 -0
  3. package/dist/accounts.js +822 -0
  4. package/dist/accounts.js.map +1 -0
  5. package/dist/approvals.d.ts +2 -1
  6. package/dist/artifacts-document.js +3 -2
  7. package/dist/artifacts-presentation.js +3 -2
  8. package/dist/artifacts-spreadsheet.js +2 -2
  9. package/dist/artifacts.d.ts +4 -1
  10. package/dist/artifacts.js +518 -42
  11. package/dist/artifacts.js.map +1 -1
  12. package/dist/browser-viewer-SHYKQRNX.js +16 -0
  13. package/dist/capability-catalog-row.d.ts +20 -0
  14. package/dist/capability-logo-fallback.d.ts +3 -0
  15. package/dist/chat-interactive-block-UGBTNB3L.js +11 -0
  16. package/dist/chat-interactive-block-UGBTNB3L.js.map +1 -0
  17. package/dist/chunk-26ZNDDLZ.js +453 -0
  18. package/dist/chunk-26ZNDDLZ.js.map +1 -0
  19. package/dist/chunk-3CTRFMAK.js +359 -0
  20. package/dist/chunk-3CTRFMAK.js.map +1 -0
  21. package/dist/chunk-447JLCBU.js +209 -0
  22. package/dist/chunk-447JLCBU.js.map +1 -0
  23. package/dist/chunk-4RVYOY4O.js +379 -0
  24. package/dist/chunk-4RVYOY4O.js.map +1 -0
  25. package/dist/chunk-5CVXZA3Y.js +292 -0
  26. package/dist/chunk-5CVXZA3Y.js.map +1 -0
  27. package/dist/chunk-5J4FOW6Q.js +108 -0
  28. package/dist/chunk-5J4FOW6Q.js.map +1 -0
  29. package/dist/chunk-742CZ3L3.js +481 -0
  30. package/dist/chunk-742CZ3L3.js.map +1 -0
  31. package/dist/chunk-A2PI6UMY.js +41 -0
  32. package/dist/chunk-A2PI6UMY.js.map +1 -0
  33. package/dist/{chunk-7WCLAEFV.js → chunk-A4UJB2MM.js} +37 -27
  34. package/dist/chunk-A4UJB2MM.js.map +1 -0
  35. package/dist/chunk-B3V6TG77.js +41 -0
  36. package/dist/chunk-B3V6TG77.js.map +1 -0
  37. package/dist/chunk-BRM6FVZA.js +302 -0
  38. package/dist/chunk-BRM6FVZA.js.map +1 -0
  39. package/dist/chunk-C5X5AJXK.js +182 -0
  40. package/dist/chunk-C5X5AJXK.js.map +1 -0
  41. package/dist/{chunk-6KLX2RH5.js → chunk-DO544OSV.js} +1075 -79
  42. package/dist/chunk-DO544OSV.js.map +1 -0
  43. package/dist/{chunk-R3AZOAB5.js → chunk-DYWBUX5Q.js} +29 -123
  44. package/dist/chunk-DYWBUX5Q.js.map +1 -0
  45. package/dist/{chunk-HA46CYQK.js → chunk-EESD3PY3.js} +792 -537
  46. package/dist/chunk-EESD3PY3.js.map +1 -0
  47. package/dist/{chunk-5UQPNLIO.js → chunk-EN3YTHKR.js} +4117 -3896
  48. package/dist/chunk-EN3YTHKR.js.map +1 -0
  49. package/dist/chunk-ERGYJIBB.js +21 -0
  50. package/dist/chunk-ERGYJIBB.js.map +1 -0
  51. package/dist/chunk-FZCP527Y.js +116 -0
  52. package/dist/chunk-FZCP527Y.js.map +1 -0
  53. package/dist/chunk-GIMRELBW.js +14 -0
  54. package/dist/chunk-GIMRELBW.js.map +1 -0
  55. package/dist/chunk-GYVRFZDY.js +2733 -0
  56. package/dist/chunk-GYVRFZDY.js.map +1 -0
  57. package/dist/{chunk-LLOLUHVG.js → chunk-HDJWDK7W.js} +1358 -2746
  58. package/dist/chunk-HDJWDK7W.js.map +1 -0
  59. package/dist/chunk-I7IWRQLN.js +1608 -0
  60. package/dist/chunk-I7IWRQLN.js.map +1 -0
  61. package/dist/chunk-IT4BJUGF.js +13055 -0
  62. package/dist/chunk-IT4BJUGF.js.map +1 -0
  63. package/dist/chunk-IWIDV7SB.js +1 -0
  64. package/dist/chunk-IWIDV7SB.js.map +1 -0
  65. package/dist/chunk-J2QWVSQY.js +312 -0
  66. package/dist/chunk-J2QWVSQY.js.map +1 -0
  67. package/dist/chunk-J6DBS4T3.js +371 -0
  68. package/dist/chunk-J6DBS4T3.js.map +1 -0
  69. package/dist/{chunk-B6WPZSTT.js → chunk-JIQYUGVL.js} +1331 -1163
  70. package/dist/chunk-JIQYUGVL.js.map +1 -0
  71. package/dist/chunk-JT4JW7BC.js +54 -0
  72. package/dist/chunk-JT4JW7BC.js.map +1 -0
  73. package/dist/chunk-K3HQAKQX.js +24 -0
  74. package/dist/chunk-K3HQAKQX.js.map +1 -0
  75. package/dist/{chunk-PEI6RANI.js → chunk-PNY3JKBJ.js} +309 -74
  76. package/dist/chunk-PNY3JKBJ.js.map +1 -0
  77. package/dist/chunk-RHREZ7BO.js +11 -0
  78. package/dist/chunk-RHREZ7BO.js.map +1 -0
  79. package/dist/chunk-RLUSC2WA.js +299 -0
  80. package/dist/chunk-RLUSC2WA.js.map +1 -0
  81. package/dist/{chunk-IGC6A2ZI.js → chunk-RSI7XYXL.js} +777 -246
  82. package/dist/chunk-RSI7XYXL.js.map +1 -0
  83. package/dist/chunk-SCOTPE2I.js +589 -0
  84. package/dist/chunk-SCOTPE2I.js.map +1 -0
  85. package/dist/{chunk-C5ZPSSS5.js → chunk-TKOTKRWY.js} +5 -4
  86. package/dist/{chunk-C5ZPSSS5.js.map → chunk-TKOTKRWY.js.map} +1 -1
  87. package/dist/chunk-TMYGL6X5.js +742 -0
  88. package/dist/chunk-TMYGL6X5.js.map +1 -0
  89. package/dist/chunk-UGLEYEMP.js +33 -0
  90. package/dist/chunk-UGLEYEMP.js.map +1 -0
  91. package/dist/chunk-UK4TINKT.js +27 -0
  92. package/dist/chunk-UK4TINKT.js.map +1 -0
  93. package/dist/chunk-UTRTG6LH.js +220 -0
  94. package/dist/chunk-UTRTG6LH.js.map +1 -0
  95. package/dist/chunk-WEHMPOXK.js +39 -0
  96. package/dist/chunk-WEHMPOXK.js.map +1 -0
  97. package/dist/chunk-WGXVEJO5.js +319 -0
  98. package/dist/chunk-WGXVEJO5.js.map +1 -0
  99. package/dist/chunk-WRHIZYZF.js +988 -0
  100. package/dist/chunk-WRHIZYZF.js.map +1 -0
  101. package/dist/{chunk-HUIKIDM5.js → chunk-WUISZ3WU.js} +223 -115
  102. package/dist/chunk-WUISZ3WU.js.map +1 -0
  103. package/dist/chunk-XCHWDJ22.js +107 -0
  104. package/dist/chunk-XCHWDJ22.js.map +1 -0
  105. package/dist/{chunk-KCGXPP5V.js → chunk-Y2PRMYLC.js} +11 -6
  106. package/dist/chunk-Y2PRMYLC.js.map +1 -0
  107. package/dist/chunk-YBXQDQFX.js +1772 -0
  108. package/dist/chunk-YBXQDQFX.js.map +1 -0
  109. package/dist/chunk-YM2DE7BQ.js +3124 -0
  110. package/dist/chunk-YM2DE7BQ.js.map +1 -0
  111. package/dist/{chunk-KZ73RL76.js → chunk-YQEAA6LT.js} +7 -3
  112. package/dist/chunk-YQEAA6LT.js.map +1 -0
  113. package/dist/chunk-YV4L3ILF.js +9 -0
  114. package/dist/chunk-YV4L3ILF.js.map +1 -0
  115. package/dist/chunk-ZYRGEKWS.js +216 -0
  116. package/dist/chunk-ZYRGEKWS.js.map +1 -0
  117. package/dist/client.d.ts +7 -4
  118. package/dist/clipboard.js +1 -0
  119. package/dist/commands/types.d.ts +2 -0
  120. package/dist/components/anthropic-mark.d.ts +3 -0
  121. package/dist/components/approval-surface.d.ts +15 -0
  122. package/dist/components/artifacts/artifact-chrome.d.ts +120 -0
  123. package/dist/components/artifacts/artifact-sandbox.d.ts +27 -0
  124. package/dist/components/artifacts/artifact-surface.d.ts +3 -1
  125. package/dist/components/artifacts/chat-interactive-block.d.ts +29 -0
  126. package/dist/components/artifacts/deferred-chat-media.d.ts +15 -0
  127. package/dist/components/artifacts/document-editor.d.ts +4 -2
  128. package/dist/components/artifacts/editable-artifact-ui.d.ts +2 -1
  129. package/dist/components/artifacts/editable-artifact-view.d.ts +46 -0
  130. package/dist/components/artifacts/editable-document.d.ts +1 -1
  131. package/dist/components/artifacts/editable-presentation.d.ts +2 -2
  132. package/dist/components/artifacts/editable-spreadsheet.d.ts +2 -1
  133. package/dist/components/artifacts/index.d.ts +8 -1
  134. package/dist/components/artifacts/inline-html-document.d.ts +2 -0
  135. package/dist/components/artifacts/latest-task-runner.d.ts +15 -0
  136. package/dist/components/artifacts/presentation-editor.d.ts +6 -2
  137. package/dist/components/artifacts/published-html-artifact-frame.d.ts +48 -3
  138. package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
  139. package/dist/components/artifacts/site-view.d.ts +23 -0
  140. package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -0
  141. package/dist/components/artifacts/visualization-assets.gen.d.ts +2 -0
  142. package/dist/components/browser-select-control.d.ts +16 -0
  143. package/dist/components/browser-viewer.d.ts +10 -1
  144. package/dist/components/chat-composer.d.ts +21 -3
  145. package/dist/components/child-session-link.d.ts +5 -0
  146. package/dist/components/claude-mark.d.ts +3 -0
  147. package/dist/components/code-editor.d.ts +1 -4
  148. package/dist/components/composer.d.ts +45 -4
  149. package/dist/components/computer-viewer.d.ts +4 -1
  150. package/dist/components/copy-button.d.ts +3 -1
  151. package/dist/components/desktop-viewer.d.ts +1 -1
  152. package/dist/components/enrollment-consent.d.ts +6 -3
  153. package/dist/components/file-browser.d.ts +10 -1
  154. package/dist/components/fleet-tile.d.ts +2 -2
  155. package/dist/components/grok-mark.d.ts +26 -0
  156. package/dist/components/human-input-form.d.ts +21 -2
  157. package/dist/components/human-input-surface.d.ts +6 -3
  158. package/dist/components/machine-card.d.ts +4 -1
  159. package/dist/components/machines/machine-detail.d.ts +4 -1
  160. package/dist/components/machines/machine-operation-policy.d.ts +11 -0
  161. package/dist/components/machines-dashboard.d.ts +3 -1
  162. package/dist/components/markdown-table-layout.d.ts +12 -0
  163. package/dist/components/markdown.d.ts +47 -3
  164. package/dist/components/message-timeline.d.ts +72 -9
  165. package/dist/components/model-mark.d.ts +29 -0
  166. package/dist/components/model-policy-picker-menu.d.ts +9 -0
  167. package/dist/components/model-policy-picker.d.ts +62 -13
  168. package/dist/components/open-geni-chat.d.ts +58 -0
  169. package/dist/components/open-geni-links.d.ts +68 -0
  170. package/dist/components/openrouter-mark.d.ts +6 -0
  171. package/dist/components/pierre-file.d.ts +1 -1
  172. package/dist/components/preview-loading.d.ts +2 -0
  173. package/dist/components/queue-item-content.d.ts +9 -0
  174. package/dist/components/sandbox-files.d.ts +13 -2
  175. package/dist/components/sandbox-workspace.d.ts +43 -3
  176. package/dist/components/session-capability-frame.d.ts +35 -0
  177. package/dist/components/session-chrome.d.ts +66 -8
  178. package/dist/components/session-commands-panel.d.ts +6 -0
  179. package/dist/components/session-commands.d.ts +6 -0
  180. package/dist/components/session-connection-request.d.ts +8 -0
  181. package/dist/components/session-conversation.d.ts +89 -0
  182. package/dist/components/session-list.d.ts +36 -0
  183. package/dist/components/session-mcp-capability-card.d.ts +41 -0
  184. package/dist/components/session-proxy-scope.d.ts +21 -0
  185. package/dist/components/timeline-anchor.d.ts +24 -0
  186. package/dist/components/timeline-annotation-chrome.d.ts +25 -0
  187. package/dist/components/timeline-annotation-layout.d.ts +42 -0
  188. package/dist/components/timeline-annotation-markers.d.ts +8 -0
  189. package/dist/components/timeline-annotation-reveal-context.d.ts +4 -0
  190. package/dist/components/timeline-annotation-shared.d.ts +31 -0
  191. package/dist/components/timeline-annotations-dialog.d.ts +3 -2
  192. package/dist/components/timeline-annotations.d.ts +13 -3
  193. package/dist/components/timeline-reading-progress.d.ts +11 -0
  194. package/dist/components/timeline-search.d.ts +34 -0
  195. package/dist/components/timeline-settlement.d.ts +16 -0
  196. package/dist/components/tip-follow.d.ts +16 -0
  197. package/dist/components/usage-limit-notice.d.ts +49 -0
  198. package/dist/components/usage-member-list.d.ts +91 -0
  199. package/dist/components/usage-meter.d.ts +73 -0
  200. package/dist/components/use-viewer-menu-dismiss.d.ts +2 -0
  201. package/dist/components/user-message-body.d.ts +10 -1
  202. package/dist/components/workspace-dock.d.ts +6 -2
  203. package/dist/composer.d.ts +5 -4
  204. package/dist/composer.js +15 -9
  205. package/dist/computer-viewer-6SRGWRUX.js +19 -0
  206. package/dist/computer-viewer-6SRGWRUX.js.map +1 -0
  207. package/dist/connect-account-identity.d.ts +8 -0
  208. package/dist/connect-accounts.d.ts +15 -0
  209. package/dist/connect-chooser.d.ts +18 -0
  210. package/dist/connect-panel.d.ts +18 -0
  211. package/dist/connect-setup.d.ts +16 -0
  212. package/dist/connect.d.ts +21 -0
  213. package/dist/connect.js +2129 -0
  214. package/dist/connect.js.map +1 -0
  215. package/dist/connection-catalog.d.ts +38 -0
  216. package/dist/connection-discovery.d.ts +12 -0
  217. package/dist/connection-installed.d.ts +17 -0
  218. package/dist/connection-logo.d.ts +9 -0
  219. package/dist/connection-service-logo.d.ts +8 -0
  220. package/dist/connection-service-presentation.d.ts +13 -0
  221. package/dist/connection-skeleton.d.ts +5 -0
  222. package/dist/connection-type-picker.d.ts +6 -0
  223. package/dist/conversation-timeline.d.ts +5 -0
  224. package/dist/desktop.d.ts +7 -0
  225. package/dist/desktop.js +26 -0
  226. package/dist/desktop.js.map +1 -0
  227. package/dist/device-authorization.d.ts +23 -0
  228. package/dist/diffs.d.ts +8 -0
  229. package/dist/diffs.js +14 -0
  230. package/dist/diffs.js.map +1 -0
  231. package/dist/discovery-cache.d.ts +5 -0
  232. package/dist/editor.d.ts +7 -0
  233. package/dist/editor.js +21 -0
  234. package/dist/editor.js.map +1 -0
  235. package/dist/embedded-session-client.d.ts +23 -0
  236. package/dist/file-node-visibility.d.ts +15 -0
  237. package/dist/{fleet-decision-row-GGCAT4E4.js → fleet-decision-row-YZ3ZKWMM.js} +2 -1
  238. package/dist/fleet-decision-row-YZ3ZKWMM.js.map +1 -0
  239. package/dist/hooks/channel-cache.d.ts +23 -0
  240. package/dist/hooks/latest-question.d.ts +25 -0
  241. package/dist/hooks/shared-machines-list.d.ts +14 -0
  242. package/dist/hooks/use-attached-browsers.d.ts +2 -1
  243. package/dist/hooks/use-browser-frame-stream.d.ts +1 -1
  244. package/dist/hooks/use-browser-session.d.ts +12 -1
  245. package/dist/hooks/use-channels.d.ts +1 -0
  246. package/dist/hooks/use-codex-accounts.d.ts +25 -7
  247. package/dist/hooks/use-composer.d.ts +45 -9
  248. package/dist/hooks/use-computer-frame-stream.d.ts +1 -1
  249. package/dist/hooks/use-computer-input-posture.d.ts +13 -0
  250. package/dist/hooks/use-computer-session.d.ts +2 -0
  251. package/dist/hooks/use-connect.d.ts +22 -0
  252. package/dist/hooks/use-desktop-stream.d.ts +1 -1
  253. package/dist/hooks/use-file-attachments.d.ts +21 -2
  254. package/dist/hooks/use-machine-chip.d.ts +3 -3
  255. package/dist/hooks/use-machines.d.ts +19 -1
  256. package/dist/hooks/use-sandbox-files.d.ts +5 -1
  257. package/dist/hooks/use-session-background-commands.d.ts +14 -0
  258. package/dist/hooks/use-session-events.d.ts +30 -8
  259. package/dist/hooks/use-session-lineage.d.ts +4 -0
  260. package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
  261. package/dist/hooks/use-session.d.ts +6 -0
  262. package/dist/hooks/use-turn-queue.d.ts +12 -0
  263. package/dist/hooks/use-usage.d.ts +40 -0
  264. package/dist/hooks/use-workspace-edit.d.ts +4 -0
  265. package/dist/hooks/use-workspace-sessions.d.ts +27 -5
  266. package/dist/human-input.d.ts +3 -1
  267. package/dist/identity-link-accounts.d.ts +11 -0
  268. package/dist/identity-link-consent.d.ts +18 -0
  269. package/dist/index.d.ts +60 -17
  270. package/dist/index.js +2238 -6201
  271. package/dist/index.js.map +1 -1
  272. package/dist/interaction.d.ts +1 -1
  273. package/dist/interaction.js +35 -184
  274. package/dist/interaction.js.map +1 -1
  275. package/dist/latest-question-HTRIS4KJ.js +117 -0
  276. package/dist/latest-question-HTRIS4KJ.js.map +1 -0
  277. package/dist/lib/error-message.d.ts +7 -0
  278. package/dist/lib/format.d.ts +36 -2
  279. package/dist/lib/host-theme.d.ts +70 -0
  280. package/dist/lib/interaction-errors.d.ts +6 -0
  281. package/dist/lib/menu-styles.d.ts +22 -0
  282. package/dist/lib/pierre-diffs-loader.d.ts +20 -0
  283. package/dist/lib/workbench-peers.d.ts +36 -0
  284. package/dist/lib/xterm-theme.d.ts +7 -5
  285. package/dist/machines.d.ts +4 -2
  286. package/dist/machines.js +14 -4
  287. package/dist/markdown-table-layout-QXSLK4BY.js +106 -0
  288. package/dist/markdown-table-layout-QXSLK4BY.js.map +1 -0
  289. package/dist/mcp-connection-status.d.ts +14 -0
  290. package/dist/model-policy-picker-menu-M54ISBMN.js +14 -0
  291. package/dist/model-policy-picker-menu-M54ISBMN.js.map +1 -0
  292. package/dist/model-policy.d.ts +19 -3
  293. package/dist/model-policy.js +9 -1
  294. package/dist/older-history.d.ts +30 -0
  295. package/dist/platform-activity-row-627BFZ46.js +182 -0
  296. package/dist/platform-activity-row-627BFZ46.js.map +1 -0
  297. package/dist/plugin-details.d.ts +14 -0
  298. package/dist/plugin-discovery.d.ts +25 -0
  299. package/dist/provider.d.ts +13 -1
  300. package/dist/{queue-surface-implementation-2KVJTYXH.js → queue-surface-implementation-ZHFI5JBP.js} +131 -44
  301. package/dist/queue-surface-implementation-ZHFI5JBP.js.map +1 -0
  302. package/dist/realtime/realtime-control.d.ts +6 -3
  303. package/dist/realtime.js +133 -74
  304. package/dist/realtime.js.map +1 -1
  305. package/dist/sandbox-files-GORZOUUJ.js +20 -0
  306. package/dist/sandbox-files-GORZOUUJ.js.map +1 -0
  307. package/dist/session-auth-recommendation.d.ts +5 -0
  308. package/dist/session-capability-policy.d.ts +12 -0
  309. package/dist/session-ui.d.ts +30 -2
  310. package/dist/session-ui.js +85 -7
  311. package/dist/session-ui.js.map +1 -1
  312. package/dist/session.d.ts +8 -2
  313. package/dist/session.js +30 -19
  314. package/dist/sites-ui.d.ts +34 -0
  315. package/dist/sites.d.ts +3 -0
  316. package/dist/sites.js +11 -0
  317. package/dist/sites.js.map +1 -0
  318. package/dist/skill-discovery.d.ts +47 -0
  319. package/dist/terminal.d.ts +8 -0
  320. package/dist/terminal.js +31 -0
  321. package/dist/terminal.js.map +1 -0
  322. package/dist/timeline/activity-rail.d.ts +11 -2
  323. package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
  324. package/dist/timeline/compaction-copy.d.ts +10 -0
  325. package/dist/timeline/entrance.d.ts +13 -1
  326. package/dist/timeline/genie-loading.d.ts +34 -0
  327. package/dist/timeline/index.d.ts +6 -2
  328. package/dist/timeline/knowledge-receipt.d.ts +17 -0
  329. package/dist/timeline/platform-activity-row.d.ts +14 -0
  330. package/dist/timeline/presented-image.d.ts +6 -0
  331. package/dist/timeline/projection.d.ts +31 -2
  332. package/dist/timeline/registry.d.ts +2 -0
  333. package/dist/timeline/retained-image.d.ts +18 -0
  334. package/dist/timeline/rolling-activity.d.ts +11 -0
  335. package/dist/timeline/screenshot-lightbox.d.ts +16 -1
  336. package/dist/timeline/shared.d.ts +8 -3
  337. package/dist/timeline/startup-preference.d.ts +3 -0
  338. package/dist/timeline/startup-timings.d.ts +4 -0
  339. package/dist/timeline/tool-display-name.d.ts +2 -1
  340. package/dist/timeline/turn-summary.d.ts +34 -3
  341. package/dist/timeline/types.d.ts +147 -7
  342. package/dist/timeline-annotation-markers-GNDHTGBD.js +165 -0
  343. package/dist/timeline-annotation-markers-GNDHTGBD.js.map +1 -0
  344. package/dist/timeline-annotation-selection-DMLMM2TX.js +241 -0
  345. package/dist/timeline-annotation-selection-DMLMM2TX.js.map +1 -0
  346. package/dist/timeline-annotations-dialog-ELRDBHTS.js +273 -0
  347. package/dist/timeline-annotations-dialog-ELRDBHTS.js.map +1 -0
  348. package/dist/types/machines.d.ts +2 -2
  349. package/dist/usage/allowance-copy.d.ts +25 -0
  350. package/dist/usage/summary.d.ts +35 -0
  351. package/dist/usage.d.ts +13 -0
  352. package/dist/usage.js +1074 -0
  353. package/dist/usage.js.map +1 -0
  354. package/package.json +44 -4
  355. package/src/accounts.tsx +1072 -0
  356. package/src/approvals.ts +8 -1
  357. package/src/artifacts.ts +42 -0
  358. package/src/assets/README.md +8 -0
  359. package/src/assets/gmail.ico +0 -0
  360. package/src/assets/outlook.ico +0 -0
  361. package/src/capability-catalog-row.tsx +94 -0
  362. package/src/capability-logo-fallback.ts +22 -0
  363. package/src/client.ts +22 -13
  364. package/src/commands/registry.ts +18 -15
  365. package/src/commands/types.ts +2 -0
  366. package/src/components/anthropic-mark.tsx +10 -0
  367. package/src/components/approval-surface.tsx +171 -37
  368. package/src/components/artifacts/artifact-chrome.tsx +413 -0
  369. package/src/components/artifacts/artifact-sandbox.tsx +185 -0
  370. package/src/components/artifacts/artifact-surface.tsx +39 -19
  371. package/src/components/artifacts/chat-interactive-block.tsx +260 -0
  372. package/src/components/artifacts/deferred-chat-media.tsx +67 -0
  373. package/src/components/artifacts/document-editor.tsx +141 -16
  374. package/src/components/artifacts/editable-artifact-ui.tsx +4 -2
  375. package/src/components/artifacts/editable-artifact-view.tsx +187 -0
  376. package/src/components/artifacts/editable-artifact-workbench.tsx +5 -2
  377. package/src/components/artifacts/editable-document.tsx +37 -36
  378. package/src/components/artifacts/editable-presentation.tsx +36 -18
  379. package/src/components/artifacts/editable-spreadsheet.tsx +5 -2
  380. package/src/components/artifacts/index.ts +44 -0
  381. package/src/components/artifacts/inline-html-document.ts +24 -0
  382. package/src/components/artifacts/latest-task-runner.ts +49 -0
  383. package/src/components/artifacts/presentation-editor.tsx +323 -67
  384. package/src/components/artifacts/published-html-artifact-frame.tsx +338 -5
  385. package/src/components/artifacts/session-artifact-viewer.tsx +376 -0
  386. package/src/components/artifacts/site-view.tsx +116 -0
  387. package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
  388. package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
  389. package/src/components/artifacts/spreadsheet-grid.tsx +12 -13
  390. package/src/components/artifacts/visualization-assets/base.css +1015 -0
  391. package/src/components/artifacts/visualization-assets/helpers.html +349 -0
  392. package/src/components/artifacts/visualization-assets.gen.ts +3 -0
  393. package/src/components/browser-select-control.tsx +312 -0
  394. package/src/components/browser-viewer.tsx +1054 -314
  395. package/src/components/chat-composer.tsx +131 -85
  396. package/src/components/child-session-link.tsx +27 -0
  397. package/src/components/claude-mark.tsx +10 -0
  398. package/src/components/code-editor.tsx +13 -16
  399. package/src/components/composer-transcription-control.tsx +7 -5
  400. package/src/components/composer.tsx +376 -49
  401. package/src/components/computer-viewer.tsx +1041 -329
  402. package/src/components/copy-button.tsx +13 -5
  403. package/src/components/desktop-viewer.tsx +1 -1
  404. package/src/components/enrollment-consent.tsx +65 -7
  405. package/src/components/enrollment-device-flow.tsx +1 -1
  406. package/src/components/file-browser.tsx +158 -34
  407. package/src/components/fleet-tile.tsx +8 -16
  408. package/src/components/generated-video-player.tsx +4 -2
  409. package/src/components/grok-mark.tsx +33 -0
  410. package/src/components/human-input-form.tsx +455 -114
  411. package/src/components/human-input-surface.tsx +18 -7
  412. package/src/components/interaction-intervention-banner.tsx +2 -2
  413. package/src/components/machine-card.tsx +119 -4
  414. package/src/components/machine-dock-bar.tsx +1 -1
  415. package/src/components/machine-input-display.ts +23 -2
  416. package/src/components/machines/machine-detail.tsx +52 -2
  417. package/src/components/machines/machine-operation-policy.tsx +179 -0
  418. package/src/components/machines-dashboard.tsx +8 -17
  419. package/src/components/markdown-table-layout.ts +132 -0
  420. package/src/components/markdown.tsx +473 -44
  421. package/src/components/message-timeline.tsx +2754 -665
  422. package/src/components/model-mark.tsx +90 -0
  423. package/src/components/model-picker.tsx +15 -4
  424. package/src/components/model-policy-picker-menu.tsx +424 -0
  425. package/src/components/model-policy-picker.tsx +337 -381
  426. package/src/components/open-geni-chat.tsx +338 -0
  427. package/src/components/open-geni-links.tsx +179 -0
  428. package/src/components/openrouter-mark.tsx +13 -0
  429. package/src/components/pierre-diff.tsx +41 -16
  430. package/src/components/pierre-file.tsx +36 -11
  431. package/src/components/preview-loading.tsx +154 -0
  432. package/src/components/queue-item-content.ts +14 -0
  433. package/src/components/queue-surface-implementation.tsx +132 -42
  434. package/src/components/queue-surface-state.tsx +3 -1
  435. package/src/components/sandbox-files.tsx +267 -35
  436. package/src/components/sandbox-terminal.tsx +48 -11
  437. package/src/components/sandbox-workspace.tsx +337 -135
  438. package/src/components/session-capability-frame.tsx +192 -0
  439. package/src/components/session-chrome.tsx +1027 -328
  440. package/src/components/session-commands-panel.tsx +126 -0
  441. package/src/components/session-commands.tsx +18 -0
  442. package/src/components/session-connection-request.tsx +97 -0
  443. package/src/components/session-conversation.tsx +526 -0
  444. package/src/components/session-list.tsx +250 -0
  445. package/src/components/session-mcp-capability-card.tsx +680 -0
  446. package/src/components/session-proxy-scope.tsx +92 -0
  447. package/src/components/session-status.tsx +1 -1
  448. package/src/components/timeline-anchor.tsx +119 -0
  449. package/src/components/timeline-annotation-chrome.tsx +196 -0
  450. package/src/components/timeline-annotation-layout.ts +268 -0
  451. package/src/components/timeline-annotation-markers.tsx +185 -0
  452. package/src/components/timeline-annotation-reveal-context.ts +9 -0
  453. package/src/components/timeline-annotation-selection.tsx +106 -54
  454. package/src/components/timeline-annotation-shared.ts +245 -0
  455. package/src/components/timeline-annotations-dialog.tsx +185 -128
  456. package/src/components/timeline-annotations.tsx +189 -45
  457. package/src/components/timeline-reading-progress.ts +80 -0
  458. package/src/components/timeline-search.tsx +168 -0
  459. package/src/components/timeline-settlement.ts +60 -0
  460. package/src/components/tip-follow.ts +70 -7
  461. package/src/components/tooltip.tsx +38 -5
  462. package/src/components/usage-limit-notice.tsx +179 -0
  463. package/src/components/usage-member-list.tsx +792 -0
  464. package/src/components/usage-meter.tsx +382 -0
  465. package/src/components/use-viewer-menu-dismiss.ts +33 -0
  466. package/src/components/user-message-body.tsx +194 -49
  467. package/src/components/workspace-dock.tsx +141 -175
  468. package/src/composer.ts +6 -1
  469. package/src/connect-account-identity.tsx +34 -0
  470. package/src/connect-accounts.tsx +233 -0
  471. package/src/connect-chooser.tsx +336 -0
  472. package/src/connect-panel.tsx +99 -0
  473. package/src/connect-setup.tsx +307 -0
  474. package/src/connect.ts +60 -0
  475. package/src/connection-assets.d.ts +4 -0
  476. package/src/connection-catalog.tsx +162 -0
  477. package/src/connection-discovery.tsx +235 -0
  478. package/src/connection-installed.tsx +51 -0
  479. package/src/connection-logo.tsx +37 -0
  480. package/src/connection-service-logo.tsx +55 -0
  481. package/src/connection-service-presentation.ts +46 -0
  482. package/src/connection-skeleton.tsx +16 -0
  483. package/src/connection-type-picker.tsx +36 -0
  484. package/src/conversation-timeline.ts +92 -0
  485. package/src/desktop.ts +24 -0
  486. package/src/device-authorization.tsx +98 -0
  487. package/src/diffs.ts +16 -0
  488. package/src/discovery-cache.ts +42 -0
  489. package/src/editor.ts +13 -0
  490. package/src/embedded-session-client.ts +104 -0
  491. package/src/file-node-visibility.ts +66 -0
  492. package/src/hooks/channel-cache.ts +104 -0
  493. package/src/hooks/internal.ts +3 -2
  494. package/src/hooks/latest-question.ts +164 -0
  495. package/src/hooks/shared-machines-list.ts +239 -0
  496. package/src/hooks/use-attached-browsers.ts +5 -1
  497. package/src/hooks/use-available-models.ts +20 -14
  498. package/src/hooks/use-browser-frame-stream.ts +25 -3
  499. package/src/hooks/use-browser-session.ts +271 -71
  500. package/src/hooks/use-browser-sessions.ts +7 -1
  501. package/src/hooks/use-channels.ts +32 -10
  502. package/src/hooks/use-codex-accounts.ts +78 -21
  503. package/src/hooks/use-composer.ts +1034 -320
  504. package/src/hooks/use-computer-frame-stream.ts +39 -16
  505. package/src/hooks/use-computer-input-posture.ts +94 -0
  506. package/src/hooks/use-computer-session.ts +110 -32
  507. package/src/hooks/use-computer-sessions.ts +8 -1
  508. package/src/hooks/use-connect.ts +23 -0
  509. package/src/hooks/use-desktop-stream.ts +19 -28
  510. package/src/hooks/use-file-attachments.ts +118 -10
  511. package/src/hooks/use-goal.ts +36 -9
  512. package/src/hooks/use-human-input.ts +31 -4
  513. package/src/hooks/use-last-started-turn-policy.ts +15 -13
  514. package/src/hooks/use-machine-chip.ts +23 -6
  515. package/src/hooks/use-machines.ts +104 -6
  516. package/src/hooks/use-sandbox-files.ts +253 -150
  517. package/src/hooks/use-sandbox-git.ts +58 -29
  518. package/src/hooks/use-session-background-commands.ts +67 -0
  519. package/src/hooks/use-session-capabilities.ts +21 -2
  520. package/src/hooks/use-session-events.ts +759 -433
  521. package/src/hooks/use-session-lineage.ts +28 -6
  522. package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
  523. package/src/hooks/use-session.ts +75 -16
  524. package/src/hooks/use-slash-commands.ts +6 -11
  525. package/src/hooks/use-turn-queue.ts +113 -13
  526. package/src/hooks/use-usage.ts +100 -0
  527. package/src/hooks/use-video-artifact-playback.ts +1 -1
  528. package/src/hooks/use-voice-input.ts +12 -1
  529. package/src/hooks/use-workspace-capture.ts +3 -2
  530. package/src/hooks/use-workspace-edit.ts +23 -5
  531. package/src/hooks/use-workspace-sessions.ts +99 -11
  532. package/src/human-input.ts +12 -1
  533. package/src/identity-link-accounts.tsx +148 -0
  534. package/src/identity-link-consent.tsx +192 -0
  535. package/src/index.ts +157 -12
  536. package/src/interaction.ts +1 -0
  537. package/src/lib/error-message.ts +37 -0
  538. package/src/lib/format.ts +150 -14
  539. package/src/lib/host-theme.ts +511 -0
  540. package/src/lib/interaction-errors.ts +33 -0
  541. package/src/lib/menu-styles.ts +44 -0
  542. package/src/lib/pierre-diffs-loader.ts +53 -0
  543. package/src/lib/workbench-peers.ts +62 -0
  544. package/src/lib/xterm-theme.ts +23 -21
  545. package/src/machines.ts +9 -1
  546. package/src/mcp-connection-status.ts +35 -0
  547. package/src/model-policy.ts +223 -69
  548. package/src/older-history.ts +87 -0
  549. package/src/plugin-details.tsx +185 -0
  550. package/src/plugin-discovery.tsx +196 -0
  551. package/src/provider.tsx +55 -14
  552. package/src/realtime/dropdown-menu.tsx +19 -12
  553. package/src/realtime/realtime-control.tsx +133 -46
  554. package/src/session-auth-recommendation.ts +48 -0
  555. package/src/session-capability-policy.ts +83 -0
  556. package/src/session-context.ts +4 -3
  557. package/src/session-ui.ts +66 -2
  558. package/src/session.ts +18 -1
  559. package/src/sites-ui.tsx +402 -0
  560. package/src/sites.ts +3 -0
  561. package/src/skill-discovery.tsx +208 -0
  562. package/src/terminal.ts +26 -0
  563. package/src/timeline/activity-rail.tsx +171 -80
  564. package/src/timeline/allowance-exhausted-row.tsx +86 -0
  565. package/src/timeline/compaction-copy.ts +42 -0
  566. package/src/timeline/entrance.tsx +28 -3
  567. package/src/timeline/fleet-decision-projection.ts +2 -1
  568. package/src/timeline/fleet-decision-row.tsx +1 -0
  569. package/src/timeline/genie-loading.tsx +136 -0
  570. package/src/timeline/index.ts +11 -0
  571. package/src/timeline/knowledge-receipt.tsx +100 -0
  572. package/src/timeline/parsers.ts +2 -2
  573. package/src/timeline/platform-activity-row.tsx +216 -0
  574. package/src/timeline/presented-image.ts +49 -0
  575. package/src/timeline/projection.ts +1609 -84
  576. package/src/timeline/registry.ts +15 -3
  577. package/src/timeline/retained-image.ts +97 -0
  578. package/src/timeline/rolling-activity.tsx +92 -0
  579. package/src/timeline/screenshot-lightbox.tsx +115 -17
  580. package/src/timeline/shared.tsx +47 -15
  581. package/src/timeline/startup-preference.ts +33 -0
  582. package/src/timeline/startup-timings.tsx +145 -0
  583. package/src/timeline/tool-display-name.ts +8 -6
  584. package/src/timeline/tool-renderers.tsx +497 -128
  585. package/src/timeline/turn-summary.tsx +218 -44
  586. package/src/timeline/types.ts +192 -7
  587. package/src/types/machines.ts +10 -0
  588. package/src/usage/allowance-copy.ts +64 -0
  589. package/src/usage/summary.ts +93 -0
  590. package/src/usage.ts +50 -0
  591. package/styles/compiled.css +2098 -757
  592. package/styles/connect.css +284 -0
  593. package/styles/connect.d.ts +1 -0
  594. package/styles/effective-tokens.css +1 -0
  595. package/styles/index.css +201 -9
  596. package/styles/responsive.css +27 -1
  597. package/styles/session-capability.css +44 -0
  598. package/styles/tokens.css +135 -65
  599. package/dist/chunk-5UQPNLIO.js.map +0 -1
  600. package/dist/chunk-6KLX2RH5.js.map +0 -1
  601. package/dist/chunk-7WCLAEFV.js.map +0 -1
  602. package/dist/chunk-B6WPZSTT.js.map +0 -1
  603. package/dist/chunk-FK6VG4LL.js +0 -90
  604. package/dist/chunk-FK6VG4LL.js.map +0 -1
  605. package/dist/chunk-HA46CYQK.js.map +0 -1
  606. package/dist/chunk-HUIKIDM5.js.map +0 -1
  607. package/dist/chunk-IGC6A2ZI.js.map +0 -1
  608. package/dist/chunk-KCGXPP5V.js.map +0 -1
  609. package/dist/chunk-KZ73RL76.js.map +0 -1
  610. package/dist/chunk-LAKLF4PA.js +0 -141
  611. package/dist/chunk-LAKLF4PA.js.map +0 -1
  612. package/dist/chunk-LLOLUHVG.js.map +0 -1
  613. package/dist/chunk-MKPIAGVL.js +0 -465
  614. package/dist/chunk-MKPIAGVL.js.map +0 -1
  615. package/dist/chunk-PEI6RANI.js.map +0 -1
  616. package/dist/chunk-R3AZOAB5.js.map +0 -1
  617. package/dist/chunk-WSK7G5LE.js +0 -170
  618. package/dist/chunk-WSK7G5LE.js.map +0 -1
  619. package/dist/chunk-XBZWOM2K.js +0 -218
  620. package/dist/chunk-XBZWOM2K.js.map +0 -1
  621. package/dist/chunk-Y7OEDUJ5.js +0 -8810
  622. package/dist/chunk-Y7OEDUJ5.js.map +0 -1
  623. package/dist/fleet-decision-row-GGCAT4E4.js.map +0 -1
  624. package/dist/hooks/use-packs.d.ts +0 -32
  625. package/dist/interactive-workbench-viewers-TOHBXJEE.js +0 -15
  626. package/dist/queue-surface-implementation-2KVJTYXH.js.map +0 -1
  627. package/dist/timeline-annotation-selection-3L7LHGG2.js +0 -187
  628. package/dist/timeline-annotation-selection-3L7LHGG2.js.map +0 -1
  629. package/dist/timeline-annotations-dialog-U7EVLR75.js +0 -196
  630. package/dist/timeline-annotations-dialog-U7EVLR75.js.map +0 -1
  631. package/src/hooks/use-packs.ts +0 -157
  632. /package/dist/{interactive-workbench-viewers-TOHBXJEE.js.map → browser-viewer-SHYKQRNX.js.map} +0 -0
@@ -1,3 +1,6 @@
1
+ import {
2
+ useLatestTaskRunner
3
+ } from "./chunk-WEHMPOXK.js";
1
4
  import {
2
5
  ArtifactSurface,
3
6
  EditableArtifactMessage,
@@ -6,7 +9,7 @@ import {
6
9
  editableArtifactProjectionKey,
7
10
  editableArtifactStatusLabel,
8
11
  useEditableArtifactView
9
- } from "./chunk-KCGXPP5V.js";
12
+ } from "./chunk-Y2PRMYLC.js";
10
13
  import {
11
14
  cn
12
15
  } from "./chunk-22KP6LR5.js";
@@ -37,6 +40,9 @@ var MAX_ZOOM = 4;
37
40
  var RAIL_ITEM_HEIGHT = 116;
38
41
  var RAIL_OVERSCAN = 3;
39
42
  var DEFAULT_RAIL_HEIGHT = 640;
43
+ var MOBILE_RAIL_ITEM_HEIGHT = 44;
44
+ var MOBILE_RAIL_OVERSCAN = 3;
45
+ var DEFAULT_MOBILE_LIST_HEIGHT = 264;
40
46
  var DEFAULT_VIEWPORT = { width: 960, height: 640 };
41
47
  var SPATIAL_TILE = 256;
42
48
  var MAX_SPATIAL_BUCKETS_PER_OBJECT = 1024;
@@ -87,6 +93,14 @@ function PresentationProjectionEditor({
87
93
  }
88
94
  );
89
95
  }
96
+ function nextSlideIndexFromKey(key, activeIndex, length) {
97
+ if (length === 0) return null;
98
+ if (key === "ArrowDown") return Math.min(length - 1, activeIndex + 1);
99
+ if (key === "ArrowUp") return Math.max(0, activeIndex - 1);
100
+ if (key === "Home") return 0;
101
+ if (key === "End") return length - 1;
102
+ return null;
103
+ }
90
104
  function PresentationEditorCore({
91
105
  presentation,
92
106
  revision,
@@ -97,6 +111,7 @@ function PresentationEditorCore({
97
111
  zoom: controlledZoom,
98
112
  defaultZoom = 0.75,
99
113
  readOnly = false,
114
+ authoringBlockedReason,
100
115
  className,
101
116
  onSlideChange,
102
117
  onSelectionChange,
@@ -104,6 +119,8 @@ function PresentationEditorCore({
104
119
  onCommandError,
105
120
  onZoomChange
106
121
  }) {
122
+ const mutationsBlocked = readOnly || authoringBlockedReason !== void 0;
123
+ const authoringStatus = readOnly ? null : authoringBlockedReason === "pending_conflict" ? "An earlier change needs attention" : authoringBlockedReason === "prior_writer" ? "Saving earlier changes\u2026" : null;
107
124
  const slides = presentation.slides.items;
108
125
  const firstSlideId = slides[0]?.id ?? null;
109
126
  const [localSlideId, setLocalSlideId] = useState(
@@ -125,6 +142,11 @@ function PresentationEditorCore({
125
142
  scrollTop: 0,
126
143
  height: DEFAULT_RAIL_HEIGHT
127
144
  });
145
+ const [mobileSelectorOpen, setMobileSelectorOpen] = useState(false);
146
+ const [mobileRail, setMobileRail] = useState({
147
+ scrollTop: 0,
148
+ height: DEFAULT_MOBILE_LIST_HEIGHT
149
+ });
128
150
  const [viewport, setViewport] = useState({
129
151
  scrollLeft: 0,
130
152
  scrollTop: 0,
@@ -137,6 +159,9 @@ function PresentationEditorCore({
137
159
  const [textDraft, setTextDraft] = useState("");
138
160
  const [paintEpoch, setPaintEpoch] = useState(0);
139
161
  const railRef = useRef(null);
162
+ const mobileSelectorTriggerRef = useRef(null);
163
+ const mobileSelectorPanelRef = useRef(null);
164
+ const mobileRailRef = useRef(null);
140
165
  const viewportRef = useRef(null);
141
166
  const stageRef = useRef(null);
142
167
  const canvasRef = useRef(null);
@@ -150,6 +175,7 @@ function PresentationEditorCore({
150
175
  const commandVersionsRef = useRef(/* @__PURE__ */ new Map());
151
176
  const pendingSlideIdRef = useRef(null);
152
177
  const pendingObjectIdRef = useRef(null);
178
+ const mobileRailScrollOnOpenRef = useRef(0);
153
179
  const domId = useId().replaceAll(":", "");
154
180
  const selectionProxyId = `${domId}-presentation-selection`;
155
181
  const instructionsId = `${domId}-presentation-instructions`;
@@ -208,6 +234,44 @@ function PresentationEditorCore({
208
234
  observer.observe(element);
209
235
  return () => observer.disconnect();
210
236
  }, []);
237
+ useLayoutEffect(() => {
238
+ if (!mobileSelectorOpen) return;
239
+ const element = mobileRailRef.current;
240
+ if (!element) return;
241
+ element.scrollTop = mobileRailScrollOnOpenRef.current;
242
+ element.focus();
243
+ const measure = () => setMobileRail((current) => ({
244
+ scrollTop: element.scrollTop,
245
+ height: element.clientHeight || current.height
246
+ }));
247
+ measure();
248
+ if (typeof ResizeObserver === "undefined") return;
249
+ const observer = new ResizeObserver(measure);
250
+ observer.observe(element);
251
+ return () => observer.disconnect();
252
+ }, [mobileSelectorOpen]);
253
+ useEffect(() => {
254
+ if (!mobileSelectorOpen) return;
255
+ const onPointerDown = (event) => {
256
+ const target = event.target;
257
+ if (!(target instanceof Node)) return;
258
+ if (mobileSelectorTriggerRef.current?.contains(target)) return;
259
+ if (mobileSelectorPanelRef.current?.contains(target)) return;
260
+ setMobileSelectorOpen(false);
261
+ };
262
+ const onKeyDown = (event) => {
263
+ if (event.key !== "Escape") return;
264
+ event.preventDefault();
265
+ setMobileSelectorOpen(false);
266
+ mobileSelectorTriggerRef.current?.focus();
267
+ };
268
+ document.addEventListener("pointerdown", onPointerDown);
269
+ document.addEventListener("keydown", onKeyDown);
270
+ return () => {
271
+ document.removeEventListener("pointerdown", onPointerDown);
272
+ document.removeEventListener("keydown", onKeyDown);
273
+ };
274
+ }, [mobileSelectorOpen]);
211
275
  useLayoutEffect(() => {
212
276
  const element = viewportRef.current;
213
277
  if (!element) return;
@@ -419,7 +483,7 @@ function PresentationEditorCore({
419
483
  ]);
420
484
  const runCommit = useCallback(
421
485
  (key, command, rollback, retry) => {
422
- if (!onCommit) return;
486
+ if (mutationsBlocked || !onCommit) return;
423
487
  const version = (commandVersionsRef.current.get(key) ?? 0) + 1;
424
488
  commandVersionsRef.current.set(key, version);
425
489
  const scope = commandScopeRef.current;
@@ -455,11 +519,11 @@ function PresentationEditorCore({
455
519
  }
456
520
  );
457
521
  },
458
- [onCommandError, onCommit]
522
+ [mutationsBlocked, onCommandError, onCommit]
459
523
  );
460
524
  const commitPosition = useCallback(
461
525
  (entry, kind, next) => {
462
- if (!activeSlide || readOnly || entry.readOnly) return;
526
+ if (!activeSlide || mutationsBlocked || entry.readOnly) return;
463
527
  const before = copyPosition(entry.object.position);
464
528
  const after = normalizeEditorPosition(next);
465
529
  if (samePosition(before, after)) return;
@@ -487,10 +551,10 @@ function PresentationEditorCore({
487
551
  );
488
552
  submit();
489
553
  },
490
- [activeSlide, readOnly, runCommit]
554
+ [activeSlide, mutationsBlocked, runCommit]
491
555
  );
492
556
  const insertSlide = useCallback(() => {
493
- if (readOnly) return;
557
+ if (mutationsBlocked) return;
494
558
  const slideId = randomPresentationId();
495
559
  const index = activeIndex < 0 ? slides.length : activeIndex + 1;
496
560
  const command = { kind: "slide-insert", slideId, index };
@@ -506,9 +570,9 @@ function PresentationEditorCore({
506
570
  );
507
571
  };
508
572
  submit();
509
- }, [activeIndex, readOnly, runCommit, slides.length]);
573
+ }, [activeIndex, mutationsBlocked, runCommit, slides.length]);
510
574
  const deleteSlide = useCallback(() => {
511
- if (readOnly || !activeSlide) return;
575
+ if (mutationsBlocked || !activeSlide) return;
512
576
  const command = {
513
577
  kind: "slide-delete",
514
578
  slideId: activeSlide.id,
@@ -516,9 +580,9 @@ function PresentationEditorCore({
516
580
  };
517
581
  const submit = () => runCommit(`slide-delete:${activeSlide.id}`, command, () => void 0, submit);
518
582
  submit();
519
- }, [activeIndex, activeSlide, readOnly, runCommit]);
583
+ }, [activeIndex, activeSlide, mutationsBlocked, runCommit]);
520
584
  const insertTextBox = useCallback(() => {
521
- if (readOnly || !activeSlide) return;
585
+ if (mutationsBlocked || !activeSlide) return;
522
586
  const objectId = randomPresentationId();
523
587
  const position = nextTextBoxPosition(objects, presentation.slideSize);
524
588
  const command = {
@@ -540,9 +604,9 @@ function PresentationEditorCore({
540
604
  );
541
605
  };
542
606
  submit();
543
- }, [activeSlide, objects, presentation.slideSize, readOnly, runCommit]);
607
+ }, [activeSlide, objects, presentation.slideSize, mutationsBlocked, runCommit]);
544
608
  const deleteObject = useCallback(() => {
545
- if (readOnly || !activeSlide || !selected || selected.readOnly) return;
609
+ if (mutationsBlocked || !activeSlide || !selected || selected.readOnly) return;
546
610
  const command = {
547
611
  kind: "object-delete",
548
612
  slideId: activeSlide.id,
@@ -550,10 +614,10 @@ function PresentationEditorCore({
550
614
  };
551
615
  const submit = () => runCommit(`object-delete:${activeSlide.id}:${selected.id}`, command, () => void 0, submit);
552
616
  submit();
553
- }, [activeSlide, readOnly, runCommit, selected]);
617
+ }, [activeSlide, mutationsBlocked, runCommit, selected]);
554
618
  const startTextEdit = useCallback(
555
619
  (entry) => {
556
- if (readOnly || !entry || entry.readOnly || entry.kind !== "shape") return;
620
+ if (mutationsBlocked || !entry || entry.readOnly || entry.kind !== "shape") return;
557
621
  const shape = entry.object;
558
622
  if (shape.geometry === "line") return;
559
623
  const before = shape.text.toString();
@@ -563,7 +627,7 @@ function PresentationEditorCore({
563
627
  setTextEdit(edit);
564
628
  setTextDraft(before);
565
629
  },
566
- [activeSlide, readOnly]
630
+ [activeSlide, mutationsBlocked]
567
631
  );
568
632
  useEffect(() => {
569
633
  if (!textEdit) return;
@@ -573,12 +637,12 @@ function PresentationEditorCore({
573
637
  const finishTextEdit = useCallback(
574
638
  (cancel = false) => {
575
639
  const edit = textEditRef.current;
576
- if (!edit) return;
640
+ if (!edit || !cancel && authoringBlockedReason !== void 0) return;
577
641
  textEditRef.current = null;
578
642
  setTextEdit(null);
579
643
  const { shape, before, slideId } = edit;
580
644
  if (!activeSlide || activeSlide.id !== slideId) return;
581
- if (cancel || readOnly || before === textDraft) return;
645
+ if (cancel || mutationsBlocked || before === textDraft) return;
582
646
  shape.text.set(textDraft);
583
647
  setModelEpoch((value) => value + 1);
584
648
  const command = {
@@ -603,7 +667,7 @@ function PresentationEditorCore({
603
667
  );
604
668
  submit();
605
669
  },
606
- [activeSlide, readOnly, runCommit, textDraft]
670
+ [activeSlide, authoringBlockedReason, mutationsBlocked, runCommit, textDraft]
607
671
  );
608
672
  const cycleObject = useCallback(
609
673
  (direction) => {
@@ -623,6 +687,32 @@ function PresentationEditorCore({
623
687
  },
624
688
  [activeIndex, activeSlide, selectSlide, slides]
625
689
  );
690
+ const toggleMobileSlideSelector = useCallback(() => {
691
+ setMobileSelectorOpen((open) => {
692
+ if (open) return false;
693
+ const index = Math.max(0, activeIndex);
694
+ const height = DEFAULT_MOBILE_LIST_HEIGHT;
695
+ const maxScroll = Math.max(0, slides.length * MOBILE_RAIL_ITEM_HEIGHT - height);
696
+ const scrollTop = Math.max(
697
+ 0,
698
+ Math.min(
699
+ maxScroll,
700
+ index * MOBILE_RAIL_ITEM_HEIGHT - height / 2 + MOBILE_RAIL_ITEM_HEIGHT / 2
701
+ )
702
+ );
703
+ mobileRailScrollOnOpenRef.current = scrollTop;
704
+ setMobileRail({ scrollTop, height });
705
+ return true;
706
+ });
707
+ }, [activeIndex, slides.length]);
708
+ const chooseMobileSlide = useCallback(
709
+ (slide, index) => {
710
+ if (slide !== activeSlide) selectSlide(slide, index);
711
+ setMobileSelectorOpen(false);
712
+ mobileSelectorTriggerRef.current?.focus();
713
+ },
714
+ [activeSlide, selectSlide]
715
+ );
626
716
  const handleCanvasKeyDown = useCallback(
627
717
  (event) => {
628
718
  if (event.metaKey || event.ctrlKey) {
@@ -672,7 +762,7 @@ function PresentationEditorCore({
672
762
  }
673
763
  if (!selected || !event.key.startsWith("Arrow")) return;
674
764
  event.preventDefault();
675
- if (readOnly || selected.readOnly) return;
765
+ if (mutationsBlocked || selected.readOnly) return;
676
766
  const amount = event.shiftKey ? 10 : 1;
677
767
  const dx = event.key === "ArrowLeft" ? -amount : event.key === "ArrowRight" ? amount : 0;
678
768
  const dy = event.key === "ArrowUp" ? -amount : event.key === "ArrowDown" ? amount : 0;
@@ -693,7 +783,7 @@ function PresentationEditorCore({
693
783
  commitPosition,
694
784
  cycleObject,
695
785
  fitSlide,
696
- readOnly,
786
+ mutationsBlocked,
697
787
  selectObject,
698
788
  selected,
699
789
  startTextEdit,
@@ -717,7 +807,7 @@ function PresentationEditorCore({
717
807
  event.preventDefault();
718
808
  event.stopPropagation();
719
809
  selectObject(entry);
720
- if (readOnly || entry.readOnly) return;
810
+ if (mutationsBlocked || entry.readOnly) return;
721
811
  const start = pointFromPointer(event);
722
812
  const before = copyPosition(entry.object.position);
723
813
  dragRef.current = {
@@ -731,7 +821,7 @@ function PresentationEditorCore({
731
821
  setDraftPosition({ objectId: entry.id, position: before });
732
822
  overlayRef.current?.setPointerCapture?.(event.pointerId);
733
823
  },
734
- [pointFromPointer, readOnly, selectObject]
824
+ [pointFromPointer, mutationsBlocked, selectObject]
735
825
  );
736
826
  const handlePointerDown = useCallback(
737
827
  (event) => {
@@ -749,16 +839,17 @@ function PresentationEditorCore({
749
839
  const handlePointerMove = useCallback(
750
840
  (event) => {
751
841
  const drag = dragRef.current;
752
- if (!drag || drag.pointerId !== event.pointerId) return;
842
+ if (!drag || drag.pointerId !== event.pointerId || mutationsBlocked) return;
753
843
  const point = pointFromPointer(event);
754
844
  setDraftPosition({ objectId: drag.object.id, position: positionFromDrag(drag, point) });
755
845
  },
756
- [pointFromPointer]
846
+ [mutationsBlocked, pointFromPointer]
757
847
  );
758
848
  const finishDrag = useCallback(
759
849
  (event, cancel = false) => {
760
850
  const drag = dragRef.current;
761
- if (!drag || drag.pointerId !== event.pointerId) return;
851
+ if (!drag || drag.pointerId !== event.pointerId || !cancel && authoringBlockedReason !== void 0)
852
+ return;
762
853
  dragRef.current = null;
763
854
  const captureTarget = overlayRef.current;
764
855
  if (captureTarget?.hasPointerCapture?.(event.pointerId)) {
@@ -771,19 +862,32 @@ function PresentationEditorCore({
771
862
  const point = pointFromPointer(event);
772
863
  commitPosition(entry, drag.mode, positionFromDrag(drag, point));
773
864
  },
774
- [commitPosition, objectById, pointFromPointer]
865
+ [authoringBlockedReason, commitPosition, objectById, pointFromPointer]
866
+ );
867
+ const handleLostPointerCapture = useCallback(
868
+ (event) => {
869
+ const drag = dragRef.current;
870
+ if (!drag || drag.pointerId !== event.pointerId || authoringBlockedReason !== void 0)
871
+ return;
872
+ dragRef.current = null;
873
+ setDraftPosition(null);
874
+ },
875
+ [authoringBlockedReason]
775
876
  );
776
- const handleLostPointerCapture = useCallback((event) => {
777
- const drag = dragRef.current;
778
- if (!drag || drag.pointerId !== event.pointerId) return;
779
- dragRef.current = null;
780
- setDraftPosition(null);
781
- }, []);
782
877
  const railStart = Math.max(0, Math.floor(rail.scrollTop / RAIL_ITEM_HEIGHT) - RAIL_OVERSCAN);
783
878
  const railEnd = Math.min(
784
879
  slides.length,
785
880
  Math.ceil((rail.scrollTop + rail.height) / RAIL_ITEM_HEIGHT) + RAIL_OVERSCAN
786
881
  );
882
+ const mobileRailStart = Math.max(
883
+ 0,
884
+ Math.floor(mobileRail.scrollTop / MOBILE_RAIL_ITEM_HEIGHT) - MOBILE_RAIL_OVERSCAN
885
+ );
886
+ const mobileRailEnd = Math.min(
887
+ slides.length,
888
+ Math.ceil((mobileRail.scrollTop + mobileRail.height) / MOBILE_RAIL_ITEM_HEIGHT) + MOBILE_RAIL_OVERSCAN
889
+ );
890
+ const slideCountLabel = activeIndex >= 0 ? `${activeIndex + 1} / ${slides.length}` : `0 / ${slides.length}`;
787
891
  const stageWidth = presentation.slideSize.width * zoom;
788
892
  const stageHeight = presentation.slideSize.height * zoom;
789
893
  return /* @__PURE__ */ jsxs(
@@ -793,8 +897,8 @@ function PresentationEditorCore({
793
897
  style: { minHeight: "22rem" },
794
898
  "data-og-presentation-editor": true,
795
899
  "data-og-painted-object-count": visibleObjectIndexes.length,
796
- "data-og-command-state": commandFailure ? "error" : pendingCommands > 0 ? "pending" : "idle",
797
- "aria-busy": pendingCommands > 0 ? "true" : void 0,
900
+ "data-og-command-state": commandFailure || authoringBlockedReason === "pending_conflict" ? "error" : pendingCommands > 0 || authoringBlockedReason === "prior_writer" ? "pending" : "idle",
901
+ "aria-busy": pendingCommands > 0 || authoringBlockedReason === "prior_writer" ? "true" : void 0,
798
902
  children: [
799
903
  /* @__PURE__ */ jsxs(
800
904
  "div",
@@ -815,7 +919,23 @@ function PresentationEditorCore({
815
919
  children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
816
920
  }
817
921
  ),
818
- /* @__PURE__ */ jsx("span", { className: "min-w-16 shrink-0 text-center text-og-xs tabular-nums text-og-fg-muted", children: activeIndex >= 0 ? `${activeIndex + 1} / ${slides.length}` : `0 / ${slides.length}` }),
922
+ /* @__PURE__ */ jsx(
923
+ "button",
924
+ {
925
+ ref: mobileSelectorTriggerRef,
926
+ type: "button",
927
+ "aria-label": "Choose slide",
928
+ "aria-haspopup": "listbox",
929
+ "aria-expanded": mobileSelectorOpen,
930
+ "aria-controls": mobileSelectorOpen ? `${domId}-mobile-slides` : void 0,
931
+ disabled: slides.length === 0,
932
+ "data-og-mobile-slide-selector": true,
933
+ onClick: toggleMobileSlideSelector,
934
+ className: "inline-flex min-h-11 min-w-16 shrink-0 items-center justify-center rounded-og-sm px-2 text-og-xs tabular-nums text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg disabled:opacity-35 sm:hidden",
935
+ children: /* @__PURE__ */ jsx("span", { children: slideCountLabel })
936
+ }
937
+ ),
938
+ /* @__PURE__ */ jsx("span", { className: "hidden min-w-16 shrink-0 text-center text-og-xs tabular-nums text-og-fg-muted sm:inline", children: slideCountLabel }),
819
939
  /* @__PURE__ */ jsx(
820
940
  "button",
821
941
  {
@@ -832,7 +952,7 @@ function PresentationEditorCore({
832
952
  {
833
953
  type: "button",
834
954
  "aria-label": "Add slide",
835
- disabled: readOnly,
955
+ disabled: mutationsBlocked,
836
956
  onClick: insertSlide,
837
957
  className: "ml-0.5 grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg disabled:opacity-35 [&>svg]:size-3.5",
838
958
  children: /* @__PURE__ */ jsx(FilePlus2Icon, {})
@@ -843,7 +963,7 @@ function PresentationEditorCore({
843
963
  {
844
964
  type: "button",
845
965
  "aria-label": "Delete slide",
846
- disabled: readOnly || !activeSlide,
966
+ disabled: mutationsBlocked || !activeSlide,
847
967
  onClick: deleteSlide,
848
968
  className: "grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-status-failed disabled:opacity-35 [&>svg]:size-3.5",
849
969
  children: /* @__PURE__ */ jsx(Trash2Icon, {})
@@ -890,7 +1010,7 @@ function PresentationEditorCore({
890
1010
  {
891
1011
  type: "button",
892
1012
  "aria-label": "Add text box",
893
- disabled: readOnly || !activeSlide,
1013
+ disabled: mutationsBlocked || !activeSlide,
894
1014
  onClick: insertTextBox,
895
1015
  className: "grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg disabled:opacity-35 [&>svg]:size-3.5",
896
1016
  children: /* @__PURE__ */ jsx(TypeIcon, {})
@@ -901,7 +1021,7 @@ function PresentationEditorCore({
901
1021
  {
902
1022
  type: "button",
903
1023
  "aria-label": "Delete selected object",
904
- disabled: readOnly || !selected || selected.readOnly,
1024
+ disabled: mutationsBlocked || !selected || selected.readOnly,
905
1025
  onClick: deleteObject,
906
1026
  className: "grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-status-failed disabled:opacity-35 [&>svg]:size-3.5",
907
1027
  children: /* @__PURE__ */ jsx(Trash2Icon, {})
@@ -912,15 +1032,15 @@ function PresentationEditorCore({
912
1032
  "span",
913
1033
  {
914
1034
  className: "hidden max-w-44 shrink-0 truncate border-l border-og-border px-2 text-og-xs text-og-fg-subtle sm:block",
915
- title: commandFailure ? "Change not saved" : pendingCommands > 0 ? "Saving\u2026" : readOnly ? "View only" : selected ? `${objectLabel(selected)}${selected.readOnly ? " \xB7 View only" : ""}` : "Select an object to edit",
916
- children: commandFailure ? "Change not saved" : pendingCommands > 0 ? "Saving\u2026" : readOnly ? "View only" : selected ? `${objectLabel(selected)}${selected.readOnly ? " \xB7 View only" : ""}` : "Select an object to edit"
1035
+ title: commandFailure ? "Change not saved" : authoringStatus ? authoringStatus : pendingCommands > 0 ? "Saving\u2026" : mutationsBlocked ? "View only" : selected ? `${objectLabel(selected)}${selected.readOnly ? " \xB7 View only" : ""}` : "Select an object to edit",
1036
+ children: commandFailure ? "Change not saved" : authoringStatus ? authoringStatus : pendingCommands > 0 ? "Saving\u2026" : mutationsBlocked ? "View only" : selected ? `${objectLabel(selected)}${selected.readOnly ? " \xB7 View only" : ""}` : "Select an object to edit"
917
1037
  }
918
1038
  )
919
1039
  ]
920
1040
  }
921
1041
  ),
922
- /* @__PURE__ */ jsx("div", { role: "status", "aria-live": "polite", className: "sr-only", children: commandFailure?.message ?? (pendingCommands > 0 ? "Saving presentation changes" : "") }),
923
- /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 min-w-0 flex-1", children: [
1042
+ /* @__PURE__ */ jsx("div", { role: "status", "aria-live": "polite", className: "sr-only", children: commandFailure?.message ?? authoringStatus ?? (pendingCommands > 0 ? "Saving presentation changes" : "") }),
1043
+ /* @__PURE__ */ jsxs("div", { className: "relative flex min-h-0 min-w-0 flex-1", children: [
924
1044
  /* @__PURE__ */ jsx(
925
1045
  "div",
926
1046
  {
@@ -943,12 +1063,7 @@ function PresentationEditorCore({
943
1063
  }));
944
1064
  },
945
1065
  onKeyDown: (event) => {
946
- if (slides.length === 0) return;
947
- let nextIndex = null;
948
- if (event.key === "ArrowDown") nextIndex = Math.min(slides.length - 1, activeIndex + 1);
949
- else if (event.key === "ArrowUp") nextIndex = Math.max(0, activeIndex - 1);
950
- else if (event.key === "Home") nextIndex = 0;
951
- else if (event.key === "End") nextIndex = slides.length - 1;
1066
+ const nextIndex = nextSlideIndexFromKey(event.key, activeIndex, slides.length);
952
1067
  if (nextIndex === null) return;
953
1068
  event.preventDefault();
954
1069
  const next = slides[nextIndex];
@@ -1001,6 +1116,96 @@ function PresentationEditorCore({
1001
1116
  }) })
1002
1117
  }
1003
1118
  ),
1119
+ mobileSelectorOpen ? /* @__PURE__ */ jsx(
1120
+ "div",
1121
+ {
1122
+ ref: mobileSelectorPanelRef,
1123
+ className: "absolute left-2 top-2 z-40 max-w-56 overflow-hidden rounded-og-md border border-og-border bg-og-surface-1 shadow-og-md sm:hidden",
1124
+ style: { width: "calc(100% - 1rem)" },
1125
+ children: /* @__PURE__ */ jsx(
1126
+ "div",
1127
+ {
1128
+ ref: mobileRailRef,
1129
+ id: `${domId}-mobile-slides`,
1130
+ role: "listbox",
1131
+ tabIndex: 0,
1132
+ "aria-label": "Slides",
1133
+ "aria-orientation": "vertical",
1134
+ "aria-activedescendant": activeSlide && activeIndex >= mobileRailStart && activeIndex < mobileRailEnd ? `${domId}-mobile-slide-${safeDomId(activeSlide.id)}` : void 0,
1135
+ className: "max-h-72 overflow-y-auto outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-og-accent",
1136
+ "data-og-mobile-slide-list": true,
1137
+ "data-og-window-start": mobileRailStart,
1138
+ "data-og-window-end": mobileRailEnd,
1139
+ onScroll: (event) => {
1140
+ const scrollTop = event.currentTarget.scrollTop;
1141
+ const height = event.currentTarget.clientHeight;
1142
+ setMobileRail((current) => ({
1143
+ scrollTop,
1144
+ height: height || current.height
1145
+ }));
1146
+ },
1147
+ onKeyDown: (event) => {
1148
+ if (event.key === "Escape") {
1149
+ event.preventDefault();
1150
+ setMobileSelectorOpen(false);
1151
+ mobileSelectorTriggerRef.current?.focus();
1152
+ return;
1153
+ }
1154
+ const nextIndex = nextSlideIndexFromKey(event.key, activeIndex, slides.length);
1155
+ if (nextIndex === null) return;
1156
+ event.preventDefault();
1157
+ const next = slides[nextIndex];
1158
+ if (!next) return;
1159
+ if (next !== activeSlide) selectSlide(next, nextIndex);
1160
+ const list = event.currentTarget;
1161
+ const top = nextIndex * MOBILE_RAIL_ITEM_HEIGHT;
1162
+ const bottom = top + MOBILE_RAIL_ITEM_HEIGHT;
1163
+ if (top < list.scrollTop) list.scrollTop = top;
1164
+ else if (bottom > list.scrollTop + list.clientHeight) {
1165
+ list.scrollTop = bottom - list.clientHeight;
1166
+ }
1167
+ },
1168
+ children: /* @__PURE__ */ jsx(
1169
+ "div",
1170
+ {
1171
+ className: "relative w-full",
1172
+ style: { height: slides.length * MOBILE_RAIL_ITEM_HEIGHT },
1173
+ children: slides.slice(mobileRailStart, mobileRailEnd).map((slide, offset) => {
1174
+ const index = mobileRailStart + offset;
1175
+ const active = slide === activeSlide;
1176
+ return /* @__PURE__ */ jsxs(
1177
+ "button",
1178
+ {
1179
+ id: `${domId}-mobile-slide-${safeDomId(slide.id)}`,
1180
+ type: "button",
1181
+ role: "option",
1182
+ tabIndex: -1,
1183
+ "aria-selected": active,
1184
+ "aria-label": `Slide ${index + 1}${slide.title ? `: ${slide.title}` : ""}`,
1185
+ onClick: () => chooseMobileSlide(slide, index),
1186
+ className: cn(
1187
+ "absolute left-0 flex min-h-11 w-full items-center gap-2 px-2 text-left",
1188
+ active ? "bg-og-surface-3 text-og-fg" : "text-og-fg-muted hover:bg-og-surface-3/70"
1189
+ ),
1190
+ style: {
1191
+ top: index * MOBILE_RAIL_ITEM_HEIGHT,
1192
+ height: MOBILE_RAIL_ITEM_HEIGHT
1193
+ },
1194
+ "data-og-mobile-slide-index": index,
1195
+ children: [
1196
+ /* @__PURE__ */ jsx("span", { className: "w-7 shrink-0 text-right text-og-xs tabular-nums text-og-fg-subtle", children: index + 1 }),
1197
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-og-sm", children: slide.title || `Slide ${index + 1}` })
1198
+ ]
1199
+ },
1200
+ slide.id
1201
+ );
1202
+ })
1203
+ }
1204
+ )
1205
+ }
1206
+ )
1207
+ }
1208
+ ) : null,
1004
1209
  /* @__PURE__ */ jsxs(
1005
1210
  "div",
1006
1211
  {
@@ -1035,7 +1240,10 @@ function PresentationEditorCore({
1035
1240
  "button",
1036
1241
  {
1037
1242
  type: "button",
1038
- onClick: commandFailure.retry,
1243
+ disabled: mutationsBlocked,
1244
+ onClick: () => {
1245
+ if (!mutationsBlocked) commandFailure.retry();
1246
+ },
1039
1247
  className: "shrink-0 rounded-og-xs px-1.5 py-0.5 font-medium outline-hidden hover:bg-og-surface-3 focus-visible:ring-2 focus-visible:ring-og-accent",
1040
1248
  children: "Retry"
1041
1249
  }
@@ -1050,6 +1258,7 @@ function PresentationEditorCore({
1050
1258
  className: "relative mx-auto shrink-0 overflow-hidden shadow-og-lg",
1051
1259
  style: { width: stageWidth, height: stageHeight, backgroundColor: "#fff" },
1052
1260
  "data-og-presentation-stage": true,
1261
+ "data-og-theme": "light",
1053
1262
  children: [
1054
1263
  /* @__PURE__ */ jsx(
1055
1264
  "canvas",
@@ -1068,7 +1277,7 @@ function PresentationEditorCore({
1068
1277
  tabIndex: 0,
1069
1278
  "aria-label": `Slide ${activeIndex + 1} editor`,
1070
1279
  "aria-describedby": selected ? `${instructionsId} ${selectionProxyId}` : instructionsId,
1071
- "aria-readonly": readOnly || selected?.readOnly || void 0,
1280
+ "aria-readonly": mutationsBlocked || selected?.readOnly || void 0,
1072
1281
  viewBox: `0 0 ${presentation.slideSize.width} ${presentation.slideSize.height}`,
1073
1282
  className: "absolute inset-0 size-full touch-none outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-og-accent",
1074
1283
  onKeyDown: handleCanvasKeyDown,
@@ -1092,19 +1301,19 @@ function PresentationEditorCore({
1092
1301
  width: effectiveSelectedPosition.width,
1093
1302
  height: effectiveSelectedPosition.height,
1094
1303
  fill: "transparent",
1095
- stroke: "var(--og-accent, #3b82f6)",
1304
+ stroke: "var(--og-color-accent-deep)",
1096
1305
  strokeWidth: 2,
1097
1306
  vectorEffect: "non-scaling-stroke",
1098
1307
  pointerEvents: "none"
1099
1308
  }
1100
1309
  ),
1101
- !readOnly && !selected.readOnly ? /* @__PURE__ */ jsx(
1310
+ !mutationsBlocked && !selected.readOnly ? /* @__PURE__ */ jsx(
1102
1311
  "circle",
1103
1312
  {
1104
1313
  cx: effectiveSelectedPosition.left + effectiveSelectedPosition.width,
1105
1314
  cy: effectiveSelectedPosition.top + effectiveSelectedPosition.height,
1106
1315
  r: 6 / zoom,
1107
- fill: "var(--og-accent, #3b82f6)",
1316
+ fill: "var(--og-color-accent-deep)",
1108
1317
  stroke: "white",
1109
1318
  strokeWidth: 1.5,
1110
1319
  vectorEffect: "non-scaling-stroke",
@@ -1125,9 +1334,14 @@ function PresentationEditorCore({
1125
1334
  ref: editorRef,
1126
1335
  "aria-label": `Edit ${textEdit.shape.name}`,
1127
1336
  value: textDraft,
1337
+ readOnly: mutationsBlocked,
1128
1338
  maxLength: 1e6,
1129
- onChange: (event) => setTextDraft(event.currentTarget.value),
1130
- onInput: (event) => setTextDraft(event.currentTarget.value),
1339
+ onChange: (event) => {
1340
+ if (!mutationsBlocked) setTextDraft(event.currentTarget.value);
1341
+ },
1342
+ onInput: (event) => {
1343
+ if (!mutationsBlocked) setTextDraft(event.currentTarget.value);
1344
+ },
1131
1345
  onBlur: () => finishTextEdit(),
1132
1346
  onKeyDown: (event) => {
1133
1347
  if (event.key === "Escape") {
@@ -1170,6 +1384,7 @@ function PresentationEditorCore({
1170
1384
  function PresentationArtifactSurface({
1171
1385
  presentation,
1172
1386
  title = "Presentation",
1387
+ showHeader,
1173
1388
  subtitle,
1174
1389
  actions,
1175
1390
  busy,
@@ -1182,6 +1397,7 @@ function PresentationArtifactSurface({
1182
1397
  {
1183
1398
  modality: "presentation",
1184
1399
  title,
1400
+ showHeader,
1185
1401
  subtitle: subtitle ?? `${count} slide${count === 1 ? "" : "s"}`,
1186
1402
  actions,
1187
1403
  busy,
@@ -1193,6 +1409,7 @@ function PresentationArtifactSurface({
1193
1409
  function PresentationProjectionArtifactSurface({
1194
1410
  projection,
1195
1411
  title = "Presentation",
1412
+ showHeader,
1196
1413
  subtitle,
1197
1414
  actions,
1198
1415
  busy,
@@ -1205,6 +1422,7 @@ function PresentationProjectionArtifactSurface({
1205
1422
  {
1206
1423
  modality: "presentation",
1207
1424
  title,
1425
+ showHeader,
1208
1426
  subtitle: subtitle ?? `${count} slide${count === 1 ? "" : "s"}`,
1209
1427
  actions,
1210
1428
  busy,
@@ -2464,6 +2682,7 @@ var DEFAULT_PRESENTATION_TEXT_STYLE = Object.freeze({
2464
2682
  function EditablePresentationArtifactSurface({
2465
2683
  session,
2466
2684
  title = "Presentation",
2685
+ showHeader,
2467
2686
  subtitle,
2468
2687
  readOnly = false,
2469
2688
  onCommit,
@@ -2479,30 +2698,34 @@ function EditablePresentationArtifactSurface({
2479
2698
  error: null
2480
2699
  });
2481
2700
  const loadGeneration = useRef2(0);
2701
+ const scheduleLoad = useLatestTaskRunner(session);
2482
2702
  const sceneNodes = useRef2(/* @__PURE__ */ new Map());
2483
2703
  useEffect2(() => {
2484
2704
  const generation = ++loadGeneration.current;
2485
2705
  let cancelled = false;
2486
2706
  setState((current) => ({ ...current, loading: true, error: null }));
2487
- void composePresentationEditorProjection(session).then(
2488
- (composed) => {
2489
- if (cancelled || generation !== loadGeneration.current) return;
2490
- sceneNodes.current = new Map(composed.sceneNodes);
2491
- setState({ composed, loading: false, error: null });
2492
- },
2493
- (cause) => {
2494
- if (cancelled || generation !== loadGeneration.current) return;
2495
- setState({
2496
- composed: null,
2497
- loading: false,
2498
- error: asEditableArtifactError(cause, "Could not open this presentation")
2499
- });
2500
- }
2501
- );
2707
+ scheduleLoad(async () => {
2708
+ if (cancelled || generation !== loadGeneration.current) return;
2709
+ await composePresentationEditorProjection(session).then(
2710
+ (composed) => {
2711
+ if (cancelled || generation !== loadGeneration.current) return;
2712
+ sceneNodes.current = new Map(composed.sceneNodes);
2713
+ setState({ composed, loading: false, error: null });
2714
+ },
2715
+ (cause) => {
2716
+ if (cancelled || generation !== loadGeneration.current) return;
2717
+ setState({
2718
+ composed: null,
2719
+ loading: false,
2720
+ error: asEditableArtifactError(cause, "Could not open this presentation")
2721
+ });
2722
+ }
2723
+ );
2724
+ });
2502
2725
  return () => {
2503
2726
  cancelled = true;
2504
2727
  };
2505
- }, [invalidator, retryEpoch, session]);
2728
+ }, [invalidator, retryEpoch, scheduleLoad, session]);
2506
2729
  const refresh = useCallback2(() => setRetryEpoch((value) => value + 1), []);
2507
2730
  const writable = !readOnly && view.writable;
2508
2731
  const applyCommit = useCallback2(
@@ -2510,6 +2733,7 @@ function EditablePresentationArtifactSurface({
2510
2733
  const composed = state.composed;
2511
2734
  if (!composed) throw new Error("Presentation projection is not ready");
2512
2735
  if (!writable) throw new Error("This presentation is read only");
2736
+ if (view.authoringBlockedReason) throw new Error("An earlier change must settle first");
2513
2737
  if (commit.revision !== void 0 && String(commit.revision) !== String(composed.projection.revision)) {
2514
2738
  throw new Error("The presentation changed; retry this edit on the latest version");
2515
2739
  }
@@ -2619,7 +2843,15 @@ function EditablePresentationArtifactSurface({
2619
2843
  notifyPresentationCommit(onCommit, onCommandError, commit);
2620
2844
  refresh();
2621
2845
  },
2622
- [onCommandError, onCommit, refresh, session, state.composed, writable]
2846
+ [
2847
+ onCommandError,
2848
+ onCommit,
2849
+ refresh,
2850
+ session,
2851
+ state.composed,
2852
+ view.authoringBlockedReason,
2853
+ writable
2854
+ ]
2623
2855
  );
2624
2856
  const projection = state.composed?.projection ?? null;
2625
2857
  const status = editableArtifactStatusLabel(view);
@@ -2629,10 +2861,12 @@ function EditablePresentationArtifactSurface({
2629
2861
  {
2630
2862
  ...surfaceProps,
2631
2863
  title,
2864
+ showHeader,
2632
2865
  subtitle: subtitle ?? `${projection.slides.length} slide${projection.slides.length === 1 ? "" : "s"}${writable ? "" : " \xB7 Read only"}`,
2633
2866
  projection,
2634
2867
  commit: writable ? applyCommit : void 0,
2635
2868
  readOnly: !writable,
2869
+ authoringBlockedReason: view.authoringBlockedReason,
2636
2870
  busy: state.loading,
2637
2871
  onCommandError
2638
2872
  }
@@ -2641,6 +2875,7 @@ function EditablePresentationArtifactSurface({
2641
2875
  {
2642
2876
  modality: "presentation",
2643
2877
  title,
2878
+ showHeader,
2644
2879
  subtitle: subtitle ?? status,
2645
2880
  actions: surfaceProps.actions,
2646
2881
  busy: !accessRevoked && !state.error,
@@ -3231,4 +3466,4 @@ export {
3231
3466
  PresentationProjectionArtifactSurface,
3232
3467
  EditablePresentationArtifactSurface
3233
3468
  };
3234
- //# sourceMappingURL=chunk-PEI6RANI.js.map
3469
+ //# sourceMappingURL=chunk-PNY3JKBJ.js.map