@sixb/app 0.2.3 → 0.2.5

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 (329) hide show
  1. package/assets/connector-icons/README.md +1 -0
  2. package/assets/connector-icons/ctm.png +0 -0
  3. package/dist/agent/activity-label.d.ts.map +1 -1
  4. package/dist/agent/agent-chat.d.ts +3 -1
  5. package/dist/agent/agent-chat.d.ts.map +1 -1
  6. package/dist/agent/agent-panel.d.ts.map +1 -1
  7. package/dist/agent/artifact-panel.d.ts +3 -1
  8. package/dist/agent/artifact-panel.d.ts.map +1 -1
  9. package/dist/agent/background/background-tool-row.d.ts.map +1 -1
  10. package/dist/agent/background/interpret.d.ts +1 -1
  11. package/dist/agent/background/interpret.d.ts.map +1 -1
  12. package/dist/agent/components/composer-settings.d.ts +1 -1
  13. package/dist/agent/components/composer-settings.d.ts.map +1 -1
  14. package/dist/agent/components/composer.d.ts +22 -5
  15. package/dist/agent/components/composer.d.ts.map +1 -1
  16. package/dist/agent/components/context-meter.d.ts +1 -1
  17. package/dist/agent/components/context-meter.d.ts.map +1 -1
  18. package/dist/agent/components/conversation-panel.d.ts +8 -2
  19. package/dist/agent/components/conversation-panel.d.ts.map +1 -1
  20. package/dist/agent/components/message-parts.d.ts +2 -1
  21. package/dist/agent/components/message-parts.d.ts.map +1 -1
  22. package/dist/agent/components/message-view.d.ts.map +1 -1
  23. package/dist/agent/components/pending-messages.d.ts +20 -0
  24. package/dist/agent/components/pending-messages.d.ts.map +1 -0
  25. package/dist/agent/components/sandbox-recovery.d.ts +11 -2
  26. package/dist/agent/components/sandbox-recovery.d.ts.map +1 -1
  27. package/dist/agent/components/threads-button.d.ts +1 -1
  28. package/dist/agent/components/threads-button.d.ts.map +1 -1
  29. package/dist/agent/components/transcript.d.ts +5 -0
  30. package/dist/agent/components/transcript.d.ts.map +1 -1
  31. package/dist/agent/conversation.d.ts +3 -6
  32. package/dist/agent/conversation.d.ts.map +1 -1
  33. package/dist/agent/delegation/agent-exchange.d.ts +16 -0
  34. package/dist/agent/delegation/agent-exchange.d.ts.map +1 -0
  35. package/dist/agent/delegation/child-card.d.ts +3 -3
  36. package/dist/agent/delegation/child-card.d.ts.map +1 -1
  37. package/dist/agent/delegation/child-parts.d.ts +1 -10
  38. package/dist/agent/delegation/child-parts.d.ts.map +1 -1
  39. package/dist/agent/delegation/child-work.d.ts.map +1 -1
  40. package/dist/agent/delegation/interpret.d.ts +9 -10
  41. package/dist/agent/delegation/interpret.d.ts.map +1 -1
  42. package/dist/agent/delegation/use-children.d.ts.map +1 -1
  43. package/dist/agent/file-edits/file-edit-tool-view.d.ts +10 -0
  44. package/dist/agent/file-edits/file-edit-tool-view.d.ts.map +1 -0
  45. package/dist/agent/file-edits/interpret.d.ts +25 -0
  46. package/dist/agent/file-edits/interpret.d.ts.map +1 -0
  47. package/dist/agent/hooks/use-agent-conversation.d.ts +16 -4
  48. package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
  49. package/dist/agent/hooks/use-thread-lists.d.ts.map +1 -1
  50. package/dist/agent/hooks/use-thread-stream.d.ts.map +1 -1
  51. package/dist/agent/i18n/en.d.ts +114 -5
  52. package/dist/agent/i18n/en.d.ts.map +1 -1
  53. package/dist/agent/i18n/fr.d.ts.map +1 -1
  54. package/dist/agent/i18n/index.d.ts +190 -8
  55. package/dist/agent/i18n/index.d.ts.map +1 -1
  56. package/dist/agent/inbox-handoff.d.ts +10 -0
  57. package/dist/agent/inbox-handoff.d.ts.map +1 -0
  58. package/dist/agent/live-run.d.ts +8 -1
  59. package/dist/agent/live-run.d.ts.map +1 -1
  60. package/dist/agent/message-agent/interpret.d.ts +2 -2
  61. package/dist/agent/message-agent/interpret.d.ts.map +1 -1
  62. package/dist/agent/publish-artifact/interpret.d.ts +1 -1
  63. package/dist/agent/publish-artifact/interpret.d.ts.map +1 -1
  64. package/dist/agent/questions/interpret.d.ts +31 -0
  65. package/dist/agent/questions/interpret.d.ts.map +1 -0
  66. package/dist/agent/questions/question-card.d.ts +16 -0
  67. package/dist/agent/questions/question-card.d.ts.map +1 -0
  68. package/dist/agent/questions/question-composer.d.ts +15 -0
  69. package/dist/agent/questions/question-composer.d.ts.map +1 -0
  70. package/dist/agent/read/interpret.d.ts +8 -1
  71. package/dist/agent/read/interpret.d.ts.map +1 -1
  72. package/dist/agent/read/read-tool-view.d.ts.map +1 -1
  73. package/dist/agent/search/interpret.d.ts +101 -0
  74. package/dist/agent/search/interpret.d.ts.map +1 -0
  75. package/dist/agent/search/search-tool-view.d.ts +10 -0
  76. package/dist/agent/search/search-tool-view.d.ts.map +1 -0
  77. package/dist/agent/thread-state.d.ts +26 -0
  78. package/dist/agent/thread-state.d.ts.map +1 -0
  79. package/dist/agent/tool-views/built-in.d.ts.map +1 -1
  80. package/dist/agent/tool-views/registry.d.ts +5 -6
  81. package/dist/agent/tool-views/registry.d.ts.map +1 -1
  82. package/dist/agent/types.d.ts +5 -1
  83. package/dist/agent/types.d.ts.map +1 -1
  84. package/dist/agent/view-file/view-file-tool-view.d.ts +2 -1
  85. package/dist/agent/view-file/view-file-tool-view.d.ts.map +1 -1
  86. package/dist/agent/waits.d.ts +14 -0
  87. package/dist/agent/waits.d.ts.map +1 -0
  88. package/dist/artifacts/card-preview.d.ts.map +1 -1
  89. package/dist/artifacts/edit-session.d.ts +11 -1
  90. package/dist/artifacts/edit-session.d.ts.map +1 -1
  91. package/dist/artifacts/editor/block-handle.d.ts +20 -0
  92. package/dist/artifacts/editor/block-handle.d.ts.map +1 -0
  93. package/dist/artifacts/editor/blocks.d.ts +34 -0
  94. package/dist/artifacts/editor/blocks.d.ts.map +1 -0
  95. package/dist/artifacts/editor/callout-view.d.ts +7 -0
  96. package/dist/artifacts/editor/callout-view.d.ts.map +1 -0
  97. package/dist/artifacts/editor/document-editor.d.ts +30 -0
  98. package/dist/artifacts/editor/document-editor.d.ts.map +1 -0
  99. package/dist/artifacts/editor/figure-view.d.ts +12 -0
  100. package/dist/artifacts/editor/figure-view.d.ts.map +1 -0
  101. package/dist/artifacts/editor/find-blocks.d.ts +6 -0
  102. package/dist/artifacts/editor/find-blocks.d.ts.map +1 -0
  103. package/dist/artifacts/editor/markdown-document.d.ts +12 -0
  104. package/dist/artifacts/editor/markdown-document.d.ts.map +1 -0
  105. package/dist/artifacts/editor/messages.d.ts +4 -0
  106. package/dist/artifacts/editor/messages.d.ts.map +1 -0
  107. package/dist/artifacts/editor/schema.d.ts +21 -0
  108. package/dist/artifacts/editor/schema.d.ts.map +1 -0
  109. package/dist/artifacts/editor/selection-toolbar.d.ts +35 -0
  110. package/dist/artifacts/editor/selection-toolbar.d.ts.map +1 -0
  111. package/dist/artifacts/editor/slash-menu.d.ts +43 -0
  112. package/dist/artifacts/editor/slash-menu.d.ts.map +1 -0
  113. package/dist/artifacts/editor/upload.d.ts +12 -0
  114. package/dist/artifacts/editor/upload.d.ts.map +1 -0
  115. package/dist/artifacts/file-source.d.ts +5 -0
  116. package/dist/artifacts/file-source.d.ts.map +1 -1
  117. package/dist/artifacts/frame-editor/bundle.d.ts +7 -0
  118. package/dist/artifacts/frame-editor/bundle.d.ts.map +1 -0
  119. package/dist/artifacts/frame-editor/commands.d.ts +93 -0
  120. package/dist/artifacts/frame-editor/commands.d.ts.map +1 -0
  121. package/dist/artifacts/frame-editor/entry.d.ts +2 -0
  122. package/dist/artifacts/frame-editor/entry.d.ts.map +1 -0
  123. package/dist/artifacts/frame-editor/frame.d.ts +5 -0
  124. package/dist/artifacts/frame-editor/frame.d.ts.map +1 -0
  125. package/dist/artifacts/frame-editor/keys.d.ts +8 -0
  126. package/dist/artifacts/frame-editor/keys.d.ts.map +1 -0
  127. package/dist/artifacts/frame-editor/protocol.d.ts +186 -0
  128. package/dist/artifacts/frame-editor/protocol.d.ts.map +1 -0
  129. package/dist/artifacts/frame-editor/schema.d.ts +34 -0
  130. package/dist/artifacts/frame-editor/schema.d.ts.map +1 -0
  131. package/dist/artifacts/frame-editor/style.d.ts +2 -0
  132. package/dist/artifacts/frame-editor/style.d.ts.map +1 -0
  133. package/dist/artifacts/frame.d.ts +2 -2
  134. package/dist/artifacts/frame.d.ts.map +1 -1
  135. package/dist/artifacts/live/boards.d.ts +2 -0
  136. package/dist/artifacts/live/boards.d.ts.map +1 -1
  137. package/dist/artifacts/live/document.d.ts +32 -0
  138. package/dist/artifacts/live/document.d.ts.map +1 -0
  139. package/dist/artifacts/live/header.d.ts +4 -4
  140. package/dist/artifacts/live/header.d.ts.map +1 -1
  141. package/dist/artifacts/live/presence.d.ts.map +1 -1
  142. package/dist/artifacts/live/session.d.ts +2 -0
  143. package/dist/artifacts/live/session.d.ts.map +1 -1
  144. package/dist/artifacts/live/view.d.ts +4 -3
  145. package/dist/artifacts/live/view.d.ts.map +1 -1
  146. package/dist/artifacts/messages.d.ts +278 -2
  147. package/dist/artifacts/messages.d.ts.map +1 -1
  148. package/dist/artifacts/pdf.d.ts +8 -0
  149. package/dist/artifacts/pdf.d.ts.map +1 -0
  150. package/dist/artifacts/queries.d.ts +80 -0
  151. package/dist/artifacts/queries.d.ts.map +1 -1
  152. package/dist/artifacts/references/references.d.ts +3 -3
  153. package/dist/artifacts/references/references.d.ts.map +1 -1
  154. package/dist/artifacts/renderers/canvas/board-editor.d.ts +11 -4
  155. package/dist/artifacts/renderers/canvas/board-editor.d.ts.map +1 -1
  156. package/dist/artifacts/renderers/canvas/board.d.ts +14 -2
  157. package/dist/artifacts/renderers/canvas/board.d.ts.map +1 -1
  158. package/dist/artifacts/renderers/canvas/canvas.d.ts +4 -3
  159. package/dist/artifacts/renderers/canvas/canvas.d.ts.map +1 -1
  160. package/dist/artifacts/renderers/canvas/comment-pins.d.ts +4 -2
  161. package/dist/artifacts/renderers/canvas/comment-pins.d.ts.map +1 -1
  162. package/dist/artifacts/renderers/canvas/comments-panel.d.ts.map +1 -1
  163. package/dist/artifacts/renderers/canvas/comments.d.ts +2 -1
  164. package/dist/artifacts/renderers/canvas/comments.d.ts.map +1 -1
  165. package/dist/artifacts/renderers/canvas/controls.d.ts +15 -4
  166. package/dist/artifacts/renderers/canvas/controls.d.ts.map +1 -1
  167. package/dist/artifacts/renderers/canvas/focus.d.ts +19 -5
  168. package/dist/artifacts/renderers/canvas/focus.d.ts.map +1 -1
  169. package/dist/artifacts/renderers/canvas/gestures.d.ts +46 -0
  170. package/dist/artifacts/renderers/canvas/gestures.d.ts.map +1 -0
  171. package/dist/artifacts/renderers/canvas/page-resize.d.ts +21 -0
  172. package/dist/artifacts/renderers/canvas/page-resize.d.ts.map +1 -0
  173. package/dist/artifacts/renderers/canvas/page-size-controls.d.ts +21 -0
  174. package/dist/artifacts/renderers/canvas/page-size-controls.d.ts.map +1 -0
  175. package/dist/artifacts/renderers/canvas/page-size.d.ts +93 -0
  176. package/dist/artifacts/renderers/canvas/page-size.d.ts.map +1 -0
  177. package/dist/artifacts/renderers/canvas/page-zoom.d.ts +64 -0
  178. package/dist/artifacts/renderers/canvas/page-zoom.d.ts.map +1 -0
  179. package/dist/artifacts/renderers/canvas/shown-size.d.ts +26 -0
  180. package/dist/artifacts/renderers/canvas/shown-size.d.ts.map +1 -0
  181. package/dist/artifacts/renderers/designed-document.d.ts +28 -0
  182. package/dist/artifacts/renderers/designed-document.d.ts.map +1 -0
  183. package/dist/artifacts/renderers/document-tree.d.ts +2 -0
  184. package/dist/artifacts/renderers/document-tree.d.ts.map +1 -1
  185. package/dist/artifacts/renderers/document.d.ts +9 -1
  186. package/dist/artifacts/renderers/document.d.ts.map +1 -1
  187. package/dist/artifacts/renderers/live-frame.d.ts +145 -0
  188. package/dist/artifacts/renderers/live-frame.d.ts.map +1 -0
  189. package/dist/artifacts/renderers/page-editor.d.ts +16 -0
  190. package/dist/artifacts/renderers/page-editor.d.ts.map +1 -0
  191. package/dist/artifacts/renderers/page.d.ts +10 -1
  192. package/dist/artifacts/renderers/page.d.ts.map +1 -1
  193. package/dist/artifacts/viewer.d.ts.map +1 -1
  194. package/dist/{chunk-001c4gnk.js → chunk-4fex83k2.js} +19965 -13027
  195. package/dist/chunk-4fex83k2.js.map +239 -0
  196. package/dist/{chunk-5crvhjp2.js → chunk-4wm09prf.js} +1633 -1999
  197. package/dist/chunk-4wm09prf.js.map +27 -0
  198. package/dist/{chunk-fwb9mxwm.js → chunk-5sgac68y.js} +1 -1
  199. package/dist/{chunk-kes4ygmz.js → chunk-69qgh20f.js} +1 -1
  200. package/dist/chunk-y51c4tsz.js +11 -0
  201. package/dist/chunk-y51c4tsz.js.map +10 -0
  202. package/dist/index.d.ts +4 -1
  203. package/dist/index.d.ts.map +1 -1
  204. package/dist/index.js +13 -6
  205. package/dist/index.js.map +5 -5
  206. package/dist/pages/console/data/messages.d.ts +6 -0
  207. package/dist/pages/console/data/messages.d.ts.map +1 -1
  208. package/dist/pages/console/data/shared.d.ts.map +1 -1
  209. package/dist/pages.js +12 -5
  210. package/dist/pages.js.map +6 -6
  211. package/dist/shell/search-command.d.ts.map +1 -1
  212. package/package.json +22 -5
  213. package/src/agent/activity-label.ts +9 -1
  214. package/src/agent/agent-chat.tsx +57 -37
  215. package/src/agent/agent-execution-trace.tsx +2 -2
  216. package/src/agent/agent-panel.tsx +6 -4
  217. package/src/agent/agent.css +254 -0
  218. package/src/agent/artifact-panel.tsx +77 -22
  219. package/src/agent/background/background-tool-row.tsx +24 -10
  220. package/src/agent/background/interpret.ts +60 -51
  221. package/src/agent/components/composer-settings.tsx +20 -10
  222. package/src/agent/components/composer.tsx +342 -104
  223. package/src/agent/components/context-meter.tsx +7 -3
  224. package/src/agent/components/conversation-panel.tsx +96 -37
  225. package/src/agent/components/message-parts.tsx +390 -64
  226. package/src/agent/components/message-view.tsx +12 -2
  227. package/src/agent/components/pending-messages.tsx +338 -0
  228. package/src/agent/components/sandbox-recovery.tsx +36 -17
  229. package/src/agent/components/threads-button.tsx +3 -2
  230. package/src/agent/components/transcript.tsx +92 -45
  231. package/src/agent/conversation.ts +203 -54
  232. package/src/agent/delegation/agent-exchange.tsx +53 -0
  233. package/src/agent/delegation/child-card.tsx +6 -40
  234. package/src/agent/delegation/child-parts.tsx +1 -84
  235. package/src/agent/delegation/child-work.tsx +19 -5
  236. package/src/agent/delegation/interpret.ts +64 -61
  237. package/src/agent/delegation/model.ts +1 -1
  238. package/src/agent/file-edits/file-edit-tool-view.tsx +126 -0
  239. package/src/agent/file-edits/interpret.ts +120 -0
  240. package/src/agent/hooks/use-agent-conversation.ts +360 -92
  241. package/src/agent/hooks/use-thread-stream.ts +10 -0
  242. package/src/agent/i18n/en.ts +134 -16
  243. package/src/agent/i18n/fr.ts +122 -16
  244. package/src/agent/inbox-handoff.ts +47 -0
  245. package/src/agent/live-run.ts +23 -2
  246. package/src/agent/message-agent/interpret.ts +4 -3
  247. package/src/agent/publish-artifact/interpret.ts +14 -5
  248. package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +2 -2
  249. package/src/agent/questions/interpret.ts +90 -0
  250. package/src/agent/questions/question-card.tsx +57 -0
  251. package/src/agent/questions/question-composer.tsx +257 -0
  252. package/src/agent/react-router.tsx +2 -2
  253. package/src/agent/read/interpret.ts +34 -1
  254. package/src/agent/read/read-tool-view.tsx +20 -4
  255. package/src/agent/search/interpret.ts +367 -0
  256. package/src/agent/search/search-tool-view.tsx +235 -0
  257. package/src/agent/thread-state.ts +114 -0
  258. package/src/agent/tool-views/built-in.tsx +33 -6
  259. package/src/agent/tool-views/registry.tsx +28 -2
  260. package/src/agent/types.ts +7 -0
  261. package/src/agent/view-file/view-file-tool-view.tsx +33 -19
  262. package/src/agent/waits.ts +50 -0
  263. package/src/artifacts/artifacts.css +434 -0
  264. package/src/artifacts/card-preview.tsx +6 -1
  265. package/src/artifacts/edit-session.tsx +15 -1
  266. package/src/artifacts/editor/block-handle.tsx +278 -0
  267. package/src/artifacts/editor/blocks.ts +216 -0
  268. package/src/artifacts/editor/callout-view.tsx +31 -0
  269. package/src/artifacts/editor/document-editor.tsx +484 -0
  270. package/src/artifacts/editor/figure-view.tsx +66 -0
  271. package/src/artifacts/editor/find-blocks.ts +19 -0
  272. package/src/artifacts/editor/markdown-document.tsx +72 -0
  273. package/src/artifacts/editor/messages.ts +4 -0
  274. package/src/artifacts/editor/schema.ts +159 -0
  275. package/src/artifacts/editor/selection-toolbar.tsx +364 -0
  276. package/src/artifacts/editor/slash-menu.tsx +251 -0
  277. package/src/artifacts/editor/upload.ts +40 -0
  278. package/src/artifacts/file-source.ts +11 -0
  279. package/src/artifacts/frame-editor/bundle.ts +8 -0
  280. package/src/artifacts/frame-editor/commands.ts +565 -0
  281. package/src/artifacts/frame-editor/entry.ts +6 -0
  282. package/src/artifacts/frame-editor/frame.ts +847 -0
  283. package/src/artifacts/frame-editor/generated/editor.txt +149 -0
  284. package/src/artifacts/frame-editor/generated.d.ts +5 -0
  285. package/src/artifacts/frame-editor/keys.ts +323 -0
  286. package/src/artifacts/frame-editor/protocol.ts +151 -0
  287. package/src/artifacts/frame-editor/schema.ts +293 -0
  288. package/src/artifacts/frame-editor/style.ts +58 -0
  289. package/src/artifacts/frame.tsx +14 -5
  290. package/src/artifacts/live/boards.ts +46 -3
  291. package/src/artifacts/live/document.ts +89 -0
  292. package/src/artifacts/live/header.tsx +9 -14
  293. package/src/artifacts/live/presence.ts +5 -1
  294. package/src/artifacts/live/session.ts +4 -2
  295. package/src/artifacts/live/view.ts +14 -8
  296. package/src/artifacts/messages.ts +192 -2
  297. package/src/artifacts/pdf.ts +50 -0
  298. package/src/artifacts/references/references.tsx +46 -11
  299. package/src/artifacts/renderers/canvas/board-editor.tsx +44 -155
  300. package/src/artifacts/renderers/canvas/board.tsx +70 -8
  301. package/src/artifacts/renderers/canvas/canvas.tsx +66 -15
  302. package/src/artifacts/renderers/canvas/comment-pins.tsx +5 -0
  303. package/src/artifacts/renderers/canvas/comments-panel.tsx +58 -1
  304. package/src/artifacts/renderers/canvas/comments.ts +8 -4
  305. package/src/artifacts/renderers/canvas/controls.tsx +64 -30
  306. package/src/artifacts/renderers/canvas/focus.tsx +200 -56
  307. package/src/artifacts/renderers/canvas/gestures.ts +265 -0
  308. package/src/artifacts/renderers/canvas/page-resize.tsx +542 -0
  309. package/src/artifacts/renderers/canvas/page-size-controls.tsx +193 -0
  310. package/src/artifacts/renderers/canvas/page-size.ts +218 -0
  311. package/src/artifacts/renderers/canvas/page-zoom.ts +280 -0
  312. package/src/artifacts/renderers/canvas/shown-size.ts +105 -0
  313. package/src/artifacts/renderers/designed-document.tsx +277 -0
  314. package/src/artifacts/renderers/document-tree.ts +9 -0
  315. package/src/artifacts/renderers/document.tsx +13 -102
  316. package/src/artifacts/renderers/live-frame.ts +163 -0
  317. package/src/artifacts/renderers/page-editor.tsx +613 -0
  318. package/src/artifacts/renderers/page.tsx +21 -4
  319. package/src/artifacts/viewer.tsx +101 -41
  320. package/src/index.ts +8 -0
  321. package/src/pages/console/data/messages.ts +6 -0
  322. package/src/pages/console/data/projections.tsx +4 -0
  323. package/src/pages/console/data/shared.tsx +1 -0
  324. package/src/pages/console/ontology/lineage/trail.tsx +3 -0
  325. package/src/shell/search-command.tsx +2 -0
  326. package/dist/chunk-001c4gnk.js.map +0 -204
  327. package/dist/chunk-5crvhjp2.js.map +0 -28
  328. /package/dist/{chunk-fwb9mxwm.js.map → chunk-5sgac68y.js.map} +0 -0
  329. /package/dist/{chunk-kes4ygmz.js.map → chunk-69qgh20f.js.map} +0 -0
@@ -0,0 +1,93 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ import type { Fragment, Node as ProseMirrorNode, ResolvedPos, Schema } from "@tiptap/pm/model";
3
+ import { Selection, type Transaction } from "@tiptap/pm/state";
4
+ import type { EditorView } from "@tiptap/pm/view";
5
+ import type { EditorRect, PageBlockId } from "./protocol";
6
+ /** Blocks of words where Enter starts a new line rather than a new block: a cell, a caption. */
7
+ export declare const SINGLE_BLOCK_TAGS: ReadonlySet<string>;
8
+ export declare const LIST_TAGS: ReadonlySet<string>;
9
+ /** The block of words the selection is in, and where it starts. */
10
+ export declare function wordsAt(selection: Selection): {
11
+ node: ProseMirrorNode;
12
+ pos: number;
13
+ } | null;
14
+ export declare function tagOf(node: ProseMirrorNode | null | undefined): string;
15
+ /** A block of words, made by the editor: spaced as the block before it when written back. */
16
+ export declare function words(schema: Schema, tag: string, open?: string, content?: Fragment | null): ProseMirrorNode;
17
+ export declare function box(schema: Schema, tag: string, children: readonly ProseMirrorNode[], open?: string): ProseMirrorNode;
18
+ /** A start tag without its `id`, which a copy must not repeat. */
19
+ export declare function withoutId(open: string, tag: string): string;
20
+ /**
21
+ * The start tag the page wrote for `tag` nearest before `pos`, else first after it, so a new
22
+ * heading or table looks like the page's others; a plain one where it wrote none.
23
+ */
24
+ export declare function likeOpen(doc: ProseMirrorNode, pos: number, tag: string): string;
25
+ /** A new block of the kind `id`, as it is made where `pos` is. */
26
+ export declare function makeBlock(schema: Schema, doc: ProseMirrorNode, pos: number, id: PageBlockId): ProseMirrorNode | null;
27
+ /**
28
+ * Where a block goes after the one at `pos`: right after it, or after the list or table it is
29
+ * part of, where a block of any kind may stand.
30
+ */
31
+ export declare function placeAfter(doc: ProseMirrorNode, pos: number): number;
32
+ /**
33
+ * Puts `made` where the block of words at `pos` is: in its place when it is empty and may be
34
+ * replaced, else after it. Returns where `made` starts.
35
+ */
36
+ export declare function placeBlock(tr: Transaction, pos: number, made: ProseMirrorNode): number;
37
+ /** Puts the caret in the first words of the block at `at`, or on a new paragraph after it. */
38
+ export declare function caretInto(tr: Transaction, at: number): void;
39
+ /** Makes a block of the kind `id` where the caret is, in place of `range`: what `/` typed. */
40
+ export declare function insertBlock(editor: Editor, id: PageBlockId, range?: {
41
+ readonly from: number;
42
+ readonly to: number;
43
+ }): boolean;
44
+ /**
45
+ * Turns the block of words at `pos`, or the one the caret is in, into a block of the kind `id`,
46
+ * keeping its words: a paragraph into a heading, a list item out of its list into a paragraph.
47
+ */
48
+ export declare function turnInto(editor: Editor, id: PageBlockId, pos?: number): boolean;
49
+ /**
50
+ * Whether the block at `pos` may be turned into another kind: a block of words that stands where
51
+ * any block may. A cell, a caption, or words in a table's row cannot: a heading there is not HTML.
52
+ */
53
+ export declare function turnable(doc: ProseMirrorNode, pos: number): boolean;
54
+ /**
55
+ * Takes the list item at `pos` out of its list as `replacement`: before the list when it is the
56
+ * first item, after it when the last, and between the two halves of the list otherwise. The caret
57
+ * goes into it. Returns where it starts.
58
+ */
59
+ export declare function liftOut(tr: Transaction, pos: number, replacement: ProseMirrorNode): number;
60
+ /** A copy of the block at `pos` right after it, without the ids that would repeat. */
61
+ export declare function duplicate(editor: Editor, pos: number): boolean;
62
+ /** Deletes the block at `pos`, and a box it leaves empty with it. */
63
+ export declare function remove(editor: Editor, pos: number): boolean;
64
+ /** Moves the block at `pos` past its sibling before (`-1`) or after (`1`) it. Returns where it is. */
65
+ export declare function move(editor: Editor, pos: number, by: -1 | 1): number | null;
66
+ /**
67
+ * The block the pointer is beside: the innermost block under it, or, between blocks, the nearer
68
+ * of the two; never the box around them, whose handle would be far from the pointer. In the margin
69
+ * beside a block, where its handle is, the block on that line. A table is pointed at whole.
70
+ */
71
+ export declare function blockAt(view: EditorView, x: number, y: number): {
72
+ node: ProseMirrorNode;
73
+ pos: number;
74
+ } | null;
75
+ /** What a node draws as, measured: a node drawn through its children is as big as they are. */
76
+ export declare function rectOf(dom: globalThis.Node | null | undefined): EditorRect | null;
77
+ /**
78
+ * Where the block at `dragged` would land, dropped at a point: before or after the block there,
79
+ * whichever half of it the point is in. A list item lands among list items; anything else beside
80
+ * a list, not in it. Null where it cannot land: on itself, or inside itself.
81
+ */
82
+ export declare function dropTarget(view: EditorView, dragged: number, x: number, y: number): {
83
+ at: number;
84
+ line: EditorRect;
85
+ } | null;
86
+ /**
87
+ * Moves the block at `dragged` to `at`, as a drop does. A box it was all of goes with it, as
88
+ * `remove` takes it: a list whose only item moves into another list leaves no empty list behind.
89
+ */
90
+ export declare function moveTo(editor: Editor, dragged: number, at: number): boolean;
91
+ /** The kind of block the block of words at `$pos` is, as "Turn into" names it. */
92
+ export declare function blockKind($pos: ResolvedPos): PageBlockId | null;
93
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/artifacts/frame-editor/commands.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,eAAe,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC9F,OAAO,EAAiB,SAAS,EAAiB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAOzD,gGAAgG;AAChG,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAShD,CAAA;AAEF,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,CAAiC,CAAA;AAmB3E,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI3F;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAEtE;AAED,6FAA6F;AAC7F,wBAAgB,KAAK,CACnB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,QAAQ,GAAG,IAAI,GACxB,eAAe,CAKjB;AAED,wBAAgB,GAAG,CACjB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,SAAS,eAAe,EAAE,EACpC,IAAI,CAAC,EAAE,MAAM,GACZ,eAAe,CAEjB;AAMD,kEAAkE;AAClE,wBAAgB,SAAS,CA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.d.ts","sourceRoot":"","sources":["../../../src/artifacts/frame-editor/entry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export declare function startFrameEditor({ port, body, }: {
2
+ readonly port: MessagePort;
3
+ readonly body: HTMLElement;
4
+ }): void;
5
+ //# sourceMappingURL=frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../src/artifacts/frame-editor/frame.ts"],"names":[],"mappings":"AAkFA,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,IAAI,GACL,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAC3B,GAAG,IAAI,CAiiBP"}
@@ -0,0 +1,8 @@
1
+ import { type Editor, Extension } from "@tiptap/core";
2
+ import type { PageMark } from "./protocol";
3
+ export interface PageKeysOptions {
4
+ readonly toggleMark: (editor: Editor, mark: PageMark) => void;
5
+ readonly onLink: () => void;
6
+ }
7
+ export declare const PageKeys: Extension<PageKeysOptions, any>;
8
+ //# sourceMappingURL=keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/artifacts/frame-editor/keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAcrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAoB1C,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;IAC7D,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED,eAAO,MAAM,QAAQ,iCAuDnB,CAAA"}
@@ -0,0 +1,186 @@
1
+ /** The kinds of block the editor makes, as the `/` menu and "Turn into" offer them. */
2
+ export type PageBlockId = "paragraph" | "heading1" | "heading2" | "heading3" | "bulletList" | "orderedList" | "quote" | "table" | "image" | "divider" | "pageBreak";
3
+ /** A kind of block, as the frame finds it by what the reader types after `/`. */
4
+ export interface PageBlockChoice {
5
+ readonly id: PageBlockId;
6
+ readonly label: string;
7
+ readonly keywords: readonly string[];
8
+ }
9
+ /** A rectangle in the frame's viewport, which is where the app's overlay draws. */
10
+ export interface EditorRect {
11
+ readonly left: number;
12
+ readonly top: number;
13
+ readonly right: number;
14
+ readonly bottom: number;
15
+ }
16
+ /** The marks of selected words the toolbar shows. */
17
+ export type PageMark = "bold" | "italic" | "underline" | "strike" | "code";
18
+ export type EditorCommand = {
19
+ readonly name: "mark";
20
+ readonly mark: PageMark;
21
+ } | {
22
+ readonly name: "link";
23
+ readonly href: string | null;
24
+ } | {
25
+ readonly name: "turnInto";
26
+ readonly block: PageBlockId;
27
+ readonly pos?: number;
28
+ }
29
+ /** Chooses the `/` menu's item at `index`, as Enter does. */
30
+ | {
31
+ readonly name: "choose";
32
+ readonly index: number;
33
+ }
34
+ /** Points the `/` menu at its item at `index`, as the arrows do. */
35
+ | {
36
+ readonly name: "point";
37
+ readonly index: number;
38
+ } | {
39
+ readonly name: "closeMenu";
40
+ }
41
+ /** Adds a paragraph below the block at `pos` and opens the `/` menu in it. */
42
+ | {
43
+ readonly name: "addBelow";
44
+ readonly pos: number;
45
+ } | {
46
+ readonly name: "duplicate";
47
+ readonly pos: number;
48
+ } | {
49
+ readonly name: "remove";
50
+ readonly pos: number;
51
+ } | {
52
+ readonly name: "move";
53
+ readonly pos: number;
54
+ readonly by: -1 | 1;
55
+ }
56
+ /** Picks the block at `pos` whole, as its handle's menu acts on it. */
57
+ | {
58
+ readonly name: "pick";
59
+ readonly pos: number;
60
+ }
61
+ /** A drag of the block at `pos` by its handle, the pointer at `x`, `y`. */
62
+ | {
63
+ readonly name: "drag";
64
+ readonly pos: number;
65
+ readonly x: number;
66
+ readonly y: number;
67
+ } | {
68
+ readonly name: "drop";
69
+ readonly pos: number;
70
+ readonly x: number;
71
+ readonly y: number;
72
+ } | {
73
+ readonly name: "endDrag";
74
+ }
75
+ /**
76
+ * A picture the app stored for the reader, at the path its source names; `preview` shows it
77
+ * until a version of the document holds it.
78
+ */
79
+ | {
80
+ readonly name: "image";
81
+ readonly src: string;
82
+ readonly alt: string;
83
+ readonly at?: number;
84
+ readonly preview?: Blob;
85
+ } | {
86
+ readonly name: "focus";
87
+ };
88
+ export type AppToEditor = {
89
+ readonly type: "start";
90
+ /** The live document, as `Y.encodeStateAsUpdate` encodes it. */
91
+ readonly state: Uint8Array;
92
+ readonly path: string;
93
+ readonly editable: boolean;
94
+ readonly blocks: readonly PageBlockChoice[];
95
+ /** Words the editor shows itself, in the reader's language. */
96
+ readonly words: EditorWords;
97
+ } | {
98
+ readonly type: "update";
99
+ readonly update: Uint8Array;
100
+ } | {
101
+ readonly type: "awareness";
102
+ readonly update: Uint8Array;
103
+ } | {
104
+ readonly type: "editable";
105
+ readonly editable: boolean;
106
+ } | {
107
+ readonly type: "run";
108
+ readonly command: EditorCommand;
109
+ };
110
+ export interface EditorWords {
111
+ readonly placeholder: string;
112
+ readonly listItem: string;
113
+ /** An empty heading's placeholder, by level from 1. */
114
+ readonly headings: readonly string[];
115
+ readonly pageBreak: string;
116
+ }
117
+ /** What the toolbar over selected words shows; null when no words are selected. */
118
+ export interface SelectionState {
119
+ readonly rect: EditorRect;
120
+ readonly marks: Readonly<Record<PageMark, boolean>>;
121
+ readonly link: string | null;
122
+ readonly block: PageBlockId | null;
123
+ /** Whether the words' block may be turned into another kind: not a cell or a caption. */
124
+ readonly turnable: boolean;
125
+ }
126
+ /** The `/` menu: where the `/` is, the kinds of block that match what follows it, the one pointed at. */
127
+ export interface SlashState {
128
+ readonly rect: EditorRect;
129
+ readonly items: readonly PageBlockId[];
130
+ readonly index: number;
131
+ }
132
+ /** The block the pointer is over, which the handle sits beside. */
133
+ export interface HoverState {
134
+ readonly pos: number;
135
+ readonly rect: EditorRect;
136
+ /** Whether "Turn into" changes it: words that stand where any block may. */
137
+ readonly textual: boolean;
138
+ }
139
+ export type EditorToApp = {
140
+ readonly type: "ready";
141
+ }
142
+ /** The page is no longer one the editor holds: the live document holds it as text now. */
143
+ | {
144
+ readonly type: "gone";
145
+ } | {
146
+ readonly type: "update";
147
+ readonly update: Uint8Array;
148
+ } | {
149
+ readonly type: "cursor";
150
+ readonly cursor: unknown;
151
+ } | {
152
+ readonly type: "focus";
153
+ readonly focused: boolean;
154
+ } | {
155
+ readonly type: "selection";
156
+ readonly selection: SelectionState | null;
157
+ } | {
158
+ readonly type: "slash";
159
+ readonly slash: SlashState | null;
160
+ } | {
161
+ readonly type: "hover";
162
+ readonly hover: HoverState | null;
163
+ }
164
+ /** Where a block dragged by its handle would land: a line across the page. */
165
+ | {
166
+ readonly type: "drop";
167
+ readonly line: EditorRect | null;
168
+ }
169
+ /** ⌘K over selected words: the app opens the toolbar's link field. */
170
+ | {
171
+ readonly type: "linkRequest";
172
+ }
173
+ /** Pictures the reader pasted or dropped, to add at the block at `at`. */
174
+ | {
175
+ readonly type: "upload";
176
+ readonly files: readonly File[];
177
+ readonly at: number | null;
178
+ }
179
+ /** The reader chose a picture from the `/` menu: the app asks them for the file. */
180
+ | {
181
+ readonly type: "pickImage";
182
+ readonly at: number | null;
183
+ };
184
+ /** The global the editor's script sets as it runs, which the frame's runtime takes at once. */
185
+ export declare const FRAME_EDITOR_GLOBAL = "__sixbFrameEditor";
186
+ //# sourceMappingURL=protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/artifacts/frame-editor/protocol.ts"],"names":[],"mappings":"AAgBA,uFAAuF;AACvF,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,YAAY,GACZ,aAAa,GACb,OAAO,GACP,OAAO,GACP,OAAO,GACP,SAAS,GACT,WAAW,CAAA;AAEf,iFAAiF;AAC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O,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;CAAE;AAC/D,8EAA8E;GAC5E;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;CAAE;AAC7D,sEAAsE;GACpE;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE;AAClC,0EAA0E;GACxE;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;AAC1F,oFAAoF;GAClF;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAE9D,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB,sBAAsB,CAAA"}
@@ -0,0 +1,34 @@
1
+ import { type AnyExtension, Mark, Node } from "@tiptap/core";
2
+ import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
3
+ export declare function tagAttributes(open: string | null | undefined): Record<string, string>;
4
+ /**
5
+ * Whether an attribute is drawn in the frame. The live document is anyone's who may edit it, and
6
+ * publishing's checks have not seen it: an event handler, or an address that runs script, would
7
+ * run in each reader's frame, beside the editor and its port. They are kept in the source.
8
+ */
9
+ export declare function drawable(name: string, value: string): boolean;
10
+ /** The tag a node of the page is drawn as: its own, unless it is one never drawn. */
11
+ export declare function drawnTag(tag: unknown): string;
12
+ /** Removes from markup drawn in the frame whatever could run script: see `drawable`. */
13
+ export declare function sanitize(root: DocumentFragment | Element): void;
14
+ /** A start tag for `tag` with `attrs`, as an editor writes one. */
15
+ export declare function startTag(tag: string, attrs?: Readonly<Record<string, string>>): string;
16
+ /** An element holding blocks: a section, a list, a table and its rows. */
17
+ export declare const Box: Node<any, any>;
18
+ /** An element holding words: a paragraph, a heading, a list item, a table's cell. */
19
+ export declare const TextBlock: Node<any, any>;
20
+ /** A picture among blocks. */
21
+ export declare const PageImage: Node<any, any>;
22
+ /** Anything else among blocks, kept as its source wrote it. */
23
+ export declare const RawBlock: Node<any, any>;
24
+ /** Anything inline that is not words: a field of live data, an inline picture or icon. */
25
+ export declare const RawInline: Node<any, any>;
26
+ /** A line break among words. */
27
+ export declare const HardBreak: Node<any, any>;
28
+ /** A mark for each inline tag, drawn as that tag with its source's attributes. */
29
+ export declare const PAGE_MARKS: Mark<any, any>[];
30
+ /** The page's schema: what core's page reads its body into. */
31
+ export declare function pageSchemaExtensions(): AnyExtension[];
32
+ /** Whether a node is a block of words that takes typing. */
33
+ export declare function isWords(node: ProseMirrorNode | null | undefined): boolean;
34
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/artifacts/frame-editor/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,KAAK,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAiB/D,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiBrF;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAQ7D;AAMD,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAG7C;AAED,wFAAwF;AACxF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,GAAG,IAAI,CAU/D;AAED,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,GAAG,MAAM,CAK1F;AA6DD,0EAA0E;AAC1E,eAAO,MAAM,GAAG,gBAwBd,CAAA;AAEF,qFAAqF;AACrF,eAAO,MAAM,SAAS,gBAkBpB,CAAA;AAEF,8BAA8B;AAC9B,eAAO,MAAM,SAAS,gBASpB,CAAA;AAEF,+DAA+D;AAC/D,eAAO,MAAM,QAAQ,gBAkBnB,CAAA;AAEF,0FAA0F;AAC1F,eAAO,MAAM,SAAS,gBAmBpB,CAAA;AAEF,gCAAgC;AAChC,eAAO,MAAM,SAAS,gBAUpB,CAAA;AAEF,kFAAkF;AAClF,eAAO,MAAM,UAAU,kBAWtB,CAAA;AAED,+DAA+D;AAC/D,wBAAgB,oBAAoB,IAAI,YAAY,EAAE,CAarD;AAED,4DAA4D;AAC5D,wBAAgB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEzE"}
@@ -0,0 +1,2 @@
1
+ export declare const PAGE_EDITOR_CSS = "\nbody.ProseMirror { outline: none; white-space: pre-wrap; word-wrap: break-word; }\nbody.ProseMirror :where([data-sixb-raw]) { white-space: normal; cursor: default; }\nbody.ProseMirror .ProseMirror-selectednode { outline: 2px solid #0a84ff; outline-offset: 2px; border-radius: 2px; }\nbody.ProseMirror ::selection { background: rgba(10, 132, 255, 0.22); }\nbody.ProseMirror .ProseMirror-selectednode::selection,\nbody.ProseMirror .ProseMirror-selectednode ::selection { background: transparent; }\nbody.ProseMirror :where([data-sixb-field]) {\n border-radius: 3px;\n background: rgba(10, 132, 255, 0.08);\n box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.28);\n}\nbody.ProseMirror .is-empty[data-placeholder]::before {\n content: attr(data-placeholder);\n float: left;\n height: 0;\n color: currentColor;\n opacity: 0.38;\n pointer-events: none;\n}\nbody.ProseMirror .sixb-page-break { position: relative; user-select: none; }\nbody.ProseMirror .sixb-page-break::after {\n content: attr(data-label);\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #71717a;\n font: 500 10px/1 system-ui, -apple-system, sans-serif;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n}\n.sixb-caret {\n position: relative;\n margin-inline: -1px;\n border-left: 2px solid var(--caret);\n word-break: normal;\n pointer-events: none;\n}\n.sixb-caret-label {\n position: absolute;\n bottom: 100%;\n left: -2px;\n padding: 1px 6px;\n border-radius: 6px 6px 6px 0;\n background: var(--caret);\n color: #fff;\n font: 600 11px/1.5 system-ui, -apple-system, sans-serif;\n font-style: normal;\n white-space: nowrap;\n user-select: none;\n}\n.sixb-caret-selection { background: color-mix(in oklab, var(--caret) 22%, transparent); }\n";
2
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/artifacts/frame-editor/style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,8wDAsD3B,CAAA"}
@@ -15,8 +15,8 @@ export interface ArtifactFrameHandle {
15
15
  * events of the protocol's shape. The app's theme goes in as tokens, read where the frame is
16
16
  * mounted, so an artifact's theme applies too.
17
17
  *
18
- * The frame stays hidden until its theme is applied, then fades in over `fallback`: until the
19
- * tokens arrive, a deck paints in the kit's light defaults, which flash on a dark page.
18
+ * The frame stays hidden until its theme is applied, then replaces `fallback`: until the tokens
19
+ * arrive, a deck paints in the kit's light defaults, which flash on a dark page.
20
20
  *
21
21
  * A page in it keeps data with `sixb.state`, and reads its version's queries with `sixb.query`: the
22
22
  * frame's calls are answered here, for the artifact and the version it shows and the signed-in
@@ -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,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AA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,oFAAoF;IACpF,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAA;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IAC9C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,sFAAsF;IACtF,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;CAC3C,+BA+PA;AA+CD,sFAAsF;AACtF,wBAAgB,YAAY,CAC1B,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,SAAS,GAAG,UAAU,CAAC,uDAGtE"}
@@ -10,6 +10,8 @@ export declare function liveStoredFiles(doc: Y.Doc): ReadonlyMap<string, FileRef
10
10
  * changes, and when the file at its path is replaced. Null without a document, or a page there.
11
11
  */
12
12
  export declare function useLiveBoardSource(live: LiveArtifact | null, path: string): string | null;
13
+ /** Whether a live artifact's document holds the page at `path` as blocks an editor edits. */
14
+ export declare function useLivePageHeld(live: LiveArtifact | null, path: string): boolean;
13
15
  /** Follows the files a live artifact's document holds as stored bytes, as they are added. */
14
16
  export declare function useLiveStoredFiles(live: LiveArtifact | null): ReadonlyMap<string, FileRef>;
15
17
  //# sourceMappingURL=boards.d.ts.map
@@ -1 +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"}
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;AAqB7C,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIvE;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,CAuCzF;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAkBhF;AAED,6FAA6F;AAC7F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,GAAG,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAgB1F"}
@@ -0,0 +1,32 @@
1
+ import { type BoardEdit } from "@sixb/core/artifacts/live";
2
+ import * as Y from "yjs";
3
+ import type { LiveArtifact } from "./session";
4
+ export declare class LiveDocument {
5
+ private readonly doc;
6
+ private readonly undoManager;
7
+ private readonly listeners;
8
+ private history;
9
+ /** The origin of this reader's own changes: the only ones its undo takes back. */
10
+ readonly origin: symbol;
11
+ constructor(doc: Y.Doc);
12
+ getHistory: () => {
13
+ readonly undo: boolean;
14
+ readonly redo: boolean;
15
+ };
16
+ subscribe: (listener: () => void) => (() => void);
17
+ /**
18
+ * Makes an edit to a file, worked out from what it holds now, as one step of this reader's
19
+ * undo. False when the document holds no such text; `make` throws when the edit no longer
20
+ * applies.
21
+ */
22
+ editFile(path: string, make: (source: string) => BoardEdit): boolean;
23
+ undo(): void;
24
+ redo(): void;
25
+ /** Ends the undo step being made: typing in another element is a step of its own. */
26
+ stopCapturing(): void;
27
+ destroy(): void;
28
+ private onHistory;
29
+ }
30
+ /** The document of a live artifact, one per artifact, so the frame and the header share its undo. */
31
+ export declare function liveDocumentOf(artifact: LiveArtifact): LiveDocument;
32
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,SAAS,EAAc,MAAM,2BAA2B,CAAA;AAC5F,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAW7C,qBAAa,YAAY;IAOX,OAAO,CAAC,QAAQ,CAAC,GAAG;IANhC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAAC,OAAO,CAAiE;IAChF,kFAAkF;IAClF,QAAQ,CAAC,MAAM,SAA+B;gBAEjB,GAAG,EAAE,CAAC,CAAC,GAAG;IAUvC,UAAU,QAAO;QAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAgB;IAEnF,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAG/C;IAED;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,SAAS,GAAG,OAAO;IAOpE,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,qFAAqF;IACrF,aAAa,IAAI,IAAI;IAIrB,OAAO,IAAI,IAAI;IAKf,OAAO,CAAC,SAAS,CAQhB;CACF;AAID,qGAAqG;AACrG,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY,CAOnE"}
@@ -7,15 +7,15 @@ export declare function LiveAvatars({ live }: {
7
7
  readonly live: LiveArtifact;
8
8
  }): import("react").JSX.Element | null;
9
9
  /** What the header says of an edit's write-back, as a document editor does. */
10
- export type LiveSaveLabel = "saved" | "saving" | "failed" | "offline";
10
+ export type LiveSaveLabel = "saved" | "saving" | "failed" | "refused" | "offline";
11
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.
12
+ * Where what the reader changed is: saved, being saved, kept here while the socket is down,
13
+ * failed and tried again by the server, or refused until someone changes it.
14
14
  */
15
15
  export declare function liveSaveLabel(state: LiveArtifactState): LiveSaveLabel;
16
16
  /**
17
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.
18
+ * Only a failure or a refusal is announced; offline with nothing kept, it says it is reconnecting.
19
19
  */
20
20
  export declare function LiveSaveStatus({ state }: {
21
21
  readonly state: LiveArtifactState;
@@ -1 +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"}
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,EAA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,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"}
@@ -11,6 +11,8 @@ export interface LiveSave {
11
11
  readonly state: ArtifactLiveSaveState;
12
12
  readonly revision: number;
13
13
  readonly error?: string;
14
+ /** Publishing refused what the document holds: it is not tried again until it changes. */
15
+ readonly refused?: true;
14
16
  }
15
17
  export interface LiveArtifactState {
16
18
  readonly connection: LiveConnection;
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,4BAA4B,CAAA;AAC9F,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EAItB,MAAM,2BAA2B,CAAA;AAGlC,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAA;AAE1D,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAWxB,oEAAoE;AACpE,eAAO,MAAM,WAAW,eAA6B,CAAA;AAKrD,gGAAgG;AAChG,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEhE,uFAAuF;AACvF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAA;IACrC,QAAQ,CAAC,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,GAAG,CAAC,QAAQ,EAAE;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,IAAI,CAAA;IAChC,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,IAAI,CAAA;IAChE,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;CAC9B,KAAK,kBAAkB,CAAA;AAExB;;;GAGG;AACH,qBAAa,OAAO;IAShB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IATzB,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAGlB;gBAGgB,IAAI,GAAE,iBAAkC,EACxC,MAAM,GAAE,UAA0B;IAGrD,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAoBzC,OAAO,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAUrC;;;;;OAKG;IACH,OAAO,CAAC,MAAM;IAiBd,OAAO,CAAC,OAAO;IAoBf,OAAO,CAAC,UAAU;CAKnB"}
@@ -21,8 +21,9 @@ export interface LiveView {
21
21
  }
22
22
  /**
23
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.
24
+ * an artifact that is not edited live. A canvas is drawn from the document once it holds it;
25
+ * until then, and if the server never holds it live, the version does, and editing it is a draft.
26
+ * A designed document is typed into through its frame, and its undo is the document's.
26
27
  */
27
- export declare function useLiveView(artifactId: string | null): LiveView | null;
28
+ export declare function useLiveView(artifactId: string | null, kind?: "canvas" | "document"): LiveView | null;
28
29
  //# sourceMappingURL=view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAA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