@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
@@ -1,116 +1,272 @@
1
1
  <template>
2
2
  <DialogModal
3
3
  :title="$t('publishDialogTitle', 'Publish changes')"
4
- :width="1200"
4
+ :width="900"
5
5
  :submit-label
6
6
  :is-loading="isLoading"
7
- :can-submit="!!selectedToPublishItems.length"
7
+ :can-submit="canSubmit"
8
8
  class="bk-is-publish-dialog"
9
9
  @submit="onSubmit"
10
10
  @cancel="$emit('close')"
11
11
  >
12
12
  <div class="bk bk-form bk-dialog-publish-form">
13
- <FormGroup title="Einstellungen" horizontal>
14
- <FormItem v-if="publishOptions?.hasRevisionLogMessage">
15
- <FormTextarea
16
- v-model="revisionMessage"
17
- label="Protokollnachricht der Revision"
18
- description="Beschreiben Sie kurz die vorgenommenen Änderungen"
19
- :disabled="isLoading"
13
+ <FormItem>
14
+ <div class="bk-form-label">
15
+ {{ $t("publishMode", "Publish mode")
16
+ }}<span class="bk-required-indicator">*</span>
17
+ </div>
18
+ <div class="bk-publish-options">
19
+ <PublishOption
20
+ v-for="option in publishModeOptions"
21
+ :id="option.id"
22
+ :key="option.id"
23
+ v-model="publishMode"
24
+ :icon="option.icon"
25
+ :color="option.color"
26
+ :label="option.label"
27
+ :description="option.description"
28
+ :disabled="option.disabled"
20
29
  />
21
- </FormItem>
22
- <FormItem>
23
- <FormToggle
24
- v-model="shouldPublish"
25
- :label="toggleLabel"
26
- :disabled="isLoading"
27
- />
28
- </FormItem>
29
- </FormGroup>
30
+ </div>
31
+ </FormItem>
32
+
33
+ <FormItem v-if="publishMode === 'scheduled'">
34
+ <div>
35
+ <label class="bk-form-label">
36
+ {{ $t("publishScheduleDate", "Publication date") }}
37
+ </label>
38
+ <div class="bk-publish-schedule-date-wrapper">
39
+ <div v-if="isAlreadyScheduled" class="bk-publish-scheduled-display">
40
+ {{
41
+ ui.formatDate(scheduleDate, {
42
+ weekday: "long",
43
+ year: "numeric",
44
+ month: "2-digit",
45
+ day: "2-digit",
46
+ hour: "2-digit",
47
+ minute: "2-digit"
48
+ })
49
+ }}
50
+ </div>
51
+ <ScheduleDate
52
+ v-else
53
+ v-model="scheduleDate"
54
+ :disabled="isLoading"
55
+ :error="scheduleDateError"
56
+ />
57
+ <button
58
+ v-if="isAlreadyScheduled"
59
+ type="button"
60
+ class="bk-button bk-is-danger"
61
+ @click="removeScheduledDate"
62
+ >
63
+ {{ $t("publishRemoveSchedule", "Remove schedule") }}
64
+ </button>
65
+ </div>
66
+ <div v-if="isAlreadyScheduled" class="bk-form-description">
67
+ {{
68
+ $t(
69
+ "publishAlreadyScheduledDescription",
70
+ "This page is already scheduled for publishing"
71
+ )
72
+ }}
73
+ </div>
74
+ </div>
75
+ </FormItem>
76
+
77
+ <FormItem v-if="publishOptions?.hasRevisionLogMessage">
78
+ <FormTextarea
79
+ id="revision-message"
80
+ v-model="revisionMessage"
81
+ :label="$t('publishRevisionLogMessage', 'Revision log message')"
82
+ :description="
83
+ $t(
84
+ 'publishRevisionLogMessageDescription',
85
+ 'Briefly describe the changes made'
86
+ )
87
+ "
88
+ :disabled="isLoading || isAlreadyScheduled"
89
+ rows="2"
90
+ />
91
+ </FormItem>
30
92
 
31
- <FormGroup title="Inhalte" horizontal>
32
- <FormItem>
33
- <template v-if="successItems.length">
34
- <h2 class="bk-heading-2">Erfolgreich veröffentlicht</h2>
93
+ <FormItem v-if="successItems.length && showTable">
94
+ <h2 class="bk-heading-2">
95
+ {{ $t("publishSuccessfullyPublished", "Successfully published") }}
96
+ </h2>
35
97
 
36
- <table class="bk-table bk-publish-dialog-table">
37
- <thead>
38
- <tr>
39
- <th>Name</th>
40
- <th colspan="2">Status</th>
41
- </tr>
42
- </thead>
98
+ <table class="bk-table bk-publish-dialog-table">
99
+ <thead>
100
+ <tr>
101
+ <th>{{ $t("publishName", "Name") }}</th>
102
+ <th colspan="2">{{ $t("publishStatus", "Status") }}</th>
103
+ </tr>
104
+ </thead>
43
105
 
44
- <tbody>
45
- <Item
46
- v-for="item in successItems"
47
- :key="'success' + item.id"
48
- v-bind="item"
49
- v-model="states"
50
- :is-current="item.id === currentId"
51
- :should-publish
52
- :is-mutating
53
- :mutation-status="mutationStatusItems[item.id]"
54
- />
55
- </tbody>
56
- </table>
57
- </template>
106
+ <tbody>
107
+ <Item
108
+ v-for="item in successItems"
109
+ :key="'success' + item.id"
110
+ v-bind="item"
111
+ v-model="states"
112
+ :is-current="item.id === currentId"
113
+ :should-publish
114
+ :is-mutating
115
+ :mutation-status="mutationStatusItems[item.id]"
116
+ :is-scheduled="enableScheduling"
117
+ :schedule-date
118
+ />
119
+ </tbody>
120
+ </table>
58
121
 
59
- <table class="bk-table bk-publish-dialog-table">
60
- <thead>
61
- <tr>
62
- <th>Name</th>
63
- <th colspan="2">Status</th>
64
- </tr>
65
- </thead>
122
+ <table class="bk-table bk-publish-dialog-table">
123
+ <thead>
124
+ <tr>
125
+ <th>{{ $t("publishName", "Name") }}</th>
126
+ <th colspan="2">{{ $t("publishStatus", "Status") }}</th>
127
+ </tr>
128
+ </thead>
66
129
 
67
- <tbody>
68
- <Item
69
- v-for="item in toPublishItems"
70
- :key="'to_publish_' + item.id"
71
- v-bind="item"
72
- v-model="states"
73
- :is-current="item.id === currentId"
74
- :should-publish
75
- :is-mutating
76
- :mutation-status="mutationStatusItems[item.id]"
77
- />
78
- </tbody>
79
- </table>
80
- </FormItem>
81
- </FormGroup>
130
+ <tbody>
131
+ <Item
132
+ v-for="item in toPublishItems"
133
+ :key="'to_publish_' + item.id"
134
+ v-bind="item"
135
+ v-model="states"
136
+ :is-current="item.id === currentId"
137
+ :should-publish
138
+ :is-mutating
139
+ :mutation-status="mutationStatusItems[item.id]"
140
+ :is-scheduled="enableScheduling"
141
+ :schedule-date
142
+ />
143
+ </tbody>
144
+ </table>
145
+ </FormItem>
146
+ <FormItem class="bk-is-summary">
147
+ <h3 class="bk-form-label">
148
+ {{ $t("publishSummary", "Summary") }}
149
+ </h3>
150
+ <Summary
151
+ :is-published="isCurrentlyPublished"
152
+ :mode="publishMode"
153
+ :current-state-label="currentStateLabel"
154
+ :action-label="actionLabel"
155
+ :result-state-label="resultStateLabel"
156
+ />
157
+ </FormItem>
82
158
  </div>
83
159
  </DialogModal>
84
160
  </template>
85
161
 
86
162
  <script setup>
87
- import { ref, computed, useBlokkli, useAsyncData } from "#imports";
88
163
  import {
89
- DialogModal,
90
- FormToggle,
91
- FormTextarea,
92
- FormItem,
93
- FormGroup
94
- } from "#blokkli/components";
95
- import { falsy } from "#blokkli/helpers";
164
+ ref,
165
+ computed,
166
+ watch,
167
+ useBlokkli,
168
+ useAsyncData,
169
+ onMounted,
170
+ onUnmounted
171
+ } from "#imports";
172
+ import { DialogModal, FormTextarea, FormItem } from "#blokkli/components";
173
+ import { emitMessage } from "#blokkli/helpers/eventBus";
96
174
  import Item from "./Item.vue";
97
- const { adapter, $t, state, context } = useBlokkli();
175
+ import PublishOption, {} from "./PublishOption.vue";
176
+ import Summary from "./Summary.vue";
177
+ import ScheduleDate from "./ScheduleDate.vue";
178
+ const showTable = false;
179
+ const { adapter, $t, state, context, ui } = useBlokkli();
98
180
  const isMutating = ref(false);
99
181
  const mutationStatusItems = ref({});
100
182
  const publishedIds = ref([]);
101
- const shouldPublish = defineModel("shouldPublish", { type: Boolean, ...{
102
- default: () => false
103
- } });
104
- const states = defineModel("states", { type: Array, ...{
105
- default: () => []
106
- } });
107
- const revisionMessage = defineModel("revisionMessage", { type: String, ...{
108
- default: () => false
109
- } });
183
+ const states = ref([]);
184
+ const revisionMessage = ref("");
185
+ const currentTimestamp = ref(Date.now());
186
+ let timestampInterval = null;
187
+ onMounted(() => {
188
+ timestampInterval = setInterval(() => {
189
+ currentTimestamp.value = Date.now();
190
+ }, 3e4);
191
+ });
192
+ onUnmounted(() => {
193
+ if (timestampInterval) {
194
+ clearInterval(timestampInterval);
195
+ }
196
+ });
197
+ const publishMode = ref("immediate");
110
198
  const emit = defineEmits(["close", "submit"]);
111
- const { data: publishOptions, status } = await useAsyncData(() => {
199
+ const {
200
+ data: publishOptions,
201
+ status,
202
+ refresh
203
+ } = await useAsyncData(() => {
112
204
  return adapter.getPublishOptions();
113
205
  });
206
+ const canSchedule = computed(() => !!publishOptions.value?.canSchedule);
207
+ const publishOn = computed(
208
+ () => publishOptions.value?.publishOn ?? null
209
+ );
210
+ const isAlreadyScheduled = computed(() => !!publishOn.value);
211
+ const isCurrentlyPublished = computed(() => !!state.entity.value?.status);
212
+ const publishModeOptions = computed(() => {
213
+ const options = [
214
+ {
215
+ id: "save",
216
+ icon: "save",
217
+ color: "red",
218
+ label: $t("publishModeSaveTitle", "Save"),
219
+ description: $t(
220
+ "publishModeSaveDescription",
221
+ "Save changes without publishing"
222
+ ),
223
+ disabled: isCurrentlyPublished.value || isAlreadyScheduled.value
224
+ },
225
+ {
226
+ id: "immediate",
227
+ icon: "publish",
228
+ color: "lime",
229
+ label: $t("publishModeImmediateTitle", "Publish"),
230
+ description: $t(
231
+ "publishModeImmediateDescription",
232
+ "Publish changes immediately"
233
+ ),
234
+ disabled: isAlreadyScheduled.value
235
+ }
236
+ ];
237
+ if (canSchedule.value) {
238
+ options.push({
239
+ id: "scheduled",
240
+ icon: "calendar-clock",
241
+ color: "yellow",
242
+ label: $t("publishModeScheduledTitle", "Schedule"),
243
+ description: $t(
244
+ "publishModeScheduledDescription",
245
+ "Schedule changes for publishing"
246
+ ),
247
+ disabled: false
248
+ });
249
+ }
250
+ return options;
251
+ });
252
+ const scheduleDate = ref(publishOn.value || "");
253
+ console.log("SET REIVISON LOG MESSAGE");
254
+ if (publishOptions.value?.revisionLogMessage) {
255
+ revisionMessage.value = publishOptions.value.revisionLogMessage;
256
+ }
257
+ if (publishOn.value) {
258
+ publishMode.value = "scheduled";
259
+ }
260
+ watch(publishMode, (newMode) => {
261
+ if (newMode === "scheduled" && !scheduleDate.value) {
262
+ const tomorrow = /* @__PURE__ */ new Date();
263
+ tomorrow.setDate(tomorrow.getDate() + 1);
264
+ tomorrow.setHours(12, 0, 0, 0);
265
+ scheduleDate.value = tomorrow.toISOString();
266
+ }
267
+ });
268
+ const enableScheduling = computed(() => publishMode.value === "scheduled");
269
+ const shouldPublish = computed(() => publishMode.value !== "save");
114
270
  const { data: editStates } = await useAsyncData(
115
271
  () => {
116
272
  if (adapter.getEditStates) {
@@ -166,39 +322,127 @@ const selectedToPublishItems = computed(
166
322
  )
167
323
  );
168
324
  const isLoading = computed(() => status.value === "pending" || isMutating.value);
169
- const submitLabelPublish = computed(() => {
170
- if (shouldPublish.value) {
171
- const count = 1 + states.value.length;
172
- return "@count Inhalte publizieren".replace("@count", count.toString());
325
+ const scheduleDateError = computed(() => {
326
+ if (publishMode.value !== "scheduled" || !scheduleDate.value) {
327
+ return "";
328
+ }
329
+ const selectedDateTime = new Date(scheduleDate.value);
330
+ const minDateTime = new Date(currentTimestamp.value + 2 * 60 * 1e3);
331
+ if (selectedDateTime < minDateTime) {
332
+ return $t(
333
+ "publishScheduleDateTooSoon",
334
+ "The scheduled date must be at least 2 minutes in the future"
335
+ );
336
+ }
337
+ return "";
338
+ });
339
+ const canSubmit = computed(() => {
340
+ if (!selectedToPublishItems.value.length) {
341
+ return false;
342
+ }
343
+ if (publishMode.value === "scheduled" && !scheduleDate.value) {
344
+ return false;
173
345
  }
174
- return null;
346
+ if (publishMode.value === "scheduled" && isAlreadyScheduled.value) {
347
+ return false;
348
+ }
349
+ if (scheduleDateError.value) {
350
+ return false;
351
+ }
352
+ return true;
175
353
  });
176
- const submitLabelSave = computed(() => {
354
+ const submitLabel = computed(() => {
177
355
  const count = selectedToPublishItems.value.length;
178
- if (!count) {
179
- if (shouldPublish.value) {
180
- return "Inhalte publizieren";
356
+ if (publishMode.value === "scheduled") {
357
+ if (count === 0) {
358
+ return $t("publishSchedulePublication", "Schedule publication");
181
359
  }
182
- return "Inhalte speichern";
360
+ return count === 1 ? $t("publishSchedulePublication", "Schedule publication") : $t(
361
+ "publishSchedulePublications",
362
+ "Schedule @count publications"
363
+ ).replace("@count", count.toString());
183
364
  }
184
- if (!shouldPublish.value) {
185
- return "@count Inhalte speichern".replace("@count", count.toString());
365
+ if (publishMode.value === "save") {
366
+ if (count === 0) {
367
+ return $t("publishSaveContent", "Save content");
368
+ }
369
+ return count === 1 ? $t("publishSaveContent", "Save content") : $t("publishSaveContents", "Save @count contents").replace(
370
+ "@count",
371
+ count.toString()
372
+ );
373
+ }
374
+ if (count === 0) {
375
+ return $t("publishPublishContent", "Publish content");
186
376
  }
187
- return null;
377
+ return count === 1 ? $t("publishPublishContent", "Publish content") : $t("publishPublishContents", "Publish @count contents").replace(
378
+ "@count",
379
+ count.toString()
380
+ );
188
381
  });
189
- const submitLabel = computed(() => {
190
- return [submitLabelPublish.value, submitLabelSave.value].filter(falsy).join(", ");
382
+ const currentStateLabel = computed(
383
+ () => isCurrentlyPublished.value ? $t("publishCurrentlyPublished", "Page is published") : $t("publishCurrentlyUnpublished", "Page is unpublished")
384
+ );
385
+ const actionLabel = computed(() => {
386
+ if (publishMode.value === "save") {
387
+ return $t("publishModeSaveTitle", "Save");
388
+ }
389
+ if (publishMode.value === "scheduled") {
390
+ return $t("publishModeScheduledTitle", "Schedule");
391
+ }
392
+ return $t("publishModeImmediateTitle", "Publish");
191
393
  });
192
- const toggleLabel = computed(() => {
193
- if (states.value.length) {
194
- return "Inhalte publizieren";
394
+ const resultStateLabel = computed(() => {
395
+ if (publishMode.value === "save") {
396
+ return $t(
397
+ "publishResultSaveChanges",
398
+ "Changes are saved, page remains unpublished"
399
+ );
195
400
  }
196
- return "Inhalt publizieren";
401
+ if (publishMode.value === "scheduled" && scheduleDate.value) {
402
+ const formattedDate = ui.formatDate(scheduleDate.value);
403
+ return $t(
404
+ "publishResultScheduledChanges",
405
+ "Changes will be published on @date"
406
+ ).replace("@date", formattedDate);
407
+ }
408
+ if (isCurrentlyPublished.value) {
409
+ return $t(
410
+ "publishResultPublishChangesRemainPublished",
411
+ "Changes are published, page remains published"
412
+ );
413
+ }
414
+ return $t(
415
+ "publishResultPublishChangesNowPublished",
416
+ "Changes are published, page is now published"
417
+ );
197
418
  });
419
+ async function removeScheduledDate() {
420
+ if (!adapter.unscheduleEditState) {
421
+ return;
422
+ }
423
+ isMutating.value = true;
424
+ const previousScheduleDate = scheduleDate.value;
425
+ const success = await state.mutateWithLoadingState(
426
+ () => adapter.unscheduleEditState({
427
+ hostEntityType: context.value.entityType,
428
+ hostEntityUuid: context.value.entityUuid
429
+ })
430
+ );
431
+ if (success) {
432
+ await refresh();
433
+ scheduleDate.value = previousScheduleDate;
434
+ }
435
+ isMutating.value = false;
436
+ }
198
437
  async function onSubmit() {
438
+ currentTimestamp.value = Date.now();
439
+ if (scheduleDateError.value) {
440
+ return;
441
+ }
199
442
  isMutating.value = true;
200
443
  const items = stateItems.value;
201
- let hasAnyError = false;
444
+ const hasAnyError = false;
445
+ let mutationResult = false;
202
446
  for (const item of items) {
203
447
  const isSelected = states.value.includes(item.id) || item.hostEntityType === context.value.entityType && item.hostEntityUuid === context.value.entityUuid;
204
448
  if (!isSelected) {
@@ -208,30 +452,29 @@ async function onSubmit() {
208
452
  continue;
209
453
  }
210
454
  try {
211
- const result = await adapter.publish({
212
- hostEntityType: item.hostEntityType,
213
- hostEntityUuid: item.hostEntityUuid,
214
- closeAfterPublish: true,
215
- revisionLogMessage: revisionMessage.value,
216
- publishIfUnpublished: shouldPublish.value
217
- });
218
- let violations = [];
219
- if (!result.success && result.state) {
220
- const mapped = adapter.mapState(result.state);
221
- if (mapped.mutatedState?.violations) {
222
- violations = mapped.mutatedState.violations;
455
+ if (publishMode.value === "scheduled") {
456
+ if (!adapter.scheduleEditState) {
457
+ throw new Error("scheduleEditState method not available");
223
458
  }
459
+ mutationResult = await state.mutateWithLoadingState(
460
+ () => adapter.scheduleEditState({
461
+ hostEntityType: item.hostEntityType,
462
+ hostEntityUuid: item.hostEntityUuid,
463
+ revisionLogMessage: revisionMessage.value,
464
+ date: scheduleDate.value
465
+ })
466
+ );
467
+ } else {
468
+ mutationResult = await state.mutateWithLoadingState(
469
+ () => adapter.publish({
470
+ hostEntityType: item.hostEntityType,
471
+ hostEntityUuid: item.hostEntityUuid,
472
+ closeAfterPublish: true,
473
+ revisionLogMessage: revisionMessage.value,
474
+ publishIfUnpublished: shouldPublish.value
475
+ })
476
+ );
224
477
  }
225
- mutationStatusItems.value[item.id] = {
226
- id: item.id,
227
- success: result.success,
228
- errors: result.errors,
229
- violations
230
- };
231
- if (result.success) {
232
- publishedIds.value.push(item.id);
233
- }
234
- hasAnyError ||= !result.success;
235
478
  } catch {
236
479
  mutationStatusItems.value[item.id] = {
237
480
  id: item.id,
@@ -243,9 +486,19 @@ async function onSubmit() {
243
486
  }
244
487
  }
245
488
  isMutating.value = false;
246
- if (hasAnyError) {
489
+ if (hasAnyError || !mutationResult) {
247
490
  return;
248
491
  }
249
- emit("submit");
492
+ if (publishMode.value === "scheduled") {
493
+ const formattedDate = ui.formatDate(scheduleDate.value);
494
+ const message = $t(
495
+ "publishScheduleSuccess",
496
+ "Publication scheduled for @date"
497
+ ).replace("@date", formattedDate);
498
+ emitMessage(message, "success");
499
+ emit("close");
500
+ } else {
501
+ emit("submit");
502
+ }
250
503
  }
251
504
  </script>
@@ -1,19 +1,8 @@
1
- type __VLS_PublicProps = {
2
- 'shouldPublish'?: boolean;
3
- 'states'?: string[];
4
- 'revisionMessage'?: string;
5
- };
6
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
2
  close: () => void;
8
3
  submit: () => void;
9
- "update:shouldPublish": (value: boolean) => void;
10
- "update:states": (value: string[]) => void;
11
- "update:revisionMessage": (value: string) => void;
12
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
4
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
13
5
  onClose?: (() => any) | undefined;
14
6
  onSubmit?: (() => any) | undefined;
15
- "onUpdate:shouldPublish"?: ((value: boolean) => any) | undefined;
16
- "onUpdate:states"?: ((value: string[]) => any) | undefined;
17
- "onUpdate:revisionMessage"?: ((value: string) => any) | undefined;
18
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
8
  export default _default;