@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
@@ -2,7 +2,12 @@
2
2
  <kbd :title="label" class="bk-shortcut">
3
3
  <template v-if="meta"> <kbd>CTRL</kbd> + </template>
4
4
  <template v-if="shift"> <kbd>SHIFT</kbd> + </template>
5
- <kbd>{{ keyLabel }}</kbd>
5
+ <kbd
6
+ :class="{
7
+ 'bk-is-single': keyLabel.length === 1
8
+ }"
9
+ >{{ keyLabel }}</kbd
10
+ >
6
11
  </kbd>
7
12
  </template>
8
13
 
@@ -19,7 +24,7 @@ const props = defineProps({
19
24
  label: { type: String, required: true }
20
25
  });
21
26
  const emit = defineEmits(["pressed"]);
22
- const { state } = useBlokkli();
27
+ const { state, ui } = useBlokkli();
23
28
  const key = computed(
24
29
  () => [props.meta, props.shift, props.keyCode.toLowerCase()].join("-")
25
30
  );
@@ -54,7 +59,7 @@ onBlokkliEvent("keyPressed", (e) => {
54
59
  return;
55
60
  }
56
61
  e.originalEvent.preventDefault();
57
- if (state.isLoading.value) {
62
+ if (state.isLoading.value || ui.hasTransformOverlayOpen.value) {
58
63
  return;
59
64
  }
60
65
  emit("pressed");
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <Teleport v-if="showDialog" to="body">
3
- <transition appear name="bk-slide-up">
3
+ <BlokkliTransition name="slide-up">
4
4
  <DialogModal
5
5
  :title="$t('systemRequirementsDialogTitle', 'System Requirements')"
6
6
  :width="700"
@@ -46,13 +46,13 @@
46
46
  }}
47
47
  </p>
48
48
  </DialogModal>
49
- </transition>
49
+ </BlokkliTransition>
50
50
  </Teleport>
51
51
  </template>
52
52
 
53
53
  <script setup>
54
54
  import { useBlokkli, computed } from "#imports";
55
- import { DialogModal, Icon } from "#blokkli/components";
55
+ import { DialogModal, Icon, BlokkliTransition } from "#blokkli/components";
56
56
  const { $t, storage, animation } = useBlokkli();
57
57
  const hasDismissed = storage.use("system_requirements_dismissed", false);
58
58
  const requirements = computed(() => {
@@ -13,7 +13,7 @@
13
13
  :class="{ 'bk-is-hidden': !sidebarVisible }"
14
14
  />
15
15
 
16
- <Transition name="bk-toolbar">
16
+ <BlokkliTransition name="toolbar">
17
17
  <div v-show="showToolbar" class="bk bk-top">
18
18
  <div
19
19
  class="bk-toolbar bk-control"
@@ -48,13 +48,14 @@
48
48
  />
49
49
  </div>
50
50
  </div>
51
- </Transition>
51
+ </BlokkliTransition>
52
52
  </Teleport>
53
53
  </template>
54
54
 
55
55
  <script setup>
56
56
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
57
57
  import { onMounted, useBlokkli, onBeforeUnmount, computed } from "#imports";
58
+ import { BlokkliTransition } from "#blokkli/components";
58
59
  const { ui, selection, storage } = useBlokkli();
59
60
  const showToolbar = computed(
60
61
  () => !ui.isMobile.value || !selection.isDragging.value && !selection.isMultiSelecting.value
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <Transition :name :duration appear>
3
+ <slot />
4
+ </Transition>
5
+ </template>
6
+
7
+ <script setup>
8
+ import { computed, useBlokkli } from "#imports";
9
+ const props = defineProps({
10
+ name: { type: String, required: true },
11
+ enabled: { type: Boolean, required: false, default: true }
12
+ });
13
+ const { ui } = useBlokkli();
14
+ const DURATION = {
15
+ "transform-overlay": 300,
16
+ fade: 200,
17
+ menu: 200,
18
+ toolbar: 200,
19
+ "context-menu": 200,
20
+ "drag-item": 200,
21
+ "slide-in": 300,
22
+ "slide-up": 300,
23
+ search: 300,
24
+ editable: 250,
25
+ "touch-bar": 200,
26
+ "command-palette": 100,
27
+ "caret-tooltip": 150
28
+ };
29
+ const name = computed(() => {
30
+ if (!ui.useAnimations.value || !props.enabled) {
31
+ return;
32
+ }
33
+ return "bk-" + props.name;
34
+ });
35
+ const duration = computed(() => {
36
+ if (!ui.useAnimations.value || !props.enabled) {
37
+ return;
38
+ }
39
+ return DURATION[props.name];
40
+ });
41
+ </script>
@@ -0,0 +1,19 @@
1
+ type TransitionName = 'transform-overlay' | 'fade' | 'touch-bar' | 'drag-item' | 'editable' | 'menu' | 'loading' | 'toolbar' | 'slide-in' | 'slide-up' | 'search' | 'context-menu' | 'command-palette' | 'caret-tooltip';
2
+ type __VLS_Props = {
3
+ name: TransitionName;
4
+ enabled?: boolean;
5
+ };
6
+ declare var __VLS_5: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_5) => any;
9
+ };
10
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ enabled: boolean;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -1,21 +1,29 @@
1
+ import AddListItem from './AddListItem/index.vue.js';
2
+ import ConfigForm from './PluginConfigForm/index.vue.js';
3
+ import DialogModal from './Dialog/index.vue.js';
4
+ import DiffViewerState from './DiffViewer/State.vue.js';
5
+ import FormGroup from './Form/Group/index.vue.js';
6
+ import FormItem from './Form/Item/index.vue.js';
7
+ import FormOverlay from './FormOverlay/index.vue.js';
8
+ import FormRadio from './Form/Radio/index.vue.js';
9
+ import FormRadioTabs from './Form/RadioTabs/index.vue.js';
10
+ import FormSelect from './Form/Select/index.vue.js';
11
+ import FormText from './Form/Text/index.vue.js';
12
+ import FormTextarea from './Form/Textarea/index.vue.js';
13
+ import FormToggle from './Form/Toggle/index.vue.js';
14
+ import Highlight from './Highlight/index.vue.js';
15
+ import Icon from './Icon/index.vue.js';
16
+ import InfoBox from './InfoBox/index.vue.js';
1
17
  import ItemIcon from './ItemIcon/index.vue.js';
2
- import ShortcutIndicator from './ShortcutIndicator/index.vue.js';
18
+ import Loading from './Loading/index.vue.js';
19
+ import Pagination from './Pagination/index.vue.js';
3
20
  import RelativeTime from './RelativeTime/index.vue.js';
4
21
  import Resizable from './Resizable/index.vue.js';
5
- import Icon from './Icon/index.vue.js';
6
- import DialogModal from './Dialog/index.vue.js';
7
22
  import ScaleToFit from './ScaleToFit/index.vue.js';
23
+ import ScrollBoundary from './ScrollBoundary/index.vue.js';
24
+ import ShortcutIndicator from './ShortcutIndicator/index.vue.js';
25
+ import BlokkliTransition from './Transition/index.vue.js';
8
26
  import Sortli from './Sortli/index.vue.js';
9
- import FormOverlay from './FormOverlay/index.vue.js';
10
- import AddListItem from './AddListItem/index.vue.js';
11
- import Loading from './Loading/index.vue.js';
12
- import Highlight from './Highlight/index.vue.js';
13
27
  import ViewportBlockingRect from './ViewportBlockingRect/index.vue.js';
14
- import ScrollBoundary from './ScrollBoundary/index.vue.js';
15
- import InfoBox from './InfoBox/index.vue.js';
16
- import Pagination from './Pagination/index.vue.js';
17
- import FormToggle from './Form/Toggle/index.vue.js';
18
- import FormTextarea from './Form/Textarea/index.vue.js';
19
- import FormItem from './Form/Item/index.vue.js';
20
- import FormGroup from './Form/Group/index.vue.js';
21
- export { ItemIcon, ShortcutIndicator, RelativeTime, Icon, Resizable, DialogModal, ScaleToFit, Sortli, FormOverlay, AddListItem, Loading, Highlight, ViewportBlockingRect, ScrollBoundary, InfoBox, Pagination, FormToggle, FormTextarea, FormItem, FormGroup, };
28
+ import AddListItemIcon from './AddListItemIcon/index.vue.js';
29
+ export { AddListItem, AddListItemIcon, ConfigForm, DialogModal, DiffViewerState, FormGroup, FormItem, FormOverlay, FormRadio, FormSelect, FormText, FormTextarea, FormToggle, FormRadioTabs, Highlight, Icon, InfoBox, ItemIcon, Loading, Pagination, RelativeTime, Resizable, ScaleToFit, ScrollBoundary, ShortcutIndicator, Sortli, ViewportBlockingRect, BlokkliTransition, };
@@ -1,42 +1,58 @@
1
+ import AddListItem from "./AddListItem/index.vue";
2
+ import ConfigForm from "./PluginConfigForm/index.vue";
3
+ import DialogModal from "./Dialog/index.vue";
4
+ import DiffViewerState from "./DiffViewer/State.vue";
5
+ import FormGroup from "./Form/Group/index.vue";
6
+ import FormItem from "./Form/Item/index.vue";
7
+ import FormOverlay from "./FormOverlay/index.vue";
8
+ import FormRadio from "./Form/Radio/index.vue";
9
+ import FormRadioTabs from "./Form/RadioTabs/index.vue";
10
+ import FormSelect from "./Form/Select/index.vue";
11
+ import FormText from "./Form/Text/index.vue";
12
+ import FormTextarea from "./Form/Textarea/index.vue";
13
+ import FormToggle from "./Form/Toggle/index.vue";
14
+ import Highlight from "./Highlight/index.vue";
15
+ import Icon from "./Icon/index.vue";
16
+ import InfoBox from "./InfoBox/index.vue";
1
17
  import ItemIcon from "./ItemIcon/index.vue";
2
- import ShortcutIndicator from "./ShortcutIndicator/index.vue";
18
+ import Loading from "./Loading/index.vue";
19
+ import Pagination from "./Pagination/index.vue";
3
20
  import RelativeTime from "./RelativeTime/index.vue";
4
21
  import Resizable from "./Resizable/index.vue";
5
- import Icon from "./Icon/index.vue";
6
- import DialogModal from "./Dialog/index.vue";
7
22
  import ScaleToFit from "./ScaleToFit/index.vue";
23
+ import ScrollBoundary from "./ScrollBoundary/index.vue";
24
+ import ShortcutIndicator from "./ShortcutIndicator/index.vue";
25
+ import BlokkliTransition from "./Transition/index.vue";
8
26
  import Sortli from "./Sortli/index.vue";
9
- import FormOverlay from "./FormOverlay/index.vue";
10
- import AddListItem from "./AddListItem/index.vue";
11
- import Loading from "./Loading/index.vue";
12
- import Highlight from "./Highlight/index.vue";
13
27
  import ViewportBlockingRect from "./ViewportBlockingRect/index.vue";
14
- import ScrollBoundary from "./ScrollBoundary/index.vue";
15
- import InfoBox from "./InfoBox/index.vue";
16
- import Pagination from "./Pagination/index.vue";
17
- import FormToggle from "./Form/Toggle/index.vue";
18
- import FormTextarea from "./Form/Textarea/index.vue";
19
- import FormItem from "./Form/Item/index.vue";
20
- import FormGroup from "./Form/Group/index.vue";
28
+ import AddListItemIcon from "./AddListItemIcon/index.vue";
21
29
  export {
30
+ AddListItem,
31
+ AddListItemIcon,
32
+ ConfigForm,
33
+ DialogModal,
34
+ DiffViewerState,
35
+ FormGroup,
36
+ FormItem,
37
+ FormOverlay,
38
+ FormRadio,
39
+ FormSelect,
40
+ FormText,
41
+ FormTextarea,
42
+ FormToggle,
43
+ FormRadioTabs,
44
+ Highlight,
45
+ Icon,
46
+ InfoBox,
22
47
  ItemIcon,
23
- ShortcutIndicator,
48
+ Loading,
49
+ Pagination,
24
50
  RelativeTime,
25
- Icon,
26
51
  Resizable,
27
- DialogModal,
28
52
  ScaleToFit,
53
+ ScrollBoundary,
54
+ ShortcutIndicator,
29
55
  Sortli,
30
- FormOverlay,
31
- AddListItem,
32
- Loading,
33
- Highlight,
34
56
  ViewportBlockingRect,
35
- ScrollBoundary,
36
- InfoBox,
37
- Pagination,
38
- FormToggle,
39
- FormTextarea,
40
- FormItem,
41
- FormGroup
57
+ BlokkliTransition
42
58
  };
@@ -13,6 +13,10 @@ import { getRuntimeOptionValue } from "#blokkli/helpers/runtimeHelpers";
13
13
  import {
14
14
  OPTIONS
15
15
  } from "#blokkli-build/runtime-options";
16
+ import {
17
+ BUNDLE_BLOKKLI_FRAGMENT,
18
+ BUNDLE_FROM_LIBRARY
19
+ } from "#blokkli/constants";
16
20
  export function defineBlokkli(arg) {
17
21
  const [bundle, identifier] = arg.split("::", 2);
18
22
  const fieldListType = inject(
@@ -49,13 +53,13 @@ export function defineBlokkli(arg) {
49
53
  const parentType = computed(() => item?.value.parentType);
50
54
  const isEditing = !!item?.value.isEditing;
51
55
  const options = computed(() => {
52
- if (bundle === "from_library") {
56
+ if (bundle === BUNDLE_FROM_LIBRARY) {
53
57
  return {
54
58
  ...item?.value.options || {},
55
59
  ...editContext?.mutatedOptions[uuid] || {}
56
60
  };
57
61
  }
58
- const optionKey = bundle === "blokkli_fragment" ? "fragment:" + item?.value.fragmentName + "__default" : identifier;
62
+ const optionKey = bundle === BUNDLE_BLOKKLI_FRAGMENT ? "fragment:" + item?.value.fragmentName + "__default" : identifier;
59
63
  const runtimeOptionDefinitions = (editContext?.definitions.runtimeOptions.value || OPTIONS)[optionKey] || {};
60
64
  const result = Object.entries(runtimeOptionDefinitions).reduce((acc, [key, v]) => {
61
65
  const definition = v;
@@ -88,7 +92,7 @@ export function defineBlokkli(arg) {
88
92
  import.meta.hot.accept("#blokkli/helpers/runtimeHelpers", () => {
89
93
  });
90
94
  }
91
- if (editContext?.useBlockRegistration && editContext.dom && bundle !== "from_library" && bundle !== "blokkli_fragment") {
95
+ if (editContext?.useBlockRegistration && editContext.dom && bundle !== BUNDLE_FROM_LIBRARY && bundle !== BUNDLE_BLOKKLI_FRAGMENT) {
92
96
  const isProxyMode = inject(INJECT_FIELD_USES_PROXY, false);
93
97
  if (!isProxyMode) {
94
98
  editContext.useBlockRegistration(editContext.dom, uuid);
@@ -15,14 +15,11 @@ type SettingType<S> = S extends {
15
15
  type SettingsTypes<S> = {
16
16
  [P in keyof S]: SettingType<S[P]>;
17
17
  };
18
- type PickRequiredMethods<T, Methods extends AdapterMethods[]> = {
19
- [K in Methods[number]]: NonNullable<BlokkliAdapter<T>[K]>;
20
- };
21
- type CombinedAdapter<T, Methods extends AdapterMethods[]> = PickRequiredMethods<T, Methods> & BlokkliAdapter<T>;
22
- type DefineBlokkliFeature<T, Methods extends AdapterMethods[], F extends FeatureDefinition<Methods, ValidFeatureKey>> = {
23
- adapter: CombinedAdapter<T, Methods>;
18
+ type RequireAdapterMethods<T extends BlokkliAdapter<any>, Methods extends readonly AdapterMethods[]> = Omit<T, Methods[number]> & Required<Pick<T, Methods[number] & keyof T>>;
19
+ type DefineBlokkliFeature<F extends FeatureDefinition<any, any>> = {
20
+ adapter: F['requiredAdapterMethods'] extends readonly (keyof BlokkliAdapter<any>)[] ? RequireAdapterMethods<BlokkliAdapter<any>, F['requiredAdapterMethods']> : BlokkliAdapter<any>;
24
21
  settings: ComputedRef<SettingsTypes<F['settings']>>;
25
22
  logger: DebugLogger;
26
23
  };
27
- export declare function defineBlokkliFeature<T, Methods extends AdapterMethods[], F extends FeatureDefinition<Methods, ValidFeatureKey>>(feature: F): DefineBlokkliFeature<T, Methods, F>;
24
+ export declare function defineBlokkliFeature<const F extends FeatureDefinition<AdapterMethods[], ValidFeatureKey>>(feature: F): DefineBlokkliFeature<F>;
28
25
  export {};
@@ -0,0 +1,11 @@
1
+ import type { BlockDefinitionOptionsInput, DefineProviderContext, ProviderDefinitionInput } from '#blokkli/types';
2
+ import type { GlobalOptionsKey } from '#blokkli-build/generated-types';
3
+ type DefineBlokkliProviderProps = {
4
+ hostOptions?: any;
5
+ } | {
6
+ blokkliProps: {
7
+ hostOptions?: any;
8
+ };
9
+ };
10
+ export declare function defineBlokkliProvider<T extends BlockDefinitionOptionsInput = BlockDefinitionOptionsInput, G extends GlobalOptionsKey[] | undefined = undefined>(props: DefineBlokkliProviderProps, _config: ProviderDefinitionInput<T, G>): DefineProviderContext<T, G>;
11
+ export {};
@@ -0,0 +1,46 @@
1
+ import { computed, provide, useState } from "#imports";
2
+ import { INJECT_PROVIDER_KEY } from "#blokkli/helpers/symbols";
3
+ import {
4
+ OPTIONS
5
+ } from "#blokkli-build/runtime-options";
6
+ import { getRuntimeOptionValue } from "#blokkli/helpers/runtimeHelpers";
7
+ export function defineBlokkliProvider(props, _config) {
8
+ const key = _config;
9
+ provide(INJECT_PROVIDER_KEY, key);
10
+ const overrideOptions = useState(
11
+ "options:" + key,
12
+ () => {
13
+ return null;
14
+ }
15
+ );
16
+ const definitionKey = key.split("::")[1] ?? "";
17
+ const runtimeOptionDefinitions = OPTIONS[definitionKey];
18
+ const options = computed(() => {
19
+ if (!runtimeOptionDefinitions) {
20
+ return {};
21
+ }
22
+ const hostOptionsCurrent = ("blokkliProps" in props ? props.blokkliProps.hostOptions : props.hostOptions) ?? {};
23
+ return Object.entries(runtimeOptionDefinitions).reduce((acc, [key2, v]) => {
24
+ const definition = v;
25
+ if (overrideOptions.value) {
26
+ if (overrideOptions.value[key2] !== void 0 && overrideOptions.value[key2] !== null) {
27
+ acc[key2] = getRuntimeOptionValue(
28
+ definition,
29
+ overrideOptions.value[key2]
30
+ );
31
+ return acc;
32
+ }
33
+ }
34
+ if (hostOptionsCurrent && hostOptionsCurrent[key2] !== void 0 && hostOptionsCurrent[key2] !== null) {
35
+ acc[key2] = getRuntimeOptionValue(definition, hostOptionsCurrent[key2]);
36
+ return acc;
37
+ }
38
+ acc[key2] = definition[1];
39
+ return acc;
40
+ }, {});
41
+ });
42
+ return {
43
+ // Must be cast because type of options is inferred automatically.
44
+ options
45
+ };
46
+ }
@@ -29,7 +29,7 @@ function walkBlocks(matches, callback, mutatedOptions, mutatedFieldsMap, list) {
29
29
  }
30
30
  const nestedFieldMapping = FIELD_MAPPING[mappedItem.bundle];
31
31
  if (!nestedFieldMapping) continue;
32
- if (!mappedItem.props) continue;
32
+ if (!("props" in mappedItem) || !mappedItem.props) continue;
33
33
  const propNames = Object.keys(nestedFieldMapping);
34
34
  for (const propName of propNames) {
35
35
  const fieldName = nestedFieldMapping[propName];
@@ -2,3 +2,6 @@ export declare const SETTINGS_GROUP: readonly ["appearance", "artboard", "behavi
2
2
  export declare const VIEWPORT: readonly ["mobile", "desktop"];
3
3
  export type SettingsGroup = (typeof SETTINGS_GROUP)[number];
4
4
  export type Viewport = (typeof VIEWPORT)[number];
5
+ export declare const BUNDLE_FROM_LIBRARY = "from_library";
6
+ export declare const BUNDLE_BLOKKLI_FRAGMENT = "blokkli_fragment";
7
+ export declare const INTERNAL_BUNDLES: string[];
@@ -6,3 +6,6 @@ export const SETTINGS_GROUP = [
6
6
  "advanced"
7
7
  ];
8
8
  export const VIEWPORT = ["mobile", "desktop"];
9
+ export const BUNDLE_FROM_LIBRARY = "from_library";
10
+ export const BUNDLE_BLOKKLI_FRAGMENT = "blokkli_fragment";
11
+ export const INTERNAL_BUNDLES = [BUNDLE_FROM_LIBRARY, BUNDLE_BLOKKLI_FRAGMENT];