@blokkli/editor 2.0.0-alpha.62 → 2.0.0-alpha.64

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 (312) hide show
  1. package/dist/global/types/blockOptions.d.ts +32 -27
  2. package/dist/global/types/colorOptions.d.ts +16 -0
  3. package/dist/module.d.mts +2 -2
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +275 -18
  6. package/dist/modules/agent/index.d.mts +1 -1
  7. package/dist/modules/agent/index.mjs +2 -1
  8. package/dist/modules/agent/runtime/app/components/Attachment/PreviewCsv/index.vue +1 -1
  9. package/dist/modules/agent/runtime/app/components/Conversation/Item/Assistant/index.vue +14 -5
  10. package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/ConversationsTab/Item.vue +2 -2
  11. package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/RatingsTab/Item.vue +2 -2
  12. package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/ConversationDetail.vue +2 -2
  13. package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.d.vue.ts +1 -1
  14. package/dist/modules/agent/runtime/app/features/agent/ConversationsAdmin/SplitView/index.vue.d.ts +1 -1
  15. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +1 -1
  16. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue +1 -1
  17. package/dist/modules/agent/runtime/app/features/agent/Transcript/MessageContent.vue +14 -1
  18. package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +31 -13
  19. package/dist/modules/agent/runtime/app/features/agent/index.vue +1 -1
  20. package/dist/modules/agent/runtime/app/helpers/linkifyBlockUuids.d.ts +11 -0
  21. package/dist/modules/agent/runtime/app/helpers/linkifyBlockUuids.js +47 -0
  22. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +1 -1
  23. package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +1 -1
  24. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +1 -1
  25. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +1 -1
  26. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +1 -1
  27. package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +1 -1
  28. package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue +1 -1
  29. package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +1 -1
  30. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +22 -0
  31. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +28 -26
  32. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +22 -0
  33. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +16 -1
  34. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.d.vue.ts +22 -0
  35. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +59 -16
  36. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue.d.ts +22 -0
  37. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +15 -0
  38. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +1 -1
  39. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +1 -1
  40. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +1 -1
  41. package/dist/modules/agent/runtime/app/tools/fieldDiffApproval.d.ts +85 -15
  42. package/dist/modules/agent/runtime/app/tools/fieldDiffApproval.js +136 -28
  43. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +2 -2
  44. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +6 -2
  45. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +3 -3
  46. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +5 -5
  47. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +1 -1
  48. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +1 -1
  49. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +1 -1
  50. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +1 -1
  51. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +1 -1
  52. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +1 -1
  53. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +1 -1
  54. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +17 -7
  55. package/dist/modules/agent/runtime/app/tools/schemas.js +29 -12
  56. package/dist/modules/agent/runtime/app/tools/search_text/index.js +1 -1
  57. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +1 -1
  58. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +1 -1
  59. package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.d.vue.ts +22 -0
  60. package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.vue +54 -30
  61. package/dist/modules/agent/runtime/app/tools/update_text_fields/Component.vue.d.ts +22 -0
  62. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +18 -3
  63. package/dist/modules/agent/runtime/server/classes/FieldStreamParser/index.js +10 -15
  64. package/dist/modules/agent/runtime/server/default-system-prompts/architecture.js +1 -1
  65. package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +1 -0
  66. package/dist/modules/agent/runtime/shared/toolParams.d.ts +3 -3
  67. package/dist/modules/agent/runtime/shared/types.d.ts +3 -3
  68. package/dist/modules/charts/index.d.mts +14 -1
  69. package/dist/modules/charts/index.mjs +37 -2
  70. package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +1 -1
  71. package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +12 -5
  72. package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +7 -16
  73. package/dist/modules/charts/runtime/features/charts/Editor/AdvancedConfigPanel/index.vue +1 -1
  74. package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/Field.vue +19 -9
  75. package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +7 -77
  76. package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/OutputPreviewTable/index.vue +1 -1
  77. package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/csvHelpers.d.ts +1 -1
  78. package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +16 -8
  79. package/dist/modules/charts/runtime/features/charts/Editor/NumberFormatEditor/index.vue +23 -7
  80. package/dist/modules/charts/runtime/features/charts/Editor/index.vue +5 -6
  81. package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +1 -1
  82. package/dist/modules/charts/runtime/helpers/index.d.ts +2 -1
  83. package/dist/modules/charts/runtime/helpers/index.js +4 -2
  84. package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +5 -0
  85. package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliMutationResult.graphql +3 -0
  86. package/dist/modules/drupal/index.d.mts +1 -1
  87. package/dist/modules/drupal/runtime/adapter/index.js +5 -1
  88. package/dist/modules/iframes/index.d.mts +1 -1
  89. package/dist/modules/index.d.mts +1 -1
  90. package/dist/modules/readability/index.d.mts +1 -1
  91. package/dist/modules/readability/index.mjs +2 -1
  92. package/dist/modules/table-of-contents/index.d.mts +1 -1
  93. package/dist/runtime/components/Blocks/NotImplemented/index.vue +1 -1
  94. package/dist/runtime/composables/useBlokkliRuntimeConfig.d.ts +50 -0
  95. package/dist/runtime/composables/useBlokkliRuntimeConfig.js +34 -0
  96. package/dist/runtime/editor/adapter/index.d.ts +2 -1
  97. package/dist/runtime/editor/components/Actions/Title/index.vue +1 -1
  98. package/dist/runtime/editor/components/Actions/index.vue +1 -1
  99. package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +1 -0
  100. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +2 -2
  101. package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +1 -0
  102. package/dist/runtime/editor/components/Avatar/index.vue +1 -1
  103. package/dist/runtime/editor/components/BlockPreviewItem/index.vue +1 -1
  104. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue +1 -1
  105. package/dist/runtime/editor/components/BlockProxy/index.vue +1 -1
  106. package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +1 -1
  107. package/dist/runtime/editor/components/BundleSelector/index.vue +1 -1
  108. package/dist/runtime/editor/components/ColorDropdown/index.d.vue.ts +26 -0
  109. package/dist/runtime/editor/components/ColorDropdown/index.vue +116 -0
  110. package/dist/runtime/editor/components/ColorDropdown/index.vue.d.ts +26 -0
  111. package/dist/runtime/editor/components/Dialog/index.vue +1 -1
  112. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +14 -20
  113. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +97 -52
  114. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +14 -20
  115. package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +6 -6
  116. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +30 -21
  117. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +6 -6
  118. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +19 -9
  119. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +19 -10
  120. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +19 -9
  121. package/dist/runtime/editor/components/DiffApproval/index.d.vue.ts +14 -6
  122. package/dist/runtime/editor/components/DiffApproval/index.vue +62 -35
  123. package/dist/runtime/editor/components/DiffApproval/index.vue.d.ts +14 -6
  124. package/dist/runtime/editor/components/DiffApproval/types.d.ts +32 -0
  125. package/dist/runtime/editor/components/DiffApproval/types.js +20 -0
  126. package/dist/runtime/editor/components/DiffViewer/State.vue +1 -1
  127. package/dist/runtime/editor/components/DraggableList.vue +1 -1
  128. package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +6 -4
  129. package/dist/runtime/editor/components/Dropdown/index.vue +91 -31
  130. package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +6 -4
  131. package/dist/runtime/editor/components/DropdownItem/index.vue +1 -1
  132. package/dist/runtime/editor/components/EditIndicator.vue +1 -1
  133. package/dist/runtime/editor/components/EditProvider.vue +2 -2
  134. package/dist/runtime/editor/components/FileDropHandler/index.vue +1 -1
  135. package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
  136. package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
  137. package/dist/runtime/editor/components/Form/RadioTabs/index.vue +1 -1
  138. package/dist/runtime/editor/components/Form/Search/index.d.vue.ts +1 -0
  139. package/dist/runtime/editor/components/Form/Search/index.vue +2 -2
  140. package/dist/runtime/editor/components/Form/Search/index.vue.d.ts +1 -0
  141. package/dist/runtime/editor/components/FormOverlay/index.vue +1 -1
  142. package/dist/runtime/editor/components/Icon/index.vue +1 -1
  143. package/dist/runtime/editor/components/Indicators/index.vue +31 -100
  144. package/dist/runtime/editor/components/Konami/Game/index.vue +1 -1
  145. package/dist/runtime/editor/components/Messages/index.vue +1 -1
  146. package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +3 -2
  147. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +5 -4
  148. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +3 -2
  149. package/dist/runtime/editor/components/Overlay/index.vue +1 -1
  150. package/dist/runtime/editor/components/Pagination/index.vue +1 -1
  151. package/dist/runtime/editor/components/Panel/Section/index.vue +1 -1
  152. package/dist/runtime/editor/components/Panel/Tabs/index.d.vue.ts +1 -1
  153. package/dist/runtime/editor/components/Panel/Tabs/index.vue.d.ts +1 -1
  154. package/dist/runtime/editor/components/PluginConfigForm/index.vue +1 -1
  155. package/dist/runtime/editor/components/PluginConfigFormInline/FilterSelect/index.vue +1 -1
  156. package/dist/runtime/editor/components/PluginConfigFormInline/index.vue +1 -1
  157. package/dist/runtime/editor/components/Popup/index.vue +1 -1
  158. package/dist/runtime/editor/components/PopupHost/index.d.vue.ts +13 -0
  159. package/dist/runtime/editor/components/PopupHost/index.vue +12 -0
  160. package/dist/runtime/editor/components/PopupHost/index.vue.d.ts +13 -0
  161. package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
  162. package/dist/runtime/editor/components/RelativeTime/index.vue +7 -13
  163. package/dist/runtime/editor/components/Resizable/index.vue +1 -1
  164. package/dist/runtime/editor/components/RichText/Editor/index.vue +1 -1
  165. package/dist/runtime/editor/components/ScaleToFit/index.vue +1 -1
  166. package/dist/runtime/editor/components/SearchOverlay/index.vue +1 -1
  167. package/dist/runtime/editor/components/SidebarFloater/index.vue +1 -1
  168. package/dist/runtime/editor/components/StatusIcon/index.vue +1 -1
  169. package/dist/runtime/editor/components/StatusIndicator/index.vue +1 -1
  170. package/dist/runtime/editor/components/SystemRequirements/index.vue +1 -1
  171. package/dist/runtime/editor/components/Tabs/index.d.vue.ts +1 -1
  172. package/dist/runtime/editor/components/Tabs/index.vue.d.ts +1 -1
  173. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +2 -1
  174. package/dist/runtime/editor/components/Toolbar/index.vue +1 -1
  175. package/dist/runtime/editor/components/Transition/Collapse/index.vue +1 -1
  176. package/dist/runtime/editor/components/Transition/List/index.vue +1 -1
  177. package/dist/runtime/editor/components/index.d.ts +2 -0
  178. package/dist/runtime/editor/components/index.js +2 -0
  179. package/dist/runtime/editor/composables/defineViewOption.js +5 -1
  180. package/dist/runtime/editor/composables/useStickyToolbar.js +1 -4
  181. package/dist/runtime/editor/css/output.css +1 -1
  182. package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
  183. package/dist/runtime/editor/features/add-list/index.vue +1 -1
  184. package/dist/runtime/editor/features/analyze/Main.vue +15 -2
  185. package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue +4 -1
  186. package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue +25 -16
  187. package/dist/runtime/editor/features/analyze/analyzers/defaults/validations.d.ts +10 -0
  188. package/dist/runtime/editor/features/analyze/analyzers/defaults/validations.js +39 -0
  189. package/dist/runtime/editor/features/analyze/analyzers/helpers/Context.d.ts +5 -1
  190. package/dist/runtime/editor/features/analyze/analyzers/helpers/Context.js +5 -0
  191. package/dist/runtime/editor/features/analyze/index.vue +1 -2
  192. package/dist/runtime/editor/features/anchors/Overlay/index.vue +11 -5
  193. package/dist/runtime/editor/features/anchors/index.vue +2 -1
  194. package/dist/runtime/editor/features/artboard/Overview/index.vue +1 -1
  195. package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
  196. package/dist/runtime/editor/features/artboard/Scrollbar/index.vue +1 -1
  197. package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +1 -1
  198. package/dist/runtime/editor/features/block-transfer/index.vue +1 -1
  199. package/dist/runtime/editor/features/breadcrumbs/index.vue +1 -1
  200. package/dist/runtime/editor/features/changelog/changelog.json +17 -1
  201. package/dist/runtime/editor/features/clipboard/DropElement/index.vue +1 -1
  202. package/dist/runtime/editor/features/comments/AddForm/index.vue +1 -1
  203. package/dist/runtime/editor/features/comments/Comment/Meta/index.vue +1 -1
  204. package/dist/runtime/editor/features/comments/Comment/index.vue +1 -1
  205. package/dist/runtime/editor/features/comments/Thread/index.vue +1 -1
  206. package/dist/runtime/editor/features/complex-options/index.vue +1 -0
  207. package/dist/runtime/editor/features/debug/Main.vue +1 -1
  208. package/dist/runtime/editor/features/dev-mode/index.vue +1 -1
  209. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -1
  210. package/dist/runtime/editor/features/dragging-overlay/index.vue +1 -1
  211. package/dist/runtime/editor/features/droppable-field-edit/Overlay/index.vue +1 -1
  212. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +1 -1
  213. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.d.vue.ts +1 -5
  214. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue.d.ts +1 -5
  215. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +1 -1
  216. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +1 -1
  217. package/dist/runtime/editor/features/editable-mask/index.vue +1 -1
  218. package/dist/runtime/editor/features/entity-title/index.vue +17 -7
  219. package/dist/runtime/editor/features/help/Dialog/index.vue +1 -1
  220. package/dist/runtime/editor/features/help/Shortcuts/index.vue +1 -1
  221. package/dist/runtime/editor/features/history/List/index.vue +1 -1
  222. package/dist/runtime/editor/features/import-existing/Dialog/index.vue +1 -1
  223. package/dist/runtime/editor/features/library/index.vue +1 -0
  224. package/dist/runtime/editor/features/media-library/index.vue +1 -1
  225. package/dist/runtime/editor/features/options/Form/Item.vue +5 -12
  226. package/dist/runtime/editor/features/options/Form/Radios/index.d.vue.ts +5 -4
  227. package/dist/runtime/editor/features/options/Form/Radios/index.vue +8 -5
  228. package/dist/runtime/editor/features/options/Form/Radios/index.vue.d.ts +5 -4
  229. package/dist/runtime/editor/features/options/Form/Text/index.d.vue.ts +4 -0
  230. package/dist/runtime/editor/features/options/Form/Text/index.vue +11 -3
  231. package/dist/runtime/editor/features/options/Form/Text/index.vue.d.ts +4 -0
  232. package/dist/runtime/editor/features/options/index.vue +1 -1
  233. package/dist/runtime/editor/features/publish/Dialog/Item.vue +4 -7
  234. package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +1 -1
  235. package/dist/runtime/editor/features/publish/Dialog/Violations.d.vue.ts +12 -0
  236. package/dist/runtime/editor/features/publish/Dialog/Violations.vue +117 -0
  237. package/dist/runtime/editor/features/publish/Dialog/Violations.vue.d.ts +12 -0
  238. package/dist/runtime/editor/features/publish/Dialog/index.vue +61 -24
  239. package/dist/runtime/editor/features/publish/index.vue +2 -4
  240. package/dist/runtime/editor/features/publish/types.d.ts +0 -4
  241. package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue +1 -0
  242. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +1 -1
  243. package/dist/runtime/editor/features/search/index.vue +1 -1
  244. package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +1 -1
  245. package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +1 -1
  246. package/dist/runtime/editor/features/settings/index.vue +1 -1
  247. package/dist/runtime/editor/features/structure/List/Item/index.vue +1 -1
  248. package/dist/runtime/editor/features/structure/index.vue +1 -1
  249. package/dist/runtime/editor/features/templates/DialogManageTemplates/Item.vue +1 -0
  250. package/dist/runtime/editor/features/templates/DialogManageTemplates/index.vue +1 -1
  251. package/dist/runtime/editor/features/theme/index.vue +1 -1
  252. package/dist/runtime/editor/features/touch-action-bar/Bar/index.vue +1 -1
  253. package/dist/runtime/editor/features/tour/Overlay/index.vue +1 -1
  254. package/dist/runtime/editor/features/transform/Dialog/index.vue +1 -1
  255. package/dist/runtime/editor/features/translations/SelectionTable/index.vue +1 -1
  256. package/dist/runtime/editor/features/workspace/index.vue +1 -1
  257. package/dist/runtime/editor/helpers/color/index.d.ts +7 -0
  258. package/dist/runtime/editor/helpers/color/index.js +14 -0
  259. package/dist/runtime/editor/helpers/diff/index.d.ts +98 -0
  260. package/dist/runtime/editor/helpers/diff/index.js +262 -0
  261. package/dist/runtime/editor/helpers/injections.d.ts +11 -0
  262. package/dist/runtime/editor/helpers/injections.js +1 -0
  263. package/dist/runtime/editor/helpers/options/index.d.ts +2 -0
  264. package/dist/runtime/editor/helpers/options/index.js +21 -0
  265. package/dist/runtime/editor/plugins/BlockIndicator/index.d.vue.ts +24 -1
  266. package/dist/runtime/editor/plugins/BlockIndicator/index.vue +17 -7
  267. package/dist/runtime/editor/plugins/BlockIndicator/index.vue.d.ts +24 -1
  268. package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +1 -0
  269. package/dist/runtime/editor/plugins/ItemAction/index.vue +1 -1
  270. package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +1 -0
  271. package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
  272. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
  273. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +2 -2
  274. package/dist/runtime/editor/plugins/Sidebar/index.vue +1 -1
  275. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
  276. package/dist/runtime/editor/plugins/ToolbarButton/index.vue +1 -1
  277. package/dist/runtime/editor/providers/analyze.js +5 -2
  278. package/dist/runtime/editor/providers/animation.d.ts +2 -0
  279. package/dist/runtime/editor/providers/config.d.ts +3 -1
  280. package/dist/runtime/editor/providers/config.js +46 -15
  281. package/dist/runtime/editor/providers/definition.d.ts +4 -3
  282. package/dist/runtime/editor/providers/definition.js +10 -2
  283. package/dist/runtime/editor/providers/plugin.d.ts +1 -0
  284. package/dist/runtime/editor/providers/state.d.ts +21 -0
  285. package/dist/runtime/editor/providers/state.js +10 -0
  286. package/dist/runtime/editor/translations/de.json +9 -4
  287. package/dist/runtime/editor/translations/fr.json +4 -4
  288. package/dist/runtime/editor/translations/gsw_CH.json +9 -4
  289. package/dist/runtime/editor/translations/it.json +4 -4
  290. package/dist/runtime/editor/types/state.d.ts +7 -0
  291. package/dist/runtime/editor/types/ui.d.ts +1 -0
  292. package/dist/runtime/helpers/colors.d.ts +39 -0
  293. package/dist/runtime/helpers/colors.js +28 -0
  294. package/dist/runtime/types/colors.d.ts +11 -0
  295. package/dist/shared/{editor.D28NbXr3.d.mts → editor.BDyiQvbV.d.mts} +434 -406
  296. package/dist/shared/{editor.Gu7mgJ5Q.mjs → editor.BGemL1Oh.mjs} +146 -146
  297. package/dist/types.d.mts +1 -1
  298. package/package.json +74 -82
  299. package/dist/runtime/editor/features/validations/Overlay/Item.d.vue.ts +0 -7
  300. package/dist/runtime/editor/features/validations/Overlay/Item.vue +0 -36
  301. package/dist/runtime/editor/features/validations/Overlay/Item.vue.d.ts +0 -7
  302. package/dist/runtime/editor/features/validations/Overlay/index.d.vue.ts +0 -7
  303. package/dist/runtime/editor/features/validations/Overlay/index.vue +0 -115
  304. package/dist/runtime/editor/features/validations/Overlay/index.vue.d.ts +0 -7
  305. package/dist/runtime/editor/features/validations/SidebarItem/index.d.vue.ts +0 -10
  306. package/dist/runtime/editor/features/validations/SidebarItem/index.vue +0 -41
  307. package/dist/runtime/editor/features/validations/SidebarItem/index.vue.d.ts +0 -10
  308. package/dist/runtime/editor/features/validations/index.d.vue.ts +0 -3
  309. package/dist/runtime/editor/features/validations/index.vue +0 -91
  310. package/dist/runtime/editor/features/validations/index.vue.d.ts +0 -3
  311. package/dist/runtime/editor/types/config.d.ts +0 -5
  312. /package/dist/runtime/{editor/types/config.js → types/colors.js} +0 -0
@@ -125,7 +125,7 @@ const tickmarks = computed(() => {
125
125
  });
126
126
  </script>
127
127
 
128
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
128
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
129
129
  .bk .bk-input-range {
130
130
  display: block;
131
131
  width: 100%;
@@ -84,5 +84,5 @@ export default {
84
84
  };
85
85
  </script>
86
86
 
87
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
87
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
88
88
  </style>
@@ -126,7 +126,7 @@ defineOptions({
126
126
  });
127
127
  </script>
128
128
 
129
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
129
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
130
130
  :is(.bk-vars .bk-dragging-overlay-item) [bk-structure-uuid] {
131
131
  background-color: rgb(var(--bk-theme-mono-100) / 1) !important;
132
132
  }
@@ -99,7 +99,7 @@ export default {
99
99
  };
100
100
  </script>
101
101
 
102
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
102
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
103
103
  .bk.bk-structure {
104
104
  height: 100%;
105
105
  overflow: auto;
@@ -78,6 +78,7 @@
78
78
  </tr>
79
79
  <NestedEditorOverlay
80
80
  v-if="isEditing && editUrl"
81
+ id="edit-template"
81
82
  :url="editUrl"
82
83
  :uuid
83
84
  :element="editButtonEl"
@@ -110,7 +110,7 @@ watch(page, () => {
110
110
  });
111
111
  </script>
112
112
 
113
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
113
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
114
114
  .bk .bk-templates-manage {
115
115
  min-height: 70vh;
116
116
  }
@@ -109,7 +109,7 @@ export default {
109
109
  };
110
110
  </script>
111
111
 
112
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
112
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
113
113
  .bk.bk-theme-editor {
114
114
  container-type: inline-size;
115
115
  }
@@ -24,7 +24,7 @@ export default {
24
24
  };
25
25
  </script>
26
26
 
27
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
27
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
28
28
  .bk.bk-touch-action-bar {
29
29
  pointer-events: auto;
30
30
  position: fixed;
@@ -227,7 +227,7 @@ useAnimationFrame(() => {
227
227
  });
228
228
  </script>
229
229
 
230
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
230
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
231
231
  .bk.bk-tour {
232
232
  position: fixed;
233
233
  top: 0px;
@@ -225,7 +225,7 @@ onBeforeUnmount(() => {
225
225
  });
226
226
  </script>
227
227
 
228
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
228
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
229
229
  .bk.bk-transform-overlay {
230
230
  pointer-events: auto;
231
231
  position: absolute;
@@ -32,7 +32,7 @@ defineProps({
32
32
  defineEmits(["toggle-all"]);
33
33
  </script>
34
34
 
35
- <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
35
+ <style>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
36
36
  .bk .bk-csv-table {
37
37
  border-collapse: collapse;
38
38
  }
@@ -16,7 +16,7 @@
16
16
  region="title"
17
17
  weight="500"
18
18
  icon="bk_mdi_feature_search"
19
- class="_bk_relative"
19
+ class="_bk_relative _bk_border-l _bk_border-l-mono-600"
20
20
  @click="isVisible = !isVisible"
21
21
  />
22
22
  </template>
@@ -3,4 +3,11 @@ export declare function toShaderColor(rgba: RGB): RGB;
3
3
  export declare const rgbaToString: (color: RGB, alpha?: number) => string;
4
4
  export declare function getContrastRatio(color1: RGB, color2: RGB): number;
5
5
  export declare function findHighestContrastColor(colors: RGB[], backgroundColor?: RGB): RGB;
6
+ export declare const hexToRgb: (hex: string) => RGB | undefined;
7
+ /**
8
+ * Whether the given hex color is "light" — i.e. dark text on top of it would
9
+ * be more readable than light text. Use this to decide between black/white
10
+ * foreground content on a colored background. Unparseable hex → `false`.
11
+ */
12
+ export declare const isLightHex: (hex: string) => boolean;
6
13
  export declare const parseColorString: (color: string) => RGB | undefined;
@@ -28,6 +28,20 @@ export function findHighestContrastColor(colors, backgroundColor = [255, 255, 25
28
28
  }
29
29
  return maxContrastColor;
30
30
  }
31
+ export const hexToRgb = (hex) => {
32
+ const match = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
33
+ if (!match) return;
34
+ return [
35
+ Number.parseInt(match[1], 16),
36
+ Number.parseInt(match[2], 16),
37
+ Number.parseInt(match[3], 16)
38
+ ];
39
+ };
40
+ export const isLightHex = (hex) => {
41
+ const rgb = hexToRgb(hex);
42
+ if (!rgb) return false;
43
+ return getContrastRatio(rgb, [0, 0, 0]) > getContrastRatio(rgb, [255, 255, 255]);
44
+ };
31
45
  export const parseColorString = (color) => {
32
46
  const rgbaRegex = /^rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(?:,\s*(0|1|0?\.\d+))?\)$/;
33
47
  const match = color.match(rgbaRegex);
@@ -21,3 +21,101 @@ export declare function computeDiff(before: string, after: string): string;
21
21
  * <ins> rather than wrapping the block tags themselves.
22
22
  */
23
23
  export declare function computeInsertion(after: string): string;
24
+ /**
25
+ * One chunk of a field's diff that can be individually accepted or rejected
26
+ * by the user. A markup field becomes an ordered list of segments; lists
27
+ * (<ul>/<ol>) become a `list` segment whose children are the individual
28
+ * <li> atoms.
29
+ *
30
+ * Acceptance semantics (see `reassembleValue`):
31
+ * - matched: accepted → afterHtml, rejected → beforeHtml
32
+ * - inserted: accepted → keep, rejected → drop
33
+ * - deleted: accepted → drop (matches after), rejected → restore (matches before)
34
+ */
35
+ export type AtomicSegment = {
36
+ kind: 'atomic';
37
+ id: string;
38
+ tag: string;
39
+ /**
40
+ * The open tag of the accepted (after) state. For matched segments this can
41
+ * differ from `beforeOpenTag` when only attributes changed — a segment
42
+ * counts as changed in that case even when the inner HTML is identical.
43
+ */
44
+ openTag: string;
45
+ /**
46
+ * The open tag of the original (before) state. Rejecting a matched segment
47
+ * restores this alongside `beforeHtml`. Equals `openTag` for inserted
48
+ * segments (which have no before state).
49
+ */
50
+ beforeOpenTag: string;
51
+ closeTag: string;
52
+ beforeHtml: string;
53
+ afterHtml: string;
54
+ changed: boolean;
55
+ status: 'matched' | 'inserted' | 'deleted';
56
+ };
57
+ export type ListSegment = {
58
+ kind: 'list';
59
+ id: string;
60
+ tag: 'ul' | 'ol';
61
+ openTag: string;
62
+ closeTag: string;
63
+ children: AtomicSegment[];
64
+ };
65
+ export type Segment = AtomicSegment | ListSegment;
66
+ /**
67
+ * Split a before/after value pair into chunks the user can individually
68
+ * accept or reject. Returns null when chunk-level approval can't apply:
69
+ *
70
+ * - non-markup fields
71
+ * - either side contains inline-only HTML or stray top-level text
72
+ * (`parseBlocks` returns null)
73
+ * - both sides empty
74
+ *
75
+ * Two-level structure: top-level block alignment, then a one-level recurse
76
+ * into matched <ul>/<ol> blocks whose innerHTML differs. <li> is the leaf.
77
+ *
78
+ * Used for both rewrites (word-diff preview) and translations
79
+ * (insertion-only preview). The difference is at the renderer.
80
+ */
81
+ export declare function splitIntoSegments(before: string, after: string, fieldType: 'plain' | 'markup'): Segment[] | null;
82
+ /**
83
+ * True when at least one segment (or list child) actually changes. Use to
84
+ * skip the approval row for fields where the proposed value already matches
85
+ * the current value chunk-for-chunk.
86
+ */
87
+ export declare function segmentsHaveChanges(segments: Segment[]): boolean;
88
+ /**
89
+ * Render segments as preview HTML with `data-chunk-index` attributes on each
90
+ * atomic block, so the approval UI can locate each chunk's DOM bounds. The
91
+ * resulting markup replaces the editable's innerHTML during preview, just
92
+ * like `computeDiff` / `computeInsertion`.
93
+ *
94
+ * `insertionsOnly` matches the existing prop on DiffApproval — translations
95
+ * render new content as a single <ins> per leaf, rewrites render word-diffs.
96
+ *
97
+ * `acceptedById` (optional) makes the preview track per-segment acceptance:
98
+ * rejected matched segments render their original content with no markers,
99
+ * rejected insertions render as deletions, rejected deletions render plain.
100
+ * Defaults to "all accepted" when omitted (initial render).
101
+ */
102
+ export declare function renderSegmentDiff(segments: Segment[], opts?: {
103
+ insertionsOnly?: boolean;
104
+ acceptedById?: Record<string, boolean>;
105
+ }): string;
106
+ /**
107
+ * Reassemble a field value from segments using per-segment acceptance.
108
+ * Acceptance defaults to `true` for any unmapped segment id, mirroring the
109
+ * DiffApproval initial state.
110
+ *
111
+ * For `list` segments the wrapper is emitted only when at least one child
112
+ * survives — accepting a full deletion of every item drops the list itself.
113
+ */
114
+ export declare function reassembleValue(segments: Segment[], acceptedById: Record<string, boolean>): string;
115
+ /**
116
+ * Walk a segment list and return every atomic segment in reading order,
117
+ * including those inside list wrappers. Used by the approval UI for
118
+ * keyboard nav, selection initialisation, and the rejected-segments
119
+ * feedback to the agent.
120
+ */
121
+ export declare function flattenSegments(segments: Segment[]): AtomicSegment[];
@@ -234,3 +234,265 @@ export function computeInsertion(after) {
234
234
  }
235
235
  return `<ins>${after}</ins>`;
236
236
  }
237
+ function parseListItems(html) {
238
+ const container = document.createElement("div");
239
+ container.innerHTML = html;
240
+ const items = [];
241
+ for (const child of container.childNodes) {
242
+ if (child.nodeType === Node.ELEMENT_NODE) {
243
+ const el = child;
244
+ const tag = el.tagName.toLowerCase();
245
+ if (tag !== "li") return null;
246
+ let openTag = `<${tag}`;
247
+ for (const attr of el.attributes) {
248
+ openTag += ` ${attr.name}="${attr.value}"`;
249
+ }
250
+ openTag += ">";
251
+ items.push({ tag, innerHTML: el.innerHTML, openTag });
252
+ } else if (child.nodeType === Node.TEXT_NODE && child.textContent?.trim()) {
253
+ return null;
254
+ }
255
+ }
256
+ return items;
257
+ }
258
+ function alignListItems(before, after) {
259
+ const m = before.length;
260
+ const n = after.length;
261
+ const dp = Array.from(
262
+ { length: m + 1 },
263
+ () => Array(n + 1).fill(0)
264
+ );
265
+ for (let i2 = 1; i2 <= m; i2++) {
266
+ for (let j2 = 1; j2 <= n; j2++) {
267
+ if (before[i2 - 1].innerHTML === after[j2 - 1].innerHTML) {
268
+ dp[i2][j2] = dp[i2 - 1][j2 - 1] + 1;
269
+ } else {
270
+ dp[i2][j2] = Math.max(dp[i2 - 1][j2], dp[i2][j2 - 1]);
271
+ }
272
+ }
273
+ }
274
+ const ops = [];
275
+ let i = m;
276
+ let j = n;
277
+ while (i > 0 && j > 0) {
278
+ if (before[i - 1].innerHTML === after[j - 1].innerHTML) {
279
+ ops.push({
280
+ type: "unchanged",
281
+ before: before[i - 1],
282
+ after: after[j - 1]
283
+ });
284
+ i--;
285
+ j--;
286
+ } else if (dp[i - 1][j] >= dp[i][j - 1]) {
287
+ ops.push({ type: "before", block: before[i - 1] });
288
+ i--;
289
+ } else {
290
+ ops.push({ type: "after", block: after[j - 1] });
291
+ j--;
292
+ }
293
+ }
294
+ while (i > 0) {
295
+ ops.push({ type: "before", block: before[i - 1] });
296
+ i--;
297
+ }
298
+ while (j > 0) {
299
+ ops.push({ type: "after", block: after[j - 1] });
300
+ j--;
301
+ }
302
+ ops.reverse();
303
+ const entries = [];
304
+ let k = 0;
305
+ while (k < ops.length) {
306
+ const op = ops[k];
307
+ if (op.type === "unchanged") {
308
+ entries.push({ type: "match", before: op.before, after: op.after });
309
+ k++;
310
+ continue;
311
+ }
312
+ const befores = [];
313
+ const afters = [];
314
+ while (k < ops.length && ops[k].type !== "unchanged") {
315
+ const r = ops[k];
316
+ if (r.type === "before") befores.push(r.block);
317
+ else if (r.type === "after") afters.push(r.block);
318
+ k++;
319
+ }
320
+ const pairCount = Math.min(befores.length, afters.length);
321
+ for (let p = 0; p < pairCount; p++) {
322
+ entries.push({ type: "match", before: befores[p], after: afters[p] });
323
+ }
324
+ for (let p = pairCount; p < befores.length; p++) {
325
+ entries.push({ type: "delete", before: befores[p] });
326
+ }
327
+ for (let p = pairCount; p < afters.length; p++) {
328
+ entries.push({ type: "insert", after: afters[p] });
329
+ }
330
+ }
331
+ return entries;
332
+ }
333
+ function atomicFromAlignment(entry, id) {
334
+ if (entry.type === "match") {
335
+ return {
336
+ kind: "atomic",
337
+ id,
338
+ tag: entry.after.tag,
339
+ openTag: entry.after.openTag,
340
+ beforeOpenTag: entry.before.openTag,
341
+ closeTag: `</${entry.after.tag}>`,
342
+ beforeHtml: entry.before.innerHTML,
343
+ afterHtml: entry.after.innerHTML,
344
+ changed: entry.before.innerHTML !== entry.after.innerHTML || entry.before.openTag !== entry.after.openTag,
345
+ status: "matched"
346
+ };
347
+ }
348
+ if (entry.type === "delete") {
349
+ return {
350
+ kind: "atomic",
351
+ id,
352
+ tag: entry.before.tag,
353
+ openTag: entry.before.openTag,
354
+ beforeOpenTag: entry.before.openTag,
355
+ closeTag: `</${entry.before.tag}>`,
356
+ beforeHtml: entry.before.innerHTML,
357
+ afterHtml: "",
358
+ changed: true,
359
+ status: "deleted"
360
+ };
361
+ }
362
+ return {
363
+ kind: "atomic",
364
+ id,
365
+ tag: entry.after.tag,
366
+ openTag: entry.after.openTag,
367
+ beforeOpenTag: entry.after.openTag,
368
+ closeTag: `</${entry.after.tag}>`,
369
+ beforeHtml: "",
370
+ afterHtml: entry.after.innerHTML,
371
+ changed: true,
372
+ status: "inserted"
373
+ };
374
+ }
375
+ export function splitIntoSegments(before, after, fieldType) {
376
+ if (fieldType !== "markup") return null;
377
+ const beforeBlocks = parseBlocks(before);
378
+ const afterBlocks = parseBlocks(after);
379
+ if (!beforeBlocks || !afterBlocks) return null;
380
+ if (beforeBlocks.length === 0 && afterBlocks.length === 0) return null;
381
+ const alignment = alignBlocks(beforeBlocks, afterBlocks);
382
+ const segments = [];
383
+ alignment.forEach((entry, index) => {
384
+ const id = String(index);
385
+ if (entry.type === "match" && (entry.after.tag === "ul" || entry.after.tag === "ol") && entry.before.innerHTML !== entry.after.innerHTML && entry.before.openTag === entry.after.openTag) {
386
+ const beforeItems = parseListItems(entry.before.innerHTML);
387
+ const afterItems = parseListItems(entry.after.innerHTML);
388
+ if (beforeItems && afterItems) {
389
+ const childAlignment = alignListItems(beforeItems, afterItems);
390
+ const children = childAlignment.map(
391
+ (childEntry, childIndex) => atomicFromAlignment(childEntry, `${id}/${childIndex}`)
392
+ );
393
+ segments.push({
394
+ kind: "list",
395
+ id,
396
+ tag: entry.after.tag,
397
+ openTag: entry.after.openTag,
398
+ closeTag: `</${entry.after.tag}>`,
399
+ children
400
+ });
401
+ return;
402
+ }
403
+ }
404
+ segments.push(atomicFromAlignment(entry, id));
405
+ });
406
+ return segments;
407
+ }
408
+ export function segmentsHaveChanges(segments) {
409
+ return segments.some(
410
+ (seg) => seg.kind === "list" ? seg.children.some((c) => c.changed) : seg.changed
411
+ );
412
+ }
413
+ function injectAttribute(openTag, name, value) {
414
+ return openTag.slice(0, -1) + ` ${name}="${value}">`;
415
+ }
416
+ function renderAtomicDiffMarkup(seg, opts) {
417
+ const open = injectAttribute(seg.openTag, "data-chunk-index", seg.id);
418
+ const accepted = opts.acceptedById?.[seg.id] !== false;
419
+ if (seg.status === "inserted") {
420
+ if (!accepted) {
421
+ return `${open}<del>${seg.afterHtml}</del>${seg.closeTag}`;
422
+ }
423
+ return `${open}<ins>${seg.afterHtml}</ins>${seg.closeTag}`;
424
+ }
425
+ if (seg.status === "deleted") {
426
+ if (!accepted) {
427
+ return `${open}${seg.beforeHtml}${seg.closeTag}`;
428
+ }
429
+ return `${open}<del>${seg.beforeHtml}</del>${seg.closeTag}`;
430
+ }
431
+ if (!accepted) {
432
+ const beforeOpen = injectAttribute(
433
+ seg.beforeOpenTag,
434
+ "data-chunk-index",
435
+ seg.id
436
+ );
437
+ return `${beforeOpen}${seg.beforeHtml}${seg.closeTag}`;
438
+ }
439
+ if (opts.insertionsOnly) {
440
+ return `${open}<ins>${seg.afterHtml}</ins>${seg.closeTag}`;
441
+ }
442
+ if (seg.beforeHtml === seg.afterHtml) {
443
+ return `${open}${seg.afterHtml}${seg.closeTag}`;
444
+ }
445
+ const innerDiff = diff(seg.beforeHtml, seg.afterHtml);
446
+ return `${open}${cleanupDiffMods(innerDiff)}${seg.closeTag}`;
447
+ }
448
+ export function renderSegmentDiff(segments, opts = {}) {
449
+ const parts = [];
450
+ for (const seg of segments) {
451
+ if (seg.kind === "list") {
452
+ const childParts = seg.children.map(
453
+ (c) => renderAtomicDiffMarkup(c, opts)
454
+ );
455
+ parts.push(`${seg.openTag}${childParts.join("")}${seg.closeTag}`);
456
+ } else {
457
+ parts.push(renderAtomicDiffMarkup(seg, opts));
458
+ }
459
+ }
460
+ return parts.join("");
461
+ }
462
+ export function reassembleValue(segments, acceptedById) {
463
+ const isAccepted = (id) => acceptedById[id] !== false;
464
+ const renderAtomic = (seg) => {
465
+ const accepted = isAccepted(seg.id);
466
+ if (seg.status === "matched") {
467
+ return accepted ? seg.openTag + seg.afterHtml + seg.closeTag : seg.beforeOpenTag + seg.beforeHtml + seg.closeTag;
468
+ }
469
+ if (seg.status === "inserted") {
470
+ return accepted ? seg.openTag + seg.afterHtml + seg.closeTag : "";
471
+ }
472
+ return accepted ? "" : seg.openTag + seg.beforeHtml + seg.closeTag;
473
+ };
474
+ const parts = [];
475
+ for (const seg of segments) {
476
+ if (seg.kind === "list") {
477
+ const childParts = seg.children.map(renderAtomic).filter((p) => p);
478
+ if (childParts.length > 0) {
479
+ parts.push(`${seg.openTag}${childParts.join("")}${seg.closeTag}`);
480
+ }
481
+ } else {
482
+ const out = renderAtomic(seg);
483
+ if (out) parts.push(out);
484
+ }
485
+ }
486
+ return parts.join("");
487
+ }
488
+ export function flattenSegments(segments) {
489
+ const out = [];
490
+ for (const seg of segments) {
491
+ if (seg.kind === "list") {
492
+ out.push(...seg.children);
493
+ } else {
494
+ out.push(seg);
495
+ }
496
+ }
497
+ return out;
498
+ }
@@ -0,0 +1,11 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ /**
3
+ * A ref to the nearest popup host element (provided by `<PopupHost>`).
4
+ *
5
+ * Descendants that render floating menus (e.g. the chart editor's color
6
+ * picker) inject this and teleport their content into the host. This lets
7
+ * the menu escape any `overflow: hidden`/`overflow: auto` clipping ancestor
8
+ * while staying inside the popup host's stacking context. When no host is
9
+ * provided, descendants fall back to inline rendering.
10
+ */
11
+ export declare const INJECT_POPUP_HOST: InjectionKey<Ref<HTMLElement | null>>;
@@ -0,0 +1 @@
1
+ export const INJECT_POPUP_HOST = Symbol("blokkli_popup_host");
@@ -1,5 +1,6 @@
1
1
  import type { BlockOptionDefinition } from '#blokkli/types/blockOptions';
2
2
  import type { BlockDefinitionOptionsInput } from '#blokkli/types/definitions';
3
+ import type { DefinitionString } from '../../../../global/types/blockOptions.js';
3
4
  export type OptionItem = {
4
5
  property: string;
5
6
  option: BlockOptionDefinition;
@@ -18,3 +19,4 @@ export declare function getMutatedOptionValue(mutatedOptions: Record<string, Rec
18
19
  * Convert a typed option value to the string format expected by the adapter.
19
20
  */
20
21
  export declare function optionValueToStorable(definition: BlockOptionDefinition, value: string | string[] | boolean | undefined | null | number): string;
22
+ export declare function resolveDefinitionString(definitionString: DefinitionString, langcode?: string): string;
@@ -1,3 +1,4 @@
1
+ import { defaultLanguage } from "#blokkli-build/editor-config";
1
2
  export function getAvailableOptions(definitionOptions, globalOptionKeys, globalOptionsMap) {
2
3
  const options = definitionOptions || {};
3
4
  const global = (globalOptionKeys || []).reduce(
@@ -69,3 +70,23 @@ export function optionValueToStorable(definition, value) {
69
70
  }
70
71
  return "";
71
72
  }
73
+ export function resolveDefinitionString(definitionString, langcode) {
74
+ if (!definitionString) {
75
+ return "";
76
+ }
77
+ if (typeof definitionString === "string") {
78
+ return definitionString;
79
+ }
80
+ if (langcode) {
81
+ const translation = definitionString[langcode];
82
+ if (translation) {
83
+ return translation;
84
+ }
85
+ }
86
+ const defaultTranslation = definitionString[defaultLanguage];
87
+ if (defaultTranslation) {
88
+ return defaultTranslation;
89
+ }
90
+ const firstValue = Object.values(definitionString)[0];
91
+ return firstValue ?? "";
92
+ }
@@ -26,6 +26,15 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
26
26
  * Optional icon to display in the indicator.
27
27
  */
28
28
  icon?: BlokkliIcon;
29
+ /**
30
+ * Keep the indicator visible when the artboard edge is close to the
31
+ * edge of the visible viewport.
32
+ *
33
+ * Instead of moving out of view, the indicator is shifted onto the
34
+ * artboard so that at least the icon remains visible. Only supported
35
+ * for left-positioned indicators.
36
+ */
37
+ sticky?: boolean;
29
38
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
30
39
  click: () => any;
31
40
  }, string, import("vue").PublicProps, Readonly<{
@@ -53,9 +62,23 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
53
62
  * Optional icon to display in the indicator.
54
63
  */
55
64
  icon?: BlokkliIcon;
65
+ /**
66
+ * Keep the indicator visible when the artboard edge is close to the
67
+ * edge of the visible viewport.
68
+ *
69
+ * Instead of moving out of view, the indicator is shifted onto the
70
+ * artboard so that at least the icon remains visible. Only supported
71
+ * for left-positioned indicators.
72
+ */
73
+ sticky?: boolean;
56
74
  }> & Readonly<{
57
75
  onClick?: (() => any) | undefined;
58
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
76
+ }>, {
77
+ label: string;
78
+ icon: BlokkliIcon;
79
+ sticky: boolean;
80
+ position: "left" | "right";
81
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
59
82
  default?: (props: {}) => any;
60
83
  }>;
61
84
  type __VLS_WithSlots<T, S> = T & {
@@ -2,16 +2,24 @@
2
2
  <Teleport to="#bk-indicators-left">
3
3
  <div
4
4
  ref="el"
5
- class="bk-indicator-item"
5
+ class="bk-indicator-item _bk_absolute _bk_top-0 _bk_pointer-events-auto _bk_cursor-pointer _bk_text-mono-500 _bk_h-30 _bk_flex _bk_items-center _bk_hover:text-mono-950 _bk_group"
6
+ :class="{
7
+ '_bk_right-0 _bk_pr-10': position === 'left'
8
+ }"
6
9
  @click.prevent="$emit('click')"
7
10
  @mouseenter="onMouseEnter"
8
11
  @mouseleave="onMouseLeave"
9
12
  >
10
13
  <slot>
11
- <div class="bk-indicator-item-inner">
14
+ <div
15
+ class="bk-indicator-item-inner _bk_flex _bk_gap-10 _bk_items-center _bk_text-xs _bk_font-medium"
16
+ >
12
17
  <div v-if="label">{{ label }}</div>
13
18
  <div v-if="icon">
14
- <Icon :name="icon" />
19
+ <Icon
20
+ :name="icon"
21
+ class="_bk_size-20 _bk_bg-red-normal _bk_text-white _bk_p-2 _bk_rounded-full _bk_group-hover:bg-red-dark"
22
+ />
15
23
  </div>
16
24
  </div>
17
25
  </slot>
@@ -30,9 +38,10 @@ import { Icon } from "#blokkli/editor/components";
30
38
  const props = defineProps({
31
39
  id: { type: String, required: true },
32
40
  uuid: { type: String, required: true },
33
- label: { type: String, required: false },
34
- position: { type: String, required: false },
35
- icon: { type: null, required: false }
41
+ label: { type: String, required: false, default: void 0 },
42
+ position: { type: String, required: false, default: "left" },
43
+ icon: { type: null, required: false, default: void 0 },
44
+ sticky: { type: Boolean, required: false, default: false }
36
45
  });
37
46
  defineEmits(["click"]);
38
47
  const { indicators } = useBlokkli();
@@ -49,7 +58,8 @@ onMounted(() => {
49
58
  id: props.id,
50
59
  uuid: props.uuid,
51
60
  position: props.position ?? "left",
52
- element: el.value
61
+ element: el.value,
62
+ sticky: props.sticky
53
63
  });
54
64
  }
55
65
  });