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

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 (217) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +28 -11
  3. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +29 -0
  4. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +172 -0
  5. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +29 -0
  6. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +19 -0
  7. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +80 -0
  8. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +16 -0
  9. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +1 -1
  10. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +12 -9
  11. package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +2 -0
  12. package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +65 -0
  13. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +2 -0
  14. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +62 -0
  15. package/dist/modules/agent/runtime/app/tools/helpers.d.ts +8 -2
  16. package/dist/modules/agent/runtime/app/tools/helpers.js +9 -9
  17. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +12 -0
  18. package/dist/modules/agent/runtime/app/tools/schemas.js +20 -0
  19. package/dist/modules/agent/runtime/app/tools/search_media/index.js +1 -1
  20. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +1 -1
  21. package/dist/modules/agent/runtime/server/agent.js +0 -1
  22. package/dist/modules/agent/runtime/server/classes/Session/index.js +4 -0
  23. package/dist/modules/agent/runtime/shared/toolResult.d.ts +4 -0
  24. package/dist/modules/agent/runtime/shared/toolResult.js +5 -0
  25. package/dist/modules/drupal/graphql/features/notifications.graphql +39 -0
  26. package/dist/modules/drupal/index.mjs +6 -1
  27. package/dist/modules/drupal/runtime/adapter/index.js +38 -0
  28. package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +0 -1
  29. package/dist/runtime/editor/components/Actions/ScrollArrow/index.d.vue.ts +13 -0
  30. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue +52 -0
  31. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue.d.ts +13 -0
  32. package/dist/runtime/editor/components/Actions/Title/index.vue +2 -2
  33. package/dist/runtime/editor/components/Actions/index.vue +47 -7
  34. package/dist/runtime/editor/components/Actions/useToolbarScroll.d.ts +25 -0
  35. package/dist/runtime/editor/components/Actions/useToolbarScroll.js +125 -0
  36. package/dist/runtime/editor/components/AddListItem/index.vue +0 -2
  37. package/dist/runtime/editor/components/AppMenu/MenuButton.vue +1 -3
  38. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -1
  39. package/dist/runtime/editor/components/Avatar/index.vue +0 -1
  40. package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
  41. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
  42. package/dist/runtime/editor/components/BundleSelector/index.vue +0 -4
  43. package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
  44. package/dist/runtime/editor/components/Dialog/index.vue +1 -3
  45. package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
  46. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +8 -0
  47. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +12 -2
  48. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +8 -0
  49. package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +8 -0
  50. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +14 -2
  51. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +8 -0
  52. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +2 -2
  53. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +0 -2
  54. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +2 -2
  55. package/dist/runtime/editor/components/DiffApproval/index.vue +1 -0
  56. package/dist/runtime/editor/components/Form/Datepicker/index.vue +0 -1
  57. package/dist/runtime/editor/components/Form/TextDark/index.vue +0 -1
  58. package/dist/runtime/editor/components/Form/Textarea/index.vue +0 -1
  59. package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
  60. package/dist/runtime/editor/components/Form/Toggle/index.vue +9 -2
  61. package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
  62. package/dist/runtime/editor/components/FormOverlay/index.vue +0 -1
  63. package/dist/runtime/editor/components/Icon/index.vue +0 -2
  64. package/dist/runtime/editor/components/Messages/Item/index.vue +4 -1
  65. package/dist/runtime/editor/components/Messages/index.vue +3 -0
  66. package/dist/runtime/editor/components/Panel/Sheet/index.vue +1 -1
  67. package/dist/runtime/editor/components/Popup/index.vue +0 -2
  68. package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +1 -1
  69. package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +1 -1
  70. package/dist/runtime/editor/components/ScheduleDate/index.vue +1 -3
  71. package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +1 -1
  72. package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +1 -1
  73. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.d.vue.ts +3 -0
  74. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +74 -0
  75. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue.d.ts +3 -0
  76. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.d.vue.ts +7 -0
  77. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue +16 -0
  78. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue.d.ts +7 -0
  79. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.d.vue.ts +3 -0
  80. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue +57 -0
  81. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue.d.ts +3 -0
  82. package/dist/runtime/editor/components/Toolbar/index.vue +3 -56
  83. package/dist/runtime/editor/components/ToolbarDropdown/index.d.vue.ts +21 -0
  84. package/dist/runtime/editor/components/ToolbarDropdown/index.vue +36 -0
  85. package/dist/runtime/editor/components/ToolbarDropdown/index.vue.d.ts +21 -0
  86. package/dist/runtime/editor/components/Tooltip/Context.vue +3 -1
  87. package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
  88. package/dist/runtime/editor/components/Tooltip/index.vue +4 -1
  89. package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
  90. package/dist/runtime/editor/components/index.d.ts +1 -0
  91. package/dist/runtime/editor/components/index.js +1 -0
  92. package/dist/runtime/editor/composables/defineViewOption.d.ts +5 -0
  93. package/dist/runtime/editor/composables/defineViewOption.js +10 -0
  94. package/dist/runtime/editor/composables/index.d.ts +3 -0
  95. package/dist/runtime/editor/composables/index.js +2 -0
  96. package/dist/runtime/editor/composables/useDismiss.d.ts +30 -0
  97. package/dist/runtime/editor/composables/useDismiss.js +43 -0
  98. package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +3 -3
  99. package/dist/runtime/editor/css/output.css +1 -1
  100. package/dist/runtime/editor/events/index.d.ts +23 -0
  101. package/dist/runtime/editor/features/add-list/Actions/index.vue +0 -1
  102. package/dist/runtime/editor/features/add-list/Blocks/index.vue +0 -1
  103. package/dist/runtime/editor/features/add-list/Help/Item.vue +2 -7
  104. package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
  105. package/dist/runtime/editor/features/add-list/index.vue +0 -2
  106. package/dist/runtime/editor/features/anchors/index.vue +11 -11
  107. package/dist/runtime/editor/features/anchors/types.d.ts +1 -0
  108. package/dist/runtime/editor/features/anchors/types.js +1 -0
  109. package/dist/runtime/editor/features/artboard/Renderer.vue +30 -28
  110. package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +0 -3
  111. package/dist/runtime/editor/features/block-scheduler/index.vue +0 -1
  112. package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +0 -4
  113. package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +0 -5
  114. package/dist/runtime/editor/features/changelog/changelog.json +8 -0
  115. package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -3
  116. package/dist/runtime/editor/features/command-palette/Palette/index.vue +0 -1
  117. package/dist/runtime/editor/features/comments/AddForm/index.vue +0 -1
  118. package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +0 -4
  119. package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +14 -0
  120. package/dist/runtime/editor/features/comments/Comment/index.vue +29 -8
  121. package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +14 -0
  122. package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +1 -1
  123. package/dist/runtime/editor/features/comments/CommentInput/index.vue +0 -3
  124. package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +1 -1
  125. package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +0 -1
  126. package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +16 -0
  127. package/dist/runtime/editor/features/comments/Sidebar/index.vue +13 -8
  128. package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +16 -0
  129. package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +0 -1
  130. package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +16 -0
  131. package/dist/runtime/editor/features/comments/Thread/index.vue +26 -6
  132. package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +16 -0
  133. package/dist/runtime/editor/features/comments/index.vue +28 -3
  134. package/dist/runtime/editor/features/delete/types.d.ts +1 -0
  135. package/dist/runtime/editor/features/delete/types.js +1 -0
  136. package/dist/runtime/editor/features/dev-mode/index.vue +17 -15
  137. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -0
  138. package/dist/runtime/editor/features/duplicate/types.d.ts +1 -0
  139. package/dist/runtime/editor/features/duplicate/types.js +1 -0
  140. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +0 -2
  141. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
  142. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +0 -5
  143. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +0 -5
  144. package/dist/runtime/editor/features/editable-mask/index.vue +21 -20
  145. package/dist/runtime/editor/features/entity-title/index.vue +0 -4
  146. package/dist/runtime/editor/features/fragments/Dialog/index.vue +0 -4
  147. package/dist/runtime/editor/features/grid/index.vue +16 -15
  148. package/dist/runtime/editor/features/grid/types.d.ts +1 -0
  149. package/dist/runtime/editor/features/grid/types.js +1 -0
  150. package/dist/runtime/editor/features/help/Dialog/index.d.vue.ts +7 -0
  151. package/dist/runtime/editor/features/help/Dialog/index.vue +57 -0
  152. package/dist/runtime/editor/features/help/Dialog/index.vue.d.ts +7 -0
  153. package/dist/runtime/editor/features/help/index.vue +52 -47
  154. package/dist/runtime/editor/features/history/List/index.vue +2 -9
  155. package/dist/runtime/editor/features/history/types.d.ts +1 -0
  156. package/dist/runtime/editor/features/history/types.js +1 -0
  157. package/dist/runtime/editor/features/notifications/Item/index.d.vue.ts +4 -0
  158. package/dist/runtime/editor/features/notifications/Item/index.vue +96 -0
  159. package/dist/runtime/editor/features/notifications/Item/index.vue.d.ts +4 -0
  160. package/dist/runtime/editor/features/notifications/List/index.d.vue.ts +11 -0
  161. package/dist/runtime/editor/features/notifications/List/index.vue +126 -0
  162. package/dist/runtime/editor/features/notifications/List/index.vue.d.ts +11 -0
  163. package/dist/runtime/editor/features/notifications/docs.md +12 -0
  164. package/dist/runtime/editor/features/notifications/index.d.vue.ts +3 -0
  165. package/dist/runtime/editor/features/notifications/index.vue +123 -0
  166. package/dist/runtime/editor/features/notifications/index.vue.d.ts +3 -0
  167. package/dist/runtime/editor/features/notifications/types.d.ts +132 -0
  168. package/dist/runtime/editor/features/notifications/types.js +20 -0
  169. package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -2
  170. package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +14 -4
  171. package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
  172. package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +0 -1
  173. package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +0 -1
  174. package/dist/runtime/editor/features/options/Form/Group.vue +3 -1
  175. package/dist/runtime/editor/features/options/Form/Item.vue +1 -2
  176. package/dist/runtime/editor/features/options/Form/Number/index.vue +9 -3
  177. package/dist/runtime/editor/features/options/Form/Radios/index.vue +3 -2
  178. package/dist/runtime/editor/features/options/Form/Range/index.vue +8 -2
  179. package/dist/runtime/editor/features/options/Form/Text/index.vue +6 -2
  180. package/dist/runtime/editor/features/options/index.vue +7 -1
  181. package/dist/runtime/editor/features/ownership/Banner/index.vue +3 -1
  182. package/dist/runtime/editor/features/ownership/types.d.ts +1 -0
  183. package/dist/runtime/editor/features/ownership/types.js +1 -0
  184. package/dist/runtime/editor/features/preview-grant/types.d.ts +1 -0
  185. package/dist/runtime/editor/features/preview-grant/types.js +1 -0
  186. package/dist/runtime/editor/features/proxy-view/index.vue +24 -21
  187. package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +0 -2
  188. package/dist/runtime/editor/features/publish/Dialog/index.vue +1 -2
  189. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +0 -1
  190. package/dist/runtime/editor/features/revert/types.d.ts +1 -0
  191. package/dist/runtime/editor/features/revert/types.js +1 -0
  192. package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +18 -8
  193. package/dist/runtime/editor/features/swap/types.d.ts +1 -0
  194. package/dist/runtime/editor/features/swap/types.js +1 -0
  195. package/dist/runtime/editor/features/translations/Banner/index.vue +4 -1
  196. package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +4 -1
  197. package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +7 -2
  198. package/dist/runtime/editor/plugins/BlockIndicator/index.vue +0 -2
  199. package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +4 -36
  200. package/dist/runtime/editor/plugins/ItemAction/index.vue +0 -1
  201. package/dist/runtime/editor/plugins/Sidebar/index.vue +7 -50
  202. package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +8 -2
  203. package/dist/runtime/editor/plugins/ToolbarButton/index.vue +122 -28
  204. package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +8 -2
  205. package/dist/runtime/editor/plugins/index.d.ts +1 -2
  206. package/dist/runtime/editor/plugins/index.js +1 -3
  207. package/dist/runtime/editor/providers/fieldValue.js +11 -13
  208. package/dist/runtime/editor/providers/plugin.d.ts +12 -0
  209. package/dist/runtime/editor/providers/plugin.js +9 -0
  210. package/dist/runtime/editor/translations/de.json +51 -19
  211. package/dist/runtime/editor/translations/fr.json +16 -4
  212. package/dist/runtime/editor/translations/gsw_CH.json +44 -19
  213. package/dist/runtime/editor/translations/it.json +16 -4
  214. package/package.json +4 -5
  215. package/dist/runtime/editor/plugins/ViewOption/index.d.vue.ts +0 -139
  216. package/dist/runtime/editor/plugins/ViewOption/index.vue +0 -99
  217. package/dist/runtime/editor/plugins/ViewOption/index.vue.d.ts +0 -139
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <div>
3
+ <ViewOptionButton
4
+ v-for="option in options"
5
+ :key="option.id"
6
+ v-bind="option"
7
+ />
8
+ </div>
9
+ </template>
10
+
11
+ <script setup>
12
+ import ViewOptionButton from "./Button/index.vue";
13
+ defineProps({
14
+ options: { type: Array, required: true }
15
+ });
16
+ </script>
@@ -0,0 +1,7 @@
1
+ import type { ViewOption } from '#blokkli/editor/providers/plugin';
2
+ type __VLS_Props = {
3
+ options: ViewOption[];
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <div
3
+ id="bk-toolbar-view-options"
4
+ class="_bk_relative _bk_group _bk_border-l _bk_border-l-mono-600"
5
+ >
6
+ <button
7
+ ref="toggleElement"
8
+ class="bk-toolbar-button bk-has-dropdown-bottom _bk_group/tooltip"
9
+ :class="{
10
+ 'bk-is-active': isVisible
11
+ }"
12
+ @click.prevent="isVisible = !isVisible"
13
+ >
14
+ <Icon name="bk_mdi_eye_tracking" />
15
+ <Tooltip
16
+ :label="$t('viewOptions', 'View options')"
17
+ placement="below-right"
18
+ />
19
+ </button>
20
+ <BlokkliTransition name="context-menu">
21
+ <ToolbarDropdown
22
+ v-if="isVisible"
23
+ :toggle-element
24
+ :title="$t('viewOptions', 'View options')"
25
+ class="_bk_origin-top-right"
26
+ @close="isVisible = false"
27
+ >
28
+ <ViewOptionsList :options />
29
+ </ToolbarDropdown>
30
+ </BlokkliTransition>
31
+ </div>
32
+ </template>
33
+
34
+ <script setup>
35
+ import { computed, ref, useBlokkli, useTemplateRef } from "#imports";
36
+ import ViewOptionsList from "./List/index.vue";
37
+ import {
38
+ Icon,
39
+ ToolbarDropdown,
40
+ Tooltip,
41
+ BlokkliTransition
42
+ } from "#blokkli/editor/components";
43
+ const { plugins, $t } = useBlokkli();
44
+ const isVisible = ref(false);
45
+ const toggleElement = useTemplateRef("toggleElement");
46
+ const options = computed(
47
+ () => [...plugins.get("viewOption")].sort(
48
+ (a, b) => (a.weight ?? 0) - (b.weight ?? 0)
49
+ )
50
+ );
51
+ </script>
52
+
53
+ <script>
54
+ export default {
55
+ name: "ToolbarViewOptions"
56
+ };
57
+ </script>
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -53,7 +53,6 @@
53
53
  <div class="bk bk-toolbar-menu">
54
54
  <button
55
55
  class="bk-toolbar-menu-button"
56
- data-test="app-menu-toggle"
57
56
  @click.prevent.stop="openMenu"
58
57
  >
59
58
  <Icon name="bk_mdi_menu" />
@@ -69,8 +68,8 @@
69
68
  <div id="bk-toolbar-before-title" class="bk-toolbar-container" />
70
69
  <div id="bk-toolbar-title" class="bk-toolbar-container" />
71
70
  <div id="bk-toolbar-after-title" class="bk-toolbar-container" />
72
- <div id="bk-toolbar-view-options" class="bk-toolbar-container" />
73
- <div id="bk-toolbar-artboard" class="bk-toolbar-container" />
71
+ <ViewOptions />
72
+ <div id="bk-toolbar-artboard" class="bk-toolbar-container _bk_group" />
74
73
  <div
75
74
  id="bk-toolbar-before-sidebar"
76
75
  class="bk-sidebar-container-tabs bk-toolbar-container"
@@ -113,6 +112,7 @@ import {
113
112
  useTemplateRef
114
113
  } from "#imports";
115
114
  import AppMenu from "./../AppMenu/index.vue";
115
+ import ViewOptions from "./ViewOptions/index.vue";
116
116
  import { onBlokkliEvent } from "#blokkli/editor/composables";
117
117
  const { ui, selection, storage } = useBlokkli();
118
118
  const isApproving = computed(() => ui.isApproving.value);
@@ -285,14 +285,6 @@ export default {
285
285
  display: flex;
286
286
  height: 100%;
287
287
  }
288
- #bk-toolbar-view-options:is(.bk .bk-toolbar-container) {
289
- display: none;
290
- }
291
- @media (width >= 64rem) {
292
- #bk-toolbar-view-options:is(.bk .bk-toolbar-container) {
293
- display: flex;
294
- }
295
- }
296
288
  #bk-toolbar-title:is(.bk .bk-toolbar-container) {
297
289
  flex: 1;
298
290
  font-size: var(--text-xs, 12px);
@@ -369,49 +361,4 @@ export default {
369
361
  :is(:is(#bk-toolbar-title:is(.bk .bk-toolbar-container) .bk-toolbar-title-scheduled) .bk-icon) svg {
370
362
  fill: currentcolor;
371
363
  }
372
- .bk .bk-toolbar-button {
373
- display: flex;
374
- height: 40px;
375
- min-width: 50px;
376
- align-items: center;
377
- justify-content: center;
378
- gap: 5px;
379
- padding-inline: 10px;
380
- color: rgb(var(--bk-theme-mono-200) / 1);
381
- }
382
- @media (width >= 64rem) {
383
- .bk .bk-toolbar-button {
384
- height: 50px;
385
- }
386
- }
387
- @media (width >= 64rem) {
388
- @media (hover: hover) {
389
- :is(.bk .bk-toolbar-button):not(.bk-is-active):hover {
390
- background-color: rgb(var(--bk-theme-mono-700) / 1);
391
- }
392
- }
393
- }
394
- .bk-is-active:is(.bk .bk-toolbar-button) {
395
- background-color: rgb(var(--bk-theme-mono-800) / 1);
396
- }
397
- .bk-is-inactive:is(.bk .bk-toolbar-button) {
398
- color: rgb(var(--bk-theme-mono-600) / 1);
399
- }
400
- [disabled]:is(.bk .bk-toolbar-button) {
401
- pointer-events: none;
402
- color: rgb(var(--bk-theme-mono-700) / 1);
403
- }
404
- :is(.bk .bk-toolbar-button) svg {
405
- width: 18px;
406
- height: 18px;
407
- }
408
- @media (width >= 64rem) {
409
- :is(.bk .bk-toolbar-button) svg {
410
- width: 20px;
411
- height: 20px;
412
- }
413
- }
414
- :is(.bk .bk-toolbar-button) .bk-icon svg {
415
- fill: currentcolor;
416
- }
417
364
  </style>
@@ -0,0 +1,21 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ toggleElement: HTMLElement | null;
4
+ };
5
+ declare var __VLS_6: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_6) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
+ close: () => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onClose?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <div
3
+ ref="rootEl"
4
+ class="_bk_absolute _bk_top-full _bk_right-0 _bk_bg-white _bk_shadow-2xl _bk_border _bk_border-mono-300 _bk_border-t-0"
5
+ >
6
+ <div
7
+ class="_bk_bg-mono-200 _bk_text-xs _bk_font-semibold _bk_uppercase _bk_tracking-wider _bk_border-b _bk_border-b-mono-300 _bk_flex _bk_h-40 _bk_items-center _bk_justify-between"
8
+ >
9
+ <div class="_bk_px-10">{{ title }}</div>
10
+ <button
11
+ class="_bk_size-40 _bk_flex _bk_items-center _bk_justify-center _bk_hover:bg-mono-300"
12
+ @click.prevent="$emit('close')"
13
+ >
14
+ <Icon name="bk_mdi_close" class="_bk_size-15" />
15
+ </button>
16
+ </div>
17
+ <slot />
18
+ </div>
19
+ </template>
20
+
21
+ <script setup>
22
+ import { useDismiss } from "#blokkli/editor/composables";
23
+ import { Icon } from "#blokkli/editor/components";
24
+ import { useTemplateRef } from "vue";
25
+ const props = defineProps({
26
+ title: { type: String, required: true },
27
+ toggleElement: { type: null, required: true }
28
+ });
29
+ const emit = defineEmits(["close"]);
30
+ const rootEl = useTemplateRef("rootEl");
31
+ useDismiss({
32
+ element: rootEl,
33
+ ignore: () => props.toggleElement,
34
+ onDismiss: () => emit("close")
35
+ });
36
+ </script>
@@ -0,0 +1,21 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ toggleElement: HTMLElement | null;
4
+ };
5
+ declare var __VLS_6: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_6) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
+ close: () => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onClose?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -1,7 +1,9 @@
1
1
  <template>
2
2
  <div class="_bk_mt-8 _bk_text-xs _bk_w-full">
3
3
  <strong>{{ label }}</strong>
4
- <span v-if="description">: {{ description }}</span>
4
+ <span v-if="description"
5
+ >: {{ description }}</span
6
+ >
5
7
  </div>
6
8
  </template>
7
9
 
@@ -14,8 +14,8 @@ type __VLS_Slots = {} & {
14
14
  };
15
15
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
16
  description: string | null;
17
- margin: boolean;
18
17
  placement: Placement | "inline";
18
+ margin: boolean;
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
21
  declare const _default: typeof __VLS_export;
@@ -30,7 +30,10 @@
30
30
  />
31
31
  <slot name="shortcut" />
32
32
  </div>
33
- <div v-if="description" class="_bk_font-normal _bk_mt-5 _bk_text-xs">
33
+ <div
34
+ v-if="description"
35
+ class="_bk_font-normal _bk_mt-5 _bk_text-xs"
36
+ >
34
37
  <div v-if="description" v-html="description" />
35
38
  </div>
36
39
  <slot name="status" />
@@ -14,8 +14,8 @@ type __VLS_Slots = {} & {
14
14
  };
15
15
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
16
  description: string | null;
17
- margin: boolean;
18
17
  placement: Placement | "inline";
18
+ margin: boolean;
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
21
  declare const _default: typeof __VLS_export;
@@ -58,6 +58,7 @@ export { default as NotEditStateInfo } from './NotEditStateInfo/index.vue.js';
58
58
  export { default as ButtonAction } from './ButtonAction/index.vue.js';
59
59
  export { default as Pill } from './Pill/index.vue.js';
60
60
  export { default as DialogModal } from './Dialog/index.vue.js';
61
+ export { default as ToolbarDropdown } from './ToolbarDropdown/index.vue.js';
61
62
  export declare const NestedEditorOverlay: any;
62
63
  export declare const BundleSelector: any;
63
64
  export declare const DiffApproval: any;
@@ -58,6 +58,7 @@ export { default as NotEditStateInfo } from "./NotEditStateInfo/index.vue";
58
58
  export { default as ButtonAction } from "./ButtonAction/index.vue";
59
59
  export { default as Pill } from "./Pill/index.vue";
60
60
  export { default as DialogModal } from "./Dialog/index.vue";
61
+ export { default as ToolbarDropdown } from "./ToolbarDropdown/index.vue";
61
62
  export const NestedEditorOverlay = defineAsyncComponent(
62
63
  () => import("./NestedEditorOverlay/index.vue")
63
64
  );
@@ -0,0 +1,5 @@
1
+ import type { ComputedRef } from 'vue';
2
+ import type { ViewOption } from '../providers/plugin.js';
3
+ export declare function defineViewOption(options: ViewOption): {
4
+ isVisible: ComputedRef<boolean>;
5
+ };
@@ -0,0 +1,10 @@
1
+ import { computed, onBeforeUnmount, onMounted, useBlokkli } from "#imports";
2
+ export function defineViewOption(options) {
3
+ const { storage, ui, plugins } = useBlokkli();
4
+ const isActive = storage.use("view_option_" + options.id, false, true);
5
+ const isVisible = computed(() => isActive.value && !ui.isMobile.value);
6
+ const cb = () => options;
7
+ onMounted(() => plugins.add("viewOption", cb));
8
+ onBeforeUnmount(() => plugins.remove("viewOption", cb));
9
+ return { isVisible };
10
+ }
@@ -11,6 +11,7 @@ export { defineMenuButton } from './defineMenuButton.js';
11
11
  export { defineRenderer } from './defineRenderer.js';
12
12
  export { defineShortcut } from './defineShortcut.js';
13
13
  export { defineTourItem } from './defineTourItem.js';
14
+ export { defineViewOption } from './defineViewOption.js';
14
15
  export { onBlokkliEvent } from './onBlokkliEvent.js';
15
16
  export { onBroadcastEvent } from './onBroadcastEvent.js';
16
17
  export { useAnimationFrame } from './useAnimationFrame.js';
@@ -18,6 +19,8 @@ export { useBlockRegistration } from './useBlockRegistration.js';
18
19
  export { useDebugLogger } from './useDebugLogger.js';
19
20
  export { useDelayedIntersectionObserver } from './useDelayedIntersectionObserver.js';
20
21
  export { useDialog } from './useDialog.js';
22
+ export { useDismiss } from './useDismiss.js';
23
+ export type { UseDismissOptions } from './useDismiss.js';
21
24
  export { useFocusTrap } from './useFocusTrap.js';
22
25
  export { useGlobalBlokkliObject } from './useGlobalBlokkliObject.js';
23
26
  export { useStateBasedCache } from './useStateBasedCache.js';
@@ -14,6 +14,7 @@ export { defineMenuButton } from "./defineMenuButton.js";
14
14
  export { defineRenderer } from "./defineRenderer.js";
15
15
  export { defineShortcut } from "./defineShortcut.js";
16
16
  export { defineTourItem } from "./defineTourItem.js";
17
+ export { defineViewOption } from "./defineViewOption.js";
17
18
  export { onBlokkliEvent } from "./onBlokkliEvent.js";
18
19
  export { onBroadcastEvent } from "./onBroadcastEvent.js";
19
20
  export { useAnimationFrame } from "./useAnimationFrame.js";
@@ -21,6 +22,7 @@ export { useBlockRegistration } from "./useBlockRegistration.js";
21
22
  export { useDebugLogger } from "./useDebugLogger.js";
22
23
  export { useDelayedIntersectionObserver } from "./useDelayedIntersectionObserver.js";
23
24
  export { useDialog } from "./useDialog.js";
25
+ export { useDismiss } from "./useDismiss.js";
24
26
  export { useFocusTrap } from "./useFocusTrap.js";
25
27
  export { useGlobalBlokkliObject } from "./useGlobalBlokkliObject.js";
26
28
  export { useStateBasedCache } from "./useStateBasedCache.js";
@@ -0,0 +1,30 @@
1
+ import type { MaybeRefOrGetter } from 'vue';
2
+ export type UseDismissOptions = {
3
+ /** Boundary element; interactions outside it dismiss. Ref or getter. */
4
+ element: MaybeRefOrGetter<HTMLElement | null | undefined>;
5
+ /**
6
+ * Called when a dismiss condition (outside click, canvas clickAway, Escape
7
+ * or a selection change) fires.
8
+ */
9
+ onDismiss: () => void;
10
+ /** Dismiss on Escape (unless a dialog is open). Defaults to true. */
11
+ escape?: boolean;
12
+ /**
13
+ * An additional element whose clicks should NOT dismiss — typically the
14
+ * trigger that toggles the dismissable element.
15
+ *
16
+ * Needed because the document click listener runs in the capture phase: the
17
+ * trigger's own `@click.stop` can't prevent it, so without this a click on
18
+ * the trigger would dismiss and then immediately re-open.
19
+ */
20
+ ignore?: MaybeRefOrGetter<HTMLElement | null | undefined>;
21
+ };
22
+ /**
23
+ * Close a floating element (dropdown, menu, popover) when the user clicks
24
+ * outside of it, presses Escape, or changes the editor selection.
25
+ *
26
+ * @example
27
+ * const root = useTemplateRef('root')
28
+ * useDismiss({ element: root, onDismiss: () => emit('close') })
29
+ */
30
+ export declare function useDismiss(options: UseDismissOptions): void;
@@ -0,0 +1,43 @@
1
+ import {
2
+ onMounted,
3
+ onBeforeUnmount,
4
+ toValue,
5
+ useBlokkli,
6
+ watch
7
+ } from "#imports";
8
+ import { onBlokkliEvent } from "./onBlokkliEvent.js";
9
+ export function useDismiss(options) {
10
+ const { ui, selection } = useBlokkli();
11
+ const onDocumentClick = (e) => {
12
+ const el = toValue(options.element);
13
+ if (!el) {
14
+ return;
15
+ }
16
+ const target = e.target;
17
+ if (el.contains(target)) {
18
+ return;
19
+ }
20
+ const ignore = toValue(options.ignore);
21
+ if (ignore && ignore.contains(target)) {
22
+ return;
23
+ }
24
+ options.onDismiss();
25
+ };
26
+ onBlokkliEvent("keyPressed", (e) => {
27
+ if (options.escape === false || ui.hasDialogOpen.value) {
28
+ return;
29
+ }
30
+ if (e.code === "Escape") {
31
+ options.onDismiss();
32
+ }
33
+ });
34
+ onBlokkliEvent("window:clickAway", options.onDismiss);
35
+ watch(selection.uuids, options.onDismiss);
36
+ watch(selection.isDragging, options.onDismiss);
37
+ onMounted(
38
+ () => document.addEventListener("click", onDocumentClick, { capture: true })
39
+ );
40
+ onBeforeUnmount(
41
+ () => document.removeEventListener("click", onDocumentClick, { capture: true })
42
+ );
43
+ }
@@ -10,9 +10,9 @@ export interface BlokkliGlobalWindowObject {
10
10
  * augments this interface with a `test` namespace (see the playground
11
11
  * `test-cases` feature).
12
12
  *
13
- * TODO: currently assigned unconditionally so E2E can run against a production
14
- * build (dev-mode E2E triggers HMR reloads). Re-gate behind `import.meta.dev`
15
- * so it never reaches a real production bundle once E2E can run in dev mode.
13
+ * The assignment is a test-only seam: its call site (in `EditProvider.vue`)
14
+ * is wrapped in `blokkli-test-only` markers and stripped from the published
15
+ * library during the dist build, so `.app` is never set in a real bundle.
16
16
  */
17
17
  app?: BlokkliApp;
18
18
  }