@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,16 +1,16 @@
1
- import { CompositeMetaField } from "../kinds.js";
2
- import { CompositeRow } from "../rows.js";
1
+ import { PropertyDefinition } from "../../../core/properties.js";
2
+ import { BlockProperties } from "../properties.js";
3
3
  import { Editor } from "@tiptap/core";
4
4
  //#region src/features/composites/components/CompositeFieldEditor.vue.d.ts
5
5
  /**
6
- * One meta field of a Baustein as an input that writes through `setCompositeMetaField`. Text-like inputs keep a local
6
+ * One Block property of a block as an input that writes through `setBlockProperty`. Text-like inputs keep a local
7
7
  * draft and commit after typing pauses, on blur and on unmount, so the one-frame-late re-read of the rows never
8
8
  * overwrites what is being typed.
9
9
  */
10
10
  type __VLS_Props = {
11
11
  editor: Editor;
12
- row: CompositeRow;
13
- field: CompositeMetaField;
12
+ row: BlockProperties;
13
+ field: PropertyDefinition;
14
14
  disabled?: boolean;
15
15
  size?: 'xs' | 'sm' | 'md';
16
16
  };
@@ -2,7 +2,8 @@ import { normalizeTagName } from "../../../core/tag-name.js";
2
2
  import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
3
3
  import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
4
4
  import { compositeFieldText, isStructuredField } from "../inspector-model.js";
5
- import _sfc_main$1 from "./CompositeFieldEditor.js";
5
+ import _sfc_main$1 from "./DerivationBadge.js";
6
+ import _sfc_main$2 from "./CompositeFieldEditor.js";
6
7
  import { useCompositeInspector } from "../use-composite-inspector.js";
7
8
  import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, renderSlot, toDisplayString, unref, useId, withCtx } from "vue";
8
9
  //#region src/features/composites/components/CompositeInspector.vue
@@ -45,16 +46,23 @@ const _hoisted_18 = {
45
46
  const _hoisted_19 = ["aria-labelledby"];
46
47
  const _hoisted_20 = ["id"];
47
48
  const _hoisted_21 = ["title"];
48
- const _hoisted_22 = { class: "flex items-center gap-2 border-t border-[var(--sk-border)] pt-3" };
49
- const _hoisted_23 = { class: "text-[var(--sk-muted)]" };
49
+ const _hoisted_22 = {
50
+ key: 0,
51
+ class: "mt-1 text-xs font-semibold uppercase tracking-wide text-[var(--sk-muted)]"
52
+ };
53
+ const _hoisted_23 = {
54
+ key: 3,
55
+ class: "flex items-center gap-2 border-t border-[var(--sk-border)] pt-3"
56
+ };
57
+ const _hoisted_24 = { class: "text-[var(--sk-muted)]" };
50
58
  /**
51
- * Side panel with the metadata of the document *or* of the Baustein under the caret — one at a time — connected to
59
+ * Side panel with the metadata of the document *or* of the Typed block under the caret — one at a time — connected to
52
60
  * `editor`. Fills the height of its container and scrolls on its own; the width comes from the host. Open/close is
53
61
  * the host's business. The `document` slot carries host-provided document facts (title, folder, dates, presence) at
54
62
  * the top of the „Dokument“ section: render them as a `<dl>` with the same grid as below to look native.
55
63
  *
56
- * The „Baustein“ section shows while the caret is in a Baustein of the editor; the „Dokument“ section shows before
57
- * the editor was ever focused, while the caret is in editor text outside any Baustein, and while `documentFocused`.
64
+ * The „Block“ section shows while the caret is in a Typed block of the editor; the „Dokument“ section shows before
65
+ * the editor was ever focused, while the caret is in editor text outside any Typed block, and while `documentFocused`.
58
66
  * `documentFocused`: the host's document-level input (its title field) has the focus. While it is true the panel
59
67
  * shows the „Dokument“ section and keeps showing it after the input blurs, until the caret returns to the editor.
60
68
  */
@@ -68,7 +76,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
68
76
  const props = __props;
69
77
  const { Badge: UBadge, FormField: UFormField, Icon: UIcon, Input: UInput, InputMenu: UInputMenu, Select: USelect, Textarea: UTextarea } = useUiKit();
70
78
  const { t } = useEditorI18n();
71
- const { inspector, section, editable, draft, searchTerm, tagItems, kindOptions, summarized, hasSummary, rows, tags, kinds, mentions, focused } = useCompositeInspector(() => props.editor, () => props.documentFocused);
79
+ const { inspector, section, editable, draft, searchTerm, tagItems, kindOptions, summarized, hasSummary, rows, tags, kinds, mentions, focused, properties, derivation } = useCompositeInspector(() => props.editor, () => props.documentFocused);
72
80
  const uid = useId();
73
81
  const HEX_COLOR = /^#[0-9a-f]{3,8}$/i;
74
82
  const mentionStyle = (color) => ({ "--mention-color": color && HEX_COLOR.test(color) ? color : "var(--sk-primary)" });
@@ -132,124 +140,127 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
132
140
  style: { background: "var(--mention-color)" }
133
141
  }, null, -1)), createElementVNode("span", _hoisted_17, "@" + toDisplayString(mention.label), 1)], 4);
134
142
  }), 128))])) : (openBlock(), createElementBlock("dd", _hoisted_18, toDisplayString(unref(t)("composites.inspector.none")), 1))
135
- ])])], 8, _hoisted_2)) : unref(focused) ? (openBlock(), createElementBlock("section", {
143
+ ])])], 8, _hoisted_2)) : unref(focused) || unref(properties) ? (openBlock(), createElementBlock("section", {
136
144
  key: 1,
137
145
  class: "flex-1 p-4",
138
146
  "aria-labelledby": `${unref(uid)}-composite`
139
147
  }, [createElementVNode("h2", {
140
148
  id: `${unref(uid)}-composite`,
141
149
  class: "mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]"
142
- }, toDisplayString(unref(t)("composites.inspector.composite")), 9, _hoisted_20), (openBlock(), createElementBlock("div", {
143
- key: unref(focused).key,
150
+ }, toDisplayString(unref(focused) ? unref(t)("composites.inspector.composite") : unref(t)("composites.inspector.properties")), 9, _hoisted_20), (openBlock(), createElementBlock("div", {
151
+ key: unref(focused)?.key ?? unref(properties)?.key,
144
152
  class: "flex flex-col gap-3"
145
153
  }, [
146
- createVNode(unref(UFormField), {
147
- label: unref(t)("composites.inspector.kind"),
148
- size: "sm"
149
- }, {
150
- default: withCtx(() => [createVNode(unref(USelect), {
151
- "model-value": unref(focused).kind,
152
- items: unref(kindOptions),
153
- size: "sm",
154
- class: "w-full",
155
- "aria-label": unref(t)("composites.kind.select"),
156
- disabled: !unref(editable),
157
- "onUpdate:modelValue": onKind
158
- }, null, 8, [
159
- "model-value",
160
- "items",
161
- "aria-label",
162
- "disabled"
163
- ])]),
164
- _: 1
165
- }, 8, ["label"]),
166
- createVNode(unref(UFormField), {
167
- label: unref(t)("composites.inspector.title"),
168
- size: "sm",
169
- help: unref(editable) ? unref(t)("composites.inspector.titleHelp") : void 0
170
- }, {
171
- default: withCtx(() => [createElementVNode("p", {
172
- class: normalizeClass(["min-h-6 truncate leading-6", unref(focused).title ? "text-[var(--sk-fg-highlighted)]" : "text-[var(--sk-fg-dimmed)]"]),
173
- title: unref(focused).title
174
- }, toDisplayString(unref(focused).title || unref(t)("composites.inspector.untitled")), 11, _hoisted_21)]),
175
- _: 1
176
- }, 8, ["label", "help"]),
177
- createVNode(unref(UFormField), {
178
- label: unref(t)("composites.inspector.description"),
179
- size: "sm",
180
- help: unref(focused).descriptionTextOnly ? void 0 : unref(t)("composites.inspector.descriptionHelp")
181
- }, {
182
- default: withCtx(() => [createVNode(unref(UTextarea), {
183
- "model-value": unref(draft),
184
- autoresize: "",
185
- rows: 3,
186
- maxrows: 10,
154
+ unref(focused) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
155
+ createVNode(unref(UFormField), {
156
+ label: unref(t)("composites.inspector.kind"),
157
+ size: "sm"
158
+ }, {
159
+ default: withCtx(() => [createVNode(unref(USelect), {
160
+ "model-value": unref(focused).kind,
161
+ items: unref(kindOptions),
162
+ size: "sm",
163
+ class: "w-full",
164
+ "aria-label": unref(t)("composites.kind.select"),
165
+ disabled: !unref(editable),
166
+ "onUpdate:modelValue": onKind
167
+ }, null, 8, [
168
+ "model-value",
169
+ "items",
170
+ "aria-label",
171
+ "disabled"
172
+ ])]),
173
+ _: 1
174
+ }, 8, ["label"]),
175
+ createVNode(unref(UFormField), {
176
+ label: unref(t)("composites.inspector.title"),
187
177
  size: "sm",
188
- class: "w-full",
189
- placeholder: unref(t)("composites.inspector.description"),
190
- "aria-label": unref(t)("composites.inspector.description"),
191
- readonly: !unref(editable) || !unref(focused).descriptionTextOnly,
192
- "onUpdate:modelValue": onDescriptionInput,
193
- onBlur: unref(inspector).blurDescription
194
- }, null, 8, [
195
- "model-value",
196
- "placeholder",
197
- "aria-label",
198
- "readonly",
199
- "onBlur"
200
- ])]),
201
- _: 1
202
- }, 8, ["label", "help"]),
203
- unref(focused).tagsVisible ? (openBlock(), createBlock(unref(UFormField), {
204
- key: 0,
205
- label: unref(t)("composites.tags.label"),
206
- size: "sm"
207
- }, {
208
- default: withCtx(() => [createCommentVNode(" `position` is required in the object form: InputMenu renders the create row only for 'top' or 'bottom'. "), createVNode(unref(UInputMenu), {
209
- "search-term": unref(searchTerm),
210
- multiple: "",
211
- "create-item": {
212
- position: "bottom",
213
- when: "always"
214
- },
215
- "model-value": unref(focused).tags,
216
- items: unref(tagItems),
217
- "ignore-filter": "",
218
- placeholder: unref(t)("composites.tags.label"),
219
- "aria-label": unref(t)("composites.tags.label"),
178
+ help: unref(editable) ? unref(t)("composites.inspector.titleHelp") : void 0
179
+ }, {
180
+ default: withCtx(() => [createElementVNode("p", {
181
+ class: normalizeClass(["min-h-6 truncate leading-6", unref(focused).title ? "text-[var(--sk-fg-highlighted)]" : "text-[var(--sk-fg-dimmed)]"]),
182
+ title: unref(focused).title
183
+ }, toDisplayString(unref(focused).title || unref(t)("composites.inspector.untitled")), 11, _hoisted_21)]),
184
+ _: 1
185
+ }, 8, ["label", "help"]),
186
+ createVNode(unref(UFormField), {
187
+ label: unref(t)("composites.inspector.description"),
220
188
  size: "sm",
221
- icon: "i-lucide-hash",
222
- class: "w-full",
223
- disabled: !unref(editable),
224
- "onUpdate:modelValue": onTags,
225
- "onUpdate:searchTerm": unref(inspector).setSearchTerm,
226
- "onUpdate:open": _cache[0] || (_cache[0] = (isOpen) => isOpen && unref(inspector).searchTags()),
227
- onCreate: unref(inspector).createTag
189
+ help: unref(focused).descriptionTextOnly ? void 0 : unref(t)("composites.inspector.descriptionHelp")
228
190
  }, {
229
- "create-item-label": withCtx(({ item }) => [createTextVNode(toDisplayString(unref(t)("composites.tags.create", { tag: unref(normalizeTagName)(item) || item })), 1)]),
191
+ default: withCtx(() => [createVNode(unref(UTextarea), {
192
+ "model-value": unref(draft),
193
+ autoresize: "",
194
+ rows: 3,
195
+ maxrows: 10,
196
+ size: "sm",
197
+ class: "w-full",
198
+ placeholder: unref(t)("composites.inspector.description"),
199
+ "aria-label": unref(t)("composites.inspector.description"),
200
+ readonly: !unref(editable) || !unref(focused).descriptionTextOnly,
201
+ "onUpdate:modelValue": onDescriptionInput,
202
+ onBlur: unref(inspector).blurDescription
203
+ }, null, 8, [
204
+ "model-value",
205
+ "placeholder",
206
+ "aria-label",
207
+ "readonly",
208
+ "onBlur"
209
+ ])]),
230
210
  _: 1
231
- }, 8, [
232
- "search-term",
233
- "model-value",
234
- "items",
235
- "placeholder",
236
- "aria-label",
237
- "disabled",
238
- "onUpdate:searchTerm",
239
- "onCreate"
240
- ])]),
241
- _: 1
242
- }, 8, ["label"])) : createCommentVNode("v-if", true),
243
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(focused).fields, (field) => {
211
+ }, 8, ["label", "help"]),
212
+ unref(focused).tagsVisible ? (openBlock(), createBlock(unref(UFormField), {
213
+ key: 0,
214
+ label: unref(t)("composites.tags.label"),
215
+ size: "sm"
216
+ }, {
217
+ default: withCtx(() => [createCommentVNode(" `position` is required in the object form: InputMenu renders the create row only for 'top' or 'bottom'. "), createVNode(unref(UInputMenu), {
218
+ "search-term": unref(searchTerm),
219
+ multiple: "",
220
+ "create-item": {
221
+ position: "bottom",
222
+ when: "always"
223
+ },
224
+ "model-value": unref(focused).tags,
225
+ items: unref(tagItems),
226
+ "ignore-filter": "",
227
+ placeholder: unref(t)("composites.tags.label"),
228
+ "aria-label": unref(t)("composites.tags.label"),
229
+ size: "sm",
230
+ icon: "i-lucide-hash",
231
+ class: "w-full",
232
+ disabled: !unref(editable),
233
+ "onUpdate:modelValue": onTags,
234
+ "onUpdate:searchTerm": unref(inspector).setSearchTerm,
235
+ "onUpdate:open": _cache[0] || (_cache[0] = (isOpen) => isOpen && unref(inspector).searchTags()),
236
+ onCreate: unref(inspector).createTag
237
+ }, {
238
+ "create-item-label": withCtx(({ item }) => [createTextVNode(toDisplayString(unref(t)("composites.tags.create", { tag: unref(normalizeTagName)(item) || item })), 1)]),
239
+ _: 1
240
+ }, 8, [
241
+ "search-term",
242
+ "model-value",
243
+ "items",
244
+ "placeholder",
245
+ "aria-label",
246
+ "disabled",
247
+ "onUpdate:searchTerm",
248
+ "onCreate"
249
+ ])]),
250
+ _: 1
251
+ }, 8, ["label"])) : createCommentVNode("v-if", true)
252
+ ], 64)) : createCommentVNode("v-if", true),
253
+ createCommentVNode(" Block properties: any block that has the `properties` capability, driven by the definitions of its Block type. "),
254
+ unref(properties) && unref(properties).definitions.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [unref(focused) ? (openBlock(), createElementBlock("h3", _hoisted_22, toDisplayString(unref(t)("composites.inspector.properties")), 1)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(properties).definitions, (field) => {
244
255
  return openBlock(), createBlock(unref(UFormField), {
245
256
  key: field.key,
246
257
  label: field.label,
247
258
  size: "sm"
248
259
  }, {
249
- default: withCtx(() => [createCommentVNode(" Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. "), unref(isStructuredField)(field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.editor ? (openBlock(), createBlock(_sfc_main$1, {
260
+ default: withCtx(() => [createCommentVNode(" Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. "), unref(isStructuredField)(field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [__props.editor ? (openBlock(), createBlock(_sfc_main$2, {
250
261
  key: 0,
251
262
  editor: __props.editor,
252
- row: unref(focused),
263
+ row: unref(properties),
253
264
  field,
254
265
  disabled: !unref(editable)
255
266
  }, null, 8, [
@@ -259,7 +270,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
259
270
  "disabled"
260
271
  ])) : createCommentVNode("v-if", true)], 64)) : field.type === "select" ? (openBlock(), createBlock(unref(USelect), {
261
272
  key: 1,
262
- "model-value": unref(compositeFieldText)(unref(focused), field) || void 0,
273
+ "model-value": unref(compositeFieldText)(unref(properties), field) || void 0,
263
274
  items: field.options ?? [],
264
275
  "aria-label": field.label,
265
276
  placeholder: "–",
@@ -275,7 +286,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
275
286
  "onUpdate:modelValue"
276
287
  ])) : field.type === "textarea" ? (openBlock(), createBlock(unref(UTextarea), {
277
288
  key: 2,
278
- "model-value": unref(compositeFieldText)(unref(focused), field),
289
+ "model-value": unref(compositeFieldText)(unref(properties), field),
279
290
  "aria-label": field.label,
280
291
  autoresize: "",
281
292
  rows: 2,
@@ -291,7 +302,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
291
302
  "onUpdate:modelValue"
292
303
  ])) : (openBlock(), createBlock(unref(UInput), {
293
304
  key: 3,
294
- "model-value": unref(compositeFieldText)(unref(focused), field),
305
+ "model-value": unref(compositeFieldText)(unref(properties), field),
295
306
  type: field.type,
296
307
  "aria-label": field.label,
297
308
  size: "sm",
@@ -307,15 +318,27 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
307
318
  ]))]),
308
319
  _: 2
309
320
  }, 1032, ["label"]);
310
- }), 128)),
311
- createElementVNode("div", _hoisted_22, [
321
+ }), 128))], 64)) : createCommentVNode("v-if", true),
322
+ createCommentVNode(" The Derivation of a Derived block whose Block type has no `derivation` definition (that one shows above): any block with the `derived` capability. "),
323
+ unref(derivation) && __props.editor ? (openBlock(), createBlock(unref(UFormField), {
324
+ key: 2,
325
+ label: unref(t)("composites.inspector.derivation"),
326
+ size: "sm"
327
+ }, {
328
+ default: withCtx(() => [createVNode(_sfc_main$1, {
329
+ editor: __props.editor,
330
+ node: unref(derivation).node
331
+ }, null, 8, ["editor", "node"])]),
332
+ _: 1
333
+ }, 8, ["label"])) : createCommentVNode("v-if", true),
334
+ unref(focused) ? (openBlock(), createElementBlock("div", _hoisted_23, [
312
335
  createVNode(unref(UIcon), {
313
336
  name: "i-lucide-sparkles",
314
337
  class: "size-4 shrink-0 text-[var(--sk-muted)]"
315
338
  }),
316
- createElementVNode("span", _hoisted_23, toDisplayString(unref(t)("composites.inspector.aiStatus")), 1),
339
+ createElementVNode("span", _hoisted_24, toDisplayString(unref(t)("composites.inspector.aiStatus")), 1),
317
340
  createElementVNode("span", { class: normalizeClass(["ml-auto inline-flex items-center gap-1.5", unref(hasSummary) ? "text-[var(--sk-fg-highlighted)]" : "text-[var(--sk-fg-dimmed)]"]) }, [createElementVNode("span", { class: normalizeClass(["size-2 rounded-full", unref(hasSummary) ? "bg-[var(--sk-success)]" : "bg-[var(--sk-bg-accented)]"]) }, null, 2), createTextVNode(" " + toDisplayString(unref(hasSummary) ? unref(t)("composites.inspector.summaryPresent") : unref(t)("composites.inspector.summaryMissing")), 1)], 2)
318
- ])
341
+ ])) : createCommentVNode("v-if", true)
319
342
  ]))], 8, _hoisted_19)) : createCommentVNode("v-if", true)], 8, _hoisted_1);
320
343
  };
321
344
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeInspector.js","names":["_openBlock","_createElementBlock","_unref","_createElementVNode","_toDisplayString","_renderSlot","_Fragment","_renderList","_createVNode","_createBlock","_normalizeStyle","_withCtx","_normalizeClass","_createCommentVNode","_createTextVNode","CompositeFieldEditor"],"sources":["../../../../src/features/composites/components/CompositeInspector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { useId } from 'vue'\nimport { normalizeTagName } from '../../../core/tag-name'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { compositeFieldText, isStructuredField } from '../inspector-model'\nimport { useCompositeInspector } from '../use-composite-inspector'\nimport CompositeFieldEditor from './CompositeFieldEditor.vue'\n\n/**\n * Side panel with the metadata of the document *or* of the Baustein under the caret — one at a time — connected to\n * `editor`. Fills the height of its container and scrolls on its own; the width comes from the host. Open/close is\n * the host's business. The `document` slot carries host-provided document facts (title, folder, dates, presence) at\n * the top of the „Dokument“ section: render them as a `<dl>` with the same grid as below to look native.\n *\n * The „Baustein“ section shows while the caret is in a Baustein of the editor; the „Dokument“ section shows before\n * the editor was ever focused, while the caret is in editor text outside any Baustein, and while `documentFocused`.\n * `documentFocused`: the host's document-level input (its title field) has the focus. While it is true the panel\n * shows the „Dokument“ section and keeps showing it after the input blurs, until the caret returns to the editor.\n */\nconst props = defineProps<{ editor?: Editor, documentFocused?: boolean }>()\n\nconst { Badge: UBadge, FormField: UFormField, Icon: UIcon, Input: UInput, InputMenu: UInputMenu, Select: USelect, Textarea: UTextarea } = useUiKit()\nconst { t } = useEditorI18n()\n\ndefineSlots<{\n /** Document facts known to the host only, rendered above the facts derived from the editor. */\n document?: () => unknown\n}>()\n\nconst { inspector, section, editable, draft, searchTerm, tagItems, kindOptions, summarized, hasSummary, rows, tags, kinds, mentions, focused } = useCompositeInspector(() => props.editor, () => props.documentFocused)\n\nconst uid = useId()\n\nconst HEX_COLOR = /^#[0-9a-f]{3,8}$/i\n// Same tint as the chip in the document (`--mention-color`), only invalid colors fall back to the primary color.\nconst mentionStyle = (color: string | null) => ({ '--mention-color': color && HEX_COLOR.test(color) ? color : 'var(--sk-primary)' })\n\n// The Nuxt UI inputs emit loosely typed values; the model takes strings.\nfunction onKind(kind: unknown) {\n if (typeof kind === 'string') inspector.value.setKind(kind)\n}\n\nfunction onDescriptionInput(value: unknown) {\n inspector.value.inputDescription(typeof value === 'string' ? value : '')\n}\n\nfunction onTags(value: unknown) {\n inspector.value.setTags(Array.isArray(value) ? value.filter((tag): tag is string => typeof tag === 'string') : [])\n}\n</script>\n\n<template>\n <aside class=\"flex h-full min-h-0 flex-col overflow-y-auto text-sm\" :aria-label=\"t('composites.inspector.label')\">\n <section v-if=\"section === 'document'\" class=\"flex-1 p-4\" :aria-labelledby=\"`${uid}-document`\">\n <h2 :id=\"`${uid}-document`\" class=\"mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]\">\n {{ t('composites.inspector.document') }}\n </h2>\n <div class=\"flex flex-col gap-y-2\">\n <slot name=\"document\" />\n <dl class=\"grid grid-cols-[6.5rem_minmax(0,1fr)] items-start gap-x-3 gap-y-2\">\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.inspector.composites') }}\n </dt>\n <dd v-if=\"kinds.length\" class=\"m-0 flex min-w-0 flex-col gap-y-1\">\n <span v-for=\"kind in kinds\" :key=\"kind.id\" class=\"flex min-h-6 min-w-0 items-center gap-2\">\n <UIcon :name=\"kind.icon\" class=\"size-4 shrink-0 text-[var(--sk-muted)]\" />\n <span class=\"min-w-0 flex-1 truncate text-[var(--sk-fg-highlighted)]\">{{ kind.label }}</span>\n <span class=\"tabular-nums text-[var(--sk-muted)]\">{{ kind.count }}</span>\n </span>\n <span class=\"min-h-6 leading-6 tabular-nums text-[var(--sk-muted)]\">\n {{ t('composites.inspector.summarized', { n: summarized, total: rows.length }) }}\n </span>\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.tags.label') }}\n </dt>\n <dd v-if=\"tags.length\" class=\"m-0 flex min-w-0 flex-wrap items-center gap-1\">\n <UBadge v-for=\"tag in tags\" :key=\"tag\" color=\"neutral\" variant=\"subtle\" size=\"sm\" :label=\"`#${tag}`\" class=\"max-w-full\" />\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.inspector.mentions') }}\n </dt>\n <dd v-if=\"mentions.length\" class=\"m-0 flex min-w-0 flex-wrap items-center gap-1\">\n <span\n v-for=\"mention in mentions\"\n :key=\"mention.id\"\n class=\"inline-flex max-w-full items-center gap-1.5 truncate rounded-sm px-1.5 py-0.5 text-xs font-medium text-[var(--sk-fg-highlighted)]\"\n :style=\"[mentionStyle(mention.color), { background: 'color-mix(in oklab, var(--mention-color) 15%, transparent)' }]\"\n >\n <span class=\"size-1.5 shrink-0 rounded-full\" :style=\"{ background: 'var(--mention-color)' }\" />\n <span class=\"truncate\">@{{ mention.label }}</span>\n </span>\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n </dl>\n </div>\n </section>\n <section v-else-if=\"focused\" class=\"flex-1 p-4\" :aria-labelledby=\"`${uid}-composite`\">\n <h2 :id=\"`${uid}-composite`\" class=\"mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]\">\n {{ t('composites.inspector.composite') }}\n </h2>\n\n <div :key=\"focused.key\" class=\"flex flex-col gap-3\">\n <UFormField :label=\"t('composites.inspector.kind')\" size=\"sm\">\n <USelect\n :model-value=\"focused.kind\"\n :items=\"kindOptions\"\n size=\"sm\"\n class=\"w-full\"\n :aria-label=\"t('composites.kind.select')\"\n :disabled=\"!editable\"\n @update:model-value=\"onKind\"\n />\n </UFormField>\n\n <UFormField :label=\"t('composites.inspector.title')\" size=\"sm\" :help=\"editable ? t('composites.inspector.titleHelp') : undefined\">\n <p class=\"min-h-6 truncate leading-6\" :class=\"focused.title ? 'text-[var(--sk-fg-highlighted)]' : 'text-[var(--sk-fg-dimmed)]'\" :title=\"focused.title\">\n {{ focused.title || t('composites.inspector.untitled') }}\n </p>\n </UFormField>\n\n <UFormField\n :label=\"t('composites.inspector.description')\"\n size=\"sm\"\n :help=\"focused.descriptionTextOnly ? undefined : t('composites.inspector.descriptionHelp')\"\n >\n <UTextarea\n :model-value=\"draft\"\n autoresize\n :rows=\"3\"\n :maxrows=\"10\"\n size=\"sm\"\n class=\"w-full\"\n :placeholder=\"t('composites.inspector.description')\"\n :aria-label=\"t('composites.inspector.description')\"\n :readonly=\"!editable || !focused.descriptionTextOnly\"\n @update:model-value=\"onDescriptionInput\"\n @blur=\"inspector.blurDescription\"\n />\n </UFormField>\n\n <UFormField v-if=\"focused.tagsVisible\" :label=\"t('composites.tags.label')\" size=\"sm\">\n <!-- `position` is required in the object form: InputMenu renders the create row only for 'top' or 'bottom'. -->\n <UInputMenu\n :search-term=\"searchTerm\"\n multiple\n :create-item=\"{ position: 'bottom', when: 'always' }\"\n :model-value=\"focused.tags\"\n :items=\"tagItems\"\n ignore-filter\n :placeholder=\"t('composites.tags.label')\"\n :aria-label=\"t('composites.tags.label')\"\n size=\"sm\"\n icon=\"i-lucide-hash\"\n class=\"w-full\"\n :disabled=\"!editable\"\n @update:model-value=\"onTags\"\n @update:search-term=\"inspector.setSearchTerm\"\n @update:open=\"(isOpen: boolean) => isOpen && inspector.searchTags()\"\n @create=\"inspector.createTag\"\n >\n <template #create-item-label=\"{ item }: { item: string }\">\n {{ t('composites.tags.create', { tag: normalizeTagName(item) || item }) }}\n </template>\n </UInputMenu>\n </UFormField>\n\n <UFormField v-for=\"field in focused.fields\" :key=\"field.key\" :label=\"field.label\" size=\"sm\">\n <!-- Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. -->\n <template v-if=\"isStructuredField(field)\">\n <CompositeFieldEditor\n v-if=\"editor\"\n :editor=\"editor\"\n :row=\"focused\"\n :field=\"field\"\n :disabled=\"!editable\"\n />\n </template>\n <USelect\n v-else-if=\"field.type === 'select'\"\n :model-value=\"compositeFieldText(focused, field) || undefined\"\n :items=\"field.options ?? []\"\n :aria-label=\"field.label\"\n placeholder=\"–\"\n size=\"sm\"\n class=\"w-full\"\n :disabled=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n <UTextarea\n v-else-if=\"field.type === 'textarea'\"\n :model-value=\"compositeFieldText(focused, field)\"\n :aria-label=\"field.label\"\n autoresize\n :rows=\"2\"\n :maxrows=\"8\"\n size=\"sm\"\n class=\"w-full\"\n :readonly=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n <UInput\n v-else\n :model-value=\"compositeFieldText(focused, field)\"\n :type=\"field.type\"\n :aria-label=\"field.label\"\n size=\"sm\"\n class=\"w-full\"\n :readonly=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n </UFormField>\n\n <div class=\"flex items-center gap-2 border-t border-[var(--sk-border)] pt-3\">\n <UIcon name=\"i-lucide-sparkles\" class=\"size-4 shrink-0 text-[var(--sk-muted)]\" />\n <span class=\"text-[var(--sk-muted)]\">{{ t('composites.inspector.aiStatus') }}</span>\n <span class=\"ml-auto inline-flex items-center gap-1.5\" :class=\"hasSummary ? 'text-[var(--sk-fg-highlighted)]' : 'text-[var(--sk-fg-dimmed)]'\">\n <span class=\"size-2 rounded-full\" :class=\"hasSummary ? 'bg-[var(--sk-success)]' : 'bg-[var(--sk-bg-accented)]'\" />\n {{ hasSummary ? t('composites.inspector.summaryPresent') : t('composites.inspector.summaryMissing') }}\n </span>\n </div>\n </div>\n </section>\n </aside>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBA,MAAM,QAAQ;EAEd,MAAM,EAAE,OAAO,QAAQ,WAAW,YAAY,MAAM,OAAO,OAAO,QAAQ,WAAW,YAAY,QAAQ,SAAS,UAAU,cAAc,SAAS;EACnJ,MAAM,EAAE,MAAM,cAAc;EAO5B,MAAM,EAAE,WAAW,SAAS,UAAU,OAAO,YAAY,UAAU,aAAa,YAAY,YAAY,MAAM,MAAM,OAAO,UAAU,YAAY,4BAA4B,MAAM,cAAc,MAAM,eAAe;EAEtN,MAAM,MAAM,MAAM;EAElB,MAAM,YAAY;EAElB,MAAM,gBAAgB,WAA0B,EAAE,mBAAmB,SAAS,UAAU,KAAK,KAAK,IAAI,QAAQ,oBAAoB;EAGlI,SAAS,OAAO,MAAe;GAC7B,IAAI,OAAO,SAAS,UAAU,UAAU,MAAM,QAAQ,IAAI;EAC5D;EAEA,SAAS,mBAAmB,OAAgB;GAC1C,UAAU,MAAM,iBAAiB,OAAO,UAAU,WAAW,QAAQ,EAAE;EACz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I,cADvBF,UAAA,GAAAS,YAWEP,MAAA,SAAA,GAAA;;OATC,eAAaA,MAAA,kBAAA,CAAkB,CAACA,MAAA,OAAA,GAAS,KAAK;OAC9C,cAAY,MAAM;OACnB,YAAA;OACC,MAAM;OACN,SAAS;OACV,MAAK;OACL,OAAM;OACL,UAAQ,CAAGA,MAAA,QAAA;OACX,wBAAqB,UAAmBA,MAAA,SAAA,CAAS,CAAC,SAAS,OAAO,KAAK;;;;;;MAE1E,CAAA,MAAAF,UAAA,GAAAS,YASEP,MAAA,MAAA,GAAA;;OAPC,eAAaA,MAAA,kBAAA,CAAkB,CAACA,MAAA,OAAA,GAAS,KAAK;OAC9C,MAAM,MAAM;OACZ,cAAY,MAAM;OACnB,MAAK;OACL,OAAM;OACL,UAAQ,CAAGA,MAAA,QAAA;OACX,wBAAqB,UAAmBA,MAAA,SAAA,CAAS,CAAC,SAAS,OAAO,KAAK;;;;;;;;;;;IAI5EC,mBAOM,OAPN,aAOM;KANJK,YAAiFN,MAAA,KAAA,GAAA;MAA1E,MAAK;MAAoB,OAAM;;KACtCC,mBAAoF,QAApF,aAAoFC,gBAA5CF,MAAA,CAAA,CAAC,CAAA,+BAAA,CAAA,GAAA,CAAA;KACzCC,mBAGO,QAAA,EAHD,OAAKS,eAAA,CAAC,4CAAmDV,MAAA,UAAA,IAAU,oCAAA,4BAAA,CAAA,EAAA,GACvE,CAAAC,mBAAkH,QAAA,EAA5G,OAAKS,eAAA,CAAC,uBAA8BV,MAAA,UAAA,IAAU,2BAAA,4BAAA,CAAA,EAAA,GAAA,MAAA,CAA8D,GAAAY,gBAAA,MAClHV,gBAAGF,MAAA,UAAA,IAAaA,MAAA,CAAA,CAAC,CAAA,qCAAA,IAA0CA,MAAA,CAAA,CAAC,CAAA,qCAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"CompositeInspector.js","names":["_openBlock","_createElementBlock","_unref","_createElementVNode","_toDisplayString","_renderSlot","_Fragment","_renderList","_createVNode","_createBlock","_normalizeStyle","_withCtx","_normalizeClass","_createCommentVNode","_createTextVNode","CompositeFieldEditor","DerivationBadge"],"sources":["../../../../src/features/composites/components/CompositeInspector.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { useId } from 'vue'\nimport { normalizeTagName } from '../../../core/tag-name'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { compositeFieldText, isStructuredField } from '../inspector-model'\nimport { useCompositeInspector } from '../use-composite-inspector'\nimport CompositeFieldEditor from './CompositeFieldEditor.vue'\nimport DerivationBadge from './DerivationBadge.vue'\n\n/**\n * Side panel with the metadata of the document *or* of the Typed block under the caret — one at a time — connected to\n * `editor`. Fills the height of its container and scrolls on its own; the width comes from the host. Open/close is\n * the host's business. The `document` slot carries host-provided document facts (title, folder, dates, presence) at\n * the top of the „Dokument“ section: render them as a `<dl>` with the same grid as below to look native.\n *\n * The „Block“ section shows while the caret is in a Typed block of the editor; the „Dokument“ section shows before\n * the editor was ever focused, while the caret is in editor text outside any Typed block, and while `documentFocused`.\n * `documentFocused`: the host's document-level input (its title field) has the focus. While it is true the panel\n * shows the „Dokument“ section and keeps showing it after the input blurs, until the caret returns to the editor.\n */\nconst props = defineProps<{ editor?: Editor, documentFocused?: boolean }>()\n\nconst { Badge: UBadge, FormField: UFormField, Icon: UIcon, Input: UInput, InputMenu: UInputMenu, Select: USelect, Textarea: UTextarea } = useUiKit()\nconst { t } = useEditorI18n()\n\ndefineSlots<{\n /** Document facts known to the host only, rendered above the facts derived from the editor. */\n document?: () => unknown\n}>()\n\nconst { inspector, section, editable, draft, searchTerm, tagItems, kindOptions, summarized, hasSummary, rows, tags, kinds, mentions, focused, properties, derivation } = useCompositeInspector(() => props.editor, () => props.documentFocused)\n\nconst uid = useId()\n\nconst HEX_COLOR = /^#[0-9a-f]{3,8}$/i\n// Same tint as the chip in the document (`--mention-color`), only invalid colors fall back to the primary color.\nconst mentionStyle = (color: string | null) => ({ '--mention-color': color && HEX_COLOR.test(color) ? color : 'var(--sk-primary)' })\n\n// The Nuxt UI inputs emit loosely typed values; the model takes strings.\nfunction onKind(kind: unknown) {\n if (typeof kind === 'string') inspector.value.setKind(kind)\n}\n\nfunction onDescriptionInput(value: unknown) {\n inspector.value.inputDescription(typeof value === 'string' ? value : '')\n}\n\nfunction onTags(value: unknown) {\n inspector.value.setTags(Array.isArray(value) ? value.filter((tag): tag is string => typeof tag === 'string') : [])\n}\n</script>\n\n<template>\n <aside class=\"flex h-full min-h-0 flex-col overflow-y-auto text-sm\" :aria-label=\"t('composites.inspector.label')\">\n <section v-if=\"section === 'document'\" class=\"flex-1 p-4\" :aria-labelledby=\"`${uid}-document`\">\n <h2 :id=\"`${uid}-document`\" class=\"mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]\">\n {{ t('composites.inspector.document') }}\n </h2>\n <div class=\"flex flex-col gap-y-2\">\n <slot name=\"document\" />\n <dl class=\"grid grid-cols-[6.5rem_minmax(0,1fr)] items-start gap-x-3 gap-y-2\">\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.inspector.composites') }}\n </dt>\n <dd v-if=\"kinds.length\" class=\"m-0 flex min-w-0 flex-col gap-y-1\">\n <span v-for=\"kind in kinds\" :key=\"kind.id\" class=\"flex min-h-6 min-w-0 items-center gap-2\">\n <UIcon :name=\"kind.icon\" class=\"size-4 shrink-0 text-[var(--sk-muted)]\" />\n <span class=\"min-w-0 flex-1 truncate text-[var(--sk-fg-highlighted)]\">{{ kind.label }}</span>\n <span class=\"tabular-nums text-[var(--sk-muted)]\">{{ kind.count }}</span>\n </span>\n <span class=\"min-h-6 leading-6 tabular-nums text-[var(--sk-muted)]\">\n {{ t('composites.inspector.summarized', { n: summarized, total: rows.length }) }}\n </span>\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.tags.label') }}\n </dt>\n <dd v-if=\"tags.length\" class=\"m-0 flex min-w-0 flex-wrap items-center gap-1\">\n <UBadge v-for=\"tag in tags\" :key=\"tag\" color=\"neutral\" variant=\"subtle\" size=\"sm\" :label=\"`#${tag}`\" class=\"max-w-full\" />\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n\n <dt class=\"min-h-6 leading-6 text-[var(--sk-muted)]\">\n {{ t('composites.inspector.mentions') }}\n </dt>\n <dd v-if=\"mentions.length\" class=\"m-0 flex min-w-0 flex-wrap items-center gap-1\">\n <span\n v-for=\"mention in mentions\"\n :key=\"mention.id\"\n class=\"inline-flex max-w-full items-center gap-1.5 truncate rounded-sm px-1.5 py-0.5 text-xs font-medium text-[var(--sk-fg-highlighted)]\"\n :style=\"[mentionStyle(mention.color), { background: 'color-mix(in oklab, var(--mention-color) 15%, transparent)' }]\"\n >\n <span class=\"size-1.5 shrink-0 rounded-full\" :style=\"{ background: 'var(--mention-color)' }\" />\n <span class=\"truncate\">@{{ mention.label }}</span>\n </span>\n </dd>\n <dd v-else class=\"m-0 min-h-6 leading-6 text-[var(--sk-fg-dimmed)]\">\n {{ t('composites.inspector.none') }}\n </dd>\n </dl>\n </div>\n </section>\n <section v-else-if=\"focused || properties\" class=\"flex-1 p-4\" :aria-labelledby=\"`${uid}-composite`\">\n <h2 :id=\"`${uid}-composite`\" class=\"mb-3 text-sm font-semibold text-[var(--sk-fg-highlighted)]\">\n {{ focused ? t('composites.inspector.composite') : t('composites.inspector.properties') }}\n </h2>\n\n <div :key=\"focused?.key ?? properties?.key\" class=\"flex flex-col gap-3\">\n <template v-if=\"focused\">\n <UFormField :label=\"t('composites.inspector.kind')\" size=\"sm\">\n <USelect\n :model-value=\"focused.kind\"\n :items=\"kindOptions\"\n size=\"sm\"\n class=\"w-full\"\n :aria-label=\"t('composites.kind.select')\"\n :disabled=\"!editable\"\n @update:model-value=\"onKind\"\n />\n </UFormField>\n\n <UFormField :label=\"t('composites.inspector.title')\" size=\"sm\" :help=\"editable ? t('composites.inspector.titleHelp') : undefined\">\n <p class=\"min-h-6 truncate leading-6\" :class=\"focused.title ? 'text-[var(--sk-fg-highlighted)]' : 'text-[var(--sk-fg-dimmed)]'\" :title=\"focused.title\">\n {{ focused.title || t('composites.inspector.untitled') }}\n </p>\n </UFormField>\n\n <UFormField\n :label=\"t('composites.inspector.description')\"\n size=\"sm\"\n :help=\"focused.descriptionTextOnly ? undefined : t('composites.inspector.descriptionHelp')\"\n >\n <UTextarea\n :model-value=\"draft\"\n autoresize\n :rows=\"3\"\n :maxrows=\"10\"\n size=\"sm\"\n class=\"w-full\"\n :placeholder=\"t('composites.inspector.description')\"\n :aria-label=\"t('composites.inspector.description')\"\n :readonly=\"!editable || !focused.descriptionTextOnly\"\n @update:model-value=\"onDescriptionInput\"\n @blur=\"inspector.blurDescription\"\n />\n </UFormField>\n\n <UFormField v-if=\"focused.tagsVisible\" :label=\"t('composites.tags.label')\" size=\"sm\">\n <!-- `position` is required in the object form: InputMenu renders the create row only for 'top' or 'bottom'. -->\n <UInputMenu\n :search-term=\"searchTerm\"\n multiple\n :create-item=\"{ position: 'bottom', when: 'always' }\"\n :model-value=\"focused.tags\"\n :items=\"tagItems\"\n ignore-filter\n :placeholder=\"t('composites.tags.label')\"\n :aria-label=\"t('composites.tags.label')\"\n size=\"sm\"\n icon=\"i-lucide-hash\"\n class=\"w-full\"\n :disabled=\"!editable\"\n @update:model-value=\"onTags\"\n @update:search-term=\"inspector.setSearchTerm\"\n @update:open=\"(isOpen: boolean) => isOpen && inspector.searchTags()\"\n @create=\"inspector.createTag\"\n >\n <template #create-item-label=\"{ item }: { item: string }\">\n {{ t('composites.tags.create', { tag: normalizeTagName(item) || item }) }}\n </template>\n </UInputMenu>\n </UFormField>\n </template>\n\n <!-- Block properties: any block that has the `properties` capability, driven by the definitions of its Block type. -->\n <template v-if=\"properties && properties.definitions.length\">\n <h3 v-if=\"focused\" class=\"mt-1 text-xs font-semibold uppercase tracking-wide text-[var(--sk-muted)]\">\n {{ t('composites.inspector.properties') }}\n </h3>\n\n <UFormField v-for=\"field in properties.definitions\" :key=\"field.key\" :label=\"field.label\" size=\"sm\">\n <!-- Fields whose value is not text (reference, bibliography, derivation) have their own editors, as in the details card; a text input would overwrite the stored object with a string. -->\n <template v-if=\"isStructuredField(field)\">\n <CompositeFieldEditor\n v-if=\"editor\"\n :editor=\"editor\"\n :row=\"properties\"\n :field=\"field\"\n :disabled=\"!editable\"\n />\n </template>\n <USelect\n v-else-if=\"field.type === 'select'\"\n :model-value=\"compositeFieldText(properties, field) || undefined\"\n :items=\"field.options ?? []\"\n :aria-label=\"field.label\"\n placeholder=\"–\"\n size=\"sm\"\n class=\"w-full\"\n :disabled=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n <UTextarea\n v-else-if=\"field.type === 'textarea'\"\n :model-value=\"compositeFieldText(properties, field)\"\n :aria-label=\"field.label\"\n autoresize\n :rows=\"2\"\n :maxrows=\"8\"\n size=\"sm\"\n class=\"w-full\"\n :readonly=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n <UInput\n v-else\n :model-value=\"compositeFieldText(properties, field)\"\n :type=\"field.type\"\n :aria-label=\"field.label\"\n size=\"sm\"\n class=\"w-full\"\n :readonly=\"!editable\"\n @update:model-value=\"(value: unknown) => inspector.setField(field, value)\"\n />\n </UFormField>\n </template>\n\n <!-- The Derivation of a Derived block whose Block type has no `derivation` definition (that one shows above): any block with the `derived` capability. -->\n <UFormField v-if=\"derivation && editor\" :label=\"t('composites.inspector.derivation')\" size=\"sm\">\n <DerivationBadge :editor=\"editor\" :node=\"derivation.node\" />\n </UFormField>\n\n <div v-if=\"focused\" class=\"flex items-center gap-2 border-t border-[var(--sk-border)] pt-3\">\n <UIcon name=\"i-lucide-sparkles\" class=\"size-4 shrink-0 text-[var(--sk-muted)]\" />\n <span class=\"text-[var(--sk-muted)]\">{{ t('composites.inspector.aiStatus') }}</span>\n <span class=\"ml-auto inline-flex items-center gap-1.5\" :class=\"hasSummary ? 'text-[var(--sk-fg-highlighted)]' : 'text-[var(--sk-fg-dimmed)]'\">\n <span class=\"size-2 rounded-full\" :class=\"hasSummary ? 'bg-[var(--sk-success)]' : 'bg-[var(--sk-bg-accented)]'\" />\n {{ hasSummary ? t('composites.inspector.summaryPresent') : t('composites.inspector.summaryMissing') }}\n </span>\n </div>\n </div>\n </section>\n </aside>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAEd,MAAM,EAAE,OAAO,QAAQ,WAAW,YAAY,MAAM,OAAO,OAAO,QAAQ,WAAW,YAAY,QAAQ,SAAS,UAAU,cAAc,SAAS;EACnJ,MAAM,EAAE,MAAM,cAAc;EAO5B,MAAM,EAAE,WAAW,SAAS,UAAU,OAAO,YAAY,UAAU,aAAa,YAAY,YAAY,MAAM,MAAM,OAAO,UAAU,SAAS,YAAY,eAAe,4BAA4B,MAAM,cAAc,MAAM,eAAe;EAE9O,MAAM,MAAM,MAAM;EAElB,MAAM,YAAY;EAElB,MAAM,gBAAgB,WAA0B,EAAE,mBAAmB,SAAS,UAAU,KAAK,KAAK,IAAI,QAAQ,oBAAoB;EAGlI,SAAS,OAAO,MAAe;GAC7B,IAAI,OAAO,SAAS,UAAU,UAAU,MAAM,QAAQ,IAAI;EAC5D;EAEA,SAAS,mBAAmB,OAAgB;GAC1C,UAAU,MAAM,iBAAiB,OAAO,UAAU,WAAW,QAAQ,EAAE;EACzE;EAEA,SAAS,OAAO,OAAgB;GAC9B,UAAU,MAAM,QAAQ,MAAM,QAAQ,KAAK,IAAI,MAAM,QAAQ,QAAuB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AAA,OAAA,KAAXF,UAAA,GAAAC,mBAOM,OAPN,aAOM;KANJO,YAAiFN,MAAA,KAAA,GAAA;MAA1E,MAAK;MAAoB,OAAM;;KACtCC,mBAAoF,QAApF,aAAoFC,gBAA5CF,MAAA,CAAA,CAAC,CAAA,+BAAA,CAAA,GAAA,CAAA;KACzCC,mBAGO,QAAA,EAHD,OAAKS,eAAA,CAAC,4CAAmDV,MAAA,UAAA,IAAU,oCAAA,4BAAA,CAAA,EAAA,GACvE,CAAAC,mBAAkH,QAAA,EAA5G,OAAKS,eAAA,CAAC,uBAA8BV,MAAA,UAAA,IAAU,2BAAA,4BAAA,CAAA,EAAA,GAAA,MAAA,CAA8D,GAAAY,gBAAA,MAClHV,gBAAGF,MAAA,UAAA,IAAaA,MAAA,CAAA,CAAC,CAAA,qCAAA,IAA0CA,MAAA,CAAA,CAAC,CAAA,qCAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA"}
@@ -1,13 +1,13 @@
1
1
  import { Editor } from "@tiptap/core";
2
2
  //#region src/features/composites/components/CompositeInspector.vue.d.ts
3
3
  /**
4
- * Side panel with the metadata of the document *or* of the Baustein under the caret — one at a time — connected to
4
+ * Side panel with the metadata of the document *or* of the Typed block under the caret — one at a time — connected to
5
5
  * `editor`. Fills the height of its container and scrolls on its own; the width comes from the host. Open/close is
6
6
  * the host's business. The `document` slot carries host-provided document facts (title, folder, dates, presence) at
7
7
  * the top of the „Dokument“ section: render them as a `<dl>` with the same grid as below to look native.
8
8
  *
9
- * The „Baustein“ section shows while the caret is in a Baustein of the editor; the „Dokument“ section shows before
10
- * the editor was ever focused, while the caret is in editor text outside any Baustein, and while `documentFocused`.
9
+ * The „Block“ section shows while the caret is in a Typed block of the editor; the „Dokument“ section shows before
10
+ * the editor was ever focused, while the caret is in editor text outside any Typed block, and while `documentFocused`.
11
11
  * `documentFocused`: the host's document-level input (its title field) has the focus. While it is true the panel
12
12
  * shows the „Dokument“ section and keeps showing it after the input blurs, until the caret returns to the editor.
13
13
  */
@@ -1,6 +1,6 @@
1
+ import { setBlockProperty } from "../properties.js";
1
2
  import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
2
3
  import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
3
- import { setCompositeMetaField } from "../rows.js";
4
4
  import { rowStatus, statusStyle } from "../meta-display.js";
5
5
  import { computed, createBlock, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
6
6
  //#region src/features/composites/components/CompositeStatusMenu.vue
@@ -25,7 +25,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
25
25
  type: "checkbox",
26
26
  checked: option.value === status.value?.value,
27
27
  onUpdateChecked(checked) {
28
- if (checked) setCompositeMetaField(props.editor, props.row, "status", option.value);
28
+ if (checked) setBlockProperty(props.editor, props.row, "status", option.value);
29
29
  }
30
30
  })));
31
31
  return (_ctx, _cache) => {
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeStatusMenu.js","names":["_openBlock","_createBlock","_unref","_withCtx","_renderSlot"],"sources":["../../../../src/features/composites/components/CompositeStatusMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { computed } from 'vue'\nimport type { DropdownItem } from '../../../vue/kit/types'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { rowStatus, statusStyle } from '../meta-display'\nimport { type CompositeRow, setCompositeMetaField } from '../rows'\n\n/**\n * Quick status change: the default slot (a button) opens a menu of the status field's options. Kinds without a\n * status field render the slot bare.\n */\nconst props = defineProps<{ editor: Editor, row: CompositeRow }>()\n\nconst { DropdownMenu: UDropdownMenu } = useUiKit()\nconst { t } = useEditorI18n()\n\nconst status = computed(() => rowStatus(props.row, t))\n\nconst items = computed<DropdownItem[]>(() => (status.value?.field.options ?? []).map(option => ({\n label: option.label,\n icon: statusStyle(option.value).icon,\n type: 'checkbox',\n checked: option.value === status.value?.value,\n // Checking the current value again would \"uncheck\" it: only a newly chosen value is written.\n onUpdateChecked(checked: boolean) {\n if (checked) setCompositeMetaField(props.editor, props.row, 'status', option.value)\n },\n})))\n</script>\n\n<template>\n <UDropdownMenu v-if=\"status\" :items=\"items\" :content=\"{ side: 'bottom', align: 'start', sideOffset: 4 }\" :ui=\"{ content: 'w-40' }\">\n <slot />\n </UDropdownMenu>\n <slot v-else />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAaA,MAAM,QAAQ;EAEd,MAAM,EAAE,cAAc,kBAAkB,SAAS;EACjD,MAAM,EAAE,MAAM,cAAc;EAE5B,MAAM,SAAS,eAAe,UAAU,MAAM,KAAK,CAAC,CAAC;EAErD,MAAM,QAAQ,gBAAgC,OAAO,OAAO,MAAM,WAAW,CAAC,EAAA,CAAG,KAAI,YAAW;GAC9F,OAAO,OAAO;GACd,MAAM,YAAY,OAAO,KAAK,CAAC,CAAC;GAChC,MAAM;GACN,SAAS,OAAO,UAAU,OAAO,OAAO;GAExC,gBAAgB,SAAkB;IAChC,IAAI,SAAS,sBAAsB,MAAM,QAAQ,MAAM,KAAK,UAAU,OAAO,KAAK;GACpF;EACF,EAAE,CAAC;;GAIoB,OAAA,OAAA,SAArBA,UAAA,GAAAC,YAEgBC,MAAA,aAAA,GAAA;;IAFc,OAAO,MAAA;IAAQ,SAAS;KAAA,MAAA;KAAA,OAAA;KAAA,YAAA;IAAA;IAAoD,IAAI,EAAA,SAAA,OAAA;;IAC5G,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;GAEV,GAAA,GAAA,CAAA,OAAA,CAAA,KAAAA,WAAe,KAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"CompositeStatusMenu.js","names":["_openBlock","_createBlock","_unref","_withCtx","_renderSlot"],"sources":["../../../../src/features/composites/components/CompositeStatusMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { computed } from 'vue'\nimport type { DropdownItem } from '../../../vue/kit/types'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { rowStatus, statusStyle } from '../meta-display'\nimport { setBlockProperty } from '../properties'\nimport type { CompositeRow } from '../rows'\n\n/**\n * Quick status change: the default slot (a button) opens a menu of the status field's options. Kinds without a\n * status field render the slot bare.\n */\nconst props = defineProps<{ editor: Editor, row: CompositeRow }>()\n\nconst { DropdownMenu: UDropdownMenu } = useUiKit()\nconst { t } = useEditorI18n()\n\nconst status = computed(() => rowStatus(props.row, t))\n\nconst items = computed<DropdownItem[]>(() => (status.value?.field.options ?? []).map(option => ({\n label: option.label,\n icon: statusStyle(option.value).icon,\n type: 'checkbox',\n checked: option.value === status.value?.value,\n // Checking the current value again would \"uncheck\" it: only a newly chosen value is written.\n onUpdateChecked(checked: boolean) {\n if (checked) setBlockProperty(props.editor, props.row, 'status', option.value)\n },\n})))\n</script>\n\n<template>\n <UDropdownMenu v-if=\"status\" :items=\"items\" :content=\"{ side: 'bottom', align: 'start', sideOffset: 4 }\" :ui=\"{ content: 'w-40' }\">\n <slot />\n </UDropdownMenu>\n <slot v-else />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAcA,MAAM,QAAQ;EAEd,MAAM,EAAE,cAAc,kBAAkB,SAAS;EACjD,MAAM,EAAE,MAAM,cAAc;EAE5B,MAAM,SAAS,eAAe,UAAU,MAAM,KAAK,CAAC,CAAC;EAErD,MAAM,QAAQ,gBAAgC,OAAO,OAAO,MAAM,WAAW,CAAC,EAAA,CAAG,KAAI,YAAW;GAC9F,OAAO,OAAO;GACd,MAAM,YAAY,OAAO,KAAK,CAAC,CAAC;GAChC,MAAM;GACN,SAAS,OAAO,UAAU,OAAO,OAAO;GAExC,gBAAgB,SAAkB;IAChC,IAAI,SAAS,iBAAiB,MAAM,QAAQ,MAAM,KAAK,UAAU,OAAO,KAAK;GAC/E;EACF,EAAE,CAAC;;GAIoB,OAAA,OAAA,SAArBA,UAAA,GAAAC,YAEgBC,MAAA,aAAA,GAAA;;IAFc,OAAO,MAAA;IAAQ,SAAS;KAAA,MAAA;KAAA,OAAA;KAAA,YAAA;IAAA;IAAoD,IAAI,EAAA,SAAA,OAAA;;IAC5G,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;GAEV,GAAA,GAAA,CAAA,OAAA,CAAA,KAAAA,WAAe,KAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA"}
@@ -9,7 +9,7 @@ const _hoisted_1 = {
9
9
  };
10
10
  const _hoisted_2 = { class: "mt-1 block text-xs text-[var(--sk-fg-dimmed)]" };
11
11
  /**
12
- * The summary (description) of one Baustein as a textarea, written through `setCompositeDescription`. Local draft with
12
+ * The summary (description) of one Typed block as a textarea, written through `setCompositeDescription`. Local draft with
13
13
  * debounced commit, like `CompositeFieldEditor`; refuses to touch a summary that holds formatting or mentions, and
14
14
  * shows plain text while `readonly`.
15
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeSummaryEditor.js","names":["_openBlock","_createBlock","_unref","_createElementBlock","_normalizeClass","_toDisplayString","_createTextVNode","_createElementVNode"],"sources":["../../../../src/features/composites/components/CompositeSummaryEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { type CompositeRow, setCompositeDescription } from '../rows'\n\n/**\n * The summary (description) of one Baustein as a textarea, written through `setCompositeDescription`. Local draft with\n * debounced commit, like `CompositeFieldEditor`; refuses to touch a summary that holds formatting or mentions, and\n * shows plain text while `readonly`.\n */\nconst props = defineProps<{ editor: Editor, row: CompositeRow, readonly?: boolean }>()\n\nconst { Textarea: UTextarea } = useUiKit()\nconst { t } = useEditorI18n()\n\nconst draft = ref(props.row.description)\nconst typing = ref(false)\nlet dirty = false\nlet timer: ReturnType<typeof setTimeout> | undefined\n\nwatch(() => props.row.description, (value) => {\n if (!typing.value && !dirty) draft.value = value\n})\n\nfunction commit() {\n clearTimeout(timer)\n if (!dirty) return\n dirty = false\n if (!props.editor.isDestroyed) setCompositeDescription(props.editor, props.row, draft.value)\n}\n\nfunction onInput(value: unknown) {\n draft.value = typeof value === 'string' ? value : ''\n dirty = true\n clearTimeout(timer)\n timer = setTimeout(commit, 500)\n}\n\nfunction onBlur() {\n typing.value = false\n commit()\n}\n\nonBeforeUnmount(commit)\n</script>\n\n<template>\n <UTextarea\n v-if=\"row.descriptionTextOnly && !readonly\"\n :model-value=\"draft\"\n :placeholder=\"t('composites.summary.placeholder')\"\n :aria-label=\"t('composites.summary.label')\"\n size=\"sm\"\n autoresize\n :rows=\"2\"\n :maxrows=\"6\"\n class=\"w-full\"\n @focus=\"typing = true\"\n @blur=\"onBlur\"\n @update:model-value=\"onInput\"\n />\n <p v-else-if=\"readonly\" :class=\"['text-sm', row.description ? 'text-[var(--sk-fg)]' : 'text-[var(--sk-fg-dimmed)]']\">\n {{ row.description || t('composites.summary.none') }}\n </p>\n <p v-else class=\"text-sm text-[var(--sk-muted)]\">\n {{ row.description }}\n <span class=\"mt-1 block text-xs text-[var(--sk-fg-dimmed)]\">{{ t('composites.summary.formatted') }}</span>\n </p>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAYA,MAAM,QAAQ;EAEd,MAAM,EAAE,UAAU,cAAc,SAAS;EACzC,MAAM,EAAE,MAAM,cAAc;EAE5B,MAAM,QAAQ,IAAI,MAAM,IAAI,WAAW;EACvC,MAAM,SAAS,IAAI,KAAK;EACxB,IAAI,QAAQ;EACZ,IAAI;EAEJ,YAAY,MAAM,IAAI,cAAc,UAAU;GAC5C,IAAI,CAAC,OAAO,SAAS,CAAC,OAAO,MAAM,QAAQ;EAC7C,CAAC;EAED,SAAS,SAAS;GAChB,aAAa,KAAK;GAClB,IAAI,CAAC,OAAO;GACZ,QAAQ;GACR,IAAI,CAAC,MAAM,OAAO,aAAa,wBAAwB,MAAM,QAAQ,MAAM,KAAK,MAAM,KAAK;EAC7F;EAEA,SAAS,QAAQ,OAAgB;GAC/B,MAAM,QAAQ,OAAO,UAAU,WAAW,QAAQ;GAClD,QAAQ;GACR,aAAa,KAAK;GAClB,QAAQ,WAAW,QAAQ,GAAG;EAChC;EAEA,SAAS,SAAS;GAChB,OAAO,QAAQ;GACf,OAAO;EACT;EAEA,gBAAgB,MAAM;;GAKZ,OAAA,QAAA,IAAI,uBAAmB,CAAK,QAAA,YADpCA,UAAA,GAAAC,YAaEC,MAAA,SAAA,GAAA;;IAXC,eAAa,MAAA;IACb,aAAaA,MAAA,CAAA,CAAC,CAAA,gCAAA;IACd,cAAYA,MAAA,CAAA,CAAC,CAAA,0BAAA;IACd,MAAK;IACL,YAAA;IACC,MAAM;IACN,SAAS;IACV,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,QAAM;IACP;IACN,uBAAoB;;;;;GAET,CAAA,KAAA,QAAA,YAAdF,UAAA,GAAAG,mBAEI,KAAA;;IAFqB,OAAKC,eAAA,CAAA,WAAc,QAAA,IAAI,cAAW,wBAAA,4BAAA,CAAA;GACtD,GAAAC,gBAAA,QAAA,IAAI,eAAeH,MAAA,CAAA,CAAC,CAAA,yBAAA,CAAA,GAAA,CAAA,MAEzBF,UAAA,GAAAG,mBAGI,KAHJ,YAGI,CAFCG,gBAAAD,gBAAA,QAAA,IAAI,WAAW,IAAG,KACrB,CAAA,GAAAE,mBAA0G,QAA1G,YAA0GF,gBAA3CH,MAAA,CAAA,CAAC,CAAA,8BAAA,CAAA,GAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"CompositeSummaryEditor.js","names":["_openBlock","_createBlock","_unref","_createElementBlock","_normalizeClass","_toDisplayString","_createTextVNode","_createElementVNode"],"sources":["../../../../src/features/composites/components/CompositeSummaryEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport { type CompositeRow, setCompositeDescription } from '../rows'\n\n/**\n * The summary (description) of one Typed block as a textarea, written through `setCompositeDescription`. Local draft with\n * debounced commit, like `CompositeFieldEditor`; refuses to touch a summary that holds formatting or mentions, and\n * shows plain text while `readonly`.\n */\nconst props = defineProps<{ editor: Editor, row: CompositeRow, readonly?: boolean }>()\n\nconst { Textarea: UTextarea } = useUiKit()\nconst { t } = useEditorI18n()\n\nconst draft = ref(props.row.description)\nconst typing = ref(false)\nlet dirty = false\nlet timer: ReturnType<typeof setTimeout> | undefined\n\nwatch(() => props.row.description, (value) => {\n if (!typing.value && !dirty) draft.value = value\n})\n\nfunction commit() {\n clearTimeout(timer)\n if (!dirty) return\n dirty = false\n if (!props.editor.isDestroyed) setCompositeDescription(props.editor, props.row, draft.value)\n}\n\nfunction onInput(value: unknown) {\n draft.value = typeof value === 'string' ? value : ''\n dirty = true\n clearTimeout(timer)\n timer = setTimeout(commit, 500)\n}\n\nfunction onBlur() {\n typing.value = false\n commit()\n}\n\nonBeforeUnmount(commit)\n</script>\n\n<template>\n <UTextarea\n v-if=\"row.descriptionTextOnly && !readonly\"\n :model-value=\"draft\"\n :placeholder=\"t('composites.summary.placeholder')\"\n :aria-label=\"t('composites.summary.label')\"\n size=\"sm\"\n autoresize\n :rows=\"2\"\n :maxrows=\"6\"\n class=\"w-full\"\n @focus=\"typing = true\"\n @blur=\"onBlur\"\n @update:model-value=\"onInput\"\n />\n <p v-else-if=\"readonly\" :class=\"['text-sm', row.description ? 'text-[var(--sk-fg)]' : 'text-[var(--sk-fg-dimmed)]']\">\n {{ row.description || t('composites.summary.none') }}\n </p>\n <p v-else class=\"text-sm text-[var(--sk-muted)]\">\n {{ row.description }}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AAA,4BAAA,CAAA;GACtD,GAAAC,gBAAA,QAAA,IAAI,eAAeH,MAAA,CAAA,CAAC,CAAA,yBAAA,CAAA,GAAA,CAAA,MAEzBF,UAAA,GAAAG,mBAGI,KAHJ,YAGI,CAFCG,gBAAAD,gBAAA,QAAA,IAAI,WAAW,IAAG,KACrB,CAAA,GAAAE,mBAA0G,QAA1G,YAA0GF,gBAA3CH,MAAA,CAAA,CAAC,CAAA,8BAAA,CAAA,GAAA,CAAA,CAAA,CAAA"}
@@ -2,7 +2,7 @@ import { CompositeRow } from "../rows.js";
2
2
  import { Editor } from "@tiptap/core";
3
3
  //#region src/features/composites/components/CompositeSummaryEditor.vue.d.ts
4
4
  /**
5
- * The summary (description) of one Baustein as a textarea, written through `setCompositeDescription`. Local draft with
5
+ * The summary (description) of one Typed block as a textarea, written through `setCompositeDescription`. Local draft with
6
6
  * debounced commit, like `CompositeFieldEditor`; refuses to touch a summary that holds formatting or mentions, and
7
7
  * shows plain text while `readonly`.
8
8
  */
@@ -1,4 +1,4 @@
1
- import { compositeKindsOf } from "../nodes.js";
1
+ import { blockTypesOf } from "../nodes.js";
2
2
  import { useUiKit } from "../../../vue/kit/use-ui-kit.js";
3
3
  import { useEditorI18n } from "../../../vue/use-editor-i18n.js";
4
4
  import { FILTER_ALL, columnSpecsOf, fieldColumnsOf, fieldOf, fieldText, hasText, isLongText, sortRows, toggled } from "../table-model.js";
@@ -59,7 +59,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
59
59
  rows.value;
60
60
  return props.editor ? {
61
61
  doc: props.editor.state.doc,
62
- kinds: compositeKindsOf(props.editor),
62
+ kinds: blockTypesOf(props.editor),
63
63
  t
64
64
  } : void 0;
65
65
  });