@blokkli/editor 2.0.0-alpha.22 → 2.0.0-alpha.24

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 (229) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +150 -226
  3. package/dist/runtime/blokkliPlugins/ContextMenu/index.vue +1 -1
  4. package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue +20 -14
  5. package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue.d.ts +8 -4
  6. package/dist/runtime/blokkliPlugins/Sidebar/index.vue +55 -25
  7. package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +5 -4
  8. package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue +9 -2
  9. package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue.d.ts +2 -0
  10. package/dist/runtime/blokkliPlugins/TourItem/index.vue +22 -13
  11. package/dist/runtime/blokkliPlugins/TourItem/index.vue.d.ts +1 -0
  12. package/dist/runtime/blokkliPlugins/ViewOption/index.vue +3 -1
  13. package/dist/runtime/blokkliPlugins/index.d.ts +1 -5
  14. package/dist/runtime/blokkliPlugins/index.js +0 -8
  15. package/dist/runtime/components/Blocks/FromLibrary/index.vue +0 -5
  16. package/dist/runtime/components/BlokkliEditable.vue +6 -1
  17. package/dist/runtime/components/BlokkliField.vue +1 -1
  18. package/dist/runtime/components/BlokkliProvider.vue +4 -4
  19. package/dist/runtime/components/BlokkliProvider.vue.d.ts +1 -1
  20. package/dist/runtime/components/Edit/Actions/ItemDropdown.vue +66 -0
  21. package/dist/runtime/components/Edit/Actions/ItemDropdown.vue.d.ts +6 -0
  22. package/dist/runtime/components/Edit/Actions/index.vue +80 -117
  23. package/dist/runtime/components/Edit/AddListItem/index.vue +8 -29
  24. package/dist/runtime/components/Edit/AddListItem/index.vue.d.ts +2 -3
  25. package/dist/runtime/components/Edit/AnimationCanvas/index.vue +23 -68
  26. package/dist/runtime/components/Edit/AppMenu/MenuButton.vue +39 -0
  27. package/dist/runtime/{blokkliPlugins/MenuButton/index.vue.d.ts → components/Edit/AppMenu/MenuButton.vue.d.ts} +0 -4
  28. package/dist/runtime/components/Edit/AppMenu/index.vue +62 -40
  29. package/dist/runtime/components/Edit/BlockProxy/index.vue +2 -8
  30. package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue +33 -49
  31. package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue.d.ts +14 -1
  32. package/dist/runtime/components/Edit/BlokkliRootErrorBoundary.vue +93 -0
  33. package/dist/runtime/components/Edit/BlokkliRootErrorBoundary.vue.d.ts +12 -0
  34. package/dist/runtime/components/Edit/Dialog/index.vue +26 -5
  35. package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +2 -0
  36. package/dist/runtime/components/Edit/DraggableList.vue +5 -25
  37. package/dist/runtime/components/Edit/EditProvider.vue +71 -41
  38. package/dist/runtime/components/Edit/EditProvider.vue.d.ts +1 -1
  39. package/dist/runtime/components/Edit/Features/AddList/Actions/Action.vue +52 -0
  40. package/dist/runtime/components/Edit/Features/AddList/Actions/Action.vue.d.ts +7 -0
  41. package/dist/runtime/components/Edit/Features/AddList/Actions/index.vue +41 -0
  42. package/dist/runtime/components/Edit/Features/{Selection/OverlayFallback → AddList/Actions}/index.vue.d.ts +1 -1
  43. package/dist/runtime/components/Edit/Features/{BlockAddList → AddList/Blocks}/index.vue +36 -108
  44. package/dist/runtime/components/Edit/Features/{Hover/Overlay → AddList/Blocks}/index.vue.d.ts +7 -2
  45. package/dist/runtime/components/Edit/Features/AddList/index.vue +76 -110
  46. package/dist/runtime/components/Edit/Features/Analyze/{Renderer.vue → Main.vue} +4 -8
  47. package/dist/runtime/components/Edit/Features/Analyze/{Overlay → Renderer}/fragment.glsl +10 -6
  48. package/dist/runtime/components/Edit/Features/Analyze/{Overlay → Renderer}/index.vue +43 -15
  49. package/dist/runtime/components/Edit/Features/Analyze/{Overlay → Renderer}/index.vue.d.ts +0 -2
  50. package/dist/runtime/components/Edit/Features/Analyze/{Overlay → Renderer}/vertex.glsl +11 -9
  51. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +15 -3
  52. package/dist/runtime/components/Edit/Features/Analyze/index.vue +7 -3
  53. package/dist/runtime/components/Edit/Features/Anchors/index.vue +2 -2
  54. package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +41 -20
  55. package/dist/runtime/components/Edit/Features/Artboard/Scrollbar/index.vue +3 -2
  56. package/dist/runtime/components/Edit/Features/Assistant/Overlay/index.vue +2 -28
  57. package/dist/runtime/components/Edit/Features/Assistant/index.vue +18 -14
  58. package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +1 -0
  59. package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue +2 -2
  60. package/dist/runtime/components/Edit/Features/Clipboard/List/index.vue +22 -11
  61. package/dist/runtime/components/Edit/Features/Clipboard/index.vue +70 -29
  62. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue +0 -2
  63. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue.d.ts +6 -4
  64. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +77 -27
  65. package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +7 -4
  66. package/dist/runtime/components/Edit/Features/Comments/index.vue +2 -2
  67. package/dist/runtime/components/Edit/Features/Conversions/index.vue +16 -9
  68. package/dist/runtime/components/Edit/Features/Debug/DebugSection.vue +24 -0
  69. package/dist/runtime/components/Edit/Features/Debug/DebugSection.vue.d.ts +16 -0
  70. package/dist/runtime/components/Edit/Features/Debug/Main.vue +80 -0
  71. package/dist/runtime/components/Edit/Features/Debug/Section/Features.vue +34 -0
  72. package/dist/runtime/components/Edit/Features/Debug/Section/Icons.vue +15 -0
  73. package/dist/runtime/components/Edit/Features/Debug/Section/Icons.vue.d.ts +2 -0
  74. package/dist/runtime/components/Edit/Features/Debug/Section/Keyboard.vue +17 -0
  75. package/dist/runtime/components/Edit/Features/Debug/Section/Keyboard.vue.d.ts +2 -0
  76. package/dist/runtime/components/Edit/Features/Debug/Section/Logging.vue +66 -0
  77. package/dist/runtime/components/Edit/Features/Debug/Section/Logging.vue.d.ts +6 -0
  78. package/dist/runtime/components/Edit/Features/Debug/Section/Rendering.vue +96 -0
  79. package/dist/runtime/components/Edit/Features/Debug/Section/Rendering.vue.d.ts +2 -0
  80. package/dist/runtime/components/Edit/Features/Debug/Section/Selection.vue +25 -0
  81. package/dist/runtime/components/Edit/Features/Debug/Section/Selection.vue.d.ts +2 -0
  82. package/dist/runtime/components/Edit/Features/Debug/index.vue +2 -2
  83. package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/DragItem.vue +113 -0
  84. package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/DragItem.vue.d.ts +25 -0
  85. package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +23 -119
  86. package/dist/runtime/components/Edit/Features/DraggingOverlay/Renderer/fragment.glsl +77 -0
  87. package/dist/runtime/components/Edit/Features/DraggingOverlay/{DropTargets → Renderer}/index.vue +138 -92
  88. package/dist/runtime/components/Edit/Features/DraggingOverlay/{DropTargets → Renderer}/vertex.glsl +60 -8
  89. package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +4 -5
  90. package/dist/runtime/components/Edit/Features/EditForm/index.vue +2 -2
  91. package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +0 -6
  92. package/dist/runtime/components/Edit/Features/EditableField/index.vue +8 -4
  93. package/dist/runtime/components/Edit/Features/Exit/index.vue +12 -9
  94. package/dist/runtime/components/Edit/Features/Fragments/Dialog/Item/index.vue +1 -5
  95. package/dist/runtime/components/Edit/Features/Fragments/index.vue +27 -31
  96. package/dist/runtime/components/Edit/Features/Hover/Renderer/fragment.glsl +141 -0
  97. package/dist/runtime/components/Edit/Features/Hover/{Overlay → Renderer}/index.vue +225 -38
  98. package/dist/runtime/components/Edit/Features/Hover/Renderer/index.vue.d.ts +2 -0
  99. package/dist/runtime/components/Edit/Features/Hover/{Overlay → Renderer}/vertex.glsl +49 -11
  100. package/dist/runtime/components/Edit/Features/Hover/index.vue +9 -6
  101. package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +1 -0
  102. package/dist/runtime/components/Edit/Features/ImportExisting/index.vue +25 -24
  103. package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +2 -2
  104. package/dist/runtime/components/Edit/Features/Library/LibraryDialog/Item/index.vue +1 -5
  105. package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +1 -0
  106. package/dist/runtime/components/Edit/Features/Library/index.vue +50 -36
  107. package/dist/runtime/components/Edit/Features/MediaLibrary/Library/Item.vue +1 -1
  108. package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +26 -13
  109. package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue.d.ts +0 -1
  110. package/dist/runtime/components/Edit/Features/MediaLibrary/index.vue +3 -47
  111. package/dist/runtime/components/Edit/Features/MultiSelect/{Overlay → Renderer}/fragment.glsl +13 -26
  112. package/dist/runtime/components/Edit/Features/MultiSelect/{Overlay → Renderer}/index.vue +131 -75
  113. package/dist/runtime/components/Edit/Features/MultiSelect/{Overlay → Renderer}/index.vue.d.ts +0 -1
  114. package/dist/runtime/components/Edit/Features/MultiSelect/{Overlay → Renderer}/vertex.glsl +27 -2
  115. package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +25 -12
  116. package/dist/runtime/components/Edit/Features/Ownership/index.vue +2 -2
  117. package/dist/runtime/components/Edit/Features/PreviewGrant/index.vue +2 -1
  118. package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +1 -0
  119. package/dist/runtime/components/Edit/Features/Publish/index.vue +17 -15
  120. package/dist/runtime/components/Edit/Features/ResponsivePreview/index.vue +1 -1
  121. package/dist/runtime/components/Edit/Features/Revert/index.vue +24 -18
  122. package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Content/index.vue +23 -6
  123. package/dist/runtime/components/Edit/Features/Search/index.vue +1 -1
  124. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +21 -17
  125. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +6 -6
  126. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/fragment.glsl +19 -17
  127. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +242 -131
  128. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/vertex.glsl +29 -12
  129. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +15 -10
  130. package/dist/runtime/components/Edit/Features/Selection/{Overlay → Renderer}/fragment.glsl +23 -14
  131. package/dist/runtime/components/Edit/Features/Selection/{Overlay → Renderer}/index.vue +121 -28
  132. package/dist/runtime/components/Edit/Features/Selection/{Overlay → Renderer}/index.vue.d.ts +0 -2
  133. package/dist/runtime/components/Edit/Features/Selection/{Overlay → Renderer}/vertex.glsl +23 -14
  134. package/dist/runtime/components/Edit/Features/Selection/index.vue +46 -59
  135. package/dist/runtime/components/Edit/Features/Settings/Dialog/index.vue +1 -0
  136. package/dist/runtime/components/Edit/Features/Settings/index.vue +25 -17
  137. package/dist/runtime/components/Edit/Features/TouchActionBar/index.vue +2 -2
  138. package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +1 -1
  139. package/dist/runtime/components/Edit/Features/Tour/Popup/index.vue +2 -2
  140. package/dist/runtime/components/Edit/Features/Tour/index.vue +12 -10
  141. package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue +5 -5
  142. package/dist/runtime/components/Edit/Features/Transform/index.vue +30 -23
  143. package/dist/runtime/components/Edit/Features/Translations/index.vue +18 -17
  144. package/dist/runtime/components/Edit/Form/Checkboxes/index.vue +43 -0
  145. package/dist/runtime/components/Edit/Form/Checkboxes/index.vue.d.ts +20 -0
  146. package/dist/runtime/components/Edit/FormOverlay/index.vue +13 -4
  147. package/dist/runtime/components/Edit/ItemIconBox/index.vue +41 -0
  148. package/dist/runtime/components/Edit/{AddListItemIcon → ItemIconBox}/index.vue.d.ts +5 -5
  149. package/dist/runtime/components/Edit/Konami/Game/index.vue +0 -1
  150. package/dist/runtime/components/Edit/Konami/index.vue +3 -5
  151. package/dist/runtime/components/Edit/Messages/Item/index.vue +11 -2
  152. package/dist/runtime/components/Edit/Messages/Item/index.vue.d.ts +1 -1
  153. package/dist/runtime/components/Edit/Messages/index.vue +6 -1
  154. package/dist/runtime/components/Edit/Overlay/index.vue +66 -0
  155. package/dist/runtime/components/Edit/Overlay/index.vue.d.ts +2 -0
  156. package/dist/runtime/components/Edit/PreviewProvider.vue +1 -1
  157. package/dist/runtime/components/Edit/Sortli/index.vue +5 -8
  158. package/dist/runtime/components/Edit/Sortli/index.vue.d.ts +2 -0
  159. package/dist/runtime/components/Edit/SystemRequirements/index.vue +36 -36
  160. package/dist/runtime/components/Edit/Toolbar/index.vue +47 -51
  161. package/dist/runtime/components/Edit/ViewportBlockingRect/index.vue +9 -2
  162. package/dist/runtime/components/Edit/ViewportBlockingRect/index.vue.d.ts +4 -1
  163. package/dist/runtime/components/Edit/index.d.ts +7 -5
  164. package/dist/runtime/components/Edit/index.js +13 -9
  165. package/dist/runtime/css/output.css +1 -1
  166. package/dist/runtime/helpers/animationProvider.d.ts +58 -9
  167. package/dist/runtime/helpers/animationProvider.js +318 -75
  168. package/dist/runtime/helpers/composables/defineAddAction.d.ts +2 -0
  169. package/dist/runtime/helpers/composables/defineAddAction.js +10 -0
  170. package/dist/runtime/helpers/composables/defineItemDropdownAction.d.ts +2 -0
  171. package/dist/runtime/helpers/composables/defineItemDropdownAction.js +10 -0
  172. package/dist/runtime/helpers/composables/defineMenuButton.d.ts +2 -0
  173. package/dist/runtime/helpers/composables/defineMenuButton.js +10 -0
  174. package/dist/runtime/helpers/composables/defineRenderer.d.ts +5 -2
  175. package/dist/runtime/helpers/composables/defineRenderer.js +3 -2
  176. package/dist/runtime/helpers/composables/useDialog.d.ts +3 -0
  177. package/dist/runtime/helpers/composables/useDialog.js +16 -0
  178. package/dist/runtime/helpers/composables/useGlobalBlokkliObject.d.ts +16 -0
  179. package/dist/runtime/helpers/composables/useGlobalBlokkliObject.js +36 -0
  180. package/dist/runtime/helpers/debugProvider.d.ts +13 -3
  181. package/dist/runtime/helpers/debugProvider.js +80 -12
  182. package/dist/runtime/helpers/defineElementStyle.d.ts +2 -0
  183. package/dist/runtime/helpers/defineElementStyle.js +33 -0
  184. package/dist/runtime/helpers/domProvider.d.ts +1 -0
  185. package/dist/runtime/helpers/domProvider.js +51 -32
  186. package/dist/runtime/helpers/dropTargets/index.d.ts +1 -1
  187. package/dist/runtime/helpers/dropTargets/index.js +18 -4
  188. package/dist/runtime/helpers/eventBus.d.ts +1 -1
  189. package/dist/runtime/helpers/index.d.ts +1 -6
  190. package/dist/runtime/helpers/index.js +0 -81
  191. package/dist/runtime/helpers/pluginProvider.d.ts +38 -3
  192. package/dist/runtime/helpers/pluginProvider.js +49 -18
  193. package/dist/runtime/helpers/providers/blocks.js +10 -0
  194. package/dist/runtime/helpers/providers/directive.d.ts +4 -1
  195. package/dist/runtime/helpers/providers/directive.js +9 -2
  196. package/dist/runtime/helpers/providers/fields.d.ts +9 -1
  197. package/dist/runtime/helpers/stateProvider.js +1 -0
  198. package/dist/runtime/helpers/uiProvider.d.ts +13 -12
  199. package/dist/runtime/helpers/uiProvider.js +117 -81
  200. package/dist/runtime/helpers/webgl/index.d.ts +2 -3
  201. package/dist/runtime/helpers/webgl/index.js +9 -14
  202. package/dist/runtime/icons/click.svg +1 -0
  203. package/dist/runtime/icons/dock-left.svg +1 -0
  204. package/dist/runtime/icons/dock-right.svg +1 -0
  205. package/dist/runtime/icons/dock-window.svg +1 -0
  206. package/dist/runtime/plugins/blokkliDirectives.js +1 -1
  207. package/dist/runtime/types/index.d.ts +16 -26
  208. package/package.json +1 -1
  209. package/dist/runtime/blokkliPlugins/AddAction/index.vue +0 -96
  210. package/dist/runtime/blokkliPlugins/AddAction/index.vue.d.ts +0 -26
  211. package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue +0 -56
  212. package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue.d.ts +0 -24
  213. package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue +0 -76
  214. package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue.d.ts +0 -31
  215. package/dist/runtime/blokkliPlugins/MenuButton/index.vue +0 -66
  216. package/dist/runtime/components/Edit/AddListItemIcon/index.vue +0 -19
  217. package/dist/runtime/components/Edit/Features/BlockAddList/docs.md +0 -15
  218. package/dist/runtime/components/Edit/Features/Debug/Renderer.vue +0 -240
  219. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/fragment.glsl +0 -96
  220. package/dist/runtime/components/Edit/Features/Hover/Overlay/fragment.glsl +0 -139
  221. package/dist/runtime/components/Edit/Features/Selection/OverlayFallback/index.vue +0 -42
  222. /package/dist/runtime/components/Edit/Features/Analyze/{Renderer.vue.d.ts → Main.vue.d.ts} +0 -0
  223. /package/dist/runtime/components/Edit/Features/Anchors/{Renderer.vue → Overlay/index.vue} +0 -0
  224. /package/dist/runtime/components/Edit/Features/{BlockAddList → Anchors/Overlay}/index.vue.d.ts +0 -0
  225. /package/dist/runtime/components/Edit/Features/Debug/{Renderer.vue.d.ts → Main.vue.d.ts} +0 -0
  226. /package/dist/runtime/components/Edit/Features/{Anchors/Renderer.vue.d.ts → Debug/Section/Features.vue.d.ts} +0 -0
  227. /package/dist/runtime/components/Edit/Features/DraggingOverlay/{DropTargets → Renderer}/index.vue.d.ts +0 -0
  228. /package/dist/runtime/components/Edit/Features/Ownership/{Renderer.vue → Banner/index.vue} +0 -0
  229. /package/dist/runtime/components/Edit/Features/Ownership/{Renderer.vue.d.ts → Banner/index.vue.d.ts} +0 -0
@@ -15,13 +15,20 @@
15
15
  </BlokkliTransition>
16
16
  </Teleport>
17
17
 
18
- <Renderer @toggle="onRendererToggle" @toggle-field="onRendererToggleField" />
18
+ <ErrorBoundary v-model="isLocked" label="Add Buttons">
19
+ <Renderer
20
+ v-if="!isLocked"
21
+ :key="animation.renderKey.value"
22
+ @toggle="onRendererToggle"
23
+ @toggle-field="onRendererToggleField"
24
+ />
25
+ </ErrorBoundary>
19
26
  </template>
20
27
 
21
28
  <script setup>
22
29
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
23
30
  import { computed, useBlokkli, ref, watch } from "#imports";
24
- import { BlokkliTransition } from "#blokkli/components";
31
+ import { BlokkliTransition, ErrorBoundary } from "#blokkli/components";
25
32
  import {
26
33
  getChildrenOrientation,
27
34
  getGapSize,
@@ -37,7 +44,8 @@ import { itemEntityType } from "#blokkli-build/config";
37
44
  const props = defineProps({
38
45
  items: { type: Array, required: true }
39
46
  });
40
- const { dom, state, eventBus, types, $t, blocks, fields } = useBlokkli();
47
+ const { dom, state, eventBus, types, $t, blocks, fields, animation } = useBlokkli();
48
+ const isLocked = ref(false);
41
49
  const shouldRender = computed(() => {
42
50
  return props.items.length === 1;
43
51
  });
@@ -180,12 +188,11 @@ function onSelectBundle(bundle) {
180
188
  });
181
189
  closeOverlay();
182
190
  }
183
- function onSelectAction(id) {
191
+ function onSelectAction(action) {
184
192
  if (!addData.value) {
185
193
  return;
186
194
  }
187
- eventBus.emit("action:placed", {
188
- id,
195
+ action.callback({
189
196
  field: addData.value.field,
190
197
  preceedingUuid: addData.value.preceedingUuid,
191
198
  host: { ...addData.value.host }
@@ -283,9 +290,7 @@ onBlokkliEvent("state:reloaded", () => {
283
290
  }
284
291
  });
285
292
  function setAddData(key, field, label, preceedingUuid, anchorEl, anchorCoordinates) {
286
- const allowedBundles = field.allowedBundles.filter(
287
- (bundle) => !isInternalBundle(bundle)
288
- );
293
+ const allowedBundles = field.allowedBundles;
289
294
  if (allowedBundles.length === 0) {
290
295
  return;
291
296
  }
@@ -322,7 +327,7 @@ function getPreceedingUuidBefore(uuid2, field) {
322
327
  if (!child) {
323
328
  continue;
324
329
  }
325
- const childUuid = child.dataset.uuid;
330
+ const childUuid = child.dataset.bkUuid;
326
331
  if (childUuid === uuid2) {
327
332
  return prevUuid;
328
333
  }
@@ -1,19 +1,27 @@
1
+ #version 300 es
2
+
1
3
  precision highp float;
2
4
 
3
- varying vec4 v_quad;
4
- varying vec3 v_color;
5
- varying vec4 v_rect_radius;
6
- varying float v_thickness;
7
- varying float v_rect_id;
8
- varying vec2 v_rect_size;
9
- varying vec2 v_rect_center;
10
- varying float v_rect_width;
11
-
12
- varying float v_transition;
13
- uniform float u_scale;
5
+ in vec4 v_quad;
6
+ in vec3 v_color;
7
+ in vec4 v_rect_radius;
8
+ in float v_thickness;
9
+ in float v_rect_id;
10
+ in vec2 v_rect_size;
11
+ in vec2 v_rect_center;
12
+ in float v_rect_width;
13
+
14
+ in float v_transition;
15
+ // Optimized varyings calculated in vertex shader
16
+ in float v_stripe_distance;
17
+ in vec4 v_base_scaled_radius;
18
+
19
+ out vec4 fragColor;
20
+
14
21
  uniform float u_dpi;
15
22
  uniform float u_time;
16
23
  uniform float u_is_transforming;
24
+ uniform float u_opacity;
17
25
  uniform vec2 u_resolution;
18
26
 
19
27
  #define PI 3.141592653589793
@@ -60,7 +68,7 @@ float exponentialIn(float t) {
60
68
  }
61
69
 
62
70
  float getStripePattern(vec2 quadRelativePos, float time) {
63
- float d = 300.0 * u_scale;
71
+ float d = v_stripe_distance;
64
72
 
65
73
  float t = mod(u_time + v_rect_id * 1000.0, 1200.0) / 1200.0;
66
74
 
@@ -87,7 +95,7 @@ vec4 drawBox(float thickness, vec4 bg, vec4 fill, vec4 border, float offset) {
87
95
 
88
96
  vec2 size = v_rect_size + borderThickness * 2.0 * v_transition;
89
97
  float u_edgeSoftness = 1.0 + v_transition;
90
- vec4 radius = v_rect_radius * u_scale + vec4(borderThickness);
98
+ vec4 radius = v_base_scaled_radius + vec4(borderThickness);
91
99
  vec4 u_cornerRadii = min(radius, min(size.x, size.y) / 2.0) * v_transition;
92
100
  float u_borderSoftness = 1.0 + v_transition;
93
101
 
@@ -134,5 +142,6 @@ void main() {
134
142
  );
135
143
 
136
144
  vec4 finalColor = mix(borderBottom, borderTop, borderTop.a);
137
- gl_FragColor = finalColor;
145
+ finalColor.a *= u_opacity;
146
+ fragColor = finalColor;
138
147
  }
@@ -18,16 +18,14 @@ import { useTransitionedValue } from "#blokkli/helpers/useTransitionedValue";
18
18
  import { toShaderColor } from "#blokkli/helpers";
19
19
  const props = defineProps({
20
20
  blocks: { type: Array, required: true },
21
- gl: { type: null, required: true },
22
21
  hasHostSelected: { type: Boolean, required: true }
23
22
  });
24
23
  const { animation, theme, dom, ui, state } = useBlokkli();
25
- const programInfo = animation.registerProgram("selection", props.gl, [vs, fs]);
26
24
  class SelectionRectangleBufferCollector extends RectangleBufferCollector {
27
25
  uuids = [];
28
26
  lastCount = 0;
29
27
  prevKey = "";
30
- getBufferInfo(force) {
28
+ getBufferInfo(gl, force) {
31
29
  const key = props.blocks.map((block) => {
32
30
  const uuid = block.uuid;
33
31
  const rect = dom.getBlockRect(uuid);
@@ -93,13 +91,12 @@ class SelectionRectangleBufferCollector extends RectangleBufferCollector {
93
91
  }
94
92
  this.prevKey = key;
95
93
  }
96
- if (hasChanged) {
97
- this.bufferInfo = this.createBufferInfo();
94
+ if (hasChanged && gl) {
95
+ this.bufferInfo = this.createBufferInfo(gl);
98
96
  }
99
97
  return { info: this.bufferInfo, hasChanged };
100
98
  }
101
99
  }
102
- const collector = new SelectionRectangleBufferCollector(props.gl);
103
100
  const hasTransformingStyle = computed(
104
101
  () => ui.hasTransformOverlayOpen.value || ui.isTransforming.value
105
102
  );
@@ -109,68 +106,164 @@ const selectionColorOverride = computed(() => {
109
106
  return null;
110
107
  }
111
108
  if (color === "mono") {
112
- return toShaderColor(theme.getColor(color, "500"));
109
+ return theme.getColor(color, "500");
113
110
  } else if (color === "accent") {
114
- return toShaderColor(theme.getColor(color, "700"));
111
+ return theme.getColor(color, "700");
115
112
  }
116
- return toShaderColor(theme.getColor(color, "normal"));
113
+ return theme.getColor(color, "normal");
117
114
  });
118
115
  const getColorDefault = useTransitionedValue(() => {
119
116
  if (selectionColorOverride.value) {
120
117
  return selectionColorOverride.value;
121
118
  }
122
119
  if (hasTransformingStyle.value) {
123
- return toShaderColor(theme.orange.value.normal);
120
+ return theme.orange.value.normal;
124
121
  }
125
- return toShaderColor(theme.accent.value[600]);
122
+ return theme.accent.value[600];
126
123
  });
127
124
  const getColorInverted = useTransitionedValue(() => {
128
125
  if (selectionColorOverride.value) {
129
126
  return selectionColorOverride.value;
130
127
  }
131
128
  if (hasTransformingStyle.value) {
132
- return toShaderColor(theme.orange.value.normal);
129
+ return theme.orange.value.normal;
133
130
  }
134
- return toShaderColor([255, 255, 255]);
131
+ return [255, 255, 255];
135
132
  });
136
133
  const getColorLibrary = useTransitionedValue(() => {
137
134
  if (selectionColorOverride.value) {
138
135
  return selectionColorOverride.value;
139
136
  }
140
137
  if (hasTransformingStyle.value) {
141
- return toShaderColor(theme.orange.value.normal);
138
+ return theme.orange.value.normal;
142
139
  }
143
- return toShaderColor(theme.lime.value.normal);
140
+ return theme.lime.value.normal;
144
141
  });
145
142
  const getColorHost = useTransitionedValue(() => {
146
- return toShaderColor(theme.mono.value[700]);
143
+ return theme.mono.value[700];
147
144
  });
148
145
  const getTransforming = useTransitionedValue(() => {
149
146
  return ui.isTransforming.value ? 1 : 0;
150
147
  });
151
- defineRenderer("selection-overlay", {
148
+ const { collector } = defineRenderer("selection-overlay", {
152
149
  zIndex: 100,
153
- render: (ctx) => {
154
- props.gl.useProgram(programInfo.program);
155
- const { info } = collector.getBufferInfo();
150
+ collector: () => new SelectionRectangleBufferCollector(),
151
+ program: () => ({ shaders: [vs, fs] }),
152
+ render: (ctx, gl, program) => {
153
+ gl.useProgram(program.program);
154
+ const { info } = collector.getBufferInfo(gl);
156
155
  if (!info) {
157
156
  return;
158
157
  }
159
- setUniforms(programInfo, {
160
- u_color_default: getColorDefault(),
161
- u_color_inverted: getColorInverted(),
162
- u_color_library: getColorLibrary(),
163
- u_color_host: getColorHost(),
158
+ setUniforms(program, {
159
+ u_color_default: toShaderColor(getColorDefault()),
160
+ u_color_inverted: toShaderColor(getColorInverted()),
161
+ u_color_library: toShaderColor(getColorLibrary()),
162
+ u_color_host: toShaderColor(getColorHost()),
164
163
  u_artboard_size: [
165
164
  ui.artboardSize.value.width,
166
165
  ui.artboardSize.value.height
167
166
  ],
168
167
  u_is_transforming: getTransforming(),
168
+ u_opacity: ctx.changeOptionsTransition,
169
169
  u_time: ctx.time
170
170
  });
171
- animation.setSharedUniforms(props.gl, programInfo);
172
- setBuffersAndAttributes(props.gl, programInfo, info);
173
- drawBufferInfo(props.gl, info, props.gl.TRIANGLES);
171
+ animation.setSharedUniforms(gl, program);
172
+ setBuffersAndAttributes(gl, program, info);
173
+ drawBufferInfo(gl, info, gl.TRIANGLES);
174
+ },
175
+ renderFallback: (ctx, ctx2d) => {
176
+ collector.getBufferInfo();
177
+ const rects = Object.values(collector.rects);
178
+ if (rects.length === 0) {
179
+ return;
180
+ }
181
+ ctx2d.globalAlpha = ctx.changeOptionsTransition;
182
+ const rgbaToCss = (rgb) => {
183
+ return `rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`;
184
+ };
185
+ const colorDefault = rgbaToCss(getColorDefault());
186
+ const colorInverted = rgbaToCss(getColorInverted());
187
+ const colorLibrary = rgbaToCss(getColorLibrary());
188
+ const colorHost = rgbaToCss(getColorHost());
189
+ const smoothstepValue = Math.max(
190
+ 0,
191
+ Math.min(1, (ctx.artboardScale - 0.3) / 0.7)
192
+ );
193
+ const thickness = (0.5 + smoothstepValue * 2.5) * ctx.dpi;
194
+ for (let i = 0; i < rects.length; i++) {
195
+ const rect = rects[i];
196
+ let strokeColor = colorDefault;
197
+ if (rect.isFromLibrary) {
198
+ strokeColor = colorLibrary;
199
+ } else if (rect.isInverted) {
200
+ strokeColor = colorInverted;
201
+ } else if (rect.id === "host") {
202
+ strokeColor = colorHost;
203
+ }
204
+ ctx2d.strokeStyle = strokeColor;
205
+ ctx2d.lineWidth = thickness;
206
+ const viewportX = (rect.x * ctx.artboardScale + ctx.artboardOffset.x) * ctx.dpi;
207
+ const viewportY = (rect.y * ctx.artboardScale + ctx.artboardOffset.y) * ctx.dpi;
208
+ const viewportWidth = rect.width * ctx.artboardScale * ctx.dpi;
209
+ const viewportHeight = rect.height * ctx.artboardScale * ctx.dpi;
210
+ const maxRadius = Math.min(viewportWidth, viewportHeight) / 2;
211
+ const rtl = Math.min(
212
+ rect.radius[0] * ctx.artboardScale * ctx.dpi,
213
+ maxRadius
214
+ );
215
+ const rtr = Math.min(
216
+ rect.radius[1] * ctx.artboardScale * ctx.dpi,
217
+ maxRadius
218
+ );
219
+ const rbr = Math.min(
220
+ rect.radius[2] * ctx.artboardScale * ctx.dpi,
221
+ maxRadius
222
+ );
223
+ const rbl = Math.min(
224
+ rect.radius[3] * ctx.artboardScale * ctx.dpi,
225
+ maxRadius
226
+ );
227
+ ctx2d.beginPath();
228
+ ctx2d.moveTo(viewportX + rtl, viewportY);
229
+ ctx2d.lineTo(viewportX + viewportWidth - rtr, viewportY);
230
+ if (rtr > 0) {
231
+ ctx2d.arcTo(
232
+ viewportX + viewportWidth,
233
+ viewportY,
234
+ viewportX + viewportWidth,
235
+ viewportY + rtr,
236
+ rtr
237
+ );
238
+ }
239
+ ctx2d.lineTo(viewportX + viewportWidth, viewportY + viewportHeight - rbr);
240
+ if (rbr > 0) {
241
+ ctx2d.arcTo(
242
+ viewportX + viewportWidth,
243
+ viewportY + viewportHeight,
244
+ viewportX + viewportWidth - rbr,
245
+ viewportY + viewportHeight,
246
+ rbr
247
+ );
248
+ }
249
+ ctx2d.lineTo(viewportX + rbl, viewportY + viewportHeight);
250
+ if (rbl > 0) {
251
+ ctx2d.arcTo(
252
+ viewportX,
253
+ viewportY + viewportHeight,
254
+ viewportX,
255
+ viewportY + viewportHeight - rbl,
256
+ rbl
257
+ );
258
+ }
259
+ ctx2d.lineTo(viewportX, viewportY + rtl);
260
+ if (rtl > 0) {
261
+ ctx2d.arcTo(viewportX, viewportY, viewportX + rtl, viewportY, rtl);
262
+ }
263
+ ctx2d.closePath();
264
+ ctx2d.stroke();
265
+ }
266
+ ctx2d.globalAlpha = 1;
174
267
  }
175
268
  });
176
269
  onBlokkliEvent("ui:resized", function() {
@@ -1,11 +1,9 @@
1
1
  import type { RenderedFieldListItem } from '#blokkli/types';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  blocks: RenderedFieldListItem[];
4
- gl: WebGLRenderingContext;
5
4
  hasHostSelected: boolean;
6
5
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
7
6
  blocks: RenderedFieldListItem[];
8
- gl: WebGLRenderingContext;
9
7
  hasHostSelected: boolean;
10
8
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
9
  export default _default;
@@ -1,12 +1,14 @@
1
+ #version 300 es
2
+
1
3
  precision highp float;
2
4
 
3
5
  // [x, y] position.
4
- attribute vec2 a_position;
6
+ in vec2 a_position;
5
7
  // The [x,y,width, height] of the quad the vertex belongs to.
6
- attribute vec4 a_quad;
7
- attribute float a_rect_id;
8
- attribute float a_rect_type;
9
- attribute vec4 a_rect_radius;
8
+ in vec4 a_quad;
9
+ in float a_rect_id;
10
+ in float a_rect_type;
11
+ in vec4 a_rect_radius;
10
12
 
11
13
  // The global scaling applied to all quads.
12
14
  uniform float u_scale;
@@ -22,15 +24,18 @@ uniform vec3 u_color_library;
22
24
  uniform vec3 u_color_host;
23
25
 
24
26
  // The transformed quad for the fragment shader.
25
- varying vec4 v_quad;
26
- varying vec3 v_color;
27
- varying vec4 v_rect_radius;
28
- varying float v_thickness;
29
- varying vec2 v_rect_size;
30
- varying vec2 v_rect_center;
31
- varying float v_transition;
32
- varying float v_rect_id;
33
- varying float v_rect_width;
27
+ out vec4 v_quad;
28
+ out vec3 v_color;
29
+ out vec4 v_rect_radius;
30
+ out float v_thickness;
31
+ out vec2 v_rect_size;
32
+ out vec2 v_rect_center;
33
+ out float v_transition;
34
+ out float v_rect_id;
35
+ out float v_rect_width;
36
+ // Optimized varyings calculated in vertex shader
37
+ out float v_stripe_distance;
38
+ out vec4 v_base_scaled_radius;
34
39
 
35
40
  void main() {
36
41
  // Define the increase size in viewport terms (not affected by u_scale)
@@ -96,4 +101,8 @@ void main() {
96
101
  v_rect_size = vec2(v_quad.z, v_quad.w);
97
102
  v_rect_center = vec2(v_quad.x + v_quad.z / 2.0, v_quad.y + v_quad.w / 2.0); // The pixel-space rectangle center location
98
103
  v_transition = smoothstep(0.5, 0.8, u_scale);
104
+
105
+ // Calculate optimized values once per vertex
106
+ v_stripe_distance = 300.0 * u_scale;
107
+ v_base_scaled_radius = v_rect_radius * u_scale;
99
108
  }
@@ -1,22 +1,11 @@
1
1
  <template>
2
- <Overlay
3
- v-if="isVisible && gl && animation.webglEnabled.value"
2
+ <Renderer
3
+ v-if="isVisible"
4
+ :key="animation.renderKey.value"
4
5
  :blocks="selection.items.value"
5
6
  :uuids="selection.uuids.value"
6
- :gl="gl"
7
7
  :has-host-selected="selection.hasHostSelected.value"
8
8
  />
9
- <OverlayFallback v-if="isVisible && !gl" :uuids="selection.uuids.value" />
10
- <PluginItemDropdown
11
- v-if="itemDropdownItems.length"
12
- id="selection"
13
- :title="$t('selectionActionGroupTitle', 'Selection')"
14
- :enabled="itemDropdownEnabled"
15
- :items="itemDropdownItems"
16
- icon="selection"
17
- weight="200"
18
- @select="onSelectDropdownItem"
19
- />
20
9
 
21
10
  <SelectionAddButtons
22
11
  v-if="state.editMode.value === 'editing'"
@@ -25,8 +14,7 @@
25
14
  </template>
26
15
 
27
16
  <script setup>
28
- import Overlay from "./Overlay/index.vue";
29
- import OverlayFallback from "./OverlayFallback/index.vue";
17
+ import Renderer from "./Renderer/index.vue";
30
18
  import SelectionAddButtons from "./AddButtons/index.vue";
31
19
  import {
32
20
  calculateIntersection,
@@ -37,7 +25,7 @@ import {
37
25
  } from "#blokkli/helpers";
38
26
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
39
27
  import useStateBasedCache from "#blokkli/helpers/composables/useStateBasedCache";
40
- import { PluginItemDropdown } from "#blokkli/plugins";
28
+ import defineItemDropdownAction from "#blokkli/helpers/composables/defineItemDropdownAction";
41
29
  import {
42
30
  computed,
43
31
  useBlokkli,
@@ -65,54 +53,20 @@ const {
65
53
  blocks,
66
54
  element
67
55
  } = useBlokkli();
68
- const getSelectionOrder = useStateBasedCache(() => {
69
- return element.queryAll(
70
- ui.artboardElement(),
71
- "[data-uuid]",
56
+ const getSelectionOrder = useStateBasedCache(
57
+ () => element.queryAll(
58
+ ui.providerElement,
59
+ ".bk-field-list-item",
72
60
  "getSelectionOrder",
73
- (el) => el.dataset.uuid
74
- );
75
- });
61
+ (el) => el.dataset.bkUuid
62
+ )
63
+ );
76
64
  const selectedBundle = computed(() => {
77
65
  if (selection.bundles.value.length === 1) {
78
66
  return selection.bundles.value[0] ?? null;
79
67
  }
80
68
  return null;
81
69
  });
82
- const itemDropdownEnabled = computed(() => true);
83
- const itemDropdownItems = computed(() => {
84
- if (selectedBundle.value) {
85
- const label = types.getBlockBundleDefinition(selectedBundle.value)?.label ?? selectedBundle.value;
86
- return [
87
- {
88
- id: "select-all-of-bundle",
89
- label: $t("selectAllOfBundle", 'Select all "@bundle" blocks').replace(
90
- "@bundle",
91
- label
92
- )
93
- }
94
- ];
95
- } else if (selection.hasHostSelected.value) {
96
- return [
97
- {
98
- id: "select-all-blocks",
99
- label: $t("selectAllBlocks", "Select all blocks")
100
- }
101
- ];
102
- }
103
- return [];
104
- });
105
- function onSelectDropdownItem(item) {
106
- if (item.id === "select-all-of-bundle") {
107
- if (selectedBundle.value) {
108
- const uuids = state.getAllUuids(selectedBundle.value);
109
- eventBus.emit("select", uuids);
110
- }
111
- } else if (item.id === "select-all-blocks") {
112
- selectAllBlocks();
113
- }
114
- }
115
- const gl = animation.gl();
116
70
  const hasSelectedOnce = ref(false);
117
71
  const stop = watch(
118
72
  selection.hasAnythingSelected,
@@ -124,7 +78,7 @@ const stop = watch(
124
78
  }
125
79
  );
126
80
  const isVisible = computed(
127
- () => dom.isReady.value && !selection.isMultiSelecting.value && !selection.editableActive.value && !selection.isChangingOptions.value && !selection.isDragging.value && !ui.isAnimating.value && hasSelectedOnce.value
81
+ () => dom.isReady.value && !selection.isMultiSelecting.value && !selection.editableActive.value && !selection.isDragging.value && !ui.isAnimating.value && hasSelectedOnce.value
128
82
  );
129
83
  const findMostVisibleBlock = () => {
130
84
  const viewport = ui.visibleViewportPadded.value;
@@ -310,6 +264,39 @@ onBlokkliEvent("keyPressed", (e) => {
310
264
  selectAllBlocks();
311
265
  }
312
266
  });
267
+ defineItemDropdownAction(() => {
268
+ if (selectedBundle.value) {
269
+ const label = types.getBlockBundleDefinition(selectedBundle.value)?.label ?? selectedBundle.value;
270
+ return {
271
+ id: "selection-select-all-of-bundle",
272
+ label: $t("selectAllOfBundle", 'Select all "@bundle" blocks').replace(
273
+ "@bundle",
274
+ label
275
+ ),
276
+ icon: "selection",
277
+ group: "selection",
278
+ weight: 200,
279
+ callback: () => {
280
+ if (selectedBundle.value) {
281
+ const uuids = state.getAllUuids(selectedBundle.value);
282
+ eventBus.emit("select", uuids);
283
+ }
284
+ }
285
+ };
286
+ }
287
+ });
288
+ defineItemDropdownAction(() => {
289
+ if (selection.hasHostSelected.value) {
290
+ return {
291
+ id: "selection-select-all-blocks",
292
+ label: $t("selectAllBlocks", "Select all blocks"),
293
+ icon: "selection",
294
+ group: "selection",
295
+ weight: 200,
296
+ callback: selectAllBlocks
297
+ };
298
+ }
299
+ });
313
300
  </script>
314
301
 
315
302
  <script>
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <DialogModal
3
+ id="settings"
3
4
  :title="$t('settingsDialogTitle', 'Change settings')"
4
5
  :width="900"
5
6
  hide-buttons
@@ -1,28 +1,18 @@
1
1
  <template>
2
- <PluginMenuButton
3
- id="settings"
4
- :title="$t('settingsMenuTitle', 'Settings')"
5
- :description="
6
- $t('settingsMenuDescription', 'Personal settings for the editor')
7
- "
8
- secondary
9
- icon="cog"
10
- @click="onClick"
11
- />
12
- <Teleport to="body">
2
+ <Teleport :to="ui.mainLayoutElement.value">
13
3
  <BlokkliTransition name="slide-up">
14
- <SettingsDialog v-if="showSettings" @cancel="showSettings = false" />
4
+ <SettingsDialog v-if="showSettings" @cancel="onClose" />
15
5
  </BlokkliTransition>
16
6
  </Teleport>
17
7
  </template>
18
8
 
19
9
  <script setup>
20
- import { ref, useBlokkli, defineBlokkliFeature, computed } from "#imports";
21
- import { PluginMenuButton } from "#blokkli/plugins";
10
+ import { useBlokkli, defineBlokkliFeature, computed } from "#imports";
22
11
  import SettingsDialog from "./Dialog/index.vue";
23
12
  import { addElementClasses } from "#blokkli/helpers/addElementClasses";
24
13
  import { BlokkliTransition } from "#blokkli/components";
25
- const { $t } = useBlokkli();
14
+ import defineMenuButton from "#blokkli/helpers/composables/defineMenuButton";
15
+ const { ui, $t } = useBlokkli();
26
16
  const { settings } = defineBlokkliFeature({
27
17
  id: "settings",
28
18
  label: "Settings",
@@ -53,14 +43,32 @@ const { settings } = defineBlokkliFeature({
53
43
  }
54
44
  }
55
45
  });
56
- const showSettings = ref(false);
57
- const onClick = () => showSettings.value = true;
46
+ const showSettings = computed(() => ui.currentDialog.value?.id === "settings");
47
+ function onClick() {
48
+ ui.openDialog({ id: "settings", alignment: "center" });
49
+ }
50
+ function onClose() {
51
+ ui.closeDialog("settings");
52
+ }
58
53
  const lowPerformanceMode = computed(() => settings.value.lowPerformanceMode);
59
54
  addElementClasses(
60
55
  document.documentElement,
61
56
  "bk-low-performance-mode",
62
57
  lowPerformanceMode
63
58
  );
59
+ defineMenuButton(() => {
60
+ return {
61
+ id: "settings",
62
+ title: $t("settingsMenuTitle", "Settings"),
63
+ description: $t(
64
+ "settingsMenuDescription",
65
+ "Personal settings for the editor"
66
+ ),
67
+ icon: "cog",
68
+ secondary: true,
69
+ callback: onClick
70
+ };
71
+ });
64
72
  </script>
65
73
 
66
74
  <script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Teleport to="body">
2
+ <Teleport :to="ui.mainLayoutElement.value">
3
3
  <BlokkliTransition name="touch-bar">
4
4
  <Bar
5
5
  v-if="
@@ -24,7 +24,7 @@
24
24
  import { useBlokkli, defineBlokkliFeature } from "#imports";
25
25
  import { BlokkliTransition } from "#blokkli/components";
26
26
  import Bar from "./Bar/index.vue";
27
- const { eventBus, selection, $t } = useBlokkli();
27
+ const { eventBus, selection, $t, ui } = useBlokkli();
28
28
  defineBlokkliFeature({
29
29
  id: "touch-action-bar",
30
30
  label: "Touch Action Bar",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Teleport v-if="activeItem" to="body">
2
+ <Teleport v-if="activeItem" :to="ui.mainLayoutElement.value">
3
3
  <div class="bk bk-tour" :style="tooltipStyle">
4
4
  <div class="bk-tour-inner">
5
5
  <div class="bk-tour-title">