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

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 (289) hide show
  1. package/dist/module.d.mts +1 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +4873 -1167
  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 +5 -0
  7. package/dist/modules/drupal/graphql/base/query.pbEntityConfig.graphql +5 -0
  8. package/dist/modules/drupal/graphql/features/publishNew.graphql +1 -4
  9. package/dist/modules/drupal/graphql/features/scheduler.graphql +31 -0
  10. package/dist/modules/drupal/graphql/features/transform.graphql +9 -1
  11. package/dist/modules/drupal/graphql/features/transform_host.graphql +38 -0
  12. package/dist/modules/drupal/graphql/mutations/update_host_options.graphql +15 -0
  13. package/dist/modules/drupal/index.d.mts +1 -1
  14. package/dist/modules/drupal/index.mjs +37 -7
  15. package/dist/modules/drupal/runtime/adapter/index.js +140 -5
  16. package/dist/runtime/adapter/index.d.ts +90 -1
  17. package/dist/runtime/blokkliPlugins/AddAction/index.vue +27 -3
  18. package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue +65 -0
  19. package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue.d.ts +26 -0
  20. package/dist/runtime/blokkliPlugins/ContextMenu/Menu/index.vue +3 -0
  21. package/dist/runtime/blokkliPlugins/ContextMenu/index.vue +3 -2
  22. package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue +3 -3
  23. package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue +49 -11
  24. package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue.d.ts +29 -15
  25. package/dist/runtime/blokkliPlugins/MenuButton/index.vue.d.ts +2 -2
  26. package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue +6 -7
  27. package/dist/runtime/blokkliPlugins/Sidebar/index.vue +2 -9
  28. package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +1 -1
  29. package/dist/runtime/blokkliPlugins/ViewOption/index.vue +6 -3
  30. package/dist/runtime/blokkliPlugins/index.d.ts +8 -7
  31. package/dist/runtime/blokkliPlugins/index.js +15 -13
  32. package/dist/runtime/components/Blocks/Fragment/icon.svg +1 -1
  33. package/dist/runtime/components/BlokkliProvider.vue +1 -0
  34. package/dist/runtime/components/BlokkliProvider.vue.d.ts +1 -0
  35. package/dist/runtime/components/Edit/Actions/index.vue +39 -67
  36. package/dist/runtime/components/Edit/AddListItem/index.vue +2 -5
  37. package/dist/runtime/components/Edit/AddListItem/index.vue.d.ts +1 -1
  38. package/dist/runtime/components/Edit/AddListItemIcon/index.vue +19 -0
  39. package/dist/runtime/components/Edit/AddListItemIcon/index.vue.d.ts +15 -0
  40. package/dist/runtime/components/Edit/AppMenu/index.vue +5 -5
  41. package/dist/runtime/components/Edit/Dialog/index.vue +5 -1
  42. package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +1 -1
  43. package/dist/runtime/components/Edit/DiffViewer/State.vue +276 -0
  44. package/dist/runtime/components/Edit/DiffViewer/State.vue.d.ts +16 -0
  45. package/dist/runtime/components/Edit/DragInteractions/index.vue +35 -6
  46. package/dist/runtime/components/Edit/EditProvider.vue +46 -35
  47. package/dist/runtime/components/Edit/Features/AddList/index.vue +15 -25
  48. package/dist/runtime/components/Edit/Features/Analyze/Overlay/fragment.glsl +58 -0
  49. package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +168 -0
  50. package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue.d.ts +9 -0
  51. package/dist/runtime/components/Edit/Features/Analyze/Overlay/vertex.glsl +72 -0
  52. package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue +159 -0
  53. package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue.d.ts +7 -0
  54. package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue +100 -0
  55. package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue.d.ts +6 -0
  56. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue +56 -0
  57. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue.d.ts +3 -0
  58. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue +87 -0
  59. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue.d.ts +7 -0
  60. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +101 -0
  61. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue.d.ts +8 -0
  62. package/dist/runtime/components/Edit/Features/Analyze/Results/Status.vue +18 -0
  63. package/dist/runtime/components/Edit/Features/Analyze/Results/Status.vue.d.ts +8 -0
  64. package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue +92 -0
  65. package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue.d.ts +17 -0
  66. package/dist/runtime/components/Edit/Features/Analyze/Summary/index.vue +77 -0
  67. package/dist/runtime/components/Edit/Features/Analyze/Summary/index.vue.d.ts +6 -0
  68. package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.d.ts +12 -0
  69. package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.js +75 -0
  70. package/dist/runtime/components/Edit/Features/Analyze/analyzers/defineAnalyzer.d.ts +4 -0
  71. package/dist/runtime/components/Edit/Features/Analyze/analyzers/defineAnalyzer.js +5 -0
  72. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.d.ts +32 -0
  73. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.js +45 -0
  74. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/collectTextElements.d.ts +5 -0
  75. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/collectTextElements.js +95 -0
  76. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/normalizeArray.d.ts +3 -0
  77. package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/normalizeArray.js +13 -0
  78. package/dist/runtime/components/Edit/Features/Analyze/analyzers/index.d.ts +2 -0
  79. package/dist/runtime/components/Edit/Features/Analyze/analyzers/index.js +2 -0
  80. package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.d.ts +2 -0
  81. package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.js +165 -0
  82. package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.d.ts +44 -0
  83. package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.js +0 -0
  84. package/dist/runtime/components/Edit/Features/Analyze/helper.d.ts +5 -0
  85. package/dist/runtime/components/Edit/Features/Analyze/helper.js +28 -0
  86. package/dist/runtime/components/Edit/Features/Analyze/index.vue +44 -0
  87. package/dist/runtime/components/Edit/Features/Anchors/Renderer.vue +136 -0
  88. package/dist/runtime/components/Edit/Features/Anchors/index.vue +32 -0
  89. package/dist/runtime/components/Edit/Features/Anchors/index.vue.d.ts +2 -0
  90. package/dist/runtime/components/Edit/Features/Artboard/Overview/index.vue +25 -13
  91. package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +296 -0
  92. package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue.d.ts +7 -0
  93. package/dist/runtime/components/Edit/Features/Artboard/index.vue +10 -245
  94. package/dist/runtime/components/Edit/Features/Assistant/index.vue +3 -2
  95. package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +4 -4
  96. package/dist/runtime/components/Edit/Features/Clipboard/index.vue +161 -28
  97. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue +16 -4
  98. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue.d.ts +0 -1
  99. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +4 -53
  100. package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +3 -2
  101. package/dist/runtime/components/Edit/Features/Conversions/index.vue +12 -14
  102. package/dist/runtime/components/Edit/Features/Debug/Viewport/index.vue +14 -0
  103. package/dist/runtime/components/Edit/Features/Debug/index.vue +27 -24
  104. package/dist/runtime/components/Edit/Features/Diff/DiffView/index.vue +13 -190
  105. package/dist/runtime/components/Edit/Features/Diff/index.vue +2 -2
  106. package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +4 -4
  107. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/fragment.glsl +1 -1
  108. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +35 -71
  109. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/vertex.glsl +1 -1
  110. package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +62 -48
  111. package/dist/runtime/components/Edit/Features/EditForm/Frame/index.vue +3 -3
  112. package/dist/runtime/components/Edit/Features/EditForm/index.vue +3 -3
  113. package/dist/runtime/components/Edit/Features/EditableField/index.vue +6 -2
  114. package/dist/runtime/components/Edit/Features/EditableMask/index.vue +3 -20
  115. package/dist/runtime/components/Edit/Features/EntityTitle/index.vue +33 -1
  116. package/dist/runtime/components/Edit/Features/Fragments/index.vue +3 -2
  117. package/dist/runtime/components/Edit/Features/History/index.vue +35 -12
  118. package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +6 -2
  119. package/dist/runtime/components/Edit/Features/ImportExisting/index.vue +3 -2
  120. package/dist/runtime/components/Edit/Features/Library/index.vue +11 -9
  121. package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +5 -8
  122. package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/fragment.glsl +1 -1
  123. package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +9 -4
  124. package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/vertex.glsl +1 -1
  125. package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +8 -14
  126. package/dist/runtime/components/Edit/Features/Options/Form/Checkbox/index.vue +3 -2
  127. package/dist/runtime/components/Edit/Features/Options/Form/Checkbox/index.vue.d.ts +2 -0
  128. package/dist/runtime/components/Edit/Features/Options/Form/Item.vue +9 -3
  129. package/dist/runtime/components/Edit/Features/Options/Form/Item.vue.d.ts +0 -1
  130. package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue +37 -19
  131. package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue.d.ts +8 -2
  132. package/dist/runtime/components/Edit/Features/Options/Form/index.vue +81 -37
  133. package/dist/runtime/components/Edit/Features/Options/Form/index.vue.d.ts +5 -5
  134. package/dist/runtime/components/Edit/Features/Options/index.vue +30 -6
  135. package/dist/runtime/components/Edit/Features/PreviewGrant/index.vue +3 -3
  136. package/dist/runtime/components/Edit/Features/Publish/Dialog/Item.vue +41 -14
  137. package/dist/runtime/components/Edit/Features/Publish/Dialog/Item.vue.d.ts +2 -0
  138. package/dist/runtime/components/Edit/Features/Publish/Dialog/PublishOption.vue +47 -0
  139. package/dist/runtime/components/Edit/Features/Publish/Dialog/PublishOption.vue.d.ts +19 -0
  140. package/dist/runtime/components/Edit/Features/Publish/Dialog/ScheduleDate.vue +183 -0
  141. package/dist/runtime/components/Edit/Features/Publish/Dialog/ScheduleDate.vue.d.ts +13 -0
  142. package/dist/runtime/components/Edit/Features/Publish/Dialog/Summary.vue +83 -0
  143. package/dist/runtime/components/Edit/Features/Publish/Dialog/Summary.vue.d.ts +9 -0
  144. package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +381 -128
  145. package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue.d.ts +3 -14
  146. package/dist/runtime/components/Edit/Features/Publish/index.vue +37 -22
  147. package/dist/runtime/components/Edit/Features/Revert/index.vue +3 -3
  148. package/dist/runtime/components/Edit/Features/Search/index.vue +3 -2
  149. package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue +54 -0
  150. package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue.d.ts +14 -0
  151. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +120 -0
  152. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +15 -0
  153. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +459 -0
  154. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue.d.ts +6 -0
  155. package/dist/runtime/components/Edit/Features/Selection/Overlay/fragment.glsl +14 -9
  156. package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue +32 -11
  157. package/dist/runtime/components/Edit/Features/Selection/Overlay/vertex.glsl +1 -1
  158. package/dist/runtime/components/Edit/Features/Selection/index.vue +76 -7
  159. package/dist/runtime/components/Edit/Features/Settings/Dialog/FeatureSetting/index.vue +12 -17
  160. package/dist/runtime/components/Edit/Features/Settings/index.vue +11 -25
  161. package/dist/runtime/components/Edit/Features/Theme/Color/index.vue +5 -1
  162. package/dist/runtime/components/Edit/Features/Theme/index.vue +2 -1
  163. package/dist/runtime/components/Edit/Features/TouchActionBar/index.vue +3 -2
  164. package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue +198 -0
  165. package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue.d.ts +13 -0
  166. package/dist/runtime/components/Edit/Features/Transform/index.vue +155 -44
  167. package/dist/runtime/components/Edit/Form/Datepicker/index.vue +198 -0
  168. package/dist/runtime/components/Edit/Form/Datepicker/index.vue.d.ts +15 -0
  169. package/dist/runtime/components/Edit/Form/Radio/index.vue +33 -0
  170. package/dist/runtime/components/Edit/Form/Radio/index.vue.d.ts +20 -0
  171. package/dist/runtime/components/Edit/Form/RadioTabs/index.vue +37 -0
  172. package/dist/runtime/components/Edit/Form/RadioTabs/index.vue.d.ts +22 -0
  173. package/dist/runtime/components/Edit/Form/Select/index.vue +29 -0
  174. package/dist/runtime/components/Edit/Form/Select/index.vue.d.ts +20 -0
  175. package/dist/runtime/components/Edit/Form/Text/index.vue +33 -0
  176. package/dist/runtime/components/Edit/Form/Text/index.vue.d.ts +19 -0
  177. package/dist/runtime/components/Edit/Form/Textarea/index.vue +13 -6
  178. package/dist/runtime/components/Edit/Form/Textarea/index.vue.d.ts +4 -0
  179. package/dist/runtime/components/Edit/FormOverlay/index.vue +1 -1
  180. package/dist/runtime/components/Edit/Indicators/index.vue +123 -0
  181. package/dist/runtime/components/Edit/Indicators/index.vue.d.ts +2 -0
  182. package/dist/runtime/components/Edit/ItemIcon/index.vue +2 -1
  183. package/dist/runtime/components/Edit/Konami/Game/PixelGrid.vue +66 -0
  184. package/dist/runtime/components/Edit/Konami/Game/PixelGrid.vue.d.ts +7 -0
  185. package/dist/runtime/components/Edit/Konami/Game/blokkli.png +0 -0
  186. package/dist/runtime/components/Edit/Konami/Game/charmap.d.ts +2 -0
  187. package/dist/runtime/components/Edit/Konami/Game/charmap.js +168 -0
  188. package/dist/runtime/components/Edit/Konami/Game/index.vue +752 -0
  189. package/dist/runtime/components/Edit/Konami/Game/index.vue.d.ts +6 -0
  190. package/dist/runtime/components/Edit/Konami/Game/textRendering.d.ts +8 -0
  191. package/dist/runtime/components/Edit/Konami/Game/textRendering.js +138 -0
  192. package/dist/runtime/components/Edit/Konami/Game/useIconRendering.d.ts +9 -0
  193. package/dist/runtime/components/Edit/Konami/Game/useIconRendering.js +130 -0
  194. package/dist/runtime/components/Edit/Konami/index.vue +44 -0
  195. package/dist/runtime/components/Edit/Konami/index.vue.d.ts +2 -0
  196. package/dist/runtime/components/Edit/Loading/index.vue +6 -2
  197. package/dist/runtime/components/Edit/Loading/index.vue.d.ts +2 -0
  198. package/dist/runtime/components/Edit/Messages/index.vue +8 -3
  199. package/dist/runtime/components/Edit/PluginConfigForm/Checkbox/index.vue +17 -0
  200. package/dist/runtime/components/Edit/PluginConfigForm/Checkbox/index.vue.d.ts +11 -0
  201. package/dist/runtime/components/Edit/PluginConfigForm/Options/index.vue +37 -0
  202. package/dist/runtime/components/Edit/PluginConfigForm/Options/index.vue.d.ts +11 -0
  203. package/dist/runtime/components/Edit/PluginConfigForm/Text/index.vue +43 -0
  204. package/dist/runtime/components/Edit/PluginConfigForm/Text/index.vue.d.ts +11 -0
  205. package/dist/runtime/components/Edit/PluginConfigForm/index.vue +57 -0
  206. package/dist/runtime/components/Edit/PluginConfigForm/index.vue.d.ts +16 -0
  207. package/dist/runtime/components/Edit/PreviewProvider.vue +3 -4
  208. package/dist/runtime/components/Edit/RelativeTime/index.vue +3 -2
  209. package/dist/runtime/components/Edit/ShortcutIndicator/index.vue +8 -3
  210. package/dist/runtime/components/Edit/SystemRequirements/index.vue +3 -3
  211. package/dist/runtime/components/Edit/Toolbar/index.vue +3 -2
  212. package/dist/runtime/components/Edit/Transition/index.vue +41 -0
  213. package/dist/runtime/components/Edit/Transition/index.vue.d.ts +19 -0
  214. package/dist/runtime/components/Edit/index.d.ts +24 -15
  215. package/dist/runtime/components/Edit/index.js +46 -28
  216. package/dist/runtime/composables/defineBlokkli.js +7 -3
  217. package/dist/runtime/composables/defineBlokkliFeature.d.ts +4 -7
  218. package/dist/runtime/composables/defineBlokkliProvider.d.ts +11 -0
  219. package/dist/runtime/composables/defineBlokkliProvider.js +46 -0
  220. package/dist/runtime/composables/useBlokkliHelper.js +1 -1
  221. package/dist/runtime/constants/index.d.ts +3 -0
  222. package/dist/runtime/constants/index.js +3 -0
  223. package/dist/runtime/css/output.css +1 -1
  224. package/dist/runtime/helpers/addElementClasses.d.ts +2 -0
  225. package/dist/runtime/helpers/addElementClasses.js +24 -0
  226. package/dist/runtime/helpers/animationProvider.d.ts +4 -2
  227. package/dist/runtime/helpers/animationProvider.js +7 -2
  228. package/dist/runtime/helpers/bundles/index.d.ts +1 -0
  229. package/dist/runtime/helpers/bundles/index.js +4 -0
  230. package/dist/runtime/helpers/composables/useStickyToolbar.d.ts +20 -0
  231. package/dist/runtime/helpers/composables/useStickyToolbar.js +215 -0
  232. package/dist/runtime/helpers/definitionProvider.d.ts +2 -1
  233. package/dist/runtime/helpers/definitionProvider.js +17 -0
  234. package/dist/runtime/helpers/domProvider.d.ts +2 -1
  235. package/dist/runtime/helpers/domProvider.js +89 -43
  236. package/dist/runtime/helpers/dropTargets/index.d.ts +6 -0
  237. package/dist/runtime/helpers/dropTargets/index.js +49 -0
  238. package/dist/runtime/helpers/eventBus.d.ts +1 -1
  239. package/dist/runtime/helpers/eventBus.js +2 -2
  240. package/dist/runtime/helpers/index.d.ts +10 -1
  241. package/dist/runtime/helpers/index.js +57 -0
  242. package/dist/runtime/helpers/indicatorsProvider.d.ts +10 -0
  243. package/dist/runtime/helpers/indicatorsProvider.js +23 -0
  244. package/dist/runtime/helpers/keyboardProvider.d.ts +2 -0
  245. package/dist/runtime/helpers/keyboardProvider.js +17 -1
  246. package/dist/runtime/helpers/pluginProvider.d.ts +10 -0
  247. package/dist/runtime/helpers/pluginProvider.js +33 -0
  248. package/dist/runtime/helpers/renderCycle.d.ts +1 -0
  249. package/dist/runtime/helpers/renderCycle.js +10 -0
  250. package/dist/runtime/helpers/runtimeHelpers/index.js +14 -11
  251. package/dist/runtime/helpers/selectionProvider.d.ts +16 -0
  252. package/dist/runtime/helpers/selectionProvider.js +47 -35
  253. package/dist/runtime/helpers/stateProvider.d.ts +7 -2
  254. package/dist/runtime/helpers/stateProvider.js +89 -14
  255. package/dist/runtime/helpers/storageProvider.d.ts +4 -3
  256. package/dist/runtime/helpers/storageProvider.js +56 -3
  257. package/dist/runtime/helpers/symbols.d.ts +1 -0
  258. package/dist/runtime/helpers/symbols.js +1 -0
  259. package/dist/runtime/helpers/textProvider.js +6 -0
  260. package/dist/runtime/helpers/themeProvider.d.ts +2 -0
  261. package/dist/runtime/helpers/themeProvider.js +4 -1
  262. package/dist/runtime/helpers/transform.js +1 -3
  263. package/dist/runtime/helpers/uiProvider.d.ts +9 -2
  264. package/dist/runtime/helpers/uiProvider.js +72 -47
  265. package/dist/runtime/helpers/useTransitionedValue.d.ts +18 -0
  266. package/dist/runtime/helpers/useTransitionedValue.js +57 -0
  267. package/dist/runtime/icons/anchor.svg +1 -0
  268. package/dist/runtime/icons/arrow-left.svg +1 -1
  269. package/dist/runtime/icons/arrow-right.svg +1 -1
  270. package/dist/runtime/icons/arrow-top-right.svg +1 -0
  271. package/dist/runtime/icons/calendar-clock.svg +1 -0
  272. package/dist/runtime/icons/chart.svg +1 -0
  273. package/dist/runtime/icons/copy.svg +1 -0
  274. package/dist/runtime/icons/cursor-move.svg +1 -1
  275. package/dist/runtime/icons/diff.svg +1 -1
  276. package/dist/runtime/icons/eye-off.svg +1 -0
  277. package/dist/runtime/icons/eye.svg +1 -1
  278. package/dist/runtime/icons/info.svg +1 -1
  279. package/dist/runtime/icons/link.svg +1 -0
  280. package/dist/runtime/icons/speedometer.svg +1 -0
  281. package/dist/runtime/types/blokkOptions.d.ts +8 -0
  282. package/dist/runtime/types/index.d.ts +172 -6
  283. package/dist/runtime/types/theme.d.ts +2 -1
  284. package/dist/shared/{editor.gz_ac6uT.d.mts → editor.CKsrTpc1.d.mts} +1 -1
  285. package/package.json +20 -5
  286. package/dist/runtime/components/Edit/Features/FieldAreas/Overlay/index.vue +0 -22
  287. package/dist/runtime/components/Edit/Features/FieldAreas/index.vue +0 -41
  288. /package/dist/runtime/components/Edit/Features/{FieldAreas/Overlay → Analyze}/index.vue.d.ts +0 -0
  289. /package/dist/runtime/components/Edit/Features/{FieldAreas/index.vue.d.ts → Anchors/Renderer.vue.d.ts} +0 -0
@@ -23,6 +23,12 @@ import {
23
23
  import vs from "./vertex.glsl?raw";
24
24
  import fs from "./fragment.glsl?raw";
25
25
  import { RectangleBufferCollector } from "#blokkli/helpers/webgl";
26
+ import {
27
+ determineCanAddChildren,
28
+ getChildrenOrientation,
29
+ getGapSize,
30
+ MIN_GAP
31
+ } from "#blokkli/helpers/dropTargets";
26
32
  const props = defineProps({
27
33
  items: { type: Array, required: true },
28
34
  box: { type: Object, required: true },
@@ -30,7 +36,6 @@ const props = defineProps({
30
36
  mouseY: { type: Number, required: true },
31
37
  isTouch: { type: Boolean, required: true }
32
38
  });
33
- const MIN_GAP = 20;
34
39
  var RectRenderType = /* @__PURE__ */ ((RectRenderType2) => {
35
40
  RectRenderType2[RectRenderType2["DROP_AREA"] = 0] = "DROP_AREA";
36
41
  RectRenderType2[RectRenderType2["FIELD_1"] = 1] = "FIELD_1";
@@ -139,26 +144,7 @@ const emitDrop = async () => {
139
144
  }
140
145
  }
141
146
  eventBus.emit("dragging:end");
142
- eventBus.emit("item:dropped");
143
147
  };
144
- function getChildrenOrientation(element) {
145
- const computedStyle = window.getComputedStyle(element);
146
- if (computedStyle.display.includes("flex")) {
147
- if (computedStyle.flexDirection === "row" || computedStyle.flexDirection === "row-reverse") {
148
- return "horizontal";
149
- } else {
150
- return "vertical";
151
- }
152
- }
153
- if (computedStyle.display.includes("grid")) {
154
- if (computedStyle.gridTemplateColumns.split(" ").length > 1) {
155
- return "horizontal";
156
- } else {
157
- return "vertical";
158
- }
159
- }
160
- return "vertical";
161
- }
162
148
  const draggingBundles = computed(
163
149
  () => props.items.flatMap((item) => {
164
150
  const bundles = [];
@@ -178,20 +164,6 @@ const selectionUuids = computed(
178
164
  }
179
165
  }).filter(falsy)
180
166
  );
181
- function getGapSize(orientation, element) {
182
- const computedStyle = window.getComputedStyle(element);
183
- if (computedStyle.display.includes("grid") || computedStyle.display.includes("flex")) {
184
- const gap = orientation === "vertical" ? computedStyle.columnGap || computedStyle.gridColumnGap : computedStyle.rowGap || computedStyle.gridRowGap;
185
- if (gap) {
186
- const gapParts = gap.split(" ");
187
- const gapValue = gapParts[0];
188
- if (gapValue?.endsWith("px")) {
189
- return Number.parseFloat(gapValue);
190
- }
191
- }
192
- }
193
- return MIN_GAP;
194
- }
195
167
  const fieldChildCache = {};
196
168
  const buildChildId = (field, preceedingUuid, type, uuid) => {
197
169
  return `${field.key}:${preceedingUuid || ""}:${type || ""}:${uuid || ""}`;
@@ -300,25 +272,6 @@ function getInsertText(field) {
300
272
  const bundleLabel = getBundleLabel(field);
301
273
  return `${bundleLabel} \xBB <strong>${field.label}</strong>`;
302
274
  }
303
- const determineCanAddChildren = (field, children) => {
304
- if (field.cardinality !== -1) {
305
- const count = state.getFieldBlockCount(field.key);
306
- const childrenThatAreSelection = children.filter((child) => {
307
- const uuid = child.dataset.uuid;
308
- if (!uuid) {
309
- return false;
310
- }
311
- return selectionUuids.value.includes(uuid);
312
- }).length;
313
- const countAfter = count - childrenThatAreSelection + props.items.length;
314
- if (countAfter > field.cardinality) {
315
- return false;
316
- }
317
- }
318
- return !draggingBundles.value.length || draggingBundles.value.every(
319
- (bundle) => field.allowedBundles.includes(bundle)
320
- );
321
- };
322
275
  const buildEmptyChild = (field, children, orientation, fieldWidth, fieldHeight) => {
323
276
  if (children.length === 0) {
324
277
  const id = buildChildId(field, null, "empty");
@@ -356,7 +309,15 @@ const buildFieldRect = (key) => {
356
309
  return;
357
310
  }
358
311
  const childElements = [...field.element.children];
359
- const canAddChildren = determineCanAddChildren(field, childElements);
312
+ const currentCount = state.getFieldBlockCount(field.key);
313
+ const canAddChildren = determineCanAddChildren(
314
+ field,
315
+ childElements,
316
+ selectionUuids.value,
317
+ currentCount,
318
+ props.items.length,
319
+ draggingBundles.value
320
+ );
360
321
  const orientation = field.dropAlignment || getChildrenOrientation(field.element);
361
322
  const rect = dom.getFieldRect(field.key);
362
323
  if (!rect) {
@@ -406,10 +367,11 @@ const buildDropAreaRect = (area) => {
406
367
  cachedDropAreaRects[area.id] = dropAreaRect;
407
368
  return dropAreaRect;
408
369
  };
370
+ const alphaBase = gl ? 0.7 : 0.3;
409
371
  const colorTeal = rgbaToString(theme.teal.value.normal);
410
- const colorTealAlpha = rgbaToString(theme.teal.value.normal, 0.7);
372
+ const colorTealAlpha = rgbaToString(theme.teal.value.normal, alphaBase);
411
373
  const colorAccent = rgbaToString(theme.accent.value[800]);
412
- const colorAccentAlpha = rgbaToString(theme.accent.value[800], 0.7);
374
+ const colorAccentAlpha = rgbaToString(theme.accent.value[800], alphaBase);
413
375
  function getRectType(field) {
414
376
  if (field.nestingLevel >= 3) {
415
377
  return 4 /* FIELD_4 */;
@@ -522,21 +484,23 @@ class DropTargetRectangleBufferCollector extends RectangleBufferCollector {
522
484
  }
523
485
  }
524
486
  const collector = new DropTargetRectangleBufferCollector(gl);
525
- collector.addRectangle(
526
- {
527
- id: "active-hover-rect",
528
- type: "active-area",
529
- label: "Field Area",
530
- color: "red",
531
- colorAlpha: "red",
532
- x: 0,
533
- y: 0,
534
- width: ui.artboardSize.value.width,
535
- height: ui.artboardSize.value.height
536
- },
537
- 5 /* ACTIVE_AREA */,
538
- false
539
- );
487
+ if (gl) {
488
+ collector.addRectangle(
489
+ {
490
+ id: "active-hover-rect",
491
+ type: "active-area",
492
+ label: "Field Area",
493
+ color: "red",
494
+ colorAlpha: "red",
495
+ x: 0,
496
+ y: 0,
497
+ width: ui.artboardSize.value.width,
498
+ height: ui.artboardSize.value.height
499
+ },
500
+ 5 /* ACTIVE_AREA */,
501
+ false
502
+ );
503
+ }
540
504
  const fieldColors = computed(() => {
541
505
  return {
542
506
  "0": theme.accent.value[900],
@@ -1,4 +1,4 @@
1
- precision mediump float;
1
+ precision highp float;
2
2
 
3
3
  attribute vec2 a_position;
4
4
  attribute vec4 a_quad;
@@ -32,6 +32,7 @@ import {
32
32
  nextTick
33
33
  } from "#imports";
34
34
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
35
+ import { renderCycle } from "#blokkli/helpers/renderCycle";
35
36
  const { adapter } = defineBlokkliFeature({
36
37
  icon: "drag",
37
38
  id: "dragging-overlay",
@@ -126,13 +127,15 @@ const onDropExisting = async (items, host, afterUuid) => {
126
127
  }
127
128
  };
128
129
  const onDropReusable = async (item, host, afterUuid) => {
129
- await state.mutateWithLoadingState(
130
- () => adapter.addLibraryItem({
131
- libraryItemUuid: item.libraryItemUuid,
132
- host,
133
- afterUuid
134
- })
135
- );
130
+ if (adapter.addLibraryItem) {
131
+ await state.mutateWithLoadingState(
132
+ () => adapter.addLibraryItem({
133
+ libraryItemUuid: item.libraryItemUuid,
134
+ host,
135
+ afterUuid
136
+ })
137
+ );
138
+ }
136
139
  };
137
140
  const onDropClipboardItem = async (item, host, afterUuid) => {
138
141
  eventBus.emit("drop:clipboardItem", {
@@ -162,24 +165,28 @@ const onDropMediaLibraryItem = async (items, host, afterUuid) => {
162
165
  }
163
166
  };
164
167
  const onDropSearchContentItem = async (item, host, afterUuid) => {
165
- await state.mutateWithLoadingState(
166
- () => adapter.addContentSearchItem({
167
- item: item.searchItem,
168
- host,
169
- bundle: item.itemBundle,
170
- afterUuid
171
- })
172
- );
168
+ if (adapter.addContentSearchItem) {
169
+ await state.mutateWithLoadingState(
170
+ () => adapter.addContentSearchItem({
171
+ item: item.searchItem,
172
+ host,
173
+ bundle: item.itemBundle,
174
+ afterUuid
175
+ })
176
+ );
177
+ }
173
178
  };
174
179
  const onDropAction = (action, host, field, afterUuid) => {
175
180
  eventBus.emit("action:placed", {
181
+ id: action.actionType,
176
182
  preceedingUuid: afterUuid,
177
- action,
178
183
  host,
179
184
  field
180
185
  });
181
186
  };
187
+ let allUuidsBefore = [];
182
188
  const onDrop = (e) => {
189
+ allUuidsBefore = state.getAllUuids();
183
190
  mouseX.value = 0;
184
191
  mouseY.value = 0;
185
192
  nextTick(async () => {
@@ -203,40 +210,46 @@ const onDrop = (e) => {
203
210
  }
204
211
  eventBus.emit("dragging:end");
205
212
  eventBus.emit("item:dropped");
206
- const newUuid = state.mutations.value[state.mutations.value.length - 1]?.plugin?.affectedItemUuid;
207
- if (!newUuid) {
208
- return;
209
- }
210
- const newBlock = dom.findBlock(newUuid);
211
- if (!newBlock) {
212
- return;
213
- }
214
- const allSelected = [...selection.uuids.value, newBlock.uuid];
215
- eventBus.emit("select", allSelected);
216
- if (typed.itemType !== "new") {
217
- return;
218
- }
219
- const definition = definitions.getBlockDefinition(
220
- newBlock.itemBundle,
221
- newBlock.hostFieldListType
222
- );
223
- if (!definition?.editor?.addBehaviour?.startsWith("editable:")) {
224
- return;
225
- }
226
- const editableField = definition.editor.addBehaviour.split(":")[1];
227
- if (!editableField) {
228
- return;
229
- }
230
- const editableFieldElement = newBlock.element().querySelector(`[data-blokkli-editable-field="${editableField}"]`);
231
- if (!(editableFieldElement instanceof HTMLElement)) {
232
- return;
233
- }
234
- eventBus.emit("editable:focus", {
235
- fieldName: editableField,
236
- uuid: newUuid
237
- });
238
213
  });
239
214
  };
215
+ onBlokkliEvent("state:reloaded", async function() {
216
+ if (!allUuidsBefore.length) {
217
+ return;
218
+ }
219
+ const allUuidsAfter = state.getAllUuids();
220
+ const newUuid = allUuidsAfter.find((uuid) => !allUuidsBefore.includes(uuid));
221
+ allUuidsBefore = [];
222
+ if (!newUuid) {
223
+ return;
224
+ }
225
+ eventBus.emit("select", newUuid);
226
+ await renderCycle();
227
+ const newBlock = dom.findBlock(newUuid);
228
+ if (!newBlock) {
229
+ return;
230
+ }
231
+ const allSelected = [...selection.uuids.value, newBlock.uuid];
232
+ eventBus.emit("select", allSelected);
233
+ const definition = definitions.getBlockDefinition(
234
+ newBlock.itemBundle,
235
+ newBlock.hostFieldListType
236
+ );
237
+ if (!definition?.editor?.addBehaviour?.startsWith("editable:")) {
238
+ return;
239
+ }
240
+ const editableField = definition.editor.addBehaviour.split(":")[1];
241
+ if (!editableField) {
242
+ return;
243
+ }
244
+ const editableFieldElement = newBlock.element().querySelector(`[data-blokkli-editable-field="${editableField}"]`);
245
+ if (!(editableFieldElement instanceof HTMLElement)) {
246
+ return;
247
+ }
248
+ eventBus.emit("editable:focus", {
249
+ fieldName: editableField,
250
+ uuid: newUuid
251
+ });
252
+ });
240
253
  onBlokkliEvent("dragging:drop", onDrop);
241
254
  function loop() {
242
255
  if (!isVisible.value) {
@@ -295,6 +308,7 @@ onBlokkliEvent("keyPressed", (e) => {
295
308
  }
296
309
  });
297
310
  onBlokkliEvent("block:append", (e) => {
311
+ allUuidsBefore = state.getAllUuids();
298
312
  onDropNew(e.bundle, e.host, e.afterUuid);
299
313
  });
300
314
  onUnmounted(() => {
@@ -6,15 +6,15 @@
6
6
  @touchmove.stop.capture.prevent
7
7
  >
8
8
  <iframe ref="iframe" allowtransparency :src="url" @load="onIFrameLoad" />
9
- <Transition name="bk-loading">
9
+ <BlokkliTransition name="loading">
10
10
  <Loading v-if="!isLoaded" />
11
- </Transition>
11
+ </BlokkliTransition>
12
12
  </div>
13
13
  </template>
14
14
 
15
15
  <script setup>
16
16
  import { ref, useBlokkli, onUnmounted, onMounted } from "#imports";
17
- import { Loading } from "#blokkli/components";
17
+ import { Loading, BlokkliTransition } from "#blokkli/components";
18
18
  const { eventBus } = useBlokkli();
19
19
  const iframe = ref(null);
20
20
  const isLoaded = ref(false);
@@ -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="form"
6
6
  id="edit-form"
@@ -15,13 +15,13 @@
15
15
  @close="onClose"
16
16
  />
17
17
  </FormOverlay>
18
- </transition>
18
+ </BlokkliTransition>
19
19
  </Teleport>
20
20
  </template>
21
21
 
22
22
  <script setup>
23
23
  import { ref, computed, useBlokkli, defineBlokkliFeature } from "#imports";
24
- import { FormOverlay } from "#blokkli/components";
24
+ import { FormOverlay, BlokkliTransition } from "#blokkli/components";
25
25
  import FormFrame from "./Frame/index.vue";
26
26
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
27
27
  const { adapter } = defineBlokkliFeature({
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <Teleport to="body">
3
- <Transition :name="hasTransition ? 'bk-editable' : void 0">
3
+ <BlokkliTransition name="editable" :enabled="hasTransition">
4
4
  <Overlay v-if="editable" v-bind="editable" :key="key" @close="close" />
5
- </Transition>
5
+ </BlokkliTransition>
6
6
  </Teleport>
7
7
  </template>
8
8
 
@@ -15,6 +15,7 @@ import {
15
15
  defineBlokkliFeature
16
16
  } from "#imports";
17
17
  import Overlay from "./Overlay/index.vue";
18
+ import { BlokkliTransition } from "#blokkli/components";
18
19
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
19
20
  import defineCommands from "#blokkli/helpers/composables/defineCommands";
20
21
  import { falsy } from "#blokkli/helpers";
@@ -50,6 +51,9 @@ const buildEditable = (fieldName, uuid) => {
50
51
  }
51
52
  const hostEntityType = "type" in host ? host.type : runtimeConfig.itemEntityType;
52
53
  const hostEntityBundle = "bundle" in host ? host.bundle : host.itemBundle;
54
+ if (hostEntityBundle === "from_library") {
55
+ return;
56
+ }
53
57
  const config = types.editableFieldConfig.forName(
54
58
  hostEntityType,
55
59
  hostEntityBundle,
@@ -17,16 +17,9 @@
17
17
  </template>
18
18
 
19
19
  <script setup>
20
- import {
21
- useBlokkli,
22
- defineBlokkliFeature,
23
- ref,
24
- watch,
25
- onMounted,
26
- onBeforeUnmount
27
- } from "#imports";
20
+ import { useBlokkli, defineBlokkliFeature, ref } from "#imports";
28
21
  import { PluginViewOption } from "#blokkli/plugins";
29
- const HIDE_CLASS = "bk-hide-non-editable";
22
+ import { addElementClasses } from "#blokkli/helpers/addElementClasses";
30
23
  defineBlokkliFeature({
31
24
  id: "editable-mask",
32
25
  icon: "texturebox",
@@ -36,17 +29,7 @@ defineBlokkliFeature({
36
29
  });
37
30
  const { $t } = useBlokkli();
38
31
  const isActive = ref(false);
39
- const setRootClass = () => {
40
- document.documentElement.classList.remove(HIDE_CLASS);
41
- if (isActive.value) {
42
- document.documentElement.classList.add(HIDE_CLASS);
43
- }
44
- };
45
- watch(isActive, setRootClass);
46
- onMounted(setRootClass);
47
- onBeforeUnmount(() => {
48
- document.documentElement.classList.remove(HIDE_CLASS);
49
- });
32
+ addElementClasses(document.documentElement, "bk-hide-non-editable", isActive);
50
33
  </script>
51
34
 
52
35
  <script>
@@ -1,5 +1,22 @@
1
1
  <template>
2
2
  <Teleport to="#bk-toolbar-title">
3
+ <button
4
+ v-if="scheduledDate"
5
+ class="bk-toolbar-title-scheduled"
6
+ @click.prevent="eventBus.emit('publish:show-dialog')"
7
+ >
8
+ <Icon name="calendar-clock" />
9
+ <div class="bk-toolbar-title-scheduled-text">
10
+ <div>{{ formattedScheduledDate }}</div>
11
+ </div>
12
+ <div class="bk-tooltip">
13
+ <div>
14
+ {{
15
+ $t("scheduledFor", "The changes will be published on this date.")
16
+ }}
17
+ </div>
18
+ </div>
19
+ </button>
3
20
  <button
4
21
  ref="buttonEl"
5
22
  class="bk-toolbar-button"
@@ -36,15 +53,30 @@
36
53
  import defineCommands from "#blokkli/helpers/composables/defineCommands";
37
54
  import { useBlokkli, defineBlokkliFeature, ref, computed } from "#imports";
38
55
  import defineTourItem from "#blokkli/helpers/composables/defineTourItem";
56
+ import { Icon } from "#blokkli/components";
39
57
  defineBlokkliFeature({
40
58
  id: "entity-title",
41
59
  icon: "title",
42
60
  label: "Entity Title",
43
61
  description: "Renders the title and status of the page entity."
44
62
  });
45
- const { state, eventBus, $t } = useBlokkli();
63
+ const { state, eventBus, $t, ui } = useBlokkli();
46
64
  const { entity, mutations } = state;
47
65
  const buttonEl = ref(null);
66
+ const scheduledDate = computed(() => state.publishOptions.value?.publishOn);
67
+ const formattedScheduledDate = computed(() => {
68
+ if (!scheduledDate.value) {
69
+ return "";
70
+ }
71
+ return ui.formatDate(scheduledDate.value, {
72
+ weekday: "short",
73
+ year: "numeric",
74
+ month: "2-digit",
75
+ day: "2-digit",
76
+ hour: "2-digit",
77
+ minute: "2-digit"
78
+ });
79
+ });
48
80
  const statusPublished = computed(
49
81
  () => $t("pageIsPublished", "Page is published")
50
82
  );
@@ -19,14 +19,14 @@
19
19
  />
20
20
 
21
21
  <Teleport to="body">
22
- <transition name="bk-slide-in" :duration="200">
22
+ <BlokkliTransition name="slide-in">
23
23
  <FragmentsDialog
24
24
  v-if="placedAction && adapter.getLibraryItems"
25
25
  :field="placedAction.field"
26
26
  @close="placedAction = null"
27
27
  @submit="onAddFragment"
28
28
  />
29
- </transition>
29
+ </BlokkliTransition>
30
30
  </Teleport>
31
31
  </template>
32
32
 
@@ -34,6 +34,7 @@
34
34
  import { ref, useBlokkli, defineBlokkliFeature, computed } from "#imports";
35
35
  import { PluginAddAction } from "#blokkli/plugins";
36
36
  import FragmentsDialog from "./Dialog/index.vue";
37
+ import { BlokkliTransition } from "#blokkli/components";
37
38
  const { adapter } = defineBlokkliFeature({
38
39
  id: "fragments",
39
40
  icon: "fragment",
@@ -52,6 +52,7 @@ import {
52
52
  } from "#imports";
53
53
  import { PluginSidebar, PluginToolbarButton } from "#blokkli/plugins";
54
54
  import HistoryList from "./List/index.vue";
55
+ import { MOUSE_BUTTON } from "#blokkli/helpers/dom";
55
56
  const { adapter, settings } = defineBlokkliFeature({
56
57
  id: "history",
57
58
  icon: "history",
@@ -69,31 +70,45 @@ const { adapter, settings } = defineBlokkliFeature({
69
70
  }
70
71
  }
71
72
  });
72
- const { state, $t, ui } = useBlokkli();
73
+ const { state, $t, ui, selection, eventBus } = useBlokkli();
73
74
  const { mutations, currentMutationIndex, mutateWithLoadingState } = state;
75
+ const mutationsCount = computed(() => mutations.value.length);
74
76
  const useMouseForHistory = computed(() => settings.value.useMouseButtons);
75
77
  const canUndo = computed(() => currentMutationIndex.value >= 0);
76
78
  const canRedo = computed(
77
- () => currentMutationIndex.value < mutations.value.length - 1
79
+ () => currentMutationIndex.value < mutationsCount.value - 1
78
80
  );
79
- function undo() {
80
- mutateWithLoadingState(
81
- () => adapter.setHistoryIndex(currentMutationIndex.value - 1)
82
- );
81
+ const selectionAtHistoryIndex = /* @__PURE__ */ new Map();
82
+ function updateCurrentHistorySelection() {
83
+ selectionAtHistoryIndex.set(currentMutationIndex.value, [
84
+ ...selection.uuids.value
85
+ ]);
83
86
  }
84
- function redo() {
85
- mutateWithLoadingState(
86
- () => adapter.setHistoryIndex(currentMutationIndex.value + 1)
87
- );
87
+ function setSelectionFromHistoryIndex(index) {
88
+ const selection2 = selectionAtHistoryIndex.get(index);
89
+ if (selection2) {
90
+ eventBus.emit("select", selection2);
91
+ }
92
+ }
93
+ async function setHistoryIndex(newIndex) {
94
+ updateCurrentHistorySelection();
95
+ await mutateWithLoadingState(() => adapter.setHistoryIndex(newIndex));
96
+ setSelectionFromHistoryIndex(newIndex);
97
+ }
98
+ async function undo() {
99
+ await setHistoryIndex(currentMutationIndex.value - 1);
100
+ }
101
+ async function redo() {
102
+ await setHistoryIndex(currentMutationIndex.value + 1);
88
103
  }
89
104
  const onMouseUp = (e) => {
90
- if (e.button === 3) {
105
+ if (e.button === MOUSE_BUTTON.FOURTH) {
91
106
  e.preventDefault();
92
107
  e.stopPropagation();
93
108
  if (canUndo.value) {
94
109
  undo();
95
110
  }
96
- } else if (e.button === 4) {
111
+ } else if (e.button === MOUSE_BUTTON.FIFTH) {
97
112
  e.preventDefault();
98
113
  e.stopPropagation();
99
114
  if (canRedo.value) {
@@ -108,6 +123,14 @@ const setupMouseListeners = () => {
108
123
  }
109
124
  };
110
125
  watch(useMouseForHistory, setupMouseListeners);
126
+ watch(selection.uuids, updateCurrentHistorySelection);
127
+ watch(mutationsCount, (count) => {
128
+ for (const [index] of selectionAtHistoryIndex) {
129
+ if (index >= count) {
130
+ selectionAtHistoryIndex.delete(index);
131
+ }
132
+ }
133
+ });
111
134
  onMounted(() => {
112
135
  setupMouseListeners();
113
136
  });
@@ -51,8 +51,12 @@
51
51
  }}
52
52
  </div>
53
53
  <div
54
- class="bk-radio-list"
55
- :style="{ opacity: searchTerm !== resultsSearchTerm ? 0.5 : 1 }"
54
+ :style="{
55
+ opacity: searchTerm !== resultsSearchTerm ? 0.5 : 1,
56
+ height: '420px',
57
+ overflow: 'auto',
58
+ marginTop: '10px'
59
+ }"
56
60
  >
57
61
  <label v-for="entity in entities" :key="entity.uuid" class="bk-radio">
58
62
  <input
@@ -13,13 +13,13 @@
13
13
  />
14
14
 
15
15
  <Teleport to="body">
16
- <transition appear name="bk-slide-up">
16
+ <BlokkliTransition name="slide-up">
17
17
  <ExistingDialog
18
18
  v-if="showModal"
19
19
  @confirm="onSubmit($event.sourceUuid, $event.fields)"
20
20
  @cancel="showModal = false"
21
21
  />
22
- </transition>
22
+ </BlokkliTransition>
23
23
  </Teleport>
24
24
  </template>
25
25
 
@@ -32,6 +32,7 @@ import {
32
32
  defineBlokkliFeature
33
33
  } from "#imports";
34
34
  import { PluginMenuButton } from "#blokkli/plugins";
35
+ import { BlokkliTransition } from "#blokkli/components";
35
36
  import ExistingDialog from "./Dialog/index.vue";
36
37
  const { adapter, settings } = defineBlokkliFeature({
37
38
  id: "import-existing",