@blokkli/editor 2.0.0-alpha.35 → 2.0.0-alpha.37

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 (320) hide show
  1. package/dist/global/types/blockOptions.d.ts +10 -2
  2. package/dist/global/types/definitions.d.ts +12 -5
  3. package/dist/module.d.mts +2 -2
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +126 -7
  6. package/dist/modules/agent/index.d.mts +1 -1
  7. package/dist/modules/agent/index.mjs +273 -25
  8. package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +2 -2
  9. package/dist/modules/agent/runtime/app/composables/agentProvider.js +34 -17
  10. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.d.ts +2 -20
  11. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.js +0 -3
  12. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +2 -2
  13. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +1 -2
  14. package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +1 -2
  15. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.d.vue.ts +1 -0
  16. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +67 -86
  17. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue.d.ts +1 -0
  18. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +10 -12
  19. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/de.md +2 -2
  20. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/en.md +2 -2
  21. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +1 -5
  22. package/dist/modules/agent/runtime/app/features/agent/Transcript/index.d.vue.ts +8 -0
  23. package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +138 -0
  24. package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue.d.ts +8 -0
  25. package/dist/modules/agent/runtime/app/features/agent/index.vue +94 -38
  26. package/dist/modules/agent/runtime/app/helpers/index.d.ts +16 -19
  27. package/dist/modules/agent/runtime/app/helpers/index.js +22 -46
  28. package/dist/modules/agent/runtime/app/helpers/pageStructure.js +1 -1
  29. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +5 -9
  30. package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +2 -6
  31. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +2 -6
  32. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +2 -3
  33. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +2 -6
  34. package/dist/modules/agent/runtime/app/tools/add_template/index.js +2 -6
  35. package/dist/modules/agent/runtime/app/tools/analyze_content/index.js +120 -0
  36. package/dist/modules/agent/runtime/app/tools/check_readability/index.d.ts +2 -0
  37. package/dist/modules/agent/runtime/app/tools/check_readability/index.js +57 -0
  38. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +2 -6
  39. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +1 -1
  40. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +2 -0
  41. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +176 -0
  42. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +1 -1
  43. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +7 -5
  44. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -1
  45. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -3
  46. package/dist/modules/agent/runtime/app/tools/helpers.d.ts +53 -0
  47. package/dist/modules/agent/runtime/app/tools/helpers.js +187 -0
  48. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +2 -6
  49. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +1 -44
  50. package/dist/modules/agent/runtime/app/tools/schemas.js +0 -174
  51. package/dist/modules/agent/runtime/app/tools/search_content/index.js +40 -47
  52. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +2 -5
  53. package/dist/modules/agent/runtime/app/types/index.d.ts +0 -61
  54. package/dist/modules/agent/runtime/server/Session.d.ts +29 -8
  55. package/dist/modules/agent/runtime/server/Session.js +168 -85
  56. package/dist/modules/agent/runtime/server/SessionManager.d.ts +3 -0
  57. package/dist/modules/agent/runtime/server/SessionManager.js +4 -1
  58. package/dist/modules/agent/runtime/server/agent.js +3 -2
  59. package/dist/modules/agent/runtime/server/agentPrompt.d.ts +9 -1
  60. package/dist/modules/agent/runtime/server/agentPrompt.js +26 -0
  61. package/dist/modules/agent/runtime/server/default-skills/fixReadability.d.ts +2 -0
  62. package/dist/modules/agent/runtime/server/default-skills/fixReadability.js +69 -0
  63. package/dist/modules/agent/runtime/server/default-system-prompts/page-context.js +28 -0
  64. package/dist/modules/agent/runtime/server/server-tools/index.d.ts +10 -2
  65. package/dist/modules/agent/runtime/server/server-tools/index.js +1 -1
  66. package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +1 -1
  67. package/dist/modules/agent/runtime/shared/types.d.ts +81 -12
  68. package/dist/modules/agent/runtime/shared/types.js +22 -10
  69. package/dist/modules/charts/index.d.mts +35 -0
  70. package/dist/modules/charts/index.mjs +57 -0
  71. package/dist/modules/charts/runtime/blokkli/skills/charts.d.ts +2 -0
  72. package/dist/modules/charts/runtime/blokkli/skills/charts.js +42 -0
  73. package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +86 -0
  74. package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +136 -0
  75. package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.d.ts +2 -0
  76. package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.js +93 -0
  77. package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.d.ts +2 -0
  78. package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.js +66 -0
  79. package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.d.ts +2 -0
  80. package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.js +40 -0
  81. package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.d.ts +2 -0
  82. package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.js +89 -0
  83. package/dist/modules/charts/runtime/chartTypes/area.d.ts +7 -0
  84. package/dist/modules/charts/runtime/chartTypes/area.js +68 -0
  85. package/dist/modules/charts/runtime/chartTypes/bar.d.ts +8 -0
  86. package/dist/modules/charts/runtime/chartTypes/bar.js +76 -0
  87. package/dist/modules/charts/runtime/chartTypes/define.d.ts +2 -0
  88. package/dist/modules/charts/runtime/chartTypes/define.js +3 -0
  89. package/dist/modules/charts/runtime/chartTypes/donut.d.ts +6 -0
  90. package/dist/modules/charts/runtime/chartTypes/donut.js +45 -0
  91. package/dist/modules/charts/runtime/chartTypes/heatmap.d.ts +4 -0
  92. package/dist/modules/charts/runtime/chartTypes/heatmap.js +54 -0
  93. package/dist/modules/charts/runtime/chartTypes/index.d.ts +39 -0
  94. package/dist/modules/charts/runtime/chartTypes/index.js +47 -0
  95. package/dist/modules/charts/runtime/chartTypes/line.d.ts +7 -0
  96. package/dist/modules/charts/runtime/chartTypes/line.js +68 -0
  97. package/dist/modules/charts/runtime/chartTypes/pie.d.ts +5 -0
  98. package/dist/modules/charts/runtime/chartTypes/pie.js +28 -0
  99. package/dist/modules/charts/runtime/chartTypes/radar.d.ts +7 -0
  100. package/dist/modules/charts/runtime/chartTypes/radar.js +52 -0
  101. package/dist/modules/charts/runtime/chartTypes/radialBar.d.ts +6 -0
  102. package/dist/modules/charts/runtime/chartTypes/radialBar.js +44 -0
  103. package/dist/modules/charts/runtime/chartTypes/shared.d.ts +67 -0
  104. package/dist/modules/charts/runtime/chartTypes/shared.js +103 -0
  105. package/dist/modules/charts/runtime/chartTypes/types.d.ts +29 -0
  106. package/dist/modules/charts/runtime/chartTypes/types.js +0 -0
  107. package/dist/modules/charts/runtime/components/ChartRenderer/index.d.vue.ts +147 -0
  108. package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +120 -0
  109. package/dist/modules/charts/runtime/components/ChartRenderer/index.vue.d.ts +147 -0
  110. package/dist/modules/charts/runtime/components/index.d.ts +1 -0
  111. package/dist/modules/charts/runtime/components/index.js +1 -0
  112. package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.d.vue.ts +16 -0
  113. package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue +97 -0
  114. package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue.d.ts +16 -0
  115. package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.d.vue.ts +11 -0
  116. package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +34 -0
  117. package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue.d.ts +11 -0
  118. package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.d.vue.ts +12 -0
  119. package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +49 -0
  120. package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue.d.ts +12 -0
  121. package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.d.vue.ts +19 -0
  122. package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue +89 -0
  123. package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue.d.ts +19 -0
  124. package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.d.vue.ts +23 -0
  125. package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +224 -0
  126. package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue.d.ts +23 -0
  127. package/dist/{runtime/editor/features/clipboard/List → modules/charts/runtime/features/charts/Editor/FootnoteEditor}/index.d.vue.ts +4 -5
  128. package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue +61 -0
  129. package/dist/{runtime/editor/features/clipboard/List → modules/charts/runtime/features/charts/Editor/FootnoteEditor}/index.vue.d.ts +4 -5
  130. package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.d.vue.ts +10 -0
  131. package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue +45 -0
  132. package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue.d.ts +10 -0
  133. package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +11 -0
  134. package/dist/modules/charts/runtime/features/charts/Editor/index.vue +249 -0
  135. package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +11 -0
  136. package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +17 -0
  137. package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.js +90 -0
  138. package/dist/modules/charts/runtime/features/charts/index.d.vue.ts +3 -0
  139. package/dist/modules/charts/runtime/features/charts/index.vue +72 -0
  140. package/dist/modules/charts/runtime/features/charts/index.vue.d.ts +3 -0
  141. package/dist/modules/charts/runtime/helpers/index.d.ts +26 -0
  142. package/dist/modules/charts/runtime/helpers/index.js +80 -0
  143. package/dist/modules/charts/runtime/types.d.ts +33 -0
  144. package/dist/modules/charts/runtime/types.js +0 -0
  145. package/dist/modules/drupal/graphql/features/fragments.graphql +2 -0
  146. package/dist/modules/drupal/index.d.mts +1 -1
  147. package/dist/modules/drupal/runtime/adapter/index.d.ts +3 -1
  148. package/dist/modules/drupal/runtime/adapter/index.js +16 -12
  149. package/dist/modules/table-of-contents/index.d.mts +11 -0
  150. package/dist/modules/table-of-contents/index.mjs +24 -0
  151. package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.d.vue.ts +44 -0
  152. package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue +43 -0
  153. package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue.d.ts +44 -0
  154. package/dist/modules/table-of-contents/runtime/types/index.d.ts +4 -0
  155. package/dist/modules/table-of-contents/runtime/types/index.js +0 -0
  156. package/dist/runtime/components/Blocks/Fragment/index.vue +6 -2
  157. package/dist/runtime/components/BlokkliItem.vue +9 -4
  158. package/dist/runtime/components/BlokkliProvider.d.vue.ts +7 -0
  159. package/dist/runtime/components/BlokkliProvider.vue +7 -1
  160. package/dist/runtime/components/BlokkliProvider.vue.d.ts +7 -0
  161. package/dist/runtime/composables/defineBlokkli.js +1 -1
  162. package/dist/runtime/composables/useBlokkliHelper.js +4 -2
  163. package/dist/runtime/editor/components/AnimationCanvas/index.vue +17 -27
  164. package/dist/runtime/editor/components/Banner/index.d.vue.ts +13 -2
  165. package/dist/runtime/editor/components/Banner/index.vue +4 -2
  166. package/dist/runtime/editor/components/Banner/index.vue.d.ts +13 -2
  167. package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +27 -0
  168. package/dist/runtime/editor/components/Dropdown/index.vue +107 -0
  169. package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +27 -0
  170. package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.d.vue.ts +1 -0
  171. package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue +3 -2
  172. package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue.d.ts +1 -0
  173. package/dist/runtime/editor/components/EditProvider.d.vue.ts +2 -0
  174. package/dist/runtime/editor/components/EditProvider.vue +11 -7
  175. package/dist/runtime/editor/components/EditProvider.vue.d.ts +2 -0
  176. package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +5 -1
  177. package/dist/runtime/editor/components/FlexTextarea/index.vue +24 -101
  178. package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +5 -1
  179. package/dist/runtime/editor/components/Form/Radio/index.d.vue.ts +1 -0
  180. package/dist/runtime/editor/components/Form/Radio/index.vue +3 -2
  181. package/dist/runtime/editor/components/Form/Radio/index.vue.d.ts +1 -0
  182. package/dist/runtime/editor/components/ItemIcon/index.vue +10 -2
  183. package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +13 -3
  184. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +43 -16
  185. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +13 -3
  186. package/dist/runtime/editor/components/Popup/index.d.vue.ts +30 -0
  187. package/dist/runtime/editor/components/Popup/index.vue +82 -0
  188. package/dist/runtime/editor/components/Popup/index.vue.d.ts +30 -0
  189. package/dist/runtime/editor/components/PreviewProvider.d.vue.ts +2 -0
  190. package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
  191. package/dist/runtime/editor/components/PreviewProvider.vue.d.ts +2 -0
  192. package/dist/runtime/editor/components/Resizable/index.vue +4 -1
  193. package/dist/runtime/editor/components/ShortcutIndicator/index.vue +1 -1
  194. package/dist/runtime/editor/components/Toolbar/index.vue +107 -6
  195. package/dist/runtime/editor/components/index.d.ts +4 -1
  196. package/dist/runtime/editor/components/index.js +6 -0
  197. package/dist/runtime/editor/composables/defineDropAreas.js +3 -3
  198. package/dist/runtime/editor/composables/defineDropHandler.d.ts +3 -0
  199. package/dist/runtime/editor/composables/defineDropHandler.js +10 -0
  200. package/dist/runtime/editor/composables/index.d.ts +1 -0
  201. package/dist/runtime/editor/composables/index.js +1 -0
  202. package/dist/runtime/editor/composables/onElementResize.js +0 -1
  203. package/dist/runtime/editor/composables/useEditableFieldOverride.js +4 -5
  204. package/dist/runtime/editor/css/output.css +1 -1
  205. package/dist/runtime/editor/events/index.d.ts +16 -0
  206. package/dist/runtime/editor/features/add-list/Help/Item.vue +5 -2
  207. package/dist/runtime/editor/features/add-list/index.vue +58 -1
  208. package/dist/runtime/editor/features/analyze/Main.d.vue.ts +3 -2
  209. package/dist/runtime/editor/features/analyze/Main.vue +28 -44
  210. package/dist/runtime/editor/features/analyze/Main.vue.d.ts +3 -2
  211. package/dist/runtime/editor/features/analyze/analyzers/readability.js +65 -0
  212. package/dist/runtime/editor/features/analyze/analyzers/types.d.ts +19 -0
  213. package/dist/runtime/editor/features/analyze/index.vue +18 -15
  214. package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
  215. package/dist/runtime/editor/features/clipboard/DropElement/Video.d.vue.ts +8 -0
  216. package/dist/runtime/editor/features/clipboard/{List/Item → DropElement}/Video.vue +1 -5
  217. package/dist/runtime/editor/features/clipboard/DropElement/Video.vue.d.ts +8 -0
  218. package/dist/runtime/editor/features/clipboard/DropElement/helpers.d.ts +1 -0
  219. package/dist/runtime/editor/features/clipboard/DropElement/helpers.js +14 -0
  220. package/dist/runtime/editor/features/clipboard/DropElement/index.d.vue.ts +16 -0
  221. package/dist/runtime/editor/features/clipboard/DropElement/index.vue +97 -0
  222. package/dist/runtime/editor/features/clipboard/DropElement/index.vue.d.ts +16 -0
  223. package/dist/runtime/editor/features/clipboard/helpers.d.ts +15 -0
  224. package/dist/runtime/editor/features/clipboard/helpers.js +62 -0
  225. package/dist/runtime/editor/features/clipboard/index.vue +586 -338
  226. package/dist/runtime/editor/features/clipboard/types.d.ts +14 -2
  227. package/dist/runtime/editor/features/debug/index.vue +1 -1
  228. package/dist/runtime/editor/features/dev-mode/index.vue +86 -2
  229. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +17 -5
  230. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +2 -2
  231. package/dist/runtime/editor/features/dragging-overlay/index.vue +125 -219
  232. package/dist/runtime/editor/features/edit/index.vue +20 -0
  233. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +4 -4
  234. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +6 -0
  235. package/dist/runtime/editor/features/fragments/types.d.ts +1 -0
  236. package/dist/runtime/editor/features/hover/Renderer/index.vue +30 -3
  237. package/dist/runtime/editor/features/hover/index.vue +1 -1
  238. package/dist/runtime/editor/features/library/index.vue +14 -0
  239. package/dist/runtime/editor/features/media-library/index.vue +32 -1
  240. package/dist/runtime/editor/features/options/Form/Checkbox/index.d.vue.ts +2 -2
  241. package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +3 -3
  242. package/dist/runtime/editor/features/options/Form/Checkbox/index.vue.d.ts +2 -2
  243. package/dist/runtime/editor/features/options/Form/Checkboxes/index.d.vue.ts +2 -2
  244. package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +5 -5
  245. package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue.d.ts +2 -2
  246. package/dist/runtime/editor/features/options/Form/ComplexType/index.d.vue.ts +11 -0
  247. package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +36 -0
  248. package/dist/runtime/editor/features/options/Form/ComplexType/index.vue.d.ts +11 -0
  249. package/dist/runtime/editor/features/options/Form/Item.d.vue.ts +5 -4
  250. package/dist/runtime/editor/features/options/Form/Item.vue +24 -50
  251. package/dist/runtime/editor/features/options/Form/Item.vue.d.ts +5 -4
  252. package/dist/runtime/editor/features/options/Form/Number/index.d.vue.ts +3 -3
  253. package/dist/runtime/editor/features/options/Form/Number/index.vue +7 -17
  254. package/dist/runtime/editor/features/options/Form/Number/index.vue.d.ts +3 -3
  255. package/dist/runtime/editor/features/options/Form/Range/index.d.vue.ts +2 -2
  256. package/dist/runtime/editor/features/options/Form/Range/index.vue +4 -4
  257. package/dist/runtime/editor/features/options/Form/Range/index.vue.d.ts +2 -2
  258. package/dist/runtime/editor/features/options/Form/index.vue +15 -5
  259. package/dist/runtime/editor/features/search/index.vue +25 -1
  260. package/dist/runtime/editor/features/selection/index.vue +2 -2
  261. package/dist/runtime/editor/features/structure/index.vue +25 -1
  262. package/dist/runtime/editor/features/tour/index.vue +22 -12
  263. package/dist/runtime/editor/features/transform/index.vue +1 -3
  264. package/dist/runtime/editor/helpers/clipboardData/index.d.ts +11 -0
  265. package/dist/runtime/editor/helpers/clipboardData/index.js +157 -0
  266. package/dist/runtime/editor/helpers/options/index.js +5 -0
  267. package/dist/runtime/editor/icons/svg/stars.svg +5 -1
  268. package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
  269. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
  270. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +15 -4
  271. package/dist/runtime/editor/plugins/Sidebar/index.vue +4 -2
  272. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +15 -4
  273. package/dist/runtime/editor/providers/analyze.d.ts +43 -0
  274. package/dist/runtime/editor/providers/analyze.js +78 -0
  275. package/dist/runtime/editor/providers/animation.d.ts +4 -0
  276. package/dist/runtime/editor/providers/animation.js +6 -0
  277. package/dist/runtime/editor/providers/definition.d.ts +2 -2
  278. package/dist/runtime/editor/providers/definition.js +7 -1
  279. package/dist/runtime/editor/providers/dom.d.ts +5 -0
  280. package/dist/runtime/editor/providers/dom.js +11 -2
  281. package/dist/runtime/editor/providers/dragdrop.d.ts +55 -0
  282. package/dist/runtime/editor/providers/dragdrop.js +37 -0
  283. package/dist/runtime/editor/providers/fields.d.ts +19 -1
  284. package/dist/runtime/editor/providers/fields.js +54 -2
  285. package/dist/runtime/editor/providers/storage.js +15 -0
  286. package/dist/runtime/editor/providers/ui.d.ts +6 -0
  287. package/dist/runtime/editor/providers/ui.js +19 -0
  288. package/dist/runtime/editor/translations/de.json +338 -58
  289. package/dist/runtime/editor/translations/fr.json +331 -51
  290. package/dist/runtime/editor/translations/gsw_CH.json +336 -56
  291. package/dist/runtime/editor/translations/it.json +331 -51
  292. package/dist/runtime/editor/types/app.d.ts +4 -2
  293. package/dist/runtime/editor/types/draggable.d.ts +1 -0
  294. package/dist/runtime/editor/types/ui.d.ts +1 -1
  295. package/dist/runtime/helpers/imports/index.d.ts +8 -1
  296. package/dist/runtime/helpers/imports/index.js +15 -6
  297. package/dist/runtime/helpers/injections.d.ts +6 -2
  298. package/dist/runtime/helpers/injections.js +3 -0
  299. package/dist/runtime/helpers/runtimeHelpers/index.js +14 -0
  300. package/dist/runtime/types/blockOptions.d.ts +2 -1
  301. package/dist/runtime/types/definitions.d.ts +12 -5
  302. package/dist/runtime/types/provider.d.ts +2 -0
  303. package/dist/shared/editor.6D5vApr0.mjs +30 -0
  304. package/dist/shared/{editor.DMFfaLVE.mjs → editor.BFIzNSQM.mjs} +1 -30
  305. package/dist/shared/{editor.Iax3GCvt.d.mts → editor.BdBm1Z7C.d.mts} +34 -0
  306. package/dist/types.d.mts +1 -1
  307. package/package.json +21 -3
  308. package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +0 -104
  309. package/dist/runtime/editor/features/clipboard/List/Item/File.d.vue.ts +0 -4
  310. package/dist/runtime/editor/features/clipboard/List/Item/File.vue +0 -60
  311. package/dist/runtime/editor/features/clipboard/List/Item/File.vue.d.ts +0 -4
  312. package/dist/runtime/editor/features/clipboard/List/Item/Video.d.vue.ts +0 -4
  313. package/dist/runtime/editor/features/clipboard/List/Item/Video.vue.d.ts +0 -4
  314. package/dist/runtime/editor/features/clipboard/List/index.vue +0 -72
  315. package/dist/runtime/editor/features/tour/Popup/index.d.vue.ts +0 -9
  316. package/dist/runtime/editor/features/tour/Popup/index.vue +0 -34
  317. package/dist/runtime/editor/features/tour/Popup/index.vue.d.ts +0 -9
  318. package/dist/runtime/editor/providers/dropArea.d.ts +0 -48
  319. package/dist/runtime/editor/providers/dropArea.js +0 -22
  320. /package/dist/modules/agent/runtime/app/tools/{get_available_bundles → analyze_content}/index.d.ts +0 -0
@@ -189,6 +189,7 @@ export interface EventbusEvents {
189
189
  'multi-select:start': MultiSelectStartEvent;
190
190
  'dragging:start': DraggableStartEvent;
191
191
  'dragging:drop': DropTargetEvent;
192
+ 'dragging:move': Coord;
192
193
  'dragging:end': undefined;
193
194
  'add:block:new': AddNewBlockEvent;
194
195
  updateMutatedFields: UpdateMutatedFieldsEvent;
@@ -215,6 +216,14 @@ export interface EventbusEvents {
215
216
  'state:reload:before': undefined;
216
217
  'state:reloaded': undefined;
217
218
  'option:update': UpdateBlockOptionEvent;
219
+ /**
220
+ * Emitted when editing a complex option type (e.g. chart data).
221
+ */
222
+ 'option:edit-complex': {
223
+ uuid: string;
224
+ key: string;
225
+ dataType: string;
226
+ };
218
227
  /**
219
228
  * Emitted after finishing changing options.
220
229
  */
@@ -241,6 +250,13 @@ export interface EventbusEvents {
241
250
  'view-option:toggle': {
242
251
  id: string;
243
252
  };
253
+ /**
254
+ * Emitted when editing a fragment provided by a feature.
255
+ */
256
+ 'fragment:edit': {
257
+ name: string;
258
+ uuid: string;
259
+ };
244
260
  }
245
261
  type EventbusEventsType = {
246
262
  [K in keyof EventbusEvents]: EventbusEvents[K];
@@ -73,12 +73,15 @@ onElementResize(el, (size) => {
73
73
  defineExpose({
74
74
  height
75
75
  });
76
- const { types, $t, definitions } = useBlokkli();
76
+ const { types, $t, definitions, dom } = useBlokkli();
77
77
  const reusableBlockTypes = computed(
78
78
  () => types.generallyAvailableBundles.filter((v) => v.allowReusable)
79
79
  );
80
80
  const fragments = computed(() => {
81
- return definitions.fragmentDefinitions.value.map((v) => {
81
+ const available = dom.generallyAvailableFragments.value;
82
+ return definitions.fragmentDefinitions.value.filter((definition) => {
83
+ return available.includes(definition.name);
84
+ }).map((v) => {
82
85
  return {
83
86
  bundle: fragmentBlockBundle,
84
87
  label: v.label,
@@ -69,6 +69,7 @@ import AddListActions from "./Actions/index.vue";
69
69
  import AddListHelpComponent from "./Help/index.vue";
70
70
  import { itemEntityType } from "#blokkli-build/config";
71
71
  import { onlyUnique } from "#blokkli/helpers";
72
+ import { defineDropHandler } from "#blokkli/editor/composables";
72
73
  const DEBUG_HELP = false;
73
74
  const { settings } = defineBlokkliFeature({
74
75
  id: "add-list",
@@ -86,7 +87,63 @@ const { settings } = defineBlokkliFeature({
86
87
  },
87
88
  screenshot: "feature-add-list.jpg"
88
89
  });
89
- const { $t, ui, selection, state, tour, types, context, dom, plugins } = useBlokkli();
90
+ const {
91
+ $t,
92
+ ui,
93
+ selection,
94
+ state,
95
+ tour,
96
+ types,
97
+ context,
98
+ dom,
99
+ plugins,
100
+ adapter,
101
+ definitions,
102
+ fields,
103
+ eventBus
104
+ } = useBlokkli();
105
+ defineDropHandler("new", {
106
+ async execute({ items, host, afterUuid, bundle }) {
107
+ const itemBundle = bundle || items[0].itemBundle;
108
+ const field = fields.find(host.uuid, host.fieldName);
109
+ if (!field) {
110
+ throw new Error(
111
+ `Failed to locate field with name "${host.fieldName}" on UUID "${host.uuid}"`
112
+ );
113
+ }
114
+ const definition = definitions.getBlockDefinition(
115
+ itemBundle,
116
+ field.fieldListType,
117
+ field.hostEntityBundle
118
+ );
119
+ const addBehaviour = definition?.editor?.addBehaviour || "form";
120
+ if (definition?.editor?.disableEdit || addBehaviour === "no-form" || addBehaviour.startsWith("editable:") || !adapter.formFrameBuilder) {
121
+ await state.mutateWithLoadingState(
122
+ () => adapter.addNewBlock({
123
+ bundle: itemBundle,
124
+ host,
125
+ afterUuid
126
+ })
127
+ );
128
+ return { focusEditable: true };
129
+ } else {
130
+ eventBus.emit("add:block:new", {
131
+ bundle: itemBundle,
132
+ host,
133
+ afterUuid
134
+ });
135
+ }
136
+ }
137
+ });
138
+ defineDropHandler("action", {
139
+ execute({ items, host, field, afterUuid }) {
140
+ items[0].action.callback({
141
+ preceedingUuid: afterUuid,
142
+ host,
143
+ field
144
+ });
145
+ }
146
+ });
90
147
  const actions = computed(() => {
91
148
  return plugins.get("addAction").sort((a, b) => a.weight - b.weight);
92
149
  });
@@ -1,7 +1,8 @@
1
- import type { Analyzer } from './analyzers/types.js';
1
+ import type { AnalyzeProvider } from '#blokkli/editor/providers/analyze';
2
2
  type __VLS_Props = {
3
3
  langcode: string;
4
- analyzers: Analyzer[];
4
+ analyze: AnalyzeProvider;
5
+ isShown: boolean;
5
6
  };
6
7
  type __VLS_ModelProps = {
7
8
  modelValue?: boolean;
@@ -21,6 +21,11 @@
21
21
  </RelativeTime>
22
22
  </p>
23
23
 
24
+ <FormToggle
25
+ v-model="keepVisible"
26
+ :label="$t('analyzeKeepVisible', 'Keep results visible')"
27
+ />
28
+
24
29
  <div v-if="analyzerStatuses.length > 1" class="bk-analyze-statuses">
25
30
  <div
26
31
  v-for="analyzer in analyzerStatuses"
@@ -56,7 +61,7 @@
56
61
  </div>
57
62
  </div>
58
63
  <Renderer
59
- v-if="results.length"
64
+ v-if="results.length && (keepVisible || isShown)"
60
65
  v-model="activeId"
61
66
  :results
62
67
  :is-stale
@@ -78,16 +83,19 @@ import Results from "./Results/Results.vue";
78
83
  import AnalyzeSummary from "./Summary/index.vue";
79
84
  import Renderer from "./Renderer/index.vue";
80
85
  import { useAnalyzeHelper } from "./helper";
81
- import { FormSelect, RelativeTime } from "#blokkli/editor/components";
82
- import { AnalyzerContext } from "./analyzers/helpers/Context";
83
- import { normalizeToArray } from "./analyzers/helpers/normalizeArray";
86
+ import {
87
+ FormSelect,
88
+ FormToggle,
89
+ RelativeTime
90
+ } from "#blokkli/editor/components";
84
91
  import { renderCycle } from "#blokkli/editor/helpers/vue";
85
92
  const props = defineProps({
86
93
  langcode: { type: String, required: true },
87
- analyzers: { type: Array, required: true }
94
+ analyze: { type: Object, required: true },
95
+ isShown: { type: Boolean, required: true }
88
96
  });
89
97
  const ALL = "ALL";
90
- const { $t, ui, state, directive, dom } = useBlokkli();
98
+ const { $t, ui, state, directive, dom, storage } = useBlokkli();
91
99
  const { getCategoryLabel } = useAnalyzeHelper();
92
100
  const refreshKey = computed(() => {
93
101
  return `dom:${dom.settleKey.value}_directive:${directive.settleKey.value}_state:${state.refreshKey.value}`;
@@ -107,13 +115,13 @@ const activeId = useState(() => "");
107
115
  const lastRun = useState(() => 0);
108
116
  const lastRunKey = useState(() => "");
109
117
  const selectedCategory = useState(() => ALL);
110
- const hasInitialized = useState(() => false);
118
+ const keepVisible = storage.use("analyze:keepVisible", true);
111
119
  const providerRootElement = ui.providerElement;
112
120
  const continuousAnalyzers = computed(
113
- () => props.analyzers.filter((a) => a.continuous)
121
+ () => props.analyze.analyzers.value.filter((a) => a.continuous)
114
122
  );
115
123
  const manualAnalyzers = computed(
116
- () => props.analyzers.filter((a) => !a.continuous)
124
+ () => props.analyze.analyzers.value.filter((a) => !a.continuous)
117
125
  );
118
126
  const hasContinuousAnalyzers = computed(
119
127
  () => continuousAnalyzers.value.length > 0
@@ -193,7 +201,7 @@ const analyzerStatuses = computed(() => {
193
201
  if (!hasRunOnce.value) {
194
202
  return [];
195
203
  }
196
- return props.analyzers.map((analyzer) => {
204
+ return props.analyze.analyzers.value.map((analyzer) => {
197
205
  const status = analyzer.continuous ? $t("analyzeStatusUpToDate", "Up-to-date") : isStale.value ? $t("analyzeStatusStale", "Stale") : $t("analyzeStatusUpToDate", "Up-to-date");
198
206
  const title = typeof analyzer.label === "function" ? analyzer.label(ui.interfaceLanguage.value) : analyzer.label;
199
207
  return {
@@ -229,16 +237,6 @@ onUnmounted(() => {
229
237
  currentAbortController = null;
230
238
  }
231
239
  });
232
- function getContext(signal) {
233
- return new AnalyzerContext(
234
- props.langcode,
235
- ui.interfaceLanguage.value,
236
- providerRootElement,
237
- state,
238
- $t,
239
- signal
240
- );
241
- }
242
240
  async function runContinuous() {
243
241
  if (!continuousAnalyzers.value.length) {
244
242
  return;
@@ -251,21 +249,15 @@ async function runContinuous() {
251
249
  isRunning.value = true;
252
250
  let wasAborted = false;
253
251
  try {
254
- const context = getContext(abortController.signal);
255
- if (!hasInitialized.value) {
256
- await Promise.all(
257
- props.analyzers.map(async (analyzer) => {
258
- if (analyzer.init) {
259
- await analyzer.init(context);
260
- }
261
- })
262
- );
263
- hasInitialized.value = true;
264
- }
252
+ await props.analyze.ensureInitialized();
265
253
  if (abortController.signal.aborted) {
266
254
  wasAborted = true;
267
255
  return;
268
256
  }
257
+ const context = props.analyze.createContext(
258
+ providerRootElement,
259
+ abortController.signal
260
+ );
269
261
  const newResults = [];
270
262
  for (let i = 0; i < continuousAnalyzers.value.length; i++) {
271
263
  if (abortController.signal.aborted) {
@@ -273,7 +265,7 @@ async function runContinuous() {
273
265
  return;
274
266
  }
275
267
  const analyzer = continuousAnalyzers.value[i];
276
- const result = (await normalizeToArray(analyzer.run(context))).map(
268
+ const result = (await props.analyze.runAnalyzer(analyzer, context)).map(
277
269
  (v) => {
278
270
  return {
279
271
  ...v,
@@ -319,21 +311,12 @@ async function onClick() {
319
311
  await renderCycle();
320
312
  const currentRefreshKey = state.refreshKey.value;
321
313
  try {
322
- const context = getContext();
323
- if (!hasInitialized.value) {
324
- await Promise.all(
325
- props.analyzers.map(async (analyzer) => {
326
- if (analyzer.init) {
327
- await analyzer.init(context);
328
- }
329
- })
330
- );
331
- }
332
- hasInitialized.value = true;
314
+ await props.analyze.ensureInitialized();
315
+ const context = props.analyze.createContext(providerRootElement);
333
316
  const newManualResults = [];
334
317
  for (let i = 0; i < manualAnalyzers.value.length; i++) {
335
318
  const analyzer = manualAnalyzers.value[i];
336
- const result = (await normalizeToArray(analyzer.run(context))).map(
319
+ const result = (await props.analyze.runAnalyzer(analyzer, context)).map(
337
320
  (v) => {
338
321
  return {
339
322
  ...v,
@@ -381,6 +364,7 @@ const categoryOptions = computed(() => {
381
364
  ];
382
365
  });
383
366
  onMounted(async () => {
367
+ await props.analyze.ensureInitialized();
384
368
  if (hasContinuousAnalyzers.value) {
385
369
  await runContinuous();
386
370
  }
@@ -1,7 +1,8 @@
1
- import type { Analyzer } from './analyzers/types.js';
1
+ import type { AnalyzeProvider } from '#blokkli/editor/providers/analyze';
2
2
  type __VLS_Props = {
3
3
  langcode: string;
4
- analyzers: Analyzer[];
4
+ analyze: AnalyzeProvider;
5
+ isShown: boolean;
5
6
  };
6
7
  type __VLS_ModelProps = {
7
8
  modelValue?: boolean;
@@ -145,6 +145,12 @@ function analyzeReadability(tr, blocks, langcode, $t, cache) {
145
145
  nodes.push({
146
146
  description: parts.join(" \xB7 "),
147
147
  impact: impactFor(scores.lix),
148
+ scores: {
149
+ ...scores.lix != null ? { lix: round(scores.lix) } : {},
150
+ ...scores.cli != null ? { cli: round(scores.cli) } : {},
151
+ ...scores.ari != null ? { ari: round(scores.ari) } : {},
152
+ ...scores.gulpease != null ? { gulpease: round(scores.gulpease) } : {}
153
+ },
148
154
  targets: [b.element]
149
155
  });
150
156
  }
@@ -162,6 +168,49 @@ function analyzeReadability(tr, blocks, langcode, $t, cache) {
162
168
  impact: summarizeImpact(nodes)
163
169
  };
164
170
  }
171
+ function scoreText(tr, text, langcode) {
172
+ const trimmed = text.trim();
173
+ if (!trimmed) return null;
174
+ const words = segmentWords(trimmed);
175
+ if (words.length < MIN_WORDS_FOR_CONFIDENCE) return null;
176
+ const sentences = Math.max(1, countSentences(trimmed));
177
+ const avgSentLen = words.length / sentences;
178
+ const lix = safe(() => tr.lix(trimmed));
179
+ const cli = safe(() => tr.colemanLiauIndex(trimmed));
180
+ const ari = safe(() => tr.automatedReadabilityIndex(trimmed));
181
+ const gulpease = langcode === "it" ? safe(() => tr.gulpeaseIndex(trimmed)) : void 0;
182
+ const scores = {
183
+ ...lix != null ? { lix: round(lix) } : {},
184
+ ...cli != null ? { cli: round(cli) } : {},
185
+ ...ari != null ? { ari: round(ari) } : {},
186
+ ...gulpease != null ? { gulpease: round(gulpease) } : {}
187
+ };
188
+ const band = toBand(langcode, { lix, cli, ari, gulpease });
189
+ const impact = impactFor(lix);
190
+ const parts = [];
191
+ if (band === "hard") {
192
+ parts.push("Hard to read.");
193
+ } else if (band === "ok") {
194
+ parts.push("Acceptable readability.");
195
+ } else {
196
+ parts.push("Easy to read.");
197
+ }
198
+ if (lix != null) parts.push(`LIX ${format(lix)}`);
199
+ if (langcode === "it" && gulpease != null) {
200
+ parts.push(`Gulpease ${format(gulpease)}`);
201
+ }
202
+ if (cli != null) parts.push(`CLI ${format(cli)}`);
203
+ parts.push(`Avg sentence length ${format(avgSentLen)}`);
204
+ return {
205
+ description: parts.join(" \xB7 "),
206
+ impact,
207
+ scores,
208
+ targets: []
209
+ };
210
+ }
211
+ function round(n) {
212
+ return Math.round(n * 10) / 10;
213
+ }
165
214
  function safe(fn) {
166
215
  try {
167
216
  const n = fn();
@@ -175,12 +224,14 @@ export default defineAnalyzer(() => {
175
224
  const cache = /* @__PURE__ */ new Map();
176
225
  return {
177
226
  id: "readability",
227
+ type: "readability",
178
228
  label: (langcode) => {
179
229
  if (langcode === "de") {
180
230
  return "Lesbarkeit";
181
231
  }
182
232
  return "Readability";
183
233
  },
234
+ description: "Analyzes text readability using LIX, Coleman-Liau, and ARI indices. Flags hard-to-read text blocks.",
184
235
  continuous: true,
185
236
  init: async function(context) {
186
237
  const { TextReadability } = await import("@lunarisapp/readability");
@@ -201,6 +252,20 @@ export default defineAnalyzer(() => {
201
252
  context.$t,
202
253
  cache
203
254
  );
255
+ },
256
+ async analyzeText(text, langcode) {
257
+ if (!isSupportedLangcode(langcode)) {
258
+ return [];
259
+ }
260
+ if (!textReadability) {
261
+ const { TextReadability } = await import("@lunarisapp/readability");
262
+ textReadability = new TextReadability({
263
+ lang: mapLang(langcode),
264
+ cache: true
265
+ });
266
+ }
267
+ const node = scoreText(textReadability, text, langcode);
268
+ return node ? [node] : [];
204
269
  }
205
270
  };
206
271
  });
@@ -12,6 +12,10 @@ export type AnalyzeNodeTargetMapped = {
12
12
  export type AnalyzeNode = {
13
13
  description?: string;
14
14
  impact?: AnalyzeImpact;
15
+ /**
16
+ * Optional numeric scores for this node (e.g. readability indices).
17
+ */
18
+ scores?: Record<string, number>;
15
19
  /**
16
20
  * An array of either:
17
21
  * - string: a valid selector
@@ -41,9 +45,18 @@ export type AnalyzeResultMapped = Omit<AnalyzeResult, 'nodes'> & {
41
45
  plugin: string;
42
46
  nodes: AnalyzeNodeMapped[];
43
47
  };
48
+ export type AnalyzerType = 'generic' | 'readability';
44
49
  export type Analyzer = {
45
50
  id: string;
51
+ /**
52
+ * The type of analyzer. Defaults to 'generic'.
53
+ *
54
+ * - 'readability': Text readability analysis (LIX, Flesch, etc.)
55
+ * - 'generic': Any other type of analysis (accessibility, SEO, custom checks)
56
+ */
57
+ type?: AnalyzerType;
46
58
  label?: string | ((langcode: string) => string);
59
+ description?: string | ((langcode: string) => string);
47
60
  /**
48
61
  * If true, the raw page (without editor UI) is required for this analyzer.
49
62
  */
@@ -55,4 +68,10 @@ export type Analyzer = {
55
68
  continuous?: boolean;
56
69
  init?: (context: AnalyzerContext) => void | Promise<void>;
57
70
  run: (context: AnalyzerContext) => undefined | null | AnalyzeResult | AnalyzeResult[] | Promise<undefined | null | AnalyzeResult | AnalyzeResult[]>;
71
+ /**
72
+ * Optional method to analyze raw text without DOM context.
73
+ * Enables agent feedback loops (test a rewrite before applying).
74
+ * Analyzers that only work with DOM (e.g. axe-core) don't implement this.
75
+ */
76
+ analyzeText?: (text: string, langcode: string) => AnalyzeNode[] | Promise<AnalyzeNode[]>;
58
77
  };
@@ -6,28 +6,32 @@
6
6
  icon="bk_mdi_speed"
7
7
  weight="10"
8
8
  :is-loading="isRunning"
9
+ render-always
9
10
  >
10
11
  <template #icon>
11
12
  <AnalyzeIcon :is-running />
12
13
  </template>
13
- <div v-if="ui.isProxyMode.value" class="bk-sidebar-padding bk">
14
- <InfoBox
15
- :text="
14
+ <template #default="{ isShown }">
15
+ <div v-if="ui.isProxyMode.value" class="bk-sidebar-padding bk">
16
+ <InfoBox
17
+ :text="
16
18
  $t(
17
19
  'analyzeNotAvailableInStructureView',
18
20
  'Analyze is not available in structure view.'
19
21
  )
20
22
  "
21
- icon="bk_mdi_account_tree"
23
+ icon="bk_mdi_account_tree"
24
+ />
25
+ </div>
26
+ <AnalyzerMain
27
+ v-else
28
+ :key="animation.renderKey.value"
29
+ v-model="isRunning"
30
+ :langcode="context.language"
31
+ :analyze
32
+ :is-shown
22
33
  />
23
- </div>
24
- <AnalyzerMain
25
- v-else
26
- :key="animation.renderKey.value"
27
- v-model="isRunning"
28
- :langcode="context.language"
29
- :analyzers
30
- />
34
+ </template>
31
35
  </PluginSidebar>
32
36
  </template>
33
37
 
@@ -37,7 +41,7 @@ import { PluginSidebar } from "#blokkli/editor/plugins";
37
41
  import { InfoBox } from "#blokkli/editor/components";
38
42
  import AnalyzerMain from "./Main.vue";
39
43
  import AnalyzeIcon from "./Icon.vue";
40
- const { adapters } = defineBlokkliFeature({
44
+ defineBlokkliFeature({
41
45
  id: "analyze",
42
46
  label: "Analyze",
43
47
  icon: "bk_mdi_speed",
@@ -45,9 +49,8 @@ const { adapters } = defineBlokkliFeature({
45
49
  description: "Analyze blocks and page for SEO, accessibility, etc.",
46
50
  viewports: []
47
51
  });
48
- const { $t, context, animation, ui } = useBlokkli();
52
+ const { $t, context, animation, ui, analyze } = useBlokkli();
49
53
  const isRunning = ref(false);
50
- const analyzers = await adapters.getAggregated("getAnalyzers");
51
54
  </script>
52
55
 
53
56
  <script>
@@ -253,7 +253,7 @@ const resetZoom = () => {
253
253
  animation.requestDraw();
254
254
  };
255
255
  onBlokkliEvent("keyPressed", (e) => {
256
- if (ui.hasDialogOpen.value) {
256
+ if (ui.hasDialogOpen.value || ui.hasNestedEditorOpen.value) {
257
257
  return;
258
258
  }
259
259
  if (e.code === "Home") {
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ data: string;
3
+ videoService?: string;
4
+ videoId: string;
5
+ };
6
+ declare const __VLS_export: 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
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -15,12 +15,8 @@
15
15
  import { computed } from "#imports";
16
16
  import { Icon } from "#blokkli/editor/components";
17
17
  const props = defineProps({
18
- type: { type: String, required: true },
19
- id: { type: String, required: true },
20
- itemBundle: { type: String, required: true },
21
18
  data: { type: String, required: true },
22
- additional: { type: String, required: false },
23
- videoService: { type: null, required: true },
19
+ videoService: { type: String, required: false },
24
20
  videoId: { type: String, required: true }
25
21
  });
26
22
  const imgUrl = computed(() => {
@@ -0,0 +1,8 @@
1
+ type __VLS_Props = {
2
+ data: string;
3
+ videoService?: string;
4
+ videoId: string;
5
+ };
6
+ declare const __VLS_export: 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
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare function humanFileSize(bytes: number, si?: boolean, dp?: number): string;
@@ -0,0 +1,14 @@
1
+ export function humanFileSize(bytes, si = false, dp = 1) {
2
+ const thresh = si ? 1e3 : 1024;
3
+ if (Math.abs(bytes) < thresh) {
4
+ return bytes + " B";
5
+ }
6
+ const units = si ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
7
+ let u = -1;
8
+ const r = 10 ** dp;
9
+ do {
10
+ bytes /= thresh;
11
+ ++u;
12
+ } while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
13
+ return bytes.toFixed(dp) + " " + units[u];
14
+ }
@@ -0,0 +1,16 @@
1
+ export type DropElementItemType = 'image' | 'video' | 'file' | 'text';
2
+ export type DropElementItem = {
3
+ type: DropElementItemType;
4
+ data?: string;
5
+ fileName?: string;
6
+ fileSize?: number;
7
+ videoId?: string;
8
+ videoService?: string;
9
+ };
10
+ type __VLS_Props = {
11
+ bundles: string[];
12
+ items: DropElementItem[];
13
+ };
14
+ declare const __VLS_export: 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>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;