@ecsplico/editor 3.5.1 → 4.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 (583) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/dist/adapters/direct-ai.d.ts +4 -4
  3. package/dist/adapters/direct-ai.js +2 -2
  4. package/dist/adapters/direct-ai.js.map +1 -1
  5. package/dist/adapters/document-state.d.ts +1 -1
  6. package/dist/adapters/document-state.js.map +1 -1
  7. package/dist/adapters/forge.d.ts +2 -2
  8. package/dist/adapters/forge.js.map +1 -1
  9. package/dist/adapters/nitro.d.ts +11 -3
  10. package/dist/adapters/nitro.js +3 -1
  11. package/dist/adapters/nitro.js.map +1 -1
  12. package/dist/adapters/shared.d.ts +6 -6
  13. package/dist/adapters/shared.js.map +1 -1
  14. package/dist/code/CodeSurface.vue.d.ts +3 -3
  15. package/dist/config/index.d.ts +14 -14
  16. package/dist/config/index.js +8 -8
  17. package/dist/config/index.js.map +1 -1
  18. package/dist/core/backend-types.d.ts +3 -3
  19. package/dist/core/backend-types.js.map +1 -1
  20. package/dist/core/backend.d.ts +4 -4
  21. package/dist/core/backend.js.map +1 -1
  22. package/dist/core/block-convert.d.ts +1 -1
  23. package/dist/core/block-convert.js +5 -5
  24. package/dist/core/block-convert.js.map +1 -1
  25. package/dist/core/block-transfer.d.ts +8 -4
  26. package/dist/core/block-transfer.js +23 -14
  27. package/dist/core/block-transfer.js.map +1 -1
  28. package/dist/core/capabilities.d.ts +113 -0
  29. package/dist/core/capabilities.js +155 -0
  30. package/dist/core/capabilities.js.map +1 -0
  31. package/dist/core/command-types.d.ts +1 -1
  32. package/dist/core/context.js.map +1 -1
  33. package/dist/core/convert.d.ts +5 -5
  34. package/dist/core/convert.js +5 -5
  35. package/dist/core/convert.js.map +1 -1
  36. package/dist/core/core-feature.js +1 -1
  37. package/dist/core/define-editor.d.ts +2 -2
  38. package/dist/core/define-editor.js +34 -6
  39. package/dist/core/define-editor.js.map +1 -1
  40. package/dist/core/derivation.d.ts +119 -0
  41. package/dist/core/derivation.js +187 -0
  42. package/dist/core/derivation.js.map +1 -0
  43. package/dist/core/derive.d.ts +61 -0
  44. package/dist/core/derive.js +69 -0
  45. package/dist/core/derive.js.map +1 -0
  46. package/dist/core/extension-points.d.ts +16 -0
  47. package/dist/core/feature-context.d.ts +5 -1
  48. package/dist/core/feature-context.js +10 -3
  49. package/dist/core/feature-context.js.map +1 -1
  50. package/dist/core/feature.d.ts +41 -19
  51. package/dist/core/feature.js.map +1 -1
  52. package/dist/core/fences.js +1 -1
  53. package/dist/core/fences.js.map +1 -1
  54. package/dist/core/index.d.ts +6 -2
  55. package/dist/core/index.js +5 -1
  56. package/dist/core/pipeline.d.ts +14 -5
  57. package/dist/core/pipeline.js +19 -7
  58. package/dist/core/pipeline.js.map +1 -1
  59. package/dist/core/properties.d.ts +22 -0
  60. package/dist/core/properties.js +17 -0
  61. package/dist/core/properties.js.map +1 -0
  62. package/dist/core/schema/block-ids.js +5 -5
  63. package/dist/core/schema/block-ids.js.map +1 -1
  64. package/dist/core/schema/index.d.ts +2 -1
  65. package/dist/core/schema/index.js +2 -1
  66. package/dist/core/schema/index.js.map +1 -1
  67. package/dist/core/schema/opaque-fence.d.ts +4 -4
  68. package/dist/core/schema/opaque-fence.js +7 -7
  69. package/dist/core/schema/opaque-fence.js.map +1 -1
  70. package/dist/core/schema/persisted-names.d.ts +58 -0
  71. package/dist/core/schema/persisted-names.js +96 -0
  72. package/dist/core/schema/persisted-names.js.map +1 -0
  73. package/dist/core/toolbar-items.js +1 -1
  74. package/dist/core/toolbar-items.js.map +1 -1
  75. package/dist/core/util.js +5 -1
  76. package/dist/core/util.js.map +1 -1
  77. package/dist/document/DocumentSurface.vue.d.ts +3 -3
  78. package/dist/features/ai/agent-ops.js +1 -1
  79. package/dist/features/ai/ai-review.js +1 -1
  80. package/dist/features/ai/assistant.d.ts +4 -4
  81. package/dist/features/ai/assistant.js +1 -1
  82. package/dist/features/ai/assistant.js.map +1 -1
  83. package/dist/features/ai/components/AiSelectionMenu.js +1 -1
  84. package/dist/features/ai/components/AiSelectionMenu.js.map +1 -1
  85. package/dist/features/ai/components/ModelQuickSwitch.js +7 -7
  86. package/dist/features/ai/components/ModelQuickSwitch.js.map +1 -1
  87. package/dist/features/ai/components/ModelQuickSwitch.vue.d.ts +4 -4
  88. package/dist/features/ai/components/SettingsAiTab.js +8 -8
  89. package/dist/features/ai/components/SettingsAiTab.js.map +1 -1
  90. package/dist/features/ai/components/SettingsModelProfiles.js +1 -1
  91. package/dist/features/ai/components/SettingsModelProfiles.js.map +1 -1
  92. package/dist/features/ai/document-chat-model.d.ts +2 -2
  93. package/dist/features/ai/document-chat-model.js +5 -5
  94. package/dist/features/ai/document-chat-model.js.map +1 -1
  95. package/dist/features/ai/document-chat.js +2 -2
  96. package/dist/features/ai/document-chat.js.map +1 -1
  97. package/dist/features/ai/feature.d.ts +2 -2
  98. package/dist/features/ai/feature.js +2 -2
  99. package/dist/features/ai/feature.js.map +1 -1
  100. package/dist/features/ai/ghost-autocomplete.d.ts +4 -4
  101. package/dist/features/ai/ghost-autocomplete.js +1 -1
  102. package/dist/features/ai/ghost-autocomplete.js.map +1 -1
  103. package/dist/features/ai/index.d.ts +3 -3
  104. package/dist/features/ai/index.js +2 -2
  105. package/dist/features/ai/model-profiles.d.ts +9 -9
  106. package/dist/features/ai/model-profiles.js +13 -13
  107. package/dist/features/ai/model-profiles.js.map +1 -1
  108. package/dist/features/ai/protocol/agent-ops.d.ts +2 -2
  109. package/dist/features/ai/protocol/agent-ops.js +1 -1
  110. package/dist/features/ai/protocol/agent-ops.js.map +1 -1
  111. package/dist/features/ai/protocol/block-lines.d.ts +7 -7
  112. package/dist/features/ai/protocol/block-lines.js +10 -10
  113. package/dist/features/ai/protocol/block-lines.js.map +1 -1
  114. package/dist/features/ai/protocol/chat.d.ts +5 -5
  115. package/dist/features/ai/protocol/chat.js +12 -12
  116. package/dist/features/ai/protocol/chat.js.map +1 -1
  117. package/dist/features/ai/protocol/generate.d.ts +1 -1
  118. package/dist/features/ai/protocol/generate.js +1 -1
  119. package/dist/features/ai/protocol/generate.js.map +1 -1
  120. package/dist/features/ai/protocol/index.d.ts +3 -3
  121. package/dist/features/ai/protocol/index.js +2 -2
  122. package/dist/features/ai/protocol/models.d.ts +3 -3
  123. package/dist/features/ai/protocol/models.js +3 -3
  124. package/dist/features/ai/protocol/models.js.map +1 -1
  125. package/dist/features/ai/protocol/schemas.d.ts +1 -1
  126. package/dist/features/ai/protocol/schemas.js +1 -1
  127. package/dist/features/ai/protocol/schemas.js.map +1 -1
  128. package/dist/features/ai/protocol/tasks.d.ts +5 -5
  129. package/dist/features/ai/protocol/tasks.js +12 -12
  130. package/dist/features/ai/protocol/tasks.js.map +1 -1
  131. package/dist/features/ai/react/AiSelectionMenu.js.map +1 -1
  132. package/dist/features/ai/react/ModelQuickSwitch.d.ts +4 -4
  133. package/dist/features/ai/react/ModelQuickSwitch.js +6 -6
  134. package/dist/features/ai/react/ModelQuickSwitch.js.map +1 -1
  135. package/dist/features/ai/react/SettingsAiTab.d.ts +1 -1
  136. package/dist/features/ai/react/SettingsAiTab.js +8 -8
  137. package/dist/features/ai/react/SettingsAiTab.js.map +1 -1
  138. package/dist/features/ai/react/SettingsModelProfiles.d.ts +1 -1
  139. package/dist/features/ai/react/SettingsModelProfiles.js +1 -1
  140. package/dist/features/ai/react/SettingsModelProfiles.js.map +1 -1
  141. package/dist/features/ai/react/use-ai-assistant.d.ts +1 -1
  142. package/dist/features/ai/react/use-ai-assistant.js +1 -1
  143. package/dist/features/ai/react/use-ai-assistant.js.map +1 -1
  144. package/dist/features/ai/react/use-model-profiles.d.ts +5 -5
  145. package/dist/features/ai/react/use-model-profiles.js +2 -2
  146. package/dist/features/ai/react/use-model-profiles.js.map +1 -1
  147. package/dist/features/ai/use-ai-assistant.d.ts +1 -1
  148. package/dist/features/ai/use-ai-assistant.js +1 -1
  149. package/dist/features/ai/use-ai-assistant.js.map +1 -1
  150. package/dist/features/ai/use-model-profiles.d.ts +4 -4
  151. package/dist/features/ai/use-model-profiles.js +2 -2
  152. package/dist/features/ai/use-model-profiles.js.map +1 -1
  153. package/dist/features/block-ui/block-actions.d.ts +8 -4
  154. package/dist/features/block-ui/block-actions.js +38 -22
  155. package/dist/features/block-ui/block-actions.js.map +1 -1
  156. package/dist/features/block-ui/block-target.d.ts +29 -0
  157. package/dist/features/block-ui/block-target.js +63 -0
  158. package/dist/features/block-ui/block-target.js.map +1 -0
  159. package/dist/features/block-ui/components/BlockHandles.js +3 -3
  160. package/dist/features/block-ui/components/BlockHandles.js.map +1 -1
  161. package/dist/features/block-ui/components/BlockUi.js +11 -23
  162. package/dist/features/block-ui/components/BlockUi.js.map +1 -1
  163. package/dist/features/block-ui/feature.d.ts +3 -2
  164. package/dist/features/block-ui/feature.js +3 -2
  165. package/dist/features/block-ui/feature.js.map +1 -1
  166. package/dist/features/block-ui/handle-geometry.js +12 -23
  167. package/dist/features/block-ui/handle-geometry.js.map +1 -1
  168. package/dist/features/block-ui/index.d.ts +2 -1
  169. package/dist/features/block-ui/index.js +2 -1
  170. package/dist/features/block-ui/react/BlockHandles.d.ts +1 -1
  171. package/dist/features/block-ui/react/BlockHandles.js +4 -4
  172. package/dist/features/block-ui/react/BlockHandles.js.map +1 -1
  173. package/dist/features/block-ui/react/BlockUi.js +13 -25
  174. package/dist/features/block-ui/react/BlockUi.js.map +1 -1
  175. package/dist/features/comments/model.js +1 -1
  176. package/dist/features/composites/accepted-children.d.ts +5 -4
  177. package/dist/features/composites/accepted-children.js +26 -26
  178. package/dist/features/composites/accepted-children.js.map +1 -1
  179. package/dist/features/composites/ai-brief.d.ts +4 -4
  180. package/dist/features/composites/ai-brief.js +14 -12
  181. package/dist/features/composites/ai-brief.js.map +1 -1
  182. package/dist/features/composites/anchors.d.ts +1 -1
  183. package/dist/features/composites/anchors.js.map +1 -1
  184. package/dist/features/composites/baskets.d.ts +1 -1
  185. package/dist/features/composites/baskets.js.map +1 -1
  186. package/dist/features/composites/bibliography-command.d.ts +1 -1
  187. package/dist/features/composites/bibliography-form.js +1 -1
  188. package/dist/features/composites/bibliography-form.js.map +1 -1
  189. package/dist/features/composites/bibliography.js.map +1 -1
  190. package/dist/features/composites/block-types-json.d.ts +38 -0
  191. package/dist/features/composites/block-types-json.js +122 -0
  192. package/dist/features/composites/block-types-json.js.map +1 -0
  193. package/dist/features/composites/block-types.d.ts +119 -0
  194. package/dist/features/composites/block-types.js +343 -0
  195. package/dist/features/composites/block-types.js.map +1 -0
  196. package/dist/features/composites/capabilities.js +109 -0
  197. package/dist/features/composites/capabilities.js.map +1 -0
  198. package/dist/features/composites/components/BibliographyEditor.js +5 -5
  199. package/dist/features/composites/components/BibliographyEditor.js.map +1 -1
  200. package/dist/features/composites/components/CompositeBasketMenu.js +2 -2
  201. package/dist/features/composites/components/CompositeBasketMenu.js.map +1 -1
  202. package/dist/features/composites/components/CompositeChrome.js +18 -8
  203. package/dist/features/composites/components/CompositeChrome.js.map +1 -1
  204. package/dist/features/composites/components/CompositeChrome.vue.d.ts +1 -1
  205. package/dist/features/composites/components/CompositeDetails.js +11 -10
  206. package/dist/features/composites/components/CompositeDetails.js.map +1 -1
  207. package/dist/features/composites/components/CompositeDetails.vue.d.ts +1 -1
  208. package/dist/features/composites/components/CompositeFieldEditor.js +7 -7
  209. package/dist/features/composites/components/CompositeFieldEditor.js.map +1 -1
  210. package/dist/features/composites/components/CompositeFieldEditor.vue.d.ts +5 -5
  211. package/dist/features/composites/components/CompositeInspector.js +136 -113
  212. package/dist/features/composites/components/CompositeInspector.js.map +1 -1
  213. package/dist/features/composites/components/CompositeInspector.vue.d.ts +3 -3
  214. package/dist/features/composites/components/CompositeStatusMenu.js +2 -2
  215. package/dist/features/composites/components/CompositeStatusMenu.js.map +1 -1
  216. package/dist/features/composites/components/CompositeSummaryEditor.js +1 -1
  217. package/dist/features/composites/components/CompositeSummaryEditor.js.map +1 -1
  218. package/dist/features/composites/components/CompositeSummaryEditor.vue.d.ts +1 -1
  219. package/dist/features/composites/components/CompositeTable.js +2 -2
  220. package/dist/features/composites/components/CompositeTable.js.map +1 -1
  221. package/dist/features/composites/components/CompositeTagsEditor.js +1 -1
  222. package/dist/features/composites/components/CompositeTagsEditor.js.map +1 -1
  223. package/dist/features/composites/components/CompositeTagsEditor.vue.d.ts +1 -1
  224. package/dist/features/composites/components/CompositeView.js +19 -17
  225. package/dist/features/composites/components/CompositeView.js.map +1 -1
  226. package/dist/features/composites/components/DerivationBadge.js +15 -6
  227. package/dist/features/composites/components/DerivationBadge.js.map +1 -1
  228. package/dist/features/composites/components/FocusChip.js +1 -1
  229. package/dist/features/composites/components/FocusChip.js.map +1 -1
  230. package/dist/features/composites/components/FocusChip.vue.d.ts +1 -1
  231. package/dist/features/composites/components/ReferenceFieldSelect.js +3 -3
  232. package/dist/features/composites/components/ReferenceFieldSelect.js.map +1 -1
  233. package/dist/features/composites/components/ReferenceView.js +1 -1
  234. package/dist/features/composites/components/ReferenceView.js.map +1 -1
  235. package/dist/features/composites/components/SettingsEditingTab.js +18 -18
  236. package/dist/features/composites/components/SettingsEditingTab.js.map +1 -1
  237. package/dist/features/composites/components/SettingsEditingTab.vue.d.ts +3 -3
  238. package/dist/features/composites/convert.d.ts +4 -4
  239. package/dist/features/composites/convert.js +27 -28
  240. package/dist/features/composites/convert.js.map +1 -1
  241. package/dist/features/composites/derived-chrome.js +34 -28
  242. package/dist/features/composites/derived-chrome.js.map +1 -1
  243. package/dist/features/composites/editing-settings-keys.js +6 -6
  244. package/dist/features/composites/editing-settings-keys.js.map +1 -1
  245. package/dist/features/composites/feature.d.ts +10 -10
  246. package/dist/features/composites/feature.js +58 -46
  247. package/dist/features/composites/feature.js.map +1 -1
  248. package/dist/features/composites/fences.d.ts +3 -3
  249. package/dist/features/composites/fences.js +18 -13
  250. package/dist/features/composites/fences.js.map +1 -1
  251. package/dist/features/composites/focus.d.ts +10 -10
  252. package/dist/features/composites/focus.js +11 -11
  253. package/dist/features/composites/focus.js.map +1 -1
  254. package/dist/features/composites/heading-composites.d.ts +5 -5
  255. package/dist/features/composites/heading-composites.js +13 -16
  256. package/dist/features/composites/heading-composites.js.map +1 -1
  257. package/dist/features/composites/index.d.ts +20 -18
  258. package/dist/features/composites/index.js +9 -7
  259. package/dist/features/composites/inspector-model.d.ts +45 -22
  260. package/dist/features/composites/inspector-model.js +53 -14
  261. package/dist/features/composites/inspector-model.js.map +1 -1
  262. package/dist/features/composites/legacy.d.ts +5 -4
  263. package/dist/features/composites/legacy.js +16 -23
  264. package/dist/features/composites/legacy.js.map +1 -1
  265. package/dist/features/composites/markdown-export.js +3 -3
  266. package/dist/features/composites/markdown-export.js.map +1 -1
  267. package/dist/features/composites/merge.d.ts +8 -7
  268. package/dist/features/composites/merge.js +39 -12
  269. package/dist/features/composites/merge.js.map +1 -1
  270. package/dist/features/composites/meta-display.js +5 -5
  271. package/dist/features/composites/meta-display.js.map +1 -1
  272. package/dist/features/composites/meta-keys.d.ts +5 -5
  273. package/dist/features/composites/meta-keys.js +8 -8
  274. package/dist/features/composites/meta-keys.js.map +1 -1
  275. package/dist/features/composites/node-views.d.ts +3 -3
  276. package/dist/features/composites/node-views.js +2 -2
  277. package/dist/features/composites/node-views.js.map +1 -1
  278. package/dist/features/composites/nodes.d.ts +13 -13
  279. package/dist/features/composites/nodes.js +100 -77
  280. package/dist/features/composites/nodes.js.map +1 -1
  281. package/dist/features/composites/outline.d.ts +15 -12
  282. package/dist/features/composites/outline.js +24 -21
  283. package/dist/features/composites/outline.js.map +1 -1
  284. package/dist/features/composites/properties.d.ts +51 -0
  285. package/dist/features/composites/properties.js +89 -0
  286. package/dist/features/composites/properties.js.map +1 -0
  287. package/dist/features/composites/react/BibliographyEditor.js +5 -5
  288. package/dist/features/composites/react/BibliographyEditor.js.map +1 -1
  289. package/dist/features/composites/react/CompositeBasketMenu.js +2 -2
  290. package/dist/features/composites/react/CompositeBasketMenu.js.map +1 -1
  291. package/dist/features/composites/react/CompositeChrome.d.ts +1 -1
  292. package/dist/features/composites/react/CompositeChrome.js +15 -6
  293. package/dist/features/composites/react/CompositeChrome.js.map +1 -1
  294. package/dist/features/composites/react/CompositeDetails.d.ts +1 -1
  295. package/dist/features/composites/react/CompositeDetails.js +11 -10
  296. package/dist/features/composites/react/CompositeDetails.js.map +1 -1
  297. package/dist/features/composites/react/CompositeFieldEditor.d.ts +5 -5
  298. package/dist/features/composites/react/CompositeFieldEditor.js +6 -6
  299. package/dist/features/composites/react/CompositeFieldEditor.js.map +1 -1
  300. package/dist/features/composites/react/CompositeInspector.d.ts +3 -3
  301. package/dist/features/composites/react/CompositeInspector.js +142 -128
  302. package/dist/features/composites/react/CompositeInspector.js.map +1 -1
  303. package/dist/features/composites/react/CompositeStatusMenu.js +2 -2
  304. package/dist/features/composites/react/CompositeStatusMenu.js.map +1 -1
  305. package/dist/features/composites/react/CompositeSummaryEditor.d.ts +1 -1
  306. package/dist/features/composites/react/CompositeSummaryEditor.js +1 -1
  307. package/dist/features/composites/react/CompositeSummaryEditor.js.map +1 -1
  308. package/dist/features/composites/react/CompositeTable.d.ts +1 -1
  309. package/dist/features/composites/react/CompositeTable.js +3 -3
  310. package/dist/features/composites/react/CompositeTable.js.map +1 -1
  311. package/dist/features/composites/react/CompositeTagsEditor.d.ts +1 -1
  312. package/dist/features/composites/react/CompositeTagsEditor.js +1 -1
  313. package/dist/features/composites/react/CompositeTagsEditor.js.map +1 -1
  314. package/dist/features/composites/react/CompositeView.js +17 -15
  315. package/dist/features/composites/react/CompositeView.js.map +1 -1
  316. package/dist/features/composites/react/DerivationBadge.js +13 -4
  317. package/dist/features/composites/react/DerivationBadge.js.map +1 -1
  318. package/dist/features/composites/react/FocusChip.d.ts +1 -1
  319. package/dist/features/composites/react/FocusChip.js +1 -1
  320. package/dist/features/composites/react/FocusChip.js.map +1 -1
  321. package/dist/features/composites/react/ReferenceFieldSelect.js +3 -3
  322. package/dist/features/composites/react/ReferenceFieldSelect.js.map +1 -1
  323. package/dist/features/composites/react/ReferenceView.d.ts +1 -1
  324. package/dist/features/composites/react/ReferenceView.js +1 -1
  325. package/dist/features/composites/react/ReferenceView.js.map +1 -1
  326. package/dist/features/composites/react/SettingsEditingTab.d.ts +4 -4
  327. package/dist/features/composites/react/SettingsEditingTab.js +20 -20
  328. package/dist/features/composites/react/SettingsEditingTab.js.map +1 -1
  329. package/dist/features/composites/react.js +1 -1
  330. package/dist/features/composites/react.js.map +1 -1
  331. package/dist/features/composites/reference-ai.js +1 -1
  332. package/dist/features/composites/reference-ai.js.map +1 -1
  333. package/dist/features/composites/reference-label.d.ts +3 -3
  334. package/dist/features/composites/reference-label.js +6 -6
  335. package/dist/features/composites/reference-label.js.map +1 -1
  336. package/dist/features/composites/reference-suggestion.d.ts +1 -1
  337. package/dist/features/composites/reference-suggestion.js +3 -3
  338. package/dist/features/composites/reference-suggestion.js.map +1 -1
  339. package/dist/features/composites/reference-text.d.ts +2 -2
  340. package/dist/features/composites/reference-text.js +4 -4
  341. package/dist/features/composites/reference-text.js.map +1 -1
  342. package/dist/features/composites/reference.d.ts +3 -3
  343. package/dist/features/composites/reference.js +1 -1
  344. package/dist/features/composites/reference.js.map +1 -1
  345. package/dist/features/composites/reveal-source.d.ts +3 -3
  346. package/dist/features/composites/reveal-source.js +6 -6
  347. package/dist/features/composites/reveal-source.js.map +1 -1
  348. package/dist/features/composites/rows-model.d.ts +2 -2
  349. package/dist/features/composites/rows-model.js +4 -3
  350. package/dist/features/composites/rows-model.js.map +1 -1
  351. package/dist/features/composites/rows.d.ts +16 -28
  352. package/dist/features/composites/rows.js +20 -54
  353. package/dist/features/composites/rows.js.map +1 -1
  354. package/dist/features/composites/schema.d.ts +12 -11
  355. package/dist/features/composites/schema.js +10 -9
  356. package/dist/features/composites/schema.js.map +1 -1
  357. package/dist/features/composites/source.d.ts +20 -0
  358. package/dist/features/composites/source.js +40 -0
  359. package/dist/features/composites/source.js.map +1 -0
  360. package/dist/features/composites/split.d.ts +11 -11
  361. package/dist/features/composites/split.js +20 -20
  362. package/dist/features/composites/split.js.map +1 -1
  363. package/dist/features/composites/structure-mode.js +3 -3
  364. package/dist/features/composites/structure-mode.js.map +1 -1
  365. package/dist/features/composites/table-model.js +2 -2
  366. package/dist/features/composites/table-model.js.map +1 -1
  367. package/dist/features/composites/use-composite-inspector.js +3 -1
  368. package/dist/features/composites/use-composite-inspector.js.map +1 -1
  369. package/dist/features/composites/use-composite-rows.d.ts +2 -2
  370. package/dist/features/composites/use-composite-rows.js.map +1 -1
  371. package/dist/features/composites/vue.js +1 -1
  372. package/dist/features/composites/vue.js.map +1 -1
  373. package/dist/features/image-studio/components/ImageStudioDialog.js +1 -1
  374. package/dist/features/image-studio/components/ImageStudioDialog.js.map +1 -1
  375. package/dist/features/image-studio/components/ImageStudioDialog.vue.d.ts +1 -1
  376. package/dist/features/image-studio/components/ImageStudioView.js.map +1 -1
  377. package/dist/features/image-studio/feature.d.ts +1 -1
  378. package/dist/features/image-studio/feature.js +1 -1
  379. package/dist/features/image-studio/feature.js.map +1 -1
  380. package/dist/features/image-studio/node-core.d.ts +3 -3
  381. package/dist/features/image-studio/node-core.js +1 -1
  382. package/dist/features/image-studio/node-core.js.map +1 -1
  383. package/dist/features/image-studio/node-store.d.ts +1 -1
  384. package/dist/features/image-studio/node-store.js +1 -1
  385. package/dist/features/image-studio/node-store.js.map +1 -1
  386. package/dist/features/image-studio/react/ImageStudioDialog.d.ts +1 -1
  387. package/dist/features/image-studio/react/ImageStudioDialog.js +1 -1
  388. package/dist/features/image-studio/react/ImageStudioDialog.js.map +1 -1
  389. package/dist/features/image-studio/react/ImageStudioView.js +1 -1
  390. package/dist/features/image-studio/react/ImageStudioView.js.map +1 -1
  391. package/dist/features/image-studio/react/store.d.ts +3 -3
  392. package/dist/features/image-studio/react/store.js.map +1 -1
  393. package/dist/features/image-studio/react.d.ts +1 -1
  394. package/dist/features/image-studio/react.js +1 -1
  395. package/dist/features/image-studio/react.js.map +1 -1
  396. package/dist/features/image-studio/schema.d.ts +1 -1
  397. package/dist/features/image-studio/schema.js +1 -1
  398. package/dist/features/image-studio/schema.js.map +1 -1
  399. package/dist/features/image-studio/state.d.ts +3 -3
  400. package/dist/features/image-studio/state.js +2 -2
  401. package/dist/features/image-studio/state.js.map +1 -1
  402. package/dist/features/image-studio/store.d.ts +3 -3
  403. package/dist/features/image-studio/vue.d.ts +1 -1
  404. package/dist/features/image-studio/vue.js +1 -1
  405. package/dist/features/image-studio/vue.js.map +1 -1
  406. package/dist/features/media/index.js +1 -1
  407. package/dist/features/media/react/AudioRecorderModal.js +1 -1
  408. package/dist/features/media/react.js +1 -1
  409. package/dist/features/mentions/tag.js +2 -1
  410. package/dist/features/mentions/tag.js.map +1 -1
  411. package/dist/features/themes/components/SettingsAppearanceTab.js +1 -1
  412. package/dist/features/themes/components/SettingsAppearanceTab.js.map +1 -1
  413. package/dist/features/themes/feature.d.ts +1 -1
  414. package/dist/features/themes/feature.js.map +1 -1
  415. package/dist/features/themes/react/SettingsAppearanceTab.d.ts +1 -1
  416. package/dist/features/themes/react/SettingsAppearanceTab.js +1 -1
  417. package/dist/features/themes/react/SettingsAppearanceTab.js.map +1 -1
  418. package/dist/features/themes/theme-runtime.js +1 -1
  419. package/dist/features/themes/theme-runtime.js.map +1 -1
  420. package/dist/features/transcript/TranscriptSegmentView.js +1 -1
  421. package/dist/features/transcript/TranscriptSegmentView.js.map +1 -1
  422. package/dist/features/transcript/react/TranscriptSegmentView.js +1 -1
  423. package/dist/features/transcript/react/TranscriptSegmentView.js.map +1 -1
  424. package/dist/features/transcript/segment-node.js.map +1 -1
  425. package/dist/features/transfer/feature.js +1 -1
  426. package/dist/features/transfer/feature.js.map +1 -1
  427. package/dist/features/transfer/transforms.d.ts +4 -4
  428. package/dist/features/transfer/transforms.js +12 -12
  429. package/dist/features/transfer/transforms.js.map +1 -1
  430. package/dist/i18n/de/ai.js +4 -4
  431. package/dist/i18n/de/ai.js.map +1 -1
  432. package/dist/i18n/de/authors.js +1 -1
  433. package/dist/i18n/de/authors.js.map +1 -1
  434. package/dist/i18n/de/comments.js +1 -1
  435. package/dist/i18n/de/comments.js.map +1 -1
  436. package/dist/i18n/de/composites.js +62 -59
  437. package/dist/i18n/de/composites.js.map +1 -1
  438. package/dist/i18n/de/image-studio.js +2 -2
  439. package/dist/i18n/de/image-studio.js.map +1 -1
  440. package/dist/i18n/de/integrations.js +20 -20
  441. package/dist/i18n/de/integrations.js.map +1 -1
  442. package/dist/i18n/de/markdown.js +1 -1
  443. package/dist/i18n/de/markdown.js.map +1 -1
  444. package/dist/i18n/de/palette.js +1 -1
  445. package/dist/i18n/de/palette.js.map +1 -1
  446. package/dist/i18n/de/themes.js +3 -3
  447. package/dist/i18n/de/themes.js.map +1 -1
  448. package/dist/i18n/de/transfer.js +2 -2
  449. package/dist/i18n/de/transfer.js.map +1 -1
  450. package/dist/i18n/de/tree.js +6 -6
  451. package/dist/i18n/de/tree.js.map +1 -1
  452. package/dist/i18n/de.d.ts +101 -98
  453. package/dist/i18n/en/ai.js +2 -2
  454. package/dist/i18n/en/ai.js.map +1 -1
  455. package/dist/i18n/en/composites.js +64 -61
  456. package/dist/i18n/en/composites.js.map +1 -1
  457. package/dist/i18n/en/integrations.js +9 -9
  458. package/dist/i18n/en/integrations.js.map +1 -1
  459. package/dist/i18n/en/markdown.js +1 -1
  460. package/dist/i18n/en/markdown.js.map +1 -1
  461. package/dist/i18n/en/palette.js +1 -1
  462. package/dist/i18n/en/palette.js.map +1 -1
  463. package/dist/i18n/en/themes.js +4 -4
  464. package/dist/i18n/en/themes.js.map +1 -1
  465. package/dist/i18n/en/tree.js +5 -5
  466. package/dist/i18n/en/tree.js.map +1 -1
  467. package/dist/index.d.ts +4 -1
  468. package/dist/integrations/composite-ai/bibliography-fetch.d.ts +6 -6
  469. package/dist/integrations/composite-ai/bibliography-fetch.js +19 -19
  470. package/dist/integrations/composite-ai/bibliography-fetch.js.map +1 -1
  471. package/dist/integrations/composite-ai/composite-fill.d.ts +4 -4
  472. package/dist/integrations/composite-ai/composite-fill.js +5 -5
  473. package/dist/integrations/composite-ai/composite-fill.js.map +1 -1
  474. package/dist/integrations/composite-ai/composite-summary.d.ts +2 -2
  475. package/dist/integrations/composite-ai/composite-summary.js +5 -5
  476. package/dist/integrations/composite-ai/composite-summary.js.map +1 -1
  477. package/dist/integrations/composite-ai/derive.d.ts +17 -17
  478. package/dist/integrations/composite-ai/derive.js +27 -26
  479. package/dist/integrations/composite-ai/derive.js.map +1 -1
  480. package/dist/integrations/composite-ai/index.d.ts +14 -15
  481. package/dist/integrations/composite-ai/index.js +98 -77
  482. package/dist/integrations/composite-ai/index.js.map +1 -1
  483. package/dist/integrations/composite-ai/outline-sanitize.d.ts +1 -1
  484. package/dist/integrations/composite-ai/outline-sanitize.js +1 -1
  485. package/dist/integrations/composite-ai/outline-sanitize.js.map +1 -1
  486. package/dist/integrations/composite-ai/rendition.d.ts +9 -9
  487. package/dist/integrations/composite-ai/rendition.js +27 -27
  488. package/dist/integrations/composite-ai/rendition.js.map +1 -1
  489. package/dist/integrations/composite-ai/split.d.ts +8 -8
  490. package/dist/integrations/composite-ai/split.js +12 -12
  491. package/dist/integrations/composite-ai/split.js.map +1 -1
  492. package/dist/integrations/composite-ai/transfer-transforms.d.ts +2 -2
  493. package/dist/integrations/composite-ai/transfer-transforms.js +12 -12
  494. package/dist/integrations/composite-ai/transfer-transforms.js.map +1 -1
  495. package/dist/integrations/composite-media/index.d.ts +4 -3
  496. package/dist/integrations/composite-media/index.js +20 -14
  497. package/dist/integrations/composite-media/index.js.map +1 -1
  498. package/dist/markdown/MarkdownSurface.vue.d.ts +7 -7
  499. package/dist/markdown/document.js +1 -1
  500. package/dist/markdown/document.js.map +1 -1
  501. package/dist/nuxt/module.d.ts +30 -24
  502. package/dist/nuxt/module.js.map +1 -1
  503. package/dist/nuxt/runtime/server/plugins/editor-server.js +3 -2
  504. package/dist/nuxt/runtime/server/plugins/editor-server.js.map +1 -1
  505. package/dist/presets/compose.d.ts +6 -6
  506. package/dist/presets/compose.js +8 -5
  507. package/dist/presets/compose.js.map +1 -1
  508. package/dist/react/AdvancedEditor.d.ts +2 -2
  509. package/dist/react/AdvancedEditor.js +1 -1
  510. package/dist/react/AdvancedEditor.js.map +1 -1
  511. package/dist/react/compose.d.ts +1 -1
  512. package/dist/react/compose.js +2 -2
  513. package/dist/react/compose.js.map +1 -1
  514. package/dist/react/composed-surface.d.ts +5 -5
  515. package/dist/react/composed-surface.js +2 -2
  516. package/dist/react/composed-surface.js.map +1 -1
  517. package/dist/server/ai.d.ts +7 -7
  518. package/dist/server/ai.js +1 -1
  519. package/dist/server/ai.js.map +1 -1
  520. package/dist/server/auth.d.ts +1 -1
  521. package/dist/server/collab-state.d.ts +1 -1
  522. package/dist/server/collab-state.js.map +1 -1
  523. package/dist/server/collab.d.ts +4 -4
  524. package/dist/server/collab.js +22 -17
  525. package/dist/server/collab.js.map +1 -1
  526. package/dist/server/handlers/ai.d.ts +9 -6
  527. package/dist/server/handlers/ai.js +13 -17
  528. package/dist/server/handlers/ai.js.map +1 -1
  529. package/dist/server/handlers/context.d.ts +4 -0
  530. package/dist/server/handlers/context.js.map +1 -1
  531. package/dist/server/handlers/editor.d.ts +33 -32
  532. package/dist/server/handlers/editor.js +13 -8
  533. package/dist/server/handlers/editor.js.map +1 -1
  534. package/dist/server/handlers/images.d.ts +1 -1
  535. package/dist/server/handlers/images.js +1 -1
  536. package/dist/server/handlers/images.js.map +1 -1
  537. package/dist/server/host.d.ts +4 -0
  538. package/dist/server/host.js +10 -2
  539. package/dist/server/host.js.map +1 -1
  540. package/dist/server/index.d.ts +3 -3
  541. package/dist/server/ports.d.ts +8 -8
  542. package/dist/server/ports.js.map +1 -1
  543. package/dist/settings/index.d.ts +20 -19
  544. package/dist/settings/index.js +25 -24
  545. package/dist/settings/index.js.map +1 -1
  546. package/dist/settings/migrate.d.ts +18 -0
  547. package/dist/settings/migrate.js +46 -0
  548. package/dist/settings/migrate.js.map +1 -0
  549. package/dist/settings/values.d.ts +12 -12
  550. package/dist/settings/values.js +11 -11
  551. package/dist/settings/values.js.map +1 -1
  552. package/dist/styles/composites.css +10 -10
  553. package/dist/tree/DocumentTree.js +12 -5
  554. package/dist/tree/DocumentTree.js.map +1 -1
  555. package/dist/tree/drop-rules.js +5 -5
  556. package/dist/tree/drop-rules.js.map +1 -1
  557. package/dist/tree/react/DocumentTree.js +14 -5
  558. package/dist/tree/react/DocumentTree.js.map +1 -1
  559. package/dist/tree/tree-host.js +6 -6
  560. package/dist/tree/tree-host.js.map +1 -1
  561. package/dist/tree/tree-items.js +34 -28
  562. package/dist/tree/tree-items.js.map +1 -1
  563. package/dist/tree/tree-model.js +16 -16
  564. package/dist/tree/tree-model.js.map +1 -1
  565. package/dist/tree/tree-rows.js +2 -2
  566. package/dist/tree/tree-rows.js.map +1 -1
  567. package/dist/tree/tree-view-model.d.ts +2 -2
  568. package/dist/tree/tree-view-model.js.map +1 -1
  569. package/dist/vue/AdvancedEditor.js +2 -2
  570. package/dist/vue/AdvancedEditor.js.map +1 -1
  571. package/dist/vue/AdvancedEditor.vue.d.ts +10 -10
  572. package/dist/vue/SimpleEditor.vue.d.ts +4 -4
  573. package/dist/vue/components/EditorSurface.vue.d.ts +4 -4
  574. package/dist/vue/compose.d.ts +1 -1
  575. package/dist/vue/compose.js +2 -2
  576. package/dist/vue/compose.js.map +1 -1
  577. package/package.json +1 -1
  578. package/dist/features/composites/derivation.d.ts +0 -62
  579. package/dist/features/composites/derivation.js +0 -102
  580. package/dist/features/composites/derivation.js.map +0 -1
  581. package/dist/features/composites/kinds.d.ts +0 -83
  582. package/dist/features/composites/kinds.js +0 -285
  583. package/dist/features/composites/kinds.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"meta-display.js","names":[],"sources":["../../../src/features/composites/meta-display.ts"],"sourcesContent":["import type { Node as PMNode } from '@tiptap/pm/model'\nimport { findBlockById } from '../../core/schema/block-ids'\nimport type { Translate } from '../../i18n'\nimport { type CslItem, citeShort } from './bibliography'\nimport type { Derivation } from './derivation'\nimport { derivationMethodLabel } from './derived-chrome'\nimport { type CompositeKind, type CompositeMetaField, compositeKind } from './kinds'\nimport type { CompositeRow } from './rows'\n\n/**\n * The stored value of a meta field as text (`''` when unset). An array (`multiselect`) reads as its entries joined by\n * `, `: the labels of the matching `options`, else the stored values.\n */\nexport function metaText(row: Pick<CompositeRow, 'meta'>, field: Pick<CompositeMetaField, 'key'> & { options?: CompositeMetaField['options'] }): string {\n const value = row.meta[field.key]\n if (Array.isArray(value)) return value.filter((item): item is string => typeof item === 'string').map(item => field.options?.find(option => option.value === item)?.label ?? item).join(', ')\n return typeof value === 'string' || typeof value === 'number' ? String(value) : ''\n}\n\nconst dateFormat = new Intl.DateTimeFormat('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' })\n\n/** `2026-05-01` → `01.05.2026`; parsed by hand because `new Date('2026-05-01')` is UTC and can show the previous day. */\nexport function formatDate(value: string): string {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})/.exec(value)\n const date = match ? new Date(Number(match[1]), Number(match[2]) - 1, Number(match[3])) : new Date(value)\n return Number.isNaN(date.getTime()) ? value : dateFormat.format(date)\n}\n\n/**\n * The text a field's value stands for in a table cell: `reference` the title of the Baustein it points to (its kind label\n * when untitled, `''` when it is gone or `doc` is unknown), `bibliography` the short citation, `derivation`\n * `method · date` (the method as words when `t` is given, else its stored id); every other type its stored text.\n */\nexport function fieldDisplay(row: Pick<CompositeRow, 'meta' | 'title'>, field: Pick<CompositeMetaField, 'key' | 'type' | 'options'>, doc: PMNode | null, kinds: readonly CompositeKind[], t?: Translate): string {\n const value = row.meta[field.key]\n if (field.type === 'reference') {\n if (typeof value !== 'string' || !value || !doc) return ''\n const target = findBlockById(doc, value)?.node\n if (target?.type.name !== 'composite') return ''\n return target.child(0).textContent.trim() || compositeKind(kinds, String(target.attrs.kind)).label\n }\n if (field.type === 'bibliography') {\n const bib = value as Partial<CslItem> | null | undefined\n return bib && typeof bib === 'object' && typeof bib.type === 'string' ? citeShort(bib, row.title) : ''\n }\n if (field.type === 'derivation') {\n const derivation = value as Partial<Derivation> | null | undefined\n if (!derivation || typeof derivation !== 'object' || typeof derivation.method !== 'string') return ''\n return [t ? derivationMethodLabel(t, derivation.method) : derivation.method, derivation.createdAt ? formatDate(derivation.createdAt) : ''].filter(Boolean).join(' · ')\n }\n return metaText(row, field)\n}\n\n/** Icon and color class of the known status values; unknown values read as neutral. */\nconst STATUS_STYLE: Record<string, { icon: string, color: string }> = {\n open: { icon: 'i-lucide-circle', color: 'text-[var(--sk-muted)]' },\n doing: { icon: 'i-lucide-circle-dot', color: 'text-[var(--sk-info)]' },\n done: { icon: 'i-lucide-circle-check', color: 'text-[var(--sk-success)]' },\n}\nconst STATUS_UNSET = { icon: 'i-lucide-circle-dashed', color: 'text-[var(--sk-fg-dimmed)]' }\nconst STATUS_OTHER = { icon: 'i-lucide-circle', color: 'text-[var(--sk-muted)]' }\n\nexport const statusStyle = (value: string) => STATUS_STYLE[value] ?? (value ? STATUS_OTHER : STATUS_UNSET)\n\n/** A row's `status` field with its current value. */\nexport interface RowStatus {\n field: CompositeMetaField\n value: string\n label: string\n icon: string\n color: string\n}\n\n/** The row's `status` select field with its current value, `null` for a kind without one; `t` words an unset status. */\nexport function rowStatus(row: CompositeRow, t: Translate): RowStatus | null {\n const field = row.fields.find(candidate => candidate.key === 'status' && candidate.type === 'select')\n if (!field) return null\n const value = metaText(row, field)\n return { field, value, label: field.options?.find(option => option.value === value)?.label ?? (value || t('composites.status.none')), ...statusStyle(value) }\n}\n"],"mappings":";;;;;;;;;AAaA,SAAgB,SAAS,KAAiC,OAA8F;CACtJ,MAAM,QAAQ,IAAI,KAAK,MAAM;CAC7B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,QAAQ,SAAyB,OAAO,SAAS,QAAQ,CAAC,CAAC,KAAI,SAAQ,MAAM,SAAS,MAAK,WAAU,OAAO,UAAU,IAAI,CAAC,EAAE,SAAS,IAAI,CAAC,CAAC,KAAK,IAAI;CAC5L,OAAO,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI;AAClF;AAEA,MAAM,aAAa,IAAI,KAAK,eAAe,SAAS;CAAE,KAAK;CAAW,OAAO;CAAW,MAAM;AAAU,CAAC;;AAGzG,SAAgB,WAAW,OAAuB;CAChD,MAAM,QAAQ,2BAA2B,KAAK,KAAK;CACnD,MAAM,OAAO,QAAQ,IAAI,KAAK,OAAO,MAAM,EAAE,GAAG,OAAO,MAAM,EAAE,IAAI,GAAG,OAAO,MAAM,EAAE,CAAC,IAAI,IAAI,KAAK,KAAK;CACxG,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,IAAI,QAAQ,WAAW,OAAO,IAAI;AACtE;;;;;;AAOA,SAAgB,aAAa,KAA2C,OAA6D,KAAoB,OAAiC,GAAuB;CAC/M,MAAM,QAAQ,IAAI,KAAK,MAAM;CAC7B,IAAI,MAAM,SAAS,aAAa;EAC9B,IAAI,OAAO,UAAU,YAAY,CAAC,SAAS,CAAC,KAAK,OAAO;EACxD,MAAM,SAAS,cAAc,KAAK,KAAK,CAAC,EAAE;EAC1C,IAAI,QAAQ,KAAK,SAAS,aAAa,OAAO;EAC9C,OAAO,OAAO,MAAM,CAAC,CAAC,CAAC,YAAY,KAAK,KAAK,cAAc,OAAO,OAAO,OAAO,MAAM,IAAI,CAAC,CAAC,CAAC;CAC/F;CACA,IAAI,MAAM,SAAS,gBAAgB;EACjC,MAAM,MAAM;EACZ,OAAO,OAAO,OAAO,QAAQ,YAAY,OAAO,IAAI,SAAS,WAAW,UAAU,KAAK,IAAI,KAAK,IAAI;CACtG;CACA,IAAI,MAAM,SAAS,cAAc;EAC/B,MAAM,aAAa;EACnB,IAAI,CAAC,cAAc,OAAO,eAAe,YAAY,OAAO,WAAW,WAAW,UAAU,OAAO;EACnG,OAAO,CAAC,IAAI,sBAAsB,GAAG,WAAW,MAAM,IAAI,WAAW,QAAQ,WAAW,YAAY,WAAW,WAAW,SAAS,IAAI,EAAE,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,KAAK;CACvK;CACA,OAAO,SAAS,KAAK,KAAK;AAC5B;;AAGA,MAAM,eAAgE;CACpE,MAAM;EAAE,MAAM;EAAmB,OAAO;CAAyB;CACjE,OAAO;EAAE,MAAM;EAAuB,OAAO;CAAwB;CACrE,MAAM;EAAE,MAAM;EAAyB,OAAO;CAA2B;AAC3E;AACA,MAAM,eAAe;CAAE,MAAM;CAA0B,OAAO;AAA6B;AAC3F,MAAM,eAAe;CAAE,MAAM;CAAmB,OAAO;AAAyB;AAEhF,MAAa,eAAe,UAAkB,aAAa,WAAW,QAAQ,eAAe;;AAY7F,SAAgB,UAAU,KAAmB,GAAgC;CAC3E,MAAM,QAAQ,IAAI,OAAO,MAAK,cAAa,UAAU,QAAQ,YAAY,UAAU,SAAS,QAAQ;CACpG,IAAI,CAAC,OAAO,OAAO;CACnB,MAAM,QAAQ,SAAS,KAAK,KAAK;CACjC,OAAO;EAAE;EAAO;EAAO,OAAO,MAAM,SAAS,MAAK,WAAU,OAAO,UAAU,KAAK,CAAC,EAAE,UAAU,SAAS,EAAE,wBAAwB;EAAI,GAAG,YAAY,KAAK;CAAE;AAC9J"}
1
+ {"version":3,"file":"meta-display.js","names":[],"sources":["../../../src/features/composites/meta-display.ts"],"sourcesContent":["import type { Node as PMNode } from '@tiptap/pm/model'\nimport { findBlockById } from '../../core/schema/block-ids'\nimport type { Translate } from '../../i18n'\nimport { type CslItem, citeShort } from './bibliography'\nimport type { Derivation } from '../../core/derivation'\nimport { derivationMethodLabel } from './derived-chrome'\nimport { type BlockType, blockTypeOf } from './block-types'\nimport type { PropertyDefinition } from '../../core/properties'\nimport type { BlockProperties } from './properties'\nimport type { CompositeRow } from './rows'\n\n/**\n * The stored value of a meta field as text (`''` when unset). An array (`multiselect`) reads as its entries joined by\n * `, `: the labels of the matching `options`, else the stored values.\n */\nexport function metaText(row: Pick<BlockProperties, 'meta'>, field: Pick<PropertyDefinition, 'key'> & { options?: PropertyDefinition['options'] }): string {\n const value = row.meta[field.key]\n if (Array.isArray(value)) return value.filter((item): item is string => typeof item === 'string').map(item => field.options?.find(option => option.value === item)?.label ?? item).join(', ')\n return typeof value === 'string' || typeof value === 'number' ? String(value) : ''\n}\n\nconst dateFormat = new Intl.DateTimeFormat('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' })\n\n/** `2026-05-01` → `01.05.2026`; parsed by hand because `new Date('2026-05-01')` is UTC and can show the previous day. */\nexport function formatDate(value: string): string {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})/.exec(value)\n const date = match ? new Date(Number(match[1]), Number(match[2]) - 1, Number(match[3])) : new Date(value)\n return Number.isNaN(date.getTime()) ? value : dateFormat.format(date)\n}\n\n/**\n * The text a field's value stands for in a table cell: `reference` the title of the Typed block it points to (its Block type label\n * when untitled, `''` when it is gone or `doc` is unknown), `bibliography` the short citation, `derivation`\n * `method · date` (the method as words when `t` is given, else its stored id); every other type its stored text.\n */\nexport function fieldDisplay(row: Pick<CompositeRow, 'meta' | 'title'>, field: Pick<PropertyDefinition, 'key' | 'type' | 'options'>, doc: PMNode | null, kinds: readonly BlockType[], t?: Translate): string {\n const value = row.meta[field.key]\n if (field.type === 'reference') {\n if (typeof value !== 'string' || !value || !doc) return ''\n const target = findBlockById(doc, value)?.node\n if (target?.type.name !== 'typedBlock') return ''\n return target.child(0).textContent.trim() || blockTypeOf(kinds, String(target.attrs.blockType)).label\n }\n if (field.type === 'bibliography') {\n const bib = value as Partial<CslItem> | null | undefined\n return bib && typeof bib === 'object' && typeof bib.type === 'string' ? citeShort(bib, row.title) : ''\n }\n if (field.type === 'derivation') {\n const derivation = value as Partial<Derivation> | null | undefined\n if (!derivation || typeof derivation !== 'object' || typeof derivation.method !== 'string') return ''\n return [t ? derivationMethodLabel(t, derivation.method) : derivation.method, derivation.createdAt ? formatDate(derivation.createdAt) : ''].filter(Boolean).join(' · ')\n }\n return metaText(row, field)\n}\n\n/** Icon and color class of the known status values; unknown values read as neutral. */\nconst STATUS_STYLE: Record<string, { icon: string, color: string }> = {\n open: { icon: 'i-lucide-circle', color: 'text-[var(--sk-muted)]' },\n doing: { icon: 'i-lucide-circle-dot', color: 'text-[var(--sk-info)]' },\n done: { icon: 'i-lucide-circle-check', color: 'text-[var(--sk-success)]' },\n}\nconst STATUS_UNSET = { icon: 'i-lucide-circle-dashed', color: 'text-[var(--sk-fg-dimmed)]' }\nconst STATUS_OTHER = { icon: 'i-lucide-circle', color: 'text-[var(--sk-muted)]' }\n\nexport const statusStyle = (value: string) => STATUS_STYLE[value] ?? (value ? STATUS_OTHER : STATUS_UNSET)\n\n/** A row's `status` field with its current value. */\nexport interface RowStatus {\n field: PropertyDefinition\n value: string\n label: string\n icon: string\n color: string\n}\n\n/** The row's `status` select field with its current value, `null` for a kind without one; `t` words an unset status. */\nexport function rowStatus(row: CompositeRow, t: Translate): RowStatus | null {\n const field = row.definitions.find(candidate => candidate.key === 'status' && candidate.type === 'select')\n if (!field) return null\n const value = metaText(row, field)\n return { field, value, label: field.options?.find(option => option.value === value)?.label ?? (value || t('composites.status.none')), ...statusStyle(value) }\n}\n"],"mappings":";;;;;;;;;AAeA,SAAgB,SAAS,KAAoC,OAA8F;CACzJ,MAAM,QAAQ,IAAI,KAAK,MAAM;CAC7B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,QAAQ,SAAyB,OAAO,SAAS,QAAQ,CAAC,CAAC,KAAI,SAAQ,MAAM,SAAS,MAAK,WAAU,OAAO,UAAU,IAAI,CAAC,EAAE,SAAS,IAAI,CAAC,CAAC,KAAK,IAAI;CAC5L,OAAO,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI;AAClF;AAEA,MAAM,aAAa,IAAI,KAAK,eAAe,SAAS;CAAE,KAAK;CAAW,OAAO;CAAW,MAAM;AAAU,CAAC;;AAGzG,SAAgB,WAAW,OAAuB;CAChD,MAAM,QAAQ,2BAA2B,KAAK,KAAK;CACnD,MAAM,OAAO,QAAQ,IAAI,KAAK,OAAO,MAAM,EAAE,GAAG,OAAO,MAAM,EAAE,IAAI,GAAG,OAAO,MAAM,EAAE,CAAC,IAAI,IAAI,KAAK,KAAK;CACxG,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,IAAI,QAAQ,WAAW,OAAO,IAAI;AACtE;;;;;;AAOA,SAAgB,aAAa,KAA2C,OAA6D,KAAoB,OAA6B,GAAuB;CAC3M,MAAM,QAAQ,IAAI,KAAK,MAAM;CAC7B,IAAI,MAAM,SAAS,aAAa;EAC9B,IAAI,OAAO,UAAU,YAAY,CAAC,SAAS,CAAC,KAAK,OAAO;EACxD,MAAM,SAAS,cAAc,KAAK,KAAK,CAAC,EAAE;EAC1C,IAAI,QAAQ,KAAK,SAAS,cAAc,OAAO;EAC/C,OAAO,OAAO,MAAM,CAAC,CAAC,CAAC,YAAY,KAAK,KAAK,YAAY,OAAO,OAAO,OAAO,MAAM,SAAS,CAAC,CAAC,CAAC;CAClG;CACA,IAAI,MAAM,SAAS,gBAAgB;EACjC,MAAM,MAAM;EACZ,OAAO,OAAO,OAAO,QAAQ,YAAY,OAAO,IAAI,SAAS,WAAW,UAAU,KAAK,IAAI,KAAK,IAAI;CACtG;CACA,IAAI,MAAM,SAAS,cAAc;EAC/B,MAAM,aAAa;EACnB,IAAI,CAAC,cAAc,OAAO,eAAe,YAAY,OAAO,WAAW,WAAW,UAAU,OAAO;EACnG,OAAO,CAAC,IAAI,sBAAsB,GAAG,WAAW,MAAM,IAAI,WAAW,QAAQ,WAAW,YAAY,WAAW,WAAW,SAAS,IAAI,EAAE,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,KAAK;CACvK;CACA,OAAO,SAAS,KAAK,KAAK;AAC5B;;AAGA,MAAM,eAAgE;CACpE,MAAM;EAAE,MAAM;EAAmB,OAAO;CAAyB;CACjE,OAAO;EAAE,MAAM;EAAuB,OAAO;CAAwB;CACrE,MAAM;EAAE,MAAM;EAAyB,OAAO;CAA2B;AAC3E;AACA,MAAM,eAAe;CAAE,MAAM;CAA0B,OAAO;AAA6B;AAC3F,MAAM,eAAe;CAAE,MAAM;CAAmB,OAAO;AAAyB;AAEhF,MAAa,eAAe,UAAkB,aAAa,WAAW,QAAQ,eAAe;;AAY7F,SAAgB,UAAU,KAAmB,GAAgC;CAC3E,MAAM,QAAQ,IAAI,YAAY,MAAK,cAAa,UAAU,QAAQ,YAAY,UAAU,SAAS,QAAQ;CACzG,IAAI,CAAC,OAAO,OAAO;CACnB,MAAM,QAAQ,SAAS,KAAK,KAAK;CACjC,OAAO;EAAE;EAAO;EAAO,OAAO,MAAM,SAAS,MAAK,WAAU,OAAO,UAAU,KAAK,CAAC,EAAE,UAAU,SAAS,EAAE,wBAAwB;EAAI,GAAG,YAAY,KAAK;CAAE;AAC9J"}
@@ -1,11 +1,11 @@
1
+ import "../../core/capabilities.js";
2
+ import { DERIVATION_KEY } from "../../core/derivation.js";
1
3
  //#region src/features/composites/meta-keys.d.ts
2
- /** Key of the derivation (provenance) in a composite's `meta`. */
3
- export declare const DERIVATION_KEY = "derivation";
4
- /** Key of the bibliographic record (`CslItem`) in a composite's `meta`. */
4
+ /** Key of the bibliographic record (`CslItem`) in a block's `meta`. */
5
5
  export declare const BIB_KEY = "bib";
6
- /** Key of the hidden-title flag in a composite's `meta`: `true` while the title is hidden, absent otherwise. */
6
+ /** Key of the hidden-title flag in a block's `meta`: `true` while the title is hidden, absent otherwise. */
7
7
  export declare const TITLE_HIDDEN_KEY = "titleHidden";
8
- /** Key of the colour basket in a composite's `meta`: the id of one of the editor's baskets. */
8
+ /** Key of the colour basket in a block's `meta`: the id of one of the editor's baskets. */
9
9
  export declare const BASKET_KEY = "basket";
10
10
  //#endregion
11
11
  //# sourceMappingURL=meta-keys.d.ts.map
@@ -1,21 +1,21 @@
1
+ import { DERIVATION_KEY } from "../../core/derivation.js";
2
+ import { propertiesOf } from "./block-types.js";
1
3
  //#region src/features/composites/meta-keys.ts
2
- /** Key of the derivation (provenance) in a composite's `meta`. */
3
- const DERIVATION_KEY = "derivation";
4
- /** Key of the bibliographic record (`CslItem`) in a composite's `meta`. */
4
+ /** Key of the bibliographic record (`CslItem`) in a block's `meta`. */
5
5
  const BIB_KEY = "bib";
6
- /** Key of the hidden-title flag in a composite's `meta`: `true` while the title is hidden, absent otherwise. */
6
+ /** Key of the hidden-title flag in a block's `meta`: `true` while the title is hidden, absent otherwise. */
7
7
  const TITLE_HIDDEN_KEY = "titleHidden";
8
- /** Key of the colour basket in a composite's `meta`: the id of one of the editor's baskets. */
8
+ /** Key of the colour basket in a block's `meta`: the id of one of the editor's baskets. */
9
9
  const BASKET_KEY = "basket";
10
10
  /**
11
- * Whether a composite of `kind` keeps the `meta` entry `key`: the fields the kind declares, plus provenance
11
+ * Whether a block of Block type `kind` keeps the `meta` entry `key`: the fields the kind declares, plus provenance
12
12
  * (`derivation`), the bibliographic record (`bib`), the hidden-title flag (`titleHidden`) and the basket (`basket`),
13
13
  * which any kind may carry (a kind switch, a conversion and a Markdown round trip must not drop them).
14
14
  */
15
15
  function keepsMetaKey(kind, key) {
16
- return key === "derivation" || key === "bib" || key === "titleHidden" || key === "basket" || kind.fields.some((field) => field.key === key);
16
+ return key === "derivation" || key === "bib" || key === "titleHidden" || key === "basket" || propertiesOf(kind).some((field) => field.key === key);
17
17
  }
18
- /** `meta` reduced to the entries a composite of `kind` keeps (`keepsMetaKey`). */
18
+ /** `meta` reduced to the entries a block of Block type `kind` keeps (`keepsMetaKey`). */
19
19
  function keptMeta(kind, meta) {
20
20
  return Object.fromEntries(Object.entries(meta).filter(([key]) => keepsMetaKey(kind, key)));
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"meta-keys.js","names":[],"sources":["../../../src/features/composites/meta-keys.ts"],"sourcesContent":["// Vue-free and server-importable: the `meta` keys a Baustein of any kind may carry, and which meta keys a kind keeps.\nimport type { CompositeKind } from './kinds'\n\n/** Key of the derivation (provenance) in a composite's `meta`. */\nexport const DERIVATION_KEY = 'derivation'\n\n/** Key of the bibliographic record (`CslItem`) in a composite's `meta`. */\nexport const BIB_KEY = 'bib'\n\n/** Key of the hidden-title flag in a composite's `meta`: `true` while the title is hidden, absent otherwise. */\nexport const TITLE_HIDDEN_KEY = 'titleHidden'\n\n/** Key of the colour basket in a composite's `meta`: the id of one of the editor's baskets. */\nexport const BASKET_KEY = 'basket'\n\n/**\n * Whether a composite of `kind` keeps the `meta` entry `key`: the fields the kind declares, plus provenance\n * (`derivation`), the bibliographic record (`bib`), the hidden-title flag (`titleHidden`) and the basket (`basket`),\n * which any kind may carry (a kind switch, a conversion and a Markdown round trip must not drop them).\n */\nexport function keepsMetaKey(kind: Pick<CompositeKind, 'fields'>, key: string): boolean {\n return key === DERIVATION_KEY || key === BIB_KEY || key === TITLE_HIDDEN_KEY || key === BASKET_KEY || kind.fields.some(field => field.key === key)\n}\n\n/** `meta` reduced to the entries a composite of `kind` keeps (`keepsMetaKey`). */\nexport function keptMeta(kind: Pick<CompositeKind, 'fields'>, meta: Record<string, unknown>): Record<string, unknown> {\n return Object.fromEntries(Object.entries(meta).filter(([key]) => keepsMetaKey(kind, key)))\n}\n"],"mappings":";;AAIA,MAAa,iBAAiB;;AAG9B,MAAa,UAAU;;AAGvB,MAAa,mBAAmB;;AAGhC,MAAa,aAAa;;;;;;AAO1B,SAAgB,aAAa,MAAqC,KAAsB;CACtF,OAAO,QAAA,gBAA0B,QAAA,SAAmB,QAAA,iBAA4B,QAAA,YAAsB,KAAK,OAAO,MAAK,UAAS,MAAM,QAAQ,GAAG;AACnJ;;AAGA,SAAgB,SAAS,MAAqC,MAAwD;CACpH,OAAO,OAAO,YAAY,OAAO,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,aAAa,MAAM,GAAG,CAAC,CAAC;AAC3F"}
1
+ {"version":3,"file":"meta-keys.js","names":[],"sources":["../../../src/features/composites/meta-keys.ts"],"sourcesContent":["// Vue-free and server-importable: the `meta` keys a Typed block of any Block type may carry, and which meta keys a Block type keeps.\nimport type { BlockTypeData } from '../../core/capabilities'\nimport { DERIVATION_KEY } from '../../core/derivation'\nimport { propertiesOf } from './block-types'\n\nexport { DERIVATION_KEY }\n\n/** Key of the bibliographic record (`CslItem`) in a block's `meta`. */\nexport const BIB_KEY = 'bib'\n\n/** Key of the hidden-title flag in a block's `meta`: `true` while the title is hidden, absent otherwise. */\nexport const TITLE_HIDDEN_KEY = 'titleHidden'\n\n/** Key of the colour basket in a block's `meta`: the id of one of the editor's baskets. */\nexport const BASKET_KEY = 'basket'\n\n/**\n * Whether a block of Block type `kind` keeps the `meta` entry `key`: the fields the kind declares, plus provenance\n * (`derivation`), the bibliographic record (`bib`), the hidden-title flag (`titleHidden`) and the basket (`basket`),\n * which any kind may carry (a kind switch, a conversion and a Markdown round trip must not drop them).\n */\nexport function keepsMetaKey(kind: BlockTypeData, key: string): boolean {\n return key === DERIVATION_KEY || key === BIB_KEY || key === TITLE_HIDDEN_KEY || key === BASKET_KEY || propertiesOf(kind).some(field => field.key === key)\n}\n\n/** `meta` reduced to the entries a block of Block type `kind` keeps (`keepsMetaKey`). */\nexport function keptMeta(kind: BlockTypeData, meta: Record<string, unknown>): Record<string, unknown> {\n return Object.fromEntries(Object.entries(meta).filter(([key]) => keepsMetaKey(kind, key)))\n}\n"],"mappings":";;;;AAQA,MAAa,UAAU;;AAGvB,MAAa,mBAAmB;;AAGhC,MAAa,aAAa;;;;;;AAO1B,SAAgB,aAAa,MAAqB,KAAsB;CACtE,OAAO,QAAA,gBAA0B,QAAA,SAAmB,QAAA,iBAA4B,QAAA,YAAsB,aAAa,IAAI,CAAC,CAAC,MAAK,UAAS,MAAM,QAAQ,GAAG;AAC1J;;AAGA,SAAgB,SAAS,MAAqB,MAAwD;CACpG,OAAO,OAAO,YAAY,OAAO,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,aAAa,MAAM,GAAG,CAAC,CAAC;AAC3F"}
@@ -1,15 +1,15 @@
1
- import { CompositeOptions, CompositeStorage } from "./nodes.js";
2
1
  import { ReferenceOptions } from "./reference.js";
2
+ import { CompositeOptions, CompositeStorage } from "./nodes.js";
3
3
  import { NodeViewRenderer } from "@tiptap/core";
4
4
  //#region src/features/composites/node-views.d.ts
5
5
  /** The node view renderers a framework binding supplies for the composite block and the reference chip. */
6
6
  export interface CompositeNodeViews {
7
- composite: NodeViewRenderer;
7
+ typedBlock: NodeViewRenderer;
8
8
  reference: NodeViewRenderer;
9
9
  }
10
10
  /**
11
11
  * The composite node with the node view of a framework binding, the tags row (data: hidden, `CompositeChrome`
12
- * shows and edits it, so it needs no node view) and the reference chip. Configure the kinds with `Composite.configure({ kinds: [...defaultCompositeKinds(t), myKind] })`.
12
+ * shows and edits it, so it needs no node view) and the reference chip. Configure the Block types with `Composite.configure({ blockTypes: [...defaultBlockTypes(t), myType] })`.
13
13
  */
14
14
  export declare function compositeNodes(nodeViews: CompositeNodeViews): {
15
15
  Composite: import("@tiptap/core").Node<CompositeOptions, CompositeStorage>;
@@ -3,12 +3,12 @@ import { ReferenceNode } from "./reference.js";
3
3
  //#region src/features/composites/node-views.ts
4
4
  /**
5
5
  * The composite node with the node view of a framework binding, the tags row (data: hidden, `CompositeChrome`
6
- * shows and edits it, so it needs no node view) and the reference chip. Configure the kinds with `Composite.configure({ kinds: [...defaultCompositeKinds(t), myKind] })`.
6
+ * shows and edits it, so it needs no node view) and the reference chip. Configure the Block types with `Composite.configure({ blockTypes: [...defaultBlockTypes(t), myType] })`.
7
7
  */
8
8
  function compositeNodes(nodeViews) {
9
9
  return {
10
10
  Composite: CompositeNode.extend({ addNodeView() {
11
- return nodeViews.composite;
11
+ return nodeViews.typedBlock;
12
12
  } }),
13
13
  CompositeTags: CompositeTagsNode,
14
14
  Reference: ReferenceNode.extend({ addNodeView() {
@@ -1 +1 @@
1
- {"version":3,"file":"node-views.js","names":[],"sources":["../../../src/features/composites/node-views.ts"],"sourcesContent":["import type { NodeViewRenderer } from '@tiptap/core'\nimport { CompositeNode, CompositeTagsNode } from './nodes'\nimport { ReferenceNode } from './reference'\n\n/** The node view renderers a framework binding supplies for the composite block and the reference chip. */\nexport interface CompositeNodeViews {\n composite: NodeViewRenderer\n reference: NodeViewRenderer\n}\n\n/**\n * The composite node with the node view of a framework binding, the tags row (data: hidden, `CompositeChrome`\n * shows and edits it, so it needs no node view) and the reference chip. Configure the kinds with `Composite.configure({ kinds: [...defaultCompositeKinds(t), myKind] })`.\n */\nexport function compositeNodes(nodeViews: CompositeNodeViews) {\n return {\n // Explicit return type: the node views import `compositeKindsOf`, so inference would otherwise be circular.\n Composite: CompositeNode.extend({\n addNodeView(): NodeViewRenderer {\n return nodeViews.composite\n },\n }),\n CompositeTags: CompositeTagsNode,\n Reference: ReferenceNode.extend({\n addNodeView(): NodeViewRenderer {\n return nodeViews.reference\n },\n }),\n }\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,eAAe,WAA+B;CAC5D,OAAO;EAEL,WAAW,cAAc,OAAO,EAC9B,cAAgC;GAC9B,OAAO,UAAU;EACnB,EACF,CAAC;EACD,eAAe;EACf,WAAW,cAAc,OAAO,EAC9B,cAAgC;GAC9B,OAAO,UAAU;EACnB,EACF,CAAC;CACH;AACF"}
1
+ {"version":3,"file":"node-views.js","names":[],"sources":["../../../src/features/composites/node-views.ts"],"sourcesContent":["import type { NodeViewRenderer } from '@tiptap/core'\nimport { CompositeNode, CompositeTagsNode } from './nodes'\nimport { ReferenceNode } from './reference'\n\n/** The node view renderers a framework binding supplies for the composite block and the reference chip. */\nexport interface CompositeNodeViews {\n typedBlock: NodeViewRenderer\n reference: NodeViewRenderer\n}\n\n/**\n * The composite node with the node view of a framework binding, the tags row (data: hidden, `CompositeChrome`\n * shows and edits it, so it needs no node view) and the reference chip. Configure the Block types with `Composite.configure({ blockTypes: [...defaultBlockTypes(t), myType] })`.\n */\nexport function compositeNodes(nodeViews: CompositeNodeViews) {\n return {\n // Explicit return type: the node views import `blockTypesOf`, so inference would otherwise be circular.\n Composite: CompositeNode.extend({\n addNodeView(): NodeViewRenderer {\n return nodeViews.typedBlock\n },\n }),\n CompositeTags: CompositeTagsNode,\n Reference: ReferenceNode.extend({\n addNodeView(): NodeViewRenderer {\n return nodeViews.reference\n },\n }),\n }\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,eAAe,WAA+B;CAC5D,OAAO;EAEL,WAAW,cAAc,OAAO,EAC9B,cAAgC;GAC9B,OAAO,UAAU;EACnB,EACF,CAAC;EACD,eAAe;EACf,WAAW,cAAc,OAAO,EAC9B,cAAgC;GAC9B,OAAO,UAAU;EACnB,EACF,CAAC;CACH;AACF"}
@@ -1,24 +1,24 @@
1
1
  import { Store } from "../../core/store.js";
2
2
  import { HeadingConversionScope } from "../../settings/values.js";
3
3
  import "../../settings/index.js";
4
- import { CompositeKind } from "./kinds.js";
5
4
  import { Basket } from "./baskets.js";
5
+ import { BlockType } from "./block-types.js";
6
6
  import { Editor, JSONContent, Node } from "@tiptap/core";
7
7
  import { EditorState } from "@tiptap/pm/state";
8
8
  import { Node as Node$1, ResolvedPos } from "@tiptap/pm/model";
9
9
  //#region src/features/composites/nodes.d.ts
10
- /** Options of the `composite` node: the kinds its `kind` attribute selects from and the baskets its `meta.basket` selects from. */
10
+ /** Options of the `typedBlock` node: the Block types its `blockType` attribute selects from and the baskets its `meta.basket` selects from. */
11
11
  export interface CompositeOptions {
12
- kinds: readonly CompositeKind[];
12
+ blockTypes: readonly BlockType[];
13
13
  baskets: readonly Basket[];
14
14
  }
15
- /** Storage of the `composite` node: mirrors `options.kinds` and `options.baskets` for code that only has the editor. */
15
+ /** Storage of the `typedBlock` node: mirrors `options.blockTypes` and `options.baskets` for code that only has the editor. */
16
16
  export interface CompositeStorage {
17
- kinds: readonly CompositeKind[];
17
+ blockTypes: readonly BlockType[];
18
18
  baskets: readonly Basket[];
19
- /** Ids of the Bausteine with a hidden title (`meta.titleHidden`) whose title the caret entered; they show it for the rest of the editor session. */
19
+ /** Ids of the Typed blocks with a hidden title (`meta.titleHidden`) whose title the caret entered; they show it for the rest of the editor session. */
20
20
  revealedTitles: Store<ReadonlySet<string>>;
21
- /** Ids of the derived Bausteine (those with a `meta.derivation`) the user opened; every other derived Baustein shows collapsed. */
21
+ /** Ids of the derived Typed blocks (those with a `meta.derivation`) the user opened; every other derived Typed block shows collapsed. */
22
22
  expanded: Store<ReadonlySet<string>>;
23
23
  }
24
24
  declare module '@tiptap/core' {
@@ -41,9 +41,9 @@ declare module '@tiptap/core' {
41
41
  recursive: boolean;
42
42
  scope: HeadingConversionScope;
43
43
  }) => ReturnType;
44
- /** Switch the composite at `pos` (default: the caret's innermost composite) to `kind`; `meta` keeps the target kind's fields plus `derivation` and `bib`. */
45
- setCompositeKind: (kind: string, pos?: number) => ReturnType;
46
- /** Open the derived Baustein with block id `id` if it is collapsed, collapse it if it is open. */
44
+ /** Switch the composite at `pos` (default: the caret's innermost composite) to the Block type `blockTypeId`; `meta` keeps the new Block type's properties plus `derivation` and `bib`. */
45
+ changeBlockType: (blockTypeId: string, pos?: number) => ReturnType;
46
+ /** Open the derived Typed block with block id `id` if it is collapsed, collapse it if it is open. */
47
47
  toggleCompositeExpanded: (id: string) => ReturnType;
48
48
  /** Put the composite at `pos` (default: the caret's innermost composite) into the basket `basket` (an id of the editor's baskets; false for an unknown id), or take it out with `null`. */
49
49
  setCompositeBasket: (basket: string | null, pos?: number) => ReturnType;
@@ -52,16 +52,16 @@ declare module '@tiptap/core' {
52
52
  };
53
53
  }
54
54
  interface Storage {
55
- composite: CompositeStorage;
55
+ typedBlock: CompositeStorage;
56
56
  }
57
57
  }
58
58
  /** Title, description and tags: the fixed children in front of a composite's body. */
59
59
  export declare const COMPOSITE_CHROME_COUNT = 3;
60
60
  /**
61
- * Composite kinds `editor` was configured with. An editor without the composite node gets the built-in kinds in the
61
+ * Block types `editor` was configured with. An editor without the composite node gets the built-in Block types in the
62
62
  * language of its surface (the default language without one).
63
63
  */
64
- export declare function compositeKindsOf(editor: Editor): readonly CompositeKind[];
64
+ export declare function blockTypesOf(editor: Editor): readonly BlockType[];
65
65
  /** Baskets `editor` was configured with (the built-in ones in the default language for an editor without the composite node). */
66
66
  export declare function compositeBasketsOf(editor: Editor): readonly Basket[];
67
67
  /** JSON of a fresh composite of `kind` (empty title/description/tags, hidden meta) with `body`. */
@@ -1,38 +1,39 @@
1
1
  import { ABILITY, TEXT_ABILITIES } from "../../core/schema/abilities.js";
2
- import { editorEntryOf } from "../../core/editor-ui.js";
3
2
  import { isChromeNode } from "../../core/schema/node-flags.js";
3
+ import { OLD_HTML, TYPED_BLOCK, TYPED_BLOCK_DESCRIPTION, TYPED_BLOCK_TAGS, TYPED_BLOCK_TITLE } from "../../core/schema/persisted-names.js";
4
+ import { editorEntryOf } from "../../core/editor-ui.js";
5
+ import { derivationOf } from "../../core/derivation.js";
4
6
  import { createStore } from "../../core/store.js";
5
- import { compositeKind, defaultCompositeKinds, fallbackCompositeKinds } from "./kinds.js";
7
+ import { blockTypeOf, defaultBlockTypes, fallbackBlockTypes } from "./block-types.js";
6
8
  import { BASKET_KEY, TITLE_HIDDEN_KEY, keptMeta } from "./meta-keys.js";
7
9
  import { compositeFence, withReferencedFenceIds } from "./fences.js";
8
10
  import { basketById, defaultBaskets, fallbackBaskets, titleHiddenOf } from "./baskets.js";
9
- import { derivationOf } from "./derivation.js";
10
11
  import { flattenCompositesToHeadings, groupHeadingsIntoComposites, headingGroupRange } from "./heading-composites.js";
11
12
  import { Node, mergeAttributes } from "@tiptap/core";
12
13
  import { Selection, TextSelection } from "@tiptap/pm/state";
13
14
  //#region src/features/composites/nodes.ts
14
- const COMPOSITE = "composite";
15
- const TITLE = "compositeTitle";
16
- const DESCRIPTION = "compositeDescription";
17
- const TAGS = "compositeTags";
15
+ /** The `data-type` of the chrome elements of a Typed block (title, description, tags) in the HTML the nodes render and parse. */
16
+ const TITLE_DATA_TYPE = "typed-block-title";
17
+ const DESCRIPTION_DATA_TYPE = "typed-block-description";
18
+ const TAGS_DATA_TYPE = "typed-block-tags";
18
19
  /** Kind of a composite created without an explicit one (also the attribute default). */
19
20
  const DEFAULT_KIND = "section";
20
21
  /** Title, description and tags: the fixed children in front of a composite's body. */
21
22
  const COMPOSITE_CHROME_COUNT = 3;
22
23
  const CHROME_COUNT = 3;
23
24
  /**
24
- * Composite kinds `editor` was configured with. An editor without the composite node gets the built-in kinds in the
25
+ * Block types `editor` was configured with. An editor without the composite node gets the built-in Block types in the
25
26
  * language of its surface (the default language without one).
26
27
  */
27
- function compositeKindsOf(editor) {
28
- const configured = editor.storage.composite?.kinds;
28
+ function blockTypesOf(editor) {
29
+ const configured = editor.storage.typedBlock?.blockTypes;
29
30
  if (configured) return configured;
30
31
  const entry = editorEntryOf(editor);
31
- return entry ? defaultCompositeKinds(entry.ctx.t) : fallbackCompositeKinds();
32
+ return entry ? defaultBlockTypes(entry.ctx.t) : fallbackBlockTypes();
32
33
  }
33
34
  /** Baskets `editor` was configured with (the built-in ones in the default language for an editor without the composite node). */
34
35
  function compositeBasketsOf(editor) {
35
- const configured = editor.storage.composite?.baskets;
36
+ const configured = editor.storage.typedBlock?.baskets;
36
37
  if (configured) return configured;
37
38
  const entry = editorEntryOf(editor);
38
39
  return entry ? defaultBaskets(entry.ctx.t) : fallbackBaskets();
@@ -40,12 +41,12 @@ function compositeBasketsOf(editor) {
40
41
  /** JSON of a fresh composite of `kind` (empty title/description/tags, hidden meta) with `body`. */
41
42
  function compositeJSON(kind, body = [{ type: "paragraph" }]) {
42
43
  return {
43
- type: COMPOSITE,
44
- attrs: { kind },
44
+ type: TYPED_BLOCK,
45
+ attrs: { blockType: kind },
45
46
  content: [
46
- { type: TITLE },
47
- { type: DESCRIPTION },
48
- { type: TAGS },
47
+ { type: TYPED_BLOCK_TITLE },
48
+ { type: TYPED_BLOCK_DESCRIPTION },
49
+ { type: TYPED_BLOCK_TAGS },
49
50
  ...body
50
51
  ]
51
52
  };
@@ -54,7 +55,7 @@ function compositeJSON(kind, body = [{ type: "paragraph" }]) {
54
55
  function compositeAround($pos) {
55
56
  for (let depth = $pos.depth; depth > 0; depth--) {
56
57
  const node = $pos.node(depth);
57
- if (node.type.name === COMPOSITE) return {
58
+ if (node.type.name === "typedBlock") return {
58
59
  depth,
59
60
  pos: $pos.before(depth),
60
61
  node
@@ -66,7 +67,7 @@ function compositeAround($pos) {
66
67
  function compositeAt(state, pos) {
67
68
  if (pos === void 0) return compositeAround(state.selection.$head);
68
69
  const node = state.doc.nodeAt(pos);
69
- return node?.type.name === COMPOSITE ? {
70
+ return node?.type.name === "typedBlock" ? {
70
71
  pos,
71
72
  node
72
73
  } : null;
@@ -82,7 +83,7 @@ const isEmptyParagraph = (node) => node.type.name === "paragraph" && node.conten
82
83
  function inTrailingEmptyParagraph($head) {
83
84
  if ($head.depth < 2 || !isEmptyParagraph($head.parent)) return false;
84
85
  const composite = $head.node($head.depth - 1);
85
- return composite.type.name === COMPOSITE && $head.index($head.depth - 1) === composite.childCount - 1 && composite.childCount > 4;
86
+ return composite.type.name === "typedBlock" && $head.index($head.depth - 1) === composite.childCount - 1 && composite.childCount > 4;
86
87
  }
87
88
  /** Nothing typed yet: empty title and description, no tags, body is one empty paragraph. */
88
89
  function isEmptyComposite(composite) {
@@ -93,10 +94,10 @@ function isEmptyComposite(composite) {
93
94
  function structureRange(state, scope, direction) {
94
95
  const { $from, $to, $head, empty } = state.selection;
95
96
  if (!empty) {
96
- const range = $from.blockRange($to, (node) => node.type.name === "doc" || node.type.name === COMPOSITE);
97
+ const range = $from.blockRange($to, (node) => node.type.name === "doc" || node.type.name === "typedBlock");
97
98
  if (!range) return null;
98
99
  const parent = range.parent;
99
- const fromIndex = Math.max(range.startIndex, parent.type.name === COMPOSITE ? CHROME_COUNT : 0);
100
+ const fromIndex = Math.max(range.startIndex, parent.type.name === "typedBlock" ? CHROME_COUNT : 0);
100
101
  const toIndex = range.endIndex;
101
102
  if (fromIndex >= toIndex) return null;
102
103
  return {
@@ -139,10 +140,10 @@ function structureRange(state, scope, direction) {
139
140
  };
140
141
  }
141
142
  let depth = $head.depth;
142
- while (depth > 0 && !["doc", COMPOSITE].includes($head.node(depth - 1).type.name)) depth--;
143
+ while (depth > 0 && !["doc", "typedBlock"].includes($head.node(depth - 1).type.name)) depth--;
143
144
  if (depth === 0) return null;
144
145
  const parent = $head.node(depth - 1);
145
- const minIndex = parent.type.name === COMPOSITE ? CHROME_COUNT : 0;
146
+ const minIndex = parent.type.name === "typedBlock" ? CHROME_COUNT : 0;
146
147
  let index = $head.index(depth - 1);
147
148
  while (index >= minIndex && parent.child(index).type.name !== "heading") index--;
148
149
  if (index < minIndex) return null;
@@ -194,10 +195,10 @@ const CHROME_REVOKES = [
194
195
  ABILITY.blockDuplicate
195
196
  ];
196
197
  const CompositeNode = Node.create({
197
- name: COMPOSITE,
198
+ name: TYPED_BLOCK,
198
199
  priority: 101,
199
200
  group: "block",
200
- content: `${TITLE} ${DESCRIPTION} ${TAGS} block+`,
201
+ content: `${TYPED_BLOCK_TITLE} ${TYPED_BLOCK_DESCRIPTION} ${TYPED_BLOCK_TAGS} block+`,
201
202
  isolating: true,
202
203
  defining: true,
203
204
  editorBlockContainer: true,
@@ -208,12 +209,12 @@ const CompositeNode = Node.create({
208
209
  ABILITY.compositeDerive
209
210
  ] },
210
211
  addOptions: () => ({
211
- kinds: fallbackCompositeKinds(),
212
+ blockTypes: fallbackBlockTypes(),
212
213
  baskets: fallbackBaskets()
213
214
  }),
214
215
  addStorage() {
215
216
  return {
216
- kinds: this.options.kinds,
217
+ blockTypes: this.options.blockTypes,
217
218
  baskets: this.options.baskets,
218
219
  expanded: createStore(/* @__PURE__ */ new Set()),
219
220
  revealedTitles: createStore(/* @__PURE__ */ new Set())
@@ -226,22 +227,22 @@ const CompositeNode = Node.create({
226
227
  for (let depth = $head.depth; depth > 0; depth--) {
227
228
  const node = $head.node(depth);
228
229
  const id = node.attrs.id;
229
- if (node.type.name !== COMPOSITE || typeof id !== "string" || !id || $head.index(depth) < CHROME_COUNT) continue;
230
+ if (node.type.name !== "typedBlock" || typeof id !== "string" || !id || $head.index(depth) < CHROME_COUNT) continue;
230
231
  if (derivationOf(node) && !expanded.get().has(id)) (open ??= new Set(expanded.get())).add(id);
231
232
  }
232
233
  if (open) expanded.set(open);
233
- if ($head.parent.type.name === TITLE && $head.depth > 0) {
234
+ if ($head.parent.type.name === "typedBlockTitle" && $head.depth > 0) {
234
235
  const composite = $head.node($head.depth - 1);
235
236
  const id = composite.attrs.id;
236
- if (composite.type.name === COMPOSITE && typeof id === "string" && id && titleHiddenOf(composite) && !revealedTitles.get().has(id)) revealedTitles.set(new Set(revealedTitles.get()).add(id));
237
+ if (composite.type.name === "typedBlock" && typeof id === "string" && id && titleHiddenOf(composite) && !revealedTitles.get().has(id)) revealedTitles.set(new Set(revealedTitles.get()).add(id));
237
238
  }
238
239
  },
239
- markdownPrepare: (json, editor) => withReferencedFenceIds(json, compositeKindsOf(editor)),
240
+ markdownPrepare: (json, editor) => withReferencedFenceIds(json, blockTypesOf(editor)),
240
241
  addAttributes: () => ({
241
- kind: {
242
+ blockType: {
242
243
  default: DEFAULT_KIND,
243
- parseHTML: (el) => el.getAttribute("data-kind") || null,
244
- renderHTML: (attrs) => ({ "data-kind": attrs.kind })
244
+ parseHTML: (el) => el.getAttribute("data-block-type") || el.getAttribute(OLD_HTML.blockTypeAttr) || null,
245
+ renderHTML: (attrs) => ({ "data-block-type": attrs.blockType })
245
246
  },
246
247
  meta: {
247
248
  default: {},
@@ -256,14 +257,18 @@ const CompositeNode = Node.create({
256
257
  renderHTML: (attrs) => ({ "data-meta": JSON.stringify(attrs.meta) })
257
258
  }
258
259
  }),
259
- parseHTML: () => [{ tag: "section[data-type=\"composite\"]" }, { tag: "section[data-type=\"section\"]" }],
260
+ parseHTML: () => [
261
+ { tag: `section[data-type="${TYPED_BLOCK}"]` },
262
+ { tag: `section[data-type="${OLD_HTML.typedBlock}"]` },
263
+ { tag: `section[data-type="${OLD_HTML.earliestBlock}"]` }
264
+ ],
260
265
  renderHTML: ({ HTMLAttributes }) => [
261
266
  "section",
262
- mergeAttributes(HTMLAttributes, { "data-type": COMPOSITE }),
267
+ mergeAttributes(HTMLAttributes, { "data-type": TYPED_BLOCK }),
263
268
  0
264
269
  ],
265
270
  renderMarkdown: (node, h) => {
266
- const kind = typeof node.attrs?.kind === "string" && node.attrs.kind ? node.attrs.kind : DEFAULT_KIND;
271
+ const kind = typeof node.attrs?.blockType === "string" && node.attrs.blockType ? node.attrs.blockType : DEFAULT_KIND;
267
272
  const meta = node.attrs?.meta;
268
273
  const body = (node.content ?? []).map((child, index) => h.renderChild?.(child, index) ?? h.renderChildren([child])).filter(Boolean).join("\n\n");
269
274
  const id = node.attrs?.id;
@@ -319,7 +324,7 @@ const CompositeNode = Node.create({
319
324
  insertComposite: (kind = DEFAULT_KIND) => ({ state, tr, dispatch }) => {
320
325
  const { $head } = state.selection;
321
326
  let depth = $head.depth;
322
- while (depth > 0 && !["doc", COMPOSITE].includes($head.node(depth - 1).type.name)) depth--;
327
+ while (depth > 0 && !["doc", "typedBlock"].includes($head.node(depth - 1).type.name)) depth--;
323
328
  let from = $head.pos;
324
329
  let to = from;
325
330
  if (depth > 0) {
@@ -341,16 +346,16 @@ const CompositeNode = Node.create({
341
346
  },
342
347
  wrapInComposite: (kind = DEFAULT_KIND) => ({ state, tr, dispatch }) => {
343
348
  const { $from, $to } = state.selection;
344
- const range = $from.blockRange($to, (node) => node.type.name === "doc" || node.type.name === COMPOSITE);
349
+ const range = $from.blockRange($to, (node) => node.type.name === "doc" || node.type.name === "typedBlock");
345
350
  if (!range) return false;
346
- if (range.parent.type.name === COMPOSITE && range.startIndex < CHROME_COUNT) return false;
351
+ if (range.parent.type.name === "typedBlock" && range.startIndex < CHROME_COUNT) return false;
347
352
  if (!range.parent.canReplaceWith(range.startIndex, range.endIndex, this.type)) return false;
348
353
  if (dispatch) {
349
354
  const { nodes } = state.schema;
350
- const composite = this.type.create({ kind }, [
351
- nodes[TITLE].create(),
352
- nodes[DESCRIPTION].create(),
353
- nodes[TAGS].create(),
355
+ const composite = this.type.create({ blockType: kind }, [
356
+ nodes[TYPED_BLOCK_TITLE].create(),
357
+ nodes[TYPED_BLOCK_DESCRIPTION].create(),
358
+ nodes[TYPED_BLOCK_TAGS].create(),
354
359
  ...state.doc.slice(range.start, range.end).content.content
355
360
  ]);
356
361
  tr.replaceWith(range.start, range.end, composite);
@@ -358,14 +363,14 @@ const CompositeNode = Node.create({
358
363
  }
359
364
  return true;
360
365
  },
361
- setCompositeKind: (kind, pos) => ({ state, tr, dispatch }) => {
366
+ changeBlockType: (blockTypeId, pos) => ({ state, tr, dispatch }) => {
362
367
  const found = compositeAt(state, pos);
363
368
  if (!found) return false;
364
369
  if (dispatch) {
365
- const meta = keptMeta(compositeKind(this.options.kinds, kind), found.node.attrs.meta);
370
+ const meta = keptMeta(blockTypeOf(this.options.blockTypes, blockTypeId), found.node.attrs.meta);
366
371
  tr.setNodeMarkup(found.pos, void 0, {
367
372
  ...found.node.attrs,
368
- kind,
373
+ blockType: blockTypeId,
369
374
  meta
370
375
  });
371
376
  }
@@ -400,9 +405,9 @@ const CompositeNode = Node.create({
400
405
  if (!range) return false;
401
406
  const $pos = state.selection.empty ? state.selection.$head : state.selection.$from;
402
407
  let level = 1;
403
- for (let depth = 1; depth <= range.parentDepth; depth++) if ($pos.node(depth).type.name === COMPOSITE) level++;
408
+ for (let depth = 1; depth <= range.parentDepth; depth++) if ($pos.node(depth).type.name === "typedBlock") level++;
404
409
  const { blocks, from, to } = rangeBlocks(range.parent, range.parentStart, range.fromIndex, range.toIndex);
405
- const result = flattenCompositesToHeadings(state.schema, blocks, recursive, level, this.options.kinds);
410
+ const result = flattenCompositesToHeadings(state.schema, blocks, recursive, level, this.options.blockTypes);
406
411
  if (!result) return false;
407
412
  if (dispatch) {
408
413
  tr.replaceWith(from, to, result);
@@ -417,7 +422,7 @@ const CompositeNode = Node.create({
417
422
  Enter: () => {
418
423
  const { $head } = this.editor.state.selection;
419
424
  const type = $head.parent.type.name;
420
- if (type === TITLE || type === DESCRIPTION) {
425
+ if (type === "typedBlockTitle" || type === "typedBlockDescription") {
421
426
  const depth = $head.depth - 1;
422
427
  const composite = $head.node(depth);
423
428
  const start = $head.start(depth);
@@ -437,14 +442,14 @@ const CompositeNode = Node.create({
437
442
  if (!selection.empty || !$head.parent.isTextblock || $head.parentOffset !== 0 || $head.depth < 2) return false;
438
443
  const depth = $head.depth - 1;
439
444
  const composite = $head.node(depth);
440
- if (composite.type.name !== COMPOSITE) return false;
445
+ if (composite.type.name !== "typedBlock") return false;
441
446
  const titleEnd = $head.start(depth) + composite.child(0).nodeSize - 1;
442
447
  const type = $head.parent.type.name;
443
- if (type === DESCRIPTION) return this.editor.commands.command(({ tr }) => {
448
+ if (type === "typedBlockDescription") return this.editor.commands.command(({ tr }) => {
444
449
  tr.setSelection(TextSelection.create(tr.doc, titleEnd));
445
450
  return true;
446
451
  });
447
- if (type === TITLE) {
452
+ if (type === "typedBlockTitle") {
448
453
  if (!isEmptyComposite(composite)) return true;
449
454
  return this.editor.commands.command(({ tr, state }) => {
450
455
  const from = $head.before(depth);
@@ -464,30 +469,37 @@ const CompositeNode = Node.create({
464
469
  const { selection } = this.editor.state;
465
470
  const { $head } = selection;
466
471
  const type = $head.parent.type.name;
467
- return selection.empty && (type === TITLE || type === DESCRIPTION) && $head.parentOffset === $head.parent.content.size;
472
+ return selection.empty && (type === "typedBlockTitle" || type === "typedBlockDescription") && $head.parentOffset === $head.parent.content.size;
468
473
  },
469
474
  "Mod-Shift-a": () => this.editor.commands.insertComposite(DEFAULT_KIND)
470
475
  };
471
476
  }
472
477
  });
473
478
  const CompositeTitleNode = Node.create({
474
- name: TITLE,
479
+ name: TYPED_BLOCK_TITLE,
475
480
  priority: 101,
476
481
  content: "inline*",
477
482
  defining: true,
478
483
  editorChrome: true,
479
484
  abilities: { revokes: CHROME_REVOKES },
480
- parseHTML: () => [{
481
- tag: "h2[data-type=\"composite-title\"]",
482
- priority: 60
483
- }, {
484
- tag: "h2[data-type=\"section-title\"]",
485
- priority: 60
486
- }],
485
+ parseHTML: () => [
486
+ {
487
+ tag: `h2[data-type="${TITLE_DATA_TYPE}"]`,
488
+ priority: 60
489
+ },
490
+ {
491
+ tag: `h2[data-type="${OLD_HTML.title}"]`,
492
+ priority: 60
493
+ },
494
+ {
495
+ tag: `h2[data-type="${OLD_HTML.earliestTitle}"]`,
496
+ priority: 60
497
+ }
498
+ ],
487
499
  renderHTML: ({ HTMLAttributes }) => [
488
500
  "h2",
489
501
  mergeAttributes(HTMLAttributes, {
490
- "data-type": "composite-title",
502
+ "data-type": TITLE_DATA_TYPE,
491
503
  class: "composite-title"
492
504
  }),
493
505
  0
@@ -498,22 +510,29 @@ const CompositeTitleNode = Node.create({
498
510
  }
499
511
  });
500
512
  const CompositeDescriptionNode = Node.create({
501
- name: DESCRIPTION,
513
+ name: TYPED_BLOCK_DESCRIPTION,
502
514
  content: "inline*",
503
515
  defining: true,
504
516
  editorChrome: true,
505
517
  abilities: { revokes: CHROME_REVOKES },
506
- parseHTML: () => [{
507
- tag: "p[data-type=\"composite-description\"]",
508
- priority: 60
509
- }, {
510
- tag: "p[data-type=\"section-summary\"]",
511
- priority: 60
512
- }],
518
+ parseHTML: () => [
519
+ {
520
+ tag: `p[data-type="${DESCRIPTION_DATA_TYPE}"]`,
521
+ priority: 60
522
+ },
523
+ {
524
+ tag: `p[data-type="${OLD_HTML.description}"]`,
525
+ priority: 60
526
+ },
527
+ {
528
+ tag: `p[data-type="${OLD_HTML.earliestDescription}"]`,
529
+ priority: 60
530
+ }
531
+ ],
513
532
  renderHTML: ({ HTMLAttributes }) => [
514
533
  "p",
515
534
  mergeAttributes(HTMLAttributes, {
516
- "data-type": "composite-description",
535
+ "data-type": DESCRIPTION_DATA_TYPE,
517
536
  class: "composite-description"
518
537
  }),
519
538
  0
@@ -524,7 +543,7 @@ const CompositeDescriptionNode = Node.create({
524
543
  }
525
544
  });
526
545
  const CompositeTagsNode = Node.create({
527
- name: TAGS,
546
+ name: TYPED_BLOCK_TAGS,
528
547
  atom: true,
529
548
  selectable: false,
530
549
  draggable: false,
@@ -547,9 +566,13 @@ const CompositeTagsNode = Node.create({
547
566
  },
548
567
  renderHTML: (attrs) => ({ "data-tags": JSON.stringify(attrs.tags) })
549
568
  } }),
550
- parseHTML: () => [{ tag: "div[data-type=\"composite-tags\"]" }, { tag: "div[data-type=\"section-tags\"]" }],
569
+ parseHTML: () => [
570
+ { tag: `div[data-type="${TAGS_DATA_TYPE}"]` },
571
+ { tag: `div[data-type="${OLD_HTML.tags}"]` },
572
+ { tag: `div[data-type="${OLD_HTML.earliestTags}"]` }
573
+ ],
551
574
  renderHTML: ({ HTMLAttributes }) => ["div", mergeAttributes(HTMLAttributes, {
552
- "data-type": "composite-tags",
575
+ "data-type": TAGS_DATA_TYPE,
553
576
  class: "composite-tags"
554
577
  })],
555
578
  renderMarkdown: (node) => {
@@ -558,6 +581,6 @@ const CompositeTagsNode = Node.create({
558
581
  }
559
582
  });
560
583
  //#endregion
561
- export { COMPOSITE_CHROME_COUNT, CompositeDescriptionNode, CompositeNode, CompositeTagsNode, CompositeTitleNode, compositeAround, compositeAt, compositeBasketsOf, compositeJSON, compositeKindsOf };
584
+ export { COMPOSITE_CHROME_COUNT, CompositeDescriptionNode, CompositeNode, CompositeTagsNode, CompositeTitleNode, blockTypesOf, compositeAround, compositeAt, compositeBasketsOf, compositeJSON };
562
585
 
563
586
  //# sourceMappingURL=nodes.js.map