@sixb/app 0.2.0 → 0.2.3

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 (469) hide show
  1. package/assets/connector-icons/README.md +1 -0
  2. package/assets/connector-icons/fleetio.ico +0 -0
  3. package/dist/agent/activity-label.d.ts.map +1 -1
  4. package/dist/agent/agent-chat.d.ts +9 -2
  5. package/dist/agent/agent-chat.d.ts.map +1 -1
  6. package/dist/agent/agent-panel.d.ts +9 -1
  7. package/dist/agent/agent-panel.d.ts.map +1 -1
  8. package/dist/agent/agent-surface.d.ts.map +1 -1
  9. package/dist/agent/artifact-card.d.ts +3 -1
  10. package/dist/agent/artifact-card.d.ts.map +1 -1
  11. package/dist/agent/artifact-panel.d.ts +7 -1
  12. package/dist/agent/artifact-panel.d.ts.map +1 -1
  13. package/dist/agent/background/background-card.d.ts +10 -0
  14. package/dist/agent/background/background-card.d.ts.map +1 -0
  15. package/dist/agent/background/background-tool-row.d.ts +9 -0
  16. package/dist/agent/background/background-tool-row.d.ts.map +1 -0
  17. package/dist/agent/background/context.d.ts +23 -0
  18. package/dist/agent/background/context.d.ts.map +1 -0
  19. package/dist/agent/background/interpret.d.ts +116 -0
  20. package/dist/agent/background/interpret.d.ts.map +1 -0
  21. package/dist/agent/bash/bash-tool-view.d.ts.map +1 -1
  22. package/dist/agent/bash/interpret.d.ts +4 -0
  23. package/dist/agent/bash/interpret.d.ts.map +1 -1
  24. package/dist/agent/components/composer-menu.d.ts +3 -1
  25. package/dist/agent/components/composer-menu.d.ts.map +1 -1
  26. package/dist/agent/components/composer-place.d.ts +13 -0
  27. package/dist/agent/components/composer-place.d.ts.map +1 -0
  28. package/dist/agent/components/composer.d.ts +23 -1
  29. package/dist/agent/components/composer.d.ts.map +1 -1
  30. package/dist/agent/components/computer-place.d.ts +3 -1
  31. package/dist/agent/components/computer-place.d.ts.map +1 -1
  32. package/dist/agent/components/context-chips.d.ts.map +1 -1
  33. package/dist/agent/components/context-meter.d.ts +1 -1
  34. package/dist/agent/components/conversation-panel.d.ts +3 -1
  35. package/dist/agent/components/conversation-panel.d.ts.map +1 -1
  36. package/dist/agent/components/message-parts.d.ts +3 -1
  37. package/dist/agent/components/message-parts.d.ts.map +1 -1
  38. package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -1
  39. package/dist/agent/components/transcript.d.ts +6 -0
  40. package/dist/agent/components/transcript.d.ts.map +1 -1
  41. package/dist/agent/components/web-fetch-tool-view.d.ts.map +1 -1
  42. package/dist/agent/composer-insertion.d.ts +24 -0
  43. package/dist/agent/composer-insertion.d.ts.map +1 -0
  44. package/dist/agent/delegation/child-parts.d.ts +2 -0
  45. package/dist/agent/delegation/child-parts.d.ts.map +1 -1
  46. package/dist/agent/delegation/use-children.d.ts +5 -5
  47. package/dist/agent/delegation/use-children.d.ts.map +1 -1
  48. package/dist/agent/hooks/use-agent-conversation.d.ts +24 -4
  49. package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
  50. package/dist/agent/hooks/use-new-thread-place.d.ts +70 -0
  51. package/dist/agent/hooks/use-new-thread-place.d.ts.map +1 -0
  52. package/dist/agent/hooks/use-thread-lists.d.ts +40 -0
  53. package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
  54. package/dist/agent/i18n/en.d.ts +74 -0
  55. package/dist/agent/i18n/en.d.ts.map +1 -1
  56. package/dist/agent/i18n/fr.d.ts.map +1 -1
  57. package/dist/agent/i18n/index.d.ts +126 -0
  58. package/dist/agent/i18n/index.d.ts.map +1 -1
  59. package/dist/agent/observed-conversation.d.ts.map +1 -1
  60. package/dist/agent/publish-artifact/interpret.d.ts +8 -2
  61. package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
  62. package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts +9 -0
  63. package/dist/agent/publish-artifact/open-artifact-tool-view.d.ts.map +1 -0
  64. package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +4 -2
  65. package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -1
  66. package/dist/agent/publish-artifact/use-live-publishes.d.ts +3 -3
  67. package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -1
  68. package/dist/agent/tool-views/built-in.d.ts.map +1 -1
  69. package/dist/agent/types.d.ts +3 -1
  70. package/dist/agent/types.d.ts.map +1 -1
  71. package/dist/agent/utils/web-fetch.d.ts +33 -1
  72. package/dist/agent/utils/web-fetch.d.ts.map +1 -1
  73. package/dist/agent/utils/web-search.d.ts +14 -2
  74. package/dist/agent/utils/web-search.d.ts.map +1 -1
  75. package/dist/artifacts/artifact-page.d.ts.map +1 -1
  76. package/dist/artifacts/artifact-viewer.d.ts +16 -0
  77. package/dist/artifacts/artifact-viewer.d.ts.map +1 -0
  78. package/dist/artifacts/card-details.d.ts +1 -1
  79. package/dist/artifacts/card-details.d.ts.map +1 -1
  80. package/dist/artifacts/card-preview.d.ts.map +1 -1
  81. package/dist/artifacts/comments-context.d.ts +48 -0
  82. package/dist/artifacts/comments-context.d.ts.map +1 -0
  83. package/dist/artifacts/edit-session.d.ts +6 -6
  84. package/dist/artifacts/edit-session.d.ts.map +1 -1
  85. package/dist/artifacts/file-source.d.ts.map +1 -1
  86. package/dist/artifacts/frame.d.ts +10 -2
  87. package/dist/artifacts/frame.d.ts.map +1 -1
  88. package/dist/artifacts/guest-badge.d.ts +8 -0
  89. package/dist/artifacts/guest-badge.d.ts.map +1 -0
  90. package/dist/artifacts/held-artifact.d.ts +19 -0
  91. package/dist/artifacts/held-artifact.d.ts.map +1 -0
  92. package/dist/artifacts/holders.d.ts +10 -0
  93. package/dist/artifacts/holders.d.ts.map +1 -0
  94. package/dist/artifacts/live/boards.d.ts +15 -0
  95. package/dist/artifacts/live/boards.d.ts.map +1 -0
  96. package/dist/artifacts/live/canvas.d.ts +79 -0
  97. package/dist/artifacts/live/canvas.d.ts.map +1 -0
  98. package/dist/artifacts/live/header.d.ts +29 -0
  99. package/dist/artifacts/live/header.d.ts.map +1 -0
  100. package/dist/artifacts/live/hooks.d.ts +21 -0
  101. package/dist/artifacts/live/hooks.d.ts.map +1 -0
  102. package/dist/artifacts/live/presence.d.ts +32 -0
  103. package/dist/artifacts/live/presence.d.ts.map +1 -0
  104. package/dist/artifacts/live/session.d.ts +130 -0
  105. package/dist/artifacts/live/session.d.ts.map +1 -0
  106. package/dist/artifacts/live/view.d.ts +28 -0
  107. package/dist/artifacts/live/view.d.ts.map +1 -0
  108. package/dist/artifacts/messages.d.ts +424 -14
  109. package/dist/artifacts/messages.d.ts.map +1 -1
  110. package/dist/artifacts/page-queries.d.ts +2 -2
  111. package/dist/artifacts/page-queries.d.ts.map +1 -1
  112. package/dist/artifacts/page-state.d.ts.map +1 -1
  113. package/dist/artifacts/publish-edit.d.ts +24 -14
  114. package/dist/artifacts/publish-edit.d.ts.map +1 -1
  115. package/dist/artifacts/queries.d.ts +490 -9
  116. package/dist/artifacts/queries.d.ts.map +1 -1
  117. package/dist/artifacts/references/references.d.ts.map +1 -1
  118. package/dist/artifacts/renderers/canvas/arrows.d.ts +0 -18
  119. package/dist/artifacts/renderers/canvas/arrows.d.ts.map +1 -1
  120. package/dist/artifacts/renderers/canvas/board-editor.d.ts +43 -0
  121. package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -0
  122. package/dist/artifacts/renderers/canvas/board-properties.d.ts +37 -0
  123. package/dist/artifacts/renderers/canvas/board-properties.d.ts.map +1 -0
  124. package/dist/artifacts/renderers/canvas/board-source.d.ts +18 -0
  125. package/dist/artifacts/renderers/canvas/board-source.d.ts.map +1 -0
  126. package/dist/artifacts/renderers/canvas/board.d.ts +64 -19
  127. package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
  128. package/dist/artifacts/renderers/canvas/canvas.d.ts +13 -4
  129. package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
  130. package/dist/artifacts/renderers/canvas/comment-pins.d.ts +84 -0
  131. package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -0
  132. package/dist/artifacts/renderers/canvas/commenting.d.ts +58 -0
  133. package/dist/artifacts/renderers/canvas/commenting.d.ts.map +1 -0
  134. package/dist/artifacts/renderers/canvas/comments-panel.d.ts +27 -0
  135. package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -0
  136. package/dist/artifacts/renderers/canvas/comments.d.ts +56 -0
  137. package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -0
  138. package/dist/artifacts/renderers/canvas/draft.d.ts +7 -6
  139. package/dist/artifacts/renderers/canvas/draft.d.ts.map +1 -1
  140. package/dist/artifacts/renderers/canvas/edit-mode.d.ts +19 -2
  141. package/dist/artifacts/renderers/canvas/edit-mode.d.ts.map +1 -1
  142. package/dist/artifacts/renderers/canvas/focus.d.ts +40 -5
  143. package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
  144. package/dist/artifacts/renderers/canvas/items.d.ts +47 -4
  145. package/dist/artifacts/renderers/canvas/items.d.ts.map +1 -1
  146. package/dist/artifacts/renderers/canvas/layout.d.ts +5 -8
  147. package/dist/artifacts/renderers/canvas/layout.d.ts.map +1 -1
  148. package/dist/artifacts/renderers/canvas/presence.d.ts +21 -0
  149. package/dist/artifacts/renderers/canvas/presence.d.ts.map +1 -0
  150. package/dist/artifacts/renderers/canvas/previews.d.ts +54 -0
  151. package/dist/artifacts/renderers/canvas/previews.d.ts.map +1 -0
  152. package/dist/artifacts/renderers/canvas/renderer.d.ts +11 -2
  153. package/dist/artifacts/renderers/canvas/renderer.d.ts.map +1 -1
  154. package/dist/artifacts/renderers/canvas/thumbnail.d.ts +5 -2
  155. package/dist/artifacts/renderers/canvas/thumbnail.d.ts.map +1 -1
  156. package/dist/artifacts/version-menu.d.ts +19 -0
  157. package/dist/artifacts/version-menu.d.ts.map +1 -0
  158. package/dist/artifacts/view-context.d.ts +43 -0
  159. package/dist/artifacts/view-context.d.ts.map +1 -0
  160. package/dist/artifacts/viewer.d.ts.map +1 -1
  161. package/dist/build.d.ts +5 -0
  162. package/dist/build.d.ts.map +1 -1
  163. package/dist/{chunk-fw2bm6dq.js → chunk-001c4gnk.js} +8086 -3870
  164. package/dist/chunk-001c4gnk.js.map +204 -0
  165. package/dist/chunk-00wggsst.js +7 -0
  166. package/dist/chunk-00wggsst.js.map +10 -0
  167. package/dist/chunk-5crvhjp2.js +4704 -0
  168. package/dist/chunk-5crvhjp2.js.map +28 -0
  169. package/dist/{chunk-q69001w3.js → chunk-694m74s7.js} +7 -1
  170. package/dist/{chunk-q69001w3.js.map → chunk-694m74s7.js.map} +3 -3
  171. package/dist/{chunk-4mprsd2n.js → chunk-fg6thecb.js} +25 -1
  172. package/dist/chunk-fg6thecb.js.map +10 -0
  173. package/dist/{chunk-j9653e83.js → chunk-fwb9mxwm.js} +1 -1
  174. package/dist/{chunk-km25essq.js → chunk-kes4ygmz.js} +1 -1
  175. package/dist/{chunk-kwbw4dyk.js → chunk-ryed2jq8.js} +1 -1
  176. package/dist/codegen.d.ts.map +1 -1
  177. package/dist/createCustomApp.d.ts.map +1 -1
  178. package/dist/index.d.ts +7 -1
  179. package/dist/index.d.ts.map +1 -1
  180. package/dist/index.js +930 -309
  181. package/dist/index.js.map +15 -10
  182. package/dist/locale-messages.d.ts +12 -0
  183. package/dist/locale-messages.d.ts.map +1 -1
  184. package/dist/locale.d.ts +12 -0
  185. package/dist/locale.d.ts.map +1 -1
  186. package/dist/locale.js +1 -1
  187. package/dist/metadata.d.ts +8 -0
  188. package/dist/metadata.d.ts.map +1 -1
  189. package/dist/pages/console/action-run.d.ts.map +1 -1
  190. package/dist/pages/console/data/connectors.d.ts.map +1 -1
  191. package/dist/pages/console/data/datasets.d.ts.map +1 -1
  192. package/dist/pages/console/data/lake-health.d.ts +3 -0
  193. package/dist/pages/console/data/lake-health.d.ts.map +1 -0
  194. package/dist/pages/console/data/messages.d.ts +98 -2
  195. package/dist/pages/console/data/messages.d.ts.map +1 -1
  196. package/dist/pages/console/data/pipelines.d.ts.map +1 -1
  197. package/dist/pages/console/data/projections.d.ts.map +1 -1
  198. package/dist/pages/console/data/shared.d.ts.map +1 -1
  199. package/dist/pages/console/data/syncs.d.ts.map +1 -1
  200. package/dist/pages/console/ontology/action-runs.d.ts.map +1 -1
  201. package/dist/pages/console/ontology/actions.d.ts.map +1 -1
  202. package/dist/pages/console/ontology/components/action-button.d.ts.map +1 -1
  203. package/dist/pages/console/ontology/components/artifact-picker.d.ts +36 -0
  204. package/dist/pages/console/ontology/components/artifact-picker.d.ts.map +1 -0
  205. package/dist/pages/console/ontology/components/object-query-bar.d.ts.map +1 -1
  206. package/dist/pages/console/ontology/lib/action-params.d.ts +2 -0
  207. package/dist/pages/console/ontology/lib/action-params.d.ts.map +1 -1
  208. package/dist/pages/console/ontology/lineage/properties-panel.d.ts +2 -1
  209. package/dist/pages/console/ontology/lineage/properties-panel.d.ts.map +1 -1
  210. package/dist/pages/console/ontology/object-page.d.ts.map +1 -1
  211. package/dist/pages/console/ontology/object-type.d.ts.map +1 -1
  212. package/dist/pages/console/ontology/object-types.d.ts.map +1 -1
  213. package/dist/pages/console/ontology/objects.d.ts.map +1 -1
  214. package/dist/pages/console/ontology/rules.d.ts.map +1 -1
  215. package/dist/pages/console/ontology/workflow.d.ts.map +1 -1
  216. package/dist/pages/console/ontology/workflows/run-input-form.d.ts.map +1 -1
  217. package/dist/pages/console/ontology/workflows/schema-shape.d.ts.map +1 -1
  218. package/dist/pages/console/ontology/workflows.d.ts.map +1 -1
  219. package/dist/pages/console/skeletons.d.ts +30 -0
  220. package/dist/pages/console/skeletons.d.ts.map +1 -0
  221. package/dist/pages/console/workflow-run.d.ts.map +1 -1
  222. package/dist/pages/section-page.d.ts +11 -1
  223. package/dist/pages/section-page.d.ts.map +1 -1
  224. package/dist/pages/section-ui.d.ts +25 -3
  225. package/dist/pages/section-ui.d.ts.map +1 -1
  226. package/dist/pages/settings/activity/calendar.d.ts.map +1 -1
  227. package/dist/pages/settings/activity/connections.d.ts.map +1 -1
  228. package/dist/pages/settings/activity/page.d.ts.map +1 -1
  229. package/dist/pages/settings/activity/thread.d.ts.map +1 -1
  230. package/dist/pages/settings/activity/timeline.d.ts +2 -0
  231. package/dist/pages/settings/activity/timeline.d.ts.map +1 -1
  232. package/dist/pages/settings/controls.d.ts +4 -0
  233. package/dist/pages/settings/controls.d.ts.map +1 -1
  234. package/dist/pages/settings/members.d.ts.map +1 -1
  235. package/dist/pages/settings/memory-history.d.ts +2 -0
  236. package/dist/pages/settings/memory-history.d.ts.map +1 -1
  237. package/dist/pages/settings/memory.d.ts.map +1 -1
  238. package/dist/pages/settings/service-accounts.d.ts.map +1 -1
  239. package/dist/pages/settings/sessions.d.ts.map +1 -1
  240. package/dist/pages/settings/usage/breakdown.d.ts.map +1 -1
  241. package/dist/pages/settings/usage/limits.d.ts.map +1 -1
  242. package/dist/pages/settings/usage/messages.d.ts +2 -2
  243. package/dist/pages/settings/usage/messages.d.ts.map +1 -1
  244. package/dist/pages/settings/usage/runs.d.ts +8 -2
  245. package/dist/pages/settings/usage/runs.d.ts.map +1 -1
  246. package/dist/pages/settings/usage/spend-chart.d.ts.map +1 -1
  247. package/dist/pages/settings/usage/spend-model.d.ts +5 -0
  248. package/dist/pages/settings/usage/spend-model.d.ts.map +1 -1
  249. package/dist/pages/values.d.ts +6 -0
  250. package/dist/pages/values.d.ts.map +1 -1
  251. package/dist/pages.d.ts +4 -0
  252. package/dist/pages.d.ts.map +1 -1
  253. package/dist/pages.js +8195 -4841
  254. package/dist/pages.js.map +58 -49
  255. package/dist/sections/catalog.d.ts.map +1 -1
  256. package/dist/sections/sections.d.ts.map +1 -1
  257. package/dist/server.js +294 -23
  258. package/dist/server.js.map +8 -7
  259. package/dist/service-worker.d.ts +39 -0
  260. package/dist/service-worker.d.ts.map +1 -0
  261. package/dist/shared-session.d.ts +25 -0
  262. package/dist/shared-session.d.ts.map +1 -0
  263. package/dist/shell/app-return.d.ts +35 -0
  264. package/dist/shell/app-return.d.ts.map +1 -0
  265. package/dist/shell/app-shell.d.ts +1 -1
  266. package/dist/shell/app-shell.d.ts.map +1 -1
  267. package/dist/shell/nav-items.d.ts +2 -0
  268. package/dist/shell/nav-items.d.ts.map +1 -1
  269. package/dist/shell/phone/back.d.ts +6 -0
  270. package/dist/shell/phone/back.d.ts.map +1 -0
  271. package/dist/shell/phone/launch.d.ts +7 -0
  272. package/dist/shell/phone/launch.d.ts.map +1 -0
  273. package/dist/shell/phone/more-sheet.d.ts +36 -0
  274. package/dist/shell/phone/more-sheet.d.ts.map +1 -0
  275. package/dist/shell/phone/phone-foundations.d.ts +9 -0
  276. package/dist/shell/phone/phone-foundations.d.ts.map +1 -0
  277. package/dist/shell/phone/pull-to-refresh.d.ts +9 -0
  278. package/dist/shell/phone/pull-to-refresh.d.ts.map +1 -0
  279. package/dist/shell/phone/routes.d.ts +12 -0
  280. package/dist/shell/phone/routes.d.ts.map +1 -0
  281. package/dist/shell/phone/screen-motion.d.ts +11 -0
  282. package/dist/shell/phone/screen-motion.d.ts.map +1 -0
  283. package/dist/shell/phone/scroll-restoration.d.ts +7 -0
  284. package/dist/shell/phone/scroll-restoration.d.ts.map +1 -0
  285. package/dist/shell/phone/startup-image.d.ts +17 -0
  286. package/dist/shell/phone/startup-image.d.ts.map +1 -0
  287. package/dist/shell/phone/tab-bar.d.ts +14 -0
  288. package/dist/shell/phone/tab-bar.d.ts.map +1 -0
  289. package/dist/shell/phone/top-bar.d.ts +24 -0
  290. package/dist/shell/phone/top-bar.d.ts.map +1 -0
  291. package/dist/shell/search-command.d.ts +3 -1
  292. package/dist/shell/search-command.d.ts.map +1 -1
  293. package/dist/shell/user-menu.d.ts +2 -0
  294. package/dist/shell/user-menu.d.ts.map +1 -1
  295. package/package.json +8 -5
  296. package/src/agent/activity-label.ts +6 -2
  297. package/src/agent/agent-chat.tsx +51 -8
  298. package/src/agent/agent-panel.tsx +12 -0
  299. package/src/agent/agent-surface.tsx +4 -0
  300. package/src/agent/agent.css +18 -0
  301. package/src/agent/artifact-card.tsx +84 -16
  302. package/src/agent/artifact-panel.tsx +63 -43
  303. package/src/agent/background/background-card.tsx +308 -0
  304. package/src/agent/background/background-tool-row.tsx +58 -0
  305. package/src/agent/background/context.ts +26 -0
  306. package/src/agent/background/interpret.ts +356 -0
  307. package/src/agent/bash/bash-tool-view.tsx +9 -4
  308. package/src/agent/bash/interpret.ts +21 -3
  309. package/src/agent/components/agent-message-body.tsx +1 -1
  310. package/src/agent/components/composer-menu.tsx +4 -1
  311. package/src/agent/components/composer-place.tsx +168 -0
  312. package/src/agent/components/composer.tsx +101 -3
  313. package/src/agent/components/computer-place.tsx +18 -1
  314. package/src/agent/components/context-chips.tsx +72 -2
  315. package/src/agent/components/conversation-panel.tsx +3 -2
  316. package/src/agent/components/message-parts.tsx +6 -1
  317. package/src/agent/components/thread-artifacts-menu.tsx +22 -5
  318. package/src/agent/components/transcript.tsx +33 -1
  319. package/src/agent/components/web-fetch-tool-view.tsx +94 -29
  320. package/src/agent/composer-insertion.ts +36 -0
  321. package/src/agent/delegation/child-parts.tsx +1 -1
  322. package/src/agent/hooks/use-agent-conversation.ts +101 -8
  323. package/src/agent/hooks/use-new-thread-place.ts +294 -0
  324. package/src/agent/i18n/en.ts +70 -3
  325. package/src/agent/i18n/fr.ts +70 -3
  326. package/src/agent/observed-conversation.tsx +3 -0
  327. package/src/agent/publish-artifact/interpret.ts +27 -5
  328. package/src/agent/publish-artifact/open-artifact-tool-view.tsx +49 -0
  329. package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +14 -8
  330. package/src/agent/publish-artifact/use-live-publishes.ts +7 -11
  331. package/src/agent/react-router.tsx +2 -2
  332. package/src/agent/tool-views/built-in.tsx +29 -11
  333. package/src/agent/types.ts +4 -0
  334. package/src/agent/utils/web-fetch.ts +89 -10
  335. package/src/agent/utils/web-search.ts +67 -28
  336. package/src/artifacts/artifact-page.tsx +42 -17
  337. package/src/artifacts/artifact-viewer.tsx +56 -0
  338. package/src/artifacts/artifacts.css +80 -0
  339. package/src/artifacts/card-details.ts +2 -2
  340. package/src/artifacts/card-preview.tsx +17 -3
  341. package/src/artifacts/comments-context.ts +125 -0
  342. package/src/artifacts/edit-session.tsx +6 -6
  343. package/src/artifacts/file-source.ts +10 -3
  344. package/src/artifacts/frame.tsx +50 -12
  345. package/src/artifacts/gallery.tsx +9 -11
  346. package/src/artifacts/guest-badge.tsx +21 -0
  347. package/src/artifacts/held-artifact.tsx +241 -0
  348. package/src/artifacts/holders.tsx +170 -0
  349. package/src/artifacts/live/boards.ts +95 -0
  350. package/src/artifacts/live/canvas.ts +402 -0
  351. package/src/artifacts/live/header.tsx +137 -0
  352. package/src/artifacts/live/hooks.ts +94 -0
  353. package/src/artifacts/live/presence.ts +147 -0
  354. package/src/artifacts/live/session.ts +520 -0
  355. package/src/artifacts/live/view.ts +81 -0
  356. package/src/artifacts/messages.ts +415 -24
  357. package/src/artifacts/page-queries.ts +2 -3
  358. package/src/artifacts/page-state.ts +16 -7
  359. package/src/artifacts/publish-edit.ts +50 -22
  360. package/src/artifacts/queries.ts +108 -10
  361. package/src/artifacts/references/references.tsx +6 -9
  362. package/src/artifacts/renderers/canvas/arrows.tsx +12 -39
  363. package/src/artifacts/renderers/canvas/board-editor.tsx +817 -0
  364. package/src/artifacts/renderers/canvas/board-properties.tsx +488 -0
  365. package/src/artifacts/renderers/canvas/board-source.ts +110 -0
  366. package/src/artifacts/renderers/canvas/board.tsx +309 -33
  367. package/src/artifacts/renderers/canvas/canvas.tsx +387 -72
  368. package/src/artifacts/renderers/canvas/comment-pins.tsx +465 -0
  369. package/src/artifacts/renderers/canvas/commenting.tsx +319 -0
  370. package/src/artifacts/renderers/canvas/comments-panel.tsx +574 -0
  371. package/src/artifacts/renderers/canvas/comments.ts +225 -0
  372. package/src/artifacts/renderers/canvas/draft.ts +41 -50
  373. package/src/artifacts/renderers/canvas/edit-mode.tsx +145 -20
  374. package/src/artifacts/renderers/canvas/focus.tsx +175 -24
  375. package/src/artifacts/renderers/canvas/items.tsx +179 -52
  376. package/src/artifacts/renderers/canvas/layout.ts +99 -47
  377. package/src/artifacts/renderers/canvas/presence.tsx +184 -0
  378. package/src/artifacts/renderers/canvas/previews.ts +127 -0
  379. package/src/artifacts/renderers/canvas/renderer.tsx +87 -22
  380. package/src/artifacts/renderers/canvas/thumbnail.tsx +56 -15
  381. package/src/artifacts/renderers/canvas/toolbar.tsx +1 -1
  382. package/src/artifacts/renderers/slides/slides.tsx +1 -1
  383. package/src/artifacts/version-menu.tsx +438 -0
  384. package/src/artifacts/view-context.ts +102 -0
  385. package/src/artifacts/viewer.tsx +205 -147
  386. package/src/build.ts +96 -11
  387. package/src/codegen.ts +83 -5
  388. package/src/createCustomApp.ts +20 -7
  389. package/src/index.ts +12 -0
  390. package/src/locale-messages.ts +24 -0
  391. package/src/metadata.ts +12 -0
  392. package/src/pages/console/action-run.tsx +20 -0
  393. package/src/pages/console/data/connectors.tsx +27 -3
  394. package/src/pages/console/data/datasets.tsx +30 -1
  395. package/src/pages/console/data/lake-health.tsx +299 -0
  396. package/src/pages/console/data/messages.ts +143 -2
  397. package/src/pages/console/data/pipelines.tsx +91 -3
  398. package/src/pages/console/data/projections.tsx +23 -4
  399. package/src/pages/console/data/shared.tsx +1 -0
  400. package/src/pages/console/data/syncs.tsx +39 -2
  401. package/src/pages/console/ontology/action-runs.tsx +8 -2
  402. package/src/pages/console/ontology/actions.tsx +39 -15
  403. package/src/pages/console/ontology/components/action-button.tsx +10 -0
  404. package/src/pages/console/ontology/components/artifact-picker.tsx +522 -0
  405. package/src/pages/console/ontology/components/object-query-bar.tsx +21 -5
  406. package/src/pages/console/ontology/lib/action-params.ts +10 -0
  407. package/src/pages/console/ontology/lineage/properties-panel.tsx +32 -24
  408. package/src/pages/console/ontology/object-page.tsx +2 -0
  409. package/src/pages/console/ontology/object-type.tsx +73 -14
  410. package/src/pages/console/ontology/object-types.tsx +56 -7
  411. package/src/pages/console/ontology/objects.tsx +167 -19
  412. package/src/pages/console/ontology/rules.tsx +186 -30
  413. package/src/pages/console/ontology/workflow.tsx +130 -74
  414. package/src/pages/console/ontology/workflows/run-input-form.tsx +21 -2
  415. package/src/pages/console/ontology/workflows/schema-shape.tsx +3 -0
  416. package/src/pages/console/ontology/workflows.tsx +34 -21
  417. package/src/pages/console/skeletons.tsx +99 -0
  418. package/src/pages/console/workflow-run.tsx +20 -0
  419. package/src/pages/section-page.tsx +37 -7
  420. package/src/pages/section-ui.tsx +96 -13
  421. package/src/pages/settings/activity/calendar.tsx +13 -6
  422. package/src/pages/settings/activity/connections.tsx +26 -9
  423. package/src/pages/settings/activity/page.tsx +31 -4
  424. package/src/pages/settings/activity/thread.tsx +32 -18
  425. package/src/pages/settings/activity/timeline.tsx +39 -0
  426. package/src/pages/settings/controls.tsx +19 -1
  427. package/src/pages/settings/developers.tsx +2 -2
  428. package/src/pages/settings/members.tsx +42 -9
  429. package/src/pages/settings/memory-history.tsx +76 -10
  430. package/src/pages/settings/memory.tsx +47 -5
  431. package/src/pages/settings/service-accounts.tsx +7 -2
  432. package/src/pages/settings/sessions.tsx +6 -2
  433. package/src/pages/settings/usage/breakdown.tsx +62 -2
  434. package/src/pages/settings/usage/limits.tsx +45 -3
  435. package/src/pages/settings/usage/messages.ts +2 -2
  436. package/src/pages/settings/usage/page.tsx +99 -52
  437. package/src/pages/settings/usage/runs.tsx +105 -8
  438. package/src/pages/settings/usage/spend-chart.tsx +79 -45
  439. package/src/pages/settings/usage/spend-model.ts +17 -0
  440. package/src/pages/values.tsx +72 -6
  441. package/src/pages.ts +4 -0
  442. package/src/sections/catalog.ts +6 -0
  443. package/src/sections/sections.tsx +2 -0
  444. package/src/service-worker.ts +176 -0
  445. package/src/shared-session.ts +73 -0
  446. package/src/shell/app-return.ts +115 -0
  447. package/src/shell/app-shell.tsx +125 -27
  448. package/src/shell/nav-items.tsx +2 -0
  449. package/src/shell/phone/back.ts +16 -0
  450. package/src/shell/phone/launch.ts +6 -0
  451. package/src/shell/phone/more-sheet.tsx +249 -0
  452. package/src/shell/phone/phone-foundations.tsx +43 -0
  453. package/src/shell/phone/phone.css +660 -0
  454. package/src/shell/phone/pull-to-refresh.tsx +201 -0
  455. package/src/shell/phone/routes.ts +34 -0
  456. package/src/shell/phone/screen-motion.ts +292 -0
  457. package/src/shell/phone/scroll-restoration.tsx +70 -0
  458. package/src/shell/phone/startup-image.ts +119 -0
  459. package/src/shell/phone/tab-bar.tsx +95 -0
  460. package/src/shell/phone/top-bar.tsx +195 -0
  461. package/src/shell/search-command.tsx +30 -14
  462. package/src/shell/user-menu.tsx +2 -1
  463. package/dist/chunk-4mprsd2n.js.map +0 -10
  464. package/dist/chunk-fw2bm6dq.js.map +0 -182
  465. package/dist/chunk-zxthr2q5.js +0 -1487
  466. package/dist/chunk-zxthr2q5.js.map +0 -18
  467. /package/dist/{chunk-j9653e83.js.map → chunk-fwb9mxwm.js.map} +0 -0
  468. /package/dist/{chunk-km25essq.js.map → chunk-kes4ygmz.js.map} +0 -0
  469. /package/dist/{chunk-kwbw4dyk.js.map → chunk-ryed2jq8.js.map} +0 -0
@@ -0,0 +1,18 @@
1
+ import { type BoardFramePatch } from "@sixb/core/artifacts/live";
2
+ /** An attribute of the element at `address`, as its start tag writes it; null without. */
3
+ export declare function boardAttribute(source: string, address: string, name: string): string | null;
4
+ /** The element's inline style, property by property, as it is written. */
5
+ export declare function boardInlineStyle(source: string, address: string): Readonly<Record<string, string>>;
6
+ /** A file's path in the artifact from a reference a board's page makes to it, relative to the page. */
7
+ export declare function boardReferencePath(board: string, reference: string): string | null;
8
+ /**
9
+ * Patches a frame can show now: an image's picture the frame's version does not hold yet is shown
10
+ * from its preview when the reader has one, as an image they just uploaded, and else is left as
11
+ * it is, its element waiting for the frame to load a version that holds it. `waiting` says
12
+ * whether any does.
13
+ */
14
+ export declare function showablePatches(patches: readonly BoardFramePatch[], board: string, holds: (path: string) => boolean, previews: ReadonlyMap<string, string>): {
15
+ readonly patches: BoardFramePatch[];
16
+ readonly waiting: boolean;
17
+ };
18
+ //# sourceMappingURL=board-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-source.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/board-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAgB,MAAM,2BAA2B,CAAA;AAM9E,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS3F;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAWlC;AAwBD,uGAAuG;AACvG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkBlF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EAChC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC;IAAE,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAoBpE"}
@@ -1,47 +1,92 @@
1
+ import type { LucideIcon } from "lucide-react";
1
2
  import { type ReactNode } from "react";
2
3
  import type { ArtifactVersion } from "../../queries";
3
- /** The most boards live at once: each is a page running in its own frame. */
4
- export declare const MAX_LIVE_BOARDS = 12;
4
+ import type { BoardPreviews } from "./previews";
5
+ /** The most boards and embeds live at once: each board is a page running in its own frame. */
6
+ export declare const MAX_LIVE_BOARDS = 8;
5
7
  /**
6
- * How wide on screen a board is before it starts running: narrower, it is its outline. One already
7
- * running keeps running however small, so zooming out never reloads it.
8
+ * A board starts running once the view shows it at half its size, where its page's text still
9
+ * reads. Smaller, its picture shows as much, so it is its tile.
8
10
  */
9
- export declare const MIN_LIVE_WIDTH = 48;
10
- /** A board's place on the canvas. */
11
+ export declare const LIVE_FROM_SCALE = 0.5;
12
+ /**
13
+ * Or, while it has no picture, once it is this wide on screen, a phone's width, where a wide
14
+ * board's layout reads: its outline shows nothing of it.
15
+ */
16
+ export declare const LIVE_FROM_WIDTH = 360;
17
+ /** A board's or an embed's place on the canvas. */
11
18
  export interface BoardPlace {
12
19
  readonly id: string;
13
20
  readonly x: number;
14
21
  readonly y: number;
15
22
  readonly w: number;
16
23
  readonly h: number;
24
+ /** Whether its tile is a picture of it: a board's ready preview. */
25
+ readonly pictured?: boolean;
17
26
  }
18
- /**
19
- * The boards to run, from where the board view is: those on screen and at least
20
- * {@link MIN_LIVE_WIDTH} wide there, or running already, at most {@link MAX_LIVE_BOARDS}. Those
21
- * running come first, so a pan doesn't swap one page for another, then the nearest the middle of
22
- * the view. The others show their outline until the view comes to them.
23
- */
24
- export declare function liveBoards(boards: readonly BoardPlace[], view: {
25
- /** React Flow's transform: the pan, then the zoom. */
27
+ /** Where the board view is: React Flow's transform, the pan then the zoom, and its size. */
28
+ export interface BoardView {
26
29
  readonly transform: readonly [number, number, number];
27
30
  readonly width: number;
28
31
  readonly height: number;
29
- }, running?: ReadonlySet<string>): ReadonlySet<string>;
32
+ }
33
+ /**
34
+ * The boards and embeds to run, from where the board view is: those on screen and large enough
35
+ * there, or running already, at most {@link MAX_LIVE_BOARDS}. One running keeps running however
36
+ * small while it is on screen, so zooming out never reloads it. Those running come first, so a
37
+ * pan doesn't swap one page for another, then the nearest the middle of the view. The others show
38
+ * their tile until the view comes to them.
39
+ */
40
+ export declare function liveBoards(boards: readonly BoardPlace[], view: BoardView, running?: ReadonlySet<string>): ReadonlySet<string>;
41
+ /**
42
+ * The boards and embeds running, kept as the view moves. Each item reads whether it is one of
43
+ * them, so a change draws again only the items it starts or stops, and a pan draws nothing.
44
+ */
45
+ export interface LiveSet {
46
+ readonly has: (id: string) => boolean;
47
+ readonly subscribe: (listener: () => void) => () => void;
48
+ }
49
+ /** The live set of these boards and embeds, worked out again as React Flow's view changes. */
50
+ export declare function useLiveSet(places: readonly BoardPlace[]): LiveSet;
30
51
  interface LiveBoards {
31
52
  readonly version: ArtifactVersion | null;
32
- readonly live: ReadonlySet<string>;
53
+ readonly live: LiveSet;
54
+ /** Whether each board's picture is ready, and the mode the reader sees it in. */
55
+ readonly previews: BoardPreviews;
56
+ readonly mode: "light" | "dark";
33
57
  /** Opens a board over the canvas. */
34
58
  readonly open?: (id: string) => void;
35
59
  }
36
- /** The board view's version, the boards it runs, and how to open one. */
60
+ /** The board view's version, the boards it runs, their pictures, and how to open one. */
37
61
  export declare function useLiveBoards(): LiveBoards;
62
+ /** Whether a board or an embed runs now: it draws again only as that changes. */
63
+ export declare function useLive(id: string): boolean;
38
64
  export declare function LiveBoardsProvider({ value, children, }: {
39
65
  readonly value: LiveBoards;
40
66
  readonly children: ReactNode;
41
67
  }): import("react").JSX.Element;
42
68
  /**
43
- * A board's page, running, when the view shows it large enough: otherwise, and until it is ready,
44
- * its tile. On the board a frame takes no clicks, so dragging across it pans; it is a picture
69
+ * What a board or an embed shows while it doesn't run: a picture of it when there is one, else
70
+ * its outline, the icon of what it is in the middle, breathing while its picture is on its way.
71
+ * A board that changes keeps its last picture, breathing, until the new one is ready. A picture
72
+ * that can't be loaded gives way to its fallback, then to the outline. The name above says which
73
+ * it is.
74
+ */
75
+ export declare function ItemTile({ icon: Icon, preview, fallback, pending, onFail, }: {
76
+ readonly icon: LucideIcon;
77
+ /** A picture of the item, the size of its box. */
78
+ readonly preview?: string;
79
+ /** Another picture of it, for when that one can't be loaded. */
80
+ readonly fallback?: string;
81
+ readonly pending?: boolean;
82
+ /** A picture could not be had: what the tile knows of its pictures may be out of date. */
83
+ readonly onFail?: () => void;
84
+ }): import("react").JSX.Element;
85
+ /**
86
+ * A board's page, running, when the view shows it large enough, over its tile: the tile stays
87
+ * under the frame while it fades in, once its page is ready, so a board never flashes blank as it
88
+ * starts or stops; then the tile goes, so nothing of it shows through a page drawn on the board's
89
+ * own surface. On the board a frame takes no clicks, so dragging across it pans; it is a picture
45
90
  * until the reader opens it.
46
91
  */
47
92
  export declare function LiveBoard({ id, file, title, tile, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/board.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,6EAA6E;AAC7E,eAAO,MAAM,eAAe,KAAK,CAAA;AACjC;;;GAGG;AACH,eAAO,MAAM,cAAc,KAAK,CAAA;AAEhC,qCAAqC;AACrC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,IAAI,EAAE;IACJ,sDAAsD;IACtD,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB,EACD,OAAO,GAAE,WAAW,CAAC,MAAM,CAAa,GACvC,WAAW,CAAC,MAAM,CAAC,CAiBrB;AAED,UAAU,UAAU;IAClB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAA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AA;CACrC;AASD,yFAAyF;AACzF,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED,iFAAiF;AACjF,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAO3C;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,+BAEA;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EAAE,IAAI,EACV,OAAO,EACP,QAAQ,EACR,OAAe,EACf,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,kDAAkD;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,0FAA0F;IAC1F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CAC7B,+BAsCA;AAqFD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,IAAI,EACJ,KAAK,EACL,IAAI,GACL,EAAE;IACD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CACzB,+BA4BA"}
@@ -1,12 +1,14 @@
1
1
  import type { Canvas } from "@sixb/core/artifacts";
2
+ import type { LiveArtifact } from "../../live/session";
2
3
  import type { ArtifactVersion } from "../../queries";
4
+ import type { ArtifactThemeAttributes } from "../../theme";
3
5
  import { type CanvasEditor } from "./edit-mode";
4
6
  /**
5
7
  * A canvas on an endless board: drag or scroll to pan, pinch or ⌘-scroll to zoom, the zoom
6
- * controls in a corner. Boards run live as the view comes to them; double-click one, press Enter
7
- * on it, or press its Open to open it over the canvas. It opens on the item an address named,
8
- * else fitted to everything. Given an editor, its items are selected, moved, resized, connected,
9
- * and typed into, with a toolbar to add more.
8
+ * controls in a corner. Boards and embeds run live once the view shows them large enough;
9
+ * double-click a board, press Enter on it, or press its Open to open it over the canvas. It opens
10
+ * on the item an address named, else fitted to everything. Given an editor, its items are
11
+ * selected, moved, resized, connected, and typed into, with a toolbar to add more.
10
12
  */
11
13
  declare const _default: import("react").NamedExoticComponent<{
12
14
  readonly canvas: Canvas;
@@ -22,6 +24,13 @@ declare const _default: import("react").NamedExoticComponent<{
22
24
  readonly focus?: string;
23
25
  /** Edits the canvas; without it, it is read. */
24
26
  readonly edit?: CanvasEditor;
27
+ /** The live artifact the canvas is drawn from: who else is on it shows over it. */
28
+ readonly live?: LiveArtifact;
29
+ /**
30
+ * The artifact's own theme, for the board alone: its comments beside it are the app's, and keep
31
+ * the app's mode.
32
+ */
33
+ readonly theme?: ArtifactThemeAttributes;
25
34
  }>;
26
35
  export default _default;
27
36
  //# sourceMappingURL=canvas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/canvas.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAkC,MAAM,sBAAsB,CAAA;AAYlF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAIpD,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,aAAa,CAAA;AAQhE;;;;;;GAMG;;qBASgB,MAAM;IACvB,6FAA6F;uBAC1E,eAAe;oBAClB,MAAM;IACtB;;;OAGG;mBACY,OAAO,GAAG,MAAM;IAC/B,wDAAwD;qBACvC,MAAM;IACvB,gDAAgD;oBAChC,YAAY;;AApB9B,wBAkCE"}
1
+ {"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/canvas.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAA+C,MAAM,sBAAsB,CAAA;AAyB/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAS1D,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,aAAa,CAAA;AAOhE;;;;;;GAMG;;qBAWgB,MAAM;IACvB,6FAA6F;uBAC1E,eAAe;oBAClB,MAAM;IACtB;;;OAGG;mBACY,OAAO,GAAG,MAAM;IAC/B,wDAAwD;qBACvC,MAAM;IACvB,gDAAgD;oBAChC,YAAY;IAC5B,mFAAmF;oBACnE,YAAY;IAC5B;;;OAGG;qBACc,uBAAuB;;AA7B1C,wBA6CE"}
@@ -0,0 +1,84 @@
1
+ import { type CSSProperties } from "react";
2
+ /** A comment's pin, as the canvas and an opened board draw it. */
3
+ export interface PinPlace {
4
+ readonly id: string;
5
+ readonly number: number;
6
+ readonly board: string;
7
+ /** Where on the board, as fractions of its size; none sits at its top right corner. */
8
+ readonly point?: {
9
+ readonly x: number;
10
+ readonly y: number;
11
+ };
12
+ readonly resolved: boolean;
13
+ readonly label: string;
14
+ }
15
+ /** A new comment's place, while it is being written. */
16
+ export interface DraftPlace {
17
+ readonly board: string;
18
+ readonly element?: string;
19
+ readonly label?: string;
20
+ readonly point: {
21
+ readonly x: number;
22
+ readonly y: number;
23
+ };
24
+ /** Where the element it is about ends, as a share of the board's height: its card sits under. */
25
+ readonly under?: number;
26
+ /** What it is about, as its card says it: the element's words, or the board. */
27
+ readonly anchor?: string;
28
+ }
29
+ /** Where a pin without a point sits on its board, the `index`th of those, from its top right. */
30
+ export declare function pinPoint(pin: Pick<PinPlace, "point">, index: number): {
31
+ x: number;
32
+ y: number;
33
+ };
34
+ /**
35
+ * Where a new comment's card sits from its pin, `x` along a view `width` wide: beside the pin,
36
+ * else as far left as it must to stay in view, and narrower in a view narrower than it.
37
+ */
38
+ export declare function cardPlace(x: number, width: number): {
39
+ left: number;
40
+ width: number;
41
+ };
42
+ /** A pin: a bubble with its number, pointing at its place from its bottom left. */
43
+ export declare function CommentPin({ number, label, active, resolved, draft, onClick, style, }: {
44
+ readonly number?: number;
45
+ readonly label: string;
46
+ readonly active: boolean;
47
+ readonly resolved: boolean;
48
+ readonly draft?: boolean;
49
+ readonly onClick?: () => void;
50
+ readonly style?: CSSProperties;
51
+ }): import("react").JSX.Element;
52
+ /**
53
+ * Where a comment is written: its words, posted with ↩ or the arrow, a new line with ⇧↩, given
54
+ * up with Esc. A failure says why, and keeps the words. A shared link's guest who gave no name yet
55
+ * gives it here, once, above their first comment: their session keeps it for the next ones.
56
+ */
57
+ export declare function CommentComposer({ placeholder, onSubmit, onCancel, autoFocus, compact, className, }: {
58
+ readonly placeholder: string;
59
+ readonly onSubmit: (body: string) => Promise<void>;
60
+ readonly onCancel?: () => void;
61
+ readonly autoFocus?: boolean;
62
+ /** A reply's: one line until it grows. */
63
+ readonly compact?: boolean;
64
+ readonly className?: string;
65
+ }): import("react").JSX.Element;
66
+ /** The card a new comment is written in, by its pin: what it is about, then its words. */
67
+ export declare function DraftCard({ anchor, onSubmit, onCancel, }: {
68
+ readonly anchor?: string;
69
+ readonly onSubmit: (body: string) => Promise<void>;
70
+ readonly onCancel: () => void;
71
+ }): import("react").JSX.Element;
72
+ /**
73
+ * Every comment's pin over the canvas, on its board, and the new comment being written: drawn in
74
+ * the canvas's coordinates, each kept at its size on screen.
75
+ */
76
+ export declare const CanvasCommentPins: import("react").NamedExoticComponent<{
77
+ readonly pins: readonly PinPlace[];
78
+ readonly active: string | null;
79
+ readonly draft: DraftPlace | null;
80
+ readonly onOpen: (id: string) => void;
81
+ readonly onSubmitDraft: (body: string) => Promise<void>;
82
+ readonly onCancelDraft: () => void;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QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;CAC9B,+BA0BA;AASD;;;GAGG;AACH,eAAO,MAAM,iBAAiB;mBAQb,SAAS,QAAQ,EAAE;qBACjB,MAAM,GAAG,IAAI;oBACd,UAAU,GAAG,IAAI;qBAChB,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;4BACb,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;4BAC/B,MAAM,IAAI;EAyDlC,CAAA"}
@@ -0,0 +1,58 @@
1
+ import type { CanvasBoard } from "@sixb/core/artifacts";
2
+ import type { LiveArtifact } from "../../live/session";
3
+ import type { CommentPick } from "./board-editor";
4
+ import type { DraftPlace, PinPlace } from "./comment-pins";
5
+ import { type CommentThread } from "./comments";
6
+ import type { CommentFilter, ThreadPlace } from "./comments-panel";
7
+ /** Where a new comment is being written: on the canvas, or in the opened board. */
8
+ export type CommentDraft = DraftPlace & {
9
+ readonly where: "canvas" | "focus";
10
+ };
11
+ export declare function useCanvasCommenting({ artifactId, live, title, boards, revision, }: {
12
+ readonly artifactId: string | null;
13
+ readonly live: LiveArtifact | null;
14
+ readonly title: string;
15
+ readonly boards: readonly CanvasBoard[];
16
+ readonly revision: number;
17
+ }): {
18
+ enabled: boolean;
19
+ threads: readonly CommentThread[];
20
+ loading: boolean;
21
+ failed: boolean;
22
+ open: number;
23
+ pins: PinPlace[];
24
+ nameOf: (comment: Pick<import("./comments").ArtifactComment, "author" | "authorName" | "origin">) => import("./comments").CommentAuthor | null;
25
+ placeOf: (thread: CommentThread) => ThreadPlace;
26
+ canManage: (comment: CommentThread["comment"]) => boolean;
27
+ commenting: boolean;
28
+ setCommenting: import("react").Dispatch<import("react").SetStateAction<boolean>>;
29
+ toggleCommenting: () => void;
30
+ panel: boolean;
31
+ setPanel: import("react").Dispatch<import("react").SetStateAction<boolean>>;
32
+ filter: CommentFilter;
33
+ setFilter: import("react").Dispatch<import("react").SetStateAction<CommentFilter>>;
34
+ active: string | null;
35
+ setActive: import("react").Dispatch<import("react").SetStateAction<string | null>>;
36
+ draft: CommentDraft | null;
37
+ pick: (board: string, place: CommentPick, where: CommentDraft["where"]) => void;
38
+ cancelDraft: () => void;
39
+ submitDraft: (body: string) => Promise<void>;
40
+ reply: (thread: CommentThread, body: string) => Promise<void>;
41
+ resolve: (thread: CommentThread, resolved: boolean) => Promise<void>;
42
+ remove: (thread: CommentThread) => Promise<void>;
43
+ send: ((chosen: readonly CommentThread[]) => void) | null;
44
+ };
45
+ export type CanvasCommenting = ReturnType<typeof useCanvasCommenting>;
46
+ /**
47
+ * The comment tool and the panel's toggle, side by side: the tool places a comment where the
48
+ * reader clicks next, as C does; the toggle shows how many are open.
49
+ */
50
+ export declare function CommentTools({ commenting, className, }: {
51
+ readonly commenting: CanvasCommenting;
52
+ readonly className?: string;
53
+ }): import("react").JSX.Element;
54
+ /** Says, while the reader is placing a comment, that a click places it, and how to stop. */
55
+ export declare function CommentModeHint({ onExit }: {
56
+ readonly onExit: () => void;
57
+ }): import("react").JSX.Element;
58
+ //# sourceMappingURL=commenting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commenting.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/commenting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,EAEL,KAAK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 -0,0 +1,27 @@
1
+ import { type ArtifactComment, type CommentAuthor, type CommentThread } from "./comments";
2
+ export type CommentFilter = "open" | "resolved";
3
+ /** What the panel shows of a thread's place: its board's title, and its element, or none left. */
4
+ export interface ThreadPlace {
5
+ readonly board: string | null;
6
+ readonly element: string | null;
7
+ readonly gone: boolean;
8
+ }
9
+ export declare function CommentsPanel({ threads, loading, failed, filter, active, placeOf, nameOf, canManage, onFilter, onActivate, onReply, onResolve, onDelete, onSend, onClose, }: {
10
+ readonly threads: readonly CommentThread[];
11
+ readonly loading: boolean;
12
+ readonly failed: boolean;
13
+ readonly filter: CommentFilter;
14
+ readonly active: string | null;
15
+ readonly placeOf: (thread: CommentThread) => ThreadPlace;
16
+ readonly nameOf: (comment: ArtifactComment) => CommentAuthor | null;
17
+ readonly canManage: (comment: ArtifactComment) => boolean;
18
+ readonly onFilter: (filter: CommentFilter) => void;
19
+ readonly onActivate: (id: string) => void;
20
+ readonly onReply: (thread: CommentThread, body: string) => Promise<void>;
21
+ readonly onResolve: (thread: CommentThread, resolved: boolean) => Promise<void>;
22
+ readonly onDelete: (thread: CommentThread) => Promise<void>;
23
+ /** Puts these threads in the message to the Agent; none where there is no conversation. */
24
+ readonly onSend: ((threads: readonly CommentThread[]) => void) | null;
25
+ readonly onClose: () => void;
26
+ }): import("react").JSX.Element;
27
+ //# sourceMappingURL=comments-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comments-panel.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/comments-panel.tsx"],"names":[],"mappings":"AAwCA,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,aAAa,EAClB,KAAK,aAAa,EACnB,MAAM,YAAY,CAAA;AAOnB,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,UAAU,CAAA;AAE/C,kGAAkG;AAClG,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CA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AAC,CAAA;IAC3D,2FAA2F;IAC3F,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,KAAK,IAAI,CAAC,GAAG,IAAI,CAAA;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAC7B,+BAsNA"}
@@ -0,0 +1,56 @@
1
+ import { type AddArtifactCommentData, type ListArtifactCommentsResponse } from "@sixb/client";
2
+ import { type QueryClient } from "@tanstack/react-query";
3
+ export type ArtifactComment = ListArtifactCommentsResponse["comments"][number];
4
+ export type ArtifactCommentAnchor = ArtifactComment["anchor"];
5
+ /** A comment and its replies, oldest first. */
6
+ export interface CommentThread {
7
+ readonly comment: ArtifactComment;
8
+ readonly replies: readonly ArtifactComment[];
9
+ /** Its place among the canvas's threads, from 1, as its pin shows it. */
10
+ readonly number: number;
11
+ }
12
+ /** Why a comment action failed, in the reader's terms. */
13
+ export type CommentFailure = "full" | "invalid" | "notAllowed" | "gone" | "failed" | "name";
14
+ export declare class CommentActionError extends Error {
15
+ readonly failure: CommentFailure;
16
+ readonly name = "CommentActionError";
17
+ constructor(failure: CommentFailure);
18
+ }
19
+ /** The threads of these comments, in the order they were started; replies under each. */
20
+ export declare function commentThreads(comments: readonly ArtifactComment[]): CommentThread[];
21
+ /**
22
+ * The comments on an artifact, as threads. They are read again whenever someone changes one, as
23
+ * `useArtifactUpdates` hears it on the events socket.
24
+ */
25
+ export declare function useArtifactComments(artifactId: string | null): {
26
+ readonly threads: readonly CommentThread[];
27
+ readonly loading: boolean;
28
+ readonly failed: boolean;
29
+ };
30
+ /** Adds a comment, or a reply, as the reader; it shows in the panel as soon as it is taken. */
31
+ export declare function addComment(queries: QueryClient, artifactId: string, body: AddArtifactCommentData["body"]): Promise<ArtifactComment>;
32
+ /** Marks a comment resolved, or opens it again. */
33
+ export declare function resolveComment(queries: QueryClient, artifactId: string, commentId: string, resolved: boolean): Promise<void>;
34
+ /** Deletes a comment and its replies. */
35
+ export declare function deleteComment(queries: QueryClient, artifactId: string, commentId: string): Promise<void>;
36
+ /**
37
+ * Whether the reader may resolve or delete a comment: its author, or whoever may change the
38
+ * artifact, as the API decides.
39
+ */
40
+ export declare function canManageComment(comment: Pick<ArtifactComment, "author">, access: "owner" | "update" | "read", userId: string | null): boolean;
41
+ /** Who wrote a comment, as the panel says it. */
42
+ export interface CommentAuthor {
43
+ readonly name: string;
44
+ readonly you: boolean;
45
+ /** The Agent wrote it, for its author. */
46
+ readonly agent?: boolean;
47
+ /** A shared link's visitor wrote it, under a name nobody vouches for. */
48
+ readonly guest?: boolean;
49
+ }
50
+ /**
51
+ * Who wrote a comment: the reader themselves, else the name the API gives its author, and the
52
+ * Agent for them when its run wrote it. A shared link's guest is marked as one, for everyone, and
53
+ * is "you" to themselves. Null for an author the project cannot name.
54
+ */
55
+ export declare function useCommentAuthors(): (comment: Pick<ArtifactComment, "author" | "authorName" | "origin">) => CommentAuthor | null;
56
+ //# sourceMappingURL=comments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/comments.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAI3B,KAAK,4BAA4B,EAElC,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,uBAAuB,CAAA;AAUlE,MAAM,MAAM,eAAe,GAAG,4BAA4B,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAC9E,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAA;AAE7D,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAA;IAC5C,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,0DAA0D;AAC1D,MA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AO,CAGT;AAED,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,yEAAyE;IACzE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CACzB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,CACnC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC,KAC/D,aAAa,GAAG,IAAI,CAmBxB"}
@@ -32,13 +32,13 @@ export declare function moveItems(positions: ReadonlyMap<string, {
32
32
  * changes; a note's height becomes the least it takes.
33
33
  */
34
34
  export declare function resizeItem(id: string, box: Box): CanvasChange;
35
- /** An item added at a point, its top left there; the next free id names it. */
35
+ /** An item added at a point, its top left there, under a new id of its kind. */
36
36
  export declare function addItem(kind: NewItem, at: {
37
37
  x: number;
38
38
  y: number;
39
39
  }, text: string): {
40
40
  readonly change: CanvasChange;
41
- readonly id: (canvas: Canvas) => string;
41
+ readonly id: string;
42
42
  };
43
43
  /**
44
44
  * Items removed, with the arrows that join them: an arrow needs both its ends. A section is
@@ -60,7 +60,7 @@ export declare function duplicateItems(ids: ReadonlySet<string>): {
60
60
  * Words past what publishing takes for the item are cut there.
61
61
  */
62
62
  export declare function setItemText(id: string, typed: string): CanvasChange;
63
- /** An arrow from one item to another, its id the next free; none when they are one item. */
63
+ /** An arrow from one item to another, under a new id; none when they are one item. */
64
64
  export declare function connectItems(from: string, to: string): CanvasChange;
65
65
  /** A style set on every item of a selection that takes it; the rest are left as they are. */
66
66
  export declare function styleItems(ids: ReadonlySet<string>, style: ItemStyle): CanvasChange;
@@ -70,8 +70,9 @@ export declare function styleItems(ids: ReadonlySet<string>, style: ItemStyle):
70
70
  */
71
71
  export declare function canvasFiles(original: Canvas, canvas: Canvas): Map<string, string | null>;
72
72
  /**
73
- * A canvas as `canvas.json` writes it, the inverse of `parseCanvas`: its items in order, each
74
- * without what is a default, positions and sizes in whole pixels.
73
+ * A new item's id: what it is or what it copies, then a dash and six random letters and digits,
74
+ * as `note-k3m9q2`, so two people adding at once never name two items alike. A copy of a copy
75
+ * drops the suffix its original was given. Ids stay within what `canvas.json` takes: forty at most.
75
76
  */
76
- export declare function formatCanvas(canvas: Canvas): string;
77
+ export declare function newItemId(base: string): string;
77
78
  //# sourceMappingURL=draft.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/draft.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,MAAM,EAGX,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAA;AAE7B;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;AAErD,oEAAoE;AACpE,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,kGAAkG;AAClG,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,sEAAsE;AACtE,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG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AWD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK9C"}
@@ -1,6 +1,7 @@
1
1
  import type { Canvas } from "@sixb/core/artifacts";
2
2
  import { type Connection, ConnectionMode, type Edge, type EdgeChange, type Node, type NodeChange } from "@xyflow/react";
3
3
  import { type KeyboardEvent } from "react";
4
+ import type { LiveCanvas } from "../../live/canvas";
4
5
  import { type CanvasChange } from "./draft";
5
6
  import type { CanvasItemEditing } from "./editing";
6
7
  /** What the board edits through: each change one step for undo. */
@@ -8,6 +9,20 @@ export interface CanvasEditor {
8
9
  readonly apply: (change: CanvasChange) => void;
9
10
  readonly undo: () => void;
10
11
  readonly redo: () => void;
12
+ /**
13
+ * Edits everyone sees as they are made: a drag moves its items for the others while it goes,
14
+ * and is one undo step from its start to its end, however long it pauses.
15
+ */
16
+ readonly live?: {
17
+ readonly startDrag: () => void;
18
+ readonly endDrag: () => void;
19
+ /** Ends the undo step being made: a board's edit is one step of its own. */
20
+ readonly stopCapturing: () => void;
21
+ /** Tells the others what is selected. */
22
+ readonly select: (ids: readonly string[]) => void;
23
+ /** Edits what a board's page shows, as one step of the same undo. */
24
+ readonly editBoard: LiveCanvas["editBoard"];
25
+ };
11
26
  }
12
27
  /**
13
28
  * The board while it is read, or edited: its nodes and arrows, and, editing, what React Flow
@@ -16,8 +31,8 @@ export interface CanvasEditor {
16
31
  * the canvas changes under it.
17
32
  */
18
33
  export declare function useBoardEditing(canvas: Canvas, edit: CanvasEditor | undefined, onOpenBoard: ((id: string) => void) | undefined): {
19
- nodes: import("./layout").CanvasFlowNode[];
20
- edges: import("./layout").CanvasFlowEdge[];
34
+ nodes: Node[];
35
+ edges: Edge[];
21
36
  editing: false;
22
37
  root: import("react").RefObject<HTMLDivElement | null>;
23
38
  items?: undefined;
@@ -35,6 +50,8 @@ export declare function useBoardEditing(canvas: Canvas, edit: CanvasEditor | und
35
50
  flow: {
36
51
  onNodesChange: (changes: NodeChange[]) => void;
37
52
  onEdgesChange: (changes: EdgeChange[]) => void;
53
+ onNodeDragStart: () => void | undefined;
54
+ onNodeDrag: (_: unknown, __: Node, dragged: Node[]) => void;
38
55
  onNodeDragStop: (_: unknown, __: Node, dragged: Node[]) => void;
39
56
  onConnect: (connection: Connection) => void;
40
57
  onNodeDoubleClick: (_: unknown, node: Node) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"edit-mode.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/edit-mode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAA2B,MAAM,sBAAsB,CAAA;AAC3E,OAAO,EAGL,KAAK,UAAU,EACf,cAAc,EACd,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,UAAU,EAEhB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,KAAK,aAAa,EAOnB,MAAM,OAAO,CAAA;AAEd,OAAO,EAEL,KAAK,YAAY,EAUlB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAIlD,mEAAmE;AACnE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAA;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAC1B;AAYD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS;;;;;;;;;;;;;;;;uBA+HrB,aAAa,CAAC,cAAc,CAAC;;iCA8E1B,UAAU,EAAE;iCAIZ,UAAU,EAAE;4BAIjB,OAAO,MAAM,IAAI,WAAW,IAAI,EAAE;gCAE9B,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;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS;;;;;;;;;;;;;;;;uBAmLrB,aAAa,CAAC,cAAc,CAAC;;iCA8E1B,UAAU,EAAE;iCAIZ,UAAU,EAAE;;wBAKrB,OAAO,MAAM,IAAI,WAAW,IAAI,EAAE;4BAO9B,OAAO,MAAM,IAAI,WAAW,IAAI,EAAE;gCAI9B,UAAU;+BAEX,OAAO,QAAQ,IAAI;;;;;;kBAShB,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;EAS/C"}
@@ -1,15 +1,50 @@
1
- import type { CanvasBoard } from "@sixb/core/artifacts";
1
+ import type { CanvasArrow, CanvasBoard } from "@sixb/core/artifacts";
2
+ import { type ReactNode } from "react";
3
+ import type { LiveArtifact } from "../../live/session";
2
4
  import type { ArtifactVersion } from "../../queries";
5
+ import { type BoardEditor, type CommentPick, type StageMode } from "./board-editor";
6
+ import type { DraftPlace, PinPlace } from "./comment-pins";
3
7
  /**
4
- * A board opened over the canvas: its page at its own width, or the viewer's when that is
5
- * narrower, as tall as the viewer, scrolling and answering like a page. ← and → step through the
6
- * boards in the canvas's order, and Esc goes back to the canvas.
8
+ * A board opened over the canvas: its page at the board's own size, as the canvas and its picture
9
+ * show it, scaled to fit the viewer, and answering like a page. Its picture shows until the page
10
+ * is ready, and stays, with a word, if the page never is. ← and → step through the boards in the
11
+ * canvas's order, and Esc goes back to the canvas.
12
+ *
13
+ * It is a prototype too: pressing a button or a link within the page that reads as the label of an
14
+ * arrow leaving the board opens the board the arrow points to.
15
+ *
16
+ * Opened from a canvas edited live, its elements are edited in place; placing a comment, a click
17
+ * picks the element it is about. Its comments' pins show over it.
7
18
  */
8
- export declare function BoardFocus({ version, boards, id, onOpen, onClose, }: {
19
+ export declare function BoardFocus({ version, boards, arrows, id, pictureOf, onOpen, onClose, live, canvas, mode, pins, activePin, draft, tools, onEscape, onPick, onOpenPin, onSubmitDraft, onCancelDraft, }: {
9
20
  readonly version: ArtifactVersion;
10
21
  readonly boards: readonly CanvasBoard[];
22
+ readonly arrows: readonly CanvasArrow[];
11
23
  readonly id: string;
24
+ /** A board's picture at its own size, when it has one. */
25
+ readonly pictureOf?: (id: string) => string | undefined;
12
26
  readonly onOpen: (id: string) => void;
13
27
  readonly onClose: () => void;
28
+ /** The canvas held live: the board shows what its document holds now. */
29
+ readonly live?: LiveArtifact | null;
30
+ /** What edits the board's elements, while the reader edits the canvas. */
31
+ readonly canvas?: BoardEditor | null;
32
+ readonly mode?: StageMode;
33
+ readonly pins?: readonly PinPlace[];
34
+ readonly activePin?: string | null;
35
+ readonly draft?: DraftPlace | null;
36
+ /** The comment tools, in the header. */
37
+ readonly tools?: ReactNode;
38
+ /** Esc, before it closes the board: true when it was taken, as a comment given up. */
39
+ readonly onEscape?: () => boolean;
40
+ readonly onPick?: (board: string, pick: CommentPick) => void;
41
+ readonly onOpenPin?: (id: string) => void;
42
+ readonly onSubmitDraft?: (body: string) => Promise<void>;
43
+ readonly onCancelDraft?: () => void;
14
44
  }): import("react").JSX.Element | null;
45
+ /**
46
+ * The board an arrow leaving `from` points to, when its label reads as `pressed`, case and spaces
47
+ * aside: the first such arrow the canvas lists, to a board.
48
+ */
49
+ export declare function followedArrow(arrows: readonly CanvasArrow[], boards: readonly CanvasBoard[], from: string, pressed: string): string | null;
15
50
  //# sourceMappingURL=focus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../../../src/artifacts/renderers/canvas/focus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,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