@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,31 @@
1
+ fragment paragraphsBlokkliConfigInput on ParagraphsBlokkliConfigInput {
2
+ __typename
3
+ name
4
+ label
5
+ description
6
+ required
7
+
8
+ ... on ParagraphsBlokkliConfigInputText {
9
+ defaultValueText: defaultValue
10
+ minLength
11
+ maxLength
12
+ placeholder
13
+ pattern
14
+ multiline
15
+ rows
16
+ }
17
+
18
+ ... on ParagraphsBlokkliConfigInputCheckbox {
19
+ checkboxLabel
20
+ defaultValueCheckbox: defaultValue
21
+ }
22
+
23
+ ... on ParagraphsBlokkliConfigInputOptions {
24
+ defaultValueOptions: defaultValue
25
+ variant
26
+ options {
27
+ value
28
+ label
29
+ }
30
+ }
31
+ }
@@ -5,4 +5,5 @@ fragment blokkliProps on ParagraphsBlokkliProps {
5
5
  canEdit
6
6
  editLabel
7
7
  language
8
+ hostOptions
8
9
  }
@@ -11,11 +11,16 @@ fragment paragraphsBlokkliEditState on ParagraphsBlokkliEditState {
11
11
  ...paragraphsBlokkliMutatedField
12
12
  }
13
13
  mutatedOptions: behaviorSettings
14
+ hostOptions
14
15
  violations {
15
16
  ...paragraphsBlokkliViolation
16
17
  }
17
18
  }
18
19
 
20
+ publishOptions {
21
+ ...paragraphsBlokkliPublishOptions
22
+ }
23
+
19
24
  entity {
20
25
  status
21
26
  label
@@ -0,0 +1,5 @@
1
+ query pbEntityConfig($entityType: String!, $entityUuid: String!) {
2
+ config: pbGetEntityConfig(entityType: $entityType, entityUuid: $entityUuid) {
3
+ linkPath
4
+ }
5
+ }
@@ -31,10 +31,7 @@ query pbPublishOptions(
31
31
  langcode: $langcode
32
32
  ) {
33
33
  publishOptions {
34
- canPublish
35
- isRevisionable
36
- hasRevisionLogMessage
37
- lastChanged
34
+ ...paragraphsBlokkliPublishOptions
38
35
  }
39
36
  }
40
37
  }
@@ -0,0 +1,31 @@
1
+ mutation pbUnschedule(
2
+ $entityType: EntityType!
3
+ $entityUuid: String!
4
+ $langcode: String
5
+ ) {
6
+ state: paragraphsEditMutationState(
7
+ entityType: $entityType
8
+ entityUuid: $entityUuid
9
+ ) {
10
+ action: unschedule {
11
+ ...paragraphsBlokkliMutationResult
12
+ }
13
+ }
14
+ }
15
+
16
+ mutation pbSchedule(
17
+ $entityType: EntityType!
18
+ $entityUuid: String!
19
+ $langcode: String
20
+ $date: String!
21
+ $revisionLogMessage: String
22
+ ) {
23
+ state: paragraphsEditMutationState(
24
+ entityType: $entityType
25
+ entityUuid: $entityUuid
26
+ ) {
27
+ action: schedule(date: $date, revisionLogMessage: $revisionLogMessage) {
28
+ ...paragraphsBlokkliMutationResult
29
+ }
30
+ }
31
+ }
@@ -10,10 +10,15 @@ query pbGetTransformPlugins(
10
10
  ) {
11
11
  id
12
12
  label
13
+ description
13
14
  bundles
14
15
  targetBundles
15
16
  min
16
17
  max
18
+ allowPreview
19
+ configInputs {
20
+ ...paragraphsBlokkliConfigInput
21
+ }
17
22
  }
18
23
  }
19
24
 
@@ -23,12 +28,15 @@ mutation pbApplyTransformPlugin(
23
28
  $langcode: String
24
29
  $pluginId: String!
25
30
  $uuids: [String]!
31
+ $config: [ParagraphsBlokkliUserConfigInput]
32
+ $preview: Boolean
26
33
  ) {
27
34
  state: paragraphsEditMutationState(
28
35
  entityType: $entityType
29
36
  entityUuid: $entityUuid
37
+ preview: $preview
30
38
  ) {
31
- action: transform(pluginId: $pluginId, uuids: $uuids) {
39
+ action: transform(pluginId: $pluginId, uuids: $uuids, userConfig: $config) {
32
40
  ...paragraphsBlokkliMutationResult
33
41
  }
34
42
  }
@@ -0,0 +1,38 @@
1
+ query pbGetHostTransformPlugins(
2
+ $entityType: EntityType!
3
+ $entityUuid: String!
4
+ $langcode: String!
5
+ ) {
6
+ paragraphsBlokkliGetHostTransformPlugins(
7
+ entityType: $entityType
8
+ entityUuid: $entityUuid
9
+ langcode: $langcode
10
+ ) {
11
+ id
12
+ label
13
+ description
14
+ allowPreview
15
+ configInputs {
16
+ ...paragraphsBlokkliConfigInput
17
+ }
18
+ }
19
+ }
20
+
21
+ mutation pbApplyHostTransformPlugin(
22
+ $entityType: EntityType!
23
+ $entityUuid: String!
24
+ $langcode: String
25
+ $pluginId: String!
26
+ $config: [ParagraphsBlokkliUserConfigInput]
27
+ $preview: Boolean
28
+ ) {
29
+ state: paragraphsEditMutationState(
30
+ entityType: $entityType
31
+ entityUuid: $entityUuid
32
+ preview: $preview
33
+ ) {
34
+ action: host_transform(pluginId: $pluginId, userConfig: $config) {
35
+ ...paragraphsBlokkliMutationResult
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,15 @@
1
+ mutation pbUpdateHostOptions(
2
+ $entityType: EntityType!
3
+ $entityUuid: String!
4
+ $langcode: String
5
+ $items: [ParagraphsBlokkliUpdateHostOptionsInput]!
6
+ ) {
7
+ state: paragraphsEditMutationState(
8
+ entityType: $entityType
9
+ entityUuid: $entityUuid
10
+ ) {
11
+ action: update_host_options(items: $items) {
12
+ ...paragraphsBlokkliMutationResult
13
+ }
14
+ }
15
+ }
@@ -1,4 +1,4 @@
1
- import { B as BlokkliModule } from '../../shared/editor.gz_ac6uT.mjs';
1
+ import { B as BlokkliModule } from '../../shared/editor.CKsrTpc1.mjs';
2
2
  import 'nuxt/schema';
3
3
  import '../../../dist/runtime/types/index.js';
4
4
  import '#blokkli-build/module-types';
@@ -21,20 +21,26 @@ function toPascalCase(text) {
21
21
  function clearAndUpper(text) {
22
22
  return text.replace(/_/, "").toUpperCase();
23
23
  }
24
+ function getDrupalAdapterPath() {
25
+ const resolver = createResolver(fileURLToPath(new URL("./", import.meta.url)));
26
+ return resolver.resolve("./runtime/adapter/index.js");
27
+ }
24
28
  const index = defineBlokkliModule({
25
29
  alterOptions(options) {
26
30
  if (!options.itemEntityType) {
27
31
  options.itemEntityType = "paragraph";
28
32
  }
29
33
  if (!options.pattern) {
30
- options.pattern = ["~/components/Paragraph/**/*.vue"];
34
+ options.pattern = [
35
+ "~/components/Paragraph/**/*.vue",
36
+ "~/components/Node/**/*.vue",
37
+ "~/components/TaxonomyTerm/**/*.vue",
38
+ "~/components/CommerceProduct/**/*.vue",
39
+ "~/components/Storage/**/*.vue"
40
+ ];
31
41
  }
32
42
  if (!options.editAdapterPath) {
33
- const resolver = createResolver(
34
- fileURLToPath(new URL("./", import.meta.url))
35
- );
36
- const filePath = resolver.resolve("./runtime/adapter/index.js");
37
- options.editAdapterPath = filePath;
43
+ options.editAdapterPath = getDrupalAdapterPath();
38
44
  }
39
45
  if (!options.getBundlePropsType) {
40
46
  options.getBundlePropsType = function(bundle) {
@@ -45,7 +51,8 @@ const index = defineBlokkliModule({
45
51
  };
46
52
  }
47
53
  },
48
- setup({ context }) {
54
+ setup({ context, helper }) {
55
+ helper.addAlias("#blokkli/drupal-adapter", getDrupalAdapterPath());
49
56
  if (!useGraphqlModuleContext({ nullOnMissing: true })) {
50
57
  logger.box(
51
58
  'Failed to load nuxt-graphql-middleware module context. Make sure that "nuxt-graphql-middleware" is placed before "@blokkli/editor" in your "modules" config in nuxt.config.ts.'
@@ -89,9 +96,11 @@ const index = defineBlokkliModule({
89
96
  "fragment.paragraphsBlokkliMutationItem.graphql",
90
97
  "fragment.paragraphsBlokkliMutationResult.graphql",
91
98
  "fragment.paragraphsBlokkliViolation.graphql",
99
+ "fragment.ParagraphsBlokkliConfigInput.graphql",
92
100
  "fragment.blokkliProps.graphql",
93
101
  "fragment.paragraphsFieldItem.graphql",
94
102
  "query.pbConfig.graphql",
103
+ "query.pbEntityConfig.graphql",
95
104
  "query.pbEditState.graphql"
96
105
  ];
97
106
  base.forEach((fileName) => {
@@ -121,6 +130,7 @@ const index = defineBlokkliModule({
121
130
  addMutation("update_behavior_setting");
122
131
  addMutation("update_field_value");
123
132
  addMutation("update_host_entity_field_value");
133
+ addMutation("update_host_options");
124
134
  if (graphql.schemaHasType("CommentBlokkliNode")) {
125
135
  addGraphqlDocument("features/comments.graphql");
126
136
  } else {
@@ -136,6 +146,9 @@ const index = defineBlokkliModule({
136
146
  } else {
137
147
  context.features.disableFeature("transform");
138
148
  }
149
+ if (graphql.schemaHasType("ParagraphsBlokkliHostTransformPlugin")) {
150
+ addGraphqlDocument("features/transform_host.graphql");
151
+ }
139
152
  if (graphql.schemaHasType("ParagraphFromLibrary")) {
140
153
  addGraphqlDocument("features/library.graphql");
141
154
  } else {
@@ -168,6 +181,23 @@ const index = defineBlokkliModule({
168
181
  }
169
182
  if (editStateFields.has("publishOptions") && queryFields.has("pbSearchEditStates")) {
170
183
  addGraphqlDocument("features/publishNew.graphql");
184
+ const publishOptionsFragmentFields = [
185
+ "canPublish",
186
+ "isRevisionable",
187
+ "hasRevisionLogMessage",
188
+ "lastChanged",
189
+ "revisionLogMessage"
190
+ ];
191
+ if (editMutationStateFields.has("unschedule")) {
192
+ addGraphqlDocument("features/scheduler.graphql");
193
+ publishOptionsFragmentFields.push("canSchedule", "publishOn");
194
+ }
195
+ const publishOptionsFragment = `
196
+ fragment paragraphsBlokkliPublishOptions on ParagraphsBlokkliPublishOptions {
197
+ ${publishOptionsFragmentFields.join("\n ")}
198
+ }
199
+ `;
200
+ graphql.addDocument("blokkli:publishOptions", publishOptionsFragment);
171
201
  } else {
172
202
  addGraphqlDocument("features/publish.graphql");
173
203
  }
@@ -10,8 +10,72 @@ import {
10
10
  useRouter
11
11
  } from "#imports";
12
12
  import { ParagraphsBlokkliRemoteVideoProvider } from "#graphql-operations";
13
+ function mapPublishOptions(publishOptions) {
14
+ return {
15
+ canPublish: !!publishOptions.canPublish,
16
+ isRevisionable: !!publishOptions.isRevisionable,
17
+ hasRevisionLogMessage: !!publishOptions.hasRevisionLogMessage,
18
+ lastChanged: publishOptions.lastChanged ?? null,
19
+ canSchedule: !!publishOptions.canSchedule,
20
+ publishOn: publishOptions.publishOn ?? null,
21
+ revisionLogMessage: publishOptions.revisionLogMessage ?? null
22
+ };
23
+ }
24
+ function mapPluginConfigInputs(inputs) {
25
+ return inputs.map((input) => {
26
+ if (input.__typename === "ParagraphsBlokkliConfigInputText") {
27
+ return {
28
+ type: "text",
29
+ name: input.name,
30
+ label: input.label,
31
+ description: input.description,
32
+ required: input.required,
33
+ defaultValue: input.defaultValueText,
34
+ minLength: input.minLength,
35
+ maxLength: input.maxLength,
36
+ placeholder: input.placeholder,
37
+ pattern: input.pattern,
38
+ multiline: input.multiline,
39
+ rows: input.rows
40
+ };
41
+ } else if (input.__typename === "ParagraphsBlokkliConfigInputCheckbox") {
42
+ return {
43
+ type: "checkbox",
44
+ name: input.name,
45
+ label: input.label,
46
+ description: input.description,
47
+ required: input.required,
48
+ defaultValue: input.defaultValueCheckbox ?? false,
49
+ checkboxLabel: input.checkboxLabel
50
+ };
51
+ } else if (input.__typename === "ParagraphsBlokkliConfigInputOptions") {
52
+ return {
53
+ type: "options",
54
+ name: input.name,
55
+ label: input.label,
56
+ description: input.description,
57
+ required: input.required,
58
+ defaultValue: input.defaultValueOptions ?? "",
59
+ variant: input.variant,
60
+ options: input.options
61
+ };
62
+ } else if (input.__typename === "ParagraphsBlokkliConfigInputSeed") {
63
+ return {
64
+ type: "seed",
65
+ name: input.name,
66
+ label: input.label,
67
+ description: input.description,
68
+ required: input.required
69
+ };
70
+ }
71
+ return null;
72
+ }).filter(falsy);
73
+ }
13
74
  export default defineBlokkliEditAdapter(
14
75
  async (providedContext) => {
76
+ if (import.meta.dev) {
77
+ console.log("initialise Drupal bl\xF6kkli adapter");
78
+ }
15
79
  const availableFeatureIds = new Set(availableFeaturesAtBuild);
16
80
  const availableGraphqlOperations = new Set(Object.keys(operationSources));
17
81
  function hasQuery(name) {
@@ -52,6 +116,14 @@ export default defineBlokkliEditAdapter(
52
116
  )
53
117
  };
54
118
  });
119
+ const entityConfig = await useGraphqlQuery("pbEntityConfig", {
120
+ entityType: providedContext.value.entityType,
121
+ entityUuid: providedContext.value.entityUuid
122
+ }).then((v) => {
123
+ return {
124
+ linkPath: v.data.config?.linkPath ?? ""
125
+ };
126
+ });
55
127
  const loadState = async () => {
56
128
  const state = await useGraphqlQuery("pbEditState", {
57
129
  ...ctx.value
@@ -75,6 +147,10 @@ export default defineBlokkliEditAdapter(
75
147
  const fields = state?.mutatedState?.fields || [];
76
148
  const violations = state.mutatedState?.violations || [];
77
149
  const entity = state.entity;
150
+ if (!state.publishOptions) {
151
+ throw new Error("Missing publish options.");
152
+ }
153
+ const publishOptions = mapPublishOptions(state.publishOptions);
78
154
  const mutatedOptions = state.mutatedState?.mutatedOptions || {};
79
155
  Object.keys(mutatedOptions).forEach((uuid) => {
80
156
  mutatedOptions[uuid] = mutatedOptions[uuid]?.paragraphs_blokkli_data || {};
@@ -101,6 +177,7 @@ export default defineBlokkliEditAdapter(
101
177
  return null;
102
178
  }).filter(falsy)
103
179
  };
180
+ const mutatedHostOptions = state.mutatedState?.hostOptions || {};
104
181
  return {
105
182
  currentIndex,
106
183
  mutations,
@@ -109,8 +186,11 @@ export default defineBlokkliEditAdapter(
109
186
  mutatedState: {
110
187
  fields,
111
188
  violations,
112
- mutatedOptions
189
+ mutatedOptions,
190
+ // PHP and its arrays...
191
+ mutatedHostOptions: Array.isArray(mutatedHostOptions) ? {} : mutatedHostOptions
113
192
  },
193
+ publishOptions,
114
194
  entity,
115
195
  mutatedEntity: state.mutatedEntity,
116
196
  translationState
@@ -233,6 +313,9 @@ export default defineBlokkliEditAdapter(
233
313
  const getLastChanged = () => $fetch(
234
314
  `/paragraphs_blokkli/${ctx.value.entityType}/${ctx.value.entityUuid}/last_changed`
235
315
  ).then((v) => v.changed);
316
+ const buildAnchorLink = (id, _uuid) => {
317
+ return `${entityConfig.linkPath}#${id}`;
318
+ };
236
319
  const adapter = {
237
320
  addNewBlock,
238
321
  buildEditableFrameUrl,
@@ -248,7 +331,8 @@ export default defineBlokkliEditAdapter(
248
331
  loadStateAtIndex,
249
332
  mapState,
250
333
  moveBlock,
251
- moveMultipleBlocks
334
+ moveMultipleBlocks,
335
+ buildAnchorLink
252
336
  };
253
337
  if (hasQuery("pbPublishOptions")) {
254
338
  adapter.getPublishOptions = () => useGraphqlQuery("pbPublishOptions", ctx.value).then((v) => {
@@ -256,7 +340,7 @@ export default defineBlokkliEditAdapter(
256
340
  if (!options) {
257
341
  throw new Error("Failed to load publish options.");
258
342
  }
259
- return options;
343
+ return mapPublishOptions(options);
260
344
  });
261
345
  }
262
346
  if (hasQuery("pbGetImportSourceEntities")) {
@@ -286,6 +370,12 @@ export default defineBlokkliEditAdapter(
286
370
  if (hasMutation("pbTakeOwnership")) {
287
371
  adapter.takeOwnership = () => useGraphqlMutation("pbTakeOwnership", ctx.value).then(mapMutation);
288
372
  }
373
+ if (hasMutation("pbUpdateHostOptions")) {
374
+ adapter.updateHostOptions = (items) => useGraphqlMutation("pbUpdateHostOptions", {
375
+ ...ctx.value,
376
+ items
377
+ }).then(mapMutation);
378
+ }
289
379
  if (hasMutation("pbSetHistoryIndex")) {
290
380
  adapter.setHistoryIndex = (index) => useGraphqlMutation("pbSetHistoryIndex", {
291
381
  ...ctx.value,
@@ -304,7 +394,6 @@ export default defineBlokkliEditAdapter(
304
394
  entityType: options.hostEntityType.toUpperCase(),
305
395
  entityUuid: options.hostEntityUuid,
306
396
  createNewState: !options.closeAfterPublish,
307
- // @ts-expect-error Might not exist.
308
397
  publishIfUnpublished: options.publishIfUnpublished,
309
398
  revisionLogMessage: options.revisionLogMessage
310
399
  }).then(mapMutation);
@@ -487,10 +576,26 @@ export default defineBlokkliEditAdapter(
487
576
  return {
488
577
  id: plugin.id,
489
578
  label: plugin.label,
579
+ description: plugin.description,
490
580
  bundles: plugin.bundles,
491
581
  targetBundles: plugin.targetBundles,
492
582
  min: plugin.min,
493
- max: plugin.max
583
+ max: plugin.max,
584
+ configInputs: mapPluginConfigInputs(plugin.configInputs),
585
+ preview: plugin.allowPreview
586
+ };
587
+ })
588
+ );
589
+ }
590
+ if (hasQuery("pbGetHostTransformPlugins")) {
591
+ adapter.getHostTransformPlugins = () => useGraphqlQuery("pbGetHostTransformPlugins", ctx.value).then((v) => v.data.paragraphsBlokkliGetHostTransformPlugins || []).then(
592
+ (plugins) => plugins.map((plugin) => {
593
+ return {
594
+ id: plugin.id,
595
+ label: plugin.label,
596
+ description: plugin.description,
597
+ configInputs: mapPluginConfigInputs(plugin.configInputs),
598
+ preview: plugin.allowPreview
494
599
  };
495
600
  })
496
601
  );
@@ -500,6 +605,22 @@ export default defineBlokkliEditAdapter(
500
605
  ...ctx.value,
501
606
  ...e
502
607
  }).then(mapMutation);
608
+ adapter.previewTransformPlugin = (e) => useGraphqlMutation("pbApplyTransformPlugin", {
609
+ ...ctx.value,
610
+ ...e,
611
+ preview: true
612
+ }).then(mapMutation);
613
+ }
614
+ if (hasMutation("pbApplyHostTransformPlugin")) {
615
+ adapter.applyHostTransformPlugin = (e) => useGraphqlMutation("pbApplyHostTransformPlugin", {
616
+ ...ctx.value,
617
+ ...e
618
+ }).then(mapMutation);
619
+ adapter.previewHostTransformPlugin = (e) => useGraphqlMutation("pbApplyHostTransformPlugin", {
620
+ ...ctx.value,
621
+ ...e,
622
+ preview: true
623
+ }).then(mapMutation);
503
624
  }
504
625
  const buildFormUrl = (parts, langcode) => {
505
626
  const prefix = config.urlPrefixes[langcode];
@@ -760,6 +881,20 @@ export default defineBlokkliEditAdapter(
760
881
  });
761
882
  };
762
883
  }
884
+ if (hasMutation("pbUnschedule")) {
885
+ adapter.unscheduleEditState = (options) => useGraphqlMutation("pbUnschedule", {
886
+ entityType: options.hostEntityType.toUpperCase(),
887
+ entityUuid: options.hostEntityUuid
888
+ }).then(mapMutation);
889
+ }
890
+ if (hasMutation("pbSchedule")) {
891
+ adapter.scheduleEditState = (options) => useGraphqlMutation("pbSchedule", {
892
+ entityType: options.hostEntityType.toUpperCase(),
893
+ entityUuid: options.hostEntityUuid,
894
+ date: options.date,
895
+ revisionLogMessage: options.revisionLogMessage
896
+ }).then(mapMutation);
897
+ }
763
898
  return adapter;
764
899
  }
765
900
  );
@@ -1,7 +1,8 @@
1
1
  import type { ComputedRef } from 'vue';
2
- import type { CommentItem, ConversionItem, MappedState, ImportItem, LibraryItem, BlockBundleDefinition, EntityTranslation, SearchContentItem, AddClipboardItemEvent, AddNewBlockEvent, AddReusableItemEvent, ImportFromExistingEvent, MakeReusableEvent, MoveMultipleBlocksEvent, MoveBlockEvent, UpdateBlockOptionEvent, AddContentSearchItemEvent, TransformPlugin, EditBlockEvent, PasteExistingBlocksEvent, UpdateFieldValueEvent, AssistantResult, DraggableHostData, DetachReusableBlockEvent, FieldConfig, EditableFieldConfig, DraggableMediaLibraryItem, DroppableFieldConfig, PublishOptions, GetEditStatesItem } from './../types/index.js';
2
+ import type { CommentItem, ConversionItem, MappedState, ImportItem, LibraryItem, BlockBundleDefinition, EntityTranslation, SearchContentItem, AddClipboardItemEvent, AddNewBlockEvent, AddReusableItemEvent, ImportFromExistingEvent, MakeReusableEvent, MoveMultipleBlocksEvent, MoveBlockEvent, UpdateBlockOptionEvent, AddContentSearchItemEvent, TransformPlugin, EditBlockEvent, PasteExistingBlocksEvent, UpdateFieldValueEvent, AssistantResult, DraggableHostData, DetachReusableBlockEvent, FieldConfig, EditableFieldConfig, DraggableMediaLibraryItem, DroppableFieldConfig, PublishOptions, GetEditStatesItem, UpdateHostOptionEvent, HostTransformPlugin, PluginConfigInputItem } from './../types/index.js';
3
3
  import type getVideoId from 'get-video-id';
4
4
  import type { GetMediaLibraryFunction } from './../components/Edit/Features/MediaLibrary/types.js';
5
+ import type { Analyzer } from '#blokkli/analyzer/types';
5
6
  export type { GetMediaLibraryFunction };
6
7
  export interface MutationResponseLike<T> {
7
8
  success: boolean;
@@ -11,6 +12,11 @@ export interface MutationResponseLike<T> {
11
12
  type AdapterApplyTransformPlugin = {
12
13
  pluginId: string;
13
14
  uuids: string[];
15
+ config?: PluginConfigInputItem[];
16
+ };
17
+ type AdapterApplyHostTransformPlugin = {
18
+ pluginId: string;
19
+ config?: PluginConfigInputItem[];
14
20
  };
15
21
  export type UpdateEntityFieldValueEvent = {
16
22
  fieldName: string;
@@ -155,6 +161,34 @@ export type BlokkliAdapterPublishOptions = {
155
161
  */
156
162
  revisionLogMessage?: string;
157
163
  };
164
+ export type BlokkliAdapterScheduleOptions = {
165
+ /**
166
+ * The host entity type.
167
+ */
168
+ hostEntityType: string;
169
+ /**
170
+ * The host entity UUID.
171
+ */
172
+ hostEntityUuid: string;
173
+ /**
174
+ * The revision log message.
175
+ */
176
+ revisionLogMessage?: string;
177
+ /**
178
+ * The date and time when the edit state should be published.
179
+ */
180
+ date: string;
181
+ };
182
+ export type BlokkliAdapterUnscheduleOptions = {
183
+ /**
184
+ * The host entity type.
185
+ */
186
+ hostEntityType: string;
187
+ /**
188
+ * The host entity UUID.
189
+ */
190
+ hostEntityUuid: string;
191
+ };
158
192
  export interface BlokkliAdapter<T> {
159
193
  /**
160
194
  * Load the state.
@@ -203,10 +237,38 @@ export interface BlokkliAdapter<T> {
203
237
  * Get all possible transform plugins.
204
238
  */
205
239
  getTransformPlugins?: () => Promise<TransformPlugin[]>;
240
+ /**
241
+ * Get all possible host transform plugins.
242
+ */
243
+ getHostTransformPlugins?: () => Promise<HostTransformPlugin[]>;
206
244
  /**
207
245
  * Apply a transform plugin.
208
246
  */
209
247
  applyTransformPlugin?: (e: AdapterApplyTransformPlugin) => Promise<MutationResponseLike<T>>;
248
+ /**
249
+ * Preview the output of a transform plugin.
250
+ *
251
+ * The transform plugin is expected to apply its transform without actually
252
+ * persisting it and not creating any side effects.
253
+ *
254
+ * It must produce the same result when called for the "final"
255
+ * transformation that is added to the edit state.
256
+ */
257
+ previewTransformPlugin?: (e: AdapterApplyTransformPlugin) => Promise<MutationResponseLike<T>>;
258
+ /**
259
+ * Apply a host transform plugin.
260
+ */
261
+ applyHostTransformPlugin?: (e: AdapterApplyHostTransformPlugin) => Promise<MutationResponseLike<T>>;
262
+ /**
263
+ * Preview the output of a host transform plugin.
264
+ *
265
+ * The transform plugin is expected to apply its transform without actually
266
+ * persisting it and not creating any side effects.
267
+ *
268
+ * It must produce the same result when called for the "final"
269
+ * transformation that is added to the edit state.
270
+ */
271
+ previewHostTransformPlugin?: (e: AdapterApplyHostTransformPlugin) => Promise<MutationResponseLike<T>>;
210
272
  /**
211
273
  * Add a new block.
212
274
  */
@@ -215,6 +277,10 @@ export interface BlokkliAdapter<T> {
215
277
  * Update multiple options.
216
278
  */
217
279
  updateOptions?: (options: UpdateBlockOptionEvent[]) => Promise<MutationResponseLike<T>>;
280
+ /**
281
+ * Update multiple host options.
282
+ */
283
+ updateHostOptions?: (options: UpdateHostOptionEvent[]) => Promise<MutationResponseLike<T>>;
218
284
  /**
219
285
  * Determine the block bundle for the given clipboard item.
220
286
  */
@@ -270,6 +336,14 @@ export interface BlokkliAdapter<T> {
270
336
  * Publish all changes.
271
337
  */
272
338
  publish?: (options: BlokkliAdapterPublishOptions) => Promise<MutationResponseLike<T | undefined | null>>;
339
+ /**
340
+ * Schedule an edit state.
341
+ */
342
+ scheduleEditState?: (options: BlokkliAdapterScheduleOptions) => Promise<MutationResponseLike<T | undefined | null>>;
343
+ /**
344
+ * Unschedule an already scheduled edit state.
345
+ */
346
+ unscheduleEditState?: (options: BlokkliAdapterUnscheduleOptions) => Promise<MutationResponseLike<T | undefined | null>>;
273
347
  /**
274
348
  * Set a specific history index.
275
349
  */
@@ -400,6 +474,21 @@ export interface BlokkliAdapter<T> {
400
474
  * Add a fragment block.
401
475
  */
402
476
  fragmentsAddBlock?: (e: AdapterFragmentsAddBlock) => Promise<MutationResponseLike<T>> | undefined;
477
+ /**
478
+ * Build the link that is copied to the clipboard when clicking on an "anchor link" indicator.
479
+ */
480
+ buildAnchorLink?: (id: string, uuid: string) => string;
481
+ getAnalyzers?: () => Analyzer | Analyzer[] | Promise<Analyzer> | Promise<Analyzer[]>;
482
+ userSettings?: {
483
+ /**
484
+ * Load user settings.
485
+ */
486
+ load: () => Promise<string | Record<string, any>>;
487
+ /**
488
+ * Persist user settings.
489
+ */
490
+ persist: (settings: string) => Promise<undefined>;
491
+ };
403
492
  }
404
493
  export type BlokkliAdapterFactory<T> = (ctx: ComputedRef<AdapterContext>) => Promise<BlokkliAdapter<T>> | BlokkliAdapter<T>;
405
494
  export type AdapterMethods = keyof BlokkliAdapter<any>;