@blokkli/editor 2.0.0-alpha.13 → 2.0.0-alpha.14

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 (272) hide show
  1. package/dist/module.d.mts +1 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +4003 -1162
  4. package/dist/modules/drupal/graphql/base/fragment.ParagraphsBlokkliConfigInput.graphql +31 -0
  5. package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +1 -0
  6. package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +1 -0
  7. package/dist/modules/drupal/graphql/base/query.pbEntityConfig.graphql +5 -0
  8. package/dist/modules/drupal/graphql/features/transform.graphql +9 -1
  9. package/dist/modules/drupal/graphql/features/transform_host.graphql +38 -0
  10. package/dist/modules/drupal/graphql/mutations/update_host_options.graphql +15 -0
  11. package/dist/modules/drupal/index.d.mts +1 -1
  12. package/dist/modules/drupal/index.mjs +20 -7
  13. package/dist/modules/drupal/runtime/adapter/index.js +109 -4
  14. package/dist/runtime/adapter/index.d.ts +54 -1
  15. package/dist/runtime/blokkliPlugins/AddAction/index.vue +27 -3
  16. package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue +65 -0
  17. package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue.d.ts +26 -0
  18. package/dist/runtime/blokkliPlugins/ContextMenu/Menu/index.vue +3 -0
  19. package/dist/runtime/blokkliPlugins/ContextMenu/index.vue +3 -2
  20. package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue +3 -3
  21. package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue +49 -11
  22. package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue.d.ts +29 -15
  23. package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue +6 -7
  24. package/dist/runtime/blokkliPlugins/Sidebar/index.vue +2 -9
  25. package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +1 -1
  26. package/dist/runtime/blokkliPlugins/ViewOption/index.vue +6 -3
  27. package/dist/runtime/blokkliPlugins/index.d.ts +8 -7
  28. package/dist/runtime/blokkliPlugins/index.js +15 -13
  29. package/dist/runtime/components/Blocks/Fragment/icon.svg +1 -1
  30. package/dist/runtime/components/BlokkliProvider.vue +1 -0
  31. package/dist/runtime/components/BlokkliProvider.vue.d.ts +1 -0
  32. package/dist/runtime/components/Edit/Actions/index.vue +39 -67
  33. package/dist/runtime/components/Edit/AddListItem/index.vue +2 -5
  34. package/dist/runtime/components/Edit/AddListItem/index.vue.d.ts +1 -1
  35. package/dist/runtime/components/Edit/AddListItemIcon/index.vue +19 -0
  36. package/dist/runtime/components/Edit/AddListItemIcon/index.vue.d.ts +15 -0
  37. package/dist/runtime/components/Edit/AppMenu/index.vue +5 -5
  38. package/dist/runtime/components/Edit/Dialog/index.vue +5 -1
  39. package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +1 -1
  40. package/dist/runtime/components/Edit/DiffViewer/State.vue +276 -0
  41. package/dist/runtime/components/Edit/DiffViewer/State.vue.d.ts +16 -0
  42. package/dist/runtime/components/Edit/DragInteractions/index.vue +35 -6
  43. package/dist/runtime/components/Edit/EditProvider.vue +46 -35
  44. package/dist/runtime/components/Edit/Features/AddList/index.vue +15 -25
  45. package/dist/runtime/components/Edit/Features/Analyze/Overlay/fragment.glsl +58 -0
  46. package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +168 -0
  47. package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue.d.ts +9 -0
  48. package/dist/runtime/components/Edit/Features/Analyze/Overlay/vertex.glsl +72 -0
  49. package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue +159 -0
  50. package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue.d.ts +7 -0
  51. package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue +100 -0
  52. package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue.d.ts +6 -0
  53. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue +56 -0
  54. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue.d.ts +3 -0
  55. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue +87 -0
  56. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue.d.ts +7 -0
  57. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +101 -0
  58. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue.d.ts +8 -0
  59. package/dist/runtime/components/Edit/Features/Analyze/Results/Status.vue +18 -0
  60. package/dist/runtime/components/Edit/Features/Analyze/Results/Status.vue.d.ts +8 -0
  61. package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue +92 -0
  62. package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue.d.ts +17 -0
  63. package/dist/runtime/components/Edit/Features/Analyze/Summary/index.vue +77 -0
  64. package/dist/runtime/components/Edit/Features/Analyze/Summary/index.vue.d.ts +6 -0
  65. package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.d.ts +12 -0
  66. package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.js +75 -0
  67. package/dist/runtime/components/Edit/Features/Analyze/analyzers/defineAnalyzer.d.ts +4 -0
  68. package/dist/runtime/components/Edit/Features/Analyze/analyzers/defineAnalyzer.js +5 -0
  69. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.d.ts +32 -0
  70. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.js +45 -0
  71. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/collectTextElements.d.ts +5 -0
  72. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/collectTextElements.js +95 -0
  73. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/normalizeArray.d.ts +3 -0
  74. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/normalizeArray.js +13 -0
  75. package/dist/runtime/components/Edit/Features/Analyze/analyzers/index.d.ts +2 -0
  76. package/dist/runtime/components/Edit/Features/Analyze/analyzers/index.js +2 -0
  77. package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.d.ts +2 -0
  78. package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.js +165 -0
  79. package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.d.ts +44 -0
  80. package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.js +0 -0
  81. package/dist/runtime/components/Edit/Features/Analyze/helper.d.ts +5 -0
  82. package/dist/runtime/components/Edit/Features/Analyze/helper.js +28 -0
  83. package/dist/runtime/components/Edit/Features/Analyze/index.vue +44 -0
  84. package/dist/runtime/components/Edit/Features/Anchors/Renderer.vue +136 -0
  85. package/dist/runtime/components/Edit/Features/Anchors/index.vue +32 -0
  86. package/dist/runtime/components/Edit/Features/Anchors/index.vue.d.ts +2 -0
  87. package/dist/runtime/components/Edit/Features/Artboard/Overview/index.vue +25 -13
  88. package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +296 -0
  89. package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue.d.ts +7 -0
  90. package/dist/runtime/components/Edit/Features/Artboard/index.vue +10 -245
  91. package/dist/runtime/components/Edit/Features/Assistant/index.vue +3 -2
  92. package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +4 -4
  93. package/dist/runtime/components/Edit/Features/Clipboard/index.vue +161 -28
  94. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue +16 -4
  95. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue.d.ts +0 -1
  96. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +4 -53
  97. package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +3 -2
  98. package/dist/runtime/components/Edit/Features/Conversions/index.vue +12 -14
  99. package/dist/runtime/components/Edit/Features/Debug/Viewport/index.vue +14 -0
  100. package/dist/runtime/components/Edit/Features/Debug/index.vue +27 -24
  101. package/dist/runtime/components/Edit/Features/Diff/DiffView/index.vue +13 -190
  102. package/dist/runtime/components/Edit/Features/Diff/index.vue +2 -2
  103. package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +4 -4
  104. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/fragment.glsl +1 -1
  105. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +35 -71
  106. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/vertex.glsl +1 -1
  107. package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +62 -48
  108. package/dist/runtime/components/Edit/Features/EditForm/Frame/index.vue +3 -3
  109. package/dist/runtime/components/Edit/Features/EditForm/index.vue +3 -3
  110. package/dist/runtime/components/Edit/Features/EditableField/index.vue +6 -2
  111. package/dist/runtime/components/Edit/Features/EditableMask/index.vue +3 -20
  112. package/dist/runtime/components/Edit/Features/Fragments/index.vue +3 -2
  113. package/dist/runtime/components/Edit/Features/History/index.vue +35 -12
  114. package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +6 -2
  115. package/dist/runtime/components/Edit/Features/ImportExisting/index.vue +3 -2
  116. package/dist/runtime/components/Edit/Features/Library/index.vue +11 -9
  117. package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +5 -8
  118. package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/fragment.glsl +1 -1
  119. package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +9 -4
  120. package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/vertex.glsl +1 -1
  121. package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +8 -14
  122. package/dist/runtime/components/Edit/Features/Options/Form/Checkbox/index.vue +3 -2
  123. package/dist/runtime/components/Edit/Features/Options/Form/Checkbox/index.vue.d.ts +2 -0
  124. package/dist/runtime/components/Edit/Features/Options/Form/Item.vue +9 -3
  125. package/dist/runtime/components/Edit/Features/Options/Form/Item.vue.d.ts +0 -1
  126. package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue +37 -19
  127. package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue.d.ts +8 -2
  128. package/dist/runtime/components/Edit/Features/Options/Form/index.vue +81 -37
  129. package/dist/runtime/components/Edit/Features/Options/Form/index.vue.d.ts +5 -5
  130. package/dist/runtime/components/Edit/Features/Options/index.vue +30 -6
  131. package/dist/runtime/components/Edit/Features/PreviewGrant/index.vue +3 -3
  132. package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +1 -0
  133. package/dist/runtime/components/Edit/Features/Publish/index.vue +3 -2
  134. package/dist/runtime/components/Edit/Features/Revert/index.vue +3 -3
  135. package/dist/runtime/components/Edit/Features/Search/index.vue +3 -2
  136. package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue +54 -0
  137. package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue.d.ts +14 -0
  138. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +120 -0
  139. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +15 -0
  140. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +459 -0
  141. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue.d.ts +6 -0
  142. package/dist/runtime/components/Edit/Features/Selection/Overlay/fragment.glsl +14 -9
  143. package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue +32 -11
  144. package/dist/runtime/components/Edit/Features/Selection/Overlay/vertex.glsl +1 -1
  145. package/dist/runtime/components/Edit/Features/Selection/index.vue +76 -7
  146. package/dist/runtime/components/Edit/Features/Settings/Dialog/FeatureSetting/index.vue +12 -17
  147. package/dist/runtime/components/Edit/Features/Settings/index.vue +11 -25
  148. package/dist/runtime/components/Edit/Features/Theme/Color/index.vue +5 -1
  149. package/dist/runtime/components/Edit/Features/Theme/index.vue +2 -1
  150. package/dist/runtime/components/Edit/Features/TouchActionBar/index.vue +3 -2
  151. package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue +198 -0
  152. package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue.d.ts +13 -0
  153. package/dist/runtime/components/Edit/Features/Transform/index.vue +155 -44
  154. package/dist/runtime/components/Edit/Form/Radio/index.vue +33 -0
  155. package/dist/runtime/components/Edit/Form/Radio/index.vue.d.ts +20 -0
  156. package/dist/runtime/components/Edit/Form/RadioTabs/index.vue +37 -0
  157. package/dist/runtime/components/Edit/Form/RadioTabs/index.vue.d.ts +22 -0
  158. package/dist/runtime/components/Edit/Form/Select/index.vue +29 -0
  159. package/dist/runtime/components/Edit/Form/Select/index.vue.d.ts +20 -0
  160. package/dist/runtime/components/Edit/Form/Text/index.vue +33 -0
  161. package/dist/runtime/components/Edit/Form/Text/index.vue.d.ts +19 -0
  162. package/dist/runtime/components/Edit/Form/Textarea/index.vue +13 -6
  163. package/dist/runtime/components/Edit/Form/Textarea/index.vue.d.ts +4 -0
  164. package/dist/runtime/components/Edit/FormOverlay/index.vue +1 -1
  165. package/dist/runtime/components/Edit/Indicators/index.vue +123 -0
  166. package/dist/runtime/components/Edit/Indicators/index.vue.d.ts +2 -0
  167. package/dist/runtime/components/Edit/ItemIcon/index.vue +2 -1
  168. package/dist/runtime/components/Edit/Konami/Game/PixelGrid.vue +66 -0
  169. package/dist/runtime/components/Edit/Konami/Game/PixelGrid.vue.d.ts +7 -0
  170. package/dist/runtime/components/Edit/Konami/Game/blokkli.png +0 -0
  171. package/dist/runtime/components/Edit/Konami/Game/charmap.d.ts +2 -0
  172. package/dist/runtime/components/Edit/Konami/Game/charmap.js +168 -0
  173. package/dist/runtime/components/Edit/Konami/Game/index.vue +745 -0
  174. package/dist/runtime/components/Edit/Konami/Game/index.vue.d.ts +6 -0
  175. package/dist/runtime/components/Edit/Konami/Game/textRendering.d.ts +8 -0
  176. package/dist/runtime/components/Edit/Konami/Game/textRendering.js +138 -0
  177. package/dist/runtime/components/Edit/Konami/Game/useIconRendering.d.ts +9 -0
  178. package/dist/runtime/components/Edit/Konami/Game/useIconRendering.js +130 -0
  179. package/dist/runtime/components/Edit/Konami/index.vue +44 -0
  180. package/dist/runtime/components/Edit/Konami/index.vue.d.ts +2 -0
  181. package/dist/runtime/components/Edit/Loading/index.vue +6 -2
  182. package/dist/runtime/components/Edit/Loading/index.vue.d.ts +2 -0
  183. package/dist/runtime/components/Edit/Messages/index.vue +8 -3
  184. package/dist/runtime/components/Edit/PluginConfigForm/Checkbox/index.vue +17 -0
  185. package/dist/runtime/components/Edit/PluginConfigForm/Checkbox/index.vue.d.ts +11 -0
  186. package/dist/runtime/components/Edit/PluginConfigForm/Options/index.vue +37 -0
  187. package/dist/runtime/components/Edit/PluginConfigForm/Options/index.vue.d.ts +11 -0
  188. package/dist/runtime/components/Edit/PluginConfigForm/Text/index.vue +43 -0
  189. package/dist/runtime/components/Edit/PluginConfigForm/Text/index.vue.d.ts +11 -0
  190. package/dist/runtime/components/Edit/PluginConfigForm/index.vue +57 -0
  191. package/dist/runtime/components/Edit/PluginConfigForm/index.vue.d.ts +16 -0
  192. package/dist/runtime/components/Edit/PreviewProvider.vue +3 -4
  193. package/dist/runtime/components/Edit/RelativeTime/index.vue +3 -2
  194. package/dist/runtime/components/Edit/ShortcutIndicator/index.vue +8 -3
  195. package/dist/runtime/components/Edit/SystemRequirements/index.vue +3 -3
  196. package/dist/runtime/components/Edit/Toolbar/index.vue +3 -2
  197. package/dist/runtime/components/Edit/Transition/index.vue +41 -0
  198. package/dist/runtime/components/Edit/Transition/index.vue.d.ts +19 -0
  199. package/dist/runtime/components/Edit/index.d.ts +23 -15
  200. package/dist/runtime/components/Edit/index.js +44 -28
  201. package/dist/runtime/composables/defineBlokkli.js +7 -3
  202. package/dist/runtime/composables/defineBlokkliFeature.d.ts +4 -7
  203. package/dist/runtime/composables/defineBlokkliProvider.d.ts +11 -0
  204. package/dist/runtime/composables/defineBlokkliProvider.js +46 -0
  205. package/dist/runtime/composables/useBlokkliHelper.js +1 -1
  206. package/dist/runtime/constants/index.d.ts +3 -0
  207. package/dist/runtime/constants/index.js +3 -0
  208. package/dist/runtime/css/output.css +1 -1
  209. package/dist/runtime/helpers/addElementClasses.d.ts +2 -0
  210. package/dist/runtime/helpers/addElementClasses.js +24 -0
  211. package/dist/runtime/helpers/animationProvider.d.ts +4 -2
  212. package/dist/runtime/helpers/animationProvider.js +7 -2
  213. package/dist/runtime/helpers/bundles/index.d.ts +1 -0
  214. package/dist/runtime/helpers/bundles/index.js +4 -0
  215. package/dist/runtime/helpers/composables/useStickyToolbar.d.ts +20 -0
  216. package/dist/runtime/helpers/composables/useStickyToolbar.js +215 -0
  217. package/dist/runtime/helpers/definitionProvider.d.ts +2 -1
  218. package/dist/runtime/helpers/definitionProvider.js +17 -0
  219. package/dist/runtime/helpers/domProvider.d.ts +2 -1
  220. package/dist/runtime/helpers/domProvider.js +89 -43
  221. package/dist/runtime/helpers/dropTargets/index.d.ts +6 -0
  222. package/dist/runtime/helpers/dropTargets/index.js +49 -0
  223. package/dist/runtime/helpers/eventBus.d.ts +1 -1
  224. package/dist/runtime/helpers/eventBus.js +2 -2
  225. package/dist/runtime/helpers/index.d.ts +10 -1
  226. package/dist/runtime/helpers/index.js +57 -0
  227. package/dist/runtime/helpers/indicatorsProvider.d.ts +10 -0
  228. package/dist/runtime/helpers/indicatorsProvider.js +23 -0
  229. package/dist/runtime/helpers/keyboardProvider.d.ts +2 -0
  230. package/dist/runtime/helpers/keyboardProvider.js +17 -1
  231. package/dist/runtime/helpers/pluginProvider.d.ts +10 -0
  232. package/dist/runtime/helpers/pluginProvider.js +33 -0
  233. package/dist/runtime/helpers/renderCycle.d.ts +1 -0
  234. package/dist/runtime/helpers/renderCycle.js +10 -0
  235. package/dist/runtime/helpers/runtimeHelpers/index.js +14 -11
  236. package/dist/runtime/helpers/selectionProvider.d.ts +16 -0
  237. package/dist/runtime/helpers/selectionProvider.js +47 -35
  238. package/dist/runtime/helpers/stateProvider.d.ts +6 -2
  239. package/dist/runtime/helpers/stateProvider.js +58 -14
  240. package/dist/runtime/helpers/storageProvider.d.ts +4 -3
  241. package/dist/runtime/helpers/storageProvider.js +56 -3
  242. package/dist/runtime/helpers/symbols.d.ts +1 -0
  243. package/dist/runtime/helpers/symbols.js +1 -0
  244. package/dist/runtime/helpers/textProvider.js +6 -0
  245. package/dist/runtime/helpers/themeProvider.d.ts +2 -0
  246. package/dist/runtime/helpers/themeProvider.js +4 -1
  247. package/dist/runtime/helpers/transform.js +1 -3
  248. package/dist/runtime/helpers/uiProvider.d.ts +7 -2
  249. package/dist/runtime/helpers/uiProvider.js +49 -47
  250. package/dist/runtime/helpers/useTransitionedValue.d.ts +18 -0
  251. package/dist/runtime/helpers/useTransitionedValue.js +57 -0
  252. package/dist/runtime/icons/anchor.svg +1 -0
  253. package/dist/runtime/icons/arrow-left.svg +1 -1
  254. package/dist/runtime/icons/arrow-right.svg +1 -1
  255. package/dist/runtime/icons/arrow-top-right.svg +1 -0
  256. package/dist/runtime/icons/chart.svg +1 -0
  257. package/dist/runtime/icons/copy.svg +1 -0
  258. package/dist/runtime/icons/cursor-move.svg +1 -1
  259. package/dist/runtime/icons/diff.svg +1 -1
  260. package/dist/runtime/icons/eye.svg +1 -1
  261. package/dist/runtime/icons/info.svg +1 -1
  262. package/dist/runtime/icons/link.svg +1 -0
  263. package/dist/runtime/icons/speedometer.svg +1 -0
  264. package/dist/runtime/types/blokkOptions.d.ts +8 -0
  265. package/dist/runtime/types/index.d.ts +163 -5
  266. package/dist/runtime/types/theme.d.ts +2 -1
  267. package/dist/shared/{editor.gz_ac6uT.d.mts → editor.CKsrTpc1.d.mts} +1 -1
  268. package/package.json +20 -5
  269. package/dist/runtime/components/Edit/Features/FieldAreas/Overlay/index.vue +0 -22
  270. package/dist/runtime/components/Edit/Features/FieldAreas/index.vue +0 -41
  271. /package/dist/runtime/components/Edit/Features/{FieldAreas/Overlay → Analyze}/index.vue.d.ts +0 -0
  272. /package/dist/runtime/components/Edit/Features/{FieldAreas/index.vue.d.ts → Anchors/Renderer.vue.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <Teleport to="body">
3
- <transition name="bk-slide-in" :duration="200">
3
+ <BlokkliTransition name="slide-in">
4
4
  <FormOverlay
5
5
  v-if="isVisible"
6
6
  :id="id"
@@ -15,12 +15,12 @@
15
15
  </button>
16
16
  </template>
17
17
  </FormOverlay>
18
- </transition>
18
+ </BlokkliTransition>
19
19
  </Teleport>
20
20
  </template>
21
21
 
22
22
  <script setup>
23
- import { FormOverlay } from "#blokkli/components";
23
+ import { FormOverlay, BlokkliTransition } from "#blokkli/components";
24
24
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
25
25
  import { ref, useBlokkli } from "#imports";
26
26
  const props = defineProps({
@@ -1,21 +1,65 @@
1
1
  <template>
2
2
  <Teleport v-if="enabled" to="#bk-blokkli-item-actions-dropdown">
3
- <div>
4
- <h3>{{ title }}</h3>
5
- <slot />
3
+ <div
4
+ v-show="items.length"
5
+ :style="{
6
+ order: weight
7
+ }"
8
+ >
9
+ <ol>
10
+ <li v-for="item in itemsMapped" :key="item.id">
11
+ <button
12
+ class="bk-blokkli-item-actions-type-dropdown-button"
13
+ :disabled="!item.enabled"
14
+ @click.prevent="onClick(item)"
15
+ >
16
+ <div class="bk-blokkli-item-actions-type-dropdown-icon">
17
+ <Icon v-if="item.icon" :name="item.icon" />
18
+ <ItemIcon v-else-if="item.bundle" :bundle="item.bundle" />
19
+ </div>
20
+ <div>
21
+ <div>{{ item.label }}</div>
22
+ </div>
23
+ <div v-if="item.description" class="bk-tooltip">
24
+ {{ item.description }}
25
+ </div>
26
+ </button>
27
+ </li>
28
+ </ol>
6
29
  </div>
7
30
  </Teleport>
8
31
  </template>
9
32
 
10
- <script setup>
33
+ <script>
34
+ import { Icon, ItemIcon } from "#blokkli/components";
11
35
  import { computed, useBlokkli, onMounted, onBeforeUnmount } from "#imports";
36
+ </script>
37
+
38
+ <script setup>
12
39
  const props = defineProps({
13
40
  id: { type: String, required: true },
14
41
  title: { type: String, required: true },
15
- enabled: { type: Boolean, required: true }
42
+ enabled: { type: Boolean, required: true },
43
+ items: { type: Array, required: true },
44
+ icon: { type: null, required: false },
45
+ weight: { type: [String, Number], required: false }
46
+ });
47
+ const emit = defineEmits(["select"]);
48
+ const itemsMapped = computed(() => {
49
+ return props.items.map((item) => {
50
+ return {
51
+ ...item,
52
+ icon: item.icon ?? props.icon,
53
+ enabled: item.enabled !== false
54
+ };
55
+ });
16
56
  });
17
57
  const { eventBus } = useBlokkli();
18
58
  const isRendering = computed(() => props.enabled);
59
+ function onClick(item) {
60
+ emit("select", item);
61
+ eventBus.emit("action:selected");
62
+ }
19
63
  onMounted(() => {
20
64
  eventBus.emit("plugin:mount", {
21
65
  type: "ItemDropdown",
@@ -30,9 +74,3 @@ onBeforeUnmount(() => {
30
74
  });
31
75
  });
32
76
  </script>
33
-
34
- <script>
35
- export default {
36
- name: "PluginItemDropdown"
37
- };
38
- </script>
@@ -1,17 +1,31 @@
1
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
1
+ import type { BlokkliIcon } from '#blokkli-build/icons';
2
+ type Item = {
2
3
  id: string;
3
- title: string;
4
- enabled: boolean;
5
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
6
- id: string;
7
- title: string;
8
- enabled: boolean;
9
- }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
10
- default?: (props: {}) => any;
11
- }>;
12
- export default _default;
13
- type __VLS_WithSlots<T, S> = T & {
14
- new (): {
15
- $slots: S;
16
- };
4
+ label: string;
5
+ description?: string;
6
+ enabled?: boolean;
7
+ icon?: BlokkliIcon;
8
+ bundle?: string;
17
9
  };
10
+ declare const _default: <T extends Item>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
11
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
12
+ readonly onSelect?: ((item: T) => any) | undefined;
13
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onSelect"> & {
14
+ id: string;
15
+ title: string;
16
+ enabled: boolean;
17
+ items: T[];
18
+ icon?: BlokkliIcon;
19
+ weight?: string | number;
20
+ } & Partial<{}>> & import("vue").PublicProps;
21
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
22
+ attrs: any;
23
+ slots: {};
24
+ emit: (e: "select", item: T) => void;
25
+ }>) => import("vue").VNode & {
26
+ __ctx?: Awaited<typeof __VLS_setup>;
27
+ };
28
+ export default _default;
29
+ type __VLS_PrettifyLocal<T> = {
30
+ [K in keyof T]: T[K];
31
+ } & {};
@@ -69,6 +69,7 @@ import {
69
69
  } from "#imports";
70
70
  import { Icon, ViewportBlockingRect, ScrollBoundary } from "#blokkli/components";
71
71
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
72
+ import { addElementClasses } from "#blokkli/helpers/addElementClasses";
72
73
  const props = defineProps({
73
74
  id: { type: String, required: true },
74
75
  title: { type: String, required: true },
@@ -147,13 +148,11 @@ const rootCursor = computed(() => {
147
148
  watch(rootCursor, (cursor) => {
148
149
  document.documentElement.style.cursor = cursor;
149
150
  });
150
- watch(mouseMode, (mode) => {
151
- if (mode) {
152
- document.documentElement.classList.add("bk-is-sidebar-interacting");
153
- } else {
154
- document.documentElement.classList.remove("bk-is-sidebar-interacting");
155
- }
156
- });
151
+ addElementClasses(
152
+ document.documentElement,
153
+ "bk-is-sidebar-interacting",
154
+ mouseMode
155
+ );
157
156
  const updateStored = () => {
158
157
  storedData.value = {
159
158
  x: x.value,
@@ -130,11 +130,11 @@ const { storage, state, ui, $t } = useBlokkli();
130
130
  const tourElement = ref(null);
131
131
  const detachedKey = computed(() => "sidebar:detached:" + props.id);
132
132
  const storageKey = computed(() => "sidebar:active:" + props.region);
133
- const isDetached = storage.use(detachedKey, false);
133
+ const isDetached = storage.use(detachedKey, false, true);
134
134
  const isDisabled = computed(
135
135
  () => props.editOnly && state.editMode.value !== "editing" && !props.disabled
136
136
  );
137
- const activeSidebar = storage.use(storageKey, "");
137
+ const activeSidebar = storage.use(storageKey, "", true);
138
138
  const isRenderedDetached = computed(
139
139
  () => isDetached.value && !ui.isMobile.value
140
140
  );
@@ -166,13 +166,6 @@ const showSidebar = () => {
166
166
  }
167
167
  activeSidebar.value = props.id;
168
168
  };
169
- watch(activeSidebar, (active) => {
170
- if (active) {
171
- document.documentElement.classList.add("bk-has-sidebar-" + props.region);
172
- } else {
173
- document.documentElement.classList.remove("bk-has-sidebar-" + props.region);
174
- }
175
- });
176
169
  const sidebarContent = ref(null);
177
170
  const scrolledToEnd = ref(false);
178
171
  const isOverflowing = ref(false);
@@ -50,8 +50,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
50
50
  width: number;
51
51
  height: number;
52
52
  };
53
- keyCode: string;
54
53
  weight: string | number;
54
+ keyCode: string;
55
55
  tourText: string;
56
56
  minWidth: number;
57
57
  minHeight: number;
@@ -30,11 +30,11 @@
30
30
  </template>
31
31
 
32
32
  <script setup>
33
- import { useBlokkli, computed, ref } from "#imports";
33
+ import { useBlokkli, computed, ref, watch } from "#imports";
34
34
  import { ShortcutIndicator, Icon } from "#blokkli/components";
35
35
  import defineCommands from "#blokkli/helpers/composables/defineCommands";
36
36
  import defineTourItem from "#blokkli/helpers/composables/defineTourItem";
37
- const { storage, ui } = useBlokkli();
37
+ const { storage, ui, eventBus } = useBlokkli();
38
38
  const props = defineProps({
39
39
  id: { type: String, required: true },
40
40
  label: { type: String, required: true },
@@ -50,7 +50,7 @@ const props = defineProps({
50
50
  const emit = defineEmits(["update:modelValue"]);
51
51
  const storageKey = "view_option_" + props.id;
52
52
  const button = ref(null);
53
- const isActiveStorage = storage.use(storageKey, false);
53
+ const isActiveStorage = storage.use(storageKey, false, true);
54
54
  const isActive = computed({
55
55
  get() {
56
56
  return isActiveStorage.value;
@@ -60,6 +60,9 @@ const isActive = computed({
60
60
  emit("update:modelValue", v);
61
61
  }
62
62
  });
63
+ watch(isActive, () => {
64
+ eventBus.emit("view-option:toggle", { id: props.id });
65
+ });
63
66
  emit("update:modelValue", isActiveStorage.value);
64
67
  const title = computed(() => isActive.value ? props.titleOff : props.titleOn);
65
68
  const onClick = () => {
@@ -1,12 +1,13 @@
1
- import PluginMenuButton from './MenuButton/index.vue.js';
1
+ import PluginAddAction from './AddAction/index.vue.js';
2
+ import PluginBlockIndicator from './BlockIndicator/index.vue.js';
3
+ import PluginContextMenu from './ContextMenu/index.vue.js';
4
+ import PluginDebugOverlay from './DebugOverlay/index.vue.js';
5
+ import PluginDroppableEdit from './DroppableEdit/index.vue.js';
2
6
  import PluginItemAction from './ItemAction/index.vue.js';
3
7
  import PluginItemDropdown from './ItemDropdown/index.vue.js';
8
+ import PluginMenuButton from './MenuButton/index.vue.js';
4
9
  import PluginSidebar from './Sidebar/index.vue.js';
5
10
  import PluginToolbarButton from './ToolbarButton/index.vue.js';
6
- import PluginViewOption from './ViewOption/index.vue.js';
7
- import PluginAddAction from './AddAction/index.vue.js';
8
- import PluginContextMenu from './ContextMenu/index.vue.js';
9
11
  import PluginTourItem from './TourItem/index.vue.js';
10
- import PluginDroppableEdit from './DroppableEdit/index.vue.js';
11
- import PluginDebugOverlay from './DebugOverlay/index.vue.js';
12
- export { PluginMenuButton, PluginItemAction, PluginSidebar, PluginToolbarButton, PluginViewOption, PluginItemDropdown, PluginAddAction, PluginContextMenu, PluginTourItem, PluginDroppableEdit, PluginDebugOverlay, };
12
+ import PluginViewOption from './ViewOption/index.vue.js';
13
+ export { PluginAddAction, PluginBlockIndicator, PluginContextMenu, PluginDebugOverlay, PluginDroppableEdit, PluginItemAction, PluginItemDropdown, PluginMenuButton, PluginSidebar, PluginToolbarButton, PluginTourItem, PluginViewOption, };
@@ -1,24 +1,26 @@
1
- import PluginMenuButton from "./MenuButton/index.vue";
1
+ import PluginAddAction from "./AddAction/index.vue";
2
+ import PluginBlockIndicator from "./BlockIndicator/index.vue";
3
+ import PluginContextMenu from "./ContextMenu/index.vue";
4
+ import PluginDebugOverlay from "./DebugOverlay/index.vue";
5
+ import PluginDroppableEdit from "./DroppableEdit/index.vue";
2
6
  import PluginItemAction from "./ItemAction/index.vue";
3
7
  import PluginItemDropdown from "./ItemDropdown/index.vue";
8
+ import PluginMenuButton from "./MenuButton/index.vue";
4
9
  import PluginSidebar from "./Sidebar/index.vue";
5
10
  import PluginToolbarButton from "./ToolbarButton/index.vue";
6
- import PluginViewOption from "./ViewOption/index.vue";
7
- import PluginAddAction from "./AddAction/index.vue";
8
- import PluginContextMenu from "./ContextMenu/index.vue";
9
11
  import PluginTourItem from "./TourItem/index.vue";
10
- import PluginDroppableEdit from "./DroppableEdit/index.vue";
11
- import PluginDebugOverlay from "./DebugOverlay/index.vue";
12
+ import PluginViewOption from "./ViewOption/index.vue";
12
13
  export {
13
- PluginMenuButton,
14
+ PluginAddAction,
15
+ PluginBlockIndicator,
16
+ PluginContextMenu,
17
+ PluginDebugOverlay,
18
+ PluginDroppableEdit,
14
19
  PluginItemAction,
20
+ PluginItemDropdown,
21
+ PluginMenuButton,
15
22
  PluginSidebar,
16
23
  PluginToolbarButton,
17
- PluginViewOption,
18
- PluginItemDropdown,
19
- PluginAddAction,
20
- PluginContextMenu,
21
24
  PluginTourItem,
22
- PluginDroppableEdit,
23
- PluginDebugOverlay
25
+ PluginViewOption
24
26
  };
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>newspaper</title><path d="M20,11H4V8H20M20,15H13V13H20M20,19H13V17H20M11,19H4V13H11M20.33,4.67L18.67,3L17,4.67L15.33,3L13.67,4.67L12,3L10.33,4.67L8.67,3L7,4.67L5.33,3L3.67,4.67L2,3V19A2,2 0 0,0 4,21H20A2,2 0 0,0 22,19V3L20.33,4.67Z" /></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20,11H4V8H20M20,15H13V13H20M20,19H13V17H20M11,19H4V13H11M20.33,4.67L18.67,3L17,4.67L15.33,3L13.67,4.67L12,3L10.33,4.67L8.67,3L7,4.67L5.33,3L3.67,4.67L2,3V19A2,2 0 0,0 4,21H20A2,2 0 0,0 22,19V3L20.33,4.67Z" /></svg>
@@ -97,6 +97,7 @@ const props = defineProps({
97
97
  language: { type: String, required: false, default: "" },
98
98
  editLabel: { type: String, required: false, default: "" },
99
99
  editPath: { type: String, required: false, default: void 0 },
100
+ hostOptions: { type: null, required: false, default: void 0 },
100
101
  isolate: { type: Boolean, required: false }
101
102
  });
102
103
  const shouldRender = ref(false);
@@ -9,6 +9,7 @@ declare const _default: <T extends object>(__VLS_props: NonNullable<Awaited<type
9
9
  language?: string;
10
10
  editLabel?: string;
11
11
  editPath?: string;
12
+ hostOptions?: any;
12
13
  /**
13
14
  * When set to true, during editing, everything except the provider element will be hidden.
14
15
  */
@@ -3,7 +3,7 @@
3
3
  <div class="bk bk-blokkli-item-actions bk-control" @click.stop>
4
4
  <div
5
5
  v-show="
6
- selection.blocks.value.length && !selection.isDragging.value && !selection.editableActive.value && !ui.isAnimating.value
6
+ !selection.isDragging.value && !selection.editableActive.value && !ui.isAnimating.value && !ui.hasTransformOverlayOpen.value && hasAnythingSelected && shouldRender && !ui.hasAddTooltipOpen.value
7
7
  "
8
8
  ref="el"
9
9
  class="bk-blokkli-item-actions-inner"
@@ -29,7 +29,13 @@
29
29
  }"
30
30
  @click.prevent="showDropdown = !showDropdown"
31
31
  >
32
- <div class="bk-blokkli-item-actions-title-icon">
32
+ <div v-if="shouldRenderButton" class="bk-tooltip">
33
+ {{ $t("actionsDropdownToolip", "Further actions") }}
34
+ </div>
35
+ <div
36
+ v-show="!hasSelectedHost"
37
+ class="bk-blokkli-item-actions-title-icon"
38
+ >
33
39
  <Icon v-if="ui.isTransforming.value" name="loader" />
34
40
  <ItemIcon v-else-if="bundleIcon" :bundle="bundleIcon" />
35
41
  <Icon v-else name="selection" />
@@ -54,6 +60,7 @@
54
60
  <div id="bk-blokkli-item-actions-after" />
55
61
 
56
62
  <div
63
+ v-show="selection.blocks.value.length"
57
64
  id="bk-blokkli-item-actions"
58
65
  class="bk-blokkli-item-actions-buttons"
59
66
  />
@@ -70,23 +77,39 @@ import {
70
77
  computed,
71
78
  useBlokkli,
72
79
  onMounted,
73
- onBeforeUnmount
80
+ onBeforeUnmount,
81
+ useTemplateRef
74
82
  } from "#imports";
75
- import { onlyUnique, findIdealRectPosition, falsy } from "#blokkli/helpers";
83
+ import { onlyUnique, falsy } from "#blokkli/helpers";
76
84
  import { ItemIcon, Icon } from "#blokkli/components";
77
85
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
78
- const { selection, $t, types, state, ui, dom, definitions, debug } = useBlokkli();
86
+ import useStickyToolbar from "#blokkli/helpers/composables/useStickyToolbar";
87
+ const { selection, $t, types, state, ui, definitions, debug } = useBlokkli();
79
88
  const editingEnabled = computed(
80
89
  () => state.editMode.value === "editing" || state.editMode.value === "translating"
81
90
  );
82
91
  const ACTIONS_HEIGHT = 52;
83
- const el = ref(null);
92
+ let scrollWidth = 0;
93
+ const el = useTemplateRef("el");
94
+ const { shouldRender } = useStickyToolbar(el, {
95
+ getPlacementY: () => "top",
96
+ shouldUpdate: () => !selection.isChangingOptions.value,
97
+ getHeight: () => ACTIONS_HEIGHT,
98
+ getWidth: () => scrollWidth,
99
+ getMargin: () => 20
100
+ });
84
101
  const controlsEl = ref(null);
85
102
  const mountedPlugins = ref([]);
86
103
  const showDropdown = ref(false);
104
+ const hasAnythingSelected = computed(
105
+ () => selection.hasHostSelected.value || !!selection.blocks.value.length
106
+ );
87
107
  watch(selection.blocks, () => {
88
108
  showDropdown.value = false;
89
109
  });
110
+ watch(selection.hasHostSelected, () => {
111
+ showDropdown.value = false;
112
+ });
90
113
  const bundleIcon = computed(() => {
91
114
  if (itemBundle.value?.id === "from_library") {
92
115
  const reusableBundle = selection.blocks.value[0]?.reusableBundle;
@@ -96,14 +119,15 @@ const bundleIcon = computed(() => {
96
119
  }
97
120
  return itemBundle.value?.id;
98
121
  });
122
+ const hasSelectedHost = computed(() => {
123
+ return selection.blocks.value.length === 0;
124
+ });
99
125
  const title = computed(() => {
100
126
  if (ui.transformLabel.value) {
101
127
  return ui.transformLabel.value;
102
- }
103
- if (debug.isEnabled.value && selection.uuids.value.length === 1) {
128
+ } else if (debug.isEnabled.value && selection.uuids.value.length === 1) {
104
129
  return selection.uuids.value[0];
105
- }
106
- if (itemBundle.value) {
130
+ } else if (itemBundle.value) {
107
131
  if (itemBundle.value.id === "blokkli_fragment") {
108
132
  const fragments = selection.uuids.value.map((uuid) => {
109
133
  const item = state.getFieldListItem(uuid);
@@ -127,6 +151,8 @@ const title = computed(() => {
127
151
  }
128
152
  }
129
153
  return itemBundle.value.label;
154
+ } else if (!selection.blocks.value.length) {
155
+ return state.entity.value.label;
130
156
  }
131
157
  return $t("multipleItemsLabel", "Items");
132
158
  });
@@ -140,21 +166,6 @@ const itemBundle = computed(() => {
140
166
  const bundle = itemBundleIds.value[0];
141
167
  return types.getBlockBundleDefinition(bundle);
142
168
  });
143
- const limitPlacedRect = (rect, padding) => {
144
- return {
145
- width: rect.width,
146
- height: rect.height,
147
- x: Math.min(
148
- Math.max(rect.x, padding.x),
149
- padding.x + padding.width - rect.width
150
- ),
151
- y: Math.min(
152
- Math.max(padding.y, rect.y),
153
- padding.height + padding.y - rect.height
154
- )
155
- };
156
- };
157
- let scrollWidth = 0;
158
169
  const observer = new ResizeObserver((entries) => {
159
170
  const size = entries[0]?.contentBoxSize?.[0];
160
171
  if (!size) {
@@ -173,48 +184,6 @@ onBeforeUnmount(() => {
173
184
  observer.disconnect();
174
185
  }
175
186
  });
176
- onBlokkliEvent("canvas:draw", () => {
177
- if (!selection.blocks.value.length || ui.isMobile.value || selection.isChangingOptions.value) {
178
- return;
179
- }
180
- let minX = 0;
181
- let minY = 0;
182
- const rects = selection.uuids.value.map((uuid) => dom.getBlockRect(uuid)).filter(falsy);
183
- if (!rects.length) {
184
- return;
185
- }
186
- const offset = ui.artboardOffset.value;
187
- const scale = ui.artboardScale.value;
188
- for (let i = 0; i < rects.length; i++) {
189
- const { x, y } = rects[i];
190
- const rectX = (x + offset.x / scale) * scale;
191
- const rectY = (y + offset.y / scale) * scale;
192
- if (i === 0 || rectX < minX) {
193
- minX = rectX;
194
- }
195
- if (i === 0 || rectY < minY) {
196
- minY = rectY;
197
- }
198
- }
199
- const padding = ui.visibleViewportPadded.value;
200
- const rect = limitPlacedRect(
201
- {
202
- x: minX - 5 * Math.min(scale, 1),
203
- y: minY - ACTIONS_HEIGHT - 15 * Math.min(scale, 1),
204
- width: scrollWidth,
205
- height: ACTIONS_HEIGHT
206
- },
207
- padding
208
- );
209
- const ideal = findIdealRectPosition(
210
- ui.viewportBlockingRects.value,
211
- rect,
212
- padding
213
- );
214
- if (el.value) {
215
- el.value.style.transform = ui.isMobile.value ? "" : `translate3d(${ideal.x}px, ${ideal.y}px, 0)`;
216
- }
217
- });
218
187
  const shouldRenderButton = computed(
219
188
  () => mountedPlugins.value.some((v) => v.isRendering)
220
189
  );
@@ -230,6 +199,9 @@ onBlokkliEvent("plugin:unmount", (e) => {
230
199
  }
231
200
  mountedPlugins.value = mountedPlugins.value.filter((v) => v.type !== e.id);
232
201
  });
202
+ onBlokkliEvent("action:selected", () => {
203
+ showDropdown.value = false;
204
+ });
233
205
  watch(ui.isTransforming, function(isTransforming) {
234
206
  if (isTransforming) {
235
207
  showDropdown.value = false;
@@ -16,10 +16,7 @@
16
16
  ]"
17
17
  >
18
18
  <div class="bk-list-item-inner">
19
- <div class="bk-list-item-icon">
20
- <Icon v-if="icon" :name="icon" />
21
- <ItemIcon v-else-if="bundle" :bundle="bundle" />
22
- </div>
19
+ <AddListItemIcon :orientation :color :bundle :icon />
23
20
  <div
24
21
  class="bk-list-item-label"
25
22
  :class="{
@@ -45,7 +42,7 @@
45
42
 
46
43
  <script setup>
47
44
  import { useBlokkli, computed, ref } from "#imports";
48
- import { ItemIcon, Icon } from "#blokkli/components";
45
+ import { ItemIcon, Icon, AddListItemIcon } from "#blokkli/components";
49
46
  import { PluginContextMenu } from "#blokkli/plugins";
50
47
  const { ui, storage, $t } = useBlokkli();
51
48
  const props = defineProps({
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
22
22
  noContextMenu?: boolean;
23
23
  }> & Readonly<{}>, {
24
24
  bundle: string;
25
- color: "rose" | "lime" | "default" | "yellow" | "accent";
26
25
  icon: BlokkliIcon;
26
+ color: "rose" | "lime" | "default" | "yellow" | "accent";
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  export default _default;
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <div
3
+ class="bk-list-item-icon"
4
+ :class="['bk-is-' + color, 'bk-is-' + orientation]"
5
+ >
6
+ <Icon v-if="icon" :name="icon" />
7
+ <ItemIcon v-else-if="bundle" :bundle="bundle" />
8
+ </div>
9
+ </template>
10
+
11
+ <script setup>
12
+ import { ItemIcon, Icon } from "#blokkli/components";
13
+ defineProps({
14
+ icon: { type: null, required: false, default: void 0 },
15
+ bundle: { type: String, required: false, default: void 0 },
16
+ color: { type: String, required: false, default: "default" },
17
+ orientation: { type: String, required: false, default: "horizontal" }
18
+ });
19
+ </script>
@@ -0,0 +1,15 @@
1
+ import type { BlokkliIcon } from '#blokkli-build/icons';
2
+ import type { AddListOrientation } from '#blokkli/types';
3
+ type __VLS_Props = {
4
+ icon?: BlokkliIcon;
5
+ bundle?: string;
6
+ color?: 'rose' | 'lime' | 'default' | 'yellow' | 'accent';
7
+ orientation?: AddListOrientation;
8
+ };
9
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ bundle: string;
11
+ icon: BlokkliIcon;
12
+ color: "rose" | "lime" | "default" | "yellow" | "accent";
13
+ orientation: AddListOrientation;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ export default _default;
@@ -7,14 +7,14 @@
7
7
  </div>
8
8
  </Teleport>
9
9
  <Teleport to="body">
10
- <transition name="bk-fade" :duration="200">
10
+ <BlokkliTransition name="fade">
11
11
  <div
12
12
  v-if="menuOpen"
13
13
  class="bk bk-menu-overlay bk-overlay"
14
14
  @click="ui.menu.close()"
15
15
  />
16
- </transition>
17
- <transition name="bk-menu" :duration="200">
16
+ </BlokkliTransition>
17
+ <BlokkliTransition name="menu">
18
18
  <div v-show="menuOpen" class="bk bk-menu-list">
19
19
  <button :class="{ 'bk-is-active': menuOpen }" @click="ui.menu.close">
20
20
  <Icon name="close" />
@@ -34,13 +34,13 @@
34
34
  </aside>
35
35
  </div>
36
36
  </div>
37
- </transition>
37
+ </BlokkliTransition>
38
38
  </Teleport>
39
39
  </template>
40
40
 
41
41
  <script setup>
42
42
  import { computed, useBlokkli } from "#imports";
43
- import { Icon } from "#blokkli/components";
43
+ import { Icon, BlokkliTransition } from "#blokkli/components";
44
44
  import { blokkliVersion } from "#blokkli-build/config";
45
45
  const { ui, eventBus } = useBlokkli();
46
46
  const menuOpen = computed(() => ui.menu.isOpen.value);
@@ -50,7 +50,7 @@
50
50
  </template>
51
51
 
52
52
  <script setup>
53
- import { useBlokkli, onMounted, computed, ref } from "#imports";
53
+ import { useBlokkli, onMounted, computed, ref, onBeforeUnmount } from "#imports";
54
54
  import { Icon } from "#blokkli/components";
55
55
  import { modulo } from "#blokkli/helpers";
56
56
  const { ui } = useBlokkli();
@@ -125,12 +125,16 @@ const onKeyDown = (e) => {
125
125
  }
126
126
  };
127
127
  onMounted(() => {
128
+ ui.hasDialogOpen.value = true;
128
129
  const focusableElements = getFocusableElements();
129
130
  const bestMatch = focusableElements.find((el) => !(el instanceof HTMLButtonElement)) || focusableElements[0];
130
131
  if (bestMatch) {
131
132
  bestMatch.focus();
132
133
  }
133
134
  });
135
+ onBeforeUnmount(() => {
136
+ ui.hasDialogOpen.value = false;
137
+ });
134
138
  </script>
135
139
 
136
140
  <script>
@@ -28,8 +28,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
28
28
  onCancel?: ((...args: any[]) => any) | undefined;
29
29
  onSubmit?: ((...args: any[]) => any) | undefined;
30
30
  }>, {
31
- width: number | string;
32
31
  icon: BlokkliIcon;
32
+ width: number | string;
33
33
  lead: string;
34
34
  submitLabel: string;
35
35
  canSubmit: boolean;