@blokkli/editor 2.0.0-alpha.59 → 2.0.0-alpha.61

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 (324) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +28 -11
  3. package/dist/modules/agent/index.mjs +2 -5
  4. package/dist/modules/agent/runtime/app/features/agent/Container.vue +3 -3
  5. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +15 -3
  6. package/dist/modules/agent/runtime/app/features/agent/index.vue +5 -1
  7. package/dist/modules/agent/runtime/app/features/agent/types.d.ts +2 -1
  8. package/dist/modules/agent/runtime/app/helpers/mutationResult.d.ts +38 -0
  9. package/dist/modules/agent/runtime/app/helpers/mutationResult.js +49 -0
  10. package/dist/modules/agent/runtime/app/prompts/fixReadability.js +3 -3
  11. package/dist/modules/agent/runtime/app/providers/agentProvider.d.ts +2 -1
  12. package/dist/modules/agent/runtime/app/providers/agentProvider.js +6 -6
  13. package/dist/modules/agent/runtime/app/providers/toolsProvider.js +3 -13
  14. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +25 -0
  15. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.js +3 -2
  16. package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +22 -0
  17. package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +3 -2
  18. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +24 -0
  19. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +3 -2
  20. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +32 -0
  21. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +6 -4
  22. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +22 -0
  23. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +3 -2
  24. package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +22 -0
  25. package/dist/modules/agent/runtime/app/tools/add_template/index.js +5 -3
  26. package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +3 -3
  27. package/dist/modules/agent/runtime/app/tools/ask_question/index.js +7 -6
  28. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +29 -0
  29. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +172 -0
  30. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +29 -0
  31. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +28 -0
  32. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +80 -0
  33. package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.d.ts +17 -0
  34. package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.js +2 -2
  35. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +16 -0
  36. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +10 -1
  37. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +3 -2
  38. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +16 -0
  39. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +3 -2
  40. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +16 -0
  41. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +3 -2
  42. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +22 -0
  43. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +5 -3
  44. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +31 -0
  45. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +7 -7
  46. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +7 -0
  47. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +2 -2
  48. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +10 -0
  49. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +3 -3
  50. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +35 -0
  51. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +2 -2
  52. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +20 -0
  53. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +2 -2
  54. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +30 -0
  55. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +15 -11
  56. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +25 -0
  57. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +2 -2
  58. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +8 -0
  59. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +2 -2
  60. package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +8 -0
  61. package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +65 -0
  62. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +81 -0
  63. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +20 -12
  64. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +14 -0
  65. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -2
  66. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +38 -0
  67. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +7 -6
  68. package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.d.ts +12 -0
  69. package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.js +2 -2
  70. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +16 -0
  71. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +62 -0
  72. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +9 -0
  73. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -2
  74. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +16 -0
  75. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +3 -2
  76. package/dist/modules/agent/runtime/app/tools/helpers.d.ts +8 -2
  77. package/dist/modules/agent/runtime/app/tools/helpers.js +9 -9
  78. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +22 -0
  79. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +3 -2
  80. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +21 -0
  81. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +3 -2
  82. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +20 -0
  83. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +3 -2
  84. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +19 -0
  85. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +3 -2
  86. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +25 -5
  87. package/dist/modules/agent/runtime/app/tools/schemas.js +37 -10
  88. package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +15 -0
  89. package/dist/modules/agent/runtime/app/tools/search_content/index.js +8 -7
  90. package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +5 -1
  91. package/dist/modules/agent/runtime/app/tools/search_media/index.js +3 -3
  92. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +16 -0
  93. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +2 -2
  94. package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +13 -0
  95. package/dist/modules/agent/runtime/app/tools/search_templates/index.js +2 -2
  96. package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +15 -0
  97. package/dist/modules/agent/runtime/app/tools/search_text/index.js +2 -2
  98. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +1 -1
  99. package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +2 -2
  100. package/dist/modules/agent/runtime/app/tools/select_media/index.js +2 -2
  101. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +19 -0
  102. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +3 -2
  103. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +17 -0
  104. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +3 -2
  105. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +13 -4
  106. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.js +8 -7
  107. package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +17 -0
  108. package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +2 -2
  109. package/dist/modules/agent/runtime/app/types/index.d.ts +6 -9
  110. package/dist/modules/agent/runtime/app/types/index.js +4 -3
  111. package/dist/modules/agent/runtime/server/agent.js +1 -2
  112. package/dist/modules/agent/runtime/server/classes/Session/index.d.ts +2 -2
  113. package/dist/modules/agent/runtime/server/classes/Session/index.js +10 -5
  114. package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +2 -1
  115. package/dist/modules/agent/runtime/shared/toolParams.d.ts +19 -0
  116. package/dist/modules/agent/runtime/shared/toolParams.js +6 -0
  117. package/dist/modules/agent/runtime/shared/toolResult.d.ts +4 -0
  118. package/dist/modules/agent/runtime/shared/toolResult.js +5 -0
  119. package/dist/modules/agent/runtime/shared/types.d.ts +23 -4
  120. package/dist/modules/agent/runtime/shared/types.js +6 -1
  121. package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +4 -13
  122. package/dist/modules/drupal/graphql/features/notifications.graphql +39 -0
  123. package/dist/modules/drupal/index.mjs +6 -1
  124. package/dist/modules/drupal/runtime/adapter/index.js +38 -0
  125. package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +0 -1
  126. package/dist/runtime/editor/components/Actions/ScrollArrow/index.d.vue.ts +13 -0
  127. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue +52 -0
  128. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue.d.ts +13 -0
  129. package/dist/runtime/editor/components/Actions/Title/index.vue +9 -8
  130. package/dist/runtime/editor/components/Actions/index.vue +47 -7
  131. package/dist/runtime/editor/components/Actions/useToolbarScroll.d.ts +25 -0
  132. package/dist/runtime/editor/components/Actions/useToolbarScroll.js +125 -0
  133. package/dist/runtime/editor/components/AddListItem/index.vue +0 -2
  134. package/dist/runtime/editor/components/AppMenu/MenuButton.vue +1 -3
  135. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -1
  136. package/dist/runtime/editor/components/Avatar/index.vue +0 -1
  137. package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
  138. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
  139. package/dist/runtime/editor/components/BundleSelector/index.vue +0 -4
  140. package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
  141. package/dist/runtime/editor/components/Dialog/index.vue +1 -3
  142. package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
  143. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +8 -0
  144. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +12 -2
  145. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +8 -0
  146. package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +8 -0
  147. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +14 -2
  148. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +8 -0
  149. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +2 -2
  150. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +0 -2
  151. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +2 -2
  152. package/dist/runtime/editor/components/DiffApproval/index.vue +3 -2
  153. package/dist/runtime/editor/components/Dropdown/index.vue +0 -39
  154. package/dist/runtime/editor/components/DropdownItem/index.d.vue.ts +12 -2
  155. package/dist/runtime/editor/components/DropdownItem/index.vue +46 -2
  156. package/dist/runtime/editor/components/DropdownItem/index.vue.d.ts +12 -2
  157. package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
  158. package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
  159. package/dist/runtime/editor/components/Form/Datepicker/index.vue +0 -1
  160. package/dist/runtime/editor/components/Form/TextDark/index.vue +0 -1
  161. package/dist/runtime/editor/components/Form/Textarea/index.vue +0 -1
  162. package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
  163. package/dist/runtime/editor/components/Form/Toggle/index.vue +9 -2
  164. package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
  165. package/dist/runtime/editor/components/FormOverlay/index.vue +0 -1
  166. package/dist/runtime/editor/components/Icon/index.vue +0 -2
  167. package/dist/runtime/editor/components/Messages/Item/index.vue +4 -1
  168. package/dist/runtime/editor/components/Messages/index.vue +3 -0
  169. package/dist/runtime/editor/components/Panel/Sheet/index.vue +1 -1
  170. package/dist/runtime/editor/components/Popup/index.vue +0 -2
  171. package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +1 -1
  172. package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +1 -1
  173. package/dist/runtime/editor/components/ScheduleDate/index.vue +1 -3
  174. package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +1 -1
  175. package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +1 -1
  176. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.d.vue.ts +3 -0
  177. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +74 -0
  178. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue.d.ts +3 -0
  179. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.d.vue.ts +7 -0
  180. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue +16 -0
  181. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue.d.ts +7 -0
  182. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.d.vue.ts +3 -0
  183. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue +57 -0
  184. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue.d.ts +3 -0
  185. package/dist/runtime/editor/components/Toolbar/index.vue +3 -56
  186. package/dist/runtime/editor/components/ToolbarDropdown/index.d.vue.ts +21 -0
  187. package/dist/runtime/editor/components/ToolbarDropdown/index.vue +36 -0
  188. package/dist/runtime/editor/components/ToolbarDropdown/index.vue.d.ts +21 -0
  189. package/dist/runtime/editor/components/Tooltip/Context.vue +3 -1
  190. package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
  191. package/dist/runtime/editor/components/Tooltip/index.vue +4 -1
  192. package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
  193. package/dist/runtime/editor/components/index.d.ts +1 -0
  194. package/dist/runtime/editor/components/index.js +1 -0
  195. package/dist/runtime/editor/composables/defineViewOption.d.ts +5 -0
  196. package/dist/runtime/editor/composables/defineViewOption.js +10 -0
  197. package/dist/runtime/editor/composables/index.d.ts +3 -0
  198. package/dist/runtime/editor/composables/index.js +2 -0
  199. package/dist/runtime/editor/composables/useDismiss.d.ts +30 -0
  200. package/dist/runtime/editor/composables/useDismiss.js +43 -0
  201. package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +3 -3
  202. package/dist/runtime/editor/css/output.css +1 -1
  203. package/dist/runtime/editor/events/index.d.ts +23 -0
  204. package/dist/runtime/editor/features/add-list/Actions/index.vue +0 -1
  205. package/dist/runtime/editor/features/add-list/Blocks/index.vue +0 -1
  206. package/dist/runtime/editor/features/add-list/Help/Item.vue +2 -7
  207. package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
  208. package/dist/runtime/editor/features/add-list/index.vue +0 -2
  209. package/dist/runtime/editor/features/anchors/index.vue +11 -11
  210. package/dist/runtime/editor/features/anchors/types.d.ts +1 -0
  211. package/dist/runtime/editor/features/anchors/types.js +1 -0
  212. package/dist/runtime/editor/features/artboard/Renderer.vue +30 -28
  213. package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +0 -3
  214. package/dist/runtime/editor/features/block-scheduler/index.vue +0 -1
  215. package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +0 -4
  216. package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +0 -5
  217. package/dist/runtime/editor/features/changelog/changelog.json +16 -0
  218. package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -3
  219. package/dist/runtime/editor/features/command-palette/Palette/index.vue +0 -1
  220. package/dist/runtime/editor/features/comments/AddForm/index.vue +0 -1
  221. package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +0 -4
  222. package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +14 -0
  223. package/dist/runtime/editor/features/comments/Comment/index.vue +29 -8
  224. package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +14 -0
  225. package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +1 -1
  226. package/dist/runtime/editor/features/comments/CommentInput/index.vue +0 -3
  227. package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +1 -1
  228. package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +0 -1
  229. package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +16 -0
  230. package/dist/runtime/editor/features/comments/Sidebar/index.vue +13 -8
  231. package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +16 -0
  232. package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +0 -1
  233. package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +16 -0
  234. package/dist/runtime/editor/features/comments/Thread/index.vue +26 -6
  235. package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +16 -0
  236. package/dist/runtime/editor/features/comments/index.vue +28 -3
  237. package/dist/runtime/editor/features/delete/types.d.ts +1 -0
  238. package/dist/runtime/editor/features/delete/types.js +1 -0
  239. package/dist/runtime/editor/features/dev-mode/index.vue +17 -15
  240. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -0
  241. package/dist/runtime/editor/features/duplicate/types.d.ts +1 -0
  242. package/dist/runtime/editor/features/duplicate/types.js +1 -0
  243. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +0 -2
  244. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
  245. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +0 -5
  246. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +0 -5
  247. package/dist/runtime/editor/features/editable-mask/index.vue +21 -20
  248. package/dist/runtime/editor/features/entity-title/index.vue +0 -4
  249. package/dist/runtime/editor/features/fragments/Dialog/index.vue +0 -4
  250. package/dist/runtime/editor/features/grid/index.vue +16 -15
  251. package/dist/runtime/editor/features/grid/types.d.ts +1 -0
  252. package/dist/runtime/editor/features/grid/types.js +1 -0
  253. package/dist/runtime/editor/features/help/Dialog/index.d.vue.ts +7 -0
  254. package/dist/runtime/editor/features/help/Dialog/index.vue +57 -0
  255. package/dist/runtime/editor/features/help/Dialog/index.vue.d.ts +7 -0
  256. package/dist/runtime/editor/features/help/index.vue +52 -47
  257. package/dist/runtime/editor/features/history/List/index.vue +2 -9
  258. package/dist/runtime/editor/features/history/types.d.ts +1 -0
  259. package/dist/runtime/editor/features/history/types.js +1 -0
  260. package/dist/runtime/editor/features/notifications/Item/index.d.vue.ts +4 -0
  261. package/dist/runtime/editor/features/notifications/Item/index.vue +96 -0
  262. package/dist/runtime/editor/features/notifications/Item/index.vue.d.ts +4 -0
  263. package/dist/runtime/editor/features/notifications/List/index.d.vue.ts +11 -0
  264. package/dist/runtime/editor/features/notifications/List/index.vue +126 -0
  265. package/dist/runtime/editor/features/notifications/List/index.vue.d.ts +11 -0
  266. package/dist/runtime/editor/features/notifications/docs.md +12 -0
  267. package/dist/runtime/editor/features/notifications/index.d.vue.ts +3 -0
  268. package/dist/runtime/editor/features/notifications/index.vue +123 -0
  269. package/dist/runtime/editor/features/notifications/index.vue.d.ts +3 -0
  270. package/dist/runtime/editor/features/notifications/types.d.ts +132 -0
  271. package/dist/runtime/editor/features/notifications/types.js +20 -0
  272. package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -2
  273. package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +14 -4
  274. package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
  275. package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +0 -1
  276. package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +0 -1
  277. package/dist/runtime/editor/features/options/Form/Group.vue +3 -1
  278. package/dist/runtime/editor/features/options/Form/Item.vue +1 -2
  279. package/dist/runtime/editor/features/options/Form/Number/index.vue +9 -3
  280. package/dist/runtime/editor/features/options/Form/Radios/index.vue +3 -2
  281. package/dist/runtime/editor/features/options/Form/Range/index.vue +8 -2
  282. package/dist/runtime/editor/features/options/Form/Text/index.vue +6 -2
  283. package/dist/runtime/editor/features/options/index.vue +7 -1
  284. package/dist/runtime/editor/features/ownership/Banner/index.vue +3 -1
  285. package/dist/runtime/editor/features/ownership/types.d.ts +1 -0
  286. package/dist/runtime/editor/features/ownership/types.js +1 -0
  287. package/dist/runtime/editor/features/preview-grant/types.d.ts +1 -0
  288. package/dist/runtime/editor/features/preview-grant/types.js +1 -0
  289. package/dist/runtime/editor/features/proxy-view/index.vue +24 -21
  290. package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +0 -2
  291. package/dist/runtime/editor/features/publish/Dialog/index.vue +1 -2
  292. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +0 -1
  293. package/dist/runtime/editor/features/revert/types.d.ts +1 -0
  294. package/dist/runtime/editor/features/revert/types.js +1 -0
  295. package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +18 -8
  296. package/dist/runtime/editor/features/swap/types.d.ts +1 -0
  297. package/dist/runtime/editor/features/swap/types.js +1 -0
  298. package/dist/runtime/editor/features/translations/Banner/index.vue +4 -1
  299. package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +4 -1
  300. package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +7 -2
  301. package/dist/runtime/editor/plugins/BlockIndicator/index.vue +0 -2
  302. package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +4 -36
  303. package/dist/runtime/editor/plugins/ItemAction/index.vue +0 -1
  304. package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
  305. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
  306. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +2 -2
  307. package/dist/runtime/editor/plugins/Sidebar/index.vue +7 -50
  308. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
  309. package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +8 -2
  310. package/dist/runtime/editor/plugins/ToolbarButton/index.vue +122 -28
  311. package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +8 -2
  312. package/dist/runtime/editor/plugins/index.d.ts +1 -2
  313. package/dist/runtime/editor/plugins/index.js +1 -3
  314. package/dist/runtime/editor/providers/fieldValue.js +11 -13
  315. package/dist/runtime/editor/providers/plugin.d.ts +12 -0
  316. package/dist/runtime/editor/providers/plugin.js +9 -0
  317. package/dist/runtime/editor/translations/de.json +53 -19
  318. package/dist/runtime/editor/translations/fr.json +16 -4
  319. package/dist/runtime/editor/translations/gsw_CH.json +53 -19
  320. package/dist/runtime/editor/translations/it.json +16 -4
  321. package/package.json +6 -6
  322. package/dist/runtime/editor/plugins/ViewOption/index.d.vue.ts +0 -139
  323. package/dist/runtime/editor/plugins/ViewOption/index.vue +0 -99
  324. package/dist/runtime/editor/plugins/ViewOption/index.vue.d.ts +0 -139
@@ -25,22 +25,15 @@
25
25
 
26
26
  <script setup>
27
27
  import { Icon } from "#blokkli/editor/components";
28
- import { onBlokkliEvent } from "#blokkli/editor/composables";
29
- import {
30
- watch,
31
- ref,
32
- computed,
33
- onMounted,
34
- useBlokkli,
35
- onBeforeUnmount
36
- } from "#imports";
28
+ import { useDismiss } from "#blokkli/editor/composables";
29
+ import { ref, computed, useBlokkli } from "#imports";
37
30
  const props = defineProps({
38
31
  menu: { type: Array, required: true },
39
32
  x: { type: Number, required: true },
40
33
  y: { type: Number, required: true }
41
34
  });
42
35
  const emit = defineEmits(["close"]);
43
- const { ui, selection } = useBlokkli();
36
+ const { ui } = useBlokkli();
44
37
  const rootEl = ref(null);
45
38
  const innerStyle = computed(() => {
46
39
  const vp = ui.visibleViewportPadded.value;
@@ -53,18 +46,7 @@ const innerStyle = computed(() => {
53
46
  ...vertical
54
47
  };
55
48
  });
56
- onBlokkliEvent("keyPressed", (e) => {
57
- if (ui.hasDialogOpen.value) {
58
- return;
59
- }
60
- if (e.code === "Escape") {
61
- emit("close");
62
- }
63
- });
64
- onBlokkliEvent("window:clickAway", () => {
65
- emit("close");
66
- });
67
- watch(selection.uuids, () => emit("close"));
49
+ useDismiss({ element: rootEl, onDismiss: () => emit("close") });
68
50
  const onClick = async (index) => {
69
51
  const item = props.menu[index];
70
52
  if (item && item.type === "button") {
@@ -73,18 +55,4 @@ const onClick = async (index) => {
73
55
  }
74
56
  emit("close");
75
57
  };
76
- const onMouseDown = (e) => {
77
- if (!rootEl.value) {
78
- return;
79
- }
80
- if ((e.target instanceof HTMLElement || e.target instanceof SVGElement) && !e.target.contains(rootEl.value)) {
81
- emit("close");
82
- }
83
- };
84
- onMounted(() => {
85
- window.addEventListener("click", onMouseDown);
86
- });
87
- onBeforeUnmount(() => {
88
- window.removeEventListener("click", onMouseDown);
89
- });
90
58
  </script>
@@ -5,7 +5,6 @@
5
5
  v-show="!hidden"
6
6
  ref="el"
7
7
  :disabled="isDisabled"
8
- :data-test="'plugin-item-action-' + id"
9
8
  class="_bk_group/tooltip _bk_flex _bk_items-center _bk_shrink-0 _bk_justify-center _bk_relative _bk_lg:static _bk_z-50 _bk_size-50 _bk_lg:hover:bg-mono-700 _bk_text-mono-300 _bk_lg:hover:text-mono-50 _bk_group/button"
10
9
  :class="[
11
10
  {
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
34
34
  width: number;
35
35
  height: number;
36
36
  };
37
- minWidth: number;
38
37
  minHeight: number;
38
+ minWidth: number;
39
39
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
40
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
41
  declare const _default: typeof __VLS_export;
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
34
34
  width: number;
35
35
  height: number;
36
36
  };
37
- minWidth: number;
38
37
  minHeight: number;
38
+ minWidth: number;
39
39
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
40
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
41
  declare const _default: typeof __VLS_export;
@@ -200,9 +200,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
200
200
  width: number;
201
201
  height: number;
202
202
  };
203
- tourText: string;
204
- minWidth: number;
205
203
  minHeight: number;
204
+ minWidth: number;
205
+ tourText: string;
206
206
  region: SidebarRegion;
207
207
  tooltipTitle: string;
208
208
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -5,7 +5,11 @@
5
5
  ref="tourElement"
6
6
  class="bk-toolbar-button _bk_group/tooltip"
7
7
  :class="[
8
- { 'bk-is-active': activeSidebar === id && !isDisabled },
8
+ {
9
+ 'bk-is-active': activeSidebar === id && !isDisabled,
10
+ 'bk-has-dropdown-bottom': region === 'left',
11
+ 'bk-has-dropdown-left': region !== 'left'
12
+ },
9
13
  'bk-is-' + region
10
14
  ]"
11
15
  :disabled="isDisabled"
@@ -674,57 +678,10 @@ export default {
674
678
  flex-direction: column;
675
679
  }
676
680
  }
677
- :is(:is(.bk .bk-sidebar-container-tabs) .bk-toolbar-button):before {
678
- height: 0px;
679
- width: 0px;
680
- --bk-tw-border-style: solid;
681
- border-style: solid;
682
- --bk-tw-content: '';
683
- content: var(--bk-tw-content);
684
- position: absolute;
685
- bottom: 0px;
686
- left: 17.5px;
687
- transform-origin: bottom;
688
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --bk-tw-gradient-from, --bk-tw-gradient-via, --bk-tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
689
- transition-timing-function: var(--bk-tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));
690
- transition-duration: var(--bk-tw-duration, var(--default-transition-duration, 150ms));
691
- --bk-tw-scale-y: 0%;
692
- scale: var(--bk-tw-scale-x) var(--bk-tw-scale-y);
693
- border-width: 0 8px 6px;
694
- border-color: transparent transparent #ffffff transparent;
695
- }
696
- @media (width >= 64rem) {
697
- :is(.bk-is-right:is(:is(.bk .bk-sidebar-container-tabs) .bk-toolbar-button),.bk-is-right-bottom:is(:is(.bk .bk-sidebar-container-tabs) .bk-toolbar-button)):before {
698
- border-width: 10px 0 10px 10px;
699
- border-color: transparent transparent transparent #ffffff;
700
- position: absolute;
701
- top: 15px;
702
- left: 0px;
703
- transform-origin: 0;
704
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --bk-tw-gradient-from, --bk-tw-gradient-via, --bk-tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
705
- transition-timing-function: var(--bk-tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));
706
- transition-duration: var(--bk-tw-duration, var(--default-transition-duration, 150ms));
707
- --bk-tw-scale-x: 0%;
708
- scale: var(--bk-tw-scale-x) var(--bk-tw-scale-y);
709
- }
710
- .bk-is-left:is(:is(.bk .bk-sidebar-container-tabs) .bk-toolbar-button):before {
711
- border-width: 0 10px 10px;
712
- left: 15px;
713
- }
714
- }
715
- .bk-is-active:is(:is(.bk .bk-sidebar-container-tabs) .bk-toolbar-button) {
716
- background-color: rgb(var(--bk-theme-mono-700) / 1);
717
- }
718
- .bk-is-active:is(:is(.bk .bk-sidebar-container-tabs) .bk-toolbar-button):before {
719
- --bk-tw-scale-x: 100%;
720
- --bk-tw-scale-y: 100%;
721
- --bk-tw-scale-z: 100%;
722
- scale: var(--bk-tw-scale-x) var(--bk-tw-scale-y);
723
- }
724
681
  .bk .bk-sidebar-badge {
725
682
  position: absolute;
726
- top: 3px;
727
- right: 3px;
683
+ top: 5px;
684
+ right: 5px;
728
685
  display: flex;
729
686
  width: 18px;
730
687
  height: 18px;
@@ -200,9 +200,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
200
200
  width: number;
201
201
  height: number;
202
202
  };
203
- tourText: string;
204
- minWidth: number;
205
203
  minHeight: number;
204
+ minWidth: number;
205
+ tourText: string;
206
206
  region: SidebarRegion;
207
207
  tooltipTitle: string;
208
208
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -75,11 +75,17 @@ type __VLS_Props = {
75
75
  */
76
76
  noCommand?: boolean;
77
77
  };
78
- declare var __VLS_7: {};
78
+ declare var __VLS_7: {}, __VLS_14: {}, __VLS_30: {};
79
79
  type __VLS_Slots = {} & {
80
80
  default?: (props: typeof __VLS_7) => any;
81
+ } & {
82
+ 'icon-addon'?: (props: typeof __VLS_14) => any;
83
+ } & {
84
+ after?: (props: typeof __VLS_30) => any;
81
85
  };
82
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
86
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
87
+ el: any;
88
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
83
89
  click: (...args: any[]) => void;
84
90
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
85
91
  onClick?: ((...args: any[]) => any) | undefined;
@@ -1,38 +1,40 @@
1
1
  <template>
2
2
  <Teleport :to="'#bk-toolbar-' + region">
3
- <button
4
- ref="el"
5
- class="bk-toolbar-button _bk_group/tooltip"
6
- :disabled="disabled"
7
- :class="[
3
+ <div :style="{ order: weight || 0 }" class="_bk_relative">
4
+ <button
5
+ ref="el"
6
+ class="bk-toolbar-button _bk_group/tooltip"
7
+ :disabled="disabled"
8
+ :class="[
8
9
  { 'bk-is-active': active },
9
10
  id ? 'bk-is-' + id : void 0,
10
11
  $attrs.class
11
12
  ]"
12
- :data-test-toolbar-button="id"
13
- :style="{ order: weight || 0 }"
14
- @click.prevent.stop="onClick"
15
- >
16
- <slot>
17
- <Icon v-if="icon" :name="icon" />
18
- </slot>
19
- <Tooltip
20
- :label="title"
21
- :placement="tooltipPlacement"
22
- :margin="region === 'before-sidebar'"
13
+ @click.prevent.stop="onClick"
23
14
  >
24
- <template v-if="keyCode" #shortcut>
25
- <ShortcutIndicator
26
- :meta="meta"
27
- :shift="shift"
28
- :key-code="keyCode"
29
- :label="title"
30
- :group="shortcutGroup"
31
- @pressed="onClick"
32
- />
33
- </template>
34
- </Tooltip>
35
- </button>
15
+ <slot>
16
+ <Icon v-if="icon" :name="icon" />
17
+ <slot name="icon-addon" />
18
+ </slot>
19
+ <Tooltip
20
+ :label="title"
21
+ :placement="tooltipPlacement"
22
+ :margin="region === 'before-sidebar'"
23
+ >
24
+ <template v-if="keyCode" #shortcut>
25
+ <ShortcutIndicator
26
+ :meta="meta"
27
+ :shift="shift"
28
+ :key-code="keyCode"
29
+ :label="title"
30
+ :group="shortcutGroup"
31
+ @pressed="onClick"
32
+ />
33
+ </template>
34
+ </Tooltip>
35
+ </button>
36
+ <slot name="after" />
37
+ </div>
36
38
  </Teleport>
37
39
  </template>
38
40
 
@@ -100,8 +102,100 @@ defineTourItem(() => {
100
102
  element: () => el.value
101
103
  };
102
104
  });
105
+ defineExpose({ el });
103
106
  defineOptions({
104
107
  name: "PluginToolbarButton",
105
108
  inheritAttrs: false
106
109
  });
107
110
  </script>
111
+
112
+ <style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
113
+ .bk .bk-toolbar-button {
114
+ display: flex;
115
+ height: 40px;
116
+ min-width: 50px;
117
+ align-items: center;
118
+ justify-content: center;
119
+ gap: 5px;
120
+ padding-inline: 10px;
121
+ color: rgb(var(--bk-theme-mono-200) / 1);
122
+ }
123
+ @media (width >= 64rem) {
124
+ .bk .bk-toolbar-button {
125
+ height: 50px;
126
+ }
127
+ }
128
+ @media (width >= 64rem) {
129
+ @media (hover: hover) {
130
+ :is(.bk .bk-toolbar-button):not(.bk-is-active):hover {
131
+ background-color: rgb(var(--bk-theme-mono-700) / 1);
132
+ }
133
+ }
134
+ }
135
+ .bk-has-dropdown-left:is(.bk .bk-toolbar-button):before,.bk-has-dropdown-bottom:is(.bk .bk-toolbar-button):before {
136
+ height: 0px;
137
+ width: 0px;
138
+ --bk-tw-border-style: solid;
139
+ border-style: solid;
140
+ --bk-tw-content: '';
141
+ content: var(--bk-tw-content);
142
+ position: absolute;
143
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --bk-tw-gradient-from, --bk-tw-gradient-via, --bk-tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
144
+ transition-timing-function: var(--bk-tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));
145
+ transition-duration: var(--bk-tw-duration, var(--default-transition-duration, 150ms));
146
+ }
147
+ .bk-has-dropdown-bottom:is(.bk .bk-toolbar-button):before {
148
+ bottom: 0px;
149
+ transform-origin: bottom;
150
+ border-width: 0 10px 10px;
151
+ border-top-color: transparent;
152
+ border-right-color: transparent;
153
+ border-bottom-color: rgb(var(--bk-theme-mono-200) / 1);
154
+ border-left-color: transparent;
155
+ --bk-tw-scale-y: 0%;
156
+ scale: var(--bk-tw-scale-x) var(--bk-tw-scale-y);
157
+ left: calc(1 / 2 * 100%);
158
+ --bk-tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
159
+ translate: var(--bk-tw-translate-x) var(--bk-tw-translate-y);
160
+ }
161
+ .bk-has-dropdown-left:is(.bk .bk-toolbar-button):before {
162
+ border-width: 10px 0 10px 10px;
163
+ border-color: transparent transparent transparent #ffffff;
164
+ transform-origin: 0;
165
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --bk-tw-gradient-from, --bk-tw-gradient-via, --bk-tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
166
+ transition-timing-function: var(--bk-tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));
167
+ transition-duration: var(--bk-tw-duration, var(--default-transition-duration, 150ms));
168
+ --bk-tw-scale-x: 0%;
169
+ scale: var(--bk-tw-scale-x) var(--bk-tw-scale-y);
170
+ top: calc(1 / 2 * 100%);
171
+ left: 0px;
172
+ --bk-tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
173
+ translate: var(--bk-tw-translate-x) var(--bk-tw-translate-y);
174
+ }
175
+ .bk-is-active:is(.bk .bk-toolbar-button) {
176
+ background-color: rgb(var(--bk-theme-mono-700) / 1);
177
+ }
178
+ .bk-is-active:is(.bk .bk-toolbar-button):before {
179
+ --bk-tw-scale-x: 100% !important;
180
+ --bk-tw-scale-y: 100% !important;
181
+ --bk-tw-scale-z: 100% !important;
182
+ scale: var(--bk-tw-scale-x) var(--bk-tw-scale-y) !important;
183
+ }
184
+ .bk-is-inactive:is(.bk .bk-toolbar-button) {
185
+ color: rgb(var(--bk-theme-mono-600) / 1);
186
+ }
187
+ [disabled]:is(.bk .bk-toolbar-button) {
188
+ pointer-events: none;
189
+ color: rgb(var(--bk-theme-mono-700) / 1);
190
+ }
191
+ :is(.bk .bk-toolbar-button) svg {
192
+ width: 18px;
193
+ height: 18px;
194
+ }
195
+ @media (width >= 64rem) {
196
+ :is(.bk .bk-toolbar-button) svg {
197
+ width: 20px;
198
+ height: 20px;
199
+ }
200
+ }
201
+ </style>
@@ -75,11 +75,17 @@ type __VLS_Props = {
75
75
  */
76
76
  noCommand?: boolean;
77
77
  };
78
- declare var __VLS_7: {};
78
+ declare var __VLS_7: {}, __VLS_14: {}, __VLS_30: {};
79
79
  type __VLS_Slots = {} & {
80
80
  default?: (props: typeof __VLS_7) => any;
81
+ } & {
82
+ 'icon-addon'?: (props: typeof __VLS_14) => any;
83
+ } & {
84
+ after?: (props: typeof __VLS_30) => any;
81
85
  };
82
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
86
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
87
+ el: any;
88
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
83
89
  click: (...args: any[]) => void;
84
90
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
85
91
  onClick?: ((...args: any[]) => any) | undefined;
@@ -5,5 +5,4 @@ import PluginItemAction from './ItemAction/index.vue.js';
5
5
  import PluginSidebar from './Sidebar/index.vue.js';
6
6
  import PluginToolbarButton from './ToolbarButton/index.vue.js';
7
7
  import PluginTourItem from './TourItem/index.vue.js';
8
- import PluginViewOption from './ViewOption/index.vue.js';
9
- export { PluginBlockIndicator, PluginContextMenu, PluginDebugOverlay, PluginItemAction, PluginSidebar, PluginToolbarButton, PluginTourItem, PluginViewOption, };
8
+ export { PluginBlockIndicator, PluginContextMenu, PluginDebugOverlay, PluginItemAction, PluginSidebar, PluginToolbarButton, PluginTourItem, };
@@ -5,7 +5,6 @@ import PluginItemAction from "./ItemAction/index.vue";
5
5
  import PluginSidebar from "./Sidebar/index.vue";
6
6
  import PluginToolbarButton from "./ToolbarButton/index.vue";
7
7
  import PluginTourItem from "./TourItem/index.vue";
8
- import PluginViewOption from "./ViewOption/index.vue";
9
8
  export {
10
9
  PluginBlockIndicator,
11
10
  PluginContextMenu,
@@ -13,6 +12,5 @@ export {
13
12
  PluginItemAction,
14
13
  PluginSidebar,
15
14
  PluginToolbarButton,
16
- PluginTourItem,
17
- PluginViewOption
15
+ PluginTourItem
18
16
  };
@@ -17,11 +17,6 @@ export default function fieldValueProvider(directive, state, types, definitions,
17
17
  )?.[0] ?? null;
18
18
  }
19
19
  function readFieldValue(fieldName, host) {
20
- const element = directive.findEditableElement(fieldName, host);
21
- if (!element) {
22
- return null;
23
- }
24
- const editableData = directive.findEditable(fieldName, host);
25
20
  const cfg = types.editableFieldConfig.forName(
26
21
  host.type,
27
22
  host.bundle,
@@ -31,8 +26,6 @@ export default function fieldValueProvider(directive, state, types, definitions,
31
26
  return null;
32
27
  }
33
28
  const fieldType = cfg.type === "frame" || cfg.type === "markup" ? "markup" : "plain";
34
- const isMarkup = cfg.type !== "plain";
35
- const isComponent = !!editableData?.isComponent;
36
29
  const providerDefinition = definitions.getProviderDefinition(
37
30
  host.type,
38
31
  host.bundle
@@ -54,15 +47,20 @@ export default function fieldValueProvider(directive, state, types, definitions,
54
47
  matchingProp = findMatchingProp(mapping, fieldName);
55
48
  }
56
49
  }
50
+ if (matchingProp) {
51
+ const value2 = providerDefinition ? state.mutatedEntity.value[matchingProp] || "" : state.getFieldListItem(host.uuid)?.props?.[matchingProp] ?? "";
52
+ return { value: value2, fieldType };
53
+ }
54
+ const element = directive.findEditableElement(fieldName, host);
55
+ if (!element) {
56
+ return null;
57
+ }
58
+ const editableData = directive.findEditable(fieldName, host);
59
+ const isMarkup = cfg.type !== "plain";
60
+ const isComponent = !!editableData?.isComponent;
57
61
  let value;
58
62
  if (isComponent && editableData?.getValue) {
59
63
  value = editableData.getValue();
60
- } else if (matchingProp) {
61
- if (providerDefinition) {
62
- value = state.mutatedEntity.value[matchingProp] || "";
63
- } else {
64
- value = state.getFieldListItem(host.uuid)?.props?.[matchingProp] ?? "";
65
- }
66
64
  } else if (isMarkup) {
67
65
  value = element.innerHTML;
68
66
  } else {
@@ -39,17 +39,29 @@ export type HighlightItem = {
39
39
  onClick: () => void;
40
40
  };
41
41
  type HighlightFunction = PluginAddFunction<HighlightItem>;
42
+ export type ViewOption = {
43
+ id: string;
44
+ label: string;
45
+ description: string;
46
+ icon: BlokkliIcon;
47
+ keyCode?: string;
48
+ tourText?: string;
49
+ weight?: number;
50
+ };
51
+ type ViewOptionFunction = PluginAddFunction<ViewOption>;
42
52
  type PluginFunctionMap = {
43
53
  addAction: AddActionFunction;
44
54
  itemDropdownAction: ItemDropdownActionFunction;
45
55
  menuButton: MenuButtonFunction;
46
56
  highlight: HighlightFunction;
57
+ viewOption: ViewOptionFunction;
47
58
  };
48
59
  type PluginDataMap = {
49
60
  addAction: AddAction;
50
61
  itemDropdownAction: ItemDropdownAction;
51
62
  menuButton: MenuButtonPlugin;
52
63
  highlight: HighlightItem;
64
+ viewOption: ViewOption;
53
65
  };
54
66
  export type PluginProvider = {
55
67
  /**
@@ -4,6 +4,7 @@ export default function() {
4
4
  const itemDropdownActionPlugins = ref([]);
5
5
  const menuButtonPlugins = ref([]);
6
6
  const highlightPlugins = ref([]);
7
+ const viewOptionPlugins = ref([]);
7
8
  function add(type, fn) {
8
9
  if (type === "addAction") {
9
10
  addActionPlugins.value.push(fn);
@@ -13,6 +14,8 @@ export default function() {
13
14
  menuButtonPlugins.value.push(fn);
14
15
  } else if (type === "highlight") {
15
16
  highlightPlugins.value.push(fn);
17
+ } else if (type === "viewOption") {
18
+ viewOptionPlugins.value.push(fn);
16
19
  }
17
20
  }
18
21
  function remove(type, fn) {
@@ -32,6 +35,10 @@ export default function() {
32
35
  highlightPlugins.value = highlightPlugins.value.filter(
33
36
  (v) => v !== fn
34
37
  );
38
+ } else if (type === "viewOption") {
39
+ viewOptionPlugins.value = viewOptionPlugins.value.filter(
40
+ (v) => v !== fn
41
+ );
35
42
  }
36
43
  }
37
44
  function get(type) {
@@ -44,6 +51,8 @@ export default function() {
44
51
  storage = menuButtonPlugins.value;
45
52
  } else if (type === "highlight") {
46
53
  storage = highlightPlugins.value;
54
+ } else if (type === "viewOption") {
55
+ storage = viewOptionPlugins.value;
47
56
  } else {
48
57
  return [];
49
58
  }