@ecsplico/editor 2.1.2 → 3.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 (692) hide show
  1. package/CHANGELOG.md +68 -1
  2. package/README.md +39 -156
  3. package/dist/adapters/comments/drizzle.d.ts +1 -1
  4. package/dist/adapters/comments/{client.js → rest-model.js} +3 -3
  5. package/dist/adapters/comments/rest-model.js.map +1 -0
  6. package/dist/adapters/comments/types.d.ts +2 -2
  7. package/dist/adapters/document-state.d.ts +23 -0
  8. package/dist/adapters/document-state.js +66 -0
  9. package/dist/adapters/document-state.js.map +1 -0
  10. package/dist/adapters/documents.js +14 -11
  11. package/dist/adapters/documents.js.map +1 -1
  12. package/dist/adapters/drizzle.d.ts +2 -2
  13. package/dist/adapters/drizzle.js +97 -88
  14. package/dist/adapters/drizzle.js.map +1 -1
  15. package/dist/adapters/forge.d.ts +12 -7
  16. package/dist/adapters/forge.js +38 -45
  17. package/dist/adapters/forge.js.map +1 -1
  18. package/dist/adapters/http.d.ts +20 -0
  19. package/dist/adapters/http.js +68 -0
  20. package/dist/adapters/http.js.map +1 -0
  21. package/dist/adapters/index.d.ts +5 -5
  22. package/dist/adapters/json.d.ts +3 -3
  23. package/dist/adapters/json.js +58 -49
  24. package/dist/adapters/json.js.map +1 -1
  25. package/dist/adapters/memory.d.ts +21 -0
  26. package/dist/adapters/memory.js +53 -0
  27. package/dist/adapters/memory.js.map +1 -0
  28. package/dist/adapters/nitro.d.ts +23 -20
  29. package/dist/adapters/nitro.js +58 -163
  30. package/dist/adapters/nitro.js.map +1 -1
  31. package/dist/adapters/react.d.ts +55 -0
  32. package/dist/adapters/react.js +209 -0
  33. package/dist/adapters/react.js.map +1 -0
  34. package/dist/adapters/shared.d.ts +15 -21
  35. package/dist/adapters/shared.js +10 -8
  36. package/dist/adapters/shared.js.map +1 -1
  37. package/dist/adapters/vue.d.ts +15 -30
  38. package/dist/adapters/vue.js +36 -87
  39. package/dist/adapters/vue.js.map +1 -1
  40. package/dist/config/index.d.ts +105 -0
  41. package/dist/config/index.js +95 -0
  42. package/dist/config/index.js.map +1 -0
  43. package/dist/core/abilities.js +1 -0
  44. package/dist/core/abilities.js.map +1 -1
  45. package/dist/{adapters/routes.js → core/api-routes.js} +5 -3
  46. package/dist/core/api-routes.js.map +1 -0
  47. package/dist/core/backend-capability.d.ts +7 -0
  48. package/dist/core/backend-capability.js +17 -0
  49. package/dist/core/backend-capability.js.map +1 -0
  50. package/dist/core/backend-types.d.ts +245 -0
  51. package/dist/core/backend-types.js +17 -0
  52. package/dist/core/backend-types.js.map +1 -0
  53. package/dist/core/backend.d.ts +108 -0
  54. package/dist/core/backend.js +14 -0
  55. package/dist/core/backend.js.map +1 -0
  56. package/dist/core/block-convert.d.ts +7 -5
  57. package/dist/core/block-convert.js +28 -5
  58. package/dist/core/block-convert.js.map +1 -1
  59. package/dist/core/command-types.d.ts +89 -0
  60. package/dist/core/commands.d.ts +40 -0
  61. package/dist/core/commands.js +151 -0
  62. package/dist/core/commands.js.map +1 -0
  63. package/dist/core/context.d.ts +17 -20
  64. package/dist/core/context.js +24 -21
  65. package/dist/core/context.js.map +1 -1
  66. package/dist/core/core-feature.d.ts +22 -7
  67. package/dist/core/core-feature.js +51 -18
  68. package/dist/core/core-feature.js.map +1 -1
  69. package/dist/core/define-editor.d.ts +4 -3
  70. package/dist/core/define-editor.js +14 -7
  71. package/dist/core/define-editor.js.map +1 -1
  72. package/dist/core/document-markdown.js +12 -3
  73. package/dist/core/document-markdown.js.map +1 -1
  74. package/dist/core/editor-ui.d.ts +8 -1
  75. package/dist/core/editor-ui.js +9 -8
  76. package/dist/core/editor-ui.js.map +1 -1
  77. package/dist/core/extension-points.d.ts +3 -15
  78. package/dist/core/feature-context.d.ts +8 -7
  79. package/dist/core/feature-context.js +12 -11
  80. package/dist/core/feature-context.js.map +1 -1
  81. package/dist/core/feature.d.ts +35 -19
  82. package/dist/core/feature.js.map +1 -1
  83. package/dist/core/fences.d.ts +2 -1
  84. package/dist/core/fences.js +3 -2
  85. package/dist/core/fences.js.map +1 -1
  86. package/dist/core/fetch-error.d.ts +1 -1
  87. package/dist/core/fetch-error.js +3 -1
  88. package/dist/core/fetch-error.js.map +1 -1
  89. package/dist/core/hash.d.ts +5 -0
  90. package/dist/core/hash.js +11 -0
  91. package/dist/core/hash.js.map +1 -0
  92. package/dist/core/http-backend.d.ts +11 -0
  93. package/dist/core/http-backend.js +195 -0
  94. package/dist/core/http-backend.js.map +1 -0
  95. package/dist/core/index.d.ts +14 -9
  96. package/dist/core/index.js +12 -9
  97. package/dist/core/palette.d.ts +48 -0
  98. package/dist/core/palette.js +95 -0
  99. package/dist/core/palette.js.map +1 -0
  100. package/dist/core/schema/abilities.d.ts +2 -1
  101. package/dist/core/schema/abilities.js +5 -1
  102. package/dist/core/schema/abilities.js.map +1 -1
  103. package/dist/core/schema/index.d.ts +11 -5
  104. package/dist/core/schema/index.js +13 -8
  105. package/dist/core/schema/index.js.map +1 -1
  106. package/dist/core/schema/mark-flags.d.ts +8 -1
  107. package/dist/core/schema/of-features.d.ts +13 -0
  108. package/dist/core/schema/of-features.js +14 -0
  109. package/dist/core/schema/of-features.js.map +1 -0
  110. package/dist/core/slash.d.ts +8 -6
  111. package/dist/core/slash.js +24 -16
  112. package/dist/core/slash.js.map +1 -1
  113. package/dist/core/surface-session.js +13 -5
  114. package/dist/core/surface-session.js.map +1 -1
  115. package/dist/core/toolbar-items.d.ts +10 -4
  116. package/dist/core/toolbar-items.js +269 -195
  117. package/dist/core/toolbar-items.js.map +1 -1
  118. package/dist/core/util.js +11 -0
  119. package/dist/core/util.js.map +1 -0
  120. package/dist/document/DocumentSurface.d.ts +1 -1
  121. package/dist/features/ai/agent-op-review.d.ts +1 -1
  122. package/dist/features/ai/agent-op-review.js +1 -1
  123. package/dist/features/ai/agent-ops.js +1 -1
  124. package/dist/features/ai/ai-apply.d.ts +2 -2
  125. package/dist/features/ai/ai-apply.js +1 -1
  126. package/dist/features/ai/ai-review.js +1 -1
  127. package/dist/features/ai/ai-sse.d.ts +6 -6
  128. package/dist/features/ai/ai-sse.js +20 -63
  129. package/dist/features/ai/ai-sse.js.map +1 -1
  130. package/dist/features/ai/assistant.d.ts +8 -7
  131. package/dist/features/ai/assistant.js +3 -3
  132. package/dist/features/ai/assistant.js.map +1 -1
  133. package/dist/features/ai/block-actions.d.ts +3 -2
  134. package/dist/features/ai/block-actions.js +3 -2
  135. package/dist/features/ai/block-actions.js.map +1 -1
  136. package/dist/features/ai/components/AiSelectionMenu.js +1 -1
  137. package/dist/features/ai/components/DocumentChatAnswer.js +1 -1
  138. package/dist/features/ai/components/DocumentChatOps.vue.d.ts +1 -1
  139. package/dist/features/ai/components/SettingsModelProfiles.js +8 -8
  140. package/dist/features/ai/components/SettingsModelProfiles.js.map +1 -1
  141. package/dist/features/ai/document-chat-model.d.ts +8 -7
  142. package/dist/features/ai/document-chat-model.js +5 -5
  143. package/dist/features/ai/document-chat-model.js.map +1 -1
  144. package/dist/features/ai/document-chat.js +1 -1
  145. package/dist/features/ai/feature.js +27 -14
  146. package/dist/features/ai/feature.js.map +1 -1
  147. package/dist/features/ai/ghost-autocomplete.d.ts +7 -6
  148. package/dist/features/ai/ghost-autocomplete.js +6 -9
  149. package/dist/features/ai/ghost-autocomplete.js.map +1 -1
  150. package/dist/features/ai/index.d.ts +4 -3
  151. package/dist/features/ai/index.js +10 -10
  152. package/dist/features/ai/model-profiles.d.ts +5 -4
  153. package/dist/features/ai/model-profiles.js +2 -2
  154. package/dist/features/ai/model-profiles.js.map +1 -1
  155. package/dist/features/ai/protocol/block-lines.js +1 -1
  156. package/dist/features/ai/protocol/block-lines.js.map +1 -1
  157. package/dist/features/ai/protocol/chat.js +4 -1
  158. package/dist/features/ai/protocol/chat.js.map +1 -1
  159. package/dist/features/ai/protocol/index.d.ts +3 -2
  160. package/dist/features/ai/protocol/models.d.ts +2 -16
  161. package/dist/features/ai/protocol/models.js.map +1 -1
  162. package/dist/features/ai/rate-limit.d.ts +1 -1
  163. package/dist/features/ai/rate-limit.js +3 -1
  164. package/dist/features/ai/rate-limit.js.map +1 -1
  165. package/dist/features/ai/react/AiSelectionMenu.js +2 -2
  166. package/dist/features/ai/react/AiSidebar.js +4 -4
  167. package/dist/features/ai/react/DocumentChatAnswer.js +1 -1
  168. package/dist/features/ai/react/DocumentChatOps.d.ts +1 -1
  169. package/dist/features/ai/react/DocumentChatOps.js +1 -1
  170. package/dist/features/ai/react/SettingsModelProfiles.js +8 -10
  171. package/dist/features/ai/react/SettingsModelProfiles.js.map +1 -1
  172. package/dist/features/ai/react/use-ai-assistant.d.ts +1 -1
  173. package/dist/features/ai/react/use-ai-assistant.js +3 -3
  174. package/dist/features/ai/react/use-ai-assistant.js.map +1 -1
  175. package/dist/features/ai/react/use-document-chat.js +2 -2
  176. package/dist/features/ai/react/use-document-chat.js.map +1 -1
  177. package/dist/features/ai/react/use-model-profiles.d.ts +2 -1
  178. package/dist/features/ai/selection-flow.d.ts +1 -1
  179. package/dist/features/ai/selection-flow.js +1 -1
  180. package/dist/features/ai/sidebar-flow.d.ts +1 -1
  181. package/dist/features/ai/sidebar-flow.js +1 -1
  182. package/dist/features/ai/use-ai-assistant.d.ts +1 -1
  183. package/dist/features/ai/use-ai-assistant.js +3 -3
  184. package/dist/features/ai/use-ai-assistant.js.map +1 -1
  185. package/dist/features/ai/use-document-chat.js +2 -2
  186. package/dist/features/ai/use-document-chat.js.map +1 -1
  187. package/dist/features/ai/use-model-profiles.d.ts +2 -1
  188. package/dist/features/authors/attribution.d.ts +1 -1
  189. package/dist/features/authors/feature.js +12 -11
  190. package/dist/features/authors/feature.js.map +1 -1
  191. package/dist/features/block-ui/block-actions.d.ts +1 -1
  192. package/dist/features/block-ui/block-actions.js +1 -1
  193. package/dist/features/block-ui/block-actions.js.map +1 -1
  194. package/dist/features/block-ui/components/BlockUi.js +1 -1
  195. package/dist/features/block-ui/feature.js +1 -0
  196. package/dist/features/block-ui/feature.js.map +1 -1
  197. package/dist/features/block-ui/react/BlockUi.js +1 -1
  198. package/dist/features/collab/anchor-resolver.js +1 -1
  199. package/dist/features/collab/feature.js +2 -0
  200. package/dist/features/collab/feature.js.map +1 -1
  201. package/dist/features/comments/components/CommentThreadView.vue.d.ts +2 -1
  202. package/dist/features/comments/feature.js +12 -11
  203. package/dist/features/comments/feature.js.map +1 -1
  204. package/dist/features/comments/index.d.ts +3 -2
  205. package/dist/features/comments/index.js +1 -1
  206. package/dist/features/comments/margin-layout.d.ts +3 -2
  207. package/dist/features/comments/model.d.ts +3 -67
  208. package/dist/features/comments/model.js +2 -2
  209. package/dist/features/comments/model.js.map +1 -1
  210. package/dist/features/comments/react/CommentThreadView.d.ts +3 -2
  211. package/dist/features/comments/react/use-comments.d.ts +2 -1
  212. package/dist/features/comments/react.d.ts +1 -1
  213. package/dist/features/comments/schema.d.ts +2 -52
  214. package/dist/features/comments/schema.js.map +1 -1
  215. package/dist/features/comments/snapshot-equality.js.map +1 -1
  216. package/dist/features/comments/use-comments.d.ts +3 -2
  217. package/dist/features/comments/vue.d.ts +1 -1
  218. package/dist/features/composites/accepted-children.d.ts +1 -0
  219. package/dist/features/composites/accepted-children.js +16 -1
  220. package/dist/features/composites/accepted-children.js.map +1 -1
  221. package/dist/features/composites/ai-brief.js +31 -0
  222. package/dist/features/composites/ai-brief.js.map +1 -1
  223. package/dist/features/composites/bibliography-command.d.ts +11 -0
  224. package/dist/features/composites/bibliography-form.js +90 -0
  225. package/dist/features/composites/bibliography-form.js.map +1 -0
  226. package/dist/features/composites/bibliography.d.ts +33 -0
  227. package/dist/features/composites/bibliography.js +120 -0
  228. package/dist/features/composites/bibliography.js.map +1 -0
  229. package/dist/features/composites/components/BibliographyEditor.js +261 -0
  230. package/dist/features/composites/components/BibliographyEditor.js.map +1 -0
  231. package/dist/features/composites/components/CompositeChrome.js +75 -26
  232. package/dist/features/composites/components/CompositeChrome.js.map +1 -1
  233. package/dist/features/composites/components/CompositeDetails.js +46 -11
  234. package/dist/features/composites/components/CompositeDetails.js.map +1 -1
  235. package/dist/features/composites/components/CompositeDetails.vue.d.ts +2 -1
  236. package/dist/features/composites/components/CompositeFieldEditor.js +37 -4
  237. package/dist/features/composites/components/CompositeFieldEditor.js.map +1 -1
  238. package/dist/features/composites/components/CompositeInspector.js +17 -5
  239. package/dist/features/composites/components/CompositeInspector.js.map +1 -1
  240. package/dist/features/composites/components/CompositeTable.js +13 -4
  241. package/dist/features/composites/components/CompositeTable.js.map +1 -1
  242. package/dist/features/composites/components/CompositeTagsEditor.js +1 -1
  243. package/dist/features/composites/components/CompositeView.js +11 -1
  244. package/dist/features/composites/components/CompositeView.js.map +1 -1
  245. package/dist/features/composites/components/DerivationBadge.js +103 -0
  246. package/dist/features/composites/components/DerivationBadge.js.map +1 -0
  247. package/dist/features/composites/components/ReferenceFieldSelect.js +60 -0
  248. package/dist/features/composites/components/ReferenceFieldSelect.js.map +1 -0
  249. package/dist/features/composites/components/ReferenceView.js +122 -0
  250. package/dist/features/composites/components/ReferenceView.js.map +1 -0
  251. package/dist/features/composites/components/ReferenceView.vue.d.ts +96 -0
  252. package/dist/features/composites/components/SettingsEditingTab.js +1 -1
  253. package/dist/features/composites/convert.js +2 -2
  254. package/dist/features/composites/convert.js.map +1 -1
  255. package/dist/features/composites/derivation.d.ts +61 -0
  256. package/dist/features/composites/derivation.js +98 -0
  257. package/dist/features/composites/derivation.js.map +1 -0
  258. package/dist/features/composites/derived-chrome.js +69 -0
  259. package/dist/features/composites/derived-chrome.js.map +1 -0
  260. package/dist/features/composites/feature.js +159 -109
  261. package/dist/features/composites/feature.js.map +1 -1
  262. package/dist/features/composites/fences.d.ts +4 -3
  263. package/dist/features/composites/fences.js +51 -7
  264. package/dist/features/composites/fences.js.map +1 -1
  265. package/dist/features/composites/index.d.ts +12 -3
  266. package/dist/features/composites/index.js +15 -6
  267. package/dist/features/composites/inspector-model.d.ts +4 -1
  268. package/dist/features/composites/inspector-model.js +8 -4
  269. package/dist/features/composites/inspector-model.js.map +1 -1
  270. package/dist/features/composites/kinds.d.ts +8 -1
  271. package/dist/features/composites/kinds.js +145 -6
  272. package/dist/features/composites/kinds.js.map +1 -1
  273. package/dist/features/composites/legacy.d.ts +4 -1
  274. package/dist/features/composites/legacy.js +56 -1
  275. package/dist/features/composites/legacy.js.map +1 -1
  276. package/dist/features/composites/meta-display.js +40 -1
  277. package/dist/features/composites/meta-display.js.map +1 -1
  278. package/dist/features/composites/meta-keys.d.ts +7 -0
  279. package/dist/features/composites/meta-keys.js +21 -0
  280. package/dist/features/composites/meta-keys.js.map +1 -0
  281. package/dist/features/composites/node-views.d.ts +6 -3
  282. package/dist/features/composites/node-views.js +7 -3
  283. package/dist/features/composites/node-views.js.map +1 -1
  284. package/dist/features/composites/nodes.d.ts +6 -1
  285. package/dist/features/composites/nodes.js +33 -7
  286. package/dist/features/composites/nodes.js.map +1 -1
  287. package/dist/features/composites/react/BibliographyEditor.js +229 -0
  288. package/dist/features/composites/react/BibliographyEditor.js.map +1 -0
  289. package/dist/features/composites/react/CompositeChrome.js +65 -17
  290. package/dist/features/composites/react/CompositeChrome.js.map +1 -1
  291. package/dist/features/composites/react/CompositeDetails.d.ts +2 -1
  292. package/dist/features/composites/react/CompositeDetails.js +45 -6
  293. package/dist/features/composites/react/CompositeDetails.js.map +1 -1
  294. package/dist/features/composites/react/CompositeFieldEditor.d.ts +1 -1
  295. package/dist/features/composites/react/CompositeFieldEditor.js +24 -1
  296. package/dist/features/composites/react/CompositeFieldEditor.js.map +1 -1
  297. package/dist/features/composites/react/CompositeInspector.js +11 -5
  298. package/dist/features/composites/react/CompositeInspector.js.map +1 -1
  299. package/dist/features/composites/react/CompositeStatusMenu.js +1 -1
  300. package/dist/features/composites/react/CompositeSummaryEditor.js +1 -1
  301. package/dist/features/composites/react/CompositeTable.js +16 -2
  302. package/dist/features/composites/react/CompositeTable.js.map +1 -1
  303. package/dist/features/composites/react/CompositeTagsEditor.js +2 -2
  304. package/dist/features/composites/react/CompositeView.js +6 -1
  305. package/dist/features/composites/react/CompositeView.js.map +1 -1
  306. package/dist/features/composites/react/DerivationBadge.js +116 -0
  307. package/dist/features/composites/react/DerivationBadge.js.map +1 -0
  308. package/dist/features/composites/react/ReferenceFieldSelect.js +52 -0
  309. package/dist/features/composites/react/ReferenceFieldSelect.js.map +1 -0
  310. package/dist/features/composites/react/ReferenceView.d.ts +11 -0
  311. package/dist/features/composites/react/ReferenceView.js +115 -0
  312. package/dist/features/composites/react/ReferenceView.js.map +1 -0
  313. package/dist/features/composites/react/SettingsEditingTab.js +2 -2
  314. package/dist/features/composites/react.d.ts +2 -1
  315. package/dist/features/composites/react.js +7 -3
  316. package/dist/features/composites/react.js.map +1 -1
  317. package/dist/features/composites/reference-ai.js +16 -0
  318. package/dist/features/composites/reference-ai.js.map +1 -0
  319. package/dist/features/composites/reference-label.d.ts +19 -0
  320. package/dist/features/composites/reference-label.js +58 -0
  321. package/dist/features/composites/reference-label.js.map +1 -0
  322. package/dist/features/composites/reference-suggestion.d.ts +10 -0
  323. package/dist/features/composites/reference-suggestion.js +41 -0
  324. package/dist/features/composites/reference-suggestion.js.map +1 -0
  325. package/dist/features/composites/reference-text.d.ts +18 -0
  326. package/dist/features/composites/reference-text.js +89 -0
  327. package/dist/features/composites/reference-text.js.map +1 -0
  328. package/dist/features/composites/reference.d.ts +44 -0
  329. package/dist/features/composites/reference.js +148 -0
  330. package/dist/features/composites/reference.js.map +1 -0
  331. package/dist/features/composites/reveal-source.d.ts +32 -0
  332. package/dist/features/composites/reveal-source.js +89 -0
  333. package/dist/features/composites/reveal-source.js.map +1 -0
  334. package/dist/features/composites/rows.d.ts +21 -2
  335. package/dist/features/composites/rows.js +63 -9
  336. package/dist/features/composites/rows.js.map +1 -1
  337. package/dist/features/composites/schema.d.ts +9 -3
  338. package/dist/features/composites/schema.js +11 -4
  339. package/dist/features/composites/schema.js.map +1 -1
  340. package/dist/features/composites/table-model.js +12 -21
  341. package/dist/features/composites/table-model.js.map +1 -1
  342. package/dist/features/composites/vue.d.ts +3 -2
  343. package/dist/features/composites/vue.js +8 -4
  344. package/dist/features/composites/vue.js.map +1 -1
  345. package/dist/features/media/assets.d.ts +2 -0
  346. package/dist/features/media/assets.js +3 -2
  347. package/dist/features/media/assets.js.map +1 -1
  348. package/dist/features/media/components/FileView.js +13 -4
  349. package/dist/features/media/components/FileView.js.map +1 -1
  350. package/dist/features/media/feature.d.ts +3 -3
  351. package/dist/features/media/feature.js +21 -28
  352. package/dist/features/media/feature.js.map +1 -1
  353. package/dist/features/media/file-import.js +2 -2
  354. package/dist/features/media/file-import.js.map +1 -1
  355. package/dist/features/media/index.d.ts +2 -2
  356. package/dist/features/media/index.js +2 -2
  357. package/dist/features/media/react/FileView.js +19 -2
  358. package/dist/features/media/react/FileView.js.map +1 -1
  359. package/dist/features/media/schema.d.ts +8 -0
  360. package/dist/features/media/schema.js +126 -11
  361. package/dist/features/media/schema.js.map +1 -1
  362. package/dist/features/media/upload.d.ts +16 -14
  363. package/dist/features/media/upload.js +13 -19
  364. package/dist/features/media/upload.js.map +1 -1
  365. package/dist/features/mentions/index.d.ts +4 -3
  366. package/dist/features/mentions/index.js +4 -1
  367. package/dist/features/mentions/index.js.map +1 -1
  368. package/dist/features/mentions/mention-text.d.ts +1 -1
  369. package/dist/features/mentions/mention-text.js.map +1 -1
  370. package/dist/features/mentions/mention.d.ts +0 -6
  371. package/dist/features/mentions/mention.js.map +1 -1
  372. package/dist/features/mentions/metadata-defaults.d.ts +2 -2
  373. package/dist/features/mentions/metadata-defaults.js +3 -9
  374. package/dist/features/mentions/metadata-defaults.js.map +1 -1
  375. package/dist/features/mentions/schema.d.ts +2 -1
  376. package/dist/features/mentions/schema.js.map +1 -1
  377. package/dist/features/tables/feature.d.ts +2 -1
  378. package/dist/features/tables/feature.js +90 -70
  379. package/dist/features/tables/feature.js.map +1 -1
  380. package/dist/features/themes/components/SettingsAppearanceTab.js +6 -9
  381. package/dist/features/themes/components/SettingsAppearanceTab.js.map +1 -1
  382. package/dist/features/themes/feature.js +2 -0
  383. package/dist/features/themes/feature.js.map +1 -1
  384. package/dist/features/themes/index.d.ts +2 -1
  385. package/dist/features/themes/react/SettingsAppearanceTab.js +7 -10
  386. package/dist/features/themes/react/SettingsAppearanceTab.js.map +1 -1
  387. package/dist/features/themes/schema.d.ts +2 -6
  388. package/dist/features/themes/schema.js.map +1 -1
  389. package/dist/features/themes/theme-runtime.d.ts +1 -1
  390. package/dist/features/themes/theme-runtime.js +4 -2
  391. package/dist/features/themes/theme-runtime.js.map +1 -1
  392. package/dist/features/transcript/TranscriptSegmentView.js +48 -28
  393. package/dist/features/transcript/TranscriptSegmentView.js.map +1 -1
  394. package/dist/features/transcript/feature.js +21 -19
  395. package/dist/features/transcript/feature.js.map +1 -1
  396. package/dist/features/transcript/react/TranscriptSegmentView.js +55 -36
  397. package/dist/features/transcript/react/TranscriptSegmentView.js.map +1 -1
  398. package/dist/features/transcript/segment-node.d.ts +2 -0
  399. package/dist/features/transcript/segment-node.js +35 -7
  400. package/dist/features/transcript/segment-node.js.map +1 -1
  401. package/dist/i18n/de/composites.js +91 -1
  402. package/dist/i18n/de/composites.js.map +1 -1
  403. package/dist/i18n/de/integrations.js +49 -8
  404. package/dist/i18n/de/integrations.js.map +1 -1
  405. package/dist/i18n/de/media.js +0 -1
  406. package/dist/i18n/de/media.js.map +1 -1
  407. package/dist/i18n/de/palette.js +22 -0
  408. package/dist/i18n/de/palette.js.map +1 -0
  409. package/dist/i18n/de/tables.js +0 -1
  410. package/dist/i18n/de/tables.js.map +1 -1
  411. package/dist/i18n/de/transcript.js +2 -1
  412. package/dist/i18n/de/transcript.js.map +1 -1
  413. package/dist/i18n/de/tree.js +3 -0
  414. package/dist/i18n/de/tree.js.map +1 -1
  415. package/dist/i18n/de.d.ts +157 -11
  416. package/dist/i18n/de.js +3 -1
  417. package/dist/i18n/de.js.map +1 -1
  418. package/dist/i18n/en/composites.js +89 -1
  419. package/dist/i18n/en/composites.js.map +1 -1
  420. package/dist/i18n/en/integrations.js +49 -8
  421. package/dist/i18n/en/integrations.js.map +1 -1
  422. package/dist/i18n/en/media.js +0 -1
  423. package/dist/i18n/en/media.js.map +1 -1
  424. package/dist/i18n/en/palette.js +22 -0
  425. package/dist/i18n/en/palette.js.map +1 -0
  426. package/dist/i18n/en/tables.js +0 -1
  427. package/dist/i18n/en/tables.js.map +1 -1
  428. package/dist/i18n/en/transcript.js +2 -1
  429. package/dist/i18n/en/transcript.js.map +1 -1
  430. package/dist/i18n/en/tree.js +3 -0
  431. package/dist/i18n/en/tree.js.map +1 -1
  432. package/dist/i18n/en.js +3 -1
  433. package/dist/i18n/en.js.map +1 -1
  434. package/dist/index.d.ts +4 -3
  435. package/dist/integrations/composite-ai/bibliography-fetch.d.ts +31 -0
  436. package/dist/integrations/composite-ai/bibliography-fetch.js +159 -0
  437. package/dist/integrations/composite-ai/bibliography-fetch.js.map +1 -0
  438. package/dist/integrations/composite-ai/composite-fill.d.ts +30 -8
  439. package/dist/integrations/composite-ai/composite-fill.js +97 -56
  440. package/dist/integrations/composite-ai/composite-fill.js.map +1 -1
  441. package/dist/integrations/composite-ai/composite-summary.d.ts +4 -12
  442. package/dist/integrations/composite-ai/composite-summary.js +7 -26
  443. package/dist/integrations/composite-ai/composite-summary.js.map +1 -1
  444. package/dist/integrations/composite-ai/derive.d.ts +29 -0
  445. package/dist/integrations/composite-ai/derive.js +173 -0
  446. package/dist/integrations/composite-ai/derive.js.map +1 -0
  447. package/dist/integrations/composite-ai/index.d.ts +11 -7
  448. package/dist/integrations/composite-ai/index.js +72 -14
  449. package/dist/integrations/composite-ai/index.js.map +1 -1
  450. package/dist/integrations/composite-ai/rendition.d.ts +45 -0
  451. package/dist/integrations/composite-ai/rendition.js +314 -0
  452. package/dist/integrations/composite-ai/rendition.js.map +1 -0
  453. package/dist/integrations/composite-media/index.d.ts +7 -5
  454. package/dist/integrations/composite-media/index.js +86 -13
  455. package/dist/integrations/composite-media/index.js.map +1 -1
  456. package/dist/integrations/transcript-ai/index.d.ts +1 -1
  457. package/dist/integrations/transcript-ai/index.js +5 -2
  458. package/dist/integrations/transcript-ai/index.js.map +1 -1
  459. package/dist/integrations/transcript-ai/protocol.d.ts +2 -12
  460. package/dist/integrations/transcript-ai/protocol.js +0 -2
  461. package/dist/integrations/transcript-ai/protocol.js.map +1 -1
  462. package/dist/integrations/transcript-ai/transcript-cleanup.d.ts +5 -5
  463. package/dist/integrations/transcript-ai/transcript-cleanup.js +7 -10
  464. package/dist/integrations/transcript-ai/transcript-cleanup.js.map +1 -1
  465. package/dist/markdown/MarkdownSurface.vue.d.ts +6 -5
  466. package/dist/markdown/MarkdownSurface2.js +3 -6
  467. package/dist/markdown/MarkdownSurface2.js.map +1 -1
  468. package/dist/markdown/document.js +1 -1
  469. package/dist/markdown/source-mode.d.ts +1 -1
  470. package/dist/nuxt/module.d.ts +1402 -54
  471. package/dist/nuxt/module.js +6 -49
  472. package/dist/nuxt/module.js.map +1 -1
  473. package/dist/nuxt/runtime/install-context.d.ts +7 -3
  474. package/dist/nuxt/runtime/install-context.js +14 -8
  475. package/dist/nuxt/runtime/install-context.js.map +1 -1
  476. package/dist/nuxt/runtime/plugins/editor-context-nuxt-ui.client.ts +2 -2
  477. package/dist/nuxt/runtime/server/plugins/editor-server.js +20 -12
  478. package/dist/nuxt/runtime/server/plugins/editor-server.js.map +1 -1
  479. package/dist/presets/compose.d.ts +94 -0
  480. package/dist/presets/compose.js +164 -0
  481. package/dist/presets/compose.js.map +1 -0
  482. package/dist/react/AdvancedEditor.d.ts +15 -15
  483. package/dist/react/AdvancedEditor.js +15 -13
  484. package/dist/react/AdvancedEditor.js.map +1 -1
  485. package/dist/react/EditorCommandPalette.d.ts +13 -0
  486. package/dist/react/EditorCommandPalette.js +118 -0
  487. package/dist/react/EditorCommandPalette.js.map +1 -0
  488. package/dist/react/EditorSettingsModal.d.ts +5 -5
  489. package/dist/react/EditorSettingsModal.js +7 -4
  490. package/dist/react/EditorSettingsModal.js.map +1 -1
  491. package/dist/react/EditorSettingsPanel.d.ts +7 -7
  492. package/dist/react/EditorSettingsPanel.js +8 -5
  493. package/dist/react/EditorSettingsPanel.js.map +1 -1
  494. package/dist/react/EditorSurface.d.ts +7 -7
  495. package/dist/react/EditorSurface.js +10 -6
  496. package/dist/react/EditorSurface.js.map +1 -1
  497. package/dist/react/EditorToolbar.d.ts +4 -6
  498. package/dist/react/EditorToolbar.js +29 -37
  499. package/dist/react/EditorToolbar.js.map +1 -1
  500. package/dist/react/SimpleEditor.d.ts +22 -23
  501. package/dist/react/SimpleEditor.js +21 -7
  502. package/dist/react/SimpleEditor.js.map +1 -1
  503. package/dist/react/advanced.d.ts +4 -3
  504. package/dist/react/advanced.js +2 -2
  505. package/dist/react/compose.d.ts +20 -0
  506. package/dist/react/compose.js +49 -0
  507. package/dist/react/compose.js.map +1 -0
  508. package/dist/react/composed-surface.d.ts +39 -0
  509. package/dist/react/composed-surface.js +71 -0
  510. package/dist/react/composed-surface.js.map +1 -0
  511. package/dist/react/context.js +6 -2
  512. package/dist/react/context.js.map +1 -1
  513. package/dist/react/index.d.ts +2 -1
  514. package/dist/react/index.js +2 -1
  515. package/dist/react/key-labels.js +15 -0
  516. package/dist/react/key-labels.js.map +1 -0
  517. package/dist/react/settings.d.ts +1 -1
  518. package/dist/react/simple.d.ts +2 -2
  519. package/dist/react/ui/command.js +36 -1
  520. package/dist/react/ui/command.js.map +1 -1
  521. package/dist/schema/advanced.d.ts +6 -6
  522. package/dist/schema/advanced.js +26 -29
  523. package/dist/schema/advanced.js.map +1 -1
  524. package/dist/server/ai.d.ts +5 -16
  525. package/dist/server/ai.js.map +1 -1
  526. package/dist/server/auth.d.ts +9 -0
  527. package/dist/server/collab-state.d.ts +1 -1
  528. package/dist/server/collab-state.js.map +1 -1
  529. package/dist/server/collab.d.ts +13 -13
  530. package/dist/server/collab.js +34 -18
  531. package/dist/server/collab.js.map +1 -1
  532. package/dist/server/crossref.js +78 -0
  533. package/dist/server/crossref.js.map +1 -0
  534. package/dist/server/errors.d.ts +1 -1
  535. package/dist/server/errors.js +1 -1
  536. package/dist/server/errors.js.map +1 -1
  537. package/dist/server/extract.js +308 -0
  538. package/dist/server/extract.js.map +1 -0
  539. package/dist/{nuxt/runtime/server/utils/editor-route.js → server/h3.js} +8 -16
  540. package/dist/server/h3.js.map +1 -0
  541. package/dist/server/handlers/ai.d.ts +30 -9
  542. package/dist/server/handlers/ai.js +170 -36
  543. package/dist/server/handlers/ai.js.map +1 -1
  544. package/dist/server/handlers/context.d.ts +12 -5
  545. package/dist/server/handlers/context.js +10 -4
  546. package/dist/server/handlers/context.js.map +1 -1
  547. package/dist/server/handlers/editor.d.ts +19 -13
  548. package/dist/server/handlers/editor.js +49 -38
  549. package/dist/server/handlers/editor.js.map +1 -1
  550. package/dist/server/handlers/index.d.ts +4 -4
  551. package/dist/server/handlers/index.js +4 -4
  552. package/dist/server/host.d.ts +16 -25
  553. package/dist/server/host.js +58 -41
  554. package/dist/server/host.js.map +1 -1
  555. package/dist/server/index.d.ts +6 -4
  556. package/dist/server/index.js +3 -2
  557. package/dist/server/pdf.js +97 -0
  558. package/dist/server/pdf.js.map +1 -0
  559. package/dist/server/{adapter.d.ts → ports.d.ts} +81 -30
  560. package/dist/server/ports.js +29 -0
  561. package/dist/server/ports.js.map +1 -0
  562. package/dist/server/routes.js +144 -0
  563. package/dist/server/routes.js.map +1 -0
  564. package/dist/settings/index.d.ts +1 -1
  565. package/dist/settings/index.js.map +1 -1
  566. package/dist/styles/composites.css +25 -0
  567. package/dist/tree/DocumentTree.js +56 -29
  568. package/dist/tree/DocumentTree.js.map +1 -1
  569. package/dist/tree/react/DocumentTree.js +23 -0
  570. package/dist/tree/react/DocumentTree.js.map +1 -1
  571. package/dist/tree/tree-host.js +2 -2
  572. package/dist/tree/tree-items.js +1 -1
  573. package/dist/vue/AdvancedEditor.js +30 -9
  574. package/dist/vue/AdvancedEditor.js.map +1 -1
  575. package/dist/vue/AdvancedEditor.vue.d.ts +28 -8
  576. package/dist/vue/SimpleEditor.js +62 -16
  577. package/dist/vue/SimpleEditor.js.map +1 -1
  578. package/dist/vue/SimpleEditor.vue.d.ts +37 -7
  579. package/dist/vue/advanced.d.ts +3 -2
  580. package/dist/vue/advanced.js +2 -2
  581. package/dist/vue/components/EditorCommandPalette.js +91 -0
  582. package/dist/vue/components/EditorCommandPalette.js.map +1 -0
  583. package/dist/vue/components/EditorCommandPalette.vue.d.ts +15 -0
  584. package/dist/vue/components/EditorSettingsModal.js +10 -6
  585. package/dist/vue/components/EditorSettingsModal.js.map +1 -1
  586. package/dist/vue/components/EditorSettingsModal.vue.d.ts +4 -4
  587. package/dist/vue/components/EditorSettingsPanel.js +10 -6
  588. package/dist/vue/components/EditorSettingsPanel.js.map +1 -1
  589. package/dist/vue/components/EditorSettingsPanel.vue.d.ts +6 -6
  590. package/dist/vue/components/EditorSurface.js +11 -6
  591. package/dist/vue/components/EditorSurface.js.map +1 -1
  592. package/dist/vue/components/EditorSurface.vue.d.ts +7 -7
  593. package/dist/vue/components/EditorToolbar.js +41 -49
  594. package/dist/vue/components/EditorToolbar.js.map +1 -1
  595. package/dist/vue/components/EditorToolbar.vue.d.ts +2 -4
  596. package/dist/vue/compose.d.ts +17 -0
  597. package/dist/vue/compose.js +51 -0
  598. package/dist/vue/compose.js.map +1 -0
  599. package/dist/vue/context-key.d.ts +6 -0
  600. package/dist/vue/context-key.js +6 -0
  601. package/dist/vue/context-key.js.map +1 -0
  602. package/dist/vue/context.d.ts +8 -6
  603. package/dist/vue/context.js +6 -5
  604. package/dist/vue/context.js.map +1 -1
  605. package/dist/vue/index.d.ts +10 -8
  606. package/dist/vue/index.js +10 -8
  607. package/dist/vue/kit/index.d.ts +2 -2
  608. package/dist/vue/kit/nuxt-ui.js +23 -0
  609. package/dist/vue/kit/nuxt-ui.js.map +1 -1
  610. package/dist/vue/kit/types.d.ts +40 -1
  611. package/package.json +30 -16
  612. package/dist/adapters/comments/client.d.ts +0 -64
  613. package/dist/adapters/comments/client.js.map +0 -1
  614. package/dist/adapters/routes.js.map +0 -1
  615. package/dist/core/toolbar.d.ts +0 -74
  616. package/dist/core/toolbar.js +0 -45
  617. package/dist/core/toolbar.js.map +0 -1
  618. package/dist/integrations/composite-ai/document-transcribe.d.ts +0 -14
  619. package/dist/integrations/composite-ai/document-transcribe.js +0 -89
  620. package/dist/integrations/composite-ai/document-transcribe.js.map +0 -1
  621. package/dist/nuxt/runtime/server/api/ai/chat.post.d.ts +0 -5
  622. package/dist/nuxt/runtime/server/api/ai/chat.post.js +0 -8
  623. package/dist/nuxt/runtime/server/api/ai/chat.post.js.map +0 -1
  624. package/dist/nuxt/runtime/server/api/ai/complete.post.d.ts +0 -5
  625. package/dist/nuxt/runtime/server/api/ai/complete.post.js +0 -8
  626. package/dist/nuxt/runtime/server/api/ai/complete.post.js.map +0 -1
  627. package/dist/nuxt/runtime/server/api/ai/generate.post.d.ts +0 -5
  628. package/dist/nuxt/runtime/server/api/ai/generate.post.js +0 -8
  629. package/dist/nuxt/runtime/server/api/ai/generate.post.js.map +0 -1
  630. package/dist/nuxt/runtime/server/api/ai/models.get.d.ts +0 -5
  631. package/dist/nuxt/runtime/server/api/ai/models.get.js +0 -8
  632. package/dist/nuxt/runtime/server/api/ai/models.get.js.map +0 -1
  633. package/dist/nuxt/runtime/server/api/ai/transcribe.post.d.ts +0 -5
  634. package/dist/nuxt/runtime/server/api/ai/transcribe.post.js +0 -8
  635. package/dist/nuxt/runtime/server/api/ai/transcribe.post.js.map +0 -1
  636. package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.d.ts +0 -5
  637. package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js +0 -8
  638. package/dist/nuxt/runtime/server/api/ai/transcript-cleanup.post.js.map +0 -1
  639. package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.d.ts +0 -5
  640. package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js +0 -8
  641. package/dist/nuxt/runtime/server/api/editor/assets/[id]/[name].get.js.map +0 -1
  642. package/dist/nuxt/runtime/server/api/editor/assets/[id].post.d.ts +0 -5
  643. package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js +0 -8
  644. package/dist/nuxt/runtime/server/api/editor/assets/[id].post.js.map +0 -1
  645. package/dist/nuxt/runtime/server/api/editor/settings.get.d.ts +0 -5
  646. package/dist/nuxt/runtime/server/api/editor/settings.get.js +0 -8
  647. package/dist/nuxt/runtime/server/api/editor/settings.get.js.map +0 -1
  648. package/dist/nuxt/runtime/server/api/editor/settings.put.d.ts +0 -5
  649. package/dist/nuxt/runtime/server/api/editor/settings.put.js +0 -8
  650. package/dist/nuxt/runtime/server/api/editor/settings.put.js.map +0 -1
  651. package/dist/nuxt/runtime/server/api/editor/tags.get.d.ts +0 -5
  652. package/dist/nuxt/runtime/server/api/editor/tags.get.js +0 -8
  653. package/dist/nuxt/runtime/server/api/editor/tags.get.js.map +0 -1
  654. package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.d.ts +0 -5
  655. package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js +0 -8
  656. package/dist/nuxt/runtime/server/api/editor/themes/[id].delete.js.map +0 -1
  657. package/dist/nuxt/runtime/server/api/editor/themes/[id].get.d.ts +0 -5
  658. package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js +0 -8
  659. package/dist/nuxt/runtime/server/api/editor/themes/[id].get.js.map +0 -1
  660. package/dist/nuxt/runtime/server/api/editor/themes/index.get.d.ts +0 -5
  661. package/dist/nuxt/runtime/server/api/editor/themes/index.get.js +0 -8
  662. package/dist/nuxt/runtime/server/api/editor/themes/index.get.js.map +0 -1
  663. package/dist/nuxt/runtime/server/api/editor/themes/index.post.d.ts +0 -5
  664. package/dist/nuxt/runtime/server/api/editor/themes/index.post.js +0 -8
  665. package/dist/nuxt/runtime/server/api/editor/themes/index.post.js.map +0 -1
  666. package/dist/nuxt/runtime/server/api/editor/users.get.d.ts +0 -5
  667. package/dist/nuxt/runtime/server/api/editor/users.get.js +0 -8
  668. package/dist/nuxt/runtime/server/api/editor/users.get.js.map +0 -1
  669. package/dist/nuxt/runtime/server/plugins/collab.d.ts +0 -5
  670. package/dist/nuxt/runtime/server/plugins/collab.js +0 -10
  671. package/dist/nuxt/runtime/server/plugins/collab.js.map +0 -1
  672. package/dist/nuxt/runtime/server/routes/collab/[id].d.ts +0 -5
  673. package/dist/nuxt/runtime/server/routes/collab/[id].js +0 -35
  674. package/dist/nuxt/runtime/server/routes/collab/[id].js.map +0 -1
  675. package/dist/nuxt/runtime/server/utils/editor-route.d.ts +0 -11
  676. package/dist/nuxt/runtime/server/utils/editor-route.js.map +0 -1
  677. package/dist/presets/advanced.d.ts +0 -33
  678. package/dist/presets/advanced.js +0 -50
  679. package/dist/presets/advanced.js.map +0 -1
  680. package/dist/presets/simple.d.ts +0 -9
  681. package/dist/presets/simple.js +0 -12
  682. package/dist/presets/simple.js.map +0 -1
  683. package/dist/react/advanced-preset.d.ts +0 -11
  684. package/dist/react/advanced-preset.js +0 -31
  685. package/dist/react/advanced-preset.js.map +0 -1
  686. package/dist/vue/advanced-preset.d.ts +0 -13
  687. package/dist/vue/advanced-preset.js +0 -33
  688. package/dist/vue/advanced-preset.js.map +0 -1
  689. package/docs/extending.md +0 -538
  690. package/docs/integration.md +0 -632
  691. package/docs/llms.md +0 -383
  692. package/docs/usage.md +0 -1076
@@ -1 +1 @@
1
- {"version":3,"file":"EditorToolbar.js","names":["_openBlock","_createElementBlock","_unref","_Fragment","_renderList","_createCommentVNode","_createVNode","_withCtx","_createBlock","_resolveDynamicComponent","_withModifiers"],"sources":["../../../src/vue/components/EditorToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useUiKit } from '../kit/use-ui-kit'\nimport type { Editor } from '@tiptap/core'\nimport { type Component, computed, getCurrentInstance, toRaw } from 'vue'\nimport { abilitiesAtSelection } from '../../core/abilities'\nimport { contributions } from '../../core/define-editor'\nimport { borrowedFeatureContext, editorEntryOf } from '../../core/editor-ui'\nimport { useEditorContext } from '../context'\nimport { useEditorI18n } from '../use-editor-i18n'\nimport { trackedStore } from '../store-ref'\nimport type { EditorPreset } from '../../core/feature'\nimport type { Ability } from '../../core/schema/abilities'\nimport { mergeToolbarGroups, type MenuItem, type ToolbarGroup, type ToolbarItem } from '../../core/toolbar'\n\n/**\n * The toolbar of an editor, placed anywhere on the page. `editor` is the instance it works on (from the surface's\n * `ready` event); the preset registered for that instance supplies the groups, `preset` renders them (disabled) while\n * there is no editor yet. Never reads a global active editor.\n */\nconst props = defineProps<{ editor?: Editor, preset?: EditorPreset }>()\n\nconst { Button: UButton, DropdownMenu: UDropdownMenu, FieldGroup: UFieldGroup, Tooltip: UTooltip } = useUiKit()\n\nconst appContext = useEditorContext()\nconst { t } = useEditorI18n()\nconst instance = getCurrentInstance()\n\n// The context toolbar factories see: settings and fetch of the app, everything per-surface delegates to the editor's\n// registered context while there is one.\nconst ctx = borrowedFeatureContext({\n app: appContext,\n getEditor: () => props.editor,\n unwrap: toRaw,\n // Tracked: `active`/`visible`/`menu` read the settings during render, which must re-run when they change.\n settings: trackedStore(appContext.settings),\n})\n\n// Factories run during setup (they may use composables that inject); a later preset is built within the app context.\nconst built = new WeakMap<EditorPreset, ToolbarGroup[]>()\nfunction groupsOf(preset: EditorPreset | undefined): ToolbarGroup[] {\n if (!preset) return []\n const cached = built.get(preset)\n if (cached) return cached\n const build = () => mergeToolbarGroups(contributions(preset, 'toolbar').flatMap(factory => factory(ctx)))\n const groups = instance ? instance.appContext.app.runWithContext(build) : build()\n built.set(preset, groups)\n return groups\n}\ngroupsOf(props.preset)\n\nconst visibleGroups = computed(() => {\n const editor = props.editor\n const groups = groupsOf(editorEntryOf(editor && toRaw(editor))?.preset ?? props.preset)\n return groups\n .filter(group => !editor || !group.visible || group.visible(editor))\n .map(group => ({ group, items: group.items.filter(item => !editor || !item.visible || item.visible(editor)) }))\n .filter(({ items }) => items.length > 0)\n})\n\n// `active`, `can()` and the abilities read the vue-3 Editor's reactive `state`, so these re-evaluate on every transaction.\nconst abilities = computed(() => props.editor ? abilitiesAtSelection(props.editor) : new Set<Ability>())\nfunction active(item: ToolbarItem): boolean {\n return !!props.editor && !!item.active?.(props.editor)\n}\nfunction disabled(item: ToolbarItem): boolean {\n const editor = props.editor\n if (!editor) return true\n if (item.disabled?.(editor)) return true\n return !active(item) && !!item.ability && !abilities.value.has(item.ability)\n}\nfunction run(item: ToolbarItem) {\n if (props.editor) item.run?.(props.editor)\n}\nfunction menuOf(item: ToolbarItem): MenuItem[] {\n return props.editor && item.menu ? item.menu(props.editor) : []\n}\n/** Descriptors are framework-agnostic (`component: unknown`); in this Vue toolbar they are Vue components. */\nfunction componentOf(item: ToolbarItem): Component | undefined {\n return item.component as Component | undefined\n}\n</script>\n\n<template>\n <div class=\"flex flex-wrap items-center gap-1.5\" role=\"toolbar\" :aria-label=\"t('toolbar.label')\">\n <template v-for=\"({ group, items }, gi) in visibleGroups\" :key=\"group.id\">\n <span v-if=\"gi > 0\" role=\"separator\" aria-orientation=\"vertical\" class=\"mx-2 h-6 w-[2px] shrink-0 bg-[var(--sk-border-accented)]\" />\n <UFieldGroup size=\"sm\">\n <template v-for=\"item in items\" :key=\"item.id\">\n <component :is=\"componentOf(item)\" v-if=\"componentOf(item)\" :editor=\"props.editor\" />\n <UDropdownMenu v-else-if=\"item.menu\" :items=\"menuOf(item)\">\n <UTooltip :text=\"item.label\" :kbds=\"item.kbds\">\n <UButton\n :key=\"item.icon\"\n color=\"neutral\"\n variant=\"ghost\"\n :icon=\"item.icon\"\n :aria-label=\"item.label\"\n :disabled=\"disabled(item)\"\n @mousedown.prevent\n />\n </UTooltip>\n </UDropdownMenu>\n <UTooltip v-else :text=\"item.label\" :kbds=\"item.kbds\">\n <UButton\n :key=\"item.icon\"\n color=\"neutral\"\n variant=\"ghost\"\n active-color=\"primary\"\n active-variant=\"soft\"\n :icon=\"item.icon\"\n :aria-label=\"item.label\"\n :active=\"active(item)\"\n :aria-pressed=\"item.active ? active(item) : undefined\"\n :disabled=\"disabled(item)\"\n @mousedown.prevent\n @click=\"run(item)\"\n />\n </UTooltip>\n </template>\n </UFieldGroup>\n </template>\n </div>\n</template>\n"],"mappings":"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"}
1
+ {"version":3,"file":"EditorToolbar.js","names":["_openBlock","_createElementBlock","_unref","_Fragment","_renderList","_createCommentVNode","_createVNode","_withCtx","_createBlock","_resolveDynamicComponent","_withModifiers"],"sources":["../../../src/vue/components/EditorToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useUiKit } from '../kit/use-ui-kit'\nimport type { Editor } from '@tiptap/core'\nimport { type Component, computed, getCurrentInstance, toRaw } from 'vue'\nimport { type CommandDef, type CommandState, commandState, type MenuItem, type PlacedToolbarGroup, toolbarOf } from '../../core/commands'\nimport { borrowedFeatureContext, editorEntryOf } from '../../core/editor-ui'\nimport { useEditorContext } from '../context'\nimport { useEditorI18n } from '../use-editor-i18n'\nimport { trackedStore } from '../store-ref'\nimport type { EditorPreset } from '../../core/feature'\n\n/**\n * The toolbar of an editor, placed anywhere on the page. `editor` is the instance it works on (from the surface's\n * `ready` event); the preset registered for that instance (`editorEntryOf`) supplies the groups. Without an editor\n * (not mounted yet, or read-only by the host's choice) it renders no groups. Never reads a global active editor.\n */\nconst props = defineProps<{ editor?: Editor }>()\n\nconst { Button: UButton, DropdownMenu: UDropdownMenu, FieldGroup: UFieldGroup, Tooltip: UTooltip } = useUiKit()\n\nconst appContext = useEditorContext()\nconst { t } = useEditorI18n()\nconst instance = getCurrentInstance()\n\n// The context toolbar factories see: settings and fetch of the app, everything per-surface delegates to the editor's\n// registered context while there is one.\nconst ctx = borrowedFeatureContext({\n app: appContext,\n getEditor: () => props.editor,\n unwrap: toRaw,\n // Tracked: `active`/`visible`/`menu` read the settings during render, which must re-run when they change.\n settings: trackedStore(appContext.settings),\n})\n\n// Factories run during setup (they may use composables that inject); a later preset is built within the app context.\nconst built = new WeakMap<EditorPreset, PlacedToolbarGroup[]>()\nfunction groupsOf(preset: EditorPreset | undefined): PlacedToolbarGroup[] {\n if (!preset) return []\n const cached = built.get(preset)\n if (cached) return cached\n const build = () => toolbarOf(preset, ctx)\n const groups = instance ? instance.appContext.app.runWithContext(build) : build()\n built.set(preset, groups)\n return groups\n}\n\n// Every enabled/visible/active state comes from `commandState`. It reads the vue-3 Editor's reactive `state`\n// (through `can()` and the abilities), so this re-evaluates on every transaction. The raw instance is what the\n// registered entry (and with it the insert guards) is keyed by.\nconst NO_EDITOR: CommandState = { visible: true, enabled: false, active: false }\nconst visibleGroups = computed(() => {\n const editor = props.editor && toRaw(props.editor)\n const groups = groupsOf(editorEntryOf(editor)?.preset)\n return groups\n .filter(group => !editor || !group.visible || group.visible(editor))\n .map(group => ({\n group,\n items: group.items\n .map(cmd => ({ cmd, state: editor ? commandState(editor, cmd, 'selection') : NO_EDITOR }))\n .filter(({ state }) => state.visible),\n }))\n .filter(({ items }) => items.length > 0)\n})\n\nfunction run(cmd: CommandDef) {\n if (props.editor && 'run' in cmd) cmd.run(props.editor)\n}\nfunction menuOf(cmd: CommandDef): MenuItem[] {\n return props.editor && 'menu' in cmd ? cmd.menu(props.editor) : []\n}\n/** Descriptors are framework-agnostic (`component: unknown`); in this Vue toolbar they are Vue components. */\nfunction componentOf(cmd: CommandDef): Component | undefined {\n return 'component' in cmd ? cmd.component as Component : undefined\n}\n</script>\n\n<template>\n <div class=\"flex flex-wrap items-center gap-1.5\" role=\"toolbar\" :aria-label=\"t('toolbar.label')\">\n <template v-for=\"({ group, items }, gi) in visibleGroups\" :key=\"group.id\">\n <span v-if=\"gi > 0\" role=\"separator\" aria-orientation=\"vertical\" class=\"mx-2 h-6 w-[2px] shrink-0 bg-[var(--sk-border-accented)]\" />\n <UFieldGroup size=\"sm\">\n <template v-for=\"{ cmd, state } in items\" :key=\"cmd.id\">\n <component :is=\"componentOf(cmd)\" v-if=\"componentOf(cmd)\" :editor=\"props.editor\" />\n <UDropdownMenu v-else-if=\"'menu' in cmd\" :items=\"menuOf(cmd)\">\n <UTooltip :text=\"cmd.label\" :kbds=\"cmd.kbds\">\n <UButton\n :key=\"cmd.icon\"\n color=\"neutral\"\n variant=\"ghost\"\n :icon=\"cmd.icon\"\n :aria-label=\"cmd.label\"\n :disabled=\"!state.enabled\"\n @mousedown.prevent\n />\n </UTooltip>\n </UDropdownMenu>\n <UTooltip v-else :text=\"cmd.label\" :kbds=\"cmd.kbds\">\n <UButton\n :key=\"cmd.icon\"\n color=\"neutral\"\n variant=\"ghost\"\n active-color=\"primary\"\n active-variant=\"soft\"\n :icon=\"cmd.icon\"\n :aria-label=\"cmd.label\"\n :active=\"state.active\"\n :aria-pressed=\"cmd.active ? state.active : undefined\"\n :disabled=\"!state.enabled\"\n @mousedown.prevent\n @click=\"run(cmd)\"\n />\n </UTooltip>\n </template>\n </UFieldGroup>\n </template>\n </div>\n</template>\n"],"mappings":"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"}
@@ -1,14 +1,12 @@
1
- import { EditorPreset } from "../../core/feature.js";
2
1
  import { Editor } from "@tiptap/core";
3
2
  //#region src/vue/components/EditorToolbar.vue.d.ts
4
3
  /**
5
4
  * The toolbar of an editor, placed anywhere on the page. `editor` is the instance it works on (from the surface's
6
- * `ready` event); the preset registered for that instance supplies the groups, `preset` renders them (disabled) while
7
- * there is no editor yet. Never reads a global active editor.
5
+ * `ready` event); the preset registered for that instance (`editorEntryOf`) supplies the groups. Without an editor
6
+ * (not mounted yet, or read-only by the host's choice) it renders no groups. Never reads a global active editor.
8
7
  */
9
8
  type __VLS_Props = {
10
9
  editor?: Editor;
11
- preset?: EditorPreset;
12
10
  };
13
11
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
12
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,17 @@
1
+ import { ComposeOptions, ComposedEditor } from "../presets/compose.js";
2
+ import { Component } from "vue";
3
+ //#region src/vue/compose.d.ts
4
+ /**
5
+ * `composeEditor` of `presets/compose` over the Vue bindings: the editor of the three dimensions (`content`,
6
+ * `interaction`, `ai`), pruned by the capabilities of `options.backend`. Call during component setup (`themesFeature()`
7
+ * reads the current Vue app to stop the theme runtime when it unmounts).
8
+ */
9
+ export declare const composeEditor: (options: ComposeOptions<Component>) => ComposedEditor<Component>;
10
+ /**
11
+ * The advanced editor on the Vue surface: `{ content: 'rich', interaction: 'full', ai: true }`, every dimension option
12
+ * overridable (`compositeKinds`, `backend`, `add`, `remove`, ...). Collaboration is active only when a session is passed
13
+ * to the surface.
14
+ */
15
+ export declare const advancedEditor: (options?: Partial<ComposeOptions<Component>>) => ComposedEditor<Component>;
16
+ //#endregion
17
+ //# sourceMappingURL=compose.d.ts.map
@@ -0,0 +1,51 @@
1
+ import { coreUiFeature } from "../core/core-feature.js";
2
+ import { composeEditor as composeEditor$1 } from "../presets/compose.js";
3
+ import { compositeAiFeature } from "../integrations/composite-ai/index.js";
4
+ import { transcriptAiFeature } from "../integrations/transcript-ai/index.js";
5
+ import { mediaFeature } from "../features/media/vue.js";
6
+ import _sfc_main from "./components/EditorCommandPalette.js";
7
+ import { aiFeature } from "../features/ai/vue.js";
8
+ import { authorsFeature } from "../features/authors/vue.js";
9
+ import { blockUiFeature } from "../features/block-ui/vue.js";
10
+ import { collabFeature } from "../features/collab/vue.js";
11
+ import { commentsFeature } from "../features/comments/vue.js";
12
+ import { compositeFeature } from "../features/composites/vue.js";
13
+ import { themesFeature } from "../features/themes/vue.js";
14
+ import { transcriptFeature } from "../features/transcript/vue.js";
15
+ //#region src/vue/compose.ts
16
+ /** The Vue bindings of every UI-bound catalog feature. */
17
+ const VUE_BINDINGS = {
18
+ "core-ui": () => coreUiFeature({ palette: _sfc_main }),
19
+ "media": mediaFeature,
20
+ "transcript": transcriptFeature,
21
+ "composites": compositeFeature,
22
+ "authors": authorsFeature,
23
+ "comments": commentsFeature,
24
+ "ai": aiFeature,
25
+ "composite-ai": compositeAiFeature,
26
+ "transcript-ai": transcriptAiFeature,
27
+ "collab": collabFeature,
28
+ "block-ui": blockUiFeature,
29
+ "themes": themesFeature
30
+ };
31
+ /**
32
+ * `composeEditor` of `presets/compose` over the Vue bindings: the editor of the three dimensions (`content`,
33
+ * `interaction`, `ai`), pruned by the capabilities of `options.backend`. Call during component setup (`themesFeature()`
34
+ * reads the current Vue app to stop the theme runtime when it unmounts).
35
+ */
36
+ const composeEditor = (options) => composeEditor$1(VUE_BINDINGS, options);
37
+ /**
38
+ * The advanced editor on the Vue surface: `{ content: 'rich', interaction: 'full', ai: true }`, every dimension option
39
+ * overridable (`compositeKinds`, `backend`, `add`, `remove`, ...). Collaboration is active only when a session is passed
40
+ * to the surface.
41
+ */
42
+ const advancedEditor = (options = {}) => composeEditor({
43
+ content: "rich",
44
+ interaction: "full",
45
+ ai: true,
46
+ ...options
47
+ });
48
+ //#endregion
49
+ export { advancedEditor, composeEditor };
50
+
51
+ //# sourceMappingURL=compose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose.js","names":["EditorCommandPalette","compose"],"sources":["../../src/vue/compose.ts"],"sourcesContent":["import type { Component } from 'vue'\nimport { coreUiFeature } from '../core/core-feature'\nimport EditorCommandPalette from './components/EditorCommandPalette.vue'\nimport { aiFeature } from '../features/ai/vue'\nimport { authorsFeature } from '../features/authors/vue'\nimport { blockUiFeature } from '../features/block-ui/vue'\nimport { collabFeature } from '../features/collab/vue'\nimport { commentsFeature } from '../features/comments/vue'\nimport { compositeFeature } from '../features/composites/vue'\nimport { mediaFeature } from '../features/media/vue'\nimport { themesFeature } from '../features/themes/vue'\nimport { transcriptFeature } from '../features/transcript/vue'\nimport { compositeAiFeature } from '../integrations/composite-ai'\nimport { transcriptAiFeature } from '../integrations/transcript-ai'\nimport { type ComposedEditor, type ComposeOptions, composeEditor as compose, type UiBindings } from '../presets/compose'\n\n/** The Vue bindings of every UI-bound catalog feature. */\nconst VUE_BINDINGS = {\n 'core-ui': () => coreUiFeature<Component>({ palette: EditorCommandPalette }),\n 'media': mediaFeature,\n 'transcript': transcriptFeature,\n 'composites': compositeFeature,\n 'authors': authorsFeature,\n 'comments': commentsFeature,\n 'ai': aiFeature,\n 'composite-ai': compositeAiFeature,\n 'transcript-ai': transcriptAiFeature,\n 'collab': collabFeature,\n 'block-ui': blockUiFeature,\n 'themes': themesFeature,\n} satisfies UiBindings<Component>\n\n/**\n * `composeEditor` of `presets/compose` over the Vue bindings: the editor of the three dimensions (`content`,\n * `interaction`, `ai`), pruned by the capabilities of `options.backend`. Call during component setup (`themesFeature()`\n * reads the current Vue app to stop the theme runtime when it unmounts).\n */\nexport const composeEditor = (options: ComposeOptions<Component>): ComposedEditor<Component> => compose(VUE_BINDINGS, options)\n\n/**\n * The advanced editor on the Vue surface: `{ content: 'rich', interaction: 'full', ai: true }`, every dimension option\n * overridable (`compositeKinds`, `backend`, `add`, `remove`, ...). Collaboration is active only when a session is passed\n * to the surface.\n */\nexport const advancedEditor = (options: Partial<ComposeOptions<Component>> = {}): ComposedEditor<Component> => composeEditor({ content: 'rich', interaction: 'full', ai: true, ...options })\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAM,eAAe;CACnB,iBAAiB,cAAyB,EAAE,SAASA,UAAqB,CAAC;CAC3E,SAAS;CACT,cAAc;CACd,cAAc;CACd,WAAW;CACX,YAAY;CACZ,MAAM;CACN,gBAAgB;CAChB,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,UAAU;AACZ;;;;;;AAOA,MAAa,iBAAiB,YAAkEC,gBAAQ,cAAc,OAAO;;;;;;AAO7H,MAAa,kBAAkB,UAA8C,CAAC,MAAiC,cAAc;CAAE,SAAS;CAAQ,aAAa;CAAQ,IAAI;CAAM,GAAG;AAAQ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { EditorContext } from "../core/context.js";
2
+ import { InjectionKey } from "vue";
3
+ //#region src/vue/context-key.d.ts
4
+ export declare const EDITOR_CONTEXT: InjectionKey<EditorContext>;
5
+ //#endregion
6
+ //# sourceMappingURL=context-key.d.ts.map
@@ -0,0 +1,6 @@
1
+ //#region src/vue/context-key.ts
2
+ const EDITOR_CONTEXT = Symbol("tiptap-editor:context");
3
+ //#endregion
4
+ export { EDITOR_CONTEXT };
5
+
6
+ //# sourceMappingURL=context-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-key.js","names":[],"sources":["../../src/vue/context-key.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport type { EditorContext } from '../core/context'\n\n// The injection key alone, so modules that only read the context (`adapters/vue`) do not reach the Nuxt UI kit that `./context` installs.\nexport const EDITOR_CONTEXT: InjectionKey<EditorContext> = Symbol('tiptap-editor:context')\n"],"mappings":";AAIA,MAAa,iBAA8C,OAAO,uBAAuB"}
@@ -1,19 +1,20 @@
1
1
  import { EditorContext, EditorContextOptions } from "../core/context.js";
2
+ import { EDITOR_CONTEXT } from "./context-key.js";
2
3
  import { VueUiKit } from "./kit/types.js";
3
- import { InjectionKey, Plugin } from "vue";
4
+ import { Plugin } from "vue";
4
5
  //#region src/vue/context.d.ts
5
- export declare const EDITOR_CONTEXT: InjectionKey<EditorContext>;
6
6
  /** What `createEditor` takes: the framework-free context options plus the UI kit that renders the chrome. */
7
7
  export interface VueEditorOptions extends EditorContextOptions {
8
8
  /** The widgets the chrome components render. Default: `nuxtUiKit()` (`/vue/kit/nuxt-ui`), which needs `@nuxt/ui` set up in the host; pass your own `VueUiKit` to render the chrome with another library. */
9
9
  kit?: VueUiKit;
10
10
  }
11
11
  /**
12
- * The editor context of a Vue app: the settings shared by all editors of the app, the HTTP client and the UI kit
12
+ * The editor context of a Vue app: the settings shared by all editors of the app, the backend and the UI kit
13
13
  * (`useUiKit()`). Install with `app.use(createEditor())`. The settings are read from localStorage right away (client only) and every change is
14
- * written back. With `settings.remote`, `GET /api/editor/settings` (on the first `useEditorSettings()`) answers: `200`
15
- * replaces them with the user's account settings (`synced`), `204` (the host's adapter keeps no settings), `401` or a
16
- * network error keep the local ones; once synced every change is also sent to the server (`PUT`, debounced). Watcher
14
+ * written back. With a backend that offers `settings` (the default HTTP backend does), `backend.settings.load()` (on the first
15
+ * `useEditorSettings()`) answers: the user's account settings replace them (`synced`), `null` (the host keeps none), a
16
+ * refusal (`401`, `501`) or a network error keep the local ones; once synced every change is also sent to the backend
17
+ * (`save`, debounced). Watcher
17
18
  * and timer stop with the app. App-level notices (`options.notify`, default: queued until the first `EditorSurface`
18
19
  * mounts and hands over the kit's `notifier()`) show as the kit's toasts.
19
20
  */
@@ -21,4 +22,5 @@ export declare function createEditor({ kit, ...options }?: VueEditorOptions): Pl
21
22
  /** The app's editor context; throws a descriptive error when `createEditor()` was not installed. */
22
23
  export declare function useEditorContext(): EditorContext;
23
24
  //#endregion
25
+ export { EDITOR_CONTEXT };
24
26
  //# sourceMappingURL=context.d.ts.map
@@ -1,17 +1,18 @@
1
1
  import { createEditorContext } from "../core/context.js";
2
+ import { EDITOR_CONTEXT } from "./context-key.js";
2
3
  import { VUE_UI_KIT } from "./kit/use-ui-kit.js";
3
4
  import { createQueuedNotifier } from "./notify.js";
4
5
  import { createSettingsBridge } from "./settings.js";
5
6
  import { nuxtUiKit } from "./kit/nuxt-ui.js";
6
7
  import { inject } from "vue";
7
8
  //#region src/vue/context.ts
8
- const EDITOR_CONTEXT = Symbol("tiptap-editor:context");
9
9
  /**
10
- * The editor context of a Vue app: the settings shared by all editors of the app, the HTTP client and the UI kit
10
+ * The editor context of a Vue app: the settings shared by all editors of the app, the backend and the UI kit
11
11
  * (`useUiKit()`). Install with `app.use(createEditor())`. The settings are read from localStorage right away (client only) and every change is
12
- * written back. With `settings.remote`, `GET /api/editor/settings` (on the first `useEditorSettings()`) answers: `200`
13
- * replaces them with the user's account settings (`synced`), `204` (the host's adapter keeps no settings), `401` or a
14
- * network error keep the local ones; once synced every change is also sent to the server (`PUT`, debounced). Watcher
12
+ * written back. With a backend that offers `settings` (the default HTTP backend does), `backend.settings.load()` (on the first
13
+ * `useEditorSettings()`) answers: the user's account settings replace them (`synced`), `null` (the host keeps none), a
14
+ * refusal (`401`, `501`) or a network error keep the local ones; once synced every change is also sent to the backend
15
+ * (`save`, debounced). Watcher
15
16
  * and timer stop with the app. App-level notices (`options.notify`, default: queued until the first `EditorSurface`
16
17
  * mounts and hands over the kit's `notifier()`) show as the kit's toasts.
17
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","names":[],"sources":["../../src/vue/context.ts"],"sourcesContent":["import { type InjectionKey, inject, type Plugin } from 'vue'\nimport { createEditorContext, type EditorContext, type EditorContextOptions } from '../core/context'\nimport { createQueuedNotifier } from './notify'\nimport { createSettingsBridge } from './settings'\nimport { nuxtUiKit } from './kit/nuxt-ui'\nimport { VUE_UI_KIT } from './kit/use-ui-kit'\nimport type { VueUiKit } from './kit/types'\n\nexport const EDITOR_CONTEXT: InjectionKey<EditorContext> = Symbol('tiptap-editor:context')\n\n/** What `createEditor` takes: the framework-free context options plus the UI kit that renders the chrome. */\nexport interface VueEditorOptions extends EditorContextOptions {\n /** The widgets the chrome components render. Default: `nuxtUiKit()` (`/vue/kit/nuxt-ui`), which needs `@nuxt/ui` set up in the host; pass your own `VueUiKit` to render the chrome with another library. */\n kit?: VueUiKit\n}\n\n/**\n * The editor context of a Vue app: the settings shared by all editors of the app, the HTTP client and the UI kit\n * (`useUiKit()`). Install with `app.use(createEditor())`. The settings are read from localStorage right away (client only) and every change is\n * written back. With `settings.remote`, `GET /api/editor/settings` (on the first `useEditorSettings()`) answers: `200`\n * replaces them with the user's account settings (`synced`), `204` (the host's adapter keeps no settings), `401` or a\n * network error keep the local ones; once synced every change is also sent to the server (`PUT`, debounced). Watcher\n * and timer stop with the app. App-level notices (`options.notify`, default: queued until the first `EditorSurface`\n * mounts and hands over the kit's `notifier()`) show as the kit's toasts.\n */\nexport function createEditor({ kit = nuxtUiKit(), ...options }: VueEditorOptions = {}): Plugin {\n return {\n install(app) {\n const ctx = createEditorContext({ notify: createQueuedNotifier(), ...options })\n app.provide(VUE_UI_KIT, kit)\n app.provide(EDITOR_CONTEXT, ctx)\n const bridge = createSettingsBridge(ctx)\n app.onUnmount(() => {\n bridge.dispose()\n ctx.dispose()\n })\n },\n }\n}\n\n/** The app's editor context; throws a descriptive error when `createEditor()` was not installed. */\nexport function useEditorContext(): EditorContext {\n const context = inject(EDITOR_CONTEXT, null)\n if (!context) throw new Error('@ecsplico/editor: no editor context; install it with app.use(createEditor())')\n return context\n}\n"],"mappings":";;;;;;;AAQA,MAAa,iBAA8C,OAAO,uBAAuB;;;;;;;;;;AAiBzF,SAAgB,aAAa,EAAE,MAAM,UAAU,GAAG,GAAG,YAA8B,CAAC,GAAW;CAC7F,OAAO,EACL,QAAQ,KAAK;EACX,MAAM,MAAM,oBAAoB;GAAE,QAAQ,qBAAqB;GAAG,GAAG;EAAQ,CAAC;EAC9E,IAAI,QAAQ,YAAY,GAAG;EAC3B,IAAI,QAAQ,gBAAgB,GAAG;EAC/B,MAAM,SAAS,qBAAqB,GAAG;EACvC,IAAI,gBAAgB;GAClB,OAAO,QAAQ;GACf,IAAI,QAAQ;EACd,CAAC;CACH,EACF;AACF;;AAGA,SAAgB,mBAAkC;CAChD,MAAM,UAAU,OAAO,gBAAgB,IAAI;CAC3C,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,8EAA8E;CAC5G,OAAO;AACT"}
1
+ {"version":3,"file":"context.js","names":[],"sources":["../../src/vue/context.ts"],"sourcesContent":["import { inject, type Plugin } from 'vue'\nimport { createEditorContext, type EditorContext, type EditorContextOptions } from '../core/context'\nimport { EDITOR_CONTEXT } from './context-key'\nimport { createQueuedNotifier } from './notify'\nimport { createSettingsBridge } from './settings'\nimport { nuxtUiKit } from './kit/nuxt-ui'\nimport { VUE_UI_KIT } from './kit/use-ui-kit'\nimport type { VueUiKit } from './kit/types'\n\nexport { EDITOR_CONTEXT }\n\n/** What `createEditor` takes: the framework-free context options plus the UI kit that renders the chrome. */\nexport interface VueEditorOptions extends EditorContextOptions {\n /** The widgets the chrome components render. Default: `nuxtUiKit()` (`/vue/kit/nuxt-ui`), which needs `@nuxt/ui` set up in the host; pass your own `VueUiKit` to render the chrome with another library. */\n kit?: VueUiKit\n}\n\n/**\n * The editor context of a Vue app: the settings shared by all editors of the app, the backend and the UI kit\n * (`useUiKit()`). Install with `app.use(createEditor())`. The settings are read from localStorage right away (client only) and every change is\n * written back. With a backend that offers `settings` (the default HTTP backend does), `backend.settings.load()` (on the first\n * `useEditorSettings()`) answers: the user's account settings replace them (`synced`), `null` (the host keeps none), a\n * refusal (`401`, `501`) or a network error keep the local ones; once synced every change is also sent to the backend\n * (`save`, debounced). Watcher\n * and timer stop with the app. App-level notices (`options.notify`, default: queued until the first `EditorSurface`\n * mounts and hands over the kit's `notifier()`) show as the kit's toasts.\n */\nexport function createEditor({ kit = nuxtUiKit(), ...options }: VueEditorOptions = {}): Plugin {\n return {\n install(app) {\n const ctx = createEditorContext({ notify: createQueuedNotifier(), ...options })\n app.provide(VUE_UI_KIT, kit)\n app.provide(EDITOR_CONTEXT, ctx)\n const bridge = createSettingsBridge(ctx)\n app.onUnmount(() => {\n bridge.dispose()\n ctx.dispose()\n })\n },\n }\n}\n\n/** The app's editor context; throws a descriptive error when `createEditor()` was not installed. */\nexport function useEditorContext(): EditorContext {\n const context = inject(EDITOR_CONTEXT, null)\n if (!context) throw new Error('@ecsplico/editor: no editor context; install it with app.use(createEditor())')\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA2BA,SAAgB,aAAa,EAAE,MAAM,UAAU,GAAG,GAAG,YAA8B,CAAC,GAAW;CAC7F,OAAO,EACL,QAAQ,KAAK;EACX,MAAM,MAAM,oBAAoB;GAAE,QAAQ,qBAAqB;GAAG,GAAG;EAAQ,CAAC;EAC9E,IAAI,QAAQ,YAAY,GAAG;EAC3B,IAAI,QAAQ,gBAAgB,GAAG;EAC/B,MAAM,SAAS,qBAAqB,GAAG;EACvC,IAAI,gBAAgB;GAClB,OAAO,QAAQ;GACf,IAAI,QAAQ;EACd,CAAC;CACH,EACF;AACF;;AAGA,SAAgB,mBAAkC;CAChD,MAAM,UAAU,OAAO,gBAAgB,IAAI;CAC3C,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,8EAA8E;CAC5G,OAAO;AACT"}
@@ -1,12 +1,14 @@
1
1
  import { EditorFeature, EditorPreset } from "../core/feature.js";
2
- import _default from "./components/EditorSettingsModal.vue.js";
3
- import _default$1 from "./components/EditorSettingsPanel.vue.js";
4
- import _default$2 from "./components/EditorSurface.vue.js";
5
- import _default$3 from "./components/EditorToolbar.vue.js";
6
- import _default$4 from "./components/SettingsSection.vue.js";
7
- import _default$5 from "./components/SuggestionList.vue.js";
2
+ import _default from "./components/EditorCommandPalette.vue.js";
3
+ import _default$1 from "./components/EditorSettingsModal.vue.js";
4
+ import _default$2 from "./components/EditorSettingsPanel.vue.js";
5
+ import _default$3 from "./components/EditorSurface.vue.js";
6
+ import _default$4 from "./components/EditorToolbar.vue.js";
7
+ import _default$5 from "./components/SettingsSection.vue.js";
8
+ import _default$6 from "./components/SuggestionList.vue.js";
9
+ import { EDITOR_CONTEXT } from "./context-key.js";
8
10
  import { VueUiKit } from "./kit/types.js";
9
- import { EDITOR_CONTEXT, VueEditorOptions, createEditor, useEditorContext } from "./context.js";
11
+ import { VueEditorOptions, createEditor, useEditorContext } from "./context.js";
10
12
  import { VUE_UI_KIT, useUiKit } from "./kit/use-ui-kit.js";
11
13
  import { QueuedNotifier, attachNotifier, createQueuedNotifier } from "./notify.js";
12
14
  import { useEditorI18n } from "./use-editor-i18n.js";
@@ -22,5 +24,5 @@ export type VueFeature = EditorFeature<Component>;
22
24
  /** A preset of Vue features: what `EditorSurface` mounts. */
23
25
  export type VuePreset = EditorPreset<Component>;
24
26
  //#endregion
25
- export { EDITOR_CONTEXT, EDITOR_UI, _default as EditorSettingsModal, _default$1 as EditorSettingsPanel, _default$2 as EditorSurface, _default$3 as EditorToolbar, type QueuedNotifier, _default$4 as SettingsSection, _default$5 as SuggestionList, VUE_UI_KIT, type VueEditorOptions, type VueUiKit, attachNotifier, createEditor, createQueuedNotifier, storeFromRef, trackedStore, useEditorContext, useEditorI18n, useEditorSettings, useEditorUi, useNotifier, useStoreRef, useUiKit, useWritableStoreRef, vueSuggestionRenderer };
27
+ export { EDITOR_CONTEXT, EDITOR_UI, _default as EditorCommandPalette, _default$1 as EditorSettingsModal, _default$2 as EditorSettingsPanel, _default$3 as EditorSurface, _default$4 as EditorToolbar, type QueuedNotifier, _default$5 as SettingsSection, _default$6 as SuggestionList, VUE_UI_KIT, type VueEditorOptions, type VueUiKit, attachNotifier, createEditor, createQueuedNotifier, storeFromRef, trackedStore, useEditorContext, useEditorI18n, useEditorSettings, useEditorUi, useNotifier, useStoreRef, useUiKit, useWritableStoreRef, vueSuggestionRenderer };
26
28
  //# sourceMappingURL=index.d.ts.map
package/dist/vue/index.js CHANGED
@@ -1,16 +1,18 @@
1
+ import { EDITOR_CONTEXT } from "./context-key.js";
1
2
  import { VUE_UI_KIT, useUiKit } from "./kit/use-ui-kit.js";
2
3
  import { attachNotifier, createQueuedNotifier } from "./notify.js";
3
4
  import { useEditorSettings } from "./settings.js";
4
- import { EDITOR_CONTEXT, createEditor, useEditorContext } from "./context.js";
5
+ import { createEditor, useEditorContext } from "./context.js";
5
6
  import { useEditorI18n } from "./use-editor-i18n.js";
6
7
  import { EDITOR_UI, useEditorUi } from "./use-editor-ui.js";
7
- import _sfc_main$5 from "./components/SuggestionList.js";
8
+ import _sfc_main$6 from "./components/SuggestionList.js";
8
9
  import { vueSuggestionRenderer } from "./suggestion-renderer.js";
9
- import _sfc_main$1 from "./components/EditorSettingsPanel.js";
10
- import _sfc_main from "./components/EditorSettingsModal.js";
11
- import _sfc_main$2 from "./components/EditorSurface.js";
10
+ import _sfc_main$2 from "./components/EditorSettingsPanel.js";
11
+ import _sfc_main$1 from "./components/EditorSettingsModal.js";
12
+ import _sfc_main$3 from "./components/EditorSurface.js";
12
13
  import { useNotifier } from "./use-notifier.js";
13
14
  import { storeFromRef, trackedStore, useStoreRef, useWritableStoreRef } from "./store-ref.js";
14
- import _sfc_main$4 from "./components/SettingsSection.js";
15
- import _sfc_main$3 from "./components/EditorToolbar.js";
16
- export { EDITOR_CONTEXT, EDITOR_UI, _sfc_main as EditorSettingsModal, _sfc_main$1 as EditorSettingsPanel, _sfc_main$2 as EditorSurface, _sfc_main$3 as EditorToolbar, _sfc_main$4 as SettingsSection, _sfc_main$5 as SuggestionList, VUE_UI_KIT, attachNotifier, createEditor, createQueuedNotifier, storeFromRef, trackedStore, useEditorContext, useEditorI18n, useEditorSettings, useEditorUi, useNotifier, useStoreRef, useUiKit, useWritableStoreRef, vueSuggestionRenderer };
15
+ import _sfc_main from "./components/EditorCommandPalette.js";
16
+ import _sfc_main$5 from "./components/SettingsSection.js";
17
+ import _sfc_main$4 from "./components/EditorToolbar.js";
18
+ export { EDITOR_CONTEXT, EDITOR_UI, _sfc_main as EditorCommandPalette, _sfc_main$1 as EditorSettingsModal, _sfc_main$2 as EditorSettingsPanel, _sfc_main$3 as EditorSurface, _sfc_main$4 as EditorToolbar, _sfc_main$5 as SettingsSection, _sfc_main$6 as SuggestionList, VUE_UI_KIT, attachNotifier, createEditor, createQueuedNotifier, storeFromRef, trackedStore, useEditorContext, useEditorI18n, useEditorSettings, useEditorUi, useNotifier, useStoreRef, useUiKit, useWritableStoreRef, vueSuggestionRenderer };
@@ -1,3 +1,3 @@
1
- import { AlertProps, AvatarProps, BadgeProps, ButtonProps, ChipProps, DropdownItem, DropdownItems, DropdownMenuProps, FieldGroupProps, FormFieldProps, IconProps, InputExposed, InputMenuItem, InputMenuProps, InputProps, KitAnchor, KitColor, KitOverlayContent, KitOverlayUi, KitSize, KitVariant, ModalProps, PopoverProps, RadioGroupProps, SelectItem, SelectMenuProps, SelectProps, SeparatorProps, SwitchProps, TabItem, TableColumn, TableProps, TableSort, TabsProps, TextareaProps, TooltipProps, TreeNode, TreeProps, VueUiKit } from "./types.js";
1
+ import { AlertProps, AvatarProps, BadgeProps, ButtonProps, ChipProps, CommandPaletteGroup, CommandPaletteItem, CommandPaletteProps, DropdownItem, DropdownItems, DropdownMenuProps, FieldGroupProps, FormFieldProps, IconProps, InputExposed, InputMenuItem, InputMenuProps, InputProps, KitAnchor, KitColor, KitOverlayContent, KitOverlayUi, KitSize, KitVariant, ModalProps, PopoverProps, RadioGroupProps, SelectItem, SelectMenuProps, SelectProps, SeparatorProps, SwitchProps, TabItem, TableColumn, TableProps, TableSort, TabsProps, TextareaProps, TooltipProps, TreeNode, TreeProps, VueUiKit } from "./types.js";
2
2
  import { VUE_UI_KIT, useUiKit } from "./use-ui-kit.js";
3
- export { type AlertProps, type AvatarProps, type BadgeProps, type ButtonProps, type ChipProps, type DropdownItem, type DropdownItems, type DropdownMenuProps, type FieldGroupProps, type FormFieldProps, type IconProps, type InputExposed, type InputMenuItem, type InputMenuProps, type InputProps, type KitAnchor, type KitColor, type KitOverlayContent, type KitOverlayUi, type KitSize, type KitVariant, type ModalProps, type PopoverProps, type RadioGroupProps, type SelectItem, type SelectMenuProps, type SelectProps, type SeparatorProps, type SwitchProps, type TabItem, type TableColumn, type TableProps, type TableSort, type TabsProps, type TextareaProps, type TooltipProps, type TreeNode, type TreeProps, VUE_UI_KIT, type VueUiKit, useUiKit };
3
+ export { type AlertProps, type AvatarProps, type BadgeProps, type ButtonProps, type ChipProps, type CommandPaletteGroup, type CommandPaletteItem, type CommandPaletteProps, type DropdownItem, type DropdownItems, type DropdownMenuProps, type FieldGroupProps, type FormFieldProps, type IconProps, type InputExposed, type InputMenuItem, type InputMenuProps, type InputProps, type KitAnchor, type KitColor, type KitOverlayContent, type KitOverlayUi, type KitSize, type KitVariant, type ModalProps, type PopoverProps, type RadioGroupProps, type SelectItem, type SelectMenuProps, type SelectProps, type SeparatorProps, type SwitchProps, type TabItem, type TableColumn, type TableProps, type TableSort, type TabsProps, type TextareaProps, type TooltipProps, type TreeNode, type TreeProps, VUE_UI_KIT, type VueUiKit, useUiKit };
@@ -4,6 +4,7 @@ import Avatar from "@nuxt/ui/components/Avatar.vue";
4
4
  import Badge from "@nuxt/ui/components/Badge.vue";
5
5
  import Button from "@nuxt/ui/components/Button.vue";
6
6
  import Chip from "@nuxt/ui/components/Chip.vue";
7
+ import NuxtCommandPalette from "@nuxt/ui/components/CommandPalette.vue";
7
8
  import DropdownMenu from "@nuxt/ui/components/DropdownMenu.vue";
8
9
  import FieldGroup from "@nuxt/ui/components/FieldGroup.vue";
9
10
  import FormField from "@nuxt/ui/components/FormField.vue";
@@ -63,6 +64,27 @@ const Table = defineComponent({
63
64
  }, slots)
64
65
  });
65
66
  /**
67
+ * Nuxt UI's `UCommandPalette` matching by the kit contract (typed text = case-insensitive substring of a row's `label`,
68
+ * `description` or `id`) instead of its fuzzy default (threshold 0.1, 12 results). The default fuse keys (label,
69
+ * description, suffix) stay searched next to `id`; the same filter applies to a second level. Groups with `ignoreFilter`
70
+ * (the host matched them) are passed through to the widget, which lists them as given.
71
+ */
72
+ const CommandPalette = defineComponent({
73
+ name: "KitCommandPalette",
74
+ inheritAttrs: false,
75
+ setup: (_, { attrs, slots }) => () => h(NuxtCommandPalette, {
76
+ ...attrs,
77
+ fuse: {
78
+ fuseOptions: {
79
+ keys: ["id"],
80
+ threshold: 0,
81
+ ignoreLocation: true
82
+ },
83
+ resultLimit: Number.MAX_SAFE_INTEGER
84
+ }
85
+ }, slots)
86
+ });
87
+ /**
66
88
  * The Nuxt UI kit: the widgets are Nuxt UI's own components, the notifier its `useToast()`. The host needs `@nuxt/ui`
67
89
  * set up (`<UApp>` around the editor, the Vite/Nuxt plugin) and its stylesheet next to the editor's
68
90
  * (`@ecsplico/editor/vue/kit/nuxt-ui.css` maps the `--sk-*` tokens onto `--ui-*`).
@@ -74,6 +96,7 @@ function nuxtUiKit() {
74
96
  Badge,
75
97
  Button,
76
98
  Chip,
99
+ CommandPalette,
77
100
  DropdownMenu,
78
101
  FieldGroup,
79
102
  FormField,
@@ -1 +1 @@
1
- {"version":3,"file":"nuxt-ui.js","names":[],"sources":["../../../src/vue/kit/nuxt-ui.ts"],"sourcesContent":["import Alert from '@nuxt/ui/components/Alert.vue'\nimport Avatar from '@nuxt/ui/components/Avatar.vue'\nimport Badge from '@nuxt/ui/components/Badge.vue'\nimport Button from '@nuxt/ui/components/Button.vue'\nimport Chip from '@nuxt/ui/components/Chip.vue'\nimport DropdownMenu from '@nuxt/ui/components/DropdownMenu.vue'\nimport FieldGroup from '@nuxt/ui/components/FieldGroup.vue'\nimport FormField from '@nuxt/ui/components/FormField.vue'\nimport Icon from '@nuxt/ui/components/Icon.vue'\nimport Input from '@nuxt/ui/components/Input.vue'\nimport InputMenu from '@nuxt/ui/components/InputMenu.vue'\nimport Modal from '@nuxt/ui/components/Modal.vue'\nimport Popover from '@nuxt/ui/components/Popover.vue'\nimport RadioGroup from '@nuxt/ui/components/RadioGroup.vue'\nimport Select from '@nuxt/ui/components/Select.vue'\nimport SelectMenu from '@nuxt/ui/components/SelectMenu.vue'\nimport Separator from '@nuxt/ui/components/Separator.vue'\nimport Switch from '@nuxt/ui/components/Switch.vue'\nimport NuxtTable from '@nuxt/ui/components/Table.vue'\nimport Tabs from '@nuxt/ui/components/Tabs.vue'\nimport Textarea from '@nuxt/ui/components/Textarea.vue'\nimport Tooltip from '@nuxt/ui/components/Tooltip.vue'\nimport Tree from '@nuxt/ui/components/Tree.vue'\nimport { useToast } from '@nuxt/ui/composables'\nimport { type Component, defineComponent, h } from 'vue'\nimport type { Notice, Notifier } from '../../core/notify'\nimport type { VueUiKit } from './types'\n\n/** The part of Nuxt UI's `useToast()` that notices need. */\nexport interface NoticeToaster {\n add(toast: {\n id?: string\n title: string\n description?: string\n icon?: string\n duration?: number\n color: 'neutral' | 'success' | 'warning' | 'error'\n actions?: { label: string, color: 'neutral', variant: 'outline', onClick: () => void }[]\n }): unknown\n remove?(id: string): unknown\n}\n\n// i18n-ignore: toast colour names, not text\nconst COLORS = { info: 'neutral', success: 'success', warning: 'warning', error: 'error' } as const\n\n/** Shows notices as Nuxt UI toasts (`kind` is the toast `color`; `id` replaces a visible toast of the same id). */\nexport function nuxtUiNotifier(toast: NoticeToaster): Notifier {\n const notify: Notifier = ({ id, title, description, kind, icon, duration, action }: Notice) => {\n toast.add({\n ...(id !== undefined && { id }),\n title,\n ...(description !== undefined && { description }),\n ...(icon !== undefined && { icon }),\n ...(duration !== undefined && { duration }),\n ...(action && { actions: [{ label: action.label, color: 'neutral' as const, variant: 'outline' as const, onClick: action.onClick }] }),\n color: COLORS[kind ?? 'info'],\n })\n }\n notify.dismiss = (id) => { toast.remove?.(id) }\n return notify\n}\n\n/** Nuxt UI's `UTable` with TanStack's own sorting switched off: the contract is that the host orders `data` itself. */\nconst Table = defineComponent({\n name: 'KitTable',\n inheritAttrs: false,\n setup: (_, { attrs, slots }) => () => h(NuxtTable as unknown as Component, { ...attrs, sortingOptions: { manualSorting: true } }, slots),\n})\n\n/**\n * The Nuxt UI kit: the widgets are Nuxt UI's own components, the notifier its `useToast()`. The host needs `@nuxt/ui`\n * set up (`<UApp>` around the editor, the Vite/Nuxt plugin) and its stylesheet next to the editor's\n * (`@ecsplico/editor/vue/kit/nuxt-ui.css` maps the `--sk-*` tokens onto `--ui-*`).\n */\nexport function nuxtUiKit(): VueUiKit {\n return {\n Alert,\n Avatar,\n Badge,\n Button,\n Chip,\n DropdownMenu,\n FieldGroup,\n FormField,\n Icon,\n Input,\n InputMenu,\n Modal,\n Popover,\n RadioGroup,\n Select,\n SelectMenu,\n Separator,\n Switch,\n Table,\n Tabs,\n Textarea,\n Tooltip,\n Tree,\n notifier: () => nuxtUiNotifier(useToast()),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,SAAS;CAAE,MAAM;CAAW,SAAS;CAAW,SAAS;CAAW,OAAO;AAAQ;;AAGzF,SAAgB,eAAe,OAAgC;CAC7D,MAAM,UAAoB,EAAE,IAAI,OAAO,aAAa,MAAM,MAAM,UAAU,aAAqB;EAC7F,MAAM,IAAI;GACR,GAAI,OAAO,KAAA,KAAa,EAAE,GAAG;GAC7B;GACA,GAAI,gBAAgB,KAAA,KAAa,EAAE,YAAY;GAC/C,GAAI,SAAS,KAAA,KAAa,EAAE,KAAK;GACjC,GAAI,aAAa,KAAA,KAAa,EAAE,SAAS;GACzC,GAAI,UAAU,EAAE,SAAS,CAAC;IAAE,OAAO,OAAO;IAAO,OAAO;IAAoB,SAAS;IAAoB,SAAS,OAAO;GAAQ,CAAC,EAAE;GACpI,OAAO,OAAO,QAAQ;EACxB,CAAC;CACH;CACA,OAAO,WAAW,OAAO;EAAE,MAAM,SAAS,EAAE;CAAE;CAC9C,OAAO;AACT;;AAGA,MAAM,QAAQ,gBAAgB;CAC5B,MAAM;CACN,cAAc;CACd,QAAQ,GAAG,EAAE,OAAO,kBAAkB,EAAE,WAAmC;EAAE,GAAG;EAAO,gBAAgB,EAAE,eAAe,KAAK;CAAE,GAAG,KAAK;AACzI,CAAC;;;;;;AAOD,SAAgB,YAAsB;CACpC,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,gBAAgB,eAAe,SAAS,CAAC;CAC3C;AACF"}
1
+ {"version":3,"file":"nuxt-ui.js","names":[],"sources":["../../../src/vue/kit/nuxt-ui.ts"],"sourcesContent":["import Alert from '@nuxt/ui/components/Alert.vue'\nimport Avatar from '@nuxt/ui/components/Avatar.vue'\nimport Badge from '@nuxt/ui/components/Badge.vue'\nimport Button from '@nuxt/ui/components/Button.vue'\nimport Chip from '@nuxt/ui/components/Chip.vue'\nimport NuxtCommandPalette from '@nuxt/ui/components/CommandPalette.vue'\nimport DropdownMenu from '@nuxt/ui/components/DropdownMenu.vue'\nimport FieldGroup from '@nuxt/ui/components/FieldGroup.vue'\nimport FormField from '@nuxt/ui/components/FormField.vue'\nimport Icon from '@nuxt/ui/components/Icon.vue'\nimport Input from '@nuxt/ui/components/Input.vue'\nimport InputMenu from '@nuxt/ui/components/InputMenu.vue'\nimport Modal from '@nuxt/ui/components/Modal.vue'\nimport Popover from '@nuxt/ui/components/Popover.vue'\nimport RadioGroup from '@nuxt/ui/components/RadioGroup.vue'\nimport Select from '@nuxt/ui/components/Select.vue'\nimport SelectMenu from '@nuxt/ui/components/SelectMenu.vue'\nimport Separator from '@nuxt/ui/components/Separator.vue'\nimport Switch from '@nuxt/ui/components/Switch.vue'\nimport NuxtTable from '@nuxt/ui/components/Table.vue'\nimport Tabs from '@nuxt/ui/components/Tabs.vue'\nimport Textarea from '@nuxt/ui/components/Textarea.vue'\nimport Tooltip from '@nuxt/ui/components/Tooltip.vue'\nimport Tree from '@nuxt/ui/components/Tree.vue'\nimport { useToast } from '@nuxt/ui/composables'\nimport { type Component, defineComponent, h } from 'vue'\nimport type { Notice, Notifier } from '../../core/notify'\nimport type { VueUiKit } from './types'\n\n/** The part of Nuxt UI's `useToast()` that notices need. */\nexport interface NoticeToaster {\n add(toast: {\n id?: string\n title: string\n description?: string\n icon?: string\n duration?: number\n color: 'neutral' | 'success' | 'warning' | 'error'\n actions?: { label: string, color: 'neutral', variant: 'outline', onClick: () => void }[]\n }): unknown\n remove?(id: string): unknown\n}\n\n// i18n-ignore: toast colour names, not text\nconst COLORS = { info: 'neutral', success: 'success', warning: 'warning', error: 'error' } as const\n\n/** Shows notices as Nuxt UI toasts (`kind` is the toast `color`; `id` replaces a visible toast of the same id). */\nexport function nuxtUiNotifier(toast: NoticeToaster): Notifier {\n const notify: Notifier = ({ id, title, description, kind, icon, duration, action }: Notice) => {\n toast.add({\n ...(id !== undefined && { id }),\n title,\n ...(description !== undefined && { description }),\n ...(icon !== undefined && { icon }),\n ...(duration !== undefined && { duration }),\n ...(action && { actions: [{ label: action.label, color: 'neutral' as const, variant: 'outline' as const, onClick: action.onClick }] }),\n color: COLORS[kind ?? 'info'],\n })\n }\n notify.dismiss = (id) => { toast.remove?.(id) }\n return notify\n}\n\n/** Nuxt UI's `UTable` with TanStack's own sorting switched off: the contract is that the host orders `data` itself. */\nconst Table = defineComponent({\n name: 'KitTable',\n inheritAttrs: false,\n setup: (_, { attrs, slots }) => () => h(NuxtTable as unknown as Component, { ...attrs, sortingOptions: { manualSorting: true } }, slots),\n})\n\n/**\n * Nuxt UI's `UCommandPalette` matching by the kit contract (typed text = case-insensitive substring of a row's `label`,\n * `description` or `id`) instead of its fuzzy default (threshold 0.1, 12 results). The default fuse keys (label,\n * description, suffix) stay searched next to `id`; the same filter applies to a second level. Groups with `ignoreFilter`\n * (the host matched them) are passed through to the widget, which lists them as given.\n */\nconst CommandPalette = defineComponent({\n name: 'KitCommandPalette',\n inheritAttrs: false,\n setup: (_, { attrs, slots }) => () => h(NuxtCommandPalette as unknown as Component, {\n ...attrs,\n fuse: { fuseOptions: { keys: ['id'], threshold: 0, ignoreLocation: true }, resultLimit: Number.MAX_SAFE_INTEGER },\n }, slots),\n})\n\n/**\n * The Nuxt UI kit: the widgets are Nuxt UI's own components, the notifier its `useToast()`. The host needs `@nuxt/ui`\n * set up (`<UApp>` around the editor, the Vite/Nuxt plugin) and its stylesheet next to the editor's\n * (`@ecsplico/editor/vue/kit/nuxt-ui.css` maps the `--sk-*` tokens onto `--ui-*`).\n */\nexport function nuxtUiKit(): VueUiKit {\n return {\n Alert,\n Avatar,\n Badge,\n Button,\n Chip,\n CommandPalette,\n DropdownMenu,\n FieldGroup,\n FormField,\n Icon,\n Input,\n InputMenu,\n Modal,\n Popover,\n RadioGroup,\n Select,\n SelectMenu,\n Separator,\n Switch,\n Table,\n Tabs,\n Textarea,\n Tooltip,\n Tree,\n notifier: () => nuxtUiNotifier(useToast()),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAM,SAAS;CAAE,MAAM;CAAW,SAAS;CAAW,SAAS;CAAW,OAAO;AAAQ;;AAGzF,SAAgB,eAAe,OAAgC;CAC7D,MAAM,UAAoB,EAAE,IAAI,OAAO,aAAa,MAAM,MAAM,UAAU,aAAqB;EAC7F,MAAM,IAAI;GACR,GAAI,OAAO,KAAA,KAAa,EAAE,GAAG;GAC7B;GACA,GAAI,gBAAgB,KAAA,KAAa,EAAE,YAAY;GAC/C,GAAI,SAAS,KAAA,KAAa,EAAE,KAAK;GACjC,GAAI,aAAa,KAAA,KAAa,EAAE,SAAS;GACzC,GAAI,UAAU,EAAE,SAAS,CAAC;IAAE,OAAO,OAAO;IAAO,OAAO;IAAoB,SAAS;IAAoB,SAAS,OAAO;GAAQ,CAAC,EAAE;GACpI,OAAO,OAAO,QAAQ;EACxB,CAAC;CACH;CACA,OAAO,WAAW,OAAO;EAAE,MAAM,SAAS,EAAE;CAAE;CAC9C,OAAO;AACT;;AAGA,MAAM,QAAQ,gBAAgB;CAC5B,MAAM;CACN,cAAc;CACd,QAAQ,GAAG,EAAE,OAAO,kBAAkB,EAAE,WAAmC;EAAE,GAAG;EAAO,gBAAgB,EAAE,eAAe,KAAK;CAAE,GAAG,KAAK;AACzI,CAAC;;;;;;;AAQD,MAAM,iBAAiB,gBAAgB;CACrC,MAAM;CACN,cAAc;CACd,QAAQ,GAAG,EAAE,OAAO,kBAAkB,EAAE,oBAA4C;EAClF,GAAG;EACH,MAAM;GAAE,aAAa;IAAE,MAAM,CAAC,IAAI;IAAG,WAAW;IAAG,gBAAgB;GAAK;GAAG,aAAa,OAAO;EAAiB;CAClH,GAAG,KAAK;AACV,CAAC;;;;;;AAOD,SAAgB,YAAsB;CACpC,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,gBAAgB,eAAe,SAAS,CAAC;CAC3C;AACF"}
@@ -223,8 +223,46 @@ export interface InputMenuProps {
223
223
  disabled?: boolean;
224
224
  open?: boolean;
225
225
  }
226
+ /** One row of `CommandPalette`; `children` make it open a second level (the rows replace the list, the back button returns). */
227
+ export interface CommandPaletteItem {
228
+ /** Searched together with `label`. */
229
+ id?: string;
230
+ label: string;
231
+ /** Iconify name. */
232
+ icon?: string;
233
+ /** Shortcut keys shown at the row's end (`['meta', 'b']`). */
234
+ kbds?: string[];
235
+ description?: string;
236
+ disabled?: boolean;
237
+ /** Runs when the row is picked (never on a row with `children`). */
238
+ onSelect?: () => void;
239
+ children?: CommandPaletteItem[];
240
+ }
241
+ /** A headed set of `CommandPalette` rows. */
242
+ export interface CommandPaletteGroup {
243
+ id: string;
244
+ label: string;
245
+ /** The host already matched the rows against `searchTerm`: they are listed as given, in this order, without the widget's own matching. */
246
+ ignoreFilter?: boolean;
247
+ items: CommandPaletteItem[];
248
+ }
249
+ /**
250
+ * CommandPalette: a search box over grouped rows, filtered while typing (the typed text is a case-insensitive substring
251
+ * of a row's `label`, `description` or `id`; groups with `ignoreFilter` are listed as given), Enter/click picks the highlighted
252
+ * enabled row. `searchTerm` (`v-model:search-term`) is the typed text; it resets when a second level opens or closes. Slot: `empty` (no row matches).
253
+ * Renders inside a `Modal` content (no frame of its own).
254
+ */
255
+ export interface CommandPaletteProps {
256
+ groups?: CommandPaletteGroup[];
257
+ /** The typed text. */
258
+ searchTerm?: string;
259
+ placeholder?: string;
260
+ /** Shows the dialog's close button (emits `update:open(false)`). */
261
+ close?: boolean;
262
+ }
226
263
  /**
227
- * Modal slots: default (an optional trigger), `body`, `footer` (the title and description come from the props). Emits
264
+ * Modal slots: default (an optional trigger), `body`, `footer` (the title and description come from the props), and
265
+ * `content` (the whole panel, replacing header, body and footer; `CommandPalette` fills it). Emits
228
266
  * `update:open`; `close` and `after:leave` after the dialog closed.
229
267
  */
230
268
  export interface ModalProps {
@@ -346,6 +384,7 @@ export interface VueUiKit {
346
384
  Badge: Component;
347
385
  Button: Component;
348
386
  Chip: Component;
387
+ CommandPalette: Component;
349
388
  DropdownMenu: Component;
350
389
  FieldGroup: Component;
351
390
  FormField: Component;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecsplico/editor",
3
- "version": "2.1.2",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "description": "Vue and React editor library on TipTap v3 (Vue: Nuxt UI; React: shadcn/ui): framework-free features with Vue and React bindings, simple and advanced presets, tree-shakeable entries. Built ESM with type declarations.",
6
6
  "license": "MIT",
@@ -13,7 +13,6 @@
13
13
  "bugs": "https://github.com/skaile-ai/skaile-editor/issues",
14
14
  "files": [
15
15
  "dist",
16
- "docs",
17
16
  "README.md",
18
17
  "CHANGELOG.md"
19
18
  ],
@@ -95,15 +94,10 @@
95
94
  "skaile-source": "./src/react/styles/advanced.css",
96
95
  "default": "./dist/react/styles/advanced.css"
97
96
  },
98
- "./presets/advanced": {
99
- "skaile-source": "./src/presets/advanced.ts",
100
- "types": "./dist/presets/advanced.d.ts",
101
- "import": "./dist/presets/advanced.js"
102
- },
103
- "./presets/simple": {
104
- "skaile-source": "./src/presets/simple.ts",
105
- "types": "./dist/presets/simple.d.ts",
106
- "import": "./dist/presets/simple.js"
97
+ "./presets/compose": {
98
+ "skaile-source": "./src/presets/compose.ts",
99
+ "types": "./dist/presets/compose.d.ts",
100
+ "import": "./dist/presets/compose.js"
107
101
  },
108
102
  "./schema/simple": {
109
103
  "skaile-source": "./src/schema/simple.ts",
@@ -120,6 +114,11 @@
120
114
  "types": "./dist/settings/index.d.ts",
121
115
  "import": "./dist/settings/index.js"
122
116
  },
117
+ "./config": {
118
+ "skaile-source": "./src/config/index.ts",
119
+ "types": "./dist/config/index.d.ts",
120
+ "import": "./dist/config/index.js"
121
+ },
123
122
  "./outline": {
124
123
  "skaile-source": "./src/outline/index.ts",
125
124
  "types": "./dist/outline/index.d.ts",
@@ -315,6 +314,21 @@
315
314
  "types": "./dist/adapters/forge.d.ts",
316
315
  "import": "./dist/adapters/forge.js"
317
316
  },
317
+ "./adapters/http": {
318
+ "skaile-source": "./src/adapters/http.ts",
319
+ "types": "./dist/adapters/http.d.ts",
320
+ "import": "./dist/adapters/http.js"
321
+ },
322
+ "./adapters/memory": {
323
+ "skaile-source": "./src/adapters/memory.ts",
324
+ "types": "./dist/adapters/memory.d.ts",
325
+ "import": "./dist/adapters/memory.js"
326
+ },
327
+ "./adapters/react": {
328
+ "skaile-source": "./src/adapters/react.ts",
329
+ "types": "./dist/adapters/react.d.ts",
330
+ "import": "./dist/adapters/react.js"
331
+ },
318
332
  "./adapters/vue": {
319
333
  "skaile-source": "./src/adapters/vue.ts",
320
334
  "types": "./dist/adapters/vue.d.ts",
@@ -340,11 +354,6 @@
340
354
  "types": "./dist/adapters/comments/drizzle.d.ts",
341
355
  "import": "./dist/adapters/comments/drizzle.js"
342
356
  },
343
- "./comments/client": {
344
- "skaile-source": "./src/adapters/comments/client.ts",
345
- "types": "./dist/adapters/comments/client.d.ts",
346
- "import": "./dist/adapters/comments/client.js"
347
- },
348
357
  "./transcript": {
349
358
  "skaile-source": "./src/features/transcript/index.ts",
350
359
  "types": "./dist/features/transcript/index.d.ts",
@@ -564,6 +573,7 @@
564
573
  "dependencies": {
565
574
  "@ai-sdk/openai-compatible": "^3.0.62",
566
575
  "@hocuspocus/server": "^4.7.0",
576
+ "@noble/hashes": "^2.0.0",
567
577
  "@tiptap/extension-collaboration": "^3.31.3",
568
578
  "@tiptap/extension-collaboration-caret": "^3.31.3",
569
579
  "@tiptap/extension-drag-handle": "^3.31.3",
@@ -589,6 +599,7 @@
589
599
  "crossws": "^0.4.4",
590
600
  "lucide-react": "^1.53.0",
591
601
  "ofetch": "^1.5.1",
602
+ "pdfjs-dist": "^6.4.299",
592
603
  "radix-ui": "^1.7.0",
593
604
  "sonner": "^2.0.8",
594
605
  "tailwind-merge": "^3.7.0",
@@ -679,5 +690,8 @@
679
690
  "@lezer/highlight": {
680
691
  "optional": true
681
692
  }
693
+ },
694
+ "optionalDependencies": {
695
+ "@napi-rs/canvas": "^1.0.11"
682
696
  }
683
697
  }