@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
@@ -3,9 +3,10 @@ import { type ReactNode, type Ref } from "react";
3
3
  import { type ArtifactVersion } from "./queries";
4
4
  /** Asks the deck in the frame to do something; resolves when it has. */
5
5
  export interface ArtifactFrameHandle {
6
+ /** `transfer` hands objects over with the request, as `edit` hands over its port. */
6
7
  send<Method extends FrameRequest["method"]>(method: Method, params: Extract<FrameRequest, {
7
8
  method: Method;
8
- }>["params"]): Promise<void>;
9
+ }>["params"], transfer?: Transferable[]): Promise<void>;
9
10
  }
10
11
  /**
11
12
  * A version in a sandboxed frame, served from the API under a short-lived link. The frame has an
@@ -26,7 +27,7 @@ export interface ArtifactFrameHandle {
26
27
  * page's code cannot send what it reads to another site by loading an address: a web link the
27
28
  * reader follows is opened from here, in a new tab.
28
29
  */
29
- export declare function ArtifactFrame({ version, entry, title, onEvent, className, handle, start, decorative, fallback, failure, overlay, }: {
30
+ export declare function ArtifactFrame({ version, entry, title, onEvent, className, handle, start, decorative, editable, fallback, failure, overlay, }: {
30
31
  readonly version: ArtifactVersion;
31
32
  /** The page it opens, one of the version's frame entries: its entry, or a canvas's board. */
32
33
  readonly entry?: string;
@@ -35,6 +36,11 @@ export declare function ArtifactFrame({ version, entry, title, onEvent, classNam
35
36
  readonly start?: FrameStart;
36
37
  /** A picture of the deck, as a thumbnail is: it takes no focus, clicks, or reading. */
37
38
  readonly decorative?: boolean;
39
+ /**
40
+ * A canvas's board served for editing, its elements marked by address: the frame then picks
41
+ * and types into them once asked to with `edit`.
42
+ */
43
+ readonly editable?: boolean;
38
44
  readonly onEvent?: (event: FrameEvent) => void;
39
45
  readonly className?: string;
40
46
  /** What shows where the frame will be while it loads, and under it as it fades in. */
@@ -53,4 +59,6 @@ export declare function ArtifactFrame({ version, entry, title, onEvent, classNam
53
59
  /** Where to put the handle that asks the frame for things (`ref` is not a prop in React 18). */
54
60
  readonly handle?: Ref<ArtifactFrameHandle>;
55
61
  }): import("react").JSX.Element;
62
+ /** Where a version's frame link is cached, at its revision; a test seeds it there. */
63
+ export declare function frameLinkKey(version: Pick<ArtifactVersion, "artifactId" | "version" | "revision">): readonly ["artifact-frame", string, number, number];
56
64
  //# sourceMappingURL=frame.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../src/artifacts/frame.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,UAAU,EAIhB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EACL,KAAK,SAAS,EACd,KAAK,GAAG,EAMT,MAAM,OAAO,CAAA;AAGd,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,WAAW,CAAA;AAElE,wEAAwE;AACxE,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,MAAM,SAAS,YAAY,CAAC,QAAQ,CAAC,EACxC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,MAAM,EAAE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AC,EAAE,SAAS,CAAA;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;CAC3C,+BAsPA;AA+CD,sFAAsF;AACtF,wBAAgB,YAAY,CAC1B,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,SAAS,GAAG,UAAU,CAAC,uDAGtE"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Beside a name a shared link's visitor typed: they have no account, so the name is only theirs to
3
+ * say. Everyone sees it, the guest included, so nobody takes them for a member of the same name.
4
+ */
5
+ export declare function GuestBadge({ className }: {
6
+ readonly className?: string;
7
+ }): import("react").JSX.Element;
8
+ //# sourceMappingURL=guest-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guest-badge.d.ts","sourceRoot":"","sources":["../../src/artifacts/guest-badge.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAaxE"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Artifacts an object holds in a property, as its page shows them: each one a card with a preview of
3
+ * its latest version that opens it. One card or many, they line up as a conversation's cards do.
4
+ */
5
+ export declare function HeldArtifactCards({ artifactIds }: {
6
+ readonly artifactIds: readonly string[];
7
+ }): import("react").JSX.Element;
8
+ /** Why a held artifact cannot be shown: it is gone, it is not the reader's to open, or reading it failed. */
9
+ export type HeldArtifactProblem = "gone" | "notShared" | "failed" | "storageUnavailable";
10
+ export declare function heldArtifactProblem(error: unknown): HeldArtifactProblem;
11
+ /**
12
+ * A held artifact where a value is a line among others, such as a run's input: its kind and title,
13
+ * opening it. Without `link`, it names the artifact without sending its reader there.
14
+ */
15
+ export declare function HeldArtifactChip({ artifactId, link, }: {
16
+ readonly artifactId: string;
17
+ readonly link?: boolean;
18
+ }): import("react").JSX.Element;
19
+ //# sourceMappingURL=held-artifact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"held-artifact.d.ts","sourceRoot":"","sources":["../../src/artifacts/held-artifact.tsx"],"names":[],"mappings":"AAWA;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,EAAE;IAAE,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,+BAW7F;AA4CD,6GAA6G;AAC7G,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,oBAAoB,CAAA;AAExF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAOvE;AAsFD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,IAAW,GACZ,EAAE;IACD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CACxB,+BAgEA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The objects an artifact belongs to, beside its title: the one that holds it, as a pill that opens
3
+ * its page, or the first of several with the others a click away. A narrow header, as a phone's,
4
+ * keeps the title's room: the pill is its icon, which lists them. Only those the reader can see
5
+ * are listed; an artifact no object holds, for this reader, shows nothing.
6
+ */
7
+ export declare function ArtifactHolders({ artifactId }: {
8
+ readonly artifactId: string;
9
+ }): import("react").JSX.Element | null;
10
+ //# sourceMappingURL=holders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"holders.d.ts","sourceRoot":"","sources":["../../src/artifacts/holders.tsx"],"names":[],"mappings":"AA2BA;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,sCAuE9E"}
@@ -0,0 +1,15 @@
1
+ import type { FileRef } from "@sixb/core/blob-storage";
2
+ import * as Y from "yjs";
3
+ import type { LiveArtifact } from "./session";
4
+ /** A board's page in the document now; null when the document holds none at that path as text. */
5
+ export declare function liveBoardSource(doc: Y.Doc, path: string): string | null;
6
+ /** The files the document holds as stored bytes, by path: the pictures a board may show. */
7
+ export declare function liveStoredFiles(doc: Y.Doc): ReadonlyMap<string, FileRef>;
8
+ /**
9
+ * Follows a board's page in a live artifact's document: the text it holds now, read again as it
10
+ * changes, and when the file at its path is replaced. Null without a document, or a page there.
11
+ */
12
+ export declare function useLiveBoardSource(live: LiveArtifact | null, path: string): string | null;
13
+ /** Follows the files a live artifact's document holds as stored bytes, as they are added. */
14
+ export declare function useLiveStoredFiles(live: LiveArtifact | null): ReadonlyMap<string, FileRef>;
15
+ //# sourceMappingURL=boards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boards.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/boards.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEtD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAK7C,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvE;AAED,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,GAAG,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAOxE;AAUD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkCzF;AAED,6FAA6F;AAC7F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,GAAG,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAgB1F"}
@@ -0,0 +1,79 @@
1
+ import { type Canvas } from "@sixb/core/artifacts";
2
+ import { type BoardEdit } from "@sixb/core/artifacts/live";
3
+ import type { FileRef } from "@sixb/core/blob-storage";
4
+ import * as Y from "yjs";
5
+ import type { CanvasChange } from "../renderers/canvas/draft";
6
+ import type { LiveArtifact } from "./session";
7
+ export declare class LiveCanvas {
8
+ private readonly doc;
9
+ private canvas;
10
+ private readonly cache;
11
+ private structure;
12
+ private undoManager;
13
+ private readonly listeners;
14
+ private history;
15
+ /** A drag is under way: everything it changes is one step, however long it pauses. */
16
+ private dragging;
17
+ /** The items others changed that wait for the next frame to be read again. */
18
+ private pending;
19
+ private cancelFrame;
20
+ /** The canvas the board was last told of. */
21
+ private announced;
22
+ /** The origin of this reader's own changes: the only ones its undo takes back. */
23
+ readonly origin: symbol;
24
+ constructor(doc: Y.Doc);
25
+ /**
26
+ * The canvas now, or null while the document holds none: not synced yet, or not a canvas. What
27
+ * waits for the next frame is read in first, so whoever reads it never reads behind.
28
+ */
29
+ getCanvas: () => Canvas | null;
30
+ getHistory: () => {
31
+ readonly undo: boolean;
32
+ readonly redo: boolean;
33
+ };
34
+ subscribe: (listener: () => void) => (() => void);
35
+ /** Makes an edit, as one step of this reader's undo; one that changes nothing writes nothing. */
36
+ apply(change: CanvasChange): void;
37
+ /**
38
+ * Makes an edit to a board's page, worked out from what it holds now, as one step of this
39
+ * reader's undo, with the files it needs added first: an image's picture, which undo leaves in
40
+ * place. False when the document holds no such page; `make` throws when the edit no longer
41
+ * applies.
42
+ */
43
+ editBoard(path: string, make: (source: string) => BoardEdit, files?: Readonly<Record<string, FileRef>>): boolean;
44
+ undo(): void;
45
+ redo(): void;
46
+ /** Ends the undo step being made: what comes next, such as a new drag, is a step of its own. */
47
+ stopCapturing(): void;
48
+ /** A drag starts: what it changes, until it ends, is one step for undo. */
49
+ startDrag(): void;
50
+ /** The drag ended: the next change is a step of its own. */
51
+ endDrag(): void;
52
+ destroy(): void;
53
+ /** Follows the canvas's structure: it is replaced when someone writes `canvas.json` whole. */
54
+ private onFiles;
55
+ private bind;
56
+ private unbind;
57
+ private onItems;
58
+ private onOrder;
59
+ /**
60
+ * Reads again what a change touched, and tells the board: at once for this reader's own, with
61
+ * whatever waits; at the next frame for the others', all of a frame's changes at once.
62
+ */
63
+ private taken;
64
+ /** Reads again the items that wait, without telling anyone: a read can come while React draws. */
65
+ private readPending;
66
+ /** Tells the board of the canvas, once it is another. */
67
+ private announce;
68
+ private onHistory;
69
+ /**
70
+ * The canvas again, its items in order, then any the order misses, and without an arrow whose
71
+ * item someone deleted meanwhile, as `canvas.json` is written. Only the items in `changed` are
72
+ * read again, all of them when it is null.
73
+ */
74
+ private rebuild;
75
+ private notify;
76
+ }
77
+ /** The canvas of a live artifact, one per artifact, so the board and the header share its undo. */
78
+ export declare function liveCanvasOf(artifact: LiveArtifact): LiveCanvas;
79
+ //# sourceMappingURL=canvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/canvas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,MAAM,EAAmB,MAAM,sBAAsB,CAAA;AAChF,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAgD7C,qBAAa,UAAU;IAiBT,OAAO,CAAC,QAAQ,CAAC,GAAG;IAhBhC,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiE;IACvF,OAAO,CAAC,SAAS,CAA0C;IAC3D,OAAO,CAAC,WAAW,CAA6B;IAChD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAA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AO,CAAC,QAAQ;IAMhB,OAAO,CAAC,SAAS,CAQhB;IAED;;;;OAIG;IACH,OAAO,CAAC,OAAO;IA4Cf,OAAO,CAAC,MAAM;CAGf;AAoDD,mGAAmG;AACnG,wBAAgB,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,UAAU,CAO/D"}
@@ -0,0 +1,29 @@
1
+ import type { LiveArtifact, LiveArtifactState } from "./session";
2
+ /**
3
+ * Who else is on the artifact, as faces beside the title, each ringed in the color their
4
+ * selection takes on the canvas, and the Agent while a turn changes it. Nothing when nobody is.
5
+ */
6
+ export declare function LiveAvatars({ live }: {
7
+ readonly live: LiveArtifact;
8
+ }): import("react").JSX.Element | null;
9
+ /** What the header says of an edit's write-back, as a document editor does. */
10
+ export type LiveSaveLabel = "saved" | "saving" | "failed" | "offline";
11
+ /**
12
+ * Where what the reader changed is: saved, being saved, kept here while the socket is down, or
13
+ * failed and tried again by the server.
14
+ */
15
+ export declare function liveSaveLabel(state: LiveArtifactState): LiveSaveLabel;
16
+ /**
17
+ * The save state, discreet beside the title: its words fold into the icon on a narrow header.
18
+ * Only a failure is announced; offline with nothing kept, it says it is reconnecting.
19
+ */
20
+ export declare function LiveSaveStatus({ state }: {
21
+ readonly state: LiveArtifactState;
22
+ }): import("react").JSX.Element;
23
+ /** Why the reader's hold on a live artifact changed: they may only watch now, or it is gone. */
24
+ export type LiveNoticeReason = "access" | "not_shared" | "not_found";
25
+ /** Under the header, when the reader's hold on the artifact changed, saying how. */
26
+ export declare function LiveNotice({ reason }: {
27
+ readonly reason: LiveNoticeReason;
28
+ }): import("react").JSX.Element;
29
+ //# sourceMappingURL=header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/header.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAKhE;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,sCA+CpE;AAED,+EAA+E;AAC/E,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;AAErE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,aAAa,CAOrE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;CAAE,+BA6B9E;AAED,gGAAgG;AAChG,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,CAAA;AAEpE,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,+BAkB3E"}
@@ -0,0 +1,21 @@
1
+ import { type ReactNode } from "react";
2
+ import { type LiveArtifact, type LiveArtifactState, LiveHub } from "./session";
3
+ /** The hub views hold live artifacts through: one per page, unless a test provides its own. */
4
+ export declare function LiveHubProvider({ hub, children, }: {
5
+ readonly hub: LiveHub;
6
+ readonly children: ReactNode;
7
+ }): import("react").FunctionComponentElement<import("react").ProviderProps<LiveHub | null>>;
8
+ /**
9
+ * Holds an artifact live while the view does: its document and presence, kept in step with
10
+ * everyone else's. Null while `artifactId` is, as for a version that is not the latest.
11
+ */
12
+ export declare function useLiveArtifact(artifactId: string | null): LiveArtifact | null;
13
+ /** What the server says of a live artifact, as it changes. */
14
+ export declare function useLiveArtifactState(artifact: LiveArtifact | null): LiveArtifactState;
15
+ /** The artifact the viewer holds live, for the renderer under it. */
16
+ export declare function LiveArtifactProvider({ artifact, children, }: {
17
+ readonly artifact: LiveArtifact | null;
18
+ readonly children: ReactNode;
19
+ }): import("react").FunctionComponentElement<import("react").ProviderProps<LiveArtifact | null>>;
20
+ export declare function useViewerLiveArtifact(): LiveArtifact | null;
21
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAM9E,+FAA+F;AAC/F,wBAAgB,eAAe,CAAC,EAC9B,GAAG,EACH,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,2FAEA;AASD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,GAAG,IAAI,CAkB9E;AAcD,8DAA8D;AAC9D,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,iBAAiB,CAMrF;AAID,qEAAqE;AACrE,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAA;IACtC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,gGAEA;AAED,wBAAgB,qBAAqB,IAAI,YAAY,GAAG,IAAI,CAE3D"}
@@ -0,0 +1,32 @@
1
+ import { type ArtifactAgentPresence, type ArtifactLiveUser } from "@sixb/core/artifacts/live";
2
+ import type { LiveArtifact } from "./session";
3
+ /** The awareness field a connection selects items in, by id. */
4
+ export declare const SELECTION_FIELD = "selection";
5
+ /** Someone on the artifact, from one of their connections: a person may have several. */
6
+ export interface LivePeer {
7
+ readonly clientId: number;
8
+ readonly user: ArtifactLiveUser;
9
+ /** The items they have selected. */
10
+ readonly selection: readonly string[];
11
+ }
12
+ export interface LivePresence {
13
+ /** Everyone else's connections, in the order they came. */
14
+ readonly peers: readonly LivePeer[];
15
+ /** The people among them, once each, for the avatars. */
16
+ readonly people: readonly ArtifactLiveUser[];
17
+ /** The Agent's turns at work, and the boards each is changing. */
18
+ readonly agents: readonly ArtifactAgentPresence[];
19
+ }
20
+ /**
21
+ * What a person on the artifact is called: the name the server gives them, else "Guest" for a
22
+ * shared link's visitor who gave none, and "Team member" for a member without a profile name.
23
+ */
24
+ export declare function livePersonName(user: ArtifactLiveUser, labels: {
25
+ readonly guest: string;
26
+ readonly teamMember: string;
27
+ }): string;
28
+ /** Who else is on a live artifact, and what the Agent is changing, as it changes. */
29
+ export declare function useLivePresence(artifact: LiveArtifact | null): LivePresence;
30
+ /** Says to the others what this reader has selected. */
31
+ export declare function shareSelection(artifact: LiveArtifact, ids: readonly string[]): void;
32
+ //# sourceMappingURL=presence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/presence.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAEtB,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAM7C,gEAAgE;AAChE,eAAO,MAAM,eAAe,cAAc,CAAA;AAE1C,yFAAyF;AACzF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,oCAAoC;IACpC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CACtC;AAED,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAA;IACnC,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAA;IAC5C,kEAAkE;IAClE,QAAQ,CAAC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAA;CAClD;AAsDD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC9D,MAAM,CAER;AAqBD,qFAAqF;AACrF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,YAAY,CAiB3E;AAED,wDAAwD;AACxD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAUnF"}
@@ -0,0 +1,130 @@
1
+ import { type ArtifactLiveSocket } from "@sixb/client/artifact-live";
2
+ import { type ArtifactLiveAccess, type ArtifactLiveClientMessage, type ArtifactLiveLeftReason, type ArtifactLiveSaveState, type ArtifactLiveServerMessage, type ArtifactLiveUser } from "@sixb/core/artifacts/live";
3
+ import * as awarenessProtocol from "y-protocols/awareness";
4
+ import * as Y from "yjs";
5
+ /** The origin of what the server sent: applied, never sent back. */
6
+ export declare const FROM_SERVER: unique symbol;
7
+ /** Whether the socket is up: `connecting` until the first connection, `offline` between two. */
8
+ export type LiveConnection = "connecting" | "online" | "offline";
9
+ /** What the server says of the document's write-back, as the last `status` said it. */
10
+ export interface LiveSave {
11
+ readonly state: ArtifactLiveSaveState;
12
+ readonly revision: number;
13
+ readonly error?: string;
14
+ }
15
+ export interface LiveArtifactState {
16
+ readonly connection: LiveConnection;
17
+ /** What the connection may do, once joined; null before. */
18
+ readonly access: ArtifactLiveAccess | null;
19
+ /** The document holds the artifact: the server's sync step 2 reached it once. */
20
+ readonly synced: boolean;
21
+ readonly save: LiveSave | null;
22
+ /** Changes made here that the server has not said it took: sent offline, or not saved yet. */
23
+ readonly pending: boolean;
24
+ /** Who this connection is to the others, as `joined` said. */
25
+ readonly user: ArtifactLiveUser | null;
26
+ /** Why the page no longer holds the artifact live; null while it does. */
27
+ readonly left: ArtifactLiveLeftReason | null;
28
+ }
29
+ /** Changes a copy of an artifact's document kept, and whose they are. */
30
+ export interface KeptChanges {
31
+ /** Where they are kept: one key per copy of the document, so two tabs keep their own. */
32
+ readonly key: string;
33
+ /** Who made them, as `joined` named them. */
34
+ readonly userId: string;
35
+ readonly update: Uint8Array;
36
+ }
37
+ /**
38
+ * Where a page keeps the changes made to an artifact that the server has not said it saved, so a
39
+ * reload, or a tab closed during an outage, does not lose them: the next copy of the document,
40
+ * opened by the same person with the right to edit, merges them in and sends them with its sync.
41
+ */
42
+ export interface LiveKeeper {
43
+ /** Every copy's changes kept for an artifact. */
44
+ list(artifactId: string): KeptChanges[];
45
+ write(changes: KeptChanges): void;
46
+ remove(key: string): void;
47
+ }
48
+ /** The key one copy of an artifact's document keeps its changes under. */
49
+ export declare function keptChangesKey(artifactId: string, clientId: number): string;
50
+ /** The browser's local storage, which a private window or a full disk may refuse: then nothing. */
51
+ export declare const browserKeeper: LiveKeeper;
52
+ /** One artifact a page holds live: its document, its awareness, and what the server says. */
53
+ export declare class LiveArtifact {
54
+ readonly artifactId: string;
55
+ private readonly send;
56
+ private readonly keeper;
57
+ readonly doc: Y.Doc;
58
+ readonly awareness: awarenessProtocol.Awareness;
59
+ private state;
60
+ private readonly listeners;
61
+ private joined;
62
+ /** What this page changed that the server has not said it saved, merged into one update. */
63
+ private unsaved;
64
+ /** Where this copy keeps them. */
65
+ private readonly key;
66
+ /** Other copies' kept changes merged in, by key: forgotten here once the server wrote them. */
67
+ private readonly merged;
68
+ constructor(artifactId: string, send: (message: ArtifactLiveClientMessage) => boolean, keeper?: LiveKeeper);
69
+ /** What this page changed that the server has not said it saved. */
70
+ get hasUnsaved(): boolean;
71
+ getState: () => LiveArtifactState;
72
+ subscribe: (listener: () => void) => (() => void);
73
+ /** The socket is ready: join, or join again after a reconnect. */
74
+ connected(): void;
75
+ /** The socket closed: others' presence goes with it, until they are heard of again. */
76
+ disconnected(): void;
77
+ receive(message: ArtifactLiveServerMessage): void;
78
+ /** Stops holding the artifact: the server is told, and the document freed. */
79
+ destroy(): void;
80
+ private onUpdate;
81
+ /** Keeps what this page changed, as its person's: not before `joined` says who they are. */
82
+ private keep;
83
+ /**
84
+ * Merges in what earlier copies of the document kept for this person, once the server says
85
+ * who they are and that they may edit: each waits in the document for what it was made on, and
86
+ * is sent with this copy's own changes. Another person's are never read; this person's, once
87
+ * they may only watch, are dropped.
88
+ */
89
+ private takeKept;
90
+ /**
91
+ * Forgets what the server wrote back, as its snapshot says, here and in the copies merged in,
92
+ * and keeps the rest whole: a change sent while the server was writing is not in what it wrote.
93
+ * Null when the artifact is gone: nothing is kept.
94
+ */
95
+ private forget;
96
+ private onAwareness;
97
+ private sendSync;
98
+ private sendAwareness;
99
+ private update;
100
+ }
101
+ /** Opens the socket a hub speaks through: `createArtifactLiveSocket`, or a test's. */
102
+ export type LiveSocketFactory = (handlers: {
103
+ readonly onConnected: () => void;
104
+ readonly onMessage: (message: ArtifactLiveServerMessage) => void;
105
+ readonly onClosed: () => void;
106
+ }) => ArtifactLiveSocket;
107
+ /**
108
+ * The artifacts a page holds live, over one socket opened with the first and closed with the
109
+ * last. Views acquire an artifact and release it; one no view holds for {@link LINGER_MS} leaves.
110
+ */
111
+ export declare class LiveHub {
112
+ private readonly open;
113
+ private readonly keeper;
114
+ private socket;
115
+ private online;
116
+ private readonly held;
117
+ constructor(open?: LiveSocketFactory, keeper?: LiveKeeper);
118
+ acquire(artifactId: string): LiveArtifact;
119
+ release(artifact: LiveArtifact): void;
120
+ /**
121
+ * Leaves an artifact no view holds after {@link LINGER_MS}, once the server wrote what this
122
+ * page changed in it: changes made offline, or whose view went away before they were saved,
123
+ * wait in it for the next connection, and a view that comes back finds them. What others
124
+ * changed is not this page's to wait for.
125
+ */
126
+ private linger;
127
+ private connect;
128
+ private disconnect;
129
+ }
130
+ //# sourceMappingURL=session.d.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OAAO;IAoBf,OAAO,CAAC,UAAU;CAKnB"}
@@ -0,0 +1,28 @@
1
+ import type { LiveNoticeReason } from "./header";
2
+ import type { LiveArtifact, LiveArtifactState } from "./session";
3
+ /** A viewer's hold on an artifact edited live, and whether the reader is editing it. */
4
+ export interface LiveView {
5
+ readonly live: LiveArtifact;
6
+ readonly state: LiveArtifactState;
7
+ /** The reader may edit it now: they edit, and its document holds it. */
8
+ readonly editable: boolean;
9
+ readonly editing: boolean;
10
+ readonly start: () => void;
11
+ readonly stop: () => void;
12
+ /** This reader's own changes to take back, and to make again. */
13
+ readonly history: {
14
+ readonly undo: boolean;
15
+ readonly redo: boolean;
16
+ };
17
+ readonly undo: () => void;
18
+ readonly redo: () => void;
19
+ /** Why the reader's hold changed, while it is worth saying; null otherwise. */
20
+ readonly notice: LiveNoticeReason | null;
21
+ }
22
+ /**
23
+ * Holds the artifact live while its latest version is shown: null for an older version, and for
24
+ * a kind that is not edited live. The document draws the canvas once it holds it; until then, and
25
+ * if the server never holds it live, the version does, and editing it is a draft.
26
+ */
27
+ export declare function useLiveView(artifactId: string | null): LiveView | null;
28
+ //# sourceMappingURL=view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAEhE,wFAAwF;AACxF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;IACjC,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAA;IACzB,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAA;IACpE,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAA;IACzB,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAA;CACzC;AAQD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,IAAI,CA8CtE"}