@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
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <PluginSidebar
3
+ id="analyze"
4
+ :title="$t('analyzeSidebarTitle', 'Analyze')"
5
+ :tour-text="$t('analyzeTourText', 'Analyze the content of your page')"
6
+ icon="speedometer"
7
+ >
8
+ <Renderer :langcode="context.language" :analyzers />
9
+ </PluginSidebar>
10
+ </template>
11
+
12
+ <script setup>
13
+ import { useBlokkli, defineBlokkliFeature } from "#imports";
14
+ import { PluginSidebar } from "#blokkli/plugins";
15
+ import Renderer from "./Renderer.vue";
16
+ const { adapter } = defineBlokkliFeature({
17
+ id: "analyze",
18
+ label: "Analyze",
19
+ icon: "speedometer",
20
+ requiredAdapterMethods: ["getAnalyzers"],
21
+ description: "Analyze blocks and page for SEO, accessibility, etc.",
22
+ viewports: []
23
+ });
24
+ function getAdapterAnalyzers() {
25
+ const result = adapter.getAnalyzers();
26
+ if (Array.isArray(result)) {
27
+ return Promise.resolve(result);
28
+ }
29
+ return Promise.resolve(result).then((result2) => {
30
+ if (Array.isArray(result2)) {
31
+ return result2;
32
+ }
33
+ return [result2];
34
+ });
35
+ }
36
+ const analyzers = await getAdapterAnalyzers();
37
+ const { $t, context } = useBlokkli();
38
+ </script>
39
+
40
+ <script>
41
+ export default {
42
+ name: "Analyze"
43
+ };
44
+ </script>
@@ -0,0 +1,136 @@
1
+ <template>
2
+ <PluginBlockIndicator
3
+ v-for="item in items"
4
+ id="anchor"
5
+ :key="item.uuid"
6
+ :uuid="item.uuid"
7
+ :label="'#' + item.id"
8
+ icon="anchor"
9
+ @click="onClick(item)"
10
+ />
11
+ </template>
12
+
13
+ <script setup>
14
+ import { useBlokkli, ref, onMounted, onBeforeUnmount, useRoute } from "#imports";
15
+ import { PluginBlockIndicator } from "#blokkli/plugins";
16
+ import { emitMessage } from "#blokkli/helpers/eventBus";
17
+ const route = useRoute();
18
+ const { ui, $t, adapter } = useBlokkli();
19
+ const rootElement = ui.providerElement();
20
+ function getLinkForClipboard(item) {
21
+ if (adapter.buildAnchorLink) {
22
+ return adapter.buildAnchorLink(item.id, item.uuid);
23
+ }
24
+ return route.path + "#" + item.id;
25
+ }
26
+ function onClick(item) {
27
+ if (navigator.clipboard?.writeText) {
28
+ const link = getLinkForClipboard(item);
29
+ navigator.clipboard.writeText(link);
30
+ const message = $t(
31
+ "copiedToClipboardMessage",
32
+ '"@text" has been copied to your clipboard'
33
+ ).replace("@text", link);
34
+ emitMessage(message, "success", void 0, true);
35
+ }
36
+ }
37
+ const items = ref([]);
38
+ const trackedElements = /* @__PURE__ */ new Map();
39
+ let observer = null;
40
+ const getAnchorData = (el) => {
41
+ const uuid = el.getAttribute("data-uuid");
42
+ const id = el.getAttribute("id");
43
+ return uuid && id ? { uuid, id } : null;
44
+ };
45
+ const syncItems = () => {
46
+ const newItems = Array.from(trackedElements.values());
47
+ items.value = newItems;
48
+ };
49
+ const checkElement = (el) => {
50
+ const data = getAnchorData(el);
51
+ const isTracked = trackedElements.has(el);
52
+ if (data && !isTracked) {
53
+ trackedElements.set(el, data);
54
+ return true;
55
+ } else if (!data && isTracked) {
56
+ trackedElements.delete(el);
57
+ return true;
58
+ } else if (data && isTracked) {
59
+ const existing = trackedElements.get(el);
60
+ if (existing.uuid !== data.uuid || existing.id !== data.id) {
61
+ trackedElements.set(el, data);
62
+ return true;
63
+ }
64
+ }
65
+ return false;
66
+ };
67
+ const processAddedNode = (node) => {
68
+ if (node.nodeType !== Node.ELEMENT_NODE) return false;
69
+ let changed = false;
70
+ const el = node;
71
+ if (el.hasAttribute("data-uuid") && el.hasAttribute("id")) {
72
+ changed = checkElement(el) || changed;
73
+ }
74
+ return changed;
75
+ };
76
+ const processRemovedNode = (node) => {
77
+ if (node.nodeType !== Node.ELEMENT_NODE) return false;
78
+ let changed = false;
79
+ const el = node;
80
+ if (!el.id) {
81
+ return false;
82
+ }
83
+ if (trackedElements.delete(el)) {
84
+ changed = true;
85
+ }
86
+ const toRemove = [];
87
+ for (const [trackedEl] of trackedElements) {
88
+ if (node.contains(trackedEl)) {
89
+ toRemove.push(trackedEl);
90
+ }
91
+ }
92
+ for (const el2 of toRemove) {
93
+ trackedElements.delete(el2);
94
+ changed = true;
95
+ }
96
+ return changed;
97
+ };
98
+ onMounted(() => {
99
+ const elements = rootElement.querySelectorAll("[data-uuid][id]");
100
+ for (const el of elements) {
101
+ const data = getAnchorData(el);
102
+ if (data) {
103
+ trackedElements.set(el, data);
104
+ }
105
+ }
106
+ syncItems();
107
+ observer = new MutationObserver((mutations) => {
108
+ let changed = false;
109
+ for (const mutation of mutations) {
110
+ if (mutation.type === "childList") {
111
+ for (const node of mutation.addedNodes) {
112
+ changed = processAddedNode(node) || changed;
113
+ }
114
+ for (const node of mutation.removedNodes) {
115
+ changed = processRemovedNode(node) || changed;
116
+ }
117
+ } else if (mutation.type === "attributes") {
118
+ const target = mutation.target;
119
+ changed = checkElement(target) || changed;
120
+ }
121
+ }
122
+ if (changed) {
123
+ syncItems();
124
+ }
125
+ });
126
+ observer.observe(rootElement, {
127
+ childList: true,
128
+ subtree: true,
129
+ attributes: true,
130
+ attributeFilter: ["data-uuid", "id"]
131
+ });
132
+ });
133
+ onBeforeUnmount(() => {
134
+ observer?.disconnect();
135
+ });
136
+ </script>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <PluginViewOption
3
+ id="anchor"
4
+ v-slot="{ isActive }"
5
+ :label="$t('anchorToggle', 'Toggle anchor links')"
6
+ :title-on="$t('anchorShow', 'Show anchor links')"
7
+ :title-off="$t('anchorHide', 'Hide anchor links')"
8
+ icon="anchor"
9
+ >
10
+ <AnchorRenderer v-if="isActive" />
11
+ </PluginViewOption>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { useBlokkli, defineBlokkliFeature } from "#imports";
16
+ import { PluginViewOption } from "#blokkli/plugins";
17
+ import AnchorRenderer from "./Renderer.vue";
18
+ defineBlokkliFeature({
19
+ id: "anchors",
20
+ label: "Anchors",
21
+ icon: "anchor",
22
+ description: "Displays indicators for blocks with anchor IDs",
23
+ viewports: ["desktop"]
24
+ });
25
+ const { $t } = useBlokkli();
26
+ </script>
27
+
28
+ <script>
29
+ export default {
30
+ name: "Anchors"
31
+ };
32
+ </script>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  <template>
2
- <div
2
+ <ViewportBlockingRect
3
+ id="artboard-overview"
3
4
  ref="overviewEl"
4
5
  class="bk bk-artboard-overview"
5
6
  @touchstart.stop
@@ -13,12 +14,20 @@
13
14
  <div class="bk-artboard-overview-visible">
14
15
  <button ref="overviewVisibleEl" />
15
16
  </div>
16
- </div>
17
+ </ViewportBlockingRect>
17
18
  </template>
18
19
 
19
20
  <script setup>
20
21
  import { overview } from "artboard-deluxe";
21
- import { onBeforeUnmount, onMounted, ref, useBlokkli, computed } from "#imports";
22
+ import {
23
+ onBeforeUnmount,
24
+ onMounted,
25
+ ref,
26
+ useBlokkli,
27
+ computed,
28
+ useTemplateRef
29
+ } from "#imports";
30
+ import { ViewportBlockingRect } from "#blokkli/components";
22
31
  import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
23
32
  const props = defineProps({
24
33
  artboard: { type: Object, required: true }
@@ -30,7 +39,7 @@ const overviewFillColor = computed(() => {
30
39
  const selectedColor = computed(() => {
31
40
  return theme.getColorString("accent", "700", 1);
32
41
  });
33
- const overviewEl = ref();
42
+ const overviewEl = useTemplateRef("overviewEl");
34
43
  const overviewArtboardEl = ref();
35
44
  const overviewVisibleEl = ref();
36
45
  const canvas = ref();
@@ -71,15 +80,18 @@ function updateCanvas() {
71
80
  onBlokkliEvent("animationFrame", updateCanvas);
72
81
  onMounted(() => {
73
82
  if (overviewEl.value && overviewArtboardEl.value && overviewVisibleEl.value) {
74
- pluginOverview = props.artboard.addPlugin(
75
- overview({
76
- element: overviewEl.value,
77
- artboardElement: overviewArtboardEl.value,
78
- visibleAreaElement: overviewVisibleEl.value,
79
- padding: 20,
80
- autoHeight: true
81
- })
82
- );
83
+ const el = overviewEl.value.$el;
84
+ if (el) {
85
+ pluginOverview = props.artboard.addPlugin(
86
+ overview({
87
+ element: el,
88
+ artboardElement: overviewArtboardEl.value,
89
+ visibleAreaElement: overviewVisibleEl.value,
90
+ padding: 20,
91
+ autoHeight: true
92
+ })
93
+ );
94
+ }
83
95
  }
84
96
  });
85
97
  onBeforeUnmount(() => {
@@ -0,0 +1,296 @@
1
+ <template>
2
+ <Scrollbar :artboard="artboard" orientation="y" />
3
+ <PluginToolbarButton
4
+ id="artboard_reset_zoom"
5
+ :title="$t('artboardResetZoom', 'Reset zoom')"
6
+ :shortcut-group="$t('artboard', 'Artboard')"
7
+ :tour-text="
8
+ $t(
9
+ 'artboardToolbarButtonTourText',
10
+ 'Shows the current zoom factor. Click on it to reset the zoom back to 100%.'
11
+ )
12
+ "
13
+ icon="magnifier"
14
+ meta
15
+ key-code="0"
16
+ region="view-options"
17
+ weight="100"
18
+ @click="resetZoom"
19
+ >
20
+ <div class="bk-feature-canvas-button">
21
+ <span>{{ zoomLevel }}</span>
22
+ </div>
23
+ </PluginToolbarButton>
24
+
25
+ <PluginViewOption
26
+ id="artboardOverview"
27
+ v-slot="{ isActive }"
28
+ :label="$t('artboardOverviewToggle', 'Toggle overview')"
29
+ :title-on="$t('artboardOverviewShow', 'Show overview')"
30
+ :title-off="$t('artboardOverviewHide', 'Hide overview')"
31
+ :tour-text="
32
+ $t(
33
+ 'artboardOverviewTourText',
34
+ `Displays a top level overview of your content.`
35
+ )
36
+ "
37
+ icon="eye"
38
+ key-code="O"
39
+ weight="90"
40
+ >
41
+ <Teleport v-if="isActive && dom.isReady.value" to="body">
42
+ <Overview :artboard="artboard" />
43
+ </Teleport>
44
+ </PluginViewOption>
45
+ </template>
46
+
47
+ <script setup>
48
+ import {
49
+ watch,
50
+ computed,
51
+ useBlokkli,
52
+ onMounted,
53
+ onBeforeUnmount
54
+ } from "#imports";
55
+ import {
56
+ asValidNumber,
57
+ isInsideRect,
58
+ subtractRectFromViewport
59
+ } from "#blokkli/helpers";
60
+ import { PluginToolbarButton, PluginViewOption } from "#blokkli/plugins";
61
+ import Overview from "./Overview/index.vue";
62
+ import Scrollbar from "./Scrollbar/index.vue";
63
+ import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
64
+ import {
65
+ createArtboard,
66
+ touch,
67
+ wheel,
68
+ mouse,
69
+ dom as domPlugin
70
+ } from "artboard-deluxe";
71
+ import { addElementClasses } from "#blokkli/helpers/addElementClasses";
72
+ const props = defineProps({
73
+ persist: { type: Boolean, required: true },
74
+ momentum: { type: Boolean, required: true },
75
+ scrollSpeed: { type: Number, required: true }
76
+ });
77
+ addElementClasses(document.documentElement, "bk-is-artboard");
78
+ const { context, storage, ui, animation, $t, dom, selection } = useBlokkli();
79
+ const artboardElement = ui.artboardElement();
80
+ const zoomLevel = computed(() => Math.round(ui.artboardScale.value * 100) + "%");
81
+ const PADDING = 50;
82
+ const options = computed(() => {
83
+ return {
84
+ maxScale: ui.isMobile.value ? 1 : 3,
85
+ direction: ui.isMobile.value ? "vertical" : "both",
86
+ minScale: 0.1,
87
+ overscrollBounds: {
88
+ top: ui.visibleViewport.value.y + PADDING,
89
+ left: ui.visibleViewport.value.x + PADDING,
90
+ right: ui.viewport.value.width - ui.visibleViewport.value.width - ui.visibleViewport.value.x + PADDING,
91
+ bottom: PADDING
92
+ },
93
+ getBlockingRects: () => {
94
+ const toolbarRects = subtractRectFromViewport(
95
+ ui.viewport.value,
96
+ ui.visibleViewport.value
97
+ );
98
+ return [...toolbarRects, ...ui.viewportBlockingRects.value];
99
+ }
100
+ };
101
+ });
102
+ watch(options, function(newOptions) {
103
+ artboard.setOptions(newOptions);
104
+ });
105
+ const storageKey = computed(
106
+ () => "artboard:" + context.value.entityUuid + (ui.isMobile.value ? "mobile" : "desktop")
107
+ );
108
+ const savedState = storage.use(storageKey, null);
109
+ const saveState = () => {
110
+ if (!props.persist) {
111
+ return;
112
+ }
113
+ savedState.value = {
114
+ offset: artboard.getOffset(),
115
+ scale: artboard.getScale()
116
+ };
117
+ };
118
+ let pluginWheel = null;
119
+ const wheelOptions = computed(() => {
120
+ return {
121
+ useMomentumZoom: props.momentum,
122
+ useMomentumScroll: props.momentum,
123
+ interceptWheel: true,
124
+ scrollSpeed: props.scrollSpeed,
125
+ wheelZoomFactor: props.scrollSpeed
126
+ };
127
+ });
128
+ watch(wheelOptions, function(newOptions) {
129
+ if (pluginWheel) {
130
+ pluginWheel.options.setAll(newOptions);
131
+ }
132
+ });
133
+ watch(selection.uuids, function() {
134
+ if (artboard.getMomentum()) {
135
+ artboard.cancelAnimation();
136
+ }
137
+ });
138
+ function getArtboard() {
139
+ pluginWheel = wheel(wheelOptions.value);
140
+ return createArtboard(
141
+ ui.rootElement(),
142
+ [
143
+ mouse(),
144
+ touch(),
145
+ pluginWheel,
146
+ domPlugin({
147
+ element: artboardElement,
148
+ precision: 1,
149
+ restoreStyles: true
150
+ })
151
+ ],
152
+ {
153
+ initTransform: savedState.value && props.persist ? {
154
+ x: asValidNumber(savedState.value.offset.x, 0),
155
+ y: asValidNumber(savedState.value.offset.y, 0),
156
+ scale: asValidNumber(savedState.value?.scale, 1)
157
+ } : void 0,
158
+ ...options.value
159
+ }
160
+ );
161
+ }
162
+ const artboard = getArtboard();
163
+ watch(options, function(newOptions) {
164
+ artboard.setOptions(newOptions);
165
+ });
166
+ const AUTOSCROLL_EDGE_ZONE = 130;
167
+ const AUTOSCROLL_SPEED = 12;
168
+ let autoScrollSpeed = 1;
169
+ function edgeStep(distance) {
170
+ const ratio = distance / AUTOSCROLL_EDGE_ZONE;
171
+ return Math.pow(ratio, 3) * AUTOSCROLL_SPEED;
172
+ }
173
+ let hasLeftAddList = false;
174
+ onBlokkliEvent("dragging:end", () => {
175
+ hasLeftAddList = false;
176
+ });
177
+ onBlokkliEvent("animationFrame:before", ({ time, mouseY, mouseX }) => {
178
+ if (selection.isDragging.value) {
179
+ if (ui.addListOrientation.value === "horizontal") {
180
+ if (!hasLeftAddList) {
181
+ if (isInsideRect(mouseX, mouseY, ui.visibleViewportPadded.value)) {
182
+ hasLeftAddList = true;
183
+ } else {
184
+ return;
185
+ }
186
+ }
187
+ }
188
+ const viewportHeight = ui.viewport.value.height;
189
+ const currentOffset = artboard.getOffset();
190
+ const y = Math.min(Math.max(mouseY, 0), viewportHeight);
191
+ let dy = 0;
192
+ if (y < AUTOSCROLL_EDGE_ZONE) {
193
+ const dist = AUTOSCROLL_EDGE_ZONE - y;
194
+ dy = edgeStep(dist);
195
+ } else if (y > viewportHeight - AUTOSCROLL_EDGE_ZONE) {
196
+ const dist = y - (viewportHeight - AUTOSCROLL_EDGE_ZONE);
197
+ dy = -edgeStep(dist);
198
+ } else {
199
+ autoScrollSpeed = 1;
200
+ }
201
+ if (dy !== 0) {
202
+ artboard.setOffset(null, currentOffset.y + dy * autoScrollSpeed);
203
+ autoScrollSpeed = Math.min(autoScrollSpeed * 1.01, 2.25);
204
+ }
205
+ } else {
206
+ autoScrollSpeed = 1;
207
+ }
208
+ artboard.loop(time);
209
+ const artboardSize = artboard.getArtboardSize();
210
+ if (artboardSize) {
211
+ ui.artboardSize.value.height = artboardSize.height;
212
+ ui.artboardSize.value.width = artboardSize.width;
213
+ }
214
+ const offset = artboard.getOffset();
215
+ ui.artboardOffset.value.x = asValidNumber(Math.ceil(offset.x), 0);
216
+ ui.artboardOffset.value.y = asValidNumber(Math.ceil(offset.y), 0);
217
+ ui.artboardScale.value = asValidNumber(artboard.getScale(), 1);
218
+ animation.requestDraw();
219
+ });
220
+ onMounted(() => {
221
+ window.addEventListener("beforeunload", saveState);
222
+ });
223
+ onBeforeUnmount(() => {
224
+ saveState();
225
+ artboard.destroy();
226
+ window.removeEventListener("beforeunload", saveState);
227
+ });
228
+ const resetZoom = () => {
229
+ artboard.resetZoom({
230
+ duration: 500
231
+ });
232
+ animation.requestDraw();
233
+ };
234
+ onBlokkliEvent("keyPressed", (e) => {
235
+ if (e.code === "Home") {
236
+ e.originalEvent.preventDefault();
237
+ artboard.scrollToTop();
238
+ animation.requestDraw();
239
+ } else if (e.code === "End") {
240
+ e.originalEvent.preventDefault();
241
+ artboard.scrollToEnd();
242
+ animation.requestDraw();
243
+ } else if (e.code === "PageUp") {
244
+ e.originalEvent.preventDefault();
245
+ artboard.scrollPageUp();
246
+ animation.requestDraw();
247
+ } else if (e.code === "PageDown") {
248
+ e.originalEvent.preventDefault();
249
+ artboard.scrollPageDown();
250
+ animation.requestDraw();
251
+ } else if (e.code === "ArrowUp") {
252
+ e.originalEvent.preventDefault();
253
+ artboard.scrollUp();
254
+ animation.requestDraw();
255
+ } else if (e.code === "ArrowDown") {
256
+ e.originalEvent.preventDefault();
257
+ artboard.scrollDown();
258
+ animation.requestDraw();
259
+ } else if (e.code === "0" && e.meta) {
260
+ e.originalEvent.preventDefault();
261
+ resetZoom();
262
+ } else if (e.code === "1" && e.meta) {
263
+ e.originalEvent.preventDefault();
264
+ artboard.scaleToFit();
265
+ animation.requestDraw();
266
+ }
267
+ });
268
+ onBlokkliEvent("scrollIntoView", (e) => {
269
+ if ("uuid" in e) {
270
+ const rect = dom.getBlockRect(e.uuid);
271
+ if (!rect) {
272
+ return;
273
+ }
274
+ if (dom.isBlockVisible(e.uuid)) {
275
+ return;
276
+ }
277
+ artboard.scrollIntoView(rect, {
278
+ scale: "none",
279
+ axis: "y",
280
+ behavior: e.immediate ? "instant" : "auto"
281
+ });
282
+ } else {
283
+ if (artboardElement.contains(e.element)) {
284
+ artboard.scrollElementIntoView(e.element, {
285
+ scale: "none",
286
+ axis: "y",
287
+ behavior: e.immediate ? "instant" : "auto"
288
+ });
289
+ } else {
290
+ artboard.scrollToTop({
291
+ duration: 0
292
+ });
293
+ }
294
+ }
295
+ });
296
+ </script>
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ persist: boolean;
3
+ momentum: boolean;
4
+ scrollSpeed: number;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;