@blokkli/editor 2.0.0-alpha.59 → 2.0.0-alpha.61

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 (324) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +28 -11
  3. package/dist/modules/agent/index.mjs +2 -5
  4. package/dist/modules/agent/runtime/app/features/agent/Container.vue +3 -3
  5. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +15 -3
  6. package/dist/modules/agent/runtime/app/features/agent/index.vue +5 -1
  7. package/dist/modules/agent/runtime/app/features/agent/types.d.ts +2 -1
  8. package/dist/modules/agent/runtime/app/helpers/mutationResult.d.ts +38 -0
  9. package/dist/modules/agent/runtime/app/helpers/mutationResult.js +49 -0
  10. package/dist/modules/agent/runtime/app/prompts/fixReadability.js +3 -3
  11. package/dist/modules/agent/runtime/app/providers/agentProvider.d.ts +2 -1
  12. package/dist/modules/agent/runtime/app/providers/agentProvider.js +6 -6
  13. package/dist/modules/agent/runtime/app/providers/toolsProvider.js +3 -13
  14. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +25 -0
  15. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.js +3 -2
  16. package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +22 -0
  17. package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +3 -2
  18. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +24 -0
  19. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +3 -2
  20. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +32 -0
  21. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +6 -4
  22. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +22 -0
  23. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +3 -2
  24. package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +22 -0
  25. package/dist/modules/agent/runtime/app/tools/add_template/index.js +5 -3
  26. package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +3 -3
  27. package/dist/modules/agent/runtime/app/tools/ask_question/index.js +7 -6
  28. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +29 -0
  29. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +172 -0
  30. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +29 -0
  31. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +28 -0
  32. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +80 -0
  33. package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.d.ts +17 -0
  34. package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.js +2 -2
  35. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +16 -0
  36. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +10 -1
  37. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +3 -2
  38. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +16 -0
  39. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +3 -2
  40. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +16 -0
  41. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +3 -2
  42. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +22 -0
  43. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +5 -3
  44. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +31 -0
  45. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +7 -7
  46. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +7 -0
  47. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +2 -2
  48. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +10 -0
  49. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +3 -3
  50. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +35 -0
  51. package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +2 -2
  52. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +20 -0
  53. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +2 -2
  54. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +30 -0
  55. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +15 -11
  56. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +25 -0
  57. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +2 -2
  58. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +8 -0
  59. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +2 -2
  60. package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +8 -0
  61. package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +65 -0
  62. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +81 -0
  63. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +20 -12
  64. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +14 -0
  65. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -2
  66. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +38 -0
  67. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +7 -6
  68. package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.d.ts +12 -0
  69. package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.js +2 -2
  70. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +16 -0
  71. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +62 -0
  72. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +9 -0
  73. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -2
  74. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +16 -0
  75. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +3 -2
  76. package/dist/modules/agent/runtime/app/tools/helpers.d.ts +8 -2
  77. package/dist/modules/agent/runtime/app/tools/helpers.js +9 -9
  78. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +22 -0
  79. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +3 -2
  80. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +21 -0
  81. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +3 -2
  82. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +20 -0
  83. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +3 -2
  84. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +19 -0
  85. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +3 -2
  86. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +25 -5
  87. package/dist/modules/agent/runtime/app/tools/schemas.js +37 -10
  88. package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +15 -0
  89. package/dist/modules/agent/runtime/app/tools/search_content/index.js +8 -7
  90. package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +5 -1
  91. package/dist/modules/agent/runtime/app/tools/search_media/index.js +3 -3
  92. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +16 -0
  93. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +2 -2
  94. package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +13 -0
  95. package/dist/modules/agent/runtime/app/tools/search_templates/index.js +2 -2
  96. package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +15 -0
  97. package/dist/modules/agent/runtime/app/tools/search_text/index.js +2 -2
  98. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +1 -1
  99. package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +2 -2
  100. package/dist/modules/agent/runtime/app/tools/select_media/index.js +2 -2
  101. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +19 -0
  102. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +3 -2
  103. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +17 -0
  104. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +3 -2
  105. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +13 -4
  106. package/dist/modules/agent/runtime/app/tools/update_text_fields/index.js +8 -7
  107. package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +17 -0
  108. package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +2 -2
  109. package/dist/modules/agent/runtime/app/types/index.d.ts +6 -9
  110. package/dist/modules/agent/runtime/app/types/index.js +4 -3
  111. package/dist/modules/agent/runtime/server/agent.js +1 -2
  112. package/dist/modules/agent/runtime/server/classes/Session/index.d.ts +2 -2
  113. package/dist/modules/agent/runtime/server/classes/Session/index.js +10 -5
  114. package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +2 -1
  115. package/dist/modules/agent/runtime/shared/toolParams.d.ts +19 -0
  116. package/dist/modules/agent/runtime/shared/toolParams.js +6 -0
  117. package/dist/modules/agent/runtime/shared/toolResult.d.ts +4 -0
  118. package/dist/modules/agent/runtime/shared/toolResult.js +5 -0
  119. package/dist/modules/agent/runtime/shared/types.d.ts +23 -4
  120. package/dist/modules/agent/runtime/shared/types.js +6 -1
  121. package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +4 -13
  122. package/dist/modules/drupal/graphql/features/notifications.graphql +39 -0
  123. package/dist/modules/drupal/index.mjs +6 -1
  124. package/dist/modules/drupal/runtime/adapter/index.js +38 -0
  125. package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +0 -1
  126. package/dist/runtime/editor/components/Actions/ScrollArrow/index.d.vue.ts +13 -0
  127. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue +52 -0
  128. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue.d.ts +13 -0
  129. package/dist/runtime/editor/components/Actions/Title/index.vue +9 -8
  130. package/dist/runtime/editor/components/Actions/index.vue +47 -7
  131. package/dist/runtime/editor/components/Actions/useToolbarScroll.d.ts +25 -0
  132. package/dist/runtime/editor/components/Actions/useToolbarScroll.js +125 -0
  133. package/dist/runtime/editor/components/AddListItem/index.vue +0 -2
  134. package/dist/runtime/editor/components/AppMenu/MenuButton.vue +1 -3
  135. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -1
  136. package/dist/runtime/editor/components/Avatar/index.vue +0 -1
  137. package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
  138. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
  139. package/dist/runtime/editor/components/BundleSelector/index.vue +0 -4
  140. package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
  141. package/dist/runtime/editor/components/Dialog/index.vue +1 -3
  142. package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
  143. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +8 -0
  144. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +12 -2
  145. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +8 -0
  146. package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +8 -0
  147. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +14 -2
  148. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +8 -0
  149. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +2 -2
  150. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +0 -2
  151. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +2 -2
  152. package/dist/runtime/editor/components/DiffApproval/index.vue +3 -2
  153. package/dist/runtime/editor/components/Dropdown/index.vue +0 -39
  154. package/dist/runtime/editor/components/DropdownItem/index.d.vue.ts +12 -2
  155. package/dist/runtime/editor/components/DropdownItem/index.vue +46 -2
  156. package/dist/runtime/editor/components/DropdownItem/index.vue.d.ts +12 -2
  157. package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
  158. package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
  159. package/dist/runtime/editor/components/Form/Datepicker/index.vue +0 -1
  160. package/dist/runtime/editor/components/Form/TextDark/index.vue +0 -1
  161. package/dist/runtime/editor/components/Form/Textarea/index.vue +0 -1
  162. package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
  163. package/dist/runtime/editor/components/Form/Toggle/index.vue +9 -2
  164. package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
  165. package/dist/runtime/editor/components/FormOverlay/index.vue +0 -1
  166. package/dist/runtime/editor/components/Icon/index.vue +0 -2
  167. package/dist/runtime/editor/components/Messages/Item/index.vue +4 -1
  168. package/dist/runtime/editor/components/Messages/index.vue +3 -0
  169. package/dist/runtime/editor/components/Panel/Sheet/index.vue +1 -1
  170. package/dist/runtime/editor/components/Popup/index.vue +0 -2
  171. package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +1 -1
  172. package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +1 -1
  173. package/dist/runtime/editor/components/ScheduleDate/index.vue +1 -3
  174. package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +1 -1
  175. package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +1 -1
  176. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.d.vue.ts +3 -0
  177. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +74 -0
  178. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue.d.ts +3 -0
  179. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.d.vue.ts +7 -0
  180. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue +16 -0
  181. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue.d.ts +7 -0
  182. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.d.vue.ts +3 -0
  183. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue +57 -0
  184. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue.d.ts +3 -0
  185. package/dist/runtime/editor/components/Toolbar/index.vue +3 -56
  186. package/dist/runtime/editor/components/ToolbarDropdown/index.d.vue.ts +21 -0
  187. package/dist/runtime/editor/components/ToolbarDropdown/index.vue +36 -0
  188. package/dist/runtime/editor/components/ToolbarDropdown/index.vue.d.ts +21 -0
  189. package/dist/runtime/editor/components/Tooltip/Context.vue +3 -1
  190. package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
  191. package/dist/runtime/editor/components/Tooltip/index.vue +4 -1
  192. package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
  193. package/dist/runtime/editor/components/index.d.ts +1 -0
  194. package/dist/runtime/editor/components/index.js +1 -0
  195. package/dist/runtime/editor/composables/defineViewOption.d.ts +5 -0
  196. package/dist/runtime/editor/composables/defineViewOption.js +10 -0
  197. package/dist/runtime/editor/composables/index.d.ts +3 -0
  198. package/dist/runtime/editor/composables/index.js +2 -0
  199. package/dist/runtime/editor/composables/useDismiss.d.ts +30 -0
  200. package/dist/runtime/editor/composables/useDismiss.js +43 -0
  201. package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +3 -3
  202. package/dist/runtime/editor/css/output.css +1 -1
  203. package/dist/runtime/editor/events/index.d.ts +23 -0
  204. package/dist/runtime/editor/features/add-list/Actions/index.vue +0 -1
  205. package/dist/runtime/editor/features/add-list/Blocks/index.vue +0 -1
  206. package/dist/runtime/editor/features/add-list/Help/Item.vue +2 -7
  207. package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
  208. package/dist/runtime/editor/features/add-list/index.vue +0 -2
  209. package/dist/runtime/editor/features/anchors/index.vue +11 -11
  210. package/dist/runtime/editor/features/anchors/types.d.ts +1 -0
  211. package/dist/runtime/editor/features/anchors/types.js +1 -0
  212. package/dist/runtime/editor/features/artboard/Renderer.vue +30 -28
  213. package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +0 -3
  214. package/dist/runtime/editor/features/block-scheduler/index.vue +0 -1
  215. package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +0 -4
  216. package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +0 -5
  217. package/dist/runtime/editor/features/changelog/changelog.json +16 -0
  218. package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -3
  219. package/dist/runtime/editor/features/command-palette/Palette/index.vue +0 -1
  220. package/dist/runtime/editor/features/comments/AddForm/index.vue +0 -1
  221. package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +0 -4
  222. package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +14 -0
  223. package/dist/runtime/editor/features/comments/Comment/index.vue +29 -8
  224. package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +14 -0
  225. package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +1 -1
  226. package/dist/runtime/editor/features/comments/CommentInput/index.vue +0 -3
  227. package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +1 -1
  228. package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +0 -1
  229. package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +16 -0
  230. package/dist/runtime/editor/features/comments/Sidebar/index.vue +13 -8
  231. package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +16 -0
  232. package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +0 -1
  233. package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +16 -0
  234. package/dist/runtime/editor/features/comments/Thread/index.vue +26 -6
  235. package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +16 -0
  236. package/dist/runtime/editor/features/comments/index.vue +28 -3
  237. package/dist/runtime/editor/features/delete/types.d.ts +1 -0
  238. package/dist/runtime/editor/features/delete/types.js +1 -0
  239. package/dist/runtime/editor/features/dev-mode/index.vue +17 -15
  240. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -0
  241. package/dist/runtime/editor/features/duplicate/types.d.ts +1 -0
  242. package/dist/runtime/editor/features/duplicate/types.js +1 -0
  243. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +0 -2
  244. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
  245. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +0 -5
  246. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +0 -5
  247. package/dist/runtime/editor/features/editable-mask/index.vue +21 -20
  248. package/dist/runtime/editor/features/entity-title/index.vue +0 -4
  249. package/dist/runtime/editor/features/fragments/Dialog/index.vue +0 -4
  250. package/dist/runtime/editor/features/grid/index.vue +16 -15
  251. package/dist/runtime/editor/features/grid/types.d.ts +1 -0
  252. package/dist/runtime/editor/features/grid/types.js +1 -0
  253. package/dist/runtime/editor/features/help/Dialog/index.d.vue.ts +7 -0
  254. package/dist/runtime/editor/features/help/Dialog/index.vue +57 -0
  255. package/dist/runtime/editor/features/help/Dialog/index.vue.d.ts +7 -0
  256. package/dist/runtime/editor/features/help/index.vue +52 -47
  257. package/dist/runtime/editor/features/history/List/index.vue +2 -9
  258. package/dist/runtime/editor/features/history/types.d.ts +1 -0
  259. package/dist/runtime/editor/features/history/types.js +1 -0
  260. package/dist/runtime/editor/features/notifications/Item/index.d.vue.ts +4 -0
  261. package/dist/runtime/editor/features/notifications/Item/index.vue +96 -0
  262. package/dist/runtime/editor/features/notifications/Item/index.vue.d.ts +4 -0
  263. package/dist/runtime/editor/features/notifications/List/index.d.vue.ts +11 -0
  264. package/dist/runtime/editor/features/notifications/List/index.vue +126 -0
  265. package/dist/runtime/editor/features/notifications/List/index.vue.d.ts +11 -0
  266. package/dist/runtime/editor/features/notifications/docs.md +12 -0
  267. package/dist/runtime/editor/features/notifications/index.d.vue.ts +3 -0
  268. package/dist/runtime/editor/features/notifications/index.vue +123 -0
  269. package/dist/runtime/editor/features/notifications/index.vue.d.ts +3 -0
  270. package/dist/runtime/editor/features/notifications/types.d.ts +132 -0
  271. package/dist/runtime/editor/features/notifications/types.js +20 -0
  272. package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -2
  273. package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +14 -4
  274. package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
  275. package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +0 -1
  276. package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +0 -1
  277. package/dist/runtime/editor/features/options/Form/Group.vue +3 -1
  278. package/dist/runtime/editor/features/options/Form/Item.vue +1 -2
  279. package/dist/runtime/editor/features/options/Form/Number/index.vue +9 -3
  280. package/dist/runtime/editor/features/options/Form/Radios/index.vue +3 -2
  281. package/dist/runtime/editor/features/options/Form/Range/index.vue +8 -2
  282. package/dist/runtime/editor/features/options/Form/Text/index.vue +6 -2
  283. package/dist/runtime/editor/features/options/index.vue +7 -1
  284. package/dist/runtime/editor/features/ownership/Banner/index.vue +3 -1
  285. package/dist/runtime/editor/features/ownership/types.d.ts +1 -0
  286. package/dist/runtime/editor/features/ownership/types.js +1 -0
  287. package/dist/runtime/editor/features/preview-grant/types.d.ts +1 -0
  288. package/dist/runtime/editor/features/preview-grant/types.js +1 -0
  289. package/dist/runtime/editor/features/proxy-view/index.vue +24 -21
  290. package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +0 -2
  291. package/dist/runtime/editor/features/publish/Dialog/index.vue +1 -2
  292. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +0 -1
  293. package/dist/runtime/editor/features/revert/types.d.ts +1 -0
  294. package/dist/runtime/editor/features/revert/types.js +1 -0
  295. package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +18 -8
  296. package/dist/runtime/editor/features/swap/types.d.ts +1 -0
  297. package/dist/runtime/editor/features/swap/types.js +1 -0
  298. package/dist/runtime/editor/features/translations/Banner/index.vue +4 -1
  299. package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +4 -1
  300. package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +7 -2
  301. package/dist/runtime/editor/plugins/BlockIndicator/index.vue +0 -2
  302. package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +4 -36
  303. package/dist/runtime/editor/plugins/ItemAction/index.vue +0 -1
  304. package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
  305. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
  306. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +2 -2
  307. package/dist/runtime/editor/plugins/Sidebar/index.vue +7 -50
  308. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
  309. package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +8 -2
  310. package/dist/runtime/editor/plugins/ToolbarButton/index.vue +122 -28
  311. package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +8 -2
  312. package/dist/runtime/editor/plugins/index.d.ts +1 -2
  313. package/dist/runtime/editor/plugins/index.js +1 -3
  314. package/dist/runtime/editor/providers/fieldValue.js +11 -13
  315. package/dist/runtime/editor/providers/plugin.d.ts +12 -0
  316. package/dist/runtime/editor/providers/plugin.js +9 -0
  317. package/dist/runtime/editor/translations/de.json +53 -19
  318. package/dist/runtime/editor/translations/fr.json +16 -4
  319. package/dist/runtime/editor/translations/gsw_CH.json +53 -19
  320. package/dist/runtime/editor/translations/it.json +16 -4
  321. package/package.json +6 -6
  322. package/dist/runtime/editor/plugins/ViewOption/index.d.vue.ts +0 -139
  323. package/dist/runtime/editor/plugins/ViewOption/index.vue +0 -99
  324. package/dist/runtime/editor/plugins/ViewOption/index.vue.d.ts +0 -139
@@ -5,12 +5,13 @@ import {
5
5
  requireBundlePermission,
6
6
  requireNoRestrictedAncestor
7
7
  } from "../../helpers/validation.js";
8
- const paramsSchema = z.object({
8
+ export const paramsSchema = z.object({
9
9
  uuid: z.string().describe("The paragraph UUID or entity UUID containing the media field"),
10
10
  field: z.string().describe("The content field name (reference type)"),
11
11
  mediaId: z.string().describe("The media item ID (from search_media results)"),
12
12
  mediaBundle: z.string().describe('The media bundle type (e.g., "image")')
13
13
  });
14
+ export const resultSchema = mutationResultSchema;
14
15
  export default defineBlokkliAgentTool({
15
16
  name: "replace_media_field",
16
17
  description: "Replace the media on an existing paragraph field. Use get_content_fields first to see available reference fields, then search_media to find media items.",
@@ -22,7 +23,7 @@ export default defineBlokkliAgentTool({
22
23
  return $t("aiAgentReplaceMediaRunning", "Replacing media", { more: true });
23
24
  },
24
25
  paramsSchema,
25
- resultSchema: mutationResultSchema,
26
+ resultSchema,
26
27
  requiredAdapterMethods: ["mediaLibraryReplaceMedia"],
27
28
  execute(ctx, params) {
28
29
  const { blocks, types, $t, context } = ctx.app;
@@ -60,6 +60,18 @@ export declare const mutationResultSchema: z.ZodUnion<readonly [z.ZodObject<{
60
60
  * a single string is accepted as a fallback.
61
61
  */
62
62
  export declare function stringArrayParam(description: string): z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>;
63
+ /**
64
+ * Wraps an object params schema to tolerate a singular key when the schema
65
+ * actually expects its plural form (e.g. `uuid` → `uuids`). LLMs — especially
66
+ * the smaller models — frequently pick the singular form when a tool
67
+ * description mentions both ("one or more UUIDs"). Without this, the call
68
+ * fails validation and the model often retries with the same wrong key.
69
+ *
70
+ * The generated JSON Schema is unchanged (the wrapping happens via
71
+ * `z.preprocess`), so the model is still guided to the plural form; the
72
+ * singular form is silently accepted as a fallback.
73
+ */
74
+ export declare function tolerantSingularKeys<T extends z.ZodType>(schema: T, aliases: Record<string, string>): z.ZodPipe<z.ZodTransform<unknown, unknown>, T>;
63
75
  /**
64
76
  * Shared schema for option values (used by add_blocks and set_block_options).
65
77
  */
@@ -88,16 +100,23 @@ export declare const fieldDiffResultSchema: z.ZodObject<{
88
100
  agentMessage: z.ZodOptional<z.ZodString>;
89
101
  historyIndex: z.ZodOptional<z.ZodNumber>;
90
102
  }, z.core.$strip>;
103
+ /**
104
+ * Schema for a single entry in a mutation's `newParagraphs` payload. Recursive
105
+ * so nested children appear under their parent's `children` keyed by paragraph
106
+ * field name — mirroring the input shape of `add_paragraphs`.
107
+ */
108
+ type NewParagraphEntry = {
109
+ uuid: string;
110
+ bundle: string;
111
+ paragraphFields?: string[];
112
+ children?: Record<string, NewParagraphEntry[]>;
113
+ };
91
114
  /**
92
115
  * Schema for the success result sent back to the AI after mutation is applied.
93
116
  */
94
117
  export declare const mutationSuccessSchema: z.ZodUnion<readonly [z.ZodObject<{
95
118
  success: z.ZodLiteral<true>;
96
- newParagraphs: z.ZodOptional<z.ZodArray<z.ZodObject<{
97
- uuid: z.ZodString;
98
- bundle: z.ZodString;
99
- paragraphFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
100
- }, z.core.$strip>>>;
119
+ newParagraphs: z.ZodOptional<z.ZodArray<z.ZodType<NewParagraphEntry, unknown, z.core.$ZodTypeInternals<NewParagraphEntry, unknown>>>>;
101
120
  historyIndex: z.ZodNumber;
102
121
  }, z.core.$strip>, z.ZodObject<{
103
122
  success: z.ZodLiteral<false>;
@@ -105,3 +124,4 @@ export declare const mutationSuccessSchema: z.ZodUnion<readonly [z.ZodObject<{
105
124
  }, z.core.$strip>, z.ZodObject<{
106
125
  error: z.ZodString;
107
126
  }, z.core.$strip>]>;
127
+ export {};
@@ -39,6 +39,26 @@ export function stringArrayParam(description) {
39
39
  z.array(z.string()).describe(description)
40
40
  );
41
41
  }
42
+ export function tolerantSingularKeys(schema, aliases) {
43
+ return z.preprocess((value) => {
44
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
45
+ return value;
46
+ }
47
+ const obj = value;
48
+ const remapped = {};
49
+ let touched = false;
50
+ for (const key of Object.keys(obj)) {
51
+ const plural = aliases[key];
52
+ if (plural && !(plural in obj)) {
53
+ remapped[plural] = obj[key];
54
+ touched = true;
55
+ } else {
56
+ remapped[key] = obj[key];
57
+ }
58
+ }
59
+ return touched ? remapped : obj;
60
+ }, schema);
61
+ }
42
62
  export const optionValueSchema = z.union([
43
63
  z.string(),
44
64
  z.boolean(),
@@ -69,19 +89,26 @@ export const fieldDiffResultSchema = z.object({
69
89
  ),
70
90
  historyIndex: z.number().optional().describe("The mutation history index after applying changes")
71
91
  });
92
+ const newParagraphEntrySchema = z.lazy(
93
+ () => z.object({
94
+ uuid: z.string(),
95
+ bundle: z.string(),
96
+ paragraphFields: z.array(z.string()).optional().describe(
97
+ "Paragraph fields on this new paragraph that can hold nested paragraphs. Call get_child_paragraphs with this paragraph's UUID to add paragraphs to these fields."
98
+ ),
99
+ children: z.record(
100
+ z.string().describe("Paragraph field name"),
101
+ z.array(newParagraphEntrySchema)
102
+ ).optional().describe(
103
+ "Nested paragraphs created inside this entry, keyed by paragraph field name. Mirrors the `children` shape used by add_paragraphs \u2014 the structure round-trips, so a child here means it actually landed inside this parent."
104
+ )
105
+ })
106
+ );
72
107
  export const mutationSuccessSchema = z.union([
73
108
  z.object({
74
109
  success: z.literal(true),
75
- newParagraphs: z.array(
76
- z.object({
77
- uuid: z.string(),
78
- bundle: z.string(),
79
- paragraphFields: z.array(z.string()).optional().describe(
80
- "Paragraph fields on this new paragraph that can hold nested paragraphs. Call get_child_paragraphs with this paragraph's UUID to add paragraphs to these fields."
81
- )
82
- })
83
- ).optional().describe(
84
- "Paragraphs created by this mutation (for add/duplicate operations), with their UUIDs and bundle types"
110
+ newParagraphs: z.array(newParagraphEntrySchema).optional().describe(
111
+ "Top-level paragraphs created by this mutation (for add/duplicate operations). Nested children appear under each entry's `children` keyed by paragraph field name; the tree mirrors what was requested."
85
112
  ),
86
113
  historyIndex: z.number().describe("Current position in mutation history (-1 = pristine)")
87
114
  }),
@@ -1,2 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ tab: z.ZodString;
4
+ query: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const resultSchema: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodString;
8
+ title: z.ZodString;
9
+ entityType: z.ZodString;
10
+ entityBundle: z.ZodString;
11
+ targetBundles: z.ZodArray<z.ZodString>;
12
+ context: z.ZodOptional<z.ZodString>;
13
+ text: z.ZodOptional<z.ZodString>;
14
+ imageUrl: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>>;
1
16
  declare const _default: any;
2
17
  export default _default;
@@ -1,6 +1,12 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
- const resultSchema = z.array(
3
+ export const paramsSchema = z.object({
4
+ tab: z.string().describe(
5
+ "The tab ID to search in. See the system prompt for available tab IDs."
6
+ ),
7
+ query: z.string().describe("The search query")
8
+ });
9
+ export const resultSchema = z.array(
4
10
  z.object({
5
11
  id: z.string().describe("The unique ID of the content item"),
6
12
  title: z.string().describe("The display title of the content item"),
@@ -24,12 +30,7 @@ export default defineBlokkliAgentTool({
24
30
  more: true
25
31
  });
26
32
  },
27
- paramsSchema: z.object({
28
- tab: z.string().describe(
29
- "The tab ID to search in. See the system prompt for available tab IDs."
30
- ),
31
- query: z.string().describe("The search query")
32
- }),
33
+ paramsSchema,
33
34
  resultSchema,
34
35
  async execute(ctx, params) {
35
36
  const tabs = await ctx.adapter.getContentSearchTabs();
@@ -1,5 +1,9 @@
1
1
  import { z } from 'zod';
2
- declare const resultSchema: z.ZodObject<{
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ query: z.ZodOptional<z.ZodString>;
4
+ bundle: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ export declare const resultSchema: z.ZodObject<{
3
7
  items: z.ZodArray<z.ZodObject<{
4
8
  mediaId: z.ZodString;
5
9
  label: z.ZodString;
@@ -1,12 +1,12 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
- const paramsSchema = z.object({
3
+ export const paramsSchema = z.object({
4
4
  query: z.string().optional().describe(
5
- "Search text to filter media items. Omit or leave empty to list all available media."
5
+ 'Search text to filter media items. Searching for "foobar test" will search the exact full string, so prefer searching single for words.'
6
6
  ),
7
7
  bundle: z.string().optional().describe('Media bundle filter (e.g., "image", "video")')
8
8
  });
9
- const resultSchema = z.object({
9
+ export const resultSchema = z.object({
10
10
  items: z.array(
11
11
  z.object({
12
12
  mediaId: z.string().describe("The unique ID of the media item"),
@@ -1,2 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ parent: z.ZodOptional<z.ZodObject<{
4
+ type: z.ZodString;
5
+ uuid: z.ZodString;
6
+ field: z.ZodString;
7
+ }, z.core.$strip>>;
8
+ }, z.core.$strip>;
9
+ export declare const resultSchema: z.ZodObject<{
10
+ items: z.ZodArray<z.ZodObject<{
11
+ uuid: z.ZodString;
12
+ label: z.ZodString;
13
+ bundle: z.ZodString;
14
+ }, z.core.$strip>>;
15
+ total: z.ZodNumber;
16
+ }, z.core.$strip>;
1
17
  declare const _default: any;
2
18
  export default _default;
@@ -3,7 +3,7 @@ import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
3
  import { parentSchema } from "../schemas.js";
4
4
  import { fromLibraryBlockBundle } from "#blokkli-build/config";
5
5
  import { resolveHost } from "../helpers.js";
6
- const paramsSchema = z.object({
6
+ export const paramsSchema = z.object({
7
7
  parent: parentSchema.optional().describe(
8
8
  "The parent entity where a reusable paragraph would be added. When provided, results are filtered to only include bundles allowed in this field."
9
9
  )
@@ -13,7 +13,7 @@ const reusableParagraphSchema = z.object({
13
13
  label: z.string().describe("The display label"),
14
14
  bundle: z.string().describe("The paragraph bundle type of the reusable paragraph")
15
15
  });
16
- const resultSchema = z.object({
16
+ export const resultSchema = z.object({
17
17
  items: z.array(reusableParagraphSchema).describe("Matching reusable paragraphs"),
18
18
  total: z.number().describe("Total number of matching reusable paragraphs")
19
19
  });
@@ -1,2 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ query: z.ZodOptional<z.ZodString>;
4
+ }, z.core.$strip>;
5
+ export declare const resultSchema: z.ZodObject<{
6
+ templates: z.ZodArray<z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ label: z.ZodString;
9
+ description: z.ZodOptional<z.ZodString>;
10
+ itemBundles: z.ZodArray<z.ZodString>;
11
+ }, z.core.$strip>>;
12
+ total: z.ZodNumber;
13
+ }, z.core.$strip>;
1
14
  declare const _default: any;
2
15
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
- const paramsSchema = z.object({
3
+ export const paramsSchema = z.object({
4
4
  query: z.string().optional().describe("Search text to filter templates")
5
5
  });
6
6
  const templateSchema = z.object({
@@ -9,7 +9,7 @@ const templateSchema = z.object({
9
9
  description: z.string().optional().describe("A short description of the template"),
10
10
  itemBundles: z.array(z.string()).describe("Paragraph types contained in the template")
11
11
  });
12
- const resultSchema = z.object({
12
+ export const resultSchema = z.object({
13
13
  templates: z.array(templateSchema).describe("Matching templates"),
14
14
  total: z.number().describe("Total number of matching templates")
15
15
  });
@@ -1,2 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ query: z.ZodString;
4
+ bundle: z.ZodOptional<z.ZodString>;
5
+ limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
6
+ }, z.core.$strip>;
7
+ export declare const resultSchema: z.ZodObject<{
8
+ matches: z.ZodArray<z.ZodObject<{
9
+ uuid: z.ZodString;
10
+ bundle: z.ZodString;
11
+ matchedText: z.ZodString;
12
+ matchCount: z.ZodNumber;
13
+ }, z.core.$strip>>;
14
+ totalMatches: z.ZodNumber;
15
+ }, z.core.$strip>;
1
16
  declare const _default: any;
2
17
  export default _default;
@@ -1,13 +1,13 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
- const paramsSchema = z.object({
3
+ export const paramsSchema = z.object({
4
4
  query: z.string().describe(
5
5
  'The text to search for. For regex, use JavaScript regex literal format: /pattern/flags (e.g., "/hello|world/gi" to match either word case-insensitively). Plain text is matched case-insensitively by default.'
6
6
  ),
7
7
  bundle: z.string().optional().describe("Optional: only search in paragraphs of this bundle type"),
8
8
  limit: z.coerce.number().optional().default(20).describe("Maximum number of results to return (default: 20)")
9
9
  });
10
- const resultSchema = z.object({
10
+ export const resultSchema = z.object({
11
11
  matches: z.array(
12
12
  z.object({
13
13
  uuid: z.string().describe("The paragraph UUID"),
@@ -14,7 +14,7 @@
14
14
  @click="selectedId = item.mediaId"
15
15
  >
16
16
  <div
17
- class="_bk_w-40 _bk_h-40 _bk_bg-mono-100 _bk_rounded _bk_overflow-hidden _bk_shrink-0 _bk_flex _bk_items-center _bk_justify-center"
17
+ class="_bk_size-100 _bk_bg-mono-100 _bk_rounded _bk_overflow-hidden _bk_shrink-0 _bk_flex _bk_items-center _bk_justify-center"
18
18
  :class="{
19
19
  '_bk_outline _bk_outline-accent-700 _bk_relative _bk_z-40': selectedId === item.mediaId
20
20
  }"
@@ -5,7 +5,7 @@ declare const mediaItemSchema: z.ZodObject<{
5
5
  mediaBundle: z.ZodString;
6
6
  thumbnail: z.ZodOptional<z.ZodString>;
7
7
  }, z.core.$strip>;
8
- declare const paramsSchema: z.ZodObject<{
8
+ export declare const paramsSchema: z.ZodObject<{
9
9
  items: z.ZodArray<z.ZodObject<{
10
10
  mediaId: z.ZodString;
11
11
  label: z.ZodString;
@@ -14,7 +14,7 @@ declare const paramsSchema: z.ZodObject<{
14
14
  }, z.core.$strip>>;
15
15
  prompt: z.ZodOptional<z.ZodString>;
16
16
  }, z.core.$strip>;
17
- declare const resultSchema: z.ZodObject<{
17
+ export declare const resultSchema: z.ZodObject<{
18
18
  selected: z.ZodNullable<z.ZodObject<{
19
19
  mediaId: z.ZodString;
20
20
  label: z.ZodString;
@@ -7,11 +7,11 @@ const mediaItemSchema = z.object({
7
7
  mediaBundle: z.string().describe('The media type (e.g., "image", "video")'),
8
8
  thumbnail: z.string().optional().describe("URL of the thumbnail image")
9
9
  });
10
- const paramsSchema = z.object({
10
+ export const paramsSchema = z.object({
11
11
  items: z.array(mediaItemSchema).describe("Media items from search_media to display for selection"),
12
12
  prompt: z.string().optional().describe("Optional message to show the user explaining what to select")
13
13
  });
14
- const resultSchema = z.object({
14
+ export const resultSchema = z.object({
15
15
  selected: mediaItemSchema.nullable().describe("The selected media item, or null if the user cancelled"),
16
16
  label: z.string().optional().describe("Human-readable label of the prompt (for UI display)")
17
17
  });
@@ -1,2 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ paragraphs: z.ZodArray<z.ZodObject<{
4
+ uuid: z.ZodString;
5
+ options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>>;
6
+ }, z.core.$strip>>;
7
+ }, z.core.$strip>;
8
+ export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
9
+ type: z.ZodEnum<{
10
+ rewrite: "rewrite";
11
+ delete: "delete";
12
+ add: "add";
13
+ move: "move";
14
+ options: "options";
15
+ }>;
16
+ label: z.ZodString;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ error: z.ZodString;
19
+ }, z.core.$strip>]>;
1
20
  declare const _default: any;
2
21
  export default _default;
@@ -12,9 +12,10 @@ const paragraphOptionsSchema = z.object({
12
12
  uuid: z.string().describe("The paragraph UUID"),
13
13
  options: z.record(z.string(), optionValueSchema).describe("Options to set as key-value pairs")
14
14
  });
15
- const paramsSchema = z.object({
15
+ export const paramsSchema = z.object({
16
16
  paragraphs: z.array(paragraphOptionsSchema).describe("Array of paragraphs with their options to set")
17
17
  });
18
+ export const resultSchema = mutationResultSchema;
18
19
  export default defineBlokkliAgentTool({
19
20
  name: "set_paragraph_options",
20
21
  description: "Set options on one or more paragraphs. Each paragraph entry contains a UUID and an options object with key-value pairs.",
@@ -28,7 +29,7 @@ export default defineBlokkliAgentTool({
28
29
  },
29
30
  lazy: true,
30
31
  paramsSchema,
31
- resultSchema: mutationResultSchema,
32
+ resultSchema,
32
33
  requiredAdapterMethods: ["updateOptions"],
33
34
  execute(ctx, params) {
34
35
  const { blocks, selection } = ctx.app;
@@ -1,2 +1,19 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ uuid1: z.ZodString;
4
+ uuid2: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const resultSchema: z.ZodUnion<readonly [z.ZodObject<{
7
+ type: z.ZodEnum<{
8
+ rewrite: "rewrite";
9
+ delete: "delete";
10
+ add: "add";
11
+ move: "move";
12
+ options: "options";
13
+ }>;
14
+ label: z.ZodString;
15
+ }, z.core.$strip>, z.ZodObject<{
16
+ error: z.ZodString;
17
+ }, z.core.$strip>]>;
1
18
  declare const _default: any;
2
19
  export default _default;
@@ -2,10 +2,11 @@ import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
3
  import { mutationResultSchema } from "../schemas.js";
4
4
  import { getSwapDisabledReason } from "#blokkli/editor/helpers/swap";
5
- const paramsSchema = z.object({
5
+ export const paramsSchema = z.object({
6
6
  uuid1: z.string().describe("First paragraph UUID"),
7
7
  uuid2: z.string().describe("Second paragraph UUID")
8
8
  });
9
+ export const resultSchema = mutationResultSchema;
9
10
  export default defineBlokkliAgentTool({
10
11
  name: "swap_paragraphs",
11
12
  description: "Swap the positions of two paragraphs, either in the same field or different fields.",
@@ -17,7 +18,7 @@ export default defineBlokkliAgentTool({
17
18
  },
18
19
  lazy: true,
19
20
  paramsSchema,
20
- resultSchema: mutationResultSchema,
21
+ resultSchema,
21
22
  requiredAdapterMethods: ["swapBlocks"],
22
23
  execute(ctx, params) {
23
24
  const { blocks, types, $t, permissions } = ctx.app;
@@ -6,14 +6,14 @@ declare const operationSchema: z.ZodObject<{
6
6
  fieldName: z.ZodString;
7
7
  search: z.ZodString;
8
8
  replace: z.ZodString;
9
- selector: any;
9
+ selector: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
10
10
  }, z.core.$strip>;
11
11
  declare const updateSchema: z.ZodObject<{
12
12
  uuid: z.ZodString;
13
13
  fieldName: z.ZodString;
14
14
  value: z.ZodString;
15
15
  }, z.core.$strip>;
16
- declare const paramsSchema: z.ZodObject<{
16
+ export declare const paramsSchema: z.ZodObject<{
17
17
  updates: z.ZodOptional<z.ZodArray<z.ZodObject<{
18
18
  uuid: z.ZodString;
19
19
  fieldName: z.ZodString;
@@ -24,9 +24,9 @@ declare const paramsSchema: z.ZodObject<{
24
24
  fieldName: z.ZodString;
25
25
  search: z.ZodString;
26
26
  replace: z.ZodString;
27
- selector: any;
27
+ selector: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
28
28
  }, z.core.$strip>>>;
29
- requireApproval: any;
29
+ requireApproval: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
30
30
  }, z.core.$strip>;
31
31
  export type BatchRewriteParams = z.infer<typeof paramsSchema>;
32
32
  export type BatchRewriteResult = z.infer<typeof fieldDiffResultSchema>;
@@ -42,5 +42,14 @@ export type ComponentParams = {
42
42
  requireApproval?: boolean;
43
43
  skipped: SkippedField[];
44
44
  };
45
+ export declare const resultSchema: z.ZodObject<{
46
+ acceptedCount: z.ZodNumber;
47
+ rejectedByUser: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
48
+ reasonForRejection: z.ZodString;
49
+ }, z.core.$strip>>>;
50
+ label: z.ZodString;
51
+ agentMessage: z.ZodOptional<z.ZodString>;
52
+ historyIndex: z.ZodOptional<z.ZodNumber>;
53
+ }, z.core.$strip>;
45
54
  declare const _default: any;
46
55
  export default _default;
@@ -6,7 +6,7 @@ import {
6
6
  } from "../../helpers/validation.js";
7
7
  import { onlyUnique } from "#blokkli/helpers";
8
8
  import { fieldDiffResultSchema } from "../schemas.js";
9
- import { booleanParam } from "#blokkli/agent/shared/toolParams";
9
+ import { optionalBooleanParam } from "../../../shared/toolParams.js";
10
10
  import { resolveHost } from "../helpers.js";
11
11
  import { skippedFieldsMessage } from "../fieldDiffApproval.js";
12
12
  import Component from "./Component.vue";
@@ -20,26 +20,27 @@ const operationSchema = z.object({
20
20
  replace: z.string().describe(
21
21
  "The replacement text (or innerHTML when search is a CSS selector)"
22
22
  ),
23
- selector: booleanParam(
23
+ selector: optionalBooleanParam(
24
24
  "Set to true when search is a CSS selector instead of a text search"
25
- ).optional()
25
+ )
26
26
  });
27
27
  const updateSchema = z.object({
28
28
  uuid: z.string().describe("The paragraph UUID"),
29
29
  fieldName: z.string().describe("The editable field name"),
30
30
  value: z.string().describe("The complete new field value \u2014 overwrites the entire field")
31
31
  });
32
- const paramsSchema = z.object({
32
+ export const paramsSchema = z.object({
33
33
  updates: z.array(updateSchema).optional().describe(
34
34
  "Full-replacement mode: a list of { uuid, fieldName, value } entries. Each overwrites the entire field with the given value. Use when the value changes substantially or you already have the final text."
35
35
  ),
36
36
  operations: z.array(operationSchema).optional().describe(
37
37
  "Patch mode: search/replace operations applied to each field's CURRENT value, so `search` must match the existing content exactly. Best for small targeted edits like typo fixes \u2014 avoids re-sending the whole value. If `search` is not found, that field is left unchanged."
38
38
  ),
39
- requireApproval: booleanParam(
39
+ requireApproval: optionalBooleanParam(
40
40
  "The approval UI is shown by default. Set to false to apply the changes immediately without confirmation \u2014 only when the user supplied the exact text themselves."
41
- ).optional()
41
+ )
42
42
  });
43
+ export const resultSchema = fieldDiffResultSchema;
43
44
  export default defineBlokkliAgentTool({
44
45
  name: "update_text_fields",
45
46
  description: "Update text content fields on one or more paragraphs. Two modes, which may be combined in a single call:\n- Full replacement via `updates`: a list of { uuid, fieldName, value } entries, each overwriting the entire field with a complete new value. Use when the value changes substantially or you already have the final text.\n- Patch via `operations`: search/replace pairs applied to each field's CURRENT value (so `search` must match the existing content). Best for small edits like typo fixes, since you only send the changed part. Set `selector: true` on an operation to treat `search` as a CSS selector (e.g. \"p:nth-child(3)\") and `replace` as the matched element's innerHTML.\nThe approval UI is shown by default; set requireApproval to false to apply immediately (only when the user supplied the exact text).",
@@ -53,7 +54,7 @@ export default defineBlokkliAgentTool({
53
54
  });
54
55
  },
55
56
  paramsSchema,
56
- resultSchema: fieldDiffResultSchema,
57
+ resultSchema,
57
58
  requiredAdapterMethods: ["updateFieldValueBatched"],
58
59
  component: Component,
59
60
  detailsComponent: DetailsComponent,
@@ -1,2 +1,19 @@
1
+ import { z } from 'zod';
2
+ export declare const paramsSchema: z.ZodObject<{
3
+ url: z.ZodString;
4
+ format: z.ZodDefault<z.ZodEnum<{
5
+ markdown: "markdown";
6
+ html: "html";
7
+ }>>;
8
+ }, z.core.$strip>;
9
+ export declare const resultSchema: z.ZodObject<{
10
+ content: z.ZodString;
11
+ title: z.ZodString;
12
+ format: z.ZodEnum<{
13
+ markdown: "markdown";
14
+ html: "html";
15
+ }>;
16
+ url: z.ZodString;
17
+ }, z.core.$strip>;
1
18
  declare const _default: any;
2
19
  export default _default;
@@ -1,13 +1,13 @@
1
1
  import { z } from "zod";
2
2
  import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
3
3
  import { routeFetch } from "#blokkli-build/agent-client";
4
- const paramsSchema = z.object({
4
+ export const paramsSchema = z.object({
5
5
  url: z.string().url().describe("The URL to fetch content from"),
6
6
  format: z.enum(["markdown", "html"]).default("markdown").describe(
7
7
  'Output format: "markdown" (default) converts HTML to readable Markdown preserving structure, "html" returns cleaned raw HTML'
8
8
  )
9
9
  });
10
- const resultSchema = z.object({
10
+ export const resultSchema = z.object({
11
11
  content: z.string().describe("The page content in the requested format (markdown or html)"),
12
12
  title: z.string().describe("The page title"),
13
13
  format: z.enum(["markdown", "html"]).describe("The format of the content"),
@@ -1,11 +1,12 @@
1
1
  import type { BlokkliApp } from '#blokkli/editor/types/app';
2
2
  import type { FullBlokkliAdapter, MutationResponseLike, AdapterMethods } from '#blokkli/editor/adapter';
3
3
  import type { EditMode } from '#blokkli/editor/types/state';
4
- import { type UsageTurn } from '#blokkli/agent/shared/types';
4
+ import { type SelectedBlock, type UsageTurn } from '#blokkli/agent/shared/types';
5
5
  import { z } from 'zod';
6
6
  import type { Component } from 'vue';
7
7
  import type { AgentToolName, AgentSkillName, AgentToolMap } from '#blokkli-build/agent-client';
8
8
  import type { TextProvider } from '#blokkli/editor/providers/texts';
9
+ import type { NewParagraphNode } from '#blokkli/agent/app/helpers/mutationResult';
9
10
  /**
10
11
  * A host entity (parent of a block).
11
12
  * Used consistently across tools for specifying block locations.
@@ -23,11 +24,7 @@ export type McpToolCategory = 'query' | 'mutation';
23
24
  export type MutationToolResult = {
24
25
  success: true;
25
26
  historyIndex: number;
26
- newParagraphs?: Array<{
27
- uuid: string;
28
- bundle: string;
29
- paragraphFields?: string[];
30
- }>;
27
+ newParagraphs?: NewParagraphNode[];
31
28
  } | {
32
29
  success: false;
33
30
  rejected?: true;
@@ -312,7 +309,7 @@ export type AgentPromptDefinition = {
312
309
  */
313
310
  preExecute?: (ctx: {
314
311
  app: BlokkliApp;
315
- selectedUuids: string[];
312
+ selectedBlocks: SelectedBlock[];
316
313
  runTool: <T extends AgentToolName>(toolName: T, params: AgentToolMap[T]['params']) => Promise<PreSeededToolResult & {
317
314
  result: AgentToolMap[T]['result'];
318
315
  }>;
@@ -365,7 +362,7 @@ declare const userConversationItemSchema: z.ZodObject<{
365
362
  sendContext: z.ZodOptional<z.ZodObject<{
366
363
  promptId: z.ZodOptional<z.ZodString>;
367
364
  serverPrompt: z.ZodOptional<z.ZodString>;
368
- selectedUuids: z.ZodOptional<z.ZodArray<z.ZodString>>;
365
+ selectedBlocks: z.ZodOptional<z.ZodArray<any>>;
369
366
  autoLoadTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
370
367
  autoLoadSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
371
368
  preSeededResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -470,7 +467,7 @@ export declare const conversationItemSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
470
467
  sendContext: z.ZodOptional<z.ZodObject<{
471
468
  promptId: z.ZodOptional<z.ZodString>;
472
469
  serverPrompt: z.ZodOptional<z.ZodString>;
473
- selectedUuids: z.ZodOptional<z.ZodArray<z.ZodString>>;
470
+ selectedBlocks: z.ZodOptional<z.ZodArray<any>>;
474
471
  autoLoadTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
475
472
  autoLoadSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
476
473
  preSeededResults: z.ZodOptional<z.ZodArray<z.ZodObject<{