@ecsplico/editor 0.0.0-stage → 2.0.0

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 (1230) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +21 -0
  3. package/README.md +232 -2
  4. package/dist/code/CodeSurface.d.ts +24 -0
  5. package/dist/code/CodeSurface.js +57 -0
  6. package/dist/code/CodeSurface.js.map +1 -0
  7. package/dist/code/CodeSurface.vue.d.ts +29 -0
  8. package/dist/code/CodeSurface2.js +75 -0
  9. package/dist/code/CodeSurface2.js.map +1 -0
  10. package/dist/code/chrome-theme.js +76 -0
  11. package/dist/code/chrome-theme.js.map +1 -0
  12. package/dist/code/compartments.js +19 -0
  13. package/dist/code/compartments.js.map +1 -0
  14. package/dist/code/editor-factory.d.ts +41 -0
  15. package/dist/code/editor-factory.js +126 -0
  16. package/dist/code/editor-factory.js.map +1 -0
  17. package/dist/code/format-json.d.ts +27 -0
  18. package/dist/code/format-json.js +94 -0
  19. package/dist/code/format-json.js.map +1 -0
  20. package/dist/code/highlight-style.js +118 -0
  21. package/dist/code/highlight-style.js.map +1 -0
  22. package/dist/code/index.d.ts +6 -0
  23. package/dist/code/index.js +6 -0
  24. package/dist/code/jsonl-language.d.ts +6 -0
  25. package/dist/code/jsonl-language.js +33 -0
  26. package/dist/code/jsonl-language.js.map +1 -0
  27. package/dist/code/kind.d.ts +15 -0
  28. package/dist/code/kind.js +142 -0
  29. package/dist/code/kind.js.map +1 -0
  30. package/dist/code/lang-registry.d.ts +31 -0
  31. package/dist/code/lang-registry.js +54 -0
  32. package/dist/code/lang-registry.js.map +1 -0
  33. package/dist/code/react.d.ts +2 -0
  34. package/dist/code/react.js +1 -0
  35. package/dist/code/vue.d.ts +2 -0
  36. package/dist/code/vue.js +1 -0
  37. package/dist/core/abilities.d.ts +32 -0
  38. package/dist/core/abilities.js +160 -0
  39. package/dist/core/abilities.js.map +1 -0
  40. package/dist/core/block-convert.d.ts +59 -0
  41. package/dist/core/block-convert.js +164 -0
  42. package/dist/core/block-convert.js.map +1 -0
  43. package/dist/core/block-drag.d.ts +12 -0
  44. package/dist/core/block-drag.js +62 -0
  45. package/dist/core/block-drag.js.map +1 -0
  46. package/dist/core/block-flash.d.ts +19 -0
  47. package/dist/core/block-flash.js +66 -0
  48. package/dist/core/block-flash.js.map +1 -0
  49. package/dist/core/context.d.ts +63 -0
  50. package/dist/core/context.js +108 -0
  51. package/dist/core/context.js.map +1 -0
  52. package/dist/core/convert.d.ts +96 -0
  53. package/dist/core/convert.js +241 -0
  54. package/dist/core/convert.js.map +1 -0
  55. package/dist/core/core-feature.d.ts +17 -0
  56. package/dist/core/core-feature.js +100 -0
  57. package/dist/core/core-feature.js.map +1 -0
  58. package/dist/core/define-editor.d.ts +23 -0
  59. package/dist/core/define-editor.js +110 -0
  60. package/dist/core/define-editor.js.map +1 -0
  61. package/dist/core/doc-anchors.d.ts +67 -0
  62. package/dist/core/doc-anchors.js +112 -0
  63. package/dist/core/doc-anchors.js.map +1 -0
  64. package/dist/core/document-markdown.d.ts +13 -0
  65. package/dist/core/document-markdown.js +31 -0
  66. package/dist/core/document-markdown.js.map +1 -0
  67. package/dist/core/download.d.ts +5 -0
  68. package/dist/core/download.js +16 -0
  69. package/dist/core/download.js.map +1 -0
  70. package/dist/core/editor-ui.d.ts +45 -0
  71. package/dist/core/editor-ui.js +38 -0
  72. package/dist/core/editor-ui.js.map +1 -0
  73. package/dist/core/extension-points.d.ts +64 -0
  74. package/dist/core/feature-context.d.ts +32 -0
  75. package/dist/core/feature-context.js +46 -0
  76. package/dist/core/feature-context.js.map +1 -0
  77. package/dist/core/feature.d.ts +234 -0
  78. package/dist/core/feature.js +13 -0
  79. package/dist/core/feature.js.map +1 -0
  80. package/dist/core/fences.d.ts +16 -0
  81. package/dist/core/fences.js +105 -0
  82. package/dist/core/fences.js.map +1 -0
  83. package/dist/core/fetch-error.d.ts +5 -0
  84. package/dist/core/fetch-error.js +11 -0
  85. package/dist/core/fetch-error.js.map +1 -0
  86. package/dist/core/index.d.ts +28 -0
  87. package/dist/core/index.js +27 -0
  88. package/dist/core/metadata-types.d.ts +27 -0
  89. package/dist/core/metadata-types.js +10 -0
  90. package/dist/core/metadata-types.js.map +1 -0
  91. package/dist/core/metadata.d.ts +39 -0
  92. package/dist/core/metadata.js +76 -0
  93. package/dist/core/metadata.js.map +1 -0
  94. package/dist/core/notify.d.ts +31 -0
  95. package/dist/core/notify.js +7 -0
  96. package/dist/core/notify.js.map +1 -0
  97. package/dist/core/pipeline.d.ts +52 -0
  98. package/dist/core/pipeline.js +78 -0
  99. package/dist/core/pipeline.js.map +1 -0
  100. package/dist/core/schema/abilities.d.ts +55 -0
  101. package/dist/core/schema/abilities.js +113 -0
  102. package/dist/core/schema/abilities.js.map +1 -0
  103. package/dist/core/schema/block-ids.d.ts +29 -0
  104. package/dist/core/schema/block-ids.js +134 -0
  105. package/dist/core/schema/block-ids.js.map +1 -0
  106. package/dist/core/schema/hex-color.d.ts +5 -0
  107. package/dist/core/schema/hex-color.js +7 -0
  108. package/dist/core/schema/hex-color.js.map +1 -0
  109. package/dist/core/schema/index.d.ts +21 -0
  110. package/dist/core/schema/index.js +33 -0
  111. package/dist/core/schema/index.js.map +1 -0
  112. package/dist/core/schema/mark-flags.d.ts +12 -0
  113. package/dist/core/schema/node-flags.d.ts +23 -0
  114. package/dist/core/schema/node-flags.js +34 -0
  115. package/dist/core/schema/node-flags.js.map +1 -0
  116. package/dist/core/schema/opaque-fence.d.ts +11 -0
  117. package/dist/core/schema/opaque-fence.js +57 -0
  118. package/dist/core/schema/opaque-fence.js.map +1 -0
  119. package/dist/core/schema/strike.d.ts +4 -0
  120. package/dist/core/schema/strike.js +9 -0
  121. package/dist/core/schema/strike.js.map +1 -0
  122. package/dist/core/selection-range.d.ts +13 -0
  123. package/dist/core/selection-range.js +28 -0
  124. package/dist/core/selection-range.js.map +1 -0
  125. package/dist/core/slash.d.ts +24 -0
  126. package/dist/core/slash.js +60 -0
  127. package/dist/core/slash.js.map +1 -0
  128. package/dist/core/store.d.ts +22 -0
  129. package/dist/core/store.js +61 -0
  130. package/dist/core/store.js.map +1 -0
  131. package/dist/core/suggestion-popup.d.ts +63 -0
  132. package/dist/core/suggestion-popup.js +57 -0
  133. package/dist/core/suggestion-popup.js.map +1 -0
  134. package/dist/core/tag-name.js +11 -0
  135. package/dist/core/tag-name.js.map +1 -0
  136. package/dist/core/toolbar-items.d.ts +10 -0
  137. package/dist/core/toolbar-items.js +206 -0
  138. package/dist/core/toolbar-items.js.map +1 -0
  139. package/dist/core/toolbar.d.ts +74 -0
  140. package/dist/core/toolbar.js +45 -0
  141. package/dist/core/toolbar.js.map +1 -0
  142. package/dist/document/DocumentSurface.d.ts +38 -0
  143. package/dist/document/DocumentSurface.js +44 -0
  144. package/dist/document/DocumentSurface.js.map +1 -0
  145. package/dist/document/DocumentSurface.vue.d.ts +56 -0
  146. package/dist/document/DocumentSurface2.js +71 -0
  147. package/dist/document/DocumentSurface2.js.map +1 -0
  148. package/dist/document/react.d.ts +2 -0
  149. package/dist/document/react.js +1 -0
  150. package/dist/document/vue.d.ts +2 -0
  151. package/dist/document/vue.js +1 -0
  152. package/dist/features/ai/agent-op-review.d.ts +69 -0
  153. package/dist/features/ai/agent-op-review.js +182 -0
  154. package/dist/features/ai/agent-op-review.js.map +1 -0
  155. package/dist/features/ai/agent-ops.d.ts +15 -0
  156. package/dist/features/ai/agent-ops.js +228 -0
  157. package/dist/features/ai/agent-ops.js.map +1 -0
  158. package/dist/features/ai/ai-apply.d.ts +76 -0
  159. package/dist/features/ai/ai-apply.js +193 -0
  160. package/dist/features/ai/ai-apply.js.map +1 -0
  161. package/dist/features/ai/ai-menu.d.ts +38 -0
  162. package/dist/features/ai/ai-menu.js +20 -0
  163. package/dist/features/ai/ai-menu.js.map +1 -0
  164. package/dist/features/ai/ai-review.d.ts +136 -0
  165. package/dist/features/ai/ai-review.js +543 -0
  166. package/dist/features/ai/ai-review.js.map +1 -0
  167. package/dist/features/ai/ai-selection-highlight.d.ts +21 -0
  168. package/dist/features/ai/ai-selection-highlight.js +44 -0
  169. package/dist/features/ai/ai-selection-highlight.js.map +1 -0
  170. package/dist/features/ai/ai-sse.d.ts +28 -0
  171. package/dist/features/ai/ai-sse.js +82 -0
  172. package/dist/features/ai/ai-sse.js.map +1 -0
  173. package/dist/features/ai/assistant.d.ts +53 -0
  174. package/dist/features/ai/assistant.js +82 -0
  175. package/dist/features/ai/assistant.js.map +1 -0
  176. package/dist/features/ai/block-actions.d.ts +20 -0
  177. package/dist/features/ai/block-actions.js +55 -0
  178. package/dist/features/ai/block-actions.js.map +1 -0
  179. package/dist/features/ai/components/AiReviewBar.js +145 -0
  180. package/dist/features/ai/components/AiReviewBar.js.map +1 -0
  181. package/dist/features/ai/components/AiReviewBar.vue.d.ts +15 -0
  182. package/dist/features/ai/components/AiSelectionMenu.js +519 -0
  183. package/dist/features/ai/components/AiSelectionMenu.js.map +1 -0
  184. package/dist/features/ai/components/AiSelectionMenu.vue.d.ts +17 -0
  185. package/dist/features/ai/components/AiSidebar.js +378 -0
  186. package/dist/features/ai/components/AiSidebar.js.map +1 -0
  187. package/dist/features/ai/components/AiSidebar.vue.d.ts +26 -0
  188. package/dist/features/ai/components/DocumentChatAnswer.js +67 -0
  189. package/dist/features/ai/components/DocumentChatAnswer.js.map +1 -0
  190. package/dist/features/ai/components/DocumentChatAnswer.vue.d.ts +13 -0
  191. package/dist/features/ai/components/DocumentChatOps.js +113 -0
  192. package/dist/features/ai/components/DocumentChatOps.js.map +1 -0
  193. package/dist/features/ai/components/DocumentChatOps.vue.d.ts +27 -0
  194. package/dist/features/ai/components/ModelQuickSwitch.js +84 -0
  195. package/dist/features/ai/components/ModelQuickSwitch.js.map +1 -0
  196. package/dist/features/ai/components/ModelQuickSwitch.vue.d.ts +23 -0
  197. package/dist/features/ai/components/SettingsAiTab.js +88 -0
  198. package/dist/features/ai/components/SettingsAiTab.js.map +1 -0
  199. package/dist/features/ai/components/SettingsAiTab.vue.d.ts +6 -0
  200. package/dist/features/ai/components/SettingsModelProfiles.js +260 -0
  201. package/dist/features/ai/components/SettingsModelProfiles.js.map +1 -0
  202. package/dist/features/ai/components/SettingsModelProfiles.vue.d.ts +6 -0
  203. package/dist/features/ai/document-chat-model.d.ts +88 -0
  204. package/dist/features/ai/document-chat-model.js +190 -0
  205. package/dist/features/ai/document-chat-model.js.map +1 -0
  206. package/dist/features/ai/document-chat.d.ts +17 -0
  207. package/dist/features/ai/document-chat.js +112 -0
  208. package/dist/features/ai/document-chat.js.map +1 -0
  209. package/dist/features/ai/feature.d.ts +25 -0
  210. package/dist/features/ai/feature.js +89 -0
  211. package/dist/features/ai/feature.js.map +1 -0
  212. package/dist/features/ai/ghost-autocomplete.d.ts +47 -0
  213. package/dist/features/ai/ghost-autocomplete.js +204 -0
  214. package/dist/features/ai/ghost-autocomplete.js.map +1 -0
  215. package/dist/features/ai/index.d.ts +24 -0
  216. package/dist/features/ai/index.js +23 -0
  217. package/dist/features/ai/model-profiles.d.ts +36 -0
  218. package/dist/features/ai/model-profiles.js +111 -0
  219. package/dist/features/ai/model-profiles.js.map +1 -0
  220. package/dist/features/ai/preview-extensions.js +14 -0
  221. package/dist/features/ai/preview-extensions.js.map +1 -0
  222. package/dist/features/ai/protocol/agent-ops.d.ts +120 -0
  223. package/dist/features/ai/protocol/agent-ops.js +298 -0
  224. package/dist/features/ai/protocol/agent-ops.js.map +1 -0
  225. package/dist/features/ai/protocol/chat.d.ts +57 -0
  226. package/dist/features/ai/protocol/chat.js +146 -0
  227. package/dist/features/ai/protocol/chat.js.map +1 -0
  228. package/dist/features/ai/protocol/complete.d.ts +21 -0
  229. package/dist/features/ai/protocol/complete.js +81 -0
  230. package/dist/features/ai/protocol/complete.js.map +1 -0
  231. package/dist/features/ai/protocol/index.d.ts +7 -0
  232. package/dist/features/ai/protocol/index.js +7 -0
  233. package/dist/features/ai/protocol/models.d.ts +48 -0
  234. package/dist/features/ai/protocol/models.js +41 -0
  235. package/dist/features/ai/protocol/models.js.map +1 -0
  236. package/dist/features/ai/protocol/schemas.d.ts +36 -0
  237. package/dist/features/ai/protocol/schemas.js +40 -0
  238. package/dist/features/ai/protocol/schemas.js.map +1 -0
  239. package/dist/features/ai/protocol/tasks.d.ts +107 -0
  240. package/dist/features/ai/protocol/tasks.js +227 -0
  241. package/dist/features/ai/protocol/tasks.js.map +1 -0
  242. package/dist/features/ai/rate-limit.d.ts +9 -0
  243. package/dist/features/ai/rate-limit.js +20 -0
  244. package/dist/features/ai/rate-limit.js.map +1 -0
  245. package/dist/features/ai/react/AiReviewBar.d.ts +12 -0
  246. package/dist/features/ai/react/AiReviewBar.js +156 -0
  247. package/dist/features/ai/react/AiReviewBar.js.map +1 -0
  248. package/dist/features/ai/react/AiSelectionMenu.d.ts +14 -0
  249. package/dist/features/ai/react/AiSelectionMenu.js +513 -0
  250. package/dist/features/ai/react/AiSelectionMenu.js.map +1 -0
  251. package/dist/features/ai/react/AiSidebar.d.ts +19 -0
  252. package/dist/features/ai/react/AiSidebar.js +339 -0
  253. package/dist/features/ai/react/AiSidebar.js.map +1 -0
  254. package/dist/features/ai/react/DocumentChatAnswer.d.ts +10 -0
  255. package/dist/features/ai/react/DocumentChatAnswer.js +70 -0
  256. package/dist/features/ai/react/DocumentChatAnswer.js.map +1 -0
  257. package/dist/features/ai/react/DocumentChatOps.d.ts +19 -0
  258. package/dist/features/ai/react/DocumentChatOps.js +111 -0
  259. package/dist/features/ai/react/DocumentChatOps.js.map +1 -0
  260. package/dist/features/ai/react/ModelQuickSwitch.d.ts +19 -0
  261. package/dist/features/ai/react/ModelQuickSwitch.js +89 -0
  262. package/dist/features/ai/react/ModelQuickSwitch.js.map +1 -0
  263. package/dist/features/ai/react/SettingsAiTab.d.ts +5 -0
  264. package/dist/features/ai/react/SettingsAiTab.js +103 -0
  265. package/dist/features/ai/react/SettingsAiTab.js.map +1 -0
  266. package/dist/features/ai/react/SettingsModelProfiles.d.ts +8 -0
  267. package/dist/features/ai/react/SettingsModelProfiles.js +318 -0
  268. package/dist/features/ai/react/SettingsModelProfiles.js.map +1 -0
  269. package/dist/features/ai/react/use-ai-assistant.d.ts +22 -0
  270. package/dist/features/ai/react/use-ai-assistant.js +36 -0
  271. package/dist/features/ai/react/use-ai-assistant.js.map +1 -0
  272. package/dist/features/ai/react/use-document-chat.d.ts +32 -0
  273. package/dist/features/ai/react/use-document-chat.js +43 -0
  274. package/dist/features/ai/react/use-document-chat.js.map +1 -0
  275. package/dist/features/ai/react/use-model-profiles.d.ts +20 -0
  276. package/dist/features/ai/react/use-model-profiles.js +33 -0
  277. package/dist/features/ai/react/use-model-profiles.js.map +1 -0
  278. package/dist/features/ai/react.d.ts +23 -0
  279. package/dist/features/ai/react.js +28 -0
  280. package/dist/features/ai/react.js.map +1 -0
  281. package/dist/features/ai/sidebar-flow.d.ts +61 -0
  282. package/dist/features/ai/sidebar-flow.js +125 -0
  283. package/dist/features/ai/sidebar-flow.js.map +1 -0
  284. package/dist/features/ai/use-ai-assistant.d.ts +22 -0
  285. package/dist/features/ai/use-ai-assistant.js +39 -0
  286. package/dist/features/ai/use-ai-assistant.js.map +1 -0
  287. package/dist/features/ai/use-document-chat.d.ts +33 -0
  288. package/dist/features/ai/use-document-chat.js +45 -0
  289. package/dist/features/ai/use-document-chat.js.map +1 -0
  290. package/dist/features/ai/use-model-profiles.d.ts +23 -0
  291. package/dist/features/ai/use-model-profiles.js +50 -0
  292. package/dist/features/ai/use-model-profiles.js.map +1 -0
  293. package/dist/features/ai/vue.d.ts +21 -0
  294. package/dist/features/ai/vue.js +28 -0
  295. package/dist/features/ai/vue.js.map +1 -0
  296. package/dist/features/authors/attribution.d.ts +36 -0
  297. package/dist/features/authors/attribution.js +94 -0
  298. package/dist/features/authors/attribution.js.map +1 -0
  299. package/dist/features/authors/author-color-styles.d.ts +12 -0
  300. package/dist/features/authors/author-color-styles.js +24 -0
  301. package/dist/features/authors/author-color-styles.js.map +1 -0
  302. package/dist/features/authors/components/AuthorColorsButton.js +50 -0
  303. package/dist/features/authors/components/AuthorColorsButton.js.map +1 -0
  304. package/dist/features/authors/components/AuthorColorsButton.vue.d.ts +11 -0
  305. package/dist/features/authors/components/AuthorColorsPanel.js +72 -0
  306. package/dist/features/authors/components/AuthorColorsPanel.js.map +1 -0
  307. package/dist/features/authors/components/AuthorColorsPanel.vue.d.ts +11 -0
  308. package/dist/features/authors/components/SettingsAuthorsTab.js +49 -0
  309. package/dist/features/authors/components/SettingsAuthorsTab.js.map +1 -0
  310. package/dist/features/authors/components/SettingsAuthorsTab.vue.d.ts +6 -0
  311. package/dist/features/authors/feature.d.ts +22 -0
  312. package/dist/features/authors/feature.js +47 -0
  313. package/dist/features/authors/feature.js.map +1 -0
  314. package/dist/features/authors/index.d.ts +7 -0
  315. package/dist/features/authors/index.js +6 -0
  316. package/dist/features/authors/react/AuthorColorsButton.d.ts +8 -0
  317. package/dist/features/authors/react/AuthorColorsButton.js +41 -0
  318. package/dist/features/authors/react/AuthorColorsButton.js.map +1 -0
  319. package/dist/features/authors/react/AuthorColorsPanel.d.ts +8 -0
  320. package/dist/features/authors/react/AuthorColorsPanel.js +125 -0
  321. package/dist/features/authors/react/AuthorColorsPanel.js.map +1 -0
  322. package/dist/features/authors/react/SettingsAuthorsTab.d.ts +5 -0
  323. package/dist/features/authors/react/SettingsAuthorsTab.js +92 -0
  324. package/dist/features/authors/react/SettingsAuthorsTab.js.map +1 -0
  325. package/dist/features/authors/react.d.ts +11 -0
  326. package/dist/features/authors/react.js +16 -0
  327. package/dist/features/authors/react.js.map +1 -0
  328. package/dist/features/authors/schema.d.ts +22 -0
  329. package/dist/features/authors/schema.js +70 -0
  330. package/dist/features/authors/schema.js.map +1 -0
  331. package/dist/features/authors/vue.d.ts +10 -0
  332. package/dist/features/authors/vue.js +16 -0
  333. package/dist/features/authors/vue.js.map +1 -0
  334. package/dist/features/block-ui/block-actions.d.ts +17 -0
  335. package/dist/features/block-ui/block-actions.js +37 -0
  336. package/dist/features/block-ui/block-actions.js.map +1 -0
  337. package/dist/features/block-ui/components/BlockActionsOverlay.js +142 -0
  338. package/dist/features/block-ui/components/BlockActionsOverlay.js.map +1 -0
  339. package/dist/features/block-ui/components/BlockActionsOverlay.vue.d.ts +25 -0
  340. package/dist/features/block-ui/components/BlockHandles.js +113 -0
  341. package/dist/features/block-ui/components/BlockHandles.js.map +1 -0
  342. package/dist/features/block-ui/components/BlockUi.js +181 -0
  343. package/dist/features/block-ui/components/BlockUi.js.map +1 -0
  344. package/dist/features/block-ui/components/BlockUi.vue.d.ts +17 -0
  345. package/dist/features/block-ui/feature.d.ts +21 -0
  346. package/dist/features/block-ui/feature.js +23 -0
  347. package/dist/features/block-ui/feature.js.map +1 -0
  348. package/dist/features/block-ui/handle-geometry.js +52 -0
  349. package/dist/features/block-ui/handle-geometry.js.map +1 -0
  350. package/dist/features/block-ui/index.d.ts +3 -0
  351. package/dist/features/block-ui/index.js +3 -0
  352. package/dist/features/block-ui/react/BlockActionsOverlay.d.ts +19 -0
  353. package/dist/features/block-ui/react/BlockActionsOverlay.js +142 -0
  354. package/dist/features/block-ui/react/BlockActionsOverlay.js.map +1 -0
  355. package/dist/features/block-ui/react/BlockHandles.d.ts +15 -0
  356. package/dist/features/block-ui/react/BlockHandles.js +104 -0
  357. package/dist/features/block-ui/react/BlockHandles.js.map +1 -0
  358. package/dist/features/block-ui/react/BlockUi.d.ts +14 -0
  359. package/dist/features/block-ui/react/BlockUi.js +174 -0
  360. package/dist/features/block-ui/react/BlockUi.js.map +1 -0
  361. package/dist/features/block-ui/react.d.ts +11 -0
  362. package/dist/features/block-ui/react.js +13 -0
  363. package/dist/features/block-ui/react.js.map +1 -0
  364. package/dist/features/block-ui/vue.d.ts +9 -0
  365. package/dist/features/block-ui/vue.js +12 -0
  366. package/dist/features/block-ui/vue.js.map +1 -0
  367. package/dist/features/collab/anchor-resolver.d.ts +7 -0
  368. package/dist/features/collab/anchor-resolver.js +92 -0
  369. package/dist/features/collab/anchor-resolver.js.map +1 -0
  370. package/dist/features/collab/feature.d.ts +22 -0
  371. package/dist/features/collab/feature.js +36 -0
  372. package/dist/features/collab/feature.js.map +1 -0
  373. package/dist/features/collab/index.d.ts +3 -0
  374. package/dist/features/collab/index.js +3 -0
  375. package/dist/features/collab/react.d.ts +7 -0
  376. package/dist/features/collab/react.js +10 -0
  377. package/dist/features/collab/react.js.map +1 -0
  378. package/dist/features/collab/vue.d.ts +6 -0
  379. package/dist/features/collab/vue.js +37 -0
  380. package/dist/features/collab/vue.js.map +1 -0
  381. package/dist/features/comments/comments-plugin.d.ts +71 -0
  382. package/dist/features/comments/comments-plugin.js +185 -0
  383. package/dist/features/comments/comments-plugin.js.map +1 -0
  384. package/dist/features/comments/components/CommentBubble.js +54 -0
  385. package/dist/features/comments/components/CommentBubble.js.map +1 -0
  386. package/dist/features/comments/components/CommentBubble.vue.d.ts +14 -0
  387. package/dist/features/comments/components/CommentComposer.js +87 -0
  388. package/dist/features/comments/components/CommentComposer.js.map +1 -0
  389. package/dist/features/comments/components/CommentComposer.vue.d.ts +21 -0
  390. package/dist/features/comments/components/CommentThreadView.js +255 -0
  391. package/dist/features/comments/components/CommentThreadView.js.map +1 -0
  392. package/dist/features/comments/components/CommentThreadView.vue.d.ts +29 -0
  393. package/dist/features/comments/components/CommentsListMenu.js +134 -0
  394. package/dist/features/comments/components/CommentsListMenu.js.map +1 -0
  395. package/dist/features/comments/components/CommentsListMenu.vue.d.ts +10 -0
  396. package/dist/features/comments/components/CommentsMargin.js +291 -0
  397. package/dist/features/comments/components/CommentsMargin.js.map +1 -0
  398. package/dist/features/comments/components/CommentsMargin.vue.d.ts +16 -0
  399. package/dist/features/comments/components/CommentsOverlay.js +39 -0
  400. package/dist/features/comments/components/CommentsOverlay.js.map +1 -0
  401. package/dist/features/comments/components/CommentsPopover.js +124 -0
  402. package/dist/features/comments/components/CommentsPopover.js.map +1 -0
  403. package/dist/features/comments/components/CommentsPopover.vue.d.ts +10 -0
  404. package/dist/features/comments/components/CommentsToolbarButton.js +61 -0
  405. package/dist/features/comments/components/CommentsToolbarButton.js.map +1 -0
  406. package/dist/features/comments/components/SettingsCommentsTab.js +46 -0
  407. package/dist/features/comments/components/SettingsCommentsTab.js.map +1 -0
  408. package/dist/features/comments/components/SettingsCommentsTab.vue.d.ts +6 -0
  409. package/dist/features/comments/feature.d.ts +39 -0
  410. package/dist/features/comments/feature.js +128 -0
  411. package/dist/features/comments/feature.js.map +1 -0
  412. package/dist/features/comments/index.d.ts +6 -0
  413. package/dist/features/comments/index.js +6 -0
  414. package/dist/features/comments/model.d.ts +87 -0
  415. package/dist/features/comments/model.js +390 -0
  416. package/dist/features/comments/model.js.map +1 -0
  417. package/dist/features/comments/react/CommentAvatar.js +24 -0
  418. package/dist/features/comments/react/CommentAvatar.js.map +1 -0
  419. package/dist/features/comments/react/CommentBubble.d.ts +11 -0
  420. package/dist/features/comments/react/CommentBubble.js +43 -0
  421. package/dist/features/comments/react/CommentBubble.js.map +1 -0
  422. package/dist/features/comments/react/CommentComposer.d.ts +15 -0
  423. package/dist/features/comments/react/CommentComposer.js +69 -0
  424. package/dist/features/comments/react/CommentComposer.js.map +1 -0
  425. package/dist/features/comments/react/CommentThreadView.d.ts +24 -0
  426. package/dist/features/comments/react/CommentThreadView.js +249 -0
  427. package/dist/features/comments/react/CommentThreadView.js.map +1 -0
  428. package/dist/features/comments/react/CommentsListMenu.d.ts +8 -0
  429. package/dist/features/comments/react/CommentsListMenu.js +115 -0
  430. package/dist/features/comments/react/CommentsListMenu.js.map +1 -0
  431. package/dist/features/comments/react/CommentsMargin.d.ts +16 -0
  432. package/dist/features/comments/react/CommentsMargin.js +294 -0
  433. package/dist/features/comments/react/CommentsMargin.js.map +1 -0
  434. package/dist/features/comments/react/CommentsOverlay.d.ts +11 -0
  435. package/dist/features/comments/react/CommentsOverlay.js +52 -0
  436. package/dist/features/comments/react/CommentsOverlay.js.map +1 -0
  437. package/dist/features/comments/react/CommentsPopover.d.ts +15 -0
  438. package/dist/features/comments/react/CommentsPopover.js +107 -0
  439. package/dist/features/comments/react/CommentsPopover.js.map +1 -0
  440. package/dist/features/comments/react/CommentsToolbarButton.d.ts +12 -0
  441. package/dist/features/comments/react/CommentsToolbarButton.js +52 -0
  442. package/dist/features/comments/react/CommentsToolbarButton.js.map +1 -0
  443. package/dist/features/comments/react/SettingsCommentsTab.d.ts +5 -0
  444. package/dist/features/comments/react/SettingsCommentsTab.js +77 -0
  445. package/dist/features/comments/react/SettingsCommentsTab.js.map +1 -0
  446. package/dist/features/comments/react/use-comments.d.ts +17 -0
  447. package/dist/features/comments/react/use-comments.js +37 -0
  448. package/dist/features/comments/react/use-comments.js.map +1 -0
  449. package/dist/features/comments/react.d.ts +23 -0
  450. package/dist/features/comments/react.js +28 -0
  451. package/dist/features/comments/react.js.map +1 -0
  452. package/dist/features/comments/schema.d.ts +51 -0
  453. package/dist/features/comments/schema.js +41 -0
  454. package/dist/features/comments/schema.js.map +1 -0
  455. package/dist/features/comments/shortcuts.js +34 -0
  456. package/dist/features/comments/shortcuts.js.map +1 -0
  457. package/dist/features/comments/use-comments.d.ts +37 -0
  458. package/dist/features/comments/use-comments.js +45 -0
  459. package/dist/features/comments/use-comments.js.map +1 -0
  460. package/dist/features/comments/vue.d.ts +20 -0
  461. package/dist/features/comments/vue.js +28 -0
  462. package/dist/features/comments/vue.js.map +1 -0
  463. package/dist/features/composites/ai-brief.d.ts +31 -0
  464. package/dist/features/composites/ai-brief.js +56 -0
  465. package/dist/features/composites/ai-brief.js.map +1 -0
  466. package/dist/features/composites/anchors.d.ts +47 -0
  467. package/dist/features/composites/anchors.js +137 -0
  468. package/dist/features/composites/anchors.js.map +1 -0
  469. package/dist/features/composites/components/CompositeChrome.js +243 -0
  470. package/dist/features/composites/components/CompositeChrome.js.map +1 -0
  471. package/dist/features/composites/components/CompositeChrome.vue.d.ts +19 -0
  472. package/dist/features/composites/components/CompositeDetails.js +158 -0
  473. package/dist/features/composites/components/CompositeDetails.js.map +1 -0
  474. package/dist/features/composites/components/CompositeDetails.vue.d.ts +19 -0
  475. package/dist/features/composites/components/CompositeFieldEditor.js +114 -0
  476. package/dist/features/composites/components/CompositeFieldEditor.js.map +1 -0
  477. package/dist/features/composites/components/CompositeFieldEditor.vue.d.ts +23 -0
  478. package/dist/features/composites/components/CompositeInspector.js +439 -0
  479. package/dist/features/composites/components/CompositeInspector.js.map +1 -0
  480. package/dist/features/composites/components/CompositeInspector.vue.d.ts +32 -0
  481. package/dist/features/composites/components/CompositeStatusMenu.js +51 -0
  482. package/dist/features/composites/components/CompositeStatusMenu.js.map +1 -0
  483. package/dist/features/composites/components/CompositeStatusMenu.vue.d.ts +28 -0
  484. package/dist/features/composites/components/CompositeSummaryEditor.js +79 -0
  485. package/dist/features/composites/components/CompositeSummaryEditor.js.map +1 -0
  486. package/dist/features/composites/components/CompositeSummaryEditor.vue.d.ts +18 -0
  487. package/dist/features/composites/components/CompositeTable.js +348 -0
  488. package/dist/features/composites/components/CompositeTable.js.map +1 -0
  489. package/dist/features/composites/components/CompositeTable.vue.d.ts +15 -0
  490. package/dist/features/composites/components/CompositeTagsEditor.js +95 -0
  491. package/dist/features/composites/components/CompositeTagsEditor.js.map +1 -0
  492. package/dist/features/composites/components/CompositeTagsEditor.vue.d.ts +13 -0
  493. package/dist/features/composites/components/CompositeView.js +46 -0
  494. package/dist/features/composites/components/CompositeView.js.map +1 -0
  495. package/dist/features/composites/components/CompositeView.vue.d.ts +96 -0
  496. package/dist/features/composites/components/SettingsEditingTab.js +119 -0
  497. package/dist/features/composites/components/SettingsEditingTab.js.map +1 -0
  498. package/dist/features/composites/components/SettingsEditingTab.vue.d.ts +11 -0
  499. package/dist/features/composites/convert.d.ts +24 -0
  500. package/dist/features/composites/convert.js +145 -0
  501. package/dist/features/composites/convert.js.map +1 -0
  502. package/dist/features/composites/editing-settings-keys.js +47 -0
  503. package/dist/features/composites/editing-settings-keys.js.map +1 -0
  504. package/dist/features/composites/feature.d.ts +30 -0
  505. package/dist/features/composites/feature.js +305 -0
  506. package/dist/features/composites/feature.js.map +1 -0
  507. package/dist/features/composites/fences.d.ts +20 -0
  508. package/dist/features/composites/fences.js +86 -0
  509. package/dist/features/composites/fences.js.map +1 -0
  510. package/dist/features/composites/heading-composites.d.ts +36 -0
  511. package/dist/features/composites/heading-composites.js +140 -0
  512. package/dist/features/composites/heading-composites.js.map +1 -0
  513. package/dist/features/composites/index.d.ts +20 -0
  514. package/dist/features/composites/index.js +20 -0
  515. package/dist/features/composites/kinds.d.ts +49 -0
  516. package/dist/features/composites/kinds.js +131 -0
  517. package/dist/features/composites/kinds.js.map +1 -0
  518. package/dist/features/composites/legacy.d.ts +8 -0
  519. package/dist/features/composites/legacy.js +25 -0
  520. package/dist/features/composites/legacy.js.map +1 -0
  521. package/dist/features/composites/markdown-export.d.ts +17 -0
  522. package/dist/features/composites/markdown-export.js +49 -0
  523. package/dist/features/composites/markdown-export.js.map +1 -0
  524. package/dist/features/composites/meta-display.js +46 -0
  525. package/dist/features/composites/meta-display.js.map +1 -0
  526. package/dist/features/composites/node-views.d.ts +17 -0
  527. package/dist/features/composites/node-views.js +18 -0
  528. package/dist/features/composites/node-views.js.map +1 -0
  529. package/dist/features/composites/nodes.d.ts +56 -0
  530. package/dist/features/composites/nodes.js +480 -0
  531. package/dist/features/composites/nodes.js.map +1 -0
  532. package/dist/features/composites/outline.d.ts +35 -0
  533. package/dist/features/composites/outline.js +69 -0
  534. package/dist/features/composites/outline.js.map +1 -0
  535. package/dist/features/composites/react/CompositeChrome.d.ts +16 -0
  536. package/dist/features/composites/react/CompositeChrome.js +234 -0
  537. package/dist/features/composites/react/CompositeChrome.js.map +1 -0
  538. package/dist/features/composites/react/CompositeDetails.d.ts +16 -0
  539. package/dist/features/composites/react/CompositeDetails.js +149 -0
  540. package/dist/features/composites/react/CompositeDetails.js.map +1 -0
  541. package/dist/features/composites/react/CompositeFieldEditor.d.ts +18 -0
  542. package/dist/features/composites/react/CompositeFieldEditor.js +131 -0
  543. package/dist/features/composites/react/CompositeFieldEditor.js.map +1 -0
  544. package/dist/features/composites/react/CompositeInspector.d.ts +23 -0
  545. package/dist/features/composites/react/CompositeInspector.js +506 -0
  546. package/dist/features/composites/react/CompositeInspector.js.map +1 -0
  547. package/dist/features/composites/react/CompositeStatusMenu.d.ts +15 -0
  548. package/dist/features/composites/react/CompositeStatusMenu.js +36 -0
  549. package/dist/features/composites/react/CompositeStatusMenu.js.map +1 -0
  550. package/dist/features/composites/react/CompositeSummaryEditor.d.ts +15 -0
  551. package/dist/features/composites/react/CompositeSummaryEditor.js +85 -0
  552. package/dist/features/composites/react/CompositeSummaryEditor.js.map +1 -0
  553. package/dist/features/composites/react/CompositeTable.d.ts +11 -0
  554. package/dist/features/composites/react/CompositeTable.js +342 -0
  555. package/dist/features/composites/react/CompositeTable.js.map +1 -0
  556. package/dist/features/composites/react/CompositeTagsEditor.d.ts +10 -0
  557. package/dist/features/composites/react/CompositeTagsEditor.js +122 -0
  558. package/dist/features/composites/react/CompositeTagsEditor.js.map +1 -0
  559. package/dist/features/composites/react/CompositeView.d.ts +6 -0
  560. package/dist/features/composites/react/CompositeView.js +30 -0
  561. package/dist/features/composites/react/CompositeView.js.map +1 -0
  562. package/dist/features/composites/react/SettingsEditingTab.d.ts +8 -0
  563. package/dist/features/composites/react/SettingsEditingTab.js +153 -0
  564. package/dist/features/composites/react/SettingsEditingTab.js.map +1 -0
  565. package/dist/features/composites/react/use-composite-anchors.d.ts +17 -0
  566. package/dist/features/composites/react/use-composite-anchors.js +46 -0
  567. package/dist/features/composites/react/use-composite-anchors.js.map +1 -0
  568. package/dist/features/composites/react/use-composite-rows.d.ts +11 -0
  569. package/dist/features/composites/react/use-composite-rows.js +26 -0
  570. package/dist/features/composites/react/use-composite-rows.js.map +1 -0
  571. package/dist/features/composites/react.d.ts +24 -0
  572. package/dist/features/composites/react.js +30 -0
  573. package/dist/features/composites/react.js.map +1 -0
  574. package/dist/features/composites/rows-model.d.ts +38 -0
  575. package/dist/features/composites/rows-model.js +92 -0
  576. package/dist/features/composites/rows-model.js.map +1 -0
  577. package/dist/features/composites/rows.d.ts +76 -0
  578. package/dist/features/composites/rows.js +159 -0
  579. package/dist/features/composites/rows.js.map +1 -0
  580. package/dist/features/composites/schema.d.ts +21 -0
  581. package/dist/features/composites/schema.js +26 -0
  582. package/dist/features/composites/schema.js.map +1 -0
  583. package/dist/features/composites/structure-mode.d.ts +11 -0
  584. package/dist/features/composites/structure-mode.js +16 -0
  585. package/dist/features/composites/structure-mode.js.map +1 -0
  586. package/dist/features/composites/structure.d.ts +19 -0
  587. package/dist/features/composites/structure.js +19 -0
  588. package/dist/features/composites/structure.js.map +1 -0
  589. package/dist/features/composites/table-model.js +117 -0
  590. package/dist/features/composites/table-model.js.map +1 -0
  591. package/dist/features/composites/tree-root.d.ts +11 -0
  592. package/dist/features/composites/tree-root.js +16 -0
  593. package/dist/features/composites/tree-root.js.map +1 -0
  594. package/dist/features/composites/use-composite-anchors.d.ts +18 -0
  595. package/dist/features/composites/use-composite-anchors.js +42 -0
  596. package/dist/features/composites/use-composite-anchors.js.map +1 -0
  597. package/dist/features/composites/use-composite-rows.d.ts +25 -0
  598. package/dist/features/composites/use-composite-rows.js +28 -0
  599. package/dist/features/composites/use-composite-rows.js.map +1 -0
  600. package/dist/features/composites/vue.d.ts +23 -0
  601. package/dist/features/composites/vue.js +30 -0
  602. package/dist/features/composites/vue.js.map +1 -0
  603. package/dist/features/media/assets.d.ts +30 -0
  604. package/dist/features/media/assets.js +26 -0
  605. package/dist/features/media/assets.js.map +1 -0
  606. package/dist/features/media/audio-recorder.d.ts +25 -0
  607. package/dist/features/media/audio-recorder.js +123 -0
  608. package/dist/features/media/audio-recorder.js.map +1 -0
  609. package/dist/features/media/components/AudioRecorderModal.js +152 -0
  610. package/dist/features/media/components/AudioRecorderModal.js.map +1 -0
  611. package/dist/features/media/components/AudioRecorderModal.vue.d.ts +15 -0
  612. package/dist/features/media/components/AudioView.js +46 -0
  613. package/dist/features/media/components/AudioView.js.map +1 -0
  614. package/dist/features/media/components/FileView.js +73 -0
  615. package/dist/features/media/components/FileView.js.map +1 -0
  616. package/dist/features/media/components/VideoView.js +47 -0
  617. package/dist/features/media/components/VideoView.js.map +1 -0
  618. package/dist/features/media/feature.d.ts +22 -0
  619. package/dist/features/media/feature.js +101 -0
  620. package/dist/features/media/feature.js.map +1 -0
  621. package/dist/features/media/file-import.d.ts +21 -0
  622. package/dist/features/media/file-import.js +76 -0
  623. package/dist/features/media/file-import.js.map +1 -0
  624. package/dist/features/media/index.d.ts +7 -0
  625. package/dist/features/media/index.js +7 -0
  626. package/dist/features/media/node-views.d.ts +28 -0
  627. package/dist/features/media/node-views.js +28 -0
  628. package/dist/features/media/node-views.js.map +1 -0
  629. package/dist/features/media/react/AudioRecorderModal.d.ts +12 -0
  630. package/dist/features/media/react/AudioRecorderModal.js +147 -0
  631. package/dist/features/media/react/AudioRecorderModal.js.map +1 -0
  632. package/dist/features/media/react/AudioView.js +32 -0
  633. package/dist/features/media/react/AudioView.js.map +1 -0
  634. package/dist/features/media/react/FileView.js +61 -0
  635. package/dist/features/media/react/FileView.js.map +1 -0
  636. package/dist/features/media/react/TitleField.js +30 -0
  637. package/dist/features/media/react/TitleField.js.map +1 -0
  638. package/dist/features/media/react/VideoView.js +33 -0
  639. package/dist/features/media/react/VideoView.js.map +1 -0
  640. package/dist/features/media/react/use-audio-recorder.d.ts +11 -0
  641. package/dist/features/media/react/use-audio-recorder.js +21 -0
  642. package/dist/features/media/react/use-audio-recorder.js.map +1 -0
  643. package/dist/features/media/react.d.ts +19 -0
  644. package/dist/features/media/react.js +37 -0
  645. package/dist/features/media/react.js.map +1 -0
  646. package/dist/features/media/schema.d.ts +59 -0
  647. package/dist/features/media/schema.js +194 -0
  648. package/dist/features/media/schema.js.map +1 -0
  649. package/dist/features/media/upload.d.ts +41 -0
  650. package/dist/features/media/upload.js +106 -0
  651. package/dist/features/media/upload.js.map +1 -0
  652. package/dist/features/media/use-audio-recorder.d.ts +12 -0
  653. package/dist/features/media/use-audio-recorder.js +21 -0
  654. package/dist/features/media/use-audio-recorder.js.map +1 -0
  655. package/dist/features/media/vue.d.ts +19 -0
  656. package/dist/features/media/vue.js +35 -0
  657. package/dist/features/media/vue.js.map +1 -0
  658. package/dist/features/mentions/index.d.ts +22 -0
  659. package/dist/features/mentions/index.js +34 -0
  660. package/dist/features/mentions/index.js.map +1 -0
  661. package/dist/features/mentions/mention-suggestion.d.ts +11 -0
  662. package/dist/features/mentions/mention-suggestion.js +34 -0
  663. package/dist/features/mentions/mention-suggestion.js.map +1 -0
  664. package/dist/features/mentions/mention-text.d.ts +18 -0
  665. package/dist/features/mentions/mention-text.js +75 -0
  666. package/dist/features/mentions/mention-text.js.map +1 -0
  667. package/dist/features/mentions/mention.d.ts +20 -0
  668. package/dist/features/mentions/mention.js +33 -0
  669. package/dist/features/mentions/mention.js.map +1 -0
  670. package/dist/features/mentions/metadata-defaults.d.ts +8 -0
  671. package/dist/features/mentions/metadata-defaults.js +30 -0
  672. package/dist/features/mentions/metadata-defaults.js.map +1 -0
  673. package/dist/features/mentions/normalize.d.ts +10 -0
  674. package/dist/features/mentions/normalize.js +31 -0
  675. package/dist/features/mentions/normalize.js.map +1 -0
  676. package/dist/features/mentions/schema.d.ts +10 -0
  677. package/dist/features/mentions/schema.js +10 -0
  678. package/dist/features/mentions/schema.js.map +1 -0
  679. package/dist/features/mentions/tag-suggestion.d.ts +11 -0
  680. package/dist/features/mentions/tag-suggestion.js +45 -0
  681. package/dist/features/mentions/tag-suggestion.js.map +1 -0
  682. package/dist/features/mentions/tag.d.ts +43 -0
  683. package/dist/features/mentions/tag.js +155 -0
  684. package/dist/features/mentions/tag.js.map +1 -0
  685. package/dist/features/tables/feature.d.ts +14 -0
  686. package/dist/features/tables/feature.js +100 -0
  687. package/dist/features/tables/feature.js.map +1 -0
  688. package/dist/features/tables/index.d.ts +3 -0
  689. package/dist/features/tables/index.js +3 -0
  690. package/dist/features/tables/schema.d.ts +6 -0
  691. package/dist/features/tables/schema.js +27 -0
  692. package/dist/features/tables/schema.js.map +1 -0
  693. package/dist/features/themes/components/SettingsAppearanceTab.js +227 -0
  694. package/dist/features/themes/components/SettingsAppearanceTab.js.map +1 -0
  695. package/dist/features/themes/components/SettingsAppearanceTab.vue.d.ts +6 -0
  696. package/dist/features/themes/feature.d.ts +24 -0
  697. package/dist/features/themes/feature.js +25 -0
  698. package/dist/features/themes/feature.js.map +1 -0
  699. package/dist/features/themes/index.d.ts +6 -0
  700. package/dist/features/themes/index.js +6 -0
  701. package/dist/features/themes/react/SettingsAppearanceTab.d.ts +5 -0
  702. package/dist/features/themes/react/SettingsAppearanceTab.js +221 -0
  703. package/dist/features/themes/react/SettingsAppearanceTab.js.map +1 -0
  704. package/dist/features/themes/react.d.ts +13 -0
  705. package/dist/features/themes/react.js +15 -0
  706. package/dist/features/themes/react.js.map +1 -0
  707. package/dist/features/themes/schema.d.ts +21 -0
  708. package/dist/features/themes/schema.js +16 -0
  709. package/dist/features/themes/schema.js.map +1 -0
  710. package/dist/features/themes/scope-css.d.ts +5 -0
  711. package/dist/features/themes/scope-css.js +142 -0
  712. package/dist/features/themes/scope-css.js.map +1 -0
  713. package/dist/features/themes/theme-runtime.d.ts +14 -0
  714. package/dist/features/themes/theme-runtime.js +147 -0
  715. package/dist/features/themes/theme-runtime.js.map +1 -0
  716. package/dist/features/themes/vue.d.ts +13 -0
  717. package/dist/features/themes/vue.js +29 -0
  718. package/dist/features/themes/vue.js.map +1 -0
  719. package/dist/features/transcript/TranscriptSegmentView.js +169 -0
  720. package/dist/features/transcript/TranscriptSegmentView.js.map +1 -0
  721. package/dist/features/transcript/TranscriptSegmentView.vue.d.ts +96 -0
  722. package/dist/features/transcript/convert.d.ts +11 -0
  723. package/dist/features/transcript/convert.js +40 -0
  724. package/dist/features/transcript/convert.js.map +1 -0
  725. package/dist/features/transcript/feature.d.ts +25 -0
  726. package/dist/features/transcript/feature.js +59 -0
  727. package/dist/features/transcript/feature.js.map +1 -0
  728. package/dist/features/transcript/index.d.ts +7 -0
  729. package/dist/features/transcript/index.js +7 -0
  730. package/dist/features/transcript/react/TranscriptSegmentView.d.ts +6 -0
  731. package/dist/features/transcript/react/TranscriptSegmentView.js +155 -0
  732. package/dist/features/transcript/react/TranscriptSegmentView.js.map +1 -0
  733. package/dist/features/transcript/react.d.ts +9 -0
  734. package/dist/features/transcript/react.js +12 -0
  735. package/dist/features/transcript/react.js.map +1 -0
  736. package/dist/features/transcript/schema.d.ts +9 -0
  737. package/dist/features/transcript/schema.js +9 -0
  738. package/dist/features/transcript/schema.js.map +1 -0
  739. package/dist/features/transcript/segment-node.d.ts +21 -0
  740. package/dist/features/transcript/segment-node.js +113 -0
  741. package/dist/features/transcript/segment-node.js.map +1 -0
  742. package/dist/features/transcript/segment.d.ts +10 -0
  743. package/dist/features/transcript/segment.js +26 -0
  744. package/dist/features/transcript/segment.js.map +1 -0
  745. package/dist/features/transcript/speakers.d.ts +8 -0
  746. package/dist/features/transcript/speakers.js +22 -0
  747. package/dist/features/transcript/speakers.js.map +1 -0
  748. package/dist/features/transcript/vue.d.ts +8 -0
  749. package/dist/features/transcript/vue.js +12 -0
  750. package/dist/features/transcript/vue.js.map +1 -0
  751. package/dist/i18n/de/ai.js +168 -0
  752. package/dist/i18n/de/ai.js.map +1 -0
  753. package/dist/i18n/de/authors.js +21 -0
  754. package/dist/i18n/de/authors.js.map +1 -0
  755. package/dist/i18n/de/block.js +16 -0
  756. package/dist/i18n/de/block.js.map +1 -0
  757. package/dist/i18n/de/comments.js +35 -0
  758. package/dist/i18n/de/comments.js.map +1 -0
  759. package/dist/i18n/de/common.js +10 -0
  760. package/dist/i18n/de/common.js.map +1 -0
  761. package/dist/i18n/de/composites.js +147 -0
  762. package/dist/i18n/de/composites.js.map +1 -0
  763. package/dist/i18n/de/integrations.js +42 -0
  764. package/dist/i18n/de/integrations.js.map +1 -0
  765. package/dist/i18n/de/markdown.js +16 -0
  766. package/dist/i18n/de/markdown.js.map +1 -0
  767. package/dist/i18n/de/media.js +27 -0
  768. package/dist/i18n/de/media.js.map +1 -0
  769. package/dist/i18n/de/mentions.js +10 -0
  770. package/dist/i18n/de/mentions.js.map +1 -0
  771. package/dist/i18n/de/outline.js +9 -0
  772. package/dist/i18n/de/outline.js.map +1 -0
  773. package/dist/i18n/de/settings.js +12 -0
  774. package/dist/i18n/de/settings.js.map +1 -0
  775. package/dist/i18n/de/tables.js +15 -0
  776. package/dist/i18n/de/tables.js.map +1 -0
  777. package/dist/i18n/de/themes.js +26 -0
  778. package/dist/i18n/de/themes.js.map +1 -0
  779. package/dist/i18n/de/toolbar.js +22 -0
  780. package/dist/i18n/de/toolbar.js.map +1 -0
  781. package/dist/i18n/de/transcript.js +10 -0
  782. package/dist/i18n/de/transcript.js.map +1 -0
  783. package/dist/i18n/de/tree.js +31 -0
  784. package/dist/i18n/de/tree.js.map +1 -0
  785. package/dist/i18n/de.d.ts +502 -0
  786. package/dist/i18n/de.js +42 -0
  787. package/dist/i18n/de.js.map +1 -0
  788. package/dist/i18n/en/ai.js +168 -0
  789. package/dist/i18n/en/ai.js.map +1 -0
  790. package/dist/i18n/en/authors.js +21 -0
  791. package/dist/i18n/en/authors.js.map +1 -0
  792. package/dist/i18n/en/block.js +16 -0
  793. package/dist/i18n/en/block.js.map +1 -0
  794. package/dist/i18n/en/comments.js +35 -0
  795. package/dist/i18n/en/comments.js.map +1 -0
  796. package/dist/i18n/en/common.js +10 -0
  797. package/dist/i18n/en/common.js.map +1 -0
  798. package/dist/i18n/en/composites.js +145 -0
  799. package/dist/i18n/en/composites.js.map +1 -0
  800. package/dist/i18n/en/integrations.js +42 -0
  801. package/dist/i18n/en/integrations.js.map +1 -0
  802. package/dist/i18n/en/markdown.js +16 -0
  803. package/dist/i18n/en/markdown.js.map +1 -0
  804. package/dist/i18n/en/media.js +27 -0
  805. package/dist/i18n/en/media.js.map +1 -0
  806. package/dist/i18n/en/mentions.js +10 -0
  807. package/dist/i18n/en/mentions.js.map +1 -0
  808. package/dist/i18n/en/outline.js +9 -0
  809. package/dist/i18n/en/outline.js.map +1 -0
  810. package/dist/i18n/en/settings.js +12 -0
  811. package/dist/i18n/en/settings.js.map +1 -0
  812. package/dist/i18n/en/tables.js +15 -0
  813. package/dist/i18n/en/tables.js.map +1 -0
  814. package/dist/i18n/en/themes.js +26 -0
  815. package/dist/i18n/en/themes.js.map +1 -0
  816. package/dist/i18n/en/toolbar.js +22 -0
  817. package/dist/i18n/en/toolbar.js.map +1 -0
  818. package/dist/i18n/en/transcript.js +10 -0
  819. package/dist/i18n/en/transcript.js.map +1 -0
  820. package/dist/i18n/en/tree.js +31 -0
  821. package/dist/i18n/en/tree.js.map +1 -0
  822. package/dist/i18n/en.js +42 -0
  823. package/dist/i18n/en.js.map +1 -0
  824. package/dist/i18n/index.d.ts +24 -0
  825. package/dist/i18n/index.js +31 -0
  826. package/dist/i18n/index.js.map +1 -0
  827. package/dist/index.d.ts +6 -0
  828. package/dist/index.js +0 -0
  829. package/dist/integrations/composite-ai/composite-fill.d.ts +17 -0
  830. package/dist/integrations/composite-ai/composite-fill.js +129 -0
  831. package/dist/integrations/composite-ai/composite-fill.js.map +1 -0
  832. package/dist/integrations/composite-ai/composite-summary.d.ts +28 -0
  833. package/dist/integrations/composite-ai/composite-summary.js +143 -0
  834. package/dist/integrations/composite-ai/composite-summary.js.map +1 -0
  835. package/dist/integrations/composite-ai/document-transcribe.d.ts +14 -0
  836. package/dist/integrations/composite-ai/document-transcribe.js +89 -0
  837. package/dist/integrations/composite-ai/document-transcribe.js.map +1 -0
  838. package/dist/integrations/composite-ai/index.d.ts +22 -0
  839. package/dist/integrations/composite-ai/index.js +80 -0
  840. package/dist/integrations/composite-ai/index.js.map +1 -0
  841. package/dist/integrations/composite-media/index.d.ts +19 -0
  842. package/dist/integrations/composite-media/index.js +72 -0
  843. package/dist/integrations/composite-media/index.js.map +1 -0
  844. package/dist/integrations/transcript-ai/index.d.ts +16 -0
  845. package/dist/integrations/transcript-ai/index.js +63 -0
  846. package/dist/integrations/transcript-ai/index.js.map +1 -0
  847. package/dist/integrations/transcript-ai/protocol.d.ts +68 -0
  848. package/dist/integrations/transcript-ai/protocol.js +132 -0
  849. package/dist/integrations/transcript-ai/protocol.js.map +1 -0
  850. package/dist/integrations/transcript-ai/transcript-cleanup.d.ts +35 -0
  851. package/dist/integrations/transcript-ai/transcript-cleanup.js +169 -0
  852. package/dist/integrations/transcript-ai/transcript-cleanup.js.map +1 -0
  853. package/dist/markdown/MarkdownSurface.d.ts +25 -0
  854. package/dist/markdown/MarkdownSurface.js +93 -0
  855. package/dist/markdown/MarkdownSurface.js.map +1 -0
  856. package/dist/markdown/MarkdownSurface.vue.d.ts +76 -0
  857. package/dist/markdown/MarkdownSurface2.js +237 -0
  858. package/dist/markdown/MarkdownSurface2.js.map +1 -0
  859. package/dist/markdown/clipboard.d.ts +17 -0
  860. package/dist/markdown/clipboard.js +125 -0
  861. package/dist/markdown/clipboard.js.map +1 -0
  862. package/dist/markdown/document.d.ts +36 -0
  863. package/dist/markdown/document.js +100 -0
  864. package/dist/markdown/document.js.map +1 -0
  865. package/dist/markdown/frontmatter.d.ts +18 -0
  866. package/dist/markdown/frontmatter.js +32 -0
  867. package/dist/markdown/frontmatter.js.map +1 -0
  868. package/dist/markdown/index.d.ts +6 -0
  869. package/dist/markdown/index.js +6 -0
  870. package/dist/markdown/policy.d.ts +34 -0
  871. package/dist/markdown/policy.js +78 -0
  872. package/dist/markdown/policy.js.map +1 -0
  873. package/dist/markdown/react.d.ts +2 -0
  874. package/dist/markdown/react.js +1 -0
  875. package/dist/markdown/source-mode.d.ts +49 -0
  876. package/dist/markdown/source-mode.js +86 -0
  877. package/dist/markdown/source-mode.js.map +1 -0
  878. package/dist/markdown/vue.d.ts +2 -0
  879. package/dist/markdown/vue.js +1 -0
  880. package/dist/nuxt/module.d.ts +62 -0
  881. package/dist/nuxt/module.js +101 -0
  882. package/dist/nuxt/module.js.map +1 -0
  883. package/dist/nuxt/runtime/install-context.d.ts +16 -0
  884. package/dist/nuxt/runtime/install-context.js +25 -0
  885. package/dist/nuxt/runtime/install-context.js.map +1 -0
  886. package/dist/nuxt/runtime/plugins/editor-context-nuxt-ui.client.ts +8 -0
  887. package/dist/nuxt/runtime/server/api/ai/chat.post.d.ts +5 -0
  888. package/dist/nuxt/runtime/server/api/ai/chat.post.js +8 -0
  889. package/dist/nuxt/runtime/server/api/ai/chat.post.js.map +1 -0
  890. package/dist/nuxt/runtime/server/api/ai/complete.post.d.ts +5 -0
  891. package/dist/nuxt/runtime/server/api/ai/complete.post.js +8 -0
  892. package/dist/nuxt/runtime/server/api/ai/complete.post.js.map +1 -0
  893. package/dist/nuxt/runtime/server/api/ai/generate.post.d.ts +5 -0
  894. package/dist/nuxt/runtime/server/api/ai/generate.post.js +8 -0
  895. package/dist/nuxt/runtime/server/api/ai/generate.post.js.map +1 -0
  896. package/dist/nuxt/runtime/server/api/ai/models.get.d.ts +5 -0
  897. package/dist/nuxt/runtime/server/api/ai/models.get.js +8 -0
  898. package/dist/nuxt/runtime/server/api/ai/models.get.js.map +1 -0
  899. package/dist/nuxt/runtime/server/api/ai/transcribe.post.d.ts +5 -0
  900. package/dist/nuxt/runtime/server/api/ai/transcribe.post.js +8 -0
  901. package/dist/nuxt/runtime/server/api/ai/transcribe.post.js.map +1 -0
  902. package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.d.ts +5 -0
  903. package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js +8 -0
  904. package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js.map +1 -0
  905. package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.d.ts +5 -0
  906. package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js +8 -0
  907. package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js.map +1 -0
  908. package/dist/nuxt/runtime/server/api/editor/assets/[id].post.d.ts +5 -0
  909. package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js +8 -0
  910. package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js.map +1 -0
  911. package/dist/nuxt/runtime/server/api/editor/settings.get.d.ts +5 -0
  912. package/dist/nuxt/runtime/server/api/editor/settings.get.js +8 -0
  913. package/dist/nuxt/runtime/server/api/editor/settings.get.js.map +1 -0
  914. package/dist/nuxt/runtime/server/api/editor/settings.put.d.ts +5 -0
  915. package/dist/nuxt/runtime/server/api/editor/settings.put.js +8 -0
  916. package/dist/nuxt/runtime/server/api/editor/settings.put.js.map +1 -0
  917. package/dist/nuxt/runtime/server/api/editor/tags.get.d.ts +5 -0
  918. package/dist/nuxt/runtime/server/api/editor/tags.get.js +8 -0
  919. package/dist/nuxt/runtime/server/api/editor/tags.get.js.map +1 -0
  920. package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.d.ts +5 -0
  921. package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js +8 -0
  922. package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js.map +1 -0
  923. package/dist/nuxt/runtime/server/api/editor/themes/[id].get.d.ts +5 -0
  924. package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js +8 -0
  925. package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js.map +1 -0
  926. package/dist/nuxt/runtime/server/api/editor/themes/index.get.d.ts +5 -0
  927. package/dist/nuxt/runtime/server/api/editor/themes/index.get.js +8 -0
  928. package/dist/nuxt/runtime/server/api/editor/themes/index.get.js.map +1 -0
  929. package/dist/nuxt/runtime/server/api/editor/themes/index.post.d.ts +5 -0
  930. package/dist/nuxt/runtime/server/api/editor/themes/index.post.js +8 -0
  931. package/dist/nuxt/runtime/server/api/editor/themes/index.post.js.map +1 -0
  932. package/dist/nuxt/runtime/server/api/editor/users.get.d.ts +5 -0
  933. package/dist/nuxt/runtime/server/api/editor/users.get.js +8 -0
  934. package/dist/nuxt/runtime/server/api/editor/users.get.js.map +1 -0
  935. package/dist/nuxt/runtime/server/plugins/collab.d.ts +5 -0
  936. package/dist/nuxt/runtime/server/plugins/collab.js +10 -0
  937. package/dist/nuxt/runtime/server/plugins/collab.js.map +1 -0
  938. package/dist/nuxt/runtime/server/plugins/editor-server.d.ts +5 -0
  939. package/dist/nuxt/runtime/server/plugins/editor-server.js +20 -0
  940. package/dist/nuxt/runtime/server/plugins/editor-server.js.map +1 -0
  941. package/dist/nuxt/runtime/server/routes/collab/[id].d.ts +5 -0
  942. package/dist/nuxt/runtime/server/routes/collab/[id].js +35 -0
  943. package/dist/nuxt/runtime/server/routes/collab/[id].js.map +1 -0
  944. package/dist/nuxt/runtime/server/utils/editor-route.d.ts +11 -0
  945. package/dist/nuxt/runtime/server/utils/editor-route.js +49 -0
  946. package/dist/nuxt/runtime/server/utils/editor-route.js.map +1 -0
  947. package/dist/outline/EditorOutline.js +124 -0
  948. package/dist/outline/EditorOutline.js.map +1 -0
  949. package/dist/outline/EditorOutline.vue.d.ts +15 -0
  950. package/dist/outline/heading-outline.d.ts +26 -0
  951. package/dist/outline/heading-outline.js +46 -0
  952. package/dist/outline/heading-outline.js.map +1 -0
  953. package/dist/outline/index.d.ts +2 -0
  954. package/dist/outline/index.js +1 -0
  955. package/dist/outline/react/EditorOutline.d.ts +12 -0
  956. package/dist/outline/react/EditorOutline.js +112 -0
  957. package/dist/outline/react/EditorOutline.js.map +1 -0
  958. package/dist/outline/react.d.ts +2 -0
  959. package/dist/outline/react.js +1 -0
  960. package/dist/outline/vue.d.ts +2 -0
  961. package/dist/outline/vue.js +1 -0
  962. package/dist/presets/advanced.d.ts +33 -0
  963. package/dist/presets/advanced.js +50 -0
  964. package/dist/presets/advanced.js.map +1 -0
  965. package/dist/presets/simple.d.ts +9 -0
  966. package/dist/presets/simple.js +12 -0
  967. package/dist/presets/simple.js.map +1 -0
  968. package/dist/react/AdvancedEditor.d.ts +23 -0
  969. package/dist/react/AdvancedEditor.js +24 -0
  970. package/dist/react/AdvancedEditor.js.map +1 -0
  971. package/dist/react/EditorSettingsModal.d.ts +14 -0
  972. package/dist/react/EditorSettingsModal.js +40 -0
  973. package/dist/react/EditorSettingsModal.js.map +1 -0
  974. package/dist/react/EditorSettingsPanel.d.ts +18 -0
  975. package/dist/react/EditorSettingsPanel.js +40 -0
  976. package/dist/react/EditorSettingsPanel.js.map +1 -0
  977. package/dist/react/EditorSurface.d.ts +61 -0
  978. package/dist/react/EditorSurface.js +277 -0
  979. package/dist/react/EditorSurface.js.map +1 -0
  980. package/dist/react/EditorToolbar.d.ts +15 -0
  981. package/dist/react/EditorToolbar.js +182 -0
  982. package/dist/react/EditorToolbar.js.map +1 -0
  983. package/dist/react/Icon.d.ts +13 -0
  984. package/dist/react/Icon.js +19 -0
  985. package/dist/react/Icon.js.map +1 -0
  986. package/dist/react/SettingsSection.d.ts +10 -0
  987. package/dist/react/SettingsSection.js +22 -0
  988. package/dist/react/SettingsSection.js.map +1 -0
  989. package/dist/react/SimpleEditor.d.ts +27 -0
  990. package/dist/react/SimpleEditor.js +22 -0
  991. package/dist/react/SimpleEditor.js.map +1 -0
  992. package/dist/react/advanced-preset.d.ts +11 -0
  993. package/dist/react/advanced-preset.js +31 -0
  994. package/dist/react/advanced-preset.js.map +1 -0
  995. package/dist/react/advanced.d.ts +4 -0
  996. package/dist/react/advanced.js +3 -0
  997. package/dist/react/context.d.ts +12 -0
  998. package/dist/react/context.js +21 -0
  999. package/dist/react/context.js.map +1 -0
  1000. package/dist/react/editor-ui.d.ts +14 -0
  1001. package/dist/react/editor-ui.js +20 -0
  1002. package/dist/react/editor-ui.js.map +1 -0
  1003. package/dist/react/index.d.ts +17 -0
  1004. package/dist/react/index.js +17 -0
  1005. package/dist/react/notify.d.ts +6 -0
  1006. package/dist/react/notify.js +25 -0
  1007. package/dist/react/notify.js.map +1 -0
  1008. package/dist/react/settings.d.ts +17 -0
  1009. package/dist/react/settings.js +27 -0
  1010. package/dist/react/settings.js.map +1 -0
  1011. package/dist/react/simple.d.ts +2 -0
  1012. package/dist/react/simple.js +1 -0
  1013. package/dist/react/styles/advanced.css +18 -0
  1014. package/dist/react/styles/themes-bridge.css +26 -0
  1015. package/dist/react/styles/ui-vars.css +20 -0
  1016. package/dist/react/suggestion-renderer.d.ts +12 -0
  1017. package/dist/react/suggestion-renderer.js +90 -0
  1018. package/dist/react/suggestion-renderer.js.map +1 -0
  1019. package/dist/react/ui/alert.js +38 -0
  1020. package/dist/react/ui/alert.js.map +1 -0
  1021. package/dist/react/ui/avatar.js +24 -0
  1022. package/dist/react/ui/avatar.js.map +1 -0
  1023. package/dist/react/ui/badge.js +30 -0
  1024. package/dist/react/ui/badge.js.map +1 -0
  1025. package/dist/react/ui/button.js +50 -0
  1026. package/dist/react/ui/button.js.map +1 -0
  1027. package/dist/react/ui/collapsible.js +19 -0
  1028. package/dist/react/ui/collapsible.js.map +1 -0
  1029. package/dist/react/ui/command.js +47 -0
  1030. package/dist/react/ui/command.js.map +1 -0
  1031. package/dist/react/ui/dialog.js +88 -0
  1032. package/dist/react/ui/dialog.js.map +1 -0
  1033. package/dist/react/ui/dropdown-menu.js +70 -0
  1034. package/dist/react/ui/dropdown-menu.js.map +1 -0
  1035. package/dist/react/ui/input-group.js +57 -0
  1036. package/dist/react/ui/input-group.js.map +1 -0
  1037. package/dist/react/ui/input.js +16 -0
  1038. package/dist/react/ui/input.js.map +1 -0
  1039. package/dist/react/ui/label.js +17 -0
  1040. package/dist/react/ui/label.js.map +1 -0
  1041. package/dist/react/ui/popover.js +36 -0
  1042. package/dist/react/ui/popover.js.map +1 -0
  1043. package/dist/react/ui/radio-group.js +29 -0
  1044. package/dist/react/ui/radio-group.js.map +1 -0
  1045. package/dist/react/ui/select.js +88 -0
  1046. package/dist/react/ui/select.js.map +1 -0
  1047. package/dist/react/ui/separator.js +18 -0
  1048. package/dist/react/ui/separator.js.map +1 -0
  1049. package/dist/react/ui/switch.js +21 -0
  1050. package/dist/react/ui/switch.js.map +1 -0
  1051. package/dist/react/ui/table.js +44 -0
  1052. package/dist/react/ui/table.js.map +1 -0
  1053. package/dist/react/ui/tabs.js +41 -0
  1054. package/dist/react/ui/tabs.js.map +1 -0
  1055. package/dist/react/ui/textarea.js +15 -0
  1056. package/dist/react/ui/textarea.js.map +1 -0
  1057. package/dist/react/ui/tooltip.js +37 -0
  1058. package/dist/react/ui/tooltip.js.map +1 -0
  1059. package/dist/react/ui/utils.d.ts +5 -0
  1060. package/dist/react/ui/utils.js +10 -0
  1061. package/dist/react/ui/utils.js.map +1 -0
  1062. package/dist/react/use-editor-i18n.d.ts +12 -0
  1063. package/dist/react/use-editor-i18n.js +17 -0
  1064. package/dist/react/use-editor-i18n.js.map +1 -0
  1065. package/dist/react/use-notifier.d.ts +11 -0
  1066. package/dist/react/use-notifier.js +25 -0
  1067. package/dist/react/use-notifier.js.map +1 -0
  1068. package/dist/react/use-store.d.ts +6 -0
  1069. package/dist/react/use-store.js +10 -0
  1070. package/dist/react/use-store.js.map +1 -0
  1071. package/dist/schema/advanced.d.ts +14 -0
  1072. package/dist/schema/advanced.js +43 -0
  1073. package/dist/schema/advanced.js.map +1 -0
  1074. package/dist/schema/simple.d.ts +10 -0
  1075. package/dist/schema/simple.js +13 -0
  1076. package/dist/schema/simple.js.map +1 -0
  1077. package/dist/server/adapter.d.ts +101 -0
  1078. package/dist/server/ai.d.ts +101 -0
  1079. package/dist/server/ai.js +105 -0
  1080. package/dist/server/ai.js.map +1 -0
  1081. package/dist/server/collab-state.d.ts +16 -0
  1082. package/dist/server/collab-state.js +43 -0
  1083. package/dist/server/collab-state.js.map +1 -0
  1084. package/dist/server/collab.d.ts +68 -0
  1085. package/dist/server/collab.js +187 -0
  1086. package/dist/server/collab.js.map +1 -0
  1087. package/dist/server/errors.d.ts +17 -0
  1088. package/dist/server/errors.js +26 -0
  1089. package/dist/server/errors.js.map +1 -0
  1090. package/dist/server/handlers/ai.d.ts +223 -0
  1091. package/dist/server/handlers/ai.js +422 -0
  1092. package/dist/server/handlers/ai.js.map +1 -0
  1093. package/dist/server/handlers/context.d.ts +64 -0
  1094. package/dist/server/handlers/context.js +85 -0
  1095. package/dist/server/handlers/context.js.map +1 -0
  1096. package/dist/server/handlers/editor.d.ts +107 -0
  1097. package/dist/server/handlers/editor.js +241 -0
  1098. package/dist/server/handlers/editor.js.map +1 -0
  1099. package/dist/server/handlers/index.d.ts +4 -0
  1100. package/dist/server/handlers/index.js +4 -0
  1101. package/dist/server/host.d.ts +61 -0
  1102. package/dist/server/host.js +105 -0
  1103. package/dist/server/host.js.map +1 -0
  1104. package/dist/server/index.d.ts +8 -0
  1105. package/dist/server/index.js +7 -0
  1106. package/dist/server/node.d.ts +24 -0
  1107. package/dist/server/node.js +54 -0
  1108. package/dist/server/node.js.map +1 -0
  1109. package/dist/server/rate-limit.d.ts +22 -0
  1110. package/dist/server/rate-limit.js +34 -0
  1111. package/dist/server/rate-limit.js.map +1 -0
  1112. package/dist/settings/index.d.ts +110 -0
  1113. package/dist/settings/index.js +114 -0
  1114. package/dist/settings/index.js.map +1 -0
  1115. package/dist/settings/values.d.ts +35 -0
  1116. package/dist/settings/values.js +41 -0
  1117. package/dist/settings/values.js.map +1 -0
  1118. package/dist/styles/ai.css +77 -0
  1119. package/dist/styles/authors.css +18 -0
  1120. package/dist/styles/block-ui.css +16 -0
  1121. package/dist/styles/collab.css +26 -0
  1122. package/dist/styles/comments.css +11 -0
  1123. package/dist/styles/composites.css +56 -0
  1124. package/dist/styles/core.css +99 -0
  1125. package/dist/styles/media.css +8 -0
  1126. package/dist/styles/mentions.css +24 -0
  1127. package/dist/styles/tables.css +25 -0
  1128. package/dist/styles/themes.css +622 -0
  1129. package/dist/styles/tokens.css +29 -0
  1130. package/dist/styles/transcript.css +13 -0
  1131. package/dist/tree/DocumentTree.js +595 -0
  1132. package/dist/tree/DocumentTree.js.map +1 -0
  1133. package/dist/tree/DocumentTree.vue.d.ts +36 -0
  1134. package/dist/tree/folder-paths.js +11 -0
  1135. package/dist/tree/folder-paths.js.map +1 -0
  1136. package/dist/tree/index.d.ts +4 -0
  1137. package/dist/tree/index.js +1 -0
  1138. package/dist/tree/react/DocumentTree.d.ts +24 -0
  1139. package/dist/tree/react/DocumentTree.js +579 -0
  1140. package/dist/tree/react/DocumentTree.js.map +1 -0
  1141. package/dist/tree/react/use-tree-view.d.ts +14 -0
  1142. package/dist/tree/react/use-tree-view.js +21 -0
  1143. package/dist/tree/react/use-tree-view.js.map +1 -0
  1144. package/dist/tree/react.d.ts +3 -0
  1145. package/dist/tree/react.js +3 -0
  1146. package/dist/tree/store.d.ts +45 -0
  1147. package/dist/tree/tree-items.js +221 -0
  1148. package/dist/tree/tree-items.js.map +1 -0
  1149. package/dist/tree/tree-view-model.d.ts +29 -0
  1150. package/dist/tree/tree-view-model.js +71 -0
  1151. package/dist/tree/tree-view-model.js.map +1 -0
  1152. package/dist/tree/tree-view.d.ts +15 -0
  1153. package/dist/tree/tree-view.js +21 -0
  1154. package/dist/tree/tree-view.js.map +1 -0
  1155. package/dist/tree/types.d.ts +23 -0
  1156. package/dist/tree/types.js +0 -0
  1157. package/dist/tree/vue.d.ts +3 -0
  1158. package/dist/tree/vue.js +3 -0
  1159. package/dist/vue/AdvancedEditor.js +100 -0
  1160. package/dist/vue/AdvancedEditor.js.map +1 -0
  1161. package/dist/vue/AdvancedEditor.vue.d.ts +71 -0
  1162. package/dist/vue/SimpleEditor.js +61 -0
  1163. package/dist/vue/SimpleEditor.js.map +1 -0
  1164. package/dist/vue/SimpleEditor.vue.d.ts +36 -0
  1165. package/dist/vue/advanced-preset.d.ts +13 -0
  1166. package/dist/vue/advanced-preset.js +33 -0
  1167. package/dist/vue/advanced-preset.js.map +1 -0
  1168. package/dist/vue/advanced.d.ts +3 -0
  1169. package/dist/vue/advanced.js +3 -0
  1170. package/dist/vue/components/EditorSettingsModal.js +69 -0
  1171. package/dist/vue/components/EditorSettingsModal.js.map +1 -0
  1172. package/dist/vue/components/EditorSettingsModal.vue.d.ts +24 -0
  1173. package/dist/vue/components/EditorSettingsPanel.js +58 -0
  1174. package/dist/vue/components/EditorSettingsPanel.js.map +1 -0
  1175. package/dist/vue/components/EditorSettingsPanel.vue.d.ts +29 -0
  1176. package/dist/vue/components/EditorSurface.js +229 -0
  1177. package/dist/vue/components/EditorSurface.js.map +1 -0
  1178. package/dist/vue/components/EditorSurface.vue.d.ts +68 -0
  1179. package/dist/vue/components/EditorToolbar.js +189 -0
  1180. package/dist/vue/components/EditorToolbar.js.map +1 -0
  1181. package/dist/vue/components/EditorToolbar.vue.d.ts +17 -0
  1182. package/dist/vue/components/SettingsSection.js +26 -0
  1183. package/dist/vue/components/SettingsSection.js.map +1 -0
  1184. package/dist/vue/components/SettingsSection.vue.d.ts +21 -0
  1185. package/dist/vue/components/SuggestionList.js +91 -0
  1186. package/dist/vue/components/SuggestionList.js.map +1 -0
  1187. package/dist/vue/components/SuggestionList.vue.d.ts +19 -0
  1188. package/dist/vue/context.d.ts +24 -0
  1189. package/dist/vue/context.js +42 -0
  1190. package/dist/vue/context.js.map +1 -0
  1191. package/dist/vue/index.d.ts +26 -0
  1192. package/dist/vue/index.js +16 -0
  1193. package/dist/vue/kit/index.d.ts +3 -0
  1194. package/dist/vue/kit/index.js +1 -0
  1195. package/dist/vue/kit/nuxt-ui.css +24 -0
  1196. package/dist/vue/kit/nuxt-ui.d.ts +31 -0
  1197. package/dist/vue/kit/nuxt-ui.js +101 -0
  1198. package/dist/vue/kit/nuxt-ui.js.map +1 -0
  1199. package/dist/vue/kit/types.d.ts +370 -0
  1200. package/dist/vue/kit/use-ui-kit.d.ts +12 -0
  1201. package/dist/vue/kit/use-ui-kit.js +17 -0
  1202. package/dist/vue/kit/use-ui-kit.js.map +1 -0
  1203. package/dist/vue/notify.d.ts +12 -0
  1204. package/dist/vue/notify.js +27 -0
  1205. package/dist/vue/notify.js.map +1 -0
  1206. package/dist/vue/settings.d.ts +16 -0
  1207. package/dist/vue/settings.js +64 -0
  1208. package/dist/vue/settings.js.map +1 -0
  1209. package/dist/vue/simple.d.ts +2 -0
  1210. package/dist/vue/simple.js +1 -0
  1211. package/dist/vue/store-ref.d.ts +20 -0
  1212. package/dist/vue/store-ref.js +59 -0
  1213. package/dist/vue/store-ref.js.map +1 -0
  1214. package/dist/vue/suggestion-renderer.d.ts +6 -0
  1215. package/dist/vue/suggestion-renderer.js +20 -0
  1216. package/dist/vue/suggestion-renderer.js.map +1 -0
  1217. package/dist/vue/use-editor-i18n.d.ts +12 -0
  1218. package/dist/vue/use-editor-i18n.js +17 -0
  1219. package/dist/vue/use-editor-i18n.js.map +1 -0
  1220. package/dist/vue/use-editor-ui.d.ts +15 -0
  1221. package/dist/vue/use-editor-ui.js +23 -0
  1222. package/dist/vue/use-editor-ui.js.map +1 -0
  1223. package/dist/vue/use-notifier.d.ts +11 -0
  1224. package/dist/vue/use-notifier.js +19 -0
  1225. package/dist/vue/use-notifier.js.map +1 -0
  1226. package/docs/extending.md +538 -0
  1227. package/docs/integration.md +537 -0
  1228. package/docs/llms.md +375 -0
  1229. package/docs/usage.md +1071 -0
  1230. package/package.json +619 -4
@@ -0,0 +1,537 @@
1
+ # Integration guide: feature composition, settings, file browser, server, collaboration, AI and migration
2
+
3
+ How a host composes the editor from features, where settings and view state live, how the file browser plugs into the host's document storage, how a Nuxt/Nitro host connects the editor package to its sessions and AI providers, how two browsers collaborate on one document, how a server validates stored content without any UI code, and how to migrate from the former `#tiptap-editor` Nuxt module. Client-only editors (the [simple editor](./usage.md), media, AI with a host backend of your own) need only §1, §11 and §13.
4
+
5
+ ## Contents
6
+
7
+ 1. [Feature composition and entries](#1-feature-composition-and-entries)
8
+ 2. [Register the Nuxt module](#2-register-the-nuxt-module)
9
+ 3. [`EditorAdapter`: auth and storage](#3-editoradapter-auth-and-storage)
10
+ 4. [Server routes and authentication](#4-server-routes-and-authentication)
11
+ 5. [AI configuration and secrets](#5-ai-configuration-and-secrets)
12
+ 6. [Collaboration on the client](#6-collaboration-on-the-client)
13
+ 7. [Block UI (drag handle, hover actions)](#7-block-ui-drag-handle-hover-actions)
14
+ 8. [Vue-free advanced schema for servers](#8-vue-free-advanced-schema-for-servers)
15
+ 9. [Production](#9-production)
16
+ 10. [The file browser and `DocumentStore`](#10-the-file-browser-and-documentstore)
17
+ 11. [Settings persistence and app lifetime](#11-settings-persistence-and-app-lifetime)
18
+ 12. [Migrating from `#tiptap-editor`](#12-migrating-from-tiptap-editor)
19
+ 13. [Dependency rules and bundle proof](#13-dependency-rules-and-bundle-proof)
20
+
21
+ ## 1. Feature composition and entries
22
+
23
+ | Entry | Side | Contents |
24
+ |---|---|---|
25
+ | `@ecsplico/editor/nuxt` | build | The Nuxt module (`defineNuxtModule`, config key `tiptapEditor`). Registers the Nitro scan dir, the client context plugin, AI runtime config, `build.transpile`, the `ui.css` Tailwind `@source`, Nitro `externals.inline` and `experimental.websocket`. |
26
+ | `@ecsplico/editor/server` | server | Framework-free (no Nuxt, h3, Nitro, Vue or React): `createCollabServer({ adapter, schemaExtensions, hooks })` → `{ hocuspocus, handleConnection, forgetDocument, liveContent, contentChanged, stats, close }`, `createAiModels({ presets, apiKey, slots, transcription })`, `createRateLimiter({ max, windowMs })`, `EditorAdapter`, `HttpError`. Also the process-wide registry the Nuxt module and Nitro hosts use: `setEditorAdapter`, `forgetCollabDocument`, `liveContent`, `collabContentChanged`, `collabStats`; it shares module instances with the package's own routes. |
27
+ | `@ecsplico/editor/server/handlers` | server | One handler per editor/AI route, `(ctx, request) => Promise<HandlerResponse>` (`usersGet`, `tagsGet`, `settingsGet/Put`, `assetGet/Post`, `themesGet`, `themeGet/Post/Delete`, `modelsGet`, `chatPost`, `generatePost`, `completePost`, `transcribePost`, `transcriptCleanupPost`) and the zod schemas of their bodies (`chatBodySchema`, …). Map any HTTP server's request onto `HandlerRequest` and send the `HandlerResponse`; `HttpError` carries the status. |
28
+ | `@ecsplico/editor/server/node` | server (Node) | `listenCollab(collab, { port, host })`: a Node HTTP server that serves a `createCollabServer` over websockets, for a plain script (needs the `crossws` dependency; Node only). |
29
+ | `@ecsplico/editor/collab`, `/collab/vue`, `/collab/react` | browser | framework-free `collabFeatureCore(ui?)`, `yjsAnchorResolver`; `collabFeature()` per surface |
30
+ | `@ecsplico/editor/block-ui`, `/block-ui/vue`, `/block-ui/react` | browser | framework-free `blockUiFeatureCore(ui)`, `blockActionsFor`, `effectiveTarget`; `blockUiFeature()`, `BlockUi`, `BlockActionsOverlay` per surface |
31
+ | `@ecsplico/editor/authors`, `/authors/vue`, `/authors/react` | browser | framework-free `authorsFeatureCore(ui)`, `currentAuthor`, `documentAuthors`; `authorsFeature()` plus `AuthorColorsButton`, `AuthorColorsPanel`, `SettingsAuthorsTab` per surface (see the [usage guide](./usage.md#authors-and-comments)) |
32
+ | `@ecsplico/editor/comments`, `/comments/vue`, `/comments/react` | browser | framework-free `commentsFeatureCore(ui, { model? })`, `createCommentsModel`; `commentsFeature({ model? })` (requires `collab` unless a host `model` backs it), `useComments`, `CommentsMargin`, `CommentsPopover`, `CommentsListMenu`, … per surface |
33
+ | `@ecsplico/editor/themes`, `/themes/vue`, `/themes/react` | browser | framework-free `themesFeatureCore(ui)`, `startObsidianTheme`, `scopeThemeCss`, `THEME_SCOPE_CLASS`; `themesFeature()` (site-wide Obsidian themes; see the [usage guide](./usage.md#themes-obsidian)) and `SettingsAppearanceTab` per surface; Vue-free in `/themes/schema`: `ThemeRecord`, `THEME_ID`, `MAX_THEME_BYTES`, `themeManifestSchema` |
34
+ | `@ecsplico/editor/schema/advanced` | anywhere | Vue-free `advancedSchemaExtensions()`; imports no Vue, UI or browser code |
35
+ | `@ecsplico/editor/styles/collab.css`, `/block-ui.css`, `/authors.css`, `/comments.css`, `/themes.css` | browser | Remote carets, block-range selection, author colouring, comment highlights and cards, the Obsidian variable bridge. The Nuxt module adds every feature stylesheet to `css` (`themes.css` last). |
36
+
37
+ The server logic (`src/server/`) runs in any Node process: `createCollabServer`, `createAiModels`, `createRateLimiter` and the route handlers take their adapter and configuration explicitly. The Nuxt module is a thin wrapper: the file-based Nitro routes in `src/nuxt/runtime/server/` parse the request, call the handler of `@ecsplico/editor/server/handlers` and send its answer; the collab route and plugins mount one `createCollabServer` kept by `setEditorAdapter`/`configureEditorServer`. A plain script needs no Nitro at all:
38
+
39
+ ```ts
40
+ import { createCollabServer } from '@ecsplico/editor/server'
41
+ import { listenCollab } from '@ecsplico/editor/server/node'
42
+
43
+ const collab = createCollabServer({ adapter }) // adapter.authenticate({ headers, token }) decides who may connect
44
+ const { url, close } = await listenCollab(collab, { port: 4000 })
45
+ // browser: new HocuspocusProvider({ url, name: documentId, document, token })
46
+ ```
47
+
48
+ ### Per-feature entries: framework-free, Vue, React
49
+
50
+ Every feature that has a UI is split in the same four entries, so a host takes exactly the layers it uses:
51
+
52
+ | Entry | Contents | May import |
53
+ |---|---|---|
54
+ | `./<x>` | The feature's logic: `<x>FeatureCore(ui)`, the **models** (`create*`, `*Model`: framework-free stores such as `createCommentsModel`, `createCompositeRows`, `createAiAssistant`, `createDocumentChat`, `modelProfiles(app)`), Tiptap extensions and plugins, helpers | Tiptap/ProseMirror, `/core`, `/settings`; no `vue`, `react`, `@nuxt/ui` or `sonner` |
55
+ | `./<x>/vue` | `<x>Feature(): VueFeature`, the feature's Vue components and node views, thin Vue **hooks** (`useComments`, `useCompositeRows`, `useAiAssistant`, `useModelProfiles`, `useFileImport`, …) over the models | `vue`, `@tiptap/vue-3`, Nuxt UI; never `react` |
56
+ | `./<x>/react` | `<x>Feature(): ReactFeature`, the React components (shadcn/ui) and node views, the React hooks over the same models | `react`, `@tiptap/react`, Radix, `sonner`; never `vue` |
57
+ | `./<x>/schema` | Node/mark specs, protocol schemas and limits for servers and validators | no UI, no DOM |
58
+
59
+ Entries that exist per feature: `media`, `transcript`, `composites`, `authors`, `comments`, `ai`, `collab`, `block-ui`, `themes` (with `/schema` where the feature owns document nodes or a protocol), `outline` and `tree` (`/vue`, `/react`, no `Core(ui)`). `mentions` is framework-free alone (`mentionsFeature(): EditorFeature<never>`, usable in both layers). The three integrations (`integrations/composite-media`, `composite-ai`, `transcript-ai`) are framework-free alone too: they only wire other features' models, so `compositeMediaFeature()`, `compositeAiFeature()` and `transcriptAiFeature()` fit a Vue and a React preset unchanged.
60
+
61
+ - **The UI binding contract.** `features/<x>/feature.ts` exports `<x>FeatureCore<C>(ui: <X>Ui<C>): EditorFeature<C>`: all feature behaviour (extensions, commands, toolbar items, slash commands, settings tabs, conversions) with the UI left open as the typed interface `<X>Ui<C>` (for example `CommentsUi`: `toolbarButton`, `overlay`, `settingsTab`; `MediaUi`: `recorderModal`, `nodeViews`). `C` is the framework's component type. `./<x>/vue` fills it with Vue components, `./<x>/react` with React components; a host writing its own chrome (another UI kit, a test) calls `<x>FeatureCore(ui)` with its own components. `EditorFeature<never>` means “no components at all”: such a feature (`coreFeature()`, `mentionsFeature()`, the integrations) is accepted by both presets.
62
+ - **Notices.** Features never import a toast library. A user-facing message is a `Notice` (`{ id?, title, description?, kind?, icon?, duration? }`) sent to a `Notifier` (`(notice) => void`, optional `dismiss(id)`; `silentNotifier` drops everything), from `/core`. A feature reads it as `ctx.notify` in its factories (`FeatureContext.notify`), app-level models (model profiles, the rate-limit notice) as `EditorContext.notify`, set with `createEditorContext({ notify })`. Vue: `vueNotifier(useToast())` shows Nuxt UI toasts (the page needs `<UApp>`); `createEditor()` installs a *queued* notifier (`createQueuedNotifier()`) that holds notices raised before the first `EditorSurface` exists and shows them through that surface's `useToast()`. React: `reactNotifier` shows sonner toasts; pass it as `createEditorContext({ notify: reactNotifier })` and mount sonner's `Toaster` (re-exported from `@ecsplico/editor/react`) once per page, otherwise no notice is visible. `id` replaces a visible toast, `duration: 0` keeps it until replaced or dismissed.
63
+ - **`setup` and teardown.** A feature's `setup(ctx)` runs once per mounted surface and may return a teardown function that the surface runs when it unmounts. Per-app runtimes dedupe inside and hand back a release: `startObsidianTheme(ctx)` is reference-counted per app, so the React `themesFeature()` removes the theme when the last surface that started it unmounts, while the Vue `themesFeature()` (call it during component setup) keeps it for the life of the Vue app through the `lifetime` hook of `ThemesUi`, because the theme styles the whole site. Run own per-app side effects there instead of in a component.
64
+ - **Models versus hooks.** State and logic are framework-free `createStore` stores (from `/core`: `createStore`, `derived`, `ReadonlyStore`) inside the models; the hooks only subscribe: React `useStore(store)` (from `/react`), Vue `useStoreRef(store)` (a readonly ref, from `/vue`; `useWritableStoreRef(store)` for two-way refs, `trackedStore(store)` for a store whose `get()` Vue tracks, `storeFromRef(ref)` the other way round), all from the one `vue/store-ref` module, used inside the thin `use*` hooks of the feature. Notices follow one policy on both surfaces: `notifierOf(editor, app)` (from `/core`) picks the editor's surface notifier, else the app context's, when a notice is shown; `useNotifier(editor?)` (from `/vue` and `/react`) is its hook form, so a host that passes `createEditor({ notify })` / `createEditorContext({ notify })` receives every notice of the hooks, including the AI rate-limit notice (`useAiAssistant(editor?)`, `useDocumentChat(editor?)`, `useFileImport(editor?)`). A host that wants a different framework (or a script) uses the model directly.
65
+
66
+ ### Feature composition
67
+
68
+ An editor is a list of features. Every feature is imported from its own entry, so a feature you do not import is not in your bundle:
69
+
70
+ ```ts
71
+ import { compositeFeature } from '@ecsplico/editor/composites/vue'
72
+ import { coreFeature, defineEditor } from '@ecsplico/editor/core'
73
+ import { compositeMediaFeature } from '@ecsplico/editor/integrations/composite-media'
74
+ import { mediaFeature } from '@ecsplico/editor/media/vue'
75
+
76
+ // Order = order of toolbar groups, menu entries and the schema.
77
+ const preset = defineEditor({ features: [coreFeature(), mediaFeature(), compositeFeature(), compositeMediaFeature()] })
78
+ ```
79
+
80
+ - `defineEditor` checks `requires`: an integration listed without the features it connects (`commentsFeature()` needs `collab`; `compositeMediaFeature()` needs `composites` and `media`; `compositeAiFeature()` needs `composites`, `ai`, `media`; `transcriptAiFeature()` needs `transcript`, `ai`) throws at composition time. `bun run check:editor-composition` keeps that behavior.
81
+ - Own blocks and features: see the [extending guide](./extending.md).
82
+ - Prebuilt compositions: `simpleEditor()` (`@ecsplico/editor/presets/simple`, core only) and, per surface, `advancedEditor({ compositeKinds? })` from `@ecsplico/editor/vue/advanced` or `@ecsplico/editor/react/advanced` (every feature and the three integrations with that surface's bindings, in `ADVANCED_FEATURE_IDS` order). `@ecsplico/editor/presets/advanced` is the framework-free assembly behind both (`ADVANCED_FEATURE_IDS`, `advancedEditorCore(bound, options)`, `AdvancedFeatures<C>`, `AdvancedEditorOptions`): a UI layer binds only the UI-bound features (media, transcript, composites, authors, comments, AI, collab, block UI, themes), the framework-free ones (core, mentions, composite-media, composite-AI, transcript-AI) are added there once; it contains no component and is not a preset to mount. `SimpleEditor` (`/vue/simple`, `/react/simple`) and `AdvancedEditor` (`/vue/advanced`, `/react/advanced`) are the matching components.
83
+ - Both surfaces take the same features: a React preset is `defineEditor({ features: [coreFeature(), mediaFeature(), commentsFeature(), …] })` with the factories from `./<x>/react`, a Vue one with those from `./<x>/vue`. Mixing is a type error (`VueFeature` is `EditorFeature<Component>`, `ReactFeature` is `EditorFeature<ComponentType<{ editor: Editor }>>`); only `EditorFeature<never>` features (`coreFeature()`, `mentionsFeature()` and the integrations) fit either ([usage guide](./usage.md#simple-editor-in-react)).
84
+ - The preset, and with it the schema, collaboration mode and slash commands, is read once when the surface mounts. Change it by remounting with a new `key`. A simple editor cannot safely edit advanced JSON: unknown nodes are rejected through `contentError` ([usage guide](./usage.md#rejected-content-contenterror)).
85
+ - Components that belong *beside* an editor are separate exports and take the editor (or the preset) as a prop. Vue: `EditorToolbar`, `EditorSettingsPanel`, `EditorSettingsModal` (`/vue`), `EditorOutline` (`/outline/vue`), `CompositeTable`, `CompositeInspector` (`/composites/vue`), `AiSidebar` (`/ai/vue`), `CommentsMargin` (`/comments/vue`), `DocumentTree` (`/tree/vue`).
86
+ - The React equivalents have the same names and props style: `EditorToolbar`, `EditorSettingsPanel`, `EditorSettingsModal` from `@ecsplico/editor/react`; `EditorOutline` from `/outline/react`; `CompositeTable`, `CompositeInspector` from `/composites/react`; `AiSidebar` from `/ai/react`; `CommentsMargin` from `/comments/react`; `DocumentTree` from `/tree/react`. The host mounts sonner's `Toaster` once.
87
+ - A feature can run per-app side effects from every surface's setup without touching the surface markup: its `setup: (ctx) => void | (() => void)` contribution is called by `EditorSurface` for each mounted surface and its returned teardown when the surface unmounts (`themesFeature()` starts its theme runtime this way; the runtime dedupes per app and puts `obsidian-theme theme-dark|theme-light` on `<html>` so the whole app follows the theme; see [Per-feature entries](#per-feature-entries-framework-free-vue-react) for its lifetime on each surface).
88
+
89
+ ### Browser entries versus schema and server entries
90
+
91
+ | Kind | Entries | May import |
92
+ |---|---|---|
93
+ | Browser, with Vue and Nuxt UI | `/vue`, `/vue/simple`, `/vue/advanced`, `/<feature>/vue` (`/media`, `/transcript`, `/authors`, `/comments`, `/composites`, `/ai`, `/collab`, `/block-ui`, `/themes`, `/outline`, `/tree`) | everything above them in the rules of [§13](#13-dependency-rules-and-bundle-proof); never React |
94
+ | Browser, with React and shadcn/ui | `/react`, `/react/simple`, `/react/advanced`, `/<feature>/react` (the same features) | the same rules; never Vue, `@tiptap/vue-3` or Nuxt UI |
95
+ | Browser, framework-free | `/core` (`defineEditor`, `createEditorContext`, the settings store, `createStore`, the notice seam, the suggestion renderer seam, descriptors such as `EditorFeature<C>` and `MenuItem`), `/<feature>` (`<x>FeatureCore(ui)`, the models), `/mentions`, `/integrations/*`, `/presets/*` | Tiptap/ProseMirror, `/core` and `/settings` only (plus Yjs/AI SDK where the feature needs them); no `vue`, `@tiptap/vue-3`, `@nuxt/ui`, `react` or `sonner` module |
96
+ | Server-safe schema and protocol, usable in Node | `/core/schema`, `/schema/simple`, `/schema/advanced`, `/media/schema`, `/mentions/schema`, `/transcript/schema`, `/authors/schema`, `/comments/schema`, `/composites/schema`, `/themes/schema`, `/tree/types`, `/settings`, `/ai/protocol`, `/integrations/transcript-ai/protocol` | no UI framework, no DOM globals or feature factories |
97
+ | Server | `/server`, `/nuxt` | Nitro/Nuxt build code; never imported by browser code |
98
+
99
+ Servers and validators build their ProseMirror schema from the framework-free schema entries (`getSchema(advancedSchemaExtensions())`), never from a browser entry.
100
+
101
+ ## 2. Register the Nuxt module
102
+
103
+ ```ts
104
+ // nuxt.config.ts
105
+ export default defineNuxtConfig({
106
+ // @nuxt/ui first: the editor module patches its generated `ui.css` template.
107
+ modules: ['@nuxt/ui', '@ecsplico/editor/nuxt'],
108
+ tiptapEditor: { ai: { /* see §5 */ } },
109
+ })
110
+ ```
111
+
112
+ Add `"@ecsplico/editor"` to the host's dependencies (`workspace:*` in this repository, the registry version elsewhere). The package ships built ESM (`dist`); the module puts it into `build.transpile` for the client and Nitro's `externals.inline` for the server so the runtime files in `dist/nuxt/runtime` (they import `h3` and `nitropack/runtime` for the server and `#app` for the client explicitly) are compiled by the host. `h3` and `nitropack` are optional peers: a Nuxt app already provides them; only a strictly isolated install (pnpm without hoisting) may need them listed next to the package.
113
+
114
+ The module registers exactly one client plugin (`editor-context-nuxt-ui.client.ts`, which hands `nuxtUiKit()` to the context; the module has no `kit` option): it installs the editor context with account-synced settings and the public AI configuration. It auto-registers no component or composable: import everything from the package entries.
115
+
116
+ Without a registered adapter every route throws „tiptap-editor: setEditorAdapter() wurde in keinem Nitro-Plugin aufgerufen“.
117
+
118
+ ## 3. `EditorAdapter`: auth and storage
119
+
120
+ **Who owns what.** The package owns the routes, the Hocuspocus server, rate limiting and the wire formats; the host owns *identity* (sessions, sign-in, which user may open which document) and *storage* (where documents, Yjs state, assets, settings and themes live). Both enter through the one adapter below. The package never reads cookies or touches files itself; `authenticate` returns the user (or `null`), the storage methods persist what they are given. In this repository `server/plugins/editor-adapter.ts` wires the adapter to `nuxt-auth-utils` sessions and the file system under `.data/`. The app has no login: `server/middleware/demo-session.ts` signs every `/api/` request whose session is not one of the demo users `anna`, `ben` or `bernd` (`shared/utils/demo-users.ts`) in as `anna`, and `POST /api/auth/switch` (`server/api/auth/switch.post.ts`) switches the session to another demo user. Both are host code; the package only sees what `authenticate` returns.
121
+
122
+ The single seam between the package and the host. Register it in a Nitro plugin:
123
+
124
+ ```ts
125
+ // server/plugins/editor-adapter.ts
126
+ import { setEditorAdapter } from '@ecsplico/editor/server'
127
+
128
+ export default defineNitroPlugin(() => {
129
+ setEditorAdapter({
130
+ // Without a session cookie h3 throws outside a main handler: map that to `null`.
131
+ authenticate: request => getUserSession({ headers: request.headers, context: {} }).then(s => s.user ?? null, () => null),
132
+ loadContent: async id => (await getDocument(id))?.content ?? null,
133
+ async storeContent(id, content) {
134
+ const existing = await getDocument(id)
135
+ if (!existing) return // deleted while a store was pending
136
+ await putDocument({ ...existing, content, updatedAt: new Date().toISOString() })
137
+ },
138
+ listUsers: async () => (await listUsers()).map(toSessionUser),
139
+ listContents: async () => (await listAllDocuments()).map(({ id, content }) => ({ id, content })),
140
+ loadState, storeState, removeState, storeAsset, loadAsset,
141
+ loadSettings: user => getUserSettings((user as User).id),
142
+ storeSettings: (user, settings) => putUserSettings((user as User).id, settings),
143
+ listThemes,
144
+ loadTheme,
145
+ storeTheme,
146
+ removeTheme,
147
+ })
148
+ })
149
+ ```
150
+
151
+ | Method | Signature | Called | Must return |
152
+ |---|---|---|---|
153
+ | `authenticate` | `(request: { headers: Headers, token?: string }) => Promise<object \| null>` | Collab websocket (Hocuspocus `onAuthenticate`; `token` is the client's `collaboration.token`, absent for HTTP routes and token-less clients); first in every API route that needs a user | The user, or `null` (→ 401). The value becomes the Hocuspocus connection context's `user`, the `user` argument of the settings methods and the rate-limit key (`id`, else `username`, else its JSON). |
154
+ | `loadContent` | `(id) => Promise<JSONContent \| null>` | `onLoadDocument`, when no usable Yjs state exists (new, legacy or restored document) | TipTap JSON to seed the Y.Doc from; `null` = the document does not exist (connection closed) |
155
+ | `storeContent` | `(id, content) => Promise<void>` | `onStoreDocument` (debounced after edits, and on shutdown via the Nitro `close` hook) | Mirrors the JSON; tolerate ids deleted meanwhile |
156
+ | `listUsers` | `() => Promise<MentionUser[]>` (`{ id, username, color }`) | `GET /api/editor/users`, `POST /api/ai/generate` for tasks that need users | Every user that can be `@`-mentioned, no credentials |
157
+ | `listContents` | `() => Promise<{ id, content }[]>` | `GET /api/editor/tags` | Stored JSON of every document |
158
+ | `loadState` | `(id) => Promise<Uint8Array \| null>` | `onLoadDocument` | The bytes `storeState` received, unchanged (the Yjs update behind a content-version prefix; state from earlier releases is a raw update and loads as version `null`); `null` = none yet |
159
+ | `storeState` | `(id, state) => Promise<void>` | `onStoreDocument`, and right after a Y.Doc was seeded or block IDs were backfilled | Persist; tolerate deleted ids |
160
+ | `removeState` | `(id) => Promise<void>` | `forgetCollabDocument`, and `onLoadDocument` when the stored state is stale (`contentVersion`) | Drop the state of a deleted or rewritten document |
161
+ | `authorize?` | `(user, id) => Promise<{ readOnly: boolean } \| null>` | Hocuspocus `onConnect`, with the object `authenticate` returned | `null` rejects the connection (permission denied); `{ readOnly: true }` lets it sync but applies none of its edits. Omit: every authenticated user may edit every document |
162
+ | `contentVersion?` | `(id) => Promise<string \| null>` | `onLoadDocument`; right after every `storeContent`; before every store of an open document | Opaque version of the stored content (mtime, hash, revision; no NUL character), `null` = unknown. A stored state with another version is discarded and the document is re-seeded from `loadContent`; an open document whose version moved is merged with `loadContent` on its next store instead of being written back. Omit: state is never discarded |
163
+ | `schemaExtensions?` | `() => AnyExtension[]` | First collab access (once per adapter) | Vue-free TipTap node/mark extensions of the host, appended to `advancedSchemaExtensions()` in the collab schema |
164
+ | `storeAsset` | `(id, asset: AssetRecord & { data: Buffer }) => Promise<void>` | `POST /api/editor/assets/:id` | Persist the file under `asset.name` with its record. `id` is a document id or `scratch`; it need not name an existing document. |
165
+ | `loadAsset` | `(id, name) => Promise<{ record, data } \| null>` | `GET /api/editor/assets/:id/:name` | The stored file; `null` → 404 |
166
+ | `loadSettings?` | `(user) => Promise<unknown \| null>` | `GET /api/editor/settings` | Stored settings (normalized by the route), `null` = none yet |
167
+ | `storeSettings?` | `(user, settings) => Promise<void>` | `PUT /api/editor/settings` | Persist the validated settings |
168
+ | `listThemes?` | `() => Promise<ThemeRecord[]>` | `GET /api/editor/themes` | The shared theme library (`{ id, name, version?, author?, authorUrl?, builtin }`), host-seeded themes marked `builtin: true` |
169
+ | `loadTheme?` | `(id) => Promise<{ record, css } \| null>` | `GET /api/editor/themes/:id` | The theme's `theme.css` text with its record; `null` → 404 |
170
+ | `storeTheme?` | `(record: Omit<ThemeRecord, 'builtin'>, css) => Promise<void>` | `POST /api/editor/themes` | Persist an uploaded theme. The route has already validated the content and chosen a unique `record.id`. |
171
+ | `removeTheme?` | `(id) => Promise<boolean>` | `DELETE /api/editor/themes/:id` | Delete an upload; `false` = unknown id or builtin (the route has checked `listThemes()` first and answers 403 / 404 itself) |
172
+
173
+ | `languageModel?` | `(ref: ModelRef, user) => Promise<LanguageModel \| null>` | Every AI endpoint (`/api/ai/{generate,chat,complete,transcript-cleanup}`), before the runtime-config presets | The AI SDK language model for `ref` (`{ preset }` or a user profile's endpoint/model/key), so the host's own providers serve the editor. `user` is what `authenticate` returned. `null` falls through to the presets (400 for an unknown preset) |
174
+ | `listModels?` | `(user) => Promise<ModelProfile[] \| null>` | `GET /api/ai/models` | The models offered to `user`, replacing the preset list (list them with `source: 'preset'` and the `id` that `languageModel` receives as `{ preset: id }`). `null` lists the runtime-config presets |
175
+
176
+ Omit both settings methods to keep settings in the browser only (`GET` answers 204, `PUT` 501; the client falls back to `localStorage`).
177
+
178
+ The theme methods are optional too: an adapter without them answers the theme routes with 501 and the `themes` feature falls back to the standard look (a console warning, the stored setting stays). `storeTheme` and `removeTheme` are only needed for uploads; without them the upload and delete routes answer 501 while builtins stay selectable. `ThemeRecord` and the `THEME_ID` pattern come from the Vue-free `@ecsplico/editor/themes/schema`. The demo host keeps builtins in `server/themes/<id>/{manifest.json,theme.css}` (git-tracked, read-only) and uploads in the Nitro storage mount `themes` (`.data/themes/<id>/{manifest.json,theme.css}`, configured in `nuxt.config.ts`), so uploads survive restarts; `listThemes` returns builtins and then uploads, `loadTheme` checks builtins first, `removeTheme` refuses builtins.
179
+
180
+ ### Deleting a document
181
+
182
+ Call `forgetCollabDocument(id)` before removing the JSON (`server/api/documents/[id].delete.ts`): it tells connected clients the document is gone (stateless message `deleted`), closes their connections, drops the Yjs state through `removeState` and blocks a pending store from writing it back. `liveContent(id)` returns the current content of a document that is open in Hocuspocus (unsaved edits included), `null` when nobody has it open.
183
+
184
+ ### Content rewritten behind the editor's back
185
+
186
+ When something other than the editor writes a document's content (an agent rewrites the file), call `collabContentChanged(id)` (or `collab.contentChanged(id)` on your own `createCollabServer`) after the write. If the document is open, the server merges the new content into it right away as a diff-update: connected clients see an ordinary edit, unchanged blocks keep their Yjs items, nobody reconnects. It is a no-op when nobody has the document open or the version did not move. It needs `contentVersion`: without it a rewrite cannot be told from the server's own writes. Without the call an open document picks the rewrite up only on its next store (the next edit or the last client leaving).
187
+
188
+ ### What the collab server does on load
189
+
190
+ 1. A stored Yjs state without `section*` node names is used; blocks without an ID get one assigned **on the server**, before any client syncs, and the state is persisted at once (so a backfill after a restart cannot assign other IDs than clients already hold).
191
+ 2. Otherwise (no state, a legacy state containing the old `section` node, or a restored document) the Y.Doc is seeded from `loadContent`, migrated by `migrateLegacyContent` (`section*` → `composite*`) and given block IDs, then persisted immediately.
192
+
193
+ ## 4. Server routes and authentication
194
+
195
+ Every route authenticates through `adapter.authenticate`; the package guards its own routes and expects no host middleware (the demo's session middleware only makes sure a session exists; it is not what protects the routes). A `null` user answers 401 „Nicht angemeldet“ on API routes. The websocket upgrade of `/collab/:id` succeeds first by default, and a socket whose user is `null` is closed with code 4401 right after; with the module option `collab.authenticateUpgrade` the upgrade itself is refused with HTTP 401 (see [Auth notes](#auth-notes)).
196
+
197
+ | Method | Path | Purpose |
198
+ |---|---|---|
199
+ | WS | `/collab/:id` | Hocuspocus sync; the document name comes from the provider's `name`. Yjs state is the source of truth; JSON is mirrored via `storeContent`. |
200
+ | GET | `/api/ai/models` | Presets without keys + default slots (not rate limited) |
201
+ | POST | `/api/ai/complete` | Ghost text: `{ before, model }` → `{ text }` |
202
+ | POST | `/api/ai/generate` | Task run → SSE `delta` / `done` / `error` |
203
+ | POST | `/api/ai/chat` | Document chat/agent → SSE `delta`, `ops`, `done`, `error` |
204
+ | POST | `/api/ai/transcript-cleanup` | `{ segments, model }` → `{ cleaned, failed }` |
205
+ | POST | `/api/ai/transcribe` | `{ documentId, name }` → `{ text }`; 501 without `ai.transcription` |
206
+ | GET | `/api/editor/users?q=` | `@` popup: up to 20 users |
207
+ | GET | `/api/editor/tags?q=` | `#` popup: up to 20 tags in use |
208
+ | GET / PUT | `/api/editor/settings` | Per-user settings (table below) |
209
+ | POST | `/api/editor/assets/:id` | Multipart `file` → `{ url, name }`; 413 above `MAX_MEDIA_BYTES` |
210
+ | GET | `/api/editor/assets/:id/:name` | Serves an asset with its stored `Content-Type`, single byte-range support; 404 when unknown |
211
+ | GET | `/api/editor/themes` | The theme library as `ThemeRecord[]`; 501 when the adapter has no `listThemes` |
212
+ | GET | `/api/editor/themes/:id` | The theme's stylesheet as `text/css`; 400 for a malformed id, 404 when unknown, 501 when the adapter has no `loadTheme` |
213
+ | POST | `/api/editor/themes` | Multipart `css` (file, required), `manifest` (file, optional Obsidian `manifest.json`), `name` (string, optional) → `201` with the new `ThemeRecord` (`builtin: false`). The name is `manifest.name`, else `name`, else the CSS file's base name; the id is its slug (`a-z0-9` and `-`, at most 64 characters), made unique with `-2`, `-3` … against the library. Limits: CSS up to `MAX_THEME_BYTES` (2 MB, `413` „Theme ist größer als 2 MB“), manifest up to 64 KB and parseable by `themeManifestSchema` (`400` „Ungültiges manifest.json“); `400` for a missing or empty `css`, for content that is not UTF-8 text (invalid UTF-8, NUL bytes) and for markup (`<script` or `<?xml` in the first 512 bytes); `501` when the adapter lacks `listThemes` or `storeTheme` |
214
+ | DELETE | `/api/editor/themes/:id` | Deletes an uploaded theme (`204`); `400` for a malformed id, `404` when unknown, `403` „Mitgelieferte Themes können nicht gelöscht werden“ for a builtin, `501` when the adapter lacks `listThemes` or `removeTheme` |
215
+
216
+ The AI routes are rate limited per user (sliding window, in memory, per process): exceeding it answers 429 „Zu viele KI-Anfragen, bitte kurz warten“ with `Retry-After`.
217
+
218
+ `/api/editor/settings`:
219
+
220
+ | Request | Status |
221
+ |---|---|
222
+ | `GET`/`PUT` without a user | 401 |
223
+ | `GET`, adapter has no `loadSettings` | 204 (client stays on `localStorage`) |
224
+ | `GET`, nothing stored | 200 with body `null` (client uploads its local settings) |
225
+ | `GET`, stored | 200, `EditorSettings` normalized by `parseEditorSettings` |
226
+ | `PUT`, adapter has no `storeSettings` | 501 |
227
+ | `PUT`, body is no complete valid `EditorSettings` | 400 |
228
+ | `PUT`, ok | 204 |
229
+
230
+ ### Auth notes
231
+
232
+ - **Websocket authentication (default).** The upgrade to `/collab/:id` always succeeds (HTTP 101). Hocuspocus then authenticates the connection from the upgrade request's headers, so the session cookie authenticates the socket like any same-origin request, and from the client's `token`: clients that cannot send cookies pass `token` to the `collaboration` prop (a string or an async function; it becomes the `HocuspocusProvider` `token`) and `authenticate` receives it as `request.token` next to the headers. A client without a user gets a permission-denied answer and its socket is closed with code 4401 (not an HTTP 401).
233
+ - **Rejecting at the upgrade (`collab.authenticateUpgrade: true`).** The route calls `authenticate({ headers })` (no `token`) before the upgrade; a `null` user answers HTTP 401 and no websocket is opened, otherwise the user is passed to the connection and not authenticated a second time. Use it when every client authenticates by cookie or other request headers; a client that identifies itself only by `collaboration.token` cannot connect then, because the token is only sent after the socket is open. `authorize` still runs per document in both modes.
234
+ - Document-level authorization (who may open which document) is the host's decision: `authenticate` returns the user, and `authorize(user, id)` decides per document on connect (`null` rejects, `{ readOnly: true }` makes the connection read-only). Without `authorize` the websocket route passes any authenticated user to Hocuspocus for any document name.
235
+ - Asset URLs are guarded too; media elements send the session cookie.
236
+
237
+ ## 5. AI configuration and secrets
238
+
239
+ Config key `tiptapEditor`:
240
+
241
+ | Option | Type | Default |
242
+ |---|---|---|
243
+ | `locale` | `'de' \| 'en'`: language of every string the editor renders; passed to the client context plugin (`createEditor({ locale })`) | `'de'` |
244
+ | `messages` | `Partial<Record<MessageKey, string>>`: overrides of single messages by key (JSON-serialisable) | none |
245
+ | `ai.presets` | `Record<string, { label, endpoint, model, apiKey? }>`: server model presets keyed by preset id (camelCase). `endpoint` is any OpenAI-compatible chat-completions base URL. | `sonnet`, `flashLite` (OpenRouter) |
246
+ | `ai.slots` | `Record<'complete' \| 'rewrite' \| 'generate', string>`: default preset per slot. The `complete` model must support assistant prefill. | `{ complete: 'flashLite', rewrite: 'sonnet', generate: 'sonnet' }` |
247
+ | `ai.rateLimit` | `{ max, windowMs }` per user, shared by all AI endpoints | `{ max: 30, windowMs: 60000 }` |
248
+ | `ai.transcription` | `{ endpoint, model, apiKey? }`: OpenAI-compatible `POST <endpoint>/audio/transcriptions` | absent: action hidden, endpoint answers 501 |
249
+ | `collab.authenticateUpgrade` | `boolean`: authenticate the `/collab/:id` upgrade and refuse it with HTTP 401 (see [Auth notes](#auth-notes)); env `NUXT_TIPTAP_EDITOR_COLLAB_AUTHENTICATE_UPGRADE` | `false`: upgrade first, close with 4401 |
250
+
251
+ **Keys come from the environment only.** Never put a key into `nuxt.config.ts` (it ends up in the build output).
252
+
253
+ | Variable | Sets |
254
+ |---|---|
255
+ | `NUXT_TIPTAP_EDITOR_AI_API_KEY` | `ai.apiKey`: shared fallback for every preset without its own key |
256
+ | `NUXT_TIPTAP_EDITOR_AI_PRESETS_<ID>_API_KEY` | `ai.presets.<id>.apiKey`; `<ID>` is the preset id in upper snake case (`flashLite` → `NUXT_TIPTAP_EDITOR_AI_PRESETS_FLASH_LITE_API_KEY`) |
257
+ | `NUXT_TIPTAP_EDITOR_AI_TRANSCRIPTION_API_KEY` | `ai.transcription.apiKey` (only effective when `ai.transcription` is set) |
258
+
259
+ **Host models through the adapter.** An adapter with `languageModel(ref, user)` is asked first for every model reference; a returned model is used as is (no preset, no key needed), `null` falls through to the presets above. `listModels(user)` decides what `GET /api/ai/models` offers (return `null` to list the presets). Host-driven agent chats are the counterpart on the client: `createAgentOpReview({ notify, t })` from `@ecsplico/editor/ai` shows agent edit operations from any transport as in-document hunks (`propose`), follows the user's decisions (`state`, `decide`, `reveal`) and reads them back for the agent (`feedback()` yields each decision once); `createAiSidebarFlow({ send, assistant, notify, editor })` takes the host's `send(question, scope)` instead of a `chat`.
260
+
261
+ A preset resolves its key as `preset.apiKey || ai.apiKey`. A missing key answers 500 naming both variables before any stream starts; an unknown preset id answers 400; upstream failures answer 502.
262
+
263
+ Where the secrets live: `runtimeConfig.tiptapEditor.ai` is server-only. The browser only ever receives `public.tiptapEditor.ai = { slots, transcription: boolean }` and, through `GET /api/ai/models`, preset profiles **without** keys. A user-defined profile (kept in the browser's `localStorage`, key `tiptap-editor:model-profiles`) sends its own key with each request; the server forwards it and never stores it.
264
+
265
+ ## 6. Collaboration on the client
266
+
267
+ Collaboration is a feature, not a mode: the preset contains `collabFeature()`, and the surface is mounted with a session.
268
+
269
+ ```vue
270
+ <script setup lang="ts">
271
+ import { HocuspocusProvider } from '@hocuspocus/provider'
272
+ import { collabFeature } from '@ecsplico/editor/collab/vue'
273
+ import { coreFeature, defineEditor } from '@ecsplico/editor/core'
274
+ import { EditorSurface } from '@ecsplico/editor/vue'
275
+ import * as Y from 'yjs'
276
+
277
+ const preset = defineEditor({ features: [coreFeature(), collabFeature()] })
278
+ const ydoc = new Y.Doc()
279
+ const provider = new HocuspocusProvider({
280
+ url: `${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}/collab/${id}`,
281
+ name: id,
282
+ document: ydoc,
283
+ })
284
+ onBeforeUnmount(() => provider.destroy())
285
+ </script>
286
+
287
+ <template>
288
+ <EditorSurface :preset="preset" :collaboration="{ ydoc, provider, user: { id: 'u1', name: 'Ada', color: '#3b82f6' } }" />
289
+ </template>
290
+ ```
291
+
292
+ React is the same with `@ecsplico/editor/collab/react` and the React `EditorSurface`; the Y.Doc and provider are created once per document id and destroyed in an effect cleanup:
293
+
294
+ ```tsx
295
+ import { HocuspocusProvider } from '@hocuspocus/provider'
296
+ import { collabFeature } from '@ecsplico/editor/collab/react'
297
+ import { coreFeature, defineEditor } from '@ecsplico/editor/core'
298
+ import { EditorSurface } from '@ecsplico/editor/react'
299
+ import { useEffect, useMemo, useState } from 'react'
300
+ import * as Y from 'yjs'
301
+
302
+ const preset = defineEditor({ features: [coreFeature(), collabFeature()] })
303
+
304
+ function CollaborativeEditor({ id }: { id: string }) {
305
+ const [session, setSession] = useState<{ ydoc: Y.Doc, provider: HocuspocusProvider } | null>(null)
306
+ useEffect(() => {
307
+ const ydoc = new Y.Doc()
308
+ const provider = new HocuspocusProvider({ url: `${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}/collab/${id}`, name: id, document: ydoc })
309
+ setSession({ ydoc, provider })
310
+ return () => { provider.destroy(); setSession(null) }
311
+ }, [id])
312
+ const collaboration = useMemo(() => session && { ...session, user: { id: 'u1', name: 'Ada', color: '#3b82f6' } }, [session])
313
+ return collaboration ? <EditorSurface key={id} preset={preset} collaboration={collaboration} /> : null
314
+ }
315
+ ```
316
+
317
+ - The Y.Doc is the document: there is no `v-model`. Core turns its own undo history off; the Collaboration extension brings a **per-client** undo/redo (`Mod-z`, `Mod-y`, `Shift-Mod-z`), so undo never reverts another user's edits.
318
+ - `provider` adds remote carets (`CollaborationCaret`, labelled with `user`); without it the Y.Doc is edited locally only. `user` is an `AuthorIdentity` (`{ id, name, color }`, the app's stable user id): the optional `authors` and `comments` features attribute text and comments to it, see [Authors and comments](#authors-and-comments).
319
+ - Without a `collaboration` prop `collabFeature()` contributes no extension: the editor behaves like a standalone one with JSON `v-model`.
320
+ - Supplying `collaboration` to a preset **without** `collabFeature()` is a setup error: the surface throws „`collaboration` needs a preset with the collaboration feature“.
321
+ - The mode is fixed at mount. Remount (change `key`) when the document changes, so Y.Doc, provider and editor never bleed between documents.
322
+ - Include `@ecsplico/editor/styles/collab.css` (the Nuxt module adds it) for the caret styles.
323
+
324
+ ### Authors and comments
325
+
326
+ Two optional features build on the session's `user`; the advanced editor contains both.
327
+
328
+ - `authorsFeature()` marks every text run the user inserts with an `author` mark (`{ id, name, color }`; one author per run, remote changes and Yjs undo/redo keep the original author's mark). Without `collaboration.user` it attributes nothing, so standalone editors write unmarked text. Colouring is a per-user preference (`editing.authorColors`, `editing.authorColorStyle`).
329
+ - `commentsFeature()` (requires `collab`) stores comment threads in the Y.Doc, in a `Y.Map` named `comments`; the commented range is a `comment` mark. Threads therefore sync live and persist with the document, but they are **not** part of the JSON/Markdown adapter content. Without a Y.Doc and a `collaboration.user` the UI says „Kommentare gibt es nur in gemeinsam bearbeiteten Dokumenten.“ and nothing can be written.
330
+ - Both marks are in `advancedSchemaExtensions()`, so the server's Yjs↔JSON conversion keeps them. They have no Markdown form: Markdown export, imports and the AI context ignore them (`DocumentMarkdown`).
331
+ - Surface contract: `v-model:comments-open` (Vue `EditorSurface`/`AdvancedEditor`) or `commentsOpen`/`onCommentsOpenChange` (React) is the open state of the margin column, which the host renders with `CommentsMargin` inside the editor's scroll container; `useEditorUi().toggleComments()` and `Mod-Shift-m` toggle it, and it excludes the AI sidebar.
332
+
333
+ ### Positions that survive concurrent edits
334
+
335
+ `collabFeature()` supplies `DocAnchors` with `yjsAnchorResolver`: ranges captured through `captureRange` (AI reviews, ghost text, chat ops, the selection menu) are stored as Yjs relative positions and re-resolved after every remote change and undo/redo. Without the collab feature anchors map through local transactions only.
336
+
337
+ The resolver binds to the Yjs types of the editor's own Y.Doc. The package pins one `yjs` instance as a peer dependency: install a single copy in the host, or Yjs warns „already imported“ and `instanceof` checks fail.
338
+
339
+ ### Matching schemas: who owns the document
340
+
341
+ The Yjs document is only valid if every participant uses the same schema.
342
+
343
+ - The **server** builds `collabSchema()` from `advancedSchemaExtensions()` plus the adapter's `schemaExtensions()` (the package's collab route) and migrates and validates seeded content with it.
344
+ - The **client** must mount a preset with the same schema: `advancedEditor()`/`AdvancedEditor`, or your own preset whose features contribute the same nodes and marks (media, transcript, composites, mentions, authors and comments marks, block IDs). Custom `compositeKinds` are storage, not schema, so they may differ per client.
345
+ - The host owns the *document lifecycle*: create the `Y.Doc` and the `HocuspocusProvider` when the page mounts, destroy the provider on unmount (`onBeforeUnmount(() => provider.destroy())`), and call `forgetCollabDocument(id)` on the server before deleting a document (see [§3](#deleting-a-document)). The library never creates a provider for you.
346
+ - A plain-Vue or React app brings its own Hocuspocus server, builds its schema from `/schema/advanced` and sets the Collaboration `field` to `default`. A host block of your own (see the [extending guide](./extending.md#collaboration-and-the-server-schema)) belongs to that schema too: return its framework-free node from the adapter's `schemaExtensions()` (`schemaExtensions: () => [YourNode]`), which the package's collab route appends to `advancedSchemaExtensions()`; a custom server builds `getSchema([...advancedSchemaExtensions(), YourNode])` itself.
347
+
348
+ ## 7. Block UI (drag handle, hover actions)
349
+
350
+ ```ts
351
+ import { blockUiFeature } from '@ecsplico/editor/block-ui/vue' // or '@ecsplico/editor/block-ui/react'
352
+ const preset = defineEditor({ features: [coreFeature(), blockUiFeature()] })
353
+ ```
354
+
355
+ `blockUiFeature()` adds the drag handle on the hovered block's left, hover targeting, the `BlockActionsOverlay` (the features' and the host's block actions) on the block's top line at the editor's right edge, and block-range selection (`Mod`+drag, `Shift`+`↑`/`↓`). It is opt-in: the simple editor never includes it. The drag handle's upstream package imports `@tiptap/extension-collaboration` and `y-tiptap`, so a preset with block UI bundles that support code even without a live session.
356
+
357
+ Which blocks have which handle follows the settings and the block:
358
+
359
+ - **Blocks with a kind icon** (composites, see [Composites](./usage.md#chips-and-details-popover)) have no standard handle: their icon is the handle. Dragging it selects the composite and moves it like the standard handle does; a click without movement opens the details popover.
360
+ - **`blocks.dragHandle: 'hover'`** (default): one handle follows the hovered block.
361
+ - **`blocks.dragHandle: 'always'`**: the hover handle is replaced by one permanent handle per eligible block, each at the position the hover handle would take for that block (right edge on the block's left edge, centred on its first text line; list items left of their bullet). Eligible are the blocks the hover handle can target at any depth: paragraphs, headings, lists' items, quotes, code blocks, media, tables and the blocks inside quotes, list items and table cells. Not eligible: composite chrome (title, description, tags), table rows and cells themselves, list wrappers, the first block of a list item (the item has the handle), and blocks with a kind icon. A nested block whose handle would cover its container's handle on the same line (the first block of a quote) has none; the container's handle moves it. Only blocks within one screen of the viewport render a handle. Both modes are hidden while the editor is read-only.
362
+
363
+ `startBlockDrag(editor, event, pos)` (`@ecsplico/editor/core`) starts such a drag from any element outside the editor's DOM: call it from the element's `dragstart`.
364
+
365
+ ## 8. Vue-free advanced schema for servers
366
+
367
+ ```ts
368
+ import { getSchema } from '@tiptap/core'
369
+ import { advancedSchemaExtensions } from '@ecsplico/editor/schema/advanced'
370
+
371
+ const schema = getSchema(advancedSchemaExtensions())
372
+ schema.nodeFromJSON(stored).check() // validate stored documents, run migrations, convert Yjs ↔ ProseMirror
373
+ ```
374
+
375
+ `advancedSchemaExtensions()` is the node/mark set of the advanced editor in the exact order the browser editor uses: StarterKit (history off), `StrikeX`, media, transcript segment, composite family, mention/tag, the `author` and `comment` marks, `BlockId` and the node flags. It imports no Vue, React, Nuxt UI or browser globals and runs under plain Node; `bun run check:editor-entries` bundles it for Node and executes it, and compares the node/mark names, attributes and content expressions against a snapshot. Use `@ecsplico/editor/schema/simple` for servers that only handle simple documents.
376
+
377
+ The package's collab server builds `collabSchema()` from this entry plus the adapter's `schemaExtensions()` (`src/server/collab.ts`, `createCollabServer`); a custom Hocuspocus server (e.g. for a plain-Vue or React app) does the same and sets the Collaboration `field` to `default`.
378
+
379
+ ## 9. Production
380
+
381
+ ```sh
382
+ bun run build # nuxt build
383
+ PORT=3200 node .output/server/index.mjs
384
+ ```
385
+
386
+ - The module compiles the package source into the Nitro bundle (`externals.inline`) and enables `experimental.websocket` for the `/collab/:id` route. Verified with `node .output/server/index.mjs`: unauthenticated `GET /api/editor/settings` → 401, authenticated → 200; an unauthenticated websocket upgrade to `/collab/:id` gets 101 and is closed with 4401 (with `collab.authenticateUpgrade: true`: HTTP 401 at the upgrade), an authenticated provider syncs the document in both modes.
387
+ - Secrets and the session password are runtime environment variables of the server process (`NUXT_SESSION_PASSWORD` for `nuxt-auth-utils`, the `NUXT_TIPTAP_EDITOR_AI_*` keys above), not build-time values.
388
+ - Persistent data (documents, Yjs state, assets, settings) lives wherever the host's adapter puts it; Nitro storage mounts used by the adapter must be configured for production (`nitro.storage` with a real driver on read-only deployments).
389
+ - The shutdown plugin (`plugins/collab.ts`) flushes pending debounced Yjs stores from Nitro's `close` hook.
390
+
391
+ ## 10. The file browser and `DocumentStore`
392
+
393
+ `DocumentTree` (`@ecsplico/editor/tree/vue` or `@ecsplico/editor/tree/react`) is the file drawer: a „Dokumente“ root with folders and documents, create/rename/move/delete, drag and drop, kind filters per item, and the open document's outline (headings of a simple document, or the composites tree in the preferred structure) listed under it. It knows nothing about routing, HTTP or toasts of the host: the host passes a `DocumentStore`. The store contract, the types and the view-state model live in the framework-free `@ecsplico/editor/tree`; the two components are thin renderings of the same model. The tree's own messages (delete with undo) are notices: Vue needs `<UApp>`, React needs `EditorContextProvider` and a mounted `Toaster`.
394
+
395
+ ```vue
396
+ <script setup lang="ts">
397
+ import { DocumentTree } from '@ecsplico/editor/tree/vue'
398
+
399
+ const selectedFolder = defineModel<string>('selectedFolder', { default: '' })
400
+ const store = useDocumentStore() // host: see app/composables/useDocumentStore.ts
401
+ const editor = useActiveEditor() // host: the open page's editor, or undefined
402
+ </script>
403
+
404
+ <template>
405
+ <DocumentTree v-model:selected-folder="selectedFolder" :store="store" :editor="editor">
406
+ <template #document-actions="{ id, title }"><!-- host buttons next to a document's delete button --></template>
407
+ </DocumentTree>
408
+ </template>
409
+ ```
410
+
411
+ Vue props: `store` (required) and `editor` (`Editor | undefined`, required). `v-model:selectedFolder` is the folder (path, `''` = root) that new documents, new folders and host import actions go to; the tree resets it to `''` when that folder is deleted or moved away. The slot `document-actions` receives `{ id, title }`. The runnable adapter is [`app/components/AppDocumentTree.vue`](../../../app/components/AppDocumentTree.vue); the layout holds `selectedFolder` and binds it with `v-model:selected-folder`.
412
+
413
+ React, same behaviour, props instead of model and slot:
414
+
415
+ ```tsx
416
+ import { DocumentTree } from '@ecsplico/editor/tree/react'
417
+
418
+ const [selectedFolder, setSelectedFolder] = useState('')
419
+
420
+ <DocumentTree
421
+ store={store}
422
+ editor={editor}
423
+ selectedFolder={selectedFolder}
424
+ onSelectedFolderChange={setSelectedFolder}
425
+ documentActions={doc => <button type="button">{/* host buttons next to a document's delete button, for doc.id / doc.title */}</button>}
426
+ />
427
+ ```
428
+
429
+ `store` and `editor` are required (`editor` may be `undefined`); `selectedFolder`/`onSelectedFolderChange` are optional (the tree keeps the folder itself when `selectedFolder` is omitted); `documentActions` is a render function receiving `{ id, title }`; `className` styles the root. The runnable adapter of a `DocumentStore` over the host's `/api` is `examples/react-advanced/src/App.tsx`.
430
+
431
+ ### `DocumentStore`
432
+
433
+ ```ts
434
+ interface DocumentStore {
435
+ tree: ReadonlyStore<TreeFolder | null | undefined> // undefined = loading, null = loading failed
436
+ documents: ReadonlyStore<readonly DocumentSummary[] | undefined> // undefined = loading
437
+ activeId: ReadonlyStore<string | undefined>
438
+ open(id: string): Promise<void>
439
+ create(title?: string, folder?: string): Promise<{ id: string }>
440
+ move(id: string, folder: string): Promise<void>
441
+ remove(id: string, folder: string): Promise<{ title: string, restore: () => Promise<{ id: string }> }>
442
+ createFolder(path: string): Promise<void>
443
+ moveFolder(path: string, to: string): Promise<void> // `to` is the complete new path: moves and renames
444
+ removeFolder(path: string): Promise<void>
445
+ validateName(name: string, siblings: readonly string[]): string | null
446
+ }
447
+ ```
448
+
449
+ The observable values are `ReadonlyStore`s (`createStore` from `@ecsplico/editor/core`), so the same store drives both components. A Vue host that keeps refs adapts them with `storeFromRef(ref)` and `useStoreRef(storeOrGetter)` from `@ecsplico/editor/vue`; a React host holds its data in its own state or data layer and publishes it with `createStore`.
450
+
451
+ `TreeFolder` is `{ type: 'folder', name, path, folders, documents }` (the root is named „Dokumente“, `path` is `''`), `DocumentSummary` is `{ id, title, updatedAt, folder }`; both are exported from `/tree`. A server that builds the `/api/tree` response imports the same types from `@ecsplico/editor/tree/types` (the `/tree` entry also carries the store and the view model, which a server's typecheck should not pull in); this repository's `server/utils/documents.ts` does.
452
+
453
+ Semantics every implementation must keep:
454
+
455
+ - **Failure ownership.** The host reports failures (its toast, its wording) and then *rejects*. `DocumentTree` shows no second message; it only stops the flow it was running (for example it keeps the folder-name input open or does not expand a folder).
456
+ - **Refresh.** Every mutation resolves only after both `tree` and `documents` show its result, so the tree can select and expand the new item right away.
457
+ - **Loading.** While `tree` is `undefined` the tree shows „Lädt...“, for `null` „Dokumente konnten nicht geladen werden“; the virtual root (below) is not affected by either.
458
+ - **`create`** returns the new document's ID. Omitted title and folder mean the host's default title and the root.
459
+ - **`remove` with undo.** The tree shows the notification „Dokument gelöscht“ (description: the title) with a „Rückgängig“ action built from the resolved value. The implementation must (1) leave the document first when it is the open one and wait for its page to be torn down, so the collaboration provider is destroyed before the server forgets the document, (2) snapshot title and content, (3) delete, and (4) return `restore`, which creates a **new** document (new ID) with the old title in `folder` and writes the JSON content back. Assets, IDs and collaboration history are not restored; the tree opens the restored document by its new ID. If `restore` rejects, the host has already reported it.
460
+ - **Folders.** Paths are `/`-joined segments. `removeFolder` must reject for a non-empty folder (the host's server says „Ordner ist nicht leer“); the tree itself refuses to drop a folder onto itself or a descendant and never calls `moveFolder` for it. A selected folder that no longer exists falls back to the root.
461
+ - **`validateName(name, siblings)`** returns a German error message or `null`; `siblings` are the names already taken in the target folder. The tree shows the message inline under the input (on create and rename) and only submits valid names. The host passes its server's rules (here `fileNameError` from `shared/utils/file-name.ts`) so client and server never disagree.
462
+ - **`open(id)`** navigates the host to the document; `activeId` follows the host's route.
463
+
464
+ ### Filters, virtual root, outline
465
+
466
+ - Filters hide kinds below a tree item (per item key); they persist in `localStorage` under `tip-tree:node-filters`. The view state is a framework-free model: `createTreeView()` builds one (`nodeFilters`, `expanded`, `expand`, `setKindHidden`, `clearFilter`, `clearAllFilters`, `followFolderMove`), `treeView(context)` returns the one of an `EditorContext`'s app, and `useTreeView()` (`/tree/vue`: `nodeFilters` and `expanded` as refs; `/tree/react`: as plain values that re-render the component) reads it, so several trees of one app share it (see [§11](#11-settings-persistence-and-app-lifetime)).
467
+ - The settings value `blocks.treeRoot` is `'folders'` (default: folders with their documents, the open document is an entry among them) or `'file'`. With `'file'`, an open document in composite structure (`blocks.structure === 'composite'`) is the *virtual root* of the tree: its composites are the nested items and dragging one moves the block (`moveBlockInto`). With no open document or the headings structure the tree shows the folders instead. Switching it in the settings panel re-roots the tree immediately.
468
+ - The outline of the open document is read from `editor` (composites in composite structure, headings otherwise) and refreshed, debounced, on `update`. `DocumentTree` re-subscribes when the `editor` prop changes and removes its listener when the editor changes or the tree unmounts, so switching documents never leaves a stale listener on the previous editor.
469
+
470
+ ### Not in the library
471
+
472
+ Storage, routing, authentication, toasts, and the host's own file formats. In this repository the `.cdoc` (package) export stays in the host: the document row's export link comes in through `document-actions` (`app/components/AppDocumentTree.vue`).
473
+
474
+ ## 11. Settings persistence and app lifetime
475
+
476
+ - **One settings object per app.** `app.use(createEditor())` (`createEditor` from `@ecsplico/editor/vue`; the Nuxt module does it in a client plugin) provides the context; it wraps the framework-free `createEditorContext()` from `/core`, whose `settings` is a store (`get`, `set`, `update`, `subscribe`). The settings are one versioned JSON object (`EditorSettings`, version 1) that every editor, panel and tree of the app shares. A simple editor and a preset without a feature never prune the settings of features it does not install; unknown-to-this-bundle values stay in the stored JSON. `createEditor()` defaults the app's notifier to a queued Vue notifier; pass `notify` to replace it.
477
+ - **React.** `<EditorContextProvider context={createEditorContext({ notify: reactNotifier })}>` (`EditorContextProvider`, `reactNotifier` and `Toaster` from `@ecsplico/editor/react`, `createEditorContext` from `/core`) provides the same context to a React tree. The host creates it and owns it: the provider never disposes it, call `context.dispose()` when it outlives the app. `useEditorSettings()` returns `{ settings, update, set, ready, synced }`. Without `notify` the context drops app-level notices (`silentNotifier`).
478
+ - **Local storage.** The settings are read from `localStorage` (`tiptap-editor:settings`) at install time and written back on every change; unreadable or blocked storage falls back to the defaults for the session.
479
+ - **Account settings (Nuxt).** The Nuxt plugin installs `createEditor({ settings: { remote: true } })`. On the first `useEditorSettings()` the client asks `GET /api/editor/settings` (only once an editor-side component needs the settings, not at install time): `200` replaces the local values (`synced`), `204` (the adapter keeps none) and `401`/network errors keep the local ones; an account without stored settings uploads this browser's. Afterwards every change is sent with a debounced `PUT` (500 ms). The status codes are listed in [§4](#4-server-routes-and-authentication). A plain-Vue or React app passes `{ settings: { remote: true } }` to `createEditor()` / `createEditorContext()` only when its server implements the same two endpoints (`examples/react-advanced` reaches the Nuxt host's through its proxy), otherwise it stays local.
480
+ - **View state of the tree.** The tree's filters and expanded keys are the framework-free `TreeViewModel` of the app's context (`treeView(context)`); `useTreeView()` of `/tree/vue` and `/tree/react` returns them. Filters persist (`tip-tree:node-filters`), expansion lasts for the session. The model belongs to the app context (cached per context, nothing is global to the process), and a model that is dropped takes its subscription with it.
481
+
482
+ ## 12. Migrating from `#tiptap-editor`
483
+
484
+ The former Nuxt module `modules/tiptap-editor` (alias `#tiptap-editor`, auto-imported components, composables and utils, one server directory) is gone. Nothing is auto-imported and no alias remains: import from the entries below.
485
+
486
+ 1. `nuxt.config.ts`: replace `'./modules/tiptap-editor'` with `'@ecsplico/editor/nuxt'` (after `'@nuxt/ui'`). The `tiptapEditor` options keep their shape and defaults. Add `"@ecsplico/editor": "workspace:*"` to the host's dependencies.
487
+ 2. Replace auto-imported components and composables by explicit imports:
488
+
489
+ | Before (auto-import or `#tiptap-editor`) | After |
490
+ |---|---|
491
+ | `DocumentEditor` | `AdvancedEditor` from `@ecsplico/editor/vue/advanced` (same props and events; plus `settings-ui`, see the [usage guide](./usage.md)); on React `@ecsplico/editor/react/advanced` |
492
+ | `EditorToolbar`, `EditorSettingsModal`, `useEditorSettings`, `useEditorUi`, `useEditorContext` | `@ecsplico/editor/vue` (the toolbar takes `:editor`, the panel `:preset`) |
493
+ | `AiSidebar`, `AiReviewBar`, `AiSelectionMenu`, `ModelQuickSwitch`, `useAiAssistant`, `useDocumentChat`, `useModelProfiles` | `@ecsplico/editor/ai/vue` (`/ai/react` on React; the framework-free models `modelProfiles`, `createAiAssistant`, `createDocumentChat` in `@ecsplico/editor/ai`) |
494
+ | `useFileImport`, `AudioRecorderModal`, `useAudioRecorder`, `pickFiles` | `@ecsplico/editor/media/vue` (`/media/react` on React); `pickFiles` and the framework-free models in `@ecsplico/editor/media` |
495
+ | `createTranscriptCleanup`, `hasTranscriptSegments` | `@ecsplico/editor/integrations/transcript-ai` |
496
+ | `defaultCompositeKinds(t)`, `CompositeKind`, `headingsMarkdown`, `compositeOutline`, `moveBlockInto`, `compositeJSON`, markdown fence helpers, `CompositeTable`, `CompositeInspector`, `useCompositeRows`, `setComposite*` writers | `@ecsplico/editor/composites` (framework-free), `/composites/vue` or `/composites/react` for the components and `useCompositeRows` (schema subset: `/composites/schema`) |
497
+ | `headingOutline`, `revealBlockInEditor` (framework-free), `EditorOutline` (`/outline/vue`, `/outline/react`) | `@ecsplico/editor/outline` |
498
+ | `EMPTY_EDITOR_CONTENT`, `ABILITY`, `Ability`, `findBlockById`, block ID helpers | `@ecsplico/editor/core/schema` |
499
+ | `fetchErrorMessage`, `downloadText`, abilities helpers (`abilitiesAtSelection`, `hasAbility`) | `@ecsplico/editor/core` |
500
+ | `DocumentTree`, `useTreeView`, `TreeFolder`, `DocumentSummary` (were host files and host shared types) | `DocumentTree`, `useTreeView` from `@ecsplico/editor/tree/vue` (or `/tree/react`); `DocumentStore`, `TreeFolder`, `DocumentSummary` from `@ecsplico/editor/tree` (the host's `DocumentStore` implementation stays in the app; the host's ref-based store becomes stores with `storeFromRef` from `@ecsplico/editor/vue`) |
501
+ | `setEditorAdapter`, `forgetCollabDocument`, `liveContent`, `EditorAdapter` (Nitro, previously auto-imported) | `@ecsplico/editor/server` |
502
+ | Server schema / migration imports of the old shared directory | `@ecsplico/editor/schema/advanced`, `/composites/schema`, `/media/schema`, … |
503
+
504
+ 3. Collaboration, block UI and the integrations are now features. `AdvancedEditor` includes them; a custom preset adds `collabFeature()`, `blockUiFeature()` and the integrations explicitly. Features report user-facing messages through the surface's `Notifier` (`ctx.notify`, [§1](#per-feature-entries-framework-free-vue-react)), so host code no longer hands toast objects to feature functions.
505
+ 4. Search the host for `#tiptap-editor`, `modules/tiptap-editor` and for symbols that used to resolve without an import (`useEditorSettings`, `useFileImport`, `ABILITY`, `fileNameError`'s neighbors…); `nuxt typecheck` reports every unresolved one.
506
+ 5. Styles: the Nuxt module adds every feature stylesheet; a plain-Vue app imports `core.css` plus the feature CSS it uses ([README](../README.md#css-and-ui-provider-requirements)).
507
+
508
+ Stored data needs no migration: document JSON, Yjs state, `tiptap-editor:settings`, `tiptap-editor:model-profiles` and `tip-tree:node-filters` keep their keys and shapes. Legacy `section` nodes are still migrated on load (`migrateLegacyContent`).
509
+
510
+ ## 13. Dependency rules and bundle proof
511
+
512
+ Imports inside `packages/editor/src` follow one direction; the entry checks enforce them on the emitted bundles.
513
+
514
+ | Layer | May import | Must not import |
515
+ |---|---|---|
516
+ | `core`, `settings` | each other, external packages other than `vue`, `@tiptap/vue-3`, `@nuxt/ui`, `react`, `sonner` | those, `vue/`, `react/`, any feature, integration, `outline`, `tree`, preset, `nuxt`, `server` |
517
+ | `vue` (`src/vue`: `EditorSurface`, `EditorToolbar`, settings components, `createEditor`, `useEditorUi`, `vueSuggestionRenderer`, the queued notifier; `SimpleEditor`/`AdvancedEditor` also the preset they mount) | `core`, `settings`, Vue, `@tiptap/vue-3`, Nuxt UI | `react`, `nuxt`, `server` |
518
+ | `react` (`src/react`: `EditorSurface`, `EditorToolbar`, settings components, `EditorContextProvider`, `reactSuggestionRenderer`, `reactNotifier`, vendored shadcn primitives in `ui/`; `SimpleEditor`/`AdvancedEditor` also the preset they mount) | `core`, `settings`, React, `@tiptap/react`, Radix, sonner, `@iconify/react`, framework-free features and presets | `vue`, `@tiptap/vue-3`, Nuxt UI, `nuxt`, `server` |
519
+ | `outline`, `outline/vue`, `outline/react` | `core` (and its layer) | `tree`, composites, any feature |
520
+ | features (`media`, `mentions`, `transcript`, `authors`, `comments`, `composites`, `ai`, `collab`, `block-ui`, `themes`): `features/<x>/{index,feature,model…}.ts` | `core`, `settings`, their own `schema`/`protocol`; no UI framework | another feature (by implementation), integrations, `tree`, `vue`, `react`, `nuxt`, `server` |
521
+ | feature bindings (`features/<x>/vue.ts` + `vue/` components, `features/<x>/react.ts` + `react/` components) | the feature's framework-free files, `core`, `settings`, and that framework's layer (`vue` or `react`) | the other framework, other features' implementations, `nuxt`, `server` |
522
+ | integrations | the features they connect (framework-free feature entries, or only their schema) | other integrations' internals, a UI framework, `nuxt`, `server` |
523
+ | `tree` (`index`, `tree-view-model`, `store`; `vue.ts`; `react.ts`) | `core`, `outline`, `composites`, `media` (the bindings also their framework's layer) | AI, collab, transcript, mentions, block-ui, integrations; the other framework |
524
+ | presets (`presets/advanced` framework-free; `vue/advanced-preset.ts`, `react/advanced-preset.ts` bind it) | everything they compose | `nuxt`, `server` |
525
+ | `nuxt`, `server` | Nitro/Nuxt, framework-free schema entries | browser components |
526
+
527
+ Simple and advanced bundles are separate: the `simple` bundle contains no feature implementation, integration, tree, AI SDK, Yjs, y-tiptap, Hocuspocus, Nuxt or server module; a feature fixture contains core, settings and that feature only. The `core-headless` fixture builds an editor from `/core` alone (`createEditorContext`, `coreFeature()`, `mentionsFeature()`) and fails on any `vue`, `@vue`, `@tiptap/vue-3`, `@nuxt/ui` or `react` module; the `headless-<x>` fixtures do the same for the framework-free entry of each feature, integration and the tree.
528
+
529
+ The React fixtures (`react-simple`, `<x>-react`, `tree-react`, `outline-react`, `advanced-react`) mount their React binding with its toolbar and fail on any `vue`, `@vue`, `@tiptap/vue-3`, `@nuxt/ui`, `src/vue` or `.vue` module; the Vue fixtures fail on `react-dom`, `sonner` and `src/react`. `advanced-react` mounts the complete `AdvancedEditor` (`/react/advanced`) and requires every feature and integration binding, so no `.vue` file can slip into the React bundle unnoticed.
530
+
531
+ ```sh
532
+ bun run typecheck:editor # vue-tsc over packages/editor (no Nuxt globals; catches imports a plain Vue app cannot resolve)
533
+ bun run check:editor-entries # one production Vite build per fixture + Node bundle of /schema/advanced
534
+ bun run check:editor-composition
535
+ ```
536
+
537
+ `check:editor-entries` collects the module IDs of every emitted chunk (including dynamic ones) and fails on a forbidden module, on a source module outside the fixture's allow-list, or on a missing required module. To check your own composition, add `packages/editor/checks/fixtures/<name>/` (an `index.html` plus `main.ts`/`main.tsx` that mounts the surface with its toolbar, so unused factories cannot be tree-shaken away) and one `FIXTURES` entry with `forbid`, `require` and `allowSource` patterns (and `plugins: 'react'` for a React fixture) in `packages/editor/checks/entries.ts`. Fixtures exist for `simple`, each feature (Vue, `-react` and `headless-` variants), each integration, `tree`, `tree-react`, `headless-tree`, `advanced`, `advanced-react`, the headless core (`core-headless`), the React simple editor (`react-simple`) and the Node schema.