@ecsplico/editor 0.0.0-stage → 1.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 (1286) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +233 -2
  3. package/dist/code/CodeSurface.d.ts +24 -0
  4. package/dist/code/CodeSurface.js +57 -0
  5. package/dist/code/CodeSurface.js.map +1 -0
  6. package/dist/code/CodeSurface.vue.d.ts +29 -0
  7. package/dist/code/CodeSurface2.js +75 -0
  8. package/dist/code/CodeSurface2.js.map +1 -0
  9. package/dist/code/chrome-theme.js +76 -0
  10. package/dist/code/chrome-theme.js.map +1 -0
  11. package/dist/code/compartments.js +19 -0
  12. package/dist/code/compartments.js.map +1 -0
  13. package/dist/code/editor-factory.d.ts +41 -0
  14. package/dist/code/editor-factory.js +126 -0
  15. package/dist/code/editor-factory.js.map +1 -0
  16. package/dist/code/format-json.d.ts +27 -0
  17. package/dist/code/format-json.js +94 -0
  18. package/dist/code/format-json.js.map +1 -0
  19. package/dist/code/highlight-style.js +118 -0
  20. package/dist/code/highlight-style.js.map +1 -0
  21. package/dist/code/index.d.ts +6 -0
  22. package/dist/code/index.js +6 -0
  23. package/dist/code/jsonl-language.d.ts +6 -0
  24. package/dist/code/jsonl-language.js +33 -0
  25. package/dist/code/jsonl-language.js.map +1 -0
  26. package/dist/code/kind.d.ts +15 -0
  27. package/dist/code/kind.js +142 -0
  28. package/dist/code/kind.js.map +1 -0
  29. package/dist/code/lang-registry.d.ts +31 -0
  30. package/dist/code/lang-registry.js +54 -0
  31. package/dist/code/lang-registry.js.map +1 -0
  32. package/dist/code/react.d.ts +2 -0
  33. package/dist/code/react.js +1 -0
  34. package/dist/code/vue.d.ts +2 -0
  35. package/dist/code/vue.js +1 -0
  36. package/dist/core/abilities.d.ts +32 -0
  37. package/dist/core/abilities.js +160 -0
  38. package/dist/core/abilities.js.map +1 -0
  39. package/dist/core/block-convert.d.ts +59 -0
  40. package/dist/core/block-convert.js +164 -0
  41. package/dist/core/block-convert.js.map +1 -0
  42. package/dist/core/block-drag.d.ts +12 -0
  43. package/dist/core/block-drag.js +62 -0
  44. package/dist/core/block-drag.js.map +1 -0
  45. package/dist/core/block-flash.d.ts +19 -0
  46. package/dist/core/block-flash.js +66 -0
  47. package/dist/core/block-flash.js.map +1 -0
  48. package/dist/core/context.d.ts +63 -0
  49. package/dist/core/context.js +108 -0
  50. package/dist/core/context.js.map +1 -0
  51. package/dist/core/convert.d.ts +96 -0
  52. package/dist/core/convert.js +241 -0
  53. package/dist/core/convert.js.map +1 -0
  54. package/dist/core/core-feature.d.ts +17 -0
  55. package/dist/core/core-feature.js +100 -0
  56. package/dist/core/core-feature.js.map +1 -0
  57. package/dist/core/define-editor.d.ts +23 -0
  58. package/dist/core/define-editor.js +110 -0
  59. package/dist/core/define-editor.js.map +1 -0
  60. package/dist/core/doc-anchors.d.ts +67 -0
  61. package/dist/core/doc-anchors.js +112 -0
  62. package/dist/core/doc-anchors.js.map +1 -0
  63. package/dist/core/document-markdown.d.ts +13 -0
  64. package/dist/core/document-markdown.js +31 -0
  65. package/dist/core/document-markdown.js.map +1 -0
  66. package/dist/core/download.d.ts +5 -0
  67. package/dist/core/download.js +16 -0
  68. package/dist/core/download.js.map +1 -0
  69. package/dist/core/editor-ui.d.ts +45 -0
  70. package/dist/core/editor-ui.js +38 -0
  71. package/dist/core/editor-ui.js.map +1 -0
  72. package/dist/core/extension-points.d.ts +64 -0
  73. package/dist/core/feature-context.d.ts +32 -0
  74. package/dist/core/feature-context.js +46 -0
  75. package/dist/core/feature-context.js.map +1 -0
  76. package/dist/core/feature.d.ts +234 -0
  77. package/dist/core/feature.js +13 -0
  78. package/dist/core/feature.js.map +1 -0
  79. package/dist/core/fences.d.ts +16 -0
  80. package/dist/core/fences.js +105 -0
  81. package/dist/core/fences.js.map +1 -0
  82. package/dist/core/fetch-error.d.ts +5 -0
  83. package/dist/core/fetch-error.js +11 -0
  84. package/dist/core/fetch-error.js.map +1 -0
  85. package/dist/core/index.d.ts +28 -0
  86. package/dist/core/index.js +27 -0
  87. package/dist/core/metadata-types.d.ts +27 -0
  88. package/dist/core/metadata-types.js +10 -0
  89. package/dist/core/metadata-types.js.map +1 -0
  90. package/dist/core/metadata.d.ts +39 -0
  91. package/dist/core/metadata.js +76 -0
  92. package/dist/core/metadata.js.map +1 -0
  93. package/dist/core/notify.d.ts +31 -0
  94. package/dist/core/notify.js +7 -0
  95. package/dist/core/notify.js.map +1 -0
  96. package/dist/core/pipeline.d.ts +52 -0
  97. package/dist/core/pipeline.js +78 -0
  98. package/dist/core/pipeline.js.map +1 -0
  99. package/dist/core/schema/abilities.d.ts +55 -0
  100. package/dist/core/schema/abilities.js +113 -0
  101. package/dist/core/schema/abilities.js.map +1 -0
  102. package/dist/core/schema/block-ids.d.ts +29 -0
  103. package/dist/core/schema/block-ids.js +134 -0
  104. package/dist/core/schema/block-ids.js.map +1 -0
  105. package/dist/core/schema/hex-color.d.ts +5 -0
  106. package/dist/core/schema/hex-color.js +7 -0
  107. package/dist/core/schema/hex-color.js.map +1 -0
  108. package/dist/core/schema/index.d.ts +21 -0
  109. package/dist/core/schema/index.js +33 -0
  110. package/dist/core/schema/index.js.map +1 -0
  111. package/dist/core/schema/mark-flags.d.ts +12 -0
  112. package/dist/core/schema/node-flags.d.ts +23 -0
  113. package/dist/core/schema/node-flags.js +34 -0
  114. package/dist/core/schema/node-flags.js.map +1 -0
  115. package/dist/core/schema/opaque-fence.d.ts +11 -0
  116. package/dist/core/schema/opaque-fence.js +57 -0
  117. package/dist/core/schema/opaque-fence.js.map +1 -0
  118. package/dist/core/schema/strike.d.ts +4 -0
  119. package/dist/core/schema/strike.js +9 -0
  120. package/dist/core/schema/strike.js.map +1 -0
  121. package/dist/core/selection-range.d.ts +13 -0
  122. package/dist/core/selection-range.js +28 -0
  123. package/dist/core/selection-range.js.map +1 -0
  124. package/dist/core/slash.d.ts +24 -0
  125. package/dist/core/slash.js +60 -0
  126. package/dist/core/slash.js.map +1 -0
  127. package/dist/core/store.d.ts +22 -0
  128. package/dist/core/store.js +61 -0
  129. package/dist/core/store.js.map +1 -0
  130. package/dist/core/suggestion-popup.d.ts +63 -0
  131. package/dist/core/suggestion-popup.js +57 -0
  132. package/dist/core/suggestion-popup.js.map +1 -0
  133. package/dist/core/tag-name.js +11 -0
  134. package/dist/core/tag-name.js.map +1 -0
  135. package/dist/core/toolbar-items.d.ts +10 -0
  136. package/dist/core/toolbar-items.js +206 -0
  137. package/dist/core/toolbar-items.js.map +1 -0
  138. package/dist/core/toolbar.d.ts +74 -0
  139. package/dist/core/toolbar.js +45 -0
  140. package/dist/core/toolbar.js.map +1 -0
  141. package/dist/document/DocumentSurface.d.ts +38 -0
  142. package/dist/document/DocumentSurface.js +44 -0
  143. package/dist/document/DocumentSurface.js.map +1 -0
  144. package/dist/document/DocumentSurface.vue.d.ts +56 -0
  145. package/dist/document/DocumentSurface2.js +71 -0
  146. package/dist/document/DocumentSurface2.js.map +1 -0
  147. package/dist/document/react.d.ts +2 -0
  148. package/dist/document/react.js +1 -0
  149. package/dist/document/vue.d.ts +2 -0
  150. package/dist/document/vue.js +1 -0
  151. package/dist/features/ai/agent-op-review.d.ts +69 -0
  152. package/dist/features/ai/agent-op-review.js +182 -0
  153. package/dist/features/ai/agent-op-review.js.map +1 -0
  154. package/dist/features/ai/agent-ops.d.ts +15 -0
  155. package/dist/features/ai/agent-ops.js +228 -0
  156. package/dist/features/ai/agent-ops.js.map +1 -0
  157. package/dist/features/ai/ai-apply.d.ts +76 -0
  158. package/dist/features/ai/ai-apply.js +193 -0
  159. package/dist/features/ai/ai-apply.js.map +1 -0
  160. package/dist/features/ai/ai-menu.d.ts +38 -0
  161. package/dist/features/ai/ai-menu.js +20 -0
  162. package/dist/features/ai/ai-menu.js.map +1 -0
  163. package/dist/features/ai/ai-review.d.ts +136 -0
  164. package/dist/features/ai/ai-review.js +543 -0
  165. package/dist/features/ai/ai-review.js.map +1 -0
  166. package/dist/features/ai/ai-selection-highlight.d.ts +21 -0
  167. package/dist/features/ai/ai-selection-highlight.js +44 -0
  168. package/dist/features/ai/ai-selection-highlight.js.map +1 -0
  169. package/dist/features/ai/ai-sse.d.ts +28 -0
  170. package/dist/features/ai/ai-sse.js +82 -0
  171. package/dist/features/ai/ai-sse.js.map +1 -0
  172. package/dist/features/ai/assistant.d.ts +53 -0
  173. package/dist/features/ai/assistant.js +82 -0
  174. package/dist/features/ai/assistant.js.map +1 -0
  175. package/dist/features/ai/block-actions.d.ts +20 -0
  176. package/dist/features/ai/block-actions.js +55 -0
  177. package/dist/features/ai/block-actions.js.map +1 -0
  178. package/dist/features/ai/components/AiReviewBar.js +145 -0
  179. package/dist/features/ai/components/AiReviewBar.js.map +1 -0
  180. package/dist/features/ai/components/AiReviewBar.vue.d.ts +15 -0
  181. package/dist/features/ai/components/AiSelectionMenu.js +519 -0
  182. package/dist/features/ai/components/AiSelectionMenu.js.map +1 -0
  183. package/dist/features/ai/components/AiSelectionMenu.vue.d.ts +17 -0
  184. package/dist/features/ai/components/AiSidebar.js +378 -0
  185. package/dist/features/ai/components/AiSidebar.js.map +1 -0
  186. package/dist/features/ai/components/AiSidebar.vue.d.ts +26 -0
  187. package/dist/features/ai/components/DocumentChatAnswer.js +67 -0
  188. package/dist/features/ai/components/DocumentChatAnswer.js.map +1 -0
  189. package/dist/features/ai/components/DocumentChatAnswer.vue.d.ts +13 -0
  190. package/dist/features/ai/components/DocumentChatOps.js +113 -0
  191. package/dist/features/ai/components/DocumentChatOps.js.map +1 -0
  192. package/dist/features/ai/components/DocumentChatOps.vue.d.ts +27 -0
  193. package/dist/features/ai/components/ModelQuickSwitch.js +84 -0
  194. package/dist/features/ai/components/ModelQuickSwitch.js.map +1 -0
  195. package/dist/features/ai/components/ModelQuickSwitch.vue.d.ts +23 -0
  196. package/dist/features/ai/components/SettingsAiTab.js +88 -0
  197. package/dist/features/ai/components/SettingsAiTab.js.map +1 -0
  198. package/dist/features/ai/components/SettingsAiTab.vue.d.ts +6 -0
  199. package/dist/features/ai/components/SettingsModelProfiles.js +260 -0
  200. package/dist/features/ai/components/SettingsModelProfiles.js.map +1 -0
  201. package/dist/features/ai/components/SettingsModelProfiles.vue.d.ts +6 -0
  202. package/dist/features/ai/document-chat-model.d.ts +88 -0
  203. package/dist/features/ai/document-chat-model.js +190 -0
  204. package/dist/features/ai/document-chat-model.js.map +1 -0
  205. package/dist/features/ai/document-chat.d.ts +17 -0
  206. package/dist/features/ai/document-chat.js +112 -0
  207. package/dist/features/ai/document-chat.js.map +1 -0
  208. package/dist/features/ai/feature.d.ts +25 -0
  209. package/dist/features/ai/feature.js +89 -0
  210. package/dist/features/ai/feature.js.map +1 -0
  211. package/dist/features/ai/ghost-autocomplete.d.ts +47 -0
  212. package/dist/features/ai/ghost-autocomplete.js +204 -0
  213. package/dist/features/ai/ghost-autocomplete.js.map +1 -0
  214. package/dist/features/ai/index.d.ts +24 -0
  215. package/dist/features/ai/index.js +23 -0
  216. package/dist/features/ai/model-profiles.d.ts +36 -0
  217. package/dist/features/ai/model-profiles.js +111 -0
  218. package/dist/features/ai/model-profiles.js.map +1 -0
  219. package/dist/features/ai/preview-extensions.js +14 -0
  220. package/dist/features/ai/preview-extensions.js.map +1 -0
  221. package/dist/features/ai/protocol/agent-ops.d.ts +120 -0
  222. package/dist/features/ai/protocol/agent-ops.js +298 -0
  223. package/dist/features/ai/protocol/agent-ops.js.map +1 -0
  224. package/dist/features/ai/protocol/chat.d.ts +57 -0
  225. package/dist/features/ai/protocol/chat.js +146 -0
  226. package/dist/features/ai/protocol/chat.js.map +1 -0
  227. package/dist/features/ai/protocol/complete.d.ts +21 -0
  228. package/dist/features/ai/protocol/complete.js +81 -0
  229. package/dist/features/ai/protocol/complete.js.map +1 -0
  230. package/dist/features/ai/protocol/index.d.ts +7 -0
  231. package/dist/features/ai/protocol/index.js +7 -0
  232. package/dist/features/ai/protocol/models.d.ts +48 -0
  233. package/dist/features/ai/protocol/models.js +41 -0
  234. package/dist/features/ai/protocol/models.js.map +1 -0
  235. package/dist/features/ai/protocol/schemas.d.ts +36 -0
  236. package/dist/features/ai/protocol/schemas.js +40 -0
  237. package/dist/features/ai/protocol/schemas.js.map +1 -0
  238. package/dist/features/ai/protocol/tasks.d.ts +107 -0
  239. package/dist/features/ai/protocol/tasks.js +227 -0
  240. package/dist/features/ai/protocol/tasks.js.map +1 -0
  241. package/dist/features/ai/rate-limit.d.ts +9 -0
  242. package/dist/features/ai/rate-limit.js +20 -0
  243. package/dist/features/ai/rate-limit.js.map +1 -0
  244. package/dist/features/ai/react/AiReviewBar.d.ts +12 -0
  245. package/dist/features/ai/react/AiReviewBar.js +156 -0
  246. package/dist/features/ai/react/AiReviewBar.js.map +1 -0
  247. package/dist/features/ai/react/AiSelectionMenu.d.ts +14 -0
  248. package/dist/features/ai/react/AiSelectionMenu.js +513 -0
  249. package/dist/features/ai/react/AiSelectionMenu.js.map +1 -0
  250. package/dist/features/ai/react/AiSidebar.d.ts +19 -0
  251. package/dist/features/ai/react/AiSidebar.js +339 -0
  252. package/dist/features/ai/react/AiSidebar.js.map +1 -0
  253. package/dist/features/ai/react/DocumentChatAnswer.d.ts +10 -0
  254. package/dist/features/ai/react/DocumentChatAnswer.js +70 -0
  255. package/dist/features/ai/react/DocumentChatAnswer.js.map +1 -0
  256. package/dist/features/ai/react/DocumentChatOps.d.ts +19 -0
  257. package/dist/features/ai/react/DocumentChatOps.js +111 -0
  258. package/dist/features/ai/react/DocumentChatOps.js.map +1 -0
  259. package/dist/features/ai/react/ModelQuickSwitch.d.ts +19 -0
  260. package/dist/features/ai/react/ModelQuickSwitch.js +89 -0
  261. package/dist/features/ai/react/ModelQuickSwitch.js.map +1 -0
  262. package/dist/features/ai/react/SettingsAiTab.d.ts +5 -0
  263. package/dist/features/ai/react/SettingsAiTab.js +103 -0
  264. package/dist/features/ai/react/SettingsAiTab.js.map +1 -0
  265. package/dist/features/ai/react/SettingsModelProfiles.d.ts +8 -0
  266. package/dist/features/ai/react/SettingsModelProfiles.js +318 -0
  267. package/dist/features/ai/react/SettingsModelProfiles.js.map +1 -0
  268. package/dist/features/ai/react/use-ai-assistant.d.ts +22 -0
  269. package/dist/features/ai/react/use-ai-assistant.js +36 -0
  270. package/dist/features/ai/react/use-ai-assistant.js.map +1 -0
  271. package/dist/features/ai/react/use-document-chat.d.ts +32 -0
  272. package/dist/features/ai/react/use-document-chat.js +43 -0
  273. package/dist/features/ai/react/use-document-chat.js.map +1 -0
  274. package/dist/features/ai/react/use-model-profiles.d.ts +20 -0
  275. package/dist/features/ai/react/use-model-profiles.js +33 -0
  276. package/dist/features/ai/react/use-model-profiles.js.map +1 -0
  277. package/dist/features/ai/react.d.ts +23 -0
  278. package/dist/features/ai/react.js +28 -0
  279. package/dist/features/ai/react.js.map +1 -0
  280. package/dist/features/ai/sidebar-flow.d.ts +61 -0
  281. package/dist/features/ai/sidebar-flow.js +125 -0
  282. package/dist/features/ai/sidebar-flow.js.map +1 -0
  283. package/dist/features/ai/use-ai-assistant.d.ts +22 -0
  284. package/dist/features/ai/use-ai-assistant.js +39 -0
  285. package/dist/features/ai/use-ai-assistant.js.map +1 -0
  286. package/dist/features/ai/use-document-chat.d.ts +33 -0
  287. package/dist/features/ai/use-document-chat.js +45 -0
  288. package/dist/features/ai/use-document-chat.js.map +1 -0
  289. package/dist/features/ai/use-model-profiles.d.ts +23 -0
  290. package/dist/features/ai/use-model-profiles.js +50 -0
  291. package/dist/features/ai/use-model-profiles.js.map +1 -0
  292. package/dist/features/ai/vue.d.ts +21 -0
  293. package/dist/features/ai/vue.js +28 -0
  294. package/dist/features/ai/vue.js.map +1 -0
  295. package/dist/features/authors/attribution.d.ts +36 -0
  296. package/dist/features/authors/attribution.js +94 -0
  297. package/dist/features/authors/attribution.js.map +1 -0
  298. package/dist/features/authors/author-color-styles.d.ts +12 -0
  299. package/dist/features/authors/author-color-styles.js +24 -0
  300. package/dist/features/authors/author-color-styles.js.map +1 -0
  301. package/dist/features/authors/components/AuthorColorsButton.js +50 -0
  302. package/dist/features/authors/components/AuthorColorsButton.js.map +1 -0
  303. package/dist/features/authors/components/AuthorColorsButton.vue.d.ts +11 -0
  304. package/dist/features/authors/components/AuthorColorsPanel.js +72 -0
  305. package/dist/features/authors/components/AuthorColorsPanel.js.map +1 -0
  306. package/dist/features/authors/components/AuthorColorsPanel.vue.d.ts +11 -0
  307. package/dist/features/authors/components/SettingsAuthorsTab.js +49 -0
  308. package/dist/features/authors/components/SettingsAuthorsTab.js.map +1 -0
  309. package/dist/features/authors/components/SettingsAuthorsTab.vue.d.ts +6 -0
  310. package/dist/features/authors/feature.d.ts +22 -0
  311. package/dist/features/authors/feature.js +47 -0
  312. package/dist/features/authors/feature.js.map +1 -0
  313. package/dist/features/authors/index.d.ts +7 -0
  314. package/dist/features/authors/index.js +6 -0
  315. package/dist/features/authors/react/AuthorColorsButton.d.ts +8 -0
  316. package/dist/features/authors/react/AuthorColorsButton.js +41 -0
  317. package/dist/features/authors/react/AuthorColorsButton.js.map +1 -0
  318. package/dist/features/authors/react/AuthorColorsPanel.d.ts +8 -0
  319. package/dist/features/authors/react/AuthorColorsPanel.js +125 -0
  320. package/dist/features/authors/react/AuthorColorsPanel.js.map +1 -0
  321. package/dist/features/authors/react/SettingsAuthorsTab.d.ts +5 -0
  322. package/dist/features/authors/react/SettingsAuthorsTab.js +92 -0
  323. package/dist/features/authors/react/SettingsAuthorsTab.js.map +1 -0
  324. package/dist/features/authors/react.d.ts +11 -0
  325. package/dist/features/authors/react.js +16 -0
  326. package/dist/features/authors/react.js.map +1 -0
  327. package/dist/features/authors/schema.d.ts +22 -0
  328. package/dist/features/authors/schema.js +70 -0
  329. package/dist/features/authors/schema.js.map +1 -0
  330. package/dist/features/authors/vue.d.ts +10 -0
  331. package/dist/features/authors/vue.js +16 -0
  332. package/dist/features/authors/vue.js.map +1 -0
  333. package/dist/features/block-ui/block-actions.d.ts +17 -0
  334. package/dist/features/block-ui/block-actions.js +37 -0
  335. package/dist/features/block-ui/block-actions.js.map +1 -0
  336. package/dist/features/block-ui/components/BlockActionsOverlay.js +142 -0
  337. package/dist/features/block-ui/components/BlockActionsOverlay.js.map +1 -0
  338. package/dist/features/block-ui/components/BlockActionsOverlay.vue.d.ts +25 -0
  339. package/dist/features/block-ui/components/BlockHandles.js +113 -0
  340. package/dist/features/block-ui/components/BlockHandles.js.map +1 -0
  341. package/dist/features/block-ui/components/BlockUi.js +181 -0
  342. package/dist/features/block-ui/components/BlockUi.js.map +1 -0
  343. package/dist/features/block-ui/components/BlockUi.vue.d.ts +17 -0
  344. package/dist/features/block-ui/feature.d.ts +21 -0
  345. package/dist/features/block-ui/feature.js +23 -0
  346. package/dist/features/block-ui/feature.js.map +1 -0
  347. package/dist/features/block-ui/handle-geometry.js +52 -0
  348. package/dist/features/block-ui/handle-geometry.js.map +1 -0
  349. package/dist/features/block-ui/index.d.ts +3 -0
  350. package/dist/features/block-ui/index.js +3 -0
  351. package/dist/features/block-ui/react/BlockActionsOverlay.d.ts +19 -0
  352. package/dist/features/block-ui/react/BlockActionsOverlay.js +142 -0
  353. package/dist/features/block-ui/react/BlockActionsOverlay.js.map +1 -0
  354. package/dist/features/block-ui/react/BlockHandles.d.ts +15 -0
  355. package/dist/features/block-ui/react/BlockHandles.js +104 -0
  356. package/dist/features/block-ui/react/BlockHandles.js.map +1 -0
  357. package/dist/features/block-ui/react/BlockUi.d.ts +14 -0
  358. package/dist/features/block-ui/react/BlockUi.js +174 -0
  359. package/dist/features/block-ui/react/BlockUi.js.map +1 -0
  360. package/dist/features/block-ui/react.d.ts +11 -0
  361. package/dist/features/block-ui/react.js +13 -0
  362. package/dist/features/block-ui/react.js.map +1 -0
  363. package/dist/features/block-ui/vue.d.ts +9 -0
  364. package/dist/features/block-ui/vue.js +12 -0
  365. package/dist/features/block-ui/vue.js.map +1 -0
  366. package/dist/features/collab/anchor-resolver.d.ts +7 -0
  367. package/dist/features/collab/anchor-resolver.js +92 -0
  368. package/dist/features/collab/anchor-resolver.js.map +1 -0
  369. package/dist/features/collab/feature.d.ts +22 -0
  370. package/dist/features/collab/feature.js +36 -0
  371. package/dist/features/collab/feature.js.map +1 -0
  372. package/dist/features/collab/index.d.ts +3 -0
  373. package/dist/features/collab/index.js +3 -0
  374. package/dist/features/collab/react.d.ts +7 -0
  375. package/dist/features/collab/react.js +10 -0
  376. package/dist/features/collab/react.js.map +1 -0
  377. package/dist/features/collab/vue.d.ts +6 -0
  378. package/dist/features/collab/vue.js +37 -0
  379. package/dist/features/collab/vue.js.map +1 -0
  380. package/dist/features/comments/comments-plugin.d.ts +71 -0
  381. package/dist/features/comments/comments-plugin.js +185 -0
  382. package/dist/features/comments/comments-plugin.js.map +1 -0
  383. package/dist/features/comments/components/CommentBubble.js +54 -0
  384. package/dist/features/comments/components/CommentBubble.js.map +1 -0
  385. package/dist/features/comments/components/CommentBubble.vue.d.ts +14 -0
  386. package/dist/features/comments/components/CommentComposer.js +87 -0
  387. package/dist/features/comments/components/CommentComposer.js.map +1 -0
  388. package/dist/features/comments/components/CommentComposer.vue.d.ts +21 -0
  389. package/dist/features/comments/components/CommentThreadView.js +255 -0
  390. package/dist/features/comments/components/CommentThreadView.js.map +1 -0
  391. package/dist/features/comments/components/CommentThreadView.vue.d.ts +29 -0
  392. package/dist/features/comments/components/CommentsListMenu.js +134 -0
  393. package/dist/features/comments/components/CommentsListMenu.js.map +1 -0
  394. package/dist/features/comments/components/CommentsListMenu.vue.d.ts +10 -0
  395. package/dist/features/comments/components/CommentsMargin.js +291 -0
  396. package/dist/features/comments/components/CommentsMargin.js.map +1 -0
  397. package/dist/features/comments/components/CommentsMargin.vue.d.ts +16 -0
  398. package/dist/features/comments/components/CommentsOverlay.js +39 -0
  399. package/dist/features/comments/components/CommentsOverlay.js.map +1 -0
  400. package/dist/features/comments/components/CommentsPopover.js +124 -0
  401. package/dist/features/comments/components/CommentsPopover.js.map +1 -0
  402. package/dist/features/comments/components/CommentsPopover.vue.d.ts +10 -0
  403. package/dist/features/comments/components/CommentsToolbarButton.js +61 -0
  404. package/dist/features/comments/components/CommentsToolbarButton.js.map +1 -0
  405. package/dist/features/comments/components/SettingsCommentsTab.js +46 -0
  406. package/dist/features/comments/components/SettingsCommentsTab.js.map +1 -0
  407. package/dist/features/comments/components/SettingsCommentsTab.vue.d.ts +6 -0
  408. package/dist/features/comments/feature.d.ts +39 -0
  409. package/dist/features/comments/feature.js +128 -0
  410. package/dist/features/comments/feature.js.map +1 -0
  411. package/dist/features/comments/index.d.ts +6 -0
  412. package/dist/features/comments/index.js +6 -0
  413. package/dist/features/comments/model.d.ts +87 -0
  414. package/dist/features/comments/model.js +390 -0
  415. package/dist/features/comments/model.js.map +1 -0
  416. package/dist/features/comments/react/CommentAvatar.js +24 -0
  417. package/dist/features/comments/react/CommentAvatar.js.map +1 -0
  418. package/dist/features/comments/react/CommentBubble.d.ts +11 -0
  419. package/dist/features/comments/react/CommentBubble.js +43 -0
  420. package/dist/features/comments/react/CommentBubble.js.map +1 -0
  421. package/dist/features/comments/react/CommentComposer.d.ts +15 -0
  422. package/dist/features/comments/react/CommentComposer.js +69 -0
  423. package/dist/features/comments/react/CommentComposer.js.map +1 -0
  424. package/dist/features/comments/react/CommentThreadView.d.ts +24 -0
  425. package/dist/features/comments/react/CommentThreadView.js +249 -0
  426. package/dist/features/comments/react/CommentThreadView.js.map +1 -0
  427. package/dist/features/comments/react/CommentsListMenu.d.ts +8 -0
  428. package/dist/features/comments/react/CommentsListMenu.js +115 -0
  429. package/dist/features/comments/react/CommentsListMenu.js.map +1 -0
  430. package/dist/features/comments/react/CommentsMargin.d.ts +16 -0
  431. package/dist/features/comments/react/CommentsMargin.js +294 -0
  432. package/dist/features/comments/react/CommentsMargin.js.map +1 -0
  433. package/dist/features/comments/react/CommentsOverlay.d.ts +11 -0
  434. package/dist/features/comments/react/CommentsOverlay.js +52 -0
  435. package/dist/features/comments/react/CommentsOverlay.js.map +1 -0
  436. package/dist/features/comments/react/CommentsPopover.d.ts +15 -0
  437. package/dist/features/comments/react/CommentsPopover.js +107 -0
  438. package/dist/features/comments/react/CommentsPopover.js.map +1 -0
  439. package/dist/features/comments/react/CommentsToolbarButton.d.ts +12 -0
  440. package/dist/features/comments/react/CommentsToolbarButton.js +52 -0
  441. package/dist/features/comments/react/CommentsToolbarButton.js.map +1 -0
  442. package/dist/features/comments/react/SettingsCommentsTab.d.ts +5 -0
  443. package/dist/features/comments/react/SettingsCommentsTab.js +77 -0
  444. package/dist/features/comments/react/SettingsCommentsTab.js.map +1 -0
  445. package/dist/features/comments/react/use-comments.d.ts +17 -0
  446. package/dist/features/comments/react/use-comments.js +37 -0
  447. package/dist/features/comments/react/use-comments.js.map +1 -0
  448. package/dist/features/comments/react.d.ts +23 -0
  449. package/dist/features/comments/react.js +28 -0
  450. package/dist/features/comments/react.js.map +1 -0
  451. package/dist/features/comments/schema.d.ts +51 -0
  452. package/dist/features/comments/schema.js +41 -0
  453. package/dist/features/comments/schema.js.map +1 -0
  454. package/dist/features/comments/shortcuts.js +34 -0
  455. package/dist/features/comments/shortcuts.js.map +1 -0
  456. package/dist/features/comments/use-comments.d.ts +37 -0
  457. package/dist/features/comments/use-comments.js +45 -0
  458. package/dist/features/comments/use-comments.js.map +1 -0
  459. package/dist/features/comments/vue.d.ts +20 -0
  460. package/dist/features/comments/vue.js +28 -0
  461. package/dist/features/comments/vue.js.map +1 -0
  462. package/dist/features/composites/ai-brief.d.ts +31 -0
  463. package/dist/features/composites/ai-brief.js +56 -0
  464. package/dist/features/composites/ai-brief.js.map +1 -0
  465. package/dist/features/composites/anchors.d.ts +47 -0
  466. package/dist/features/composites/anchors.js +137 -0
  467. package/dist/features/composites/anchors.js.map +1 -0
  468. package/dist/features/composites/components/CompositeChrome.js +243 -0
  469. package/dist/features/composites/components/CompositeChrome.js.map +1 -0
  470. package/dist/features/composites/components/CompositeChrome.vue.d.ts +19 -0
  471. package/dist/features/composites/components/CompositeDetails.js +158 -0
  472. package/dist/features/composites/components/CompositeDetails.js.map +1 -0
  473. package/dist/features/composites/components/CompositeDetails.vue.d.ts +19 -0
  474. package/dist/features/composites/components/CompositeFieldEditor.js +114 -0
  475. package/dist/features/composites/components/CompositeFieldEditor.js.map +1 -0
  476. package/dist/features/composites/components/CompositeFieldEditor.vue.d.ts +23 -0
  477. package/dist/features/composites/components/CompositeInspector.js +439 -0
  478. package/dist/features/composites/components/CompositeInspector.js.map +1 -0
  479. package/dist/features/composites/components/CompositeInspector.vue.d.ts +32 -0
  480. package/dist/features/composites/components/CompositeStatusMenu.js +51 -0
  481. package/dist/features/composites/components/CompositeStatusMenu.js.map +1 -0
  482. package/dist/features/composites/components/CompositeStatusMenu.vue.d.ts +28 -0
  483. package/dist/features/composites/components/CompositeSummaryEditor.js +79 -0
  484. package/dist/features/composites/components/CompositeSummaryEditor.js.map +1 -0
  485. package/dist/features/composites/components/CompositeSummaryEditor.vue.d.ts +18 -0
  486. package/dist/features/composites/components/CompositeTable.js +348 -0
  487. package/dist/features/composites/components/CompositeTable.js.map +1 -0
  488. package/dist/features/composites/components/CompositeTable.vue.d.ts +15 -0
  489. package/dist/features/composites/components/CompositeTagsEditor.js +95 -0
  490. package/dist/features/composites/components/CompositeTagsEditor.js.map +1 -0
  491. package/dist/features/composites/components/CompositeTagsEditor.vue.d.ts +13 -0
  492. package/dist/features/composites/components/CompositeView.js +46 -0
  493. package/dist/features/composites/components/CompositeView.js.map +1 -0
  494. package/dist/features/composites/components/CompositeView.vue.d.ts +96 -0
  495. package/dist/features/composites/components/SettingsEditingTab.js +119 -0
  496. package/dist/features/composites/components/SettingsEditingTab.js.map +1 -0
  497. package/dist/features/composites/components/SettingsEditingTab.vue.d.ts +11 -0
  498. package/dist/features/composites/convert.d.ts +24 -0
  499. package/dist/features/composites/convert.js +145 -0
  500. package/dist/features/composites/convert.js.map +1 -0
  501. package/dist/features/composites/editing-settings-keys.js +47 -0
  502. package/dist/features/composites/editing-settings-keys.js.map +1 -0
  503. package/dist/features/composites/feature.d.ts +30 -0
  504. package/dist/features/composites/feature.js +305 -0
  505. package/dist/features/composites/feature.js.map +1 -0
  506. package/dist/features/composites/fences.d.ts +20 -0
  507. package/dist/features/composites/fences.js +86 -0
  508. package/dist/features/composites/fences.js.map +1 -0
  509. package/dist/features/composites/heading-composites.d.ts +36 -0
  510. package/dist/features/composites/heading-composites.js +140 -0
  511. package/dist/features/composites/heading-composites.js.map +1 -0
  512. package/dist/features/composites/index.d.ts +20 -0
  513. package/dist/features/composites/index.js +20 -0
  514. package/dist/features/composites/kinds.d.ts +49 -0
  515. package/dist/features/composites/kinds.js +131 -0
  516. package/dist/features/composites/kinds.js.map +1 -0
  517. package/dist/features/composites/legacy.d.ts +8 -0
  518. package/dist/features/composites/legacy.js +25 -0
  519. package/dist/features/composites/legacy.js.map +1 -0
  520. package/dist/features/composites/markdown-export.d.ts +17 -0
  521. package/dist/features/composites/markdown-export.js +49 -0
  522. package/dist/features/composites/markdown-export.js.map +1 -0
  523. package/dist/features/composites/meta-display.js +46 -0
  524. package/dist/features/composites/meta-display.js.map +1 -0
  525. package/dist/features/composites/node-views.d.ts +17 -0
  526. package/dist/features/composites/node-views.js +18 -0
  527. package/dist/features/composites/node-views.js.map +1 -0
  528. package/dist/features/composites/nodes.d.ts +56 -0
  529. package/dist/features/composites/nodes.js +480 -0
  530. package/dist/features/composites/nodes.js.map +1 -0
  531. package/dist/features/composites/outline.d.ts +35 -0
  532. package/dist/features/composites/outline.js +69 -0
  533. package/dist/features/composites/outline.js.map +1 -0
  534. package/dist/features/composites/react/CompositeChrome.d.ts +16 -0
  535. package/dist/features/composites/react/CompositeChrome.js +234 -0
  536. package/dist/features/composites/react/CompositeChrome.js.map +1 -0
  537. package/dist/features/composites/react/CompositeDetails.d.ts +16 -0
  538. package/dist/features/composites/react/CompositeDetails.js +149 -0
  539. package/dist/features/composites/react/CompositeDetails.js.map +1 -0
  540. package/dist/features/composites/react/CompositeFieldEditor.d.ts +18 -0
  541. package/dist/features/composites/react/CompositeFieldEditor.js +131 -0
  542. package/dist/features/composites/react/CompositeFieldEditor.js.map +1 -0
  543. package/dist/features/composites/react/CompositeInspector.d.ts +23 -0
  544. package/dist/features/composites/react/CompositeInspector.js +506 -0
  545. package/dist/features/composites/react/CompositeInspector.js.map +1 -0
  546. package/dist/features/composites/react/CompositeStatusMenu.d.ts +15 -0
  547. package/dist/features/composites/react/CompositeStatusMenu.js +36 -0
  548. package/dist/features/composites/react/CompositeStatusMenu.js.map +1 -0
  549. package/dist/features/composites/react/CompositeSummaryEditor.d.ts +15 -0
  550. package/dist/features/composites/react/CompositeSummaryEditor.js +85 -0
  551. package/dist/features/composites/react/CompositeSummaryEditor.js.map +1 -0
  552. package/dist/features/composites/react/CompositeTable.d.ts +11 -0
  553. package/dist/features/composites/react/CompositeTable.js +342 -0
  554. package/dist/features/composites/react/CompositeTable.js.map +1 -0
  555. package/dist/features/composites/react/CompositeTagsEditor.d.ts +10 -0
  556. package/dist/features/composites/react/CompositeTagsEditor.js +122 -0
  557. package/dist/features/composites/react/CompositeTagsEditor.js.map +1 -0
  558. package/dist/features/composites/react/CompositeView.d.ts +6 -0
  559. package/dist/features/composites/react/CompositeView.js +30 -0
  560. package/dist/features/composites/react/CompositeView.js.map +1 -0
  561. package/dist/features/composites/react/SettingsEditingTab.d.ts +8 -0
  562. package/dist/features/composites/react/SettingsEditingTab.js +153 -0
  563. package/dist/features/composites/react/SettingsEditingTab.js.map +1 -0
  564. package/dist/features/composites/react/use-composite-anchors.d.ts +17 -0
  565. package/dist/features/composites/react/use-composite-anchors.js +46 -0
  566. package/dist/features/composites/react/use-composite-anchors.js.map +1 -0
  567. package/dist/features/composites/react/use-composite-rows.d.ts +11 -0
  568. package/dist/features/composites/react/use-composite-rows.js +26 -0
  569. package/dist/features/composites/react/use-composite-rows.js.map +1 -0
  570. package/dist/features/composites/react.d.ts +24 -0
  571. package/dist/features/composites/react.js +30 -0
  572. package/dist/features/composites/react.js.map +1 -0
  573. package/dist/features/composites/rows-model.d.ts +38 -0
  574. package/dist/features/composites/rows-model.js +92 -0
  575. package/dist/features/composites/rows-model.js.map +1 -0
  576. package/dist/features/composites/rows.d.ts +76 -0
  577. package/dist/features/composites/rows.js +159 -0
  578. package/dist/features/composites/rows.js.map +1 -0
  579. package/dist/features/composites/schema.d.ts +21 -0
  580. package/dist/features/composites/schema.js +26 -0
  581. package/dist/features/composites/schema.js.map +1 -0
  582. package/dist/features/composites/structure-mode.d.ts +11 -0
  583. package/dist/features/composites/structure-mode.js +16 -0
  584. package/dist/features/composites/structure-mode.js.map +1 -0
  585. package/dist/features/composites/structure.d.ts +19 -0
  586. package/dist/features/composites/structure.js +19 -0
  587. package/dist/features/composites/structure.js.map +1 -0
  588. package/dist/features/composites/table-model.js +117 -0
  589. package/dist/features/composites/table-model.js.map +1 -0
  590. package/dist/features/composites/tree-root.d.ts +11 -0
  591. package/dist/features/composites/tree-root.js +16 -0
  592. package/dist/features/composites/tree-root.js.map +1 -0
  593. package/dist/features/composites/use-composite-anchors.d.ts +18 -0
  594. package/dist/features/composites/use-composite-anchors.js +42 -0
  595. package/dist/features/composites/use-composite-anchors.js.map +1 -0
  596. package/dist/features/composites/use-composite-rows.d.ts +25 -0
  597. package/dist/features/composites/use-composite-rows.js +28 -0
  598. package/dist/features/composites/use-composite-rows.js.map +1 -0
  599. package/dist/features/composites/vue.d.ts +23 -0
  600. package/dist/features/composites/vue.js +30 -0
  601. package/dist/features/composites/vue.js.map +1 -0
  602. package/dist/features/media/assets.d.ts +30 -0
  603. package/dist/features/media/assets.js +26 -0
  604. package/dist/features/media/assets.js.map +1 -0
  605. package/dist/features/media/audio-recorder.d.ts +25 -0
  606. package/dist/features/media/audio-recorder.js +123 -0
  607. package/dist/features/media/audio-recorder.js.map +1 -0
  608. package/dist/features/media/components/AudioRecorderModal.js +152 -0
  609. package/dist/features/media/components/AudioRecorderModal.js.map +1 -0
  610. package/dist/features/media/components/AudioRecorderModal.vue.d.ts +15 -0
  611. package/dist/features/media/components/AudioView.js +46 -0
  612. package/dist/features/media/components/AudioView.js.map +1 -0
  613. package/dist/features/media/components/FileView.js +73 -0
  614. package/dist/features/media/components/FileView.js.map +1 -0
  615. package/dist/features/media/components/VideoView.js +47 -0
  616. package/dist/features/media/components/VideoView.js.map +1 -0
  617. package/dist/features/media/feature.d.ts +22 -0
  618. package/dist/features/media/feature.js +101 -0
  619. package/dist/features/media/feature.js.map +1 -0
  620. package/dist/features/media/file-import.d.ts +21 -0
  621. package/dist/features/media/file-import.js +76 -0
  622. package/dist/features/media/file-import.js.map +1 -0
  623. package/dist/features/media/index.d.ts +7 -0
  624. package/dist/features/media/index.js +7 -0
  625. package/dist/features/media/node-views.d.ts +28 -0
  626. package/dist/features/media/node-views.js +28 -0
  627. package/dist/features/media/node-views.js.map +1 -0
  628. package/dist/features/media/react/AudioRecorderModal.d.ts +12 -0
  629. package/dist/features/media/react/AudioRecorderModal.js +147 -0
  630. package/dist/features/media/react/AudioRecorderModal.js.map +1 -0
  631. package/dist/features/media/react/AudioView.js +32 -0
  632. package/dist/features/media/react/AudioView.js.map +1 -0
  633. package/dist/features/media/react/FileView.js +61 -0
  634. package/dist/features/media/react/FileView.js.map +1 -0
  635. package/dist/features/media/react/TitleField.js +30 -0
  636. package/dist/features/media/react/TitleField.js.map +1 -0
  637. package/dist/features/media/react/VideoView.js +33 -0
  638. package/dist/features/media/react/VideoView.js.map +1 -0
  639. package/dist/features/media/react/use-audio-recorder.d.ts +11 -0
  640. package/dist/features/media/react/use-audio-recorder.js +21 -0
  641. package/dist/features/media/react/use-audio-recorder.js.map +1 -0
  642. package/dist/features/media/react.d.ts +19 -0
  643. package/dist/features/media/react.js +37 -0
  644. package/dist/features/media/react.js.map +1 -0
  645. package/dist/features/media/schema.d.ts +59 -0
  646. package/dist/features/media/schema.js +194 -0
  647. package/dist/features/media/schema.js.map +1 -0
  648. package/dist/features/media/upload.d.ts +41 -0
  649. package/dist/features/media/upload.js +106 -0
  650. package/dist/features/media/upload.js.map +1 -0
  651. package/dist/features/media/use-audio-recorder.d.ts +12 -0
  652. package/dist/features/media/use-audio-recorder.js +21 -0
  653. package/dist/features/media/use-audio-recorder.js.map +1 -0
  654. package/dist/features/media/vue.d.ts +19 -0
  655. package/dist/features/media/vue.js +35 -0
  656. package/dist/features/media/vue.js.map +1 -0
  657. package/dist/features/mentions/index.d.ts +22 -0
  658. package/dist/features/mentions/index.js +34 -0
  659. package/dist/features/mentions/index.js.map +1 -0
  660. package/dist/features/mentions/mention-suggestion.d.ts +11 -0
  661. package/dist/features/mentions/mention-suggestion.js +34 -0
  662. package/dist/features/mentions/mention-suggestion.js.map +1 -0
  663. package/dist/features/mentions/mention-text.d.ts +18 -0
  664. package/dist/features/mentions/mention-text.js +75 -0
  665. package/dist/features/mentions/mention-text.js.map +1 -0
  666. package/dist/features/mentions/mention.d.ts +20 -0
  667. package/dist/features/mentions/mention.js +33 -0
  668. package/dist/features/mentions/mention.js.map +1 -0
  669. package/dist/features/mentions/metadata-defaults.d.ts +8 -0
  670. package/dist/features/mentions/metadata-defaults.js +30 -0
  671. package/dist/features/mentions/metadata-defaults.js.map +1 -0
  672. package/dist/features/mentions/normalize.d.ts +10 -0
  673. package/dist/features/mentions/normalize.js +31 -0
  674. package/dist/features/mentions/normalize.js.map +1 -0
  675. package/dist/features/mentions/schema.d.ts +10 -0
  676. package/dist/features/mentions/schema.js +10 -0
  677. package/dist/features/mentions/schema.js.map +1 -0
  678. package/dist/features/mentions/tag-suggestion.d.ts +11 -0
  679. package/dist/features/mentions/tag-suggestion.js +45 -0
  680. package/dist/features/mentions/tag-suggestion.js.map +1 -0
  681. package/dist/features/mentions/tag.d.ts +43 -0
  682. package/dist/features/mentions/tag.js +155 -0
  683. package/dist/features/mentions/tag.js.map +1 -0
  684. package/dist/features/tables/feature.d.ts +14 -0
  685. package/dist/features/tables/feature.js +100 -0
  686. package/dist/features/tables/feature.js.map +1 -0
  687. package/dist/features/tables/index.d.ts +3 -0
  688. package/dist/features/tables/index.js +3 -0
  689. package/dist/features/tables/schema.d.ts +6 -0
  690. package/dist/features/tables/schema.js +27 -0
  691. package/dist/features/tables/schema.js.map +1 -0
  692. package/dist/features/themes/components/SettingsAppearanceTab.js +227 -0
  693. package/dist/features/themes/components/SettingsAppearanceTab.js.map +1 -0
  694. package/dist/features/themes/components/SettingsAppearanceTab.vue.d.ts +6 -0
  695. package/dist/features/themes/feature.d.ts +24 -0
  696. package/dist/features/themes/feature.js +25 -0
  697. package/dist/features/themes/feature.js.map +1 -0
  698. package/dist/features/themes/index.d.ts +6 -0
  699. package/dist/features/themes/index.js +6 -0
  700. package/dist/features/themes/react/SettingsAppearanceTab.d.ts +5 -0
  701. package/dist/features/themes/react/SettingsAppearanceTab.js +221 -0
  702. package/dist/features/themes/react/SettingsAppearanceTab.js.map +1 -0
  703. package/dist/features/themes/react.d.ts +13 -0
  704. package/dist/features/themes/react.js +15 -0
  705. package/dist/features/themes/react.js.map +1 -0
  706. package/dist/features/themes/schema.d.ts +21 -0
  707. package/dist/features/themes/schema.js +16 -0
  708. package/dist/features/themes/schema.js.map +1 -0
  709. package/dist/features/themes/scope-css.d.ts +5 -0
  710. package/dist/features/themes/scope-css.js +142 -0
  711. package/dist/features/themes/scope-css.js.map +1 -0
  712. package/dist/features/themes/theme-runtime.d.ts +14 -0
  713. package/dist/features/themes/theme-runtime.js +147 -0
  714. package/dist/features/themes/theme-runtime.js.map +1 -0
  715. package/dist/features/themes/vue.d.ts +13 -0
  716. package/dist/features/themes/vue.js +29 -0
  717. package/dist/features/themes/vue.js.map +1 -0
  718. package/dist/features/transcript/TranscriptSegmentView.js +169 -0
  719. package/dist/features/transcript/TranscriptSegmentView.js.map +1 -0
  720. package/dist/features/transcript/TranscriptSegmentView.vue.d.ts +96 -0
  721. package/dist/features/transcript/convert.d.ts +11 -0
  722. package/dist/features/transcript/convert.js +40 -0
  723. package/dist/features/transcript/convert.js.map +1 -0
  724. package/dist/features/transcript/feature.d.ts +25 -0
  725. package/dist/features/transcript/feature.js +59 -0
  726. package/dist/features/transcript/feature.js.map +1 -0
  727. package/dist/features/transcript/index.d.ts +7 -0
  728. package/dist/features/transcript/index.js +7 -0
  729. package/dist/features/transcript/react/TranscriptSegmentView.d.ts +6 -0
  730. package/dist/features/transcript/react/TranscriptSegmentView.js +155 -0
  731. package/dist/features/transcript/react/TranscriptSegmentView.js.map +1 -0
  732. package/dist/features/transcript/react.d.ts +9 -0
  733. package/dist/features/transcript/react.js +12 -0
  734. package/dist/features/transcript/react.js.map +1 -0
  735. package/dist/features/transcript/schema.d.ts +9 -0
  736. package/dist/features/transcript/schema.js +9 -0
  737. package/dist/features/transcript/schema.js.map +1 -0
  738. package/dist/features/transcript/segment-node.d.ts +21 -0
  739. package/dist/features/transcript/segment-node.js +113 -0
  740. package/dist/features/transcript/segment-node.js.map +1 -0
  741. package/dist/features/transcript/segment.d.ts +10 -0
  742. package/dist/features/transcript/segment.js +26 -0
  743. package/dist/features/transcript/segment.js.map +1 -0
  744. package/dist/features/transcript/speakers.d.ts +8 -0
  745. package/dist/features/transcript/speakers.js +22 -0
  746. package/dist/features/transcript/speakers.js.map +1 -0
  747. package/dist/features/transcript/vue.d.ts +8 -0
  748. package/dist/features/transcript/vue.js +12 -0
  749. package/dist/features/transcript/vue.js.map +1 -0
  750. package/dist/i18n/de/ai.js +168 -0
  751. package/dist/i18n/de/ai.js.map +1 -0
  752. package/dist/i18n/de/authors.js +21 -0
  753. package/dist/i18n/de/authors.js.map +1 -0
  754. package/dist/i18n/de/block.js +16 -0
  755. package/dist/i18n/de/block.js.map +1 -0
  756. package/dist/i18n/de/comments.js +35 -0
  757. package/dist/i18n/de/comments.js.map +1 -0
  758. package/dist/i18n/de/common.js +11 -0
  759. package/dist/i18n/de/common.js.map +1 -0
  760. package/dist/i18n/de/composites.js +147 -0
  761. package/dist/i18n/de/composites.js.map +1 -0
  762. package/dist/i18n/de/integrations.js +42 -0
  763. package/dist/i18n/de/integrations.js.map +1 -0
  764. package/dist/i18n/de/markdown.js +16 -0
  765. package/dist/i18n/de/markdown.js.map +1 -0
  766. package/dist/i18n/de/media.js +27 -0
  767. package/dist/i18n/de/media.js.map +1 -0
  768. package/dist/i18n/de/mentions.js +10 -0
  769. package/dist/i18n/de/mentions.js.map +1 -0
  770. package/dist/i18n/de/outline.js +9 -0
  771. package/dist/i18n/de/outline.js.map +1 -0
  772. package/dist/i18n/de/settings.js +12 -0
  773. package/dist/i18n/de/settings.js.map +1 -0
  774. package/dist/i18n/de/tables.js +15 -0
  775. package/dist/i18n/de/tables.js.map +1 -0
  776. package/dist/i18n/de/themes.js +26 -0
  777. package/dist/i18n/de/themes.js.map +1 -0
  778. package/dist/i18n/de/toolbar.js +22 -0
  779. package/dist/i18n/de/toolbar.js.map +1 -0
  780. package/dist/i18n/de/transcript.js +10 -0
  781. package/dist/i18n/de/transcript.js.map +1 -0
  782. package/dist/i18n/de/tree.js +31 -0
  783. package/dist/i18n/de/tree.js.map +1 -0
  784. package/dist/i18n/de.d.ts +503 -0
  785. package/dist/i18n/de.js +42 -0
  786. package/dist/i18n/de.js.map +1 -0
  787. package/dist/i18n/en/ai.js +168 -0
  788. package/dist/i18n/en/ai.js.map +1 -0
  789. package/dist/i18n/en/authors.js +21 -0
  790. package/dist/i18n/en/authors.js.map +1 -0
  791. package/dist/i18n/en/block.js +16 -0
  792. package/dist/i18n/en/block.js.map +1 -0
  793. package/dist/i18n/en/comments.js +35 -0
  794. package/dist/i18n/en/comments.js.map +1 -0
  795. package/dist/i18n/en/common.js +11 -0
  796. package/dist/i18n/en/common.js.map +1 -0
  797. package/dist/i18n/en/composites.js +145 -0
  798. package/dist/i18n/en/composites.js.map +1 -0
  799. package/dist/i18n/en/integrations.js +42 -0
  800. package/dist/i18n/en/integrations.js.map +1 -0
  801. package/dist/i18n/en/markdown.js +16 -0
  802. package/dist/i18n/en/markdown.js.map +1 -0
  803. package/dist/i18n/en/media.js +27 -0
  804. package/dist/i18n/en/media.js.map +1 -0
  805. package/dist/i18n/en/mentions.js +10 -0
  806. package/dist/i18n/en/mentions.js.map +1 -0
  807. package/dist/i18n/en/outline.js +9 -0
  808. package/dist/i18n/en/outline.js.map +1 -0
  809. package/dist/i18n/en/settings.js +12 -0
  810. package/dist/i18n/en/settings.js.map +1 -0
  811. package/dist/i18n/en/tables.js +15 -0
  812. package/dist/i18n/en/tables.js.map +1 -0
  813. package/dist/i18n/en/themes.js +26 -0
  814. package/dist/i18n/en/themes.js.map +1 -0
  815. package/dist/i18n/en/toolbar.js +22 -0
  816. package/dist/i18n/en/toolbar.js.map +1 -0
  817. package/dist/i18n/en/transcript.js +10 -0
  818. package/dist/i18n/en/transcript.js.map +1 -0
  819. package/dist/i18n/en/tree.js +31 -0
  820. package/dist/i18n/en/tree.js.map +1 -0
  821. package/dist/i18n/en.js +42 -0
  822. package/dist/i18n/en.js.map +1 -0
  823. package/dist/i18n/index.d.ts +24 -0
  824. package/dist/i18n/index.js +31 -0
  825. package/dist/i18n/index.js.map +1 -0
  826. package/dist/index.d.ts +6 -0
  827. package/dist/index.js +0 -0
  828. package/dist/integrations/composite-ai/composite-fill.d.ts +17 -0
  829. package/dist/integrations/composite-ai/composite-fill.js +129 -0
  830. package/dist/integrations/composite-ai/composite-fill.js.map +1 -0
  831. package/dist/integrations/composite-ai/composite-summary.d.ts +28 -0
  832. package/dist/integrations/composite-ai/composite-summary.js +143 -0
  833. package/dist/integrations/composite-ai/composite-summary.js.map +1 -0
  834. package/dist/integrations/composite-ai/document-transcribe.d.ts +14 -0
  835. package/dist/integrations/composite-ai/document-transcribe.js +89 -0
  836. package/dist/integrations/composite-ai/document-transcribe.js.map +1 -0
  837. package/dist/integrations/composite-ai/index.d.ts +22 -0
  838. package/dist/integrations/composite-ai/index.js +80 -0
  839. package/dist/integrations/composite-ai/index.js.map +1 -0
  840. package/dist/integrations/composite-media/index.d.ts +19 -0
  841. package/dist/integrations/composite-media/index.js +72 -0
  842. package/dist/integrations/composite-media/index.js.map +1 -0
  843. package/dist/integrations/transcript-ai/index.d.ts +16 -0
  844. package/dist/integrations/transcript-ai/index.js +63 -0
  845. package/dist/integrations/transcript-ai/index.js.map +1 -0
  846. package/dist/integrations/transcript-ai/protocol.d.ts +68 -0
  847. package/dist/integrations/transcript-ai/protocol.js +132 -0
  848. package/dist/integrations/transcript-ai/protocol.js.map +1 -0
  849. package/dist/integrations/transcript-ai/transcript-cleanup.d.ts +35 -0
  850. package/dist/integrations/transcript-ai/transcript-cleanup.js +169 -0
  851. package/dist/integrations/transcript-ai/transcript-cleanup.js.map +1 -0
  852. package/dist/markdown/MarkdownSurface.d.ts +25 -0
  853. package/dist/markdown/MarkdownSurface.js +93 -0
  854. package/dist/markdown/MarkdownSurface.js.map +1 -0
  855. package/dist/markdown/MarkdownSurface.vue.d.ts +76 -0
  856. package/dist/markdown/MarkdownSurface2.js +237 -0
  857. package/dist/markdown/MarkdownSurface2.js.map +1 -0
  858. package/dist/markdown/clipboard.d.ts +17 -0
  859. package/dist/markdown/clipboard.js +125 -0
  860. package/dist/markdown/clipboard.js.map +1 -0
  861. package/dist/markdown/document.d.ts +36 -0
  862. package/dist/markdown/document.js +100 -0
  863. package/dist/markdown/document.js.map +1 -0
  864. package/dist/markdown/frontmatter.d.ts +18 -0
  865. package/dist/markdown/frontmatter.js +32 -0
  866. package/dist/markdown/frontmatter.js.map +1 -0
  867. package/dist/markdown/index.d.ts +6 -0
  868. package/dist/markdown/index.js +6 -0
  869. package/dist/markdown/policy.d.ts +34 -0
  870. package/dist/markdown/policy.js +78 -0
  871. package/dist/markdown/policy.js.map +1 -0
  872. package/dist/markdown/react.d.ts +2 -0
  873. package/dist/markdown/react.js +1 -0
  874. package/dist/markdown/source-mode.d.ts +49 -0
  875. package/dist/markdown/source-mode.js +86 -0
  876. package/dist/markdown/source-mode.js.map +1 -0
  877. package/dist/markdown/vue.d.ts +2 -0
  878. package/dist/markdown/vue.js +1 -0
  879. package/dist/nuxt/module.d.ts +68 -0
  880. package/dist/nuxt/module.js +103 -0
  881. package/dist/nuxt/module.js.map +1 -0
  882. package/dist/nuxt/runtime/install-context.d.ts +17 -0
  883. package/dist/nuxt/runtime/install-context.js +26 -0
  884. package/dist/nuxt/runtime/install-context.js.map +1 -0
  885. package/dist/nuxt/runtime/plugins/editor-context-nuxt-ui.client.ts +8 -0
  886. package/dist/nuxt/runtime/plugins/editor-context-primevue.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 +41 -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/primevue/Alert.js +49 -0
  1200. package/dist/vue/kit/primevue/Alert.js.map +1 -0
  1201. package/dist/vue/kit/primevue/Avatar.js +54 -0
  1202. package/dist/vue/kit/primevue/Avatar.js.map +1 -0
  1203. package/dist/vue/kit/primevue/Badge.js +41 -0
  1204. package/dist/vue/kit/primevue/Badge.js.map +1 -0
  1205. package/dist/vue/kit/primevue/Button.js +112 -0
  1206. package/dist/vue/kit/primevue/Button.js.map +1 -0
  1207. package/dist/vue/kit/primevue/Chip.js +38 -0
  1208. package/dist/vue/kit/primevue/Chip.js.map +1 -0
  1209. package/dist/vue/kit/primevue/DropdownMenu.js +98 -0
  1210. package/dist/vue/kit/primevue/DropdownMenu.js.map +1 -0
  1211. package/dist/vue/kit/primevue/FieldGroup.js +22 -0
  1212. package/dist/vue/kit/primevue/FieldGroup.js.map +1 -0
  1213. package/dist/vue/kit/primevue/FormField.js +56 -0
  1214. package/dist/vue/kit/primevue/FormField.js.map +1 -0
  1215. package/dist/vue/kit/primevue/Icon.js +23 -0
  1216. package/dist/vue/kit/primevue/Icon.js.map +1 -0
  1217. package/dist/vue/kit/primevue/Input.js +96 -0
  1218. package/dist/vue/kit/primevue/Input.js.map +1 -0
  1219. package/dist/vue/kit/primevue/InputMenu.js +122 -0
  1220. package/dist/vue/kit/primevue/InputMenu.js.map +1 -0
  1221. package/dist/vue/kit/primevue/Modal.js +59 -0
  1222. package/dist/vue/kit/primevue/Modal.js.map +1 -0
  1223. package/dist/vue/kit/primevue/Popover.js +135 -0
  1224. package/dist/vue/kit/primevue/Popover.js.map +1 -0
  1225. package/dist/vue/kit/primevue/RadioGroup.js +58 -0
  1226. package/dist/vue/kit/primevue/RadioGroup.js.map +1 -0
  1227. package/dist/vue/kit/primevue/Select.js +68 -0
  1228. package/dist/vue/kit/primevue/Select.js.map +1 -0
  1229. package/dist/vue/kit/primevue/SelectMenu.js +94 -0
  1230. package/dist/vue/kit/primevue/SelectMenu.js.map +1 -0
  1231. package/dist/vue/kit/primevue/Separator.js +16 -0
  1232. package/dist/vue/kit/primevue/Separator.js.map +1 -0
  1233. package/dist/vue/kit/primevue/Switch.js +46 -0
  1234. package/dist/vue/kit/primevue/Switch.js.map +1 -0
  1235. package/dist/vue/kit/primevue/Table.js +54 -0
  1236. package/dist/vue/kit/primevue/Table.js.map +1 -0
  1237. package/dist/vue/kit/primevue/Tabs.js +49 -0
  1238. package/dist/vue/kit/primevue/Tabs.js.map +1 -0
  1239. package/dist/vue/kit/primevue/Textarea.js +55 -0
  1240. package/dist/vue/kit/primevue/Textarea.js.map +1 -0
  1241. package/dist/vue/kit/primevue/Tooltip.js +43 -0
  1242. package/dist/vue/kit/primevue/Tooltip.js.map +1 -0
  1243. package/dist/vue/kit/primevue/Tree.js +75 -0
  1244. package/dist/vue/kit/primevue/Tree.js.map +1 -0
  1245. package/dist/vue/kit/primevue/select-options.js +55 -0
  1246. package/dist/vue/kit/primevue/select-options.js.map +1 -0
  1247. package/dist/vue/kit/primevue/shared.js +49 -0
  1248. package/dist/vue/kit/primevue/shared.js.map +1 -0
  1249. package/dist/vue/kit/primevue/trigger.js +25 -0
  1250. package/dist/vue/kit/primevue/trigger.js.map +1 -0
  1251. package/dist/vue/kit/primevue.css +86 -0
  1252. package/dist/vue/kit/primevue.d.ts +33 -0
  1253. package/dist/vue/kit/primevue.js +96 -0
  1254. package/dist/vue/kit/primevue.js.map +1 -0
  1255. package/dist/vue/kit/types.d.ts +370 -0
  1256. package/dist/vue/kit/use-ui-kit.d.ts +12 -0
  1257. package/dist/vue/kit/use-ui-kit.js +17 -0
  1258. package/dist/vue/kit/use-ui-kit.js.map +1 -0
  1259. package/dist/vue/notify.d.ts +12 -0
  1260. package/dist/vue/notify.js +27 -0
  1261. package/dist/vue/notify.js.map +1 -0
  1262. package/dist/vue/settings.d.ts +16 -0
  1263. package/dist/vue/settings.js +64 -0
  1264. package/dist/vue/settings.js.map +1 -0
  1265. package/dist/vue/simple.d.ts +2 -0
  1266. package/dist/vue/simple.js +1 -0
  1267. package/dist/vue/store-ref.d.ts +20 -0
  1268. package/dist/vue/store-ref.js +59 -0
  1269. package/dist/vue/store-ref.js.map +1 -0
  1270. package/dist/vue/suggestion-renderer.d.ts +6 -0
  1271. package/dist/vue/suggestion-renderer.js +20 -0
  1272. package/dist/vue/suggestion-renderer.js.map +1 -0
  1273. package/dist/vue/use-editor-i18n.d.ts +12 -0
  1274. package/dist/vue/use-editor-i18n.js +17 -0
  1275. package/dist/vue/use-editor-i18n.js.map +1 -0
  1276. package/dist/vue/use-editor-ui.d.ts +15 -0
  1277. package/dist/vue/use-editor-ui.js +23 -0
  1278. package/dist/vue/use-editor-ui.js.map +1 -0
  1279. package/dist/vue/use-notifier.d.ts +11 -0
  1280. package/dist/vue/use-notifier.js +19 -0
  1281. package/dist/vue/use-notifier.js.map +1 -0
  1282. package/docs/extending.md +538 -0
  1283. package/docs/integration.md +537 -0
  1284. package/docs/llms.md +375 -0
  1285. package/docs/usage.md +1071 -0
  1286. package/package.json +634 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","names":[],"sources":["../../src/markdown/document.ts"],"sourcesContent":["import type { Editor, JSONContent } from '@tiptap/core'\nimport { splitFences } from '../core/fences'\nimport { parseBlocks, pipelineOf } from '../core/pipeline'\nimport { EMPTY_EDITOR_CONTENT } from '../core/schema'\nimport { editorEntryOf } from '../core/editor-ui'\nimport { createTranslator, type Translate } from '../i18n'\nimport { enforceUrlPolicy, locate, type MarkdownDiagnostic, type MarkdownPolicy } from './policy'\n\n/** A Markdown body as document JSON, with what the parse dropped or could not understand. */\nexport interface MarkdownContent {\n content: JSONContent\n diagnostics: MarkdownDiagnostic[]\n}\n\n/** The part of `@tiptap/markdown`'s manager the HTML policy swaps out for the duration of one parse. */\ninterface HtmlParsing {\n parseHTMLToken: (token: { raw?: string, text?: string }) => unknown\n}\n\n/**\n * Runs `parse` with raw HTML tokens (block and inline, tags and comments) dropped instead of handed to the schema's\n * `parseHTML` rules, and reports each in `diagnostics`.\n */\nfunction withoutRawHtml<T>(editor: Editor, source: string, diagnostics: MarkdownDiagnostic[], t: Translate, parse: () => T): T {\n const manager = editor.markdown as unknown as HtmlParsing | undefined\n if (!manager) return parse()\n const own = Object.hasOwn(manager, 'parseHTMLToken')\n const original = manager.parseHTMLToken\n let from = 0\n manager.parseHTMLToken = (token) => {\n const html = (token.raw ?? token.text ?? '').trim()\n if (html) {\n const { line, next } = locate(source, html, from)\n from = next\n diagnostics.push({ code: 'raw-html', severity: 'warning', message: t('markdown.diagnostic.rawHtml', { html: JSON.stringify(html.length > 60 ? `${html.slice(0, 57)}…` : html) }), ...(line && { line }) })\n }\n return null\n }\n try {\n return parse()\n }\n finally {\n if (own) manager.parseHTMLToken = original\n else delete (manager as Partial<HtmlParsing>).parseHTMLToken\n }\n}\n\nconst opaqueFences = (node: JSONContent): JSONContent[] => [...(node.type === 'opaqueFence' ? [node] : []), ...(node.content ?? []).flatMap(opaqueFences)]\n\n/**\n * `body` (Markdown without frontmatter) as the document JSON of `editor`, plus `diagnostics`: the preset's block\n * pipeline parses it (`parseBlocks`: Markdown tokens, then the features' normalize and segment stages), the blocks\n * become the children of a `doc`, `policy` is enforced and the preset's `migrateContent` stage runs. An empty body is\n * the empty document (one empty paragraph). Nothing is applied to the editor.\n *\n * The diagnostics' `message` is in the language of `options.t`, by default that of the editor's registered surface, else\n * the default locale.\n *\n * Diagnostics: `raw-html` (dropped unless `policy.allowHtml`), `unsafe-url` (links and media with a scheme other than\n * http(s), mailto and tel are dropped; base64 `data:image` URLs are kept only with `policy.allowDataUrls`),\n * `unknown-fence` (a `:::` fence of a kind no feature registered, kept verbatim as an `opaqueFence`), and the fatal\n * `unclosed-fence` and `invalid-fence-meta` (a fence opener that stayed plain text).\n */\nexport function markdownToContent(editor: Editor, body: string, options: { policy?: MarkdownPolicy, t?: Translate } = {}): MarkdownContent {\n const policy = options.policy ?? {}\n const t = options.t ?? editorEntryOf(editor)?.ctx.t ?? createTranslator()\n const diagnostics: MarkdownDiagnostic[] = []\n\n const { blocks } = policy.allowHtml ? parseBlocks(editor, body) : withoutRawHtml(editor, body, diagnostics, t, () => parseBlocks(editor, body))\n let content: JSONContent = blocks.length ? { type: 'doc', content: blocks } : EMPTY_EDITOR_CONTENT\n content = enforceUrlPolicy(content, policy, body, diagnostics, t)\n if (!content.content?.length) content = EMPTY_EDITOR_CONTENT\n\n for (const problem of splitFences(body).problems) {\n diagnostics.push({\n code: problem.code,\n severity: 'error',\n line: problem.line,\n message: t(problem.code === 'unclosed-fence' ? 'markdown.diagnostic.unclosedFence' : 'markdown.diagnostic.invalidFenceMeta', { kind: problem.kind }),\n })\n }\n let from = 0\n for (const fence of opaqueFences(content)) {\n const raw = String(fence.attrs?.raw ?? '')\n const { line, next } = locate(body, raw, from)\n from = next\n diagnostics.push({ code: 'unknown-fence', severity: 'info', message: t('markdown.diagnostic.unknownFence', { kind: String(fence.attrs?.kind) }), ...(line && { line }) })\n }\n\n return { content: pipelineOf(editor).migrateContent(content), diagnostics }\n}\n\n/**\n * The document of `editor` as Markdown (`editor.getMarkdown()`: the registered Markdown handlers render every node,\n * tables as pipe tables and task items as `- [ ]`/`- [x]`), without trailing line breaks: Tiptap keeps an empty\n * paragraph after a last block that is not a paragraph, and it is not content. Callers that write files add their own\n * final line break.\n */\nexport function contentToMarkdown(editor: Editor): string {\n return editor.getMarkdown().replace(/\\n+$/, '')\n}\n"],"mappings":";;;;;;;;;;;AAuBA,SAAS,eAAkB,QAAgB,QAAgB,aAAmC,GAAc,OAAmB;CAC7H,MAAM,UAAU,OAAO;CACvB,IAAI,CAAC,SAAS,OAAO,MAAM;CAC3B,MAAM,MAAM,OAAO,OAAO,SAAS,gBAAgB;CACnD,MAAM,WAAW,QAAQ;CACzB,IAAI,OAAO;CACX,QAAQ,kBAAkB,UAAU;EAClC,MAAM,QAAQ,MAAM,OAAO,MAAM,QAAQ,GAAA,CAAI,KAAK;EAClD,IAAI,MAAM;GACR,MAAM,EAAE,MAAM,SAAS,OAAO,QAAQ,MAAM,IAAI;GAChD,OAAO;GACP,YAAY,KAAK;IAAE,MAAM;IAAY,UAAU;IAAW,SAAS,EAAE,+BAA+B,EAAE,MAAM,KAAK,UAAU,KAAK,SAAS,KAAK,GAAG,KAAK,MAAM,GAAG,EAAE,EAAE,KAAK,IAAI,EAAE,CAAC;IAAG,GAAI,QAAQ,EAAE,KAAK;GAAG,CAAC;EAC3M;EACA,OAAO;CACT;CACA,IAAI;EACF,OAAO,MAAM;CACf,UACQ;EACN,IAAI,KAAK,QAAQ,iBAAiB;OAC7B,OAAQ,QAAiC;CAChD;AACF;AAEA,MAAM,gBAAgB,SAAqC,CAAC,GAAI,KAAK,SAAS,gBAAgB,CAAC,IAAI,IAAI,CAAC,GAAI,IAAI,KAAK,WAAW,CAAC,EAAA,CAAG,QAAQ,YAAY,CAAC;;;;;;;;;;;;;;;AAgBzJ,SAAgB,kBAAkB,QAAgB,MAAc,UAAsD,CAAC,GAAoB;CACzI,MAAM,SAAS,QAAQ,UAAU,CAAC;CAClC,MAAM,IAAI,QAAQ,KAAK,cAAc,MAAM,CAAC,EAAE,IAAI,KAAK,iBAAiB;CACxE,MAAM,cAAoC,CAAC;CAE3C,MAAM,EAAE,WAAW,OAAO,YAAY,YAAY,QAAQ,IAAI,IAAI,eAAe,QAAQ,MAAM,aAAa,SAAS,YAAY,QAAQ,IAAI,CAAC;CAC9I,IAAI,UAAuB,OAAO,SAAS;EAAE,MAAM;EAAO,SAAS;CAAO,IAAI;CAC9E,UAAU,iBAAiB,SAAS,QAAQ,MAAM,aAAa,CAAC;CAChE,IAAI,CAAC,QAAQ,SAAS,QAAQ,UAAU;CAExC,KAAK,MAAM,WAAW,YAAY,IAAI,CAAC,CAAC,UACtC,YAAY,KAAK;EACf,MAAM,QAAQ;EACd,UAAU;EACV,MAAM,QAAQ;EACd,SAAS,EAAE,QAAQ,SAAS,mBAAmB,sCAAsC,wCAAwC,EAAE,MAAM,QAAQ,KAAK,CAAC;CACrJ,CAAC;CAEH,IAAI,OAAO;CACX,KAAK,MAAM,SAAS,aAAa,OAAO,GAAG;EACzC,MAAM,MAAM,OAAO,MAAM,OAAO,OAAO,EAAE;EACzC,MAAM,EAAE,MAAM,SAAS,OAAO,MAAM,KAAK,IAAI;EAC7C,OAAO;EACP,YAAY,KAAK;GAAE,MAAM;GAAiB,UAAU;GAAQ,SAAS,EAAE,oCAAoC,EAAE,MAAM,OAAO,MAAM,OAAO,IAAI,EAAE,CAAC;GAAG,GAAI,QAAQ,EAAE,KAAK;EAAG,CAAC;CAC1K;CAEA,OAAO;EAAE,SAAS,WAAW,MAAM,CAAC,CAAC,eAAe,OAAO;EAAG;CAAY;AAC5E;;;;;;;AAQA,SAAgB,kBAAkB,QAAwB;CACxD,OAAO,OAAO,YAAY,CAAC,CAAC,QAAQ,QAAQ,EAAE;AAChD"}
@@ -0,0 +1,18 @@
1
+ //#region src/markdown/frontmatter.d.ts
2
+ /** A Markdown text split into its YAML frontmatter block and the body after it. */
3
+ export interface SplitMarkdown {
4
+ /** The frontmatter block verbatim, both `---` fence lines, the line break after the closing one and the blank lines separating it from the body included; null when the text has none. */
5
+ frontmatter: string | null;
6
+ /** Everything after the frontmatter block (the whole text without one). */
7
+ body: string;
8
+ }
9
+ /**
10
+ * Splits YAML frontmatter off `text`. The block is only recognised at offset 0 (a `---` line further down is a thematic
11
+ * break or a table border, never frontmatter) and is returned verbatim, so `joinFrontmatter(...splitFrontmatter(text))`
12
+ * gives `text` back byte for byte. The YAML itself is not parsed.
13
+ */
14
+ export declare function splitFrontmatter(text: string): SplitMarkdown;
15
+ /** `body` behind `frontmatter` (as `splitFrontmatter` returns it); without frontmatter, `body` itself. */
16
+ export declare function joinFrontmatter(frontmatter: string | null, body: string): string;
17
+ //#endregion
18
+ //# sourceMappingURL=frontmatter.d.ts.map
@@ -0,0 +1,32 @@
1
+ //#region src/markdown/frontmatter.ts
2
+ /**
3
+ * `---`, any lines, `---`: each fence on a line of its own, the closing one ended by a line break or the end of the text.
4
+ * Blank lines after the closing fence belong to the block: the body serializer never writes leading blank lines, so a
5
+ * separator kept in the body would vanish on the first edit.
6
+ */
7
+ const FRONTMATTER = /^---[ \t]*\r?\n(?:[\s\S]*?\r?\n)?---[ \t]*(?:\r?\n(?:[ \t]*\r?\n)*|$)/;
8
+ /**
9
+ * Splits YAML frontmatter off `text`. The block is only recognised at offset 0 (a `---` line further down is a thematic
10
+ * break or a table border, never frontmatter) and is returned verbatim, so `joinFrontmatter(...splitFrontmatter(text))`
11
+ * gives `text` back byte for byte. The YAML itself is not parsed.
12
+ */
13
+ function splitFrontmatter(text) {
14
+ const match = FRONTMATTER.exec(text);
15
+ if (!match) return {
16
+ frontmatter: null,
17
+ body: text
18
+ };
19
+ return {
20
+ frontmatter: match[0],
21
+ body: text.slice(match[0].length)
22
+ };
23
+ }
24
+ /** `body` behind `frontmatter` (as `splitFrontmatter` returns it); without frontmatter, `body` itself. */
25
+ function joinFrontmatter(frontmatter, body) {
26
+ if (frontmatter === null) return body;
27
+ return frontmatter.endsWith("\n") || !body ? frontmatter + body : `${frontmatter}\n${body}`;
28
+ }
29
+ //#endregion
30
+ export { joinFrontmatter, splitFrontmatter };
31
+
32
+ //# sourceMappingURL=frontmatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontmatter.js","names":[],"sources":["../../src/markdown/frontmatter.ts"],"sourcesContent":["/** A Markdown text split into its YAML frontmatter block and the body after it. */\nexport interface SplitMarkdown {\n /** The frontmatter block verbatim, both `---` fence lines, the line break after the closing one and the blank lines separating it from the body included; null when the text has none. */\n frontmatter: string | null\n /** Everything after the frontmatter block (the whole text without one). */\n body: string\n}\n\n/**\n * `---`, any lines, `---`: each fence on a line of its own, the closing one ended by a line break or the end of the text.\n * Blank lines after the closing fence belong to the block: the body serializer never writes leading blank lines, so a\n * separator kept in the body would vanish on the first edit.\n */\nconst FRONTMATTER = /^---[ \\t]*\\r?\\n(?:[\\s\\S]*?\\r?\\n)?---[ \\t]*(?:\\r?\\n(?:[ \\t]*\\r?\\n)*|$)/\n\n/**\n * Splits YAML frontmatter off `text`. The block is only recognised at offset 0 (a `---` line further down is a thematic\n * break or a table border, never frontmatter) and is returned verbatim, so `joinFrontmatter(...splitFrontmatter(text))`\n * gives `text` back byte for byte. The YAML itself is not parsed.\n */\nexport function splitFrontmatter(text: string): SplitMarkdown {\n const match = FRONTMATTER.exec(text)\n if (!match) return { frontmatter: null, body: text }\n return { frontmatter: match[0], body: text.slice(match[0].length) }\n}\n\n/** `body` behind `frontmatter` (as `splitFrontmatter` returns it); without frontmatter, `body` itself. */\nexport function joinFrontmatter(frontmatter: string | null, body: string): string {\n if (frontmatter === null) return body\n // A closing fence at the very end of the text has no line break yet; the body must not run into it.\n return frontmatter.endsWith('\\n') || !body ? frontmatter + body : `${frontmatter}\\n${body}`\n}\n"],"mappings":";;;;;;AAaA,MAAM,cAAc;;;;;;AAOpB,SAAgB,iBAAiB,MAA6B;CAC5D,MAAM,QAAQ,YAAY,KAAK,IAAI;CACnC,IAAI,CAAC,OAAO,OAAO;EAAE,aAAa;EAAM,MAAM;CAAK;CACnD,OAAO;EAAE,aAAa,MAAM;EAAI,MAAM,KAAK,MAAM,MAAM,EAAE,CAAC,MAAM;CAAE;AACpE;;AAGA,SAAgB,gBAAgB,aAA4B,MAAsB;CAChF,IAAI,gBAAgB,MAAM,OAAO;CAEjC,OAAO,YAAY,SAAS,IAAI,KAAK,CAAC,OAAO,cAAc,OAAO,GAAG,YAAY,IAAI;AACvF"}
@@ -0,0 +1,6 @@
1
+ import { MarkdownDiagnostic, MarkdownDiagnosticCode, MarkdownPolicy, hasFatalDiagnostics } from "./policy.js";
2
+ import { MarkdownContent, contentToMarkdown, markdownToContent } from "./document.js";
3
+ import { SourceMode, SourceModeOptions, SourceModeState, createSourceMode } from "./source-mode.js";
4
+ import { MarkdownClipboard, MarkdownClipboardOptions } from "./clipboard.js";
5
+ import { SplitMarkdown, joinFrontmatter, splitFrontmatter } from "./frontmatter.js";
6
+ export { MarkdownClipboard, type MarkdownClipboardOptions, type MarkdownContent, type MarkdownDiagnostic, type MarkdownDiagnosticCode, type MarkdownPolicy, type SourceMode, type SourceModeOptions, type SourceModeState, type SplitMarkdown, contentToMarkdown, createSourceMode, hasFatalDiagnostics, joinFrontmatter, markdownToContent, splitFrontmatter };
@@ -0,0 +1,6 @@
1
+ import { hasFatalDiagnostics } from "./policy.js";
2
+ import { contentToMarkdown, markdownToContent } from "./document.js";
3
+ import { MarkdownClipboard } from "./clipboard.js";
4
+ import { joinFrontmatter, splitFrontmatter } from "./frontmatter.js";
5
+ import { createSourceMode } from "./source-mode.js";
6
+ export { MarkdownClipboard, contentToMarkdown, createSourceMode, hasFatalDiagnostics, joinFrontmatter, markdownToContent, splitFrontmatter };
@@ -0,0 +1,34 @@
1
+ import { JSONContent } from "@tiptap/core";
2
+ //#region src/markdown/policy.d.ts
3
+ /** What a Markdown text may carry into the editor. Everything not allowed is dropped and reported as a diagnostic. */
4
+ export interface MarkdownPolicy {
5
+ /** Keep raw HTML (it becomes whatever the schema's `parseHTML` rules make of it). Default: dropped. */
6
+ allowHtml?: boolean;
7
+ /** Keep base64 raster `data:image/…` URLs on images. Default: dropped; links never carry `data:` URLs. */
8
+ allowDataUrls?: boolean;
9
+ }
10
+ export type MarkdownDiagnosticCode =
11
+ /** Raw HTML was dropped (`policy.allowHtml` is off). */
12
+ 'raw-html' |
13
+ /** A link or media URL with an unsafe scheme (`javascript:`, `data:`, …) was dropped. */
14
+ 'unsafe-url' |
15
+ /** A `::: kind` fence of an unregistered kind is kept verbatim as an opaque block. */
16
+ 'unknown-fence' |
17
+ /** A `::: kind` opener has no closing `:::`; the line stays plain text. */
18
+ 'unclosed-fence' |
19
+ /** A `::: kind {…}` opener whose `{…}` is no JSON object; the line stays plain text. */
20
+ 'invalid-fence-meta' |
21
+ /** The parsed document does not fit the editor's schema. */
22
+ 'invalid-document';
23
+ export interface MarkdownDiagnostic {
24
+ code: MarkdownDiagnosticCode;
25
+ /** `error` diagnostics are fatal: source mode refuses to commit a text that has one. */
26
+ severity: 'info' | 'warning' | 'error';
27
+ message: string;
28
+ /** 1-based line of the text the diagnostic is about, when it could be located. */
29
+ line?: number;
30
+ }
31
+ /** Whether any of `diagnostics` is fatal (severity `error`). */
32
+ export declare const hasFatalDiagnostics: (diagnostics: readonly MarkdownDiagnostic[]) => boolean;
33
+ //#endregion
34
+ //# sourceMappingURL=policy.d.ts.map
@@ -0,0 +1,78 @@
1
+ //#region src/markdown/policy.ts
2
+ /** Whether any of `diagnostics` is fatal (severity `error`). */
3
+ const hasFatalDiagnostics = (diagnostics) => diagnostics.some((diagnostic) => diagnostic.severity === "error");
4
+ const stripped = (url) => url.replace(/[\u0000-\u0020\u007f]/g, "");
5
+ const SAFE_SCHEMES = /^(?:https?:|mailto:|tel:)/i;
6
+ const HAS_SCHEME = /^[a-z][a-z\d+.-]*:/i;
7
+ const DATA_IMAGE = /^data:image\/(?:png|gif|jpe?g|webp);base64,[a-z\d+/]+={0,2}$/i;
8
+ /** Whether a link may keep `url`: relative references, fragments and `http(s)`, `mailto` and `tel`. */
9
+ function isSafeUrl(url) {
10
+ const value = stripped(url);
11
+ return !HAS_SCHEME.test(value) || SAFE_SCHEMES.test(value);
12
+ }
13
+ /** Whether media may keep `url`: a safe link URL (no `mailto`/`tel`) or, when `policy.allowDataUrls` is on, a base64 raster `data:` URL. Backslashes and whitespace inside the URL are never allowed. */
14
+ function isSafeMediaUrl(url, policy = {}) {
15
+ const value = url.trim();
16
+ if (!value || /[\u0000-\u0020\u007f\\]/.test(value)) return false;
17
+ if (/^data:/i.test(value)) return policy.allowDataUrls === true && DATA_IMAGE.test(value);
18
+ return /^https?:/i.test(value) || !HAS_SCHEME.test(value);
19
+ }
20
+ /** 1-based line of the first occurrence of `needle` in `text` after `from`, or undefined; `from` is returned as the new search start. */
21
+ function locate(text, needle, from = 0) {
22
+ const index = needle ? text.indexOf(needle, from) : -1;
23
+ if (index < 0) return {
24
+ line: void 0,
25
+ next: from
26
+ };
27
+ let line = 1;
28
+ for (let i = text.indexOf("\n"); i !== -1 && i < index; i = text.indexOf("\n", i + 1)) line++;
29
+ return {
30
+ line,
31
+ next: index + needle.length
32
+ };
33
+ }
34
+ /**
35
+ * `content` with every link mark whose `href` is unsafe removed (the text stays) and every node whose `src` is unsafe
36
+ * dropped; each is reported as `unsafe-url`. `source` is the Markdown text, used to locate the URLs.
37
+ */
38
+ function enforceUrlPolicy(content, policy, source, diagnostics, t) {
39
+ const cursors = /* @__PURE__ */ new Map();
40
+ const report = (url, what) => {
41
+ const { line, next } = locate(source, url, cursors.get(url) ?? 0);
42
+ cursors.set(url, next);
43
+ const shown = JSON.stringify(url.length > 60 ? `${url.slice(0, 57)}…` : url);
44
+ diagnostics.push({
45
+ code: "unsafe-url",
46
+ severity: "warning",
47
+ message: what ? t("markdown.diagnostic.unsafeMedia", {
48
+ type: what,
49
+ url: shown
50
+ }) : t("markdown.diagnostic.unsafeLink", { url: shown }),
51
+ ...line && { line }
52
+ });
53
+ };
54
+ const visit = (node) => {
55
+ const src = node.attrs?.src;
56
+ if (typeof src === "string" && !isSafeMediaUrl(src, policy)) {
57
+ report(src, node.type ?? "media");
58
+ return [];
59
+ }
60
+ const marks = node.marks?.filter((mark) => {
61
+ const href = mark.type === "link" ? mark.attrs?.href : void 0;
62
+ if (typeof href !== "string" || isSafeUrl(href)) return true;
63
+ report(href, void 0);
64
+ return false;
65
+ });
66
+ const { marks: _marks, content: children, ...rest } = node;
67
+ return [{
68
+ ...rest,
69
+ ...marks?.length && { marks },
70
+ ...children && { content: children.flatMap(visit) }
71
+ }];
72
+ };
73
+ return visit(content)[0];
74
+ }
75
+ //#endregion
76
+ export { enforceUrlPolicy, hasFatalDiagnostics, isSafeMediaUrl, isSafeUrl, locate };
77
+
78
+ //# sourceMappingURL=policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.js","names":[],"sources":["../../src/markdown/policy.ts"],"sourcesContent":["import type { JSONContent } from '@tiptap/core'\nimport type { Translate } from '../i18n'\n\n/** What a Markdown text may carry into the editor. Everything not allowed is dropped and reported as a diagnostic. */\nexport interface MarkdownPolicy {\n /** Keep raw HTML (it becomes whatever the schema's `parseHTML` rules make of it). Default: dropped. */\n allowHtml?: boolean\n /** Keep base64 raster `data:image/…` URLs on images. Default: dropped; links never carry `data:` URLs. */\n allowDataUrls?: boolean\n}\n\nexport type MarkdownDiagnosticCode =\n /** Raw HTML was dropped (`policy.allowHtml` is off). */\n | 'raw-html'\n /** A link or media URL with an unsafe scheme (`javascript:`, `data:`, …) was dropped. */\n | 'unsafe-url'\n /** A `::: kind` fence of an unregistered kind is kept verbatim as an opaque block. */\n | 'unknown-fence'\n /** A `::: kind` opener has no closing `:::`; the line stays plain text. */\n | 'unclosed-fence'\n /** A `::: kind {…}` opener whose `{…}` is no JSON object; the line stays plain text. */\n | 'invalid-fence-meta'\n /** The parsed document does not fit the editor's schema. */\n | 'invalid-document'\n\nexport interface MarkdownDiagnostic {\n code: MarkdownDiagnosticCode\n /** `error` diagnostics are fatal: source mode refuses to commit a text that has one. */\n severity: 'info' | 'warning' | 'error'\n message: string\n /** 1-based line of the text the diagnostic is about, when it could be located. */\n line?: number\n}\n\n/** Whether any of `diagnostics` is fatal (severity `error`). */\nexport const hasFatalDiagnostics = (diagnostics: readonly MarkdownDiagnostic[]): boolean => diagnostics.some(diagnostic => diagnostic.severity === 'error')\n\n// Browsers drop tabs, line breaks and other control characters inside a URL's scheme (`java\\nscript:`), so the check does.\nconst stripped = (url: string): string => url.replace(/[\\u0000-\\u0020\\u007f]/g, '')\n\nconst SAFE_SCHEMES = /^(?:https?:|mailto:|tel:)/i\nconst HAS_SCHEME = /^[a-z][a-z\\d+.-]*:/i\nconst DATA_IMAGE = /^data:image\\/(?:png|gif|jpe?g|webp);base64,[a-z\\d+/]+={0,2}$/i\n\n/** Whether a link may keep `url`: relative references, fragments and `http(s)`, `mailto` and `tel`. */\nexport function isSafeUrl(url: string): boolean {\n const value = stripped(url)\n return !HAS_SCHEME.test(value) || SAFE_SCHEMES.test(value)\n}\n\n/** Whether media may keep `url`: a safe link URL (no `mailto`/`tel`) or, when `policy.allowDataUrls` is on, a base64 raster `data:` URL. Backslashes and whitespace inside the URL are never allowed. */\nexport function isSafeMediaUrl(url: string, policy: MarkdownPolicy = {}): boolean {\n const value = url.trim()\n if (!value || /[\\u0000-\\u0020\\u007f\\\\]/.test(value)) return false\n if (/^data:/i.test(value)) return policy.allowDataUrls === true && DATA_IMAGE.test(value)\n return /^https?:/i.test(value) || !HAS_SCHEME.test(value)\n}\n\n/** 1-based line of the first occurrence of `needle` in `text` after `from`, or undefined; `from` is returned as the new search start. */\nexport function locate(text: string, needle: string, from = 0): { line: number | undefined, next: number } {\n const index = needle ? text.indexOf(needle, from) : -1\n if (index < 0) return { line: undefined, next: from }\n let line = 1\n for (let i = text.indexOf('\\n'); i !== -1 && i < index; i = text.indexOf('\\n', i + 1)) line++\n return { line, next: index + needle.length }\n}\n\n/**\n * `content` with every link mark whose `href` is unsafe removed (the text stays) and every node whose `src` is unsafe\n * dropped; each is reported as `unsafe-url`. `source` is the Markdown text, used to locate the URLs.\n */\nexport function enforceUrlPolicy(content: JSONContent, policy: MarkdownPolicy, source: string, diagnostics: MarkdownDiagnostic[], t: Translate): JSONContent {\n const cursors = new Map<string, number>()\n const report = (url: string, what: string | undefined) => {\n const { line, next } = locate(source, url, cursors.get(url) ?? 0)\n cursors.set(url, next)\n const shown = JSON.stringify(url.length > 60 ? `${url.slice(0, 57)}…` : url)\n diagnostics.push({ code: 'unsafe-url', severity: 'warning', message: what ? t('markdown.diagnostic.unsafeMedia', { type: what, url: shown }) : t('markdown.diagnostic.unsafeLink', { url: shown }), ...(line && { line }) })\n }\n const visit = (node: JSONContent): JSONContent[] => {\n const src: unknown = node.attrs?.src\n if (typeof src === 'string' && !isSafeMediaUrl(src, policy)) {\n report(src, node.type ?? 'media')\n return []\n }\n const marks = node.marks?.filter((mark) => {\n const href: unknown = mark.type === 'link' ? mark.attrs?.href : undefined\n if (typeof href !== 'string' || isSafeUrl(href)) return true\n report(href, undefined)\n return false\n })\n const { marks: _marks, content: children, ...rest } = node\n return [{ ...rest, ...(marks?.length && { marks }), ...(children && { content: children.flatMap(visit) }) }]\n }\n return visit(content)[0]!\n}\n"],"mappings":";;AAmCA,MAAa,uBAAuB,gBAAwD,YAAY,MAAK,eAAc,WAAW,aAAa,OAAO;AAG1J,MAAM,YAAY,QAAwB,IAAI,QAAQ,0BAA0B,EAAE;AAElF,MAAM,eAAe;AACrB,MAAM,aAAa;AACnB,MAAM,aAAa;;AAGnB,SAAgB,UAAU,KAAsB;CAC9C,MAAM,QAAQ,SAAS,GAAG;CAC1B,OAAO,CAAC,WAAW,KAAK,KAAK,KAAK,aAAa,KAAK,KAAK;AAC3D;;AAGA,SAAgB,eAAe,KAAa,SAAyB,CAAC,GAAY;CAChF,MAAM,QAAQ,IAAI,KAAK;CACvB,IAAI,CAAC,SAAS,0BAA0B,KAAK,KAAK,GAAG,OAAO;CAC5D,IAAI,UAAU,KAAK,KAAK,GAAG,OAAO,OAAO,kBAAkB,QAAQ,WAAW,KAAK,KAAK;CACxF,OAAO,YAAY,KAAK,KAAK,KAAK,CAAC,WAAW,KAAK,KAAK;AAC1D;;AAGA,SAAgB,OAAO,MAAc,QAAgB,OAAO,GAA+C;CACzG,MAAM,QAAQ,SAAS,KAAK,QAAQ,QAAQ,IAAI,IAAI;CACpD,IAAI,QAAQ,GAAG,OAAO;EAAE,MAAM,KAAA;EAAW,MAAM;CAAK;CACpD,IAAI,OAAO;CACX,KAAK,IAAI,IAAI,KAAK,QAAQ,IAAI,GAAG,MAAM,MAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,MAAM,IAAI,CAAC,GAAG;CACvF,OAAO;EAAE;EAAM,MAAM,QAAQ,OAAO;CAAO;AAC7C;;;;;AAMA,SAAgB,iBAAiB,SAAsB,QAAwB,QAAgB,aAAmC,GAA2B;CAC3J,MAAM,0BAAU,IAAI,IAAoB;CACxC,MAAM,UAAU,KAAa,SAA6B;EACxD,MAAM,EAAE,MAAM,SAAS,OAAO,QAAQ,KAAK,QAAQ,IAAI,GAAG,KAAK,CAAC;EAChE,QAAQ,IAAI,KAAK,IAAI;EACrB,MAAM,QAAQ,KAAK,UAAU,IAAI,SAAS,KAAK,GAAG,IAAI,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG;EAC3E,YAAY,KAAK;GAAE,MAAM;GAAc,UAAU;GAAW,SAAS,OAAO,EAAE,mCAAmC;IAAE,MAAM;IAAM,KAAK;GAAM,CAAC,IAAI,EAAE,kCAAkC,EAAE,KAAK,MAAM,CAAC;GAAG,GAAI,QAAQ,EAAE,KAAK;EAAG,CAAC;CAC7N;CACA,MAAM,SAAS,SAAqC;EAClD,MAAM,MAAe,KAAK,OAAO;EACjC,IAAI,OAAO,QAAQ,YAAY,CAAC,eAAe,KAAK,MAAM,GAAG;GAC3D,OAAO,KAAK,KAAK,QAAQ,OAAO;GAChC,OAAO,CAAC;EACV;EACA,MAAM,QAAQ,KAAK,OAAO,QAAQ,SAAS;GACzC,MAAM,OAAgB,KAAK,SAAS,SAAS,KAAK,OAAO,OAAO,KAAA;GAChE,IAAI,OAAO,SAAS,YAAY,UAAU,IAAI,GAAG,OAAO;GACxD,OAAO,MAAM,KAAA,CAAS;GACtB,OAAO;EACT,CAAC;EACD,MAAM,EAAE,OAAO,QAAQ,SAAS,UAAU,GAAG,SAAS;EACtD,OAAO,CAAC;GAAE,GAAG;GAAM,GAAI,OAAO,UAAU,EAAE,MAAM;GAAI,GAAI,YAAY,EAAE,SAAS,SAAS,QAAQ,KAAK,EAAE;EAAG,CAAC;CAC7G;CACA,OAAO,MAAM,OAAO,CAAC,CAAC;AACxB"}
@@ -0,0 +1,2 @@
1
+ import { MarkdownSurface, MarkdownSurfaceProps } from "./MarkdownSurface.js";
2
+ export { MarkdownSurface, type MarkdownSurfaceProps };
@@ -0,0 +1 @@
1
+ export { MarkdownSurface } from "./MarkdownSurface.js";
@@ -0,0 +1,49 @@
1
+ import { Translate } from "../i18n/index.js";
2
+ import { ReadonlyStore } from "../core/store.js";
3
+ import { MarkdownDiagnostic, MarkdownPolicy } from "./policy.js";
4
+ import { MarkdownContent } from "./document.js";
5
+ import { Editor } from "@tiptap/core";
6
+ //#region src/markdown/source-mode.d.ts
7
+ export interface SourceModeState {
8
+ mode: 'visual' | 'source';
9
+ /** The draft being edited in source mode (empty in visual mode). Never rewritten by a failed commit. */
10
+ source: string;
11
+ /** What the last `commit` found in the draft; a rejected commit keeps the fatal ones here until the next `enter`, `edit` or `cancel`. */
12
+ diagnostics: readonly MarkdownDiagnostic[];
13
+ }
14
+ export interface SourceMode {
15
+ readonly state: ReadonlyStore<SourceModeState>;
16
+ /** Starts a draft from the editor's current Markdown. False when there is no editable editor yet or it is already in source mode. */
17
+ enter(): boolean;
18
+ /** Replaces the draft (a source view's input handler). Ignored in visual mode. */
19
+ edit(source: string): void;
20
+ /**
21
+ * Parses the whole draft and, only when that gives no fatal diagnostic and fits the editor's schema, replaces the
22
+ * editor's document with it as one undoable edit and returns to visual mode. Otherwise the editor is untouched, the
23
+ * draft and the diagnostics stay in `state`, and the result is false. False as well when not in source mode.
24
+ */
25
+ commit(): boolean;
26
+ /** Discards the draft and returns to visual mode; the editor is untouched. */
27
+ cancel(): void;
28
+ }
29
+ export interface SourceModeOptions {
30
+ /** The editor the draft comes from and is committed to; undefined until it is ready. */
31
+ getEditor: () => Editor | undefined;
32
+ /** The Markdown a draft starts from. Default: `contentToMarkdown`. */
33
+ toMarkdown?: (editor: Editor) => string;
34
+ /** Parses a committed draft. Default: `markdownToContent` with `policy`. */
35
+ fromMarkdown?: (editor: Editor, source: string) => MarkdownContent;
36
+ /** The policy of the default `fromMarkdown`. */
37
+ policy?: MarkdownPolicy;
38
+ /** The translator of the default `fromMarkdown`'s diagnostics. Default: that of the editor's registered surface. */
39
+ t?: Translate;
40
+ }
41
+ /**
42
+ * The state machine behind a whole-document source view: `enter` → `edit`* → `commit` | `cancel`. Framework-free; the
43
+ * view (`MarkdownSurface`'s `sourceMode` prop, or a host's own textarea or code editor) renders `state` and calls the
44
+ * actions. The editor's document is only ever replaced by `commit`, and only by a draft that parsed without fatal
45
+ * diagnostics and fits the schema.
46
+ */
47
+ export declare function createSourceMode(options: SourceModeOptions): SourceMode;
48
+ //#endregion
49
+ //# sourceMappingURL=source-mode.d.ts.map
@@ -0,0 +1,86 @@
1
+ import { createStore } from "../core/store.js";
2
+ import { hasFatalDiagnostics } from "./policy.js";
3
+ import { contentToMarkdown, markdownToContent } from "./document.js";
4
+ //#region src/markdown/source-mode.ts
5
+ const VISUAL = {
6
+ mode: "visual",
7
+ source: "",
8
+ diagnostics: []
9
+ };
10
+ /**
11
+ * The state machine behind a whole-document source view: `enter` → `edit`* → `commit` | `cancel`. Framework-free; the
12
+ * view (`MarkdownSurface`'s `sourceMode` prop, or a host's own textarea or code editor) renders `state` and calls the
13
+ * actions. The editor's document is only ever replaced by `commit`, and only by a draft that parsed without fatal
14
+ * diagnostics and fits the schema.
15
+ */
16
+ function createSourceMode(options) {
17
+ const toMarkdown = options.toMarkdown ?? contentToMarkdown;
18
+ const fromMarkdown = options.fromMarkdown ?? ((editor, source) => markdownToContent(editor, source, {
19
+ policy: options.policy,
20
+ t: options.t
21
+ }));
22
+ const state = createStore(VISUAL);
23
+ return {
24
+ state: {
25
+ get: state.get,
26
+ subscribe: state.subscribe
27
+ },
28
+ enter() {
29
+ const editor = options.getEditor();
30
+ if (!editor || editor.isDestroyed || !editor.isEditable || state.get().mode === "source") return false;
31
+ state.set({
32
+ mode: "source",
33
+ source: toMarkdown(editor),
34
+ diagnostics: []
35
+ });
36
+ return true;
37
+ },
38
+ edit(source) {
39
+ if (state.get().mode === "source") state.set({
40
+ mode: "source",
41
+ source,
42
+ diagnostics: []
43
+ });
44
+ },
45
+ commit() {
46
+ const editor = options.getEditor();
47
+ const { mode, source } = state.get();
48
+ if (mode !== "source" || !editor || editor.isDestroyed) return false;
49
+ const { content, diagnostics } = fromMarkdown(editor, source);
50
+ const reject = (found) => {
51
+ state.set({
52
+ mode: "source",
53
+ source,
54
+ diagnostics: found
55
+ });
56
+ return false;
57
+ };
58
+ if (hasFatalDiagnostics(diagnostics)) return reject(diagnostics);
59
+ let doc;
60
+ try {
61
+ doc = editor.schema.nodeFromJSON(content);
62
+ doc.check();
63
+ } catch (error) {
64
+ return reject([...diagnostics, {
65
+ code: "invalid-document",
66
+ severity: "error",
67
+ message: error instanceof Error ? error.message : String(error)
68
+ }]);
69
+ }
70
+ if (source !== toMarkdown(editor)) editor.view.dispatch(editor.state.tr.replaceWith(0, editor.state.doc.content.size, doc.content).scrollIntoView());
71
+ state.set({
72
+ mode: "visual",
73
+ source: "",
74
+ diagnostics
75
+ });
76
+ return true;
77
+ },
78
+ cancel() {
79
+ state.set(VISUAL);
80
+ }
81
+ };
82
+ }
83
+ //#endregion
84
+ export { createSourceMode };
85
+
86
+ //# sourceMappingURL=source-mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-mode.js","names":[],"sources":["../../src/markdown/source-mode.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport type { Translate } from '../i18n'\nimport { createStore, type ReadonlyStore } from '../core/store'\nimport { contentToMarkdown, markdownToContent, type MarkdownContent } from './document'\nimport { hasFatalDiagnostics, type MarkdownDiagnostic, type MarkdownPolicy } from './policy'\n\nexport interface SourceModeState {\n mode: 'visual' | 'source'\n /** The draft being edited in source mode (empty in visual mode). Never rewritten by a failed commit. */\n source: string\n /** What the last `commit` found in the draft; a rejected commit keeps the fatal ones here until the next `enter`, `edit` or `cancel`. */\n diagnostics: readonly MarkdownDiagnostic[]\n}\n\nexport interface SourceMode {\n readonly state: ReadonlyStore<SourceModeState>\n /** Starts a draft from the editor's current Markdown. False when there is no editable editor yet or it is already in source mode. */\n enter(): boolean\n /** Replaces the draft (a source view's input handler). Ignored in visual mode. */\n edit(source: string): void\n /**\n * Parses the whole draft and, only when that gives no fatal diagnostic and fits the editor's schema, replaces the\n * editor's document with it as one undoable edit and returns to visual mode. Otherwise the editor is untouched, the\n * draft and the diagnostics stay in `state`, and the result is false. False as well when not in source mode.\n */\n commit(): boolean\n /** Discards the draft and returns to visual mode; the editor is untouched. */\n cancel(): void\n}\n\nexport interface SourceModeOptions {\n /** The editor the draft comes from and is committed to; undefined until it is ready. */\n getEditor: () => Editor | undefined\n /** The Markdown a draft starts from. Default: `contentToMarkdown`. */\n toMarkdown?: (editor: Editor) => string\n /** Parses a committed draft. Default: `markdownToContent` with `policy`. */\n fromMarkdown?: (editor: Editor, source: string) => MarkdownContent\n /** The policy of the default `fromMarkdown`. */\n policy?: MarkdownPolicy\n /** The translator of the default `fromMarkdown`'s diagnostics. Default: that of the editor's registered surface. */\n t?: Translate\n}\n\nconst VISUAL: SourceModeState = { mode: 'visual', source: '', diagnostics: [] }\n\n/**\n * The state machine behind a whole-document source view: `enter` → `edit`* → `commit` | `cancel`. Framework-free; the\n * view (`MarkdownSurface`'s `sourceMode` prop, or a host's own textarea or code editor) renders `state` and calls the\n * actions. The editor's document is only ever replaced by `commit`, and only by a draft that parsed without fatal\n * diagnostics and fits the schema.\n */\nexport function createSourceMode(options: SourceModeOptions): SourceMode {\n const toMarkdown = options.toMarkdown ?? contentToMarkdown\n const fromMarkdown = options.fromMarkdown ?? ((editor, source) => markdownToContent(editor, source, { policy: options.policy, t: options.t }))\n const state = createStore<SourceModeState>(VISUAL)\n\n return {\n state: { get: state.get, subscribe: state.subscribe },\n enter() {\n const editor = options.getEditor()\n if (!editor || editor.isDestroyed || !editor.isEditable || state.get().mode === 'source') return false\n state.set({ mode: 'source', source: toMarkdown(editor), diagnostics: [] })\n return true\n },\n edit(source) {\n if (state.get().mode === 'source') state.set({ mode: 'source', source, diagnostics: [] })\n },\n commit() {\n const editor = options.getEditor()\n const { mode, source } = state.get()\n if (mode !== 'source' || !editor || editor.isDestroyed) return false\n const { content, diagnostics } = fromMarkdown(editor, source)\n const reject = (found: MarkdownDiagnostic[]) => {\n state.set({ mode: 'source', source, diagnostics: found })\n return false\n }\n if (hasFatalDiagnostics(diagnostics)) return reject(diagnostics)\n let doc\n try {\n doc = editor.schema.nodeFromJSON(content)\n doc.check()\n }\n catch (error) {\n return reject([...diagnostics, { code: 'invalid-document', severity: 'error', message: error instanceof Error ? error.message : String(error) }])\n }\n // An unchanged draft must not rewrite the document (block IDs, undo history, collaborative updates).\n if (source !== toMarkdown(editor)) editor.view.dispatch(editor.state.tr.replaceWith(0, editor.state.doc.content.size, doc.content).scrollIntoView())\n state.set({ mode: 'visual', source: '', diagnostics })\n return true\n },\n cancel() {\n state.set(VISUAL)\n },\n }\n}\n"],"mappings":";;;;AA2CA,MAAM,SAA0B;CAAE,MAAM;CAAU,QAAQ;CAAI,aAAa,CAAC;AAAE;;;;;;;AAQ9E,SAAgB,iBAAiB,SAAwC;CACvE,MAAM,aAAa,QAAQ,cAAc;CACzC,MAAM,eAAe,QAAQ,kBAAkB,QAAQ,WAAW,kBAAkB,QAAQ,QAAQ;EAAE,QAAQ,QAAQ;EAAQ,GAAG,QAAQ;CAAE,CAAC;CAC5I,MAAM,QAAQ,YAA6B,MAAM;CAEjD,OAAO;EACL,OAAO;GAAE,KAAK,MAAM;GAAK,WAAW,MAAM;EAAU;EACpD,QAAQ;GACN,MAAM,SAAS,QAAQ,UAAU;GACjC,IAAI,CAAC,UAAU,OAAO,eAAe,CAAC,OAAO,cAAc,MAAM,IAAI,CAAC,CAAC,SAAS,UAAU,OAAO;GACjG,MAAM,IAAI;IAAE,MAAM;IAAU,QAAQ,WAAW,MAAM;IAAG,aAAa,CAAC;GAAE,CAAC;GACzE,OAAO;EACT;EACA,KAAK,QAAQ;GACX,IAAI,MAAM,IAAI,CAAC,CAAC,SAAS,UAAU,MAAM,IAAI;IAAE,MAAM;IAAU;IAAQ,aAAa,CAAC;GAAE,CAAC;EAC1F;EACA,SAAS;GACP,MAAM,SAAS,QAAQ,UAAU;GACjC,MAAM,EAAE,MAAM,WAAW,MAAM,IAAI;GACnC,IAAI,SAAS,YAAY,CAAC,UAAU,OAAO,aAAa,OAAO;GAC/D,MAAM,EAAE,SAAS,gBAAgB,aAAa,QAAQ,MAAM;GAC5D,MAAM,UAAU,UAAgC;IAC9C,MAAM,IAAI;KAAE,MAAM;KAAU;KAAQ,aAAa;IAAM,CAAC;IACxD,OAAO;GACT;GACA,IAAI,oBAAoB,WAAW,GAAG,OAAO,OAAO,WAAW;GAC/D,IAAI;GACJ,IAAI;IACF,MAAM,OAAO,OAAO,aAAa,OAAO;IACxC,IAAI,MAAM;GACZ,SACO,OAAO;IACZ,OAAO,OAAO,CAAC,GAAG,aAAa;KAAE,MAAM;KAAoB,UAAU;KAAS,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IAAE,CAAC,CAAC;GAClJ;GAEA,IAAI,WAAW,WAAW,MAAM,GAAG,OAAO,KAAK,SAAS,OAAO,MAAM,GAAG,YAAY,GAAG,OAAO,MAAM,IAAI,QAAQ,MAAM,IAAI,OAAO,CAAC,CAAC,eAAe,CAAC;GACnJ,MAAM,IAAI;IAAE,MAAM;IAAU,QAAQ;IAAI;GAAY,CAAC;GACrD,OAAO;EACT;EACA,SAAS;GACP,MAAM,IAAI,MAAM;EAClB;CACF;AACF"}
@@ -0,0 +1,2 @@
1
+ import _default from "./MarkdownSurface.vue.js";
2
+ export { _default as MarkdownSurface };
@@ -0,0 +1 @@
1
+ export { default as MarkdownSurface } from "./MarkdownSurface2.js";
@@ -0,0 +1,68 @@
1
+ import { Locale, Messages } from "../i18n/index.js";
2
+ import { ModelSlot } from "../settings/values.js";
3
+ import "../settings/index.js";
4
+ //#region src/nuxt/module.d.ts
5
+ export interface ModuleOptions {
6
+ /**
7
+ * The UI kit that renders the editor chrome. `'nuxt-ui'` (default): Nuxt UI, which must be registered before this
8
+ * module (its generated `ui.css` is patched so Tailwind scans the package). `'primevue'`: PrimeVue; the host installs
9
+ * PrimeVue (`app.use(PrimeVue, …)`, `ToastService`), mounts `<Toast />` and lets Tailwind scan the package.
10
+ */
11
+ kit: 'nuxt-ui' | 'primevue';
12
+ /** Language of the editor's strings: `'de'` (default) or `'en'`. Set once per app; a host that switches languages at run time recreates the editor context. */
13
+ locale: Locale;
14
+ /** Overrides of single messages by key (see `MessageKey`), applied on top of the catalog of `locale`; must be JSON-serialisable. */
15
+ messages?: Partial<Messages>;
16
+ ai: {
17
+ /**
18
+ * Server-defined model presets (any OpenAI-compatible chat completions endpoint), keyed by preset id. The key is
19
+ * per preset or the shared `apiKey`, both from env only: `NUXT_TIPTAP_EDITOR_AI_PRESETS_<ID>_API_KEY` (`<ID>` = the
20
+ * preset id in upper snake case, e.g. `flashLite` → `FLASH_LITE`) or `NUXT_TIPTAP_EDITOR_AI_API_KEY`. Preset ids
21
+ * must be camelCase so the env names map onto them.
22
+ */
23
+ presets: Record<string, {
24
+ label: string;
25
+ endpoint: string;
26
+ model: string;
27
+ apiKey?: string;
28
+ }>;
29
+ /** Default preset per slot; users may override in settings. The `complete` model must support assistant prefill. */
30
+ slots: Record<ModelSlot, string>;
31
+ /** Per-user limit shared by all AI endpoints: at most `max` requests per sliding `windowMs`. */
32
+ rateLimit: {
33
+ max: number;
34
+ windowMs: number;
35
+ };
36
+ /**
37
+ * Speech-to-text for audio/video `document` composites: any OpenAI-compatible `<endpoint>/audio/transcriptions`
38
+ * (e.g. OpenAI `whisper-1`; OpenRouter presets do not provide one). Absent = the action and the endpoint are off.
39
+ * The key comes from env only: `NUXT_TIPTAP_EDITOR_AI_TRANSCRIPTION_API_KEY`.
40
+ */
41
+ transcription?: {
42
+ endpoint: string;
43
+ model: string;
44
+ apiKey?: string;
45
+ };
46
+ };
47
+ collab: {
48
+ /**
49
+ * Authenticate the `/collab/:id` websocket upgrade itself (`EditorAdapter.authenticate` with the upgrade request's
50
+ * headers) and refuse it with HTTP 401 for an unknown user. Default `false`: the upgrade always succeeds, the user
51
+ * is authenticated afterwards from the headers or the provider's `token`, and an unauthenticated socket is closed
52
+ * with code 4401. Enable only when every client authenticates by cookie/headers: a client that sends its identity
53
+ * as `collaboration.token` (no cookies) cannot connect then. Env override:
54
+ * `NUXT_TIPTAP_EDITOR_COLLAB_AUTHENTICATE_UPGRADE=true`.
55
+ */
56
+ authenticateUpgrade: boolean;
57
+ };
58
+ }
59
+ /**
60
+ * Nuxt/Nitro integration of the editor package: the client context plugin (settings persistence, AI configuration),
61
+ * the Nitro API routes, the collaboration websocket and the AI configuration with its server-only secrets. The host
62
+ * plugs in through `setEditorAdapter()` (`@ecsplico/editor/server`) in a Nitro plugin (auth, loading and storing
63
+ * document content). Components are imported explicitly from the package entries; nothing is auto-registered.
64
+ */
65
+ declare const _default: import("@nuxt/schema").NuxtModule<ModuleOptions, ModuleOptions, false>;
66
+ //#endregion
67
+ export { _default as default };
68
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1,103 @@
1
+ import { addPlugin, addServerScanDir, createResolver, defineNuxtModule } from "nuxt/kit";
2
+ //#region src/nuxt/module.ts
3
+ /**
4
+ * Nuxt/Nitro integration of the editor package: the client context plugin (settings persistence, AI configuration),
5
+ * the Nitro API routes, the collaboration websocket and the AI configuration with its server-only secrets. The host
6
+ * plugs in through `setEditorAdapter()` (`@ecsplico/editor/server`) in a Nitro plugin (auth, loading and storing
7
+ * document content). Components are imported explicitly from the package entries; nothing is auto-registered.
8
+ */
9
+ var module_default = defineNuxtModule({
10
+ meta: {
11
+ name: "tiptap-editor",
12
+ configKey: "tiptapEditor"
13
+ },
14
+ defaults: {
15
+ kit: "nuxt-ui",
16
+ locale: "de",
17
+ collab: { authenticateUpgrade: false },
18
+ ai: {
19
+ presets: {
20
+ sonnet: {
21
+ label: "Claude Sonnet 4.5 (OpenRouter)",
22
+ endpoint: "https://openrouter.ai/api/v1",
23
+ model: "anthropic/claude-sonnet-4.5"
24
+ },
25
+ flashLite: {
26
+ label: "Gemini 2.5 Flash Lite (OpenRouter)",
27
+ endpoint: "https://openrouter.ai/api/v1",
28
+ model: "google/gemini-2.5-flash-lite"
29
+ }
30
+ },
31
+ slots: {
32
+ complete: "flashLite",
33
+ rewrite: "sonnet",
34
+ generate: "sonnet"
35
+ },
36
+ rateLimit: {
37
+ max: 30,
38
+ windowMs: 6e4
39
+ }
40
+ }
41
+ },
42
+ setup(options, nuxt) {
43
+ const { resolve } = createResolver(import.meta.url);
44
+ const packageSrc = resolve("..");
45
+ nuxt.options.build.transpile.push(packageSrc);
46
+ nuxt.options.css.push(resolve(options.kit === "primevue" ? "../vue/kit/primevue.css" : "../vue/kit/nuxt-ui.css"));
47
+ nuxt.options.css.push(resolve("../styles/core.css"), resolve("../styles/media.css"), resolve("../styles/mentions.css"), resolve("../styles/authors.css"), resolve("../styles/comments.css"), resolve("../styles/transcript.css"), resolve("../styles/composites.css"), resolve("../styles/ai.css"), resolve("../styles/collab.css"), resolve("../styles/block-ui.css"), resolve("../styles/themes.css"));
48
+ addPlugin({
49
+ src: resolve(`./runtime/plugins/editor-context-${options.kit}.client.ts`),
50
+ mode: "client"
51
+ });
52
+ addServerScanDir(resolve("./runtime/server"));
53
+ if (options.kit === "nuxt-ui") nuxt.hook("modules:done", () => {
54
+ const uiCss = nuxt.options.build.templates.find((t) => t.filename === "ui.css");
55
+ if (!uiCss?.getContents) throw new Error("tiptap-editor: @nuxt/ui muss vor diesem Modul registriert sein (ui.css-Template fehlt)");
56
+ const getContents = uiCss.getContents;
57
+ uiCss.getContents = async (data) => `@source "${packageSrc}/**/*";\n${await getContents(data)}`;
58
+ });
59
+ nuxt.options.nitro.experimental = {
60
+ ...nuxt.options.nitro.experimental,
61
+ websocket: true
62
+ };
63
+ nuxt.options.nitro.externals = {
64
+ ...nuxt.options.nitro.externals,
65
+ inline: [
66
+ ...nuxt.options.nitro.externals?.inline ?? [],
67
+ "@ecsplico/editor",
68
+ packageSrc
69
+ ]
70
+ };
71
+ nuxt.options.runtimeConfig.tiptapEditor = {
72
+ collab: { authenticateUpgrade: options.collab.authenticateUpgrade },
73
+ ai: {
74
+ apiKey: "",
75
+ presets: Object.fromEntries(Object.entries(options.ai.presets).map(([id, preset]) => [id, {
76
+ ...preset,
77
+ apiKey: preset.apiKey ?? ""
78
+ }])),
79
+ slots: options.ai.slots,
80
+ rateLimit: options.ai.rateLimit,
81
+ ...options.ai.transcription && { transcription: {
82
+ ...options.ai.transcription,
83
+ apiKey: options.ai.transcription.apiKey ?? ""
84
+ } }
85
+ },
86
+ ...nuxt.options.runtimeConfig.tiptapEditor
87
+ };
88
+ nuxt.options.runtimeConfig.public.tiptapEditor = {
89
+ kit: options.kit,
90
+ locale: options.locale,
91
+ ...options.messages && { messages: options.messages },
92
+ ai: {
93
+ slots: options.ai.slots,
94
+ transcription: Boolean(options.ai.transcription)
95
+ },
96
+ ...nuxt.options.runtimeConfig.public.tiptapEditor
97
+ };
98
+ }
99
+ });
100
+ //#endregion
101
+ export { module_default as default };
102
+
103
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","names":[],"sources":["../../src/nuxt/module.ts"],"sourcesContent":["import { addPlugin, addServerScanDir, createResolver, defineNuxtModule } from 'nuxt/kit'\nimport type { Locale, Messages } from '../i18n'\nimport type { ModelSlot } from '../settings'\n\nexport interface ModuleOptions {\n /**\n * The UI kit that renders the editor chrome. `'nuxt-ui'` (default): Nuxt UI, which must be registered before this\n * module (its generated `ui.css` is patched so Tailwind scans the package). `'primevue'`: PrimeVue; the host installs\n * PrimeVue (`app.use(PrimeVue, …)`, `ToastService`), mounts `<Toast />` and lets Tailwind scan the package.\n */\n kit: 'nuxt-ui' | 'primevue'\n /** Language of the editor's strings: `'de'` (default) or `'en'`. Set once per app; a host that switches languages at run time recreates the editor context. */\n locale: Locale\n /** Overrides of single messages by key (see `MessageKey`), applied on top of the catalog of `locale`; must be JSON-serialisable. */\n messages?: Partial<Messages>\n ai: {\n /**\n * Server-defined model presets (any OpenAI-compatible chat completions endpoint), keyed by preset id. The key is\n * per preset or the shared `apiKey`, both from env only: `NUXT_TIPTAP_EDITOR_AI_PRESETS_<ID>_API_KEY` (`<ID>` = the\n * preset id in upper snake case, e.g. `flashLite` → `FLASH_LITE`) or `NUXT_TIPTAP_EDITOR_AI_API_KEY`. Preset ids\n * must be camelCase so the env names map onto them.\n */\n presets: Record<string, { label: string, endpoint: string, model: string, apiKey?: string }>\n /** Default preset per slot; users may override in settings. The `complete` model must support assistant prefill. */\n slots: Record<ModelSlot, string>\n /** Per-user limit shared by all AI endpoints: at most `max` requests per sliding `windowMs`. */\n rateLimit: { max: number, windowMs: number }\n /**\n * Speech-to-text for audio/video `document` composites: any OpenAI-compatible `<endpoint>/audio/transcriptions`\n * (e.g. OpenAI `whisper-1`; OpenRouter presets do not provide one). Absent = the action and the endpoint are off.\n * The key comes from env only: `NUXT_TIPTAP_EDITOR_AI_TRANSCRIPTION_API_KEY`.\n */\n transcription?: { endpoint: string, model: string, apiKey?: string }\n }\n collab: {\n /**\n * Authenticate the `/collab/:id` websocket upgrade itself (`EditorAdapter.authenticate` with the upgrade request's\n * headers) and refuse it with HTTP 401 for an unknown user. Default `false`: the upgrade always succeeds, the user\n * is authenticated afterwards from the headers or the provider's `token`, and an unauthenticated socket is closed\n * with code 4401. Enable only when every client authenticates by cookie/headers: a client that sends its identity\n * as `collaboration.token` (no cookies) cannot connect then. Env override:\n * `NUXT_TIPTAP_EDITOR_COLLAB_AUTHENTICATE_UPGRADE=true`.\n */\n authenticateUpgrade: boolean\n }\n}\n\n/**\n * Nuxt/Nitro integration of the editor package: the client context plugin (settings persistence, AI configuration),\n * the Nitro API routes, the collaboration websocket and the AI configuration with its server-only secrets. The host\n * plugs in through `setEditorAdapter()` (`@ecsplico/editor/server`) in a Nitro plugin (auth, loading and storing\n * document content). Components are imported explicitly from the package entries; nothing is auto-registered.\n */\nexport default defineNuxtModule<ModuleOptions>({\n meta: { name: 'tiptap-editor', configKey: 'tiptapEditor' },\n defaults: {\n kit: 'nuxt-ui',\n locale: 'de',\n collab: { authenticateUpgrade: false },\n ai: {\n presets: {\n sonnet: { label: 'Claude Sonnet 4.5 (OpenRouter)', endpoint: 'https://openrouter.ai/api/v1', model: 'anthropic/claude-sonnet-4.5' },\n flashLite: { label: 'Gemini 2.5 Flash Lite (OpenRouter)', endpoint: 'https://openrouter.ai/api/v1', model: 'google/gemini-2.5-flash-lite' },\n },\n slots: { complete: 'flashLite', rewrite: 'sonnet', generate: 'sonnet' },\n rateLimit: { max: 30, windowMs: 60_000 },\n },\n },\n setup(options, nuxt) {\n const { resolve } = createResolver(import.meta.url)\n // `resolve('..')` is the package root of the built output (`dist`) or of `src` in this repository's app: both\n // hold the stylesheets and the unbundled `nuxt/runtime` files, which Nuxt compiles for the client and Nitro for the server.\n const packageSrc = resolve('..')\n nuxt.options.build.transpile.push(packageSrc)\n // The kit's token map comes first: the feature sheets (and an Obsidian theme, `themes.css`, last) read and may override `--sk-*`.\n nuxt.options.css.push(resolve(options.kit === 'primevue' ? '../vue/kit/primevue.css' : '../vue/kit/nuxt-ui.css'))\n nuxt.options.css.push(\n resolve('../styles/core.css'),\n resolve('../styles/media.css'),\n resolve('../styles/mentions.css'),\n resolve('../styles/authors.css'),\n resolve('../styles/comments.css'),\n resolve('../styles/transcript.css'),\n resolve('../styles/composites.css'),\n resolve('../styles/ai.css'),\n resolve('../styles/collab.css'),\n resolve('../styles/block-ui.css'),\n resolve('../styles/themes.css'),\n )\n // One plugin file per kit: a dynamic `import()` of the other kit would still be bundled and needs its (optional) UI library.\n addPlugin({ src: resolve(`./runtime/plugins/editor-context-${options.kit}.client.ts`), mode: 'client' })\n addServerScanDir(resolve('./runtime/server'))\n // Tailwind only scans the app layers listed in Nuxt UI's generated `ui.css` (`@source \"<layer>/app/**/*\"`), so the\n // utility classes used by the package's components would never be generated. Append its source.\n if (options.kit === 'nuxt-ui') nuxt.hook('modules:done', () => {\n const uiCss = nuxt.options.build.templates.find(t => t.filename === 'ui.css')\n if (!uiCss?.getContents) throw new Error('tiptap-editor: @nuxt/ui muss vor diesem Modul registriert sein (ui.css-Template fehlt)')\n const getContents = uiCss.getContents\n uiCss.getContents = async data => `@source \"${packageSrc}/**/*\";\\n${await getContents(data)}`\n })\n nuxt.options.nitro.experimental = { ...nuxt.options.nitro.experimental, websocket: true }\n // Nitro bundles the package (the runtime files import `h3` and `nitropack/runtime`, which the host's Nitro resolves): never leave it external.\n nuxt.options.nitro.externals = { ...nuxt.options.nitro.externals, inline: [...(nuxt.options.nitro.externals?.inline ?? []), '@ecsplico/editor', packageSrc] }\n nuxt.options.runtimeConfig.tiptapEditor = {\n collab: { authenticateUpgrade: options.collab.authenticateUpgrade },\n ai: {\n apiKey: '',\n // Every preset gets an empty `apiKey`, so its env variable has a key to override.\n presets: Object.fromEntries(Object.entries(options.ai.presets).map(([id, preset]) => [id, { ...preset, apiKey: preset.apiKey ?? '' }])),\n slots: options.ai.slots,\n rateLimit: options.ai.rateLimit,\n // `apiKey` defaults to '' so its env variable has a key to override.\n ...(options.ai.transcription && { transcription: { ...options.ai.transcription, apiKey: options.ai.transcription.apiKey ?? '' } }),\n },\n ...(nuxt.options.runtimeConfig.tiptapEditor as object | undefined),\n }\n // Default slot presets for the client before `GET /api/ai/models` has answered; read by the client context plugin.\n nuxt.options.runtimeConfig.public.tiptapEditor = {\n kit: options.kit,\n locale: options.locale,\n ...(options.messages && { messages: options.messages }),\n ai: { slots: options.ai.slots, transcription: Boolean(options.ai.transcription) },\n ...(nuxt.options.runtimeConfig.public.tiptapEditor as object | undefined),\n }\n },\n})\n"],"mappings":";;;;;;;;AAqDA,IAAA,iBAAe,iBAAgC;CAC7C,MAAM;EAAE,MAAM;EAAiB,WAAW;CAAe;CACzD,UAAU;EACR,KAAK;EACL,QAAQ;EACR,QAAQ,EAAE,qBAAqB,MAAM;EACrC,IAAI;GACF,SAAS;IACP,QAAQ;KAAE,OAAO;KAAkC,UAAU;KAAgC,OAAO;IAA8B;IAClI,WAAW;KAAE,OAAO;KAAsC,UAAU;KAAgC,OAAO;IAA+B;GAC5I;GACA,OAAO;IAAE,UAAU;IAAa,SAAS;IAAU,UAAU;GAAS;GACtE,WAAW;IAAE,KAAK;IAAI,UAAU;GAAO;EACzC;CACF;CACA,MAAM,SAAS,MAAM;EACnB,MAAM,EAAE,YAAY,eAAe,YAAY,GAAG;EAGlD,MAAM,aAAa,QAAQ,IAAI;EAC/B,KAAK,QAAQ,MAAM,UAAU,KAAK,UAAU;EAE5C,KAAK,QAAQ,IAAI,KAAK,QAAQ,QAAQ,QAAQ,aAAa,4BAA4B,wBAAwB,CAAC;EAChH,KAAK,QAAQ,IAAI,KACf,QAAQ,oBAAoB,GAC5B,QAAQ,qBAAqB,GAC7B,QAAQ,wBAAwB,GAChC,QAAQ,uBAAuB,GAC/B,QAAQ,wBAAwB,GAChC,QAAQ,0BAA0B,GAClC,QAAQ,0BAA0B,GAClC,QAAQ,kBAAkB,GAC1B,QAAQ,sBAAsB,GAC9B,QAAQ,wBAAwB,GAChC,QAAQ,sBAAsB,CAChC;EAEA,UAAU;GAAE,KAAK,QAAQ,oCAAoC,QAAQ,IAAI,WAAW;GAAG,MAAM;EAAS,CAAC;EACvG,iBAAiB,QAAQ,kBAAkB,CAAC;EAG5C,IAAI,QAAQ,QAAQ,WAAW,KAAK,KAAK,sBAAsB;GAC7D,MAAM,QAAQ,KAAK,QAAQ,MAAM,UAAU,MAAK,MAAK,EAAE,aAAa,QAAQ;GAC5E,IAAI,CAAC,OAAO,aAAa,MAAM,IAAI,MAAM,wFAAwF;GACjI,MAAM,cAAc,MAAM;GAC1B,MAAM,cAAc,OAAM,SAAQ,YAAY,WAAW,WAAW,MAAM,YAAY,IAAI;EAC5F,CAAC;EACD,KAAK,QAAQ,MAAM,eAAe;GAAE,GAAG,KAAK,QAAQ,MAAM;GAAc,WAAW;EAAK;EAExF,KAAK,QAAQ,MAAM,YAAY;GAAE,GAAG,KAAK,QAAQ,MAAM;GAAW,QAAQ;IAAC,GAAI,KAAK,QAAQ,MAAM,WAAW,UAAU,CAAC;IAAI;IAAoB;GAAU;EAAE;EAC5J,KAAK,QAAQ,cAAc,eAAe;GACxC,QAAQ,EAAE,qBAAqB,QAAQ,OAAO,oBAAoB;GAClE,IAAI;IACF,QAAQ;IAER,SAAS,OAAO,YAAY,OAAO,QAAQ,QAAQ,GAAG,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,IAAI;KAAE,GAAG;KAAQ,QAAQ,OAAO,UAAU;IAAG,CAAC,CAAC,CAAC;IACtI,OAAO,QAAQ,GAAG;IAClB,WAAW,QAAQ,GAAG;IAEtB,GAAI,QAAQ,GAAG,iBAAiB,EAAE,eAAe;KAAE,GAAG,QAAQ,GAAG;KAAe,QAAQ,QAAQ,GAAG,cAAc,UAAU;IAAG,EAAE;GAClI;GACA,GAAI,KAAK,QAAQ,cAAc;EACjC;EAEA,KAAK,QAAQ,cAAc,OAAO,eAAe;GAC/C,KAAK,QAAQ;GACb,QAAQ,QAAQ;GAChB,GAAI,QAAQ,YAAY,EAAE,UAAU,QAAQ,SAAS;GACrD,IAAI;IAAE,OAAO,QAAQ,GAAG;IAAO,eAAe,QAAQ,QAAQ,GAAG,aAAa;GAAE;GAChF,GAAI,KAAK,QAAQ,cAAc,OAAO;EACxC;CACF;AACF,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { VueUiKit } from "../../vue/kit/types.js";
2
+ import { App } from "vue";
3
+ //#region src/nuxt/runtime/install-context.d.ts
4
+ /**
5
+ * Installs the editor context on a Nuxt app (client only: TipTap does not render on the server). Settings are kept per
6
+ * account through the host's `/api/editor/settings`; the AI configuration is the module's public runtime config,
7
+ * passed on as inert data. Features request through ofetch, which is what Nuxt's `$fetch` is on the client. `locale`
8
+ * and `messages` are the module's options of the same name. The kit comes from the plugin file the module registered
9
+ * for its `kit` option, so a bundler only ever reaches the UI library the app uses (a PrimeVue app never resolves
10
+ * `@nuxt/ui`, a Nuxt UI app never `primevue`). Only the Vue app is read, so the parameter is structural: a host's
11
+ * augmented `NuxtApp` (plugins adding `$router`, `$auth`, ...) and the `_NuxtApp` a plugin receives both fit.
12
+ */
13
+ export declare function installEditorContext(nuxtApp: {
14
+ vueApp: App;
15
+ }, kit: VueUiKit): void;
16
+ //#endregion
17
+ //# sourceMappingURL=install-context.d.ts.map
@@ -0,0 +1,26 @@
1
+ import { createEditor } from "../../vue/context.js";
2
+ import { useRuntimeConfig } from "#app";
3
+ //#region src/nuxt/runtime/install-context.ts
4
+ /**
5
+ * Installs the editor context on a Nuxt app (client only: TipTap does not render on the server). Settings are kept per
6
+ * account through the host's `/api/editor/settings`; the AI configuration is the module's public runtime config,
7
+ * passed on as inert data. Features request through ofetch, which is what Nuxt's `$fetch` is on the client. `locale`
8
+ * and `messages` are the module's options of the same name. The kit comes from the plugin file the module registered
9
+ * for its `kit` option, so a bundler only ever reaches the UI library the app uses (a PrimeVue app never resolves
10
+ * `@nuxt/ui`, a Nuxt UI app never `primevue`). Only the Vue app is read, so the parameter is structural: a host's
11
+ * augmented `NuxtApp` (plugins adding `$router`, `$auth`, ...) and the `_NuxtApp` a plugin receives both fit.
12
+ */
13
+ function installEditorContext(nuxtApp, kit) {
14
+ const { ai, locale, messages } = useRuntimeConfig().public.tiptapEditor;
15
+ nuxtApp.vueApp.use(createEditor({
16
+ kit,
17
+ settings: { remote: true },
18
+ ...ai && { ai },
19
+ ...locale && { locale },
20
+ ...messages && { messages }
21
+ }));
22
+ }
23
+ //#endregion
24
+ export { installEditorContext };
25
+
26
+ //# sourceMappingURL=install-context.js.map