@blokkli/editor 2.0.0-alpha.32 → 2.0.0-alpha.34

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 (473) hide show
  1. package/dist/global/constants/index.d.ts +1 -0
  2. package/dist/global/constants/index.js +1 -0
  3. package/dist/global/types/features.d.ts +4 -0
  4. package/dist/module.d.mts +5 -27
  5. package/dist/module.json +1 -1
  6. package/dist/module.mjs +430 -10823
  7. package/dist/modules/agent/index.d.mts +64 -0
  8. package/dist/modules/agent/index.mjs +407 -0
  9. package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +55 -0
  10. package/dist/modules/agent/runtime/app/composables/agentProvider.js +875 -0
  11. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentPrompt.d.ts +32 -0
  12. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentPrompt.js +6 -0
  13. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.d.ts +65 -0
  14. package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.js +6 -0
  15. package/dist/modules/agent/runtime/app/composables/index.d.ts +4 -0
  16. package/dist/modules/agent/runtime/app/composables/index.js +2 -0
  17. package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.d.vue.ts +12 -0
  18. package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.vue +62 -0
  19. package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.vue.d.ts +12 -0
  20. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.d.vue.ts +9 -0
  21. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +38 -0
  22. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue.d.ts +9 -0
  23. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.d.vue.ts +14 -0
  24. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.vue +68 -0
  25. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.vue.d.ts +14 -0
  26. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.d.vue.ts +10 -0
  27. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.vue +72 -0
  28. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.vue.d.ts +10 -0
  29. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.d.vue.ts +13 -0
  30. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.vue +37 -0
  31. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.vue.d.ts +13 -0
  32. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.d.vue.ts +8 -0
  33. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.vue +17 -0
  34. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.vue.d.ts +8 -0
  35. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.d.vue.ts +11 -0
  36. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +29 -0
  37. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue.d.ts +11 -0
  38. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.d.vue.ts +12 -0
  39. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.vue +30 -0
  40. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.vue.d.ts +12 -0
  41. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.d.vue.ts +3 -0
  42. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.vue +14 -0
  43. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.vue.d.ts +3 -0
  44. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.d.vue.ts +13 -0
  45. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.vue +46 -0
  46. package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.vue.d.ts +13 -0
  47. package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.d.vue.ts +15 -0
  48. package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue +50 -0
  49. package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue.d.ts +15 -0
  50. package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.d.vue.ts +3 -0
  51. package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +160 -0
  52. package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue.d.ts +3 -0
  53. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.d.vue.ts +12 -0
  54. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.vue +15 -0
  55. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.vue.d.ts +12 -0
  56. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.d.vue.ts +7 -0
  57. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue +67 -0
  58. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue.d.ts +7 -0
  59. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.d.vue.ts +23 -0
  60. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +109 -0
  61. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue.d.ts +23 -0
  62. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.d.vue.ts +45 -0
  63. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +120 -0
  64. package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue.d.ts +45 -0
  65. package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.d.vue.ts +15 -0
  66. package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.vue +47 -0
  67. package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.vue.d.ts +15 -0
  68. package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.d.vue.ts +14 -0
  69. package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.vue +55 -0
  70. package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.vue.d.ts +14 -0
  71. package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.d.vue.ts +25 -0
  72. package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue +36 -0
  73. package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue.d.ts +25 -0
  74. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/de.md +19 -0
  75. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/en.md +18 -0
  76. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.d.vue.ts +10 -0
  77. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue +44 -0
  78. package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue.d.ts +10 -0
  79. package/dist/modules/agent/runtime/app/features/agent/Panel/index.d.vue.ts +58 -0
  80. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +274 -0
  81. package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue.d.ts +58 -0
  82. package/dist/modules/agent/runtime/app/features/agent/index.d.vue.ts +3 -0
  83. package/dist/modules/agent/runtime/app/features/agent/index.vue +162 -0
  84. package/dist/modules/agent/runtime/app/features/agent/index.vue.d.ts +3 -0
  85. package/dist/modules/agent/runtime/app/features/agent/types.d.ts +58 -0
  86. package/dist/modules/agent/runtime/app/features/agent/types.js +0 -0
  87. package/dist/modules/agent/runtime/app/helpers/index.d.ts +55 -0
  88. package/dist/modules/agent/runtime/app/helpers/index.js +88 -0
  89. package/dist/modules/agent/runtime/app/helpers/pageStructure.d.ts +5 -0
  90. package/dist/modules/agent/runtime/app/helpers/pageStructure.js +106 -0
  91. package/dist/modules/agent/runtime/app/helpers/validation.d.ts +35 -0
  92. package/dist/modules/agent/runtime/app/helpers/validation.js +77 -0
  93. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.d.ts +2 -0
  94. package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +69 -0
  95. package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +2 -0
  96. package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +83 -0
  97. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +2 -0
  98. package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +62 -0
  99. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +2 -0
  100. package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +289 -0
  101. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +2 -0
  102. package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +76 -0
  103. package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +2 -0
  104. package/dist/modules/agent/runtime/app/tools/add_template/index.js +58 -0
  105. package/dist/modules/agent/runtime/app/tools/ask_question/Component.d.vue.ts +19 -0
  106. package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue +113 -0
  107. package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue.d.ts +19 -0
  108. package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +17 -0
  109. package/dist/modules/agent/runtime/app/tools/ask_question/index.js +54 -0
  110. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.d.vue.ts +29 -0
  111. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.vue +190 -0
  112. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.vue.d.ts +29 -0
  113. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.d.vue.ts +20 -0
  114. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.vue +90 -0
  115. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.vue.d.ts +20 -0
  116. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/index.d.ts +18 -0
  117. package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/index.js +55 -0
  118. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +2 -0
  119. package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +47 -0
  120. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +2 -0
  121. package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +47 -0
  122. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +2 -0
  123. package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +144 -0
  124. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +2 -0
  125. package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +180 -0
  126. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +2 -0
  127. package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +33 -0
  128. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +2 -0
  129. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +93 -0
  130. package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.d.ts +2 -0
  131. package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +104 -0
  132. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +2 -0
  133. package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +108 -0
  134. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +2 -0
  135. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +192 -0
  136. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +2 -0
  137. package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +102 -0
  138. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +2 -0
  139. package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +113 -0
  140. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +2 -0
  141. package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +275 -0
  142. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +2 -0
  143. package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +63 -0
  144. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +2 -0
  145. package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +180 -0
  146. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +2 -0
  147. package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +46 -0
  148. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +2 -0
  149. package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +54 -0
  150. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +2 -0
  151. package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +69 -0
  152. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +2 -0
  153. package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +95 -0
  154. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +2 -0
  155. package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +80 -0
  156. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +2 -0
  157. package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +85 -0
  158. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +128 -0
  159. package/dist/modules/agent/runtime/app/tools/schemas.js +242 -0
  160. package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +2 -0
  161. package/dist/modules/agent/runtime/app/tools/search_content/index.js +65 -0
  162. package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +14 -0
  163. package/dist/modules/agent/runtime/app/tools/search_media/index.js +60 -0
  164. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +2 -0
  165. package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +75 -0
  166. package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +2 -0
  167. package/dist/modules/agent/runtime/app/tools/search_templates/index.js +51 -0
  168. package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +2 -0
  169. package/dist/modules/agent/runtime/app/tools/search_text/index.js +114 -0
  170. package/dist/modules/agent/runtime/app/tools/select_media/Component.d.vue.ts +29 -0
  171. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +70 -0
  172. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue.d.ts +29 -0
  173. package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +30 -0
  174. package/dist/modules/agent/runtime/app/tools/select_media/index.js +74 -0
  175. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +2 -0
  176. package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +109 -0
  177. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +2 -0
  178. package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +74 -0
  179. package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +2 -0
  180. package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +51 -0
  181. package/dist/modules/agent/runtime/app/types/index.d.ts +440 -0
  182. package/dist/modules/agent/runtime/app/types/index.js +51 -0
  183. package/dist/modules/agent/runtime/server/Session.d.ts +94 -0
  184. package/dist/modules/agent/runtime/server/Session.js +734 -0
  185. package/dist/modules/agent/runtime/server/SessionManager.d.ts +21 -0
  186. package/dist/modules/agent/runtime/server/SessionManager.js +80 -0
  187. package/dist/modules/agent/runtime/server/agent.d.ts +2 -0
  188. package/dist/modules/agent/runtime/server/agent.js +148 -0
  189. package/dist/modules/agent/runtime/server/agentPrompt.d.ts +22 -0
  190. package/dist/modules/agent/runtime/server/agentPrompt.js +53 -0
  191. package/dist/modules/agent/runtime/server/default-skills/adding-new-paragraphs.d.ts +2 -0
  192. package/dist/modules/agent/runtime/server/default-skills/adding-new-paragraphs.js +21 -0
  193. package/dist/modules/agent/runtime/server/default-skills/pageReview.d.ts +2 -0
  194. package/dist/modules/agent/runtime/server/default-skills/pageReview.js +28 -0
  195. package/dist/modules/agent/runtime/server/default-skills/reusable-paragraphs.d.ts +2 -0
  196. package/dist/modules/agent/runtime/server/default-skills/reusable-paragraphs.js +21 -0
  197. package/dist/modules/agent/runtime/server/default-skills/rewriteAndTranslate.d.ts +2 -0
  198. package/dist/modules/agent/runtime/server/default-skills/rewriteAndTranslate.js +14 -0
  199. package/dist/modules/agent/runtime/server/default-system-prompts/architecture.d.ts +2 -0
  200. package/dist/modules/agent/runtime/server/default-system-prompts/architecture.js +39 -0
  201. package/dist/modules/agent/runtime/server/default-system-prompts/available-skills.d.ts +2 -0
  202. package/dist/modules/agent/runtime/server/default-system-prompts/available-skills.js +18 -0
  203. package/dist/modules/agent/runtime/server/default-system-prompts/available-tools.d.ts +2 -0
  204. package/dist/modules/agent/runtime/server/default-system-prompts/available-tools.js +18 -0
  205. package/dist/modules/agent/runtime/server/default-system-prompts/fragments.d.ts +2 -0
  206. package/dist/modules/agent/runtime/server/default-system-prompts/fragments.js +19 -0
  207. package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.d.ts +2 -0
  208. package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +22 -0
  209. package/dist/modules/agent/runtime/server/default-system-prompts/interaction.d.ts +2 -0
  210. package/dist/modules/agent/runtime/server/default-system-prompts/interaction.js +20 -0
  211. package/dist/modules/agent/runtime/server/default-system-prompts/introduction.d.ts +2 -0
  212. package/dist/modules/agent/runtime/server/default-system-prompts/introduction.js +14 -0
  213. package/dist/modules/agent/runtime/server/default-system-prompts/page-context.d.ts +2 -0
  214. package/dist/modules/agent/runtime/server/default-system-prompts/page-context.js +60 -0
  215. package/dist/modules/agent/runtime/server/default-system-prompts/paragraph-bundles.d.ts +2 -0
  216. package/dist/modules/agent/runtime/server/default-system-prompts/paragraph-bundles.js +37 -0
  217. package/dist/modules/agent/runtime/server/default-system-prompts/plan-mode.d.ts +2 -0
  218. package/dist/modules/agent/runtime/server/default-system-prompts/plan-mode.js +36 -0
  219. package/dist/modules/agent/runtime/server/default-system-prompts/security.d.ts +2 -0
  220. package/dist/modules/agent/runtime/server/default-system-prompts/security.js +27 -0
  221. package/dist/modules/agent/runtime/server/default-system-prompts/workflow.d.ts +2 -0
  222. package/dist/modules/agent/runtime/server/default-system-prompts/workflow.js +22 -0
  223. package/dist/modules/agent/runtime/server/fetch.d.ts +2 -0
  224. package/dist/modules/agent/runtime/server/fetch.js +127 -0
  225. package/dist/modules/agent/runtime/server/helpers.d.ts +77 -0
  226. package/dist/modules/agent/runtime/server/helpers.js +352 -0
  227. package/dist/modules/agent/runtime/server/providers/anthropic.d.ts +12 -0
  228. package/dist/modules/agent/runtime/server/providers/anthropic.js +128 -0
  229. package/dist/modules/agent/runtime/server/providers/openai.d.ts +12 -0
  230. package/dist/modules/agent/runtime/server/providers/openai.js +165 -0
  231. package/dist/modules/agent/runtime/server/providers/types.d.ts +74 -0
  232. package/dist/modules/agent/runtime/server/providers/types.js +0 -0
  233. package/dist/modules/agent/runtime/server/server-tools/complete_plan_step/index.d.ts +3 -0
  234. package/dist/modules/agent/runtime/server/server-tools/complete_plan_step/index.js +79 -0
  235. package/dist/modules/agent/runtime/server/server-tools/create_plan/index.d.ts +9 -0
  236. package/dist/modules/agent/runtime/server/server-tools/create_plan/index.js +86 -0
  237. package/dist/modules/agent/runtime/server/server-tools/index.d.ts +86 -0
  238. package/dist/modules/agent/runtime/server/server-tools/index.js +30 -0
  239. package/dist/modules/agent/runtime/server/server-tools/load_skill/index.d.ts +7 -0
  240. package/dist/modules/agent/runtime/server/server-tools/load_skill/index.js +58 -0
  241. package/dist/modules/agent/runtime/server/server-tools/load_tools/index.d.ts +7 -0
  242. package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +43 -0
  243. package/dist/modules/agent/runtime/server/skills/defineBlokkliAgentSkill.d.ts +23 -0
  244. package/dist/modules/agent/runtime/server/skills/defineBlokkliAgentSkill.js +3 -0
  245. package/dist/modules/agent/runtime/server/skills/index.d.ts +2 -0
  246. package/dist/modules/agent/runtime/server/skills/index.js +1 -0
  247. package/dist/modules/agent/runtime/server/skills/types.d.ts +45 -0
  248. package/dist/modules/agent/runtime/server/skills/types.js +0 -0
  249. package/dist/modules/agent/runtime/server/system-prompts/defineBlokkliAgentSystemPrompt.d.ts +21 -0
  250. package/dist/modules/agent/runtime/server/system-prompts/defineBlokkliAgentSystemPrompt.js +3 -0
  251. package/dist/modules/agent/runtime/server/system-prompts/helpers.d.ts +20 -0
  252. package/dist/modules/agent/runtime/server/system-prompts/helpers.js +41 -0
  253. package/dist/modules/agent/runtime/server/system-prompts/index.d.ts +2 -0
  254. package/dist/modules/agent/runtime/server/system-prompts/index.js +1 -0
  255. package/dist/modules/agent/runtime/server/system-prompts/types.d.ts +49 -0
  256. package/dist/modules/agent/runtime/server/system-prompts/types.js +0 -0
  257. package/dist/modules/agent/runtime/shared/placeholders.d.ts +4 -0
  258. package/dist/modules/agent/runtime/shared/placeholders.js +1 -0
  259. package/dist/modules/agent/runtime/shared/types.d.ts +426 -0
  260. package/dist/modules/agent/runtime/shared/types.js +147 -0
  261. package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +27 -2
  262. package/dist/modules/drupal/graphql/features/agent.graphql +69 -0
  263. package/dist/modules/drupal/graphql/features/search.graphql +5 -0
  264. package/dist/modules/drupal/graphql/features/templates.graphql +36 -2
  265. package/dist/modules/drupal/graphql/mutations/add_multiple.graphql +25 -0
  266. package/dist/modules/drupal/graphql/mutations/bulk_update_field_values.graphql +15 -0
  267. package/dist/modules/drupal/graphql/mutations/rearrange.graphql +23 -0
  268. package/dist/modules/drupal/graphql/mutations/replace_entity_reference.graphql +25 -0
  269. package/dist/modules/drupal/graphql/mutations/swap.graphql +16 -0
  270. package/dist/modules/drupal/index.d.mts +18 -2
  271. package/dist/modules/drupal/index.mjs +60 -12
  272. package/dist/modules/drupal/runtime/adapter/index.js +246 -21
  273. package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.d.vue.ts +9 -0
  274. package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.vue +26 -0
  275. package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.vue.d.ts +9 -0
  276. package/dist/runtime/components/Blocks/Fragment/index.vue +11 -2
  277. package/dist/runtime/components/BlokkliItem.vue +3 -1
  278. package/dist/runtime/composables/defineBlokkliFeature.d.ts +5 -3
  279. package/dist/runtime/composables/defineBlokkliFeature.js +2 -1
  280. package/dist/runtime/editor/adapter/index.d.ts +45 -4
  281. package/dist/runtime/editor/adapter/index.js +3 -0
  282. package/dist/runtime/editor/components/Actions/ItemDropdown.vue +6 -1
  283. package/dist/runtime/editor/components/Actions/index.vue +4 -1
  284. package/dist/runtime/editor/components/AddListItem/index.d.vue.ts +9 -1
  285. package/dist/runtime/editor/components/AddListItem/index.vue +36 -2
  286. package/dist/runtime/editor/components/AddListItem/index.vue.d.ts +9 -1
  287. package/dist/runtime/editor/components/AnimationCanvas/index.vue +17 -7
  288. package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +3 -1
  289. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -3
  290. package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +3 -1
  291. package/dist/runtime/editor/components/AutoHeight/index.d.vue.ts +16 -0
  292. package/dist/runtime/editor/components/AutoHeight/index.vue +32 -0
  293. package/dist/runtime/editor/components/AutoHeight/index.vue.d.ts +16 -0
  294. package/dist/runtime/editor/components/BlockPreviewItem/index.d.vue.ts +5 -1
  295. package/dist/runtime/editor/components/BlockPreviewItem/index.vue +10 -7
  296. package/dist/runtime/editor/components/BlockPreviewItem/index.vue.d.ts +5 -1
  297. package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
  298. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
  299. package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
  300. package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
  301. package/dist/runtime/editor/components/DiffViewer/DiffValue.d.vue.ts +7 -0
  302. package/dist/runtime/editor/components/DiffViewer/DiffValue.vue +21 -0
  303. package/dist/runtime/editor/components/DiffViewer/DiffValue.vue.d.ts +7 -0
  304. package/dist/runtime/editor/components/DiffViewer/State.vue +4 -9
  305. package/dist/runtime/editor/components/EditProvider.vue +25 -4
  306. package/dist/runtime/editor/components/FeaturesRenderer/index.vue +26 -8
  307. package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +31 -0
  308. package/dist/runtime/editor/components/FlexTextarea/index.vue +179 -0
  309. package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +31 -0
  310. package/dist/runtime/editor/components/Form/Text/index.vue +23 -11
  311. package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
  312. package/dist/runtime/editor/components/Form/Toggle/index.vue +7 -3
  313. package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
  314. package/dist/runtime/editor/components/Icon/index.vue +3 -1
  315. package/dist/runtime/editor/components/Indicators/index.vue +20 -10
  316. package/dist/runtime/editor/components/ItemIcon/index.d.vue.ts +3 -0
  317. package/dist/runtime/editor/components/ItemIcon/index.vue +3 -2
  318. package/dist/runtime/editor/components/ItemIcon/index.vue.d.ts +3 -0
  319. package/dist/runtime/editor/components/ItemIconBox/index.vue +4 -1
  320. package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +3 -1
  321. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +150 -71
  322. package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +3 -1
  323. package/dist/runtime/editor/components/PluginConfigForm/index.vue +6 -2
  324. package/dist/runtime/editor/components/RelativeTime/index.d.vue.ts +3 -2
  325. package/dist/runtime/editor/components/RelativeTime/index.vue +21 -7
  326. package/dist/runtime/editor/components/RelativeTime/index.vue.d.ts +3 -2
  327. package/dist/runtime/editor/components/StatusIcon/index.d.vue.ts +9 -0
  328. package/dist/runtime/editor/components/StatusIcon/index.vue +31 -0
  329. package/dist/runtime/editor/components/StatusIcon/index.vue.d.ts +9 -0
  330. package/dist/runtime/editor/components/SystemRequirements/index.vue +5 -1
  331. package/dist/runtime/editor/components/Transition/Height.vue +3 -2
  332. package/dist/runtime/editor/components/Transition/index.d.vue.ts +1 -1
  333. package/dist/runtime/editor/components/Transition/index.vue +2 -1
  334. package/dist/runtime/editor/components/Transition/index.vue.d.ts +1 -1
  335. package/dist/runtime/editor/components/index.d.ts +10 -6
  336. package/dist/runtime/editor/components/index.js +19 -11
  337. package/dist/runtime/editor/composables/index.d.ts +2 -0
  338. package/dist/runtime/editor/composables/index.js +2 -0
  339. package/dist/runtime/editor/composables/onElementResize.d.ts +3 -0
  340. package/dist/runtime/editor/composables/onElementResize.js +37 -0
  341. package/dist/runtime/editor/composables/useEditableFieldOverride.d.ts +24 -0
  342. package/dist/runtime/editor/composables/useEditableFieldOverride.js +130 -0
  343. package/dist/runtime/editor/composables/useStickyToolbar.d.ts +4 -3
  344. package/dist/runtime/editor/composables/useStickyToolbar.js +26 -10
  345. package/dist/runtime/editor/css/output.css +1 -1
  346. package/dist/runtime/editor/events/index.d.ts +31 -0
  347. package/dist/runtime/editor/features/add-list/Actions/Action.d.vue.ts +8 -1
  348. package/dist/runtime/editor/features/add-list/Actions/Action.vue +7 -1
  349. package/dist/runtime/editor/features/add-list/Actions/Action.vue.d.ts +8 -1
  350. package/dist/runtime/editor/features/add-list/Actions/index.d.vue.ts +11 -1
  351. package/dist/runtime/editor/features/add-list/Actions/index.vue +29 -8
  352. package/dist/runtime/editor/features/add-list/Actions/index.vue.d.ts +11 -1
  353. package/dist/runtime/editor/features/add-list/Blocks/index.d.vue.ts +11 -2
  354. package/dist/runtime/editor/features/add-list/Blocks/index.vue +27 -1
  355. package/dist/runtime/editor/features/add-list/Blocks/index.vue.d.ts +11 -2
  356. package/dist/runtime/editor/features/add-list/Help/Item.d.vue.ts +12 -0
  357. package/dist/runtime/editor/features/add-list/Help/Item.vue +186 -0
  358. package/dist/runtime/editor/features/add-list/Help/Item.vue.d.ts +12 -0
  359. package/dist/runtime/editor/features/add-list/Help/index.d.vue.ts +13 -0
  360. package/dist/runtime/editor/features/add-list/Help/index.vue +127 -0
  361. package/dist/runtime/editor/features/add-list/Help/index.vue.d.ts +13 -0
  362. package/dist/runtime/editor/features/add-list/docs.md +2 -2
  363. package/dist/runtime/editor/features/add-list/index.vue +108 -9
  364. package/dist/runtime/editor/features/add-list/types.d.ts +5 -0
  365. package/dist/runtime/editor/features/analyze/Main.vue +4 -1
  366. package/dist/runtime/editor/features/analyze/Summary/Chart.vue +9 -9
  367. package/dist/runtime/editor/features/analyze/index.vue +2 -14
  368. package/dist/runtime/editor/features/analyze/types.d.ts +4 -1
  369. package/dist/runtime/editor/features/artboard/Renderer.vue +43 -0
  370. package/dist/runtime/editor/features/assistant/docs.md +5 -5
  371. package/dist/runtime/editor/features/breadcrumbs/index.vue +4 -1
  372. package/dist/runtime/editor/features/clipboard/index.vue +6 -2
  373. package/dist/runtime/editor/features/comments/index.vue +1 -0
  374. package/dist/runtime/editor/features/comments/types.d.ts +6 -0
  375. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.d.vue.ts +2 -1
  376. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +32 -13
  377. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue.d.ts +2 -1
  378. package/dist/runtime/editor/features/dragging-overlay/Renderer/fragment.glsl +77 -2
  379. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.d.vue.ts +1 -0
  380. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +143 -52
  381. package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue.d.ts +1 -0
  382. package/dist/runtime/editor/features/dragging-overlay/Renderer/vertex.glsl +84 -31
  383. package/dist/runtime/editor/features/dragging-overlay/index.vue +3 -2
  384. package/dist/runtime/editor/features/edit/index.vue +7 -1
  385. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +13 -23
  386. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +10 -102
  387. package/dist/runtime/editor/features/editable-field/types.d.ts +12 -2
  388. package/dist/runtime/editor/features/entity-title/index.vue +7 -7
  389. package/dist/runtime/editor/features/fragments/index.vue +1 -1
  390. package/dist/runtime/editor/features/import-existing/Dialog/index.vue +8 -13
  391. package/dist/runtime/editor/features/library/ReusableDialog/index.vue +6 -1
  392. package/dist/runtime/editor/features/library/index.vue +14 -5
  393. package/dist/runtime/editor/features/library/types.d.ts +6 -0
  394. package/dist/runtime/editor/features/media-library/Library/Item.d.vue.ts +2 -2
  395. package/dist/runtime/editor/features/media-library/Library/Item.vue +17 -1
  396. package/dist/runtime/editor/features/media-library/Library/Item.vue.d.ts +2 -2
  397. package/dist/runtime/editor/features/media-library/Library/index.vue +6 -1
  398. package/dist/runtime/editor/features/media-library/index.vue +4 -4
  399. package/dist/runtime/editor/features/options/Form/index.vue +11 -43
  400. package/dist/runtime/editor/features/ownership/Banner/index.d.vue.ts +6 -3
  401. package/dist/runtime/editor/features/ownership/Banner/index.vue +10 -1
  402. package/dist/runtime/editor/features/ownership/Banner/index.vue.d.ts +6 -3
  403. package/dist/runtime/editor/features/ownership/index.vue +18 -6
  404. package/dist/runtime/editor/features/ownership/types.d.ts +5 -0
  405. package/dist/runtime/editor/features/publish/index.vue +5 -1
  406. package/dist/runtime/editor/features/search/Overlay/index.vue +5 -2
  407. package/dist/runtime/editor/features/search/index.vue +64 -3
  408. package/dist/runtime/editor/features/search/types.d.ts +16 -1
  409. package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +1 -3
  410. package/dist/runtime/editor/features/selection/AddButtons/index.vue +24 -4
  411. package/dist/runtime/editor/features/selection/Renderer/index.vue +5 -1
  412. package/dist/runtime/editor/features/selection/index.vue +5 -1
  413. package/dist/runtime/editor/features/settings/Dialog/index.vue +3 -1
  414. package/dist/runtime/editor/features/settings/index.vue +4 -1
  415. package/dist/runtime/editor/features/templates/CreateDialog/index.vue +21 -2
  416. package/dist/runtime/editor/features/templates/Dialog/Item/index.d.vue.ts +1 -1
  417. package/dist/runtime/editor/features/templates/Dialog/Item/index.vue +3 -3
  418. package/dist/runtime/editor/features/templates/Dialog/Item/index.vue.d.ts +1 -1
  419. package/dist/runtime/editor/features/templates/Dialog/index.vue +21 -5
  420. package/dist/runtime/editor/features/templates/ManageDialog/Item.d.vue.ts +8 -0
  421. package/dist/runtime/editor/features/templates/ManageDialog/Item.vue +147 -0
  422. package/dist/runtime/editor/features/templates/ManageDialog/Item.vue.d.ts +8 -0
  423. package/dist/runtime/editor/features/templates/ManageDialog/index.vue +30 -107
  424. package/dist/runtime/editor/features/templates/index.vue +7 -5
  425. package/dist/runtime/editor/features/templates/types.d.ts +11 -2
  426. package/dist/runtime/editor/features/transform/Dialog/index.vue +6 -1
  427. package/dist/runtime/editor/features/transform/index.vue +25 -20
  428. package/dist/runtime/editor/features/transform/types.d.ts +6 -4
  429. package/dist/runtime/editor/features/validations/index.vue +6 -1
  430. package/dist/runtime/editor/helpers/date/index.d.ts +1 -0
  431. package/dist/runtime/editor/helpers/date/index.js +3 -0
  432. package/dist/runtime/editor/helpers/options/index.d.ts +20 -0
  433. package/dist/runtime/editor/helpers/options/index.js +60 -0
  434. package/dist/runtime/editor/helpers/webgl/index.d.ts +5 -1
  435. package/dist/runtime/editor/helpers/webgl/index.js +45 -13
  436. package/dist/runtime/editor/icons/svg/stars.svg +1 -0
  437. package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
  438. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue +13 -10
  439. package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
  440. package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +3 -1
  441. package/dist/runtime/editor/plugins/Sidebar/index.vue +14 -2
  442. package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +3 -1
  443. package/dist/runtime/editor/providers/adapters.d.ts +33 -0
  444. package/dist/runtime/editor/providers/adapters.js +88 -0
  445. package/dist/runtime/editor/providers/animation.js +3 -0
  446. package/dist/runtime/editor/providers/definition.d.ts +7 -0
  447. package/dist/runtime/editor/providers/definition.js +6 -0
  448. package/dist/runtime/editor/providers/dom.d.ts +7 -0
  449. package/dist/runtime/editor/providers/dom.js +12 -0
  450. package/dist/runtime/editor/providers/permissions.d.ts +6 -0
  451. package/dist/runtime/editor/providers/permissions.js +9 -0
  452. package/dist/runtime/editor/providers/plugin.d.ts +1 -0
  453. package/dist/runtime/editor/providers/state.js +1 -0
  454. package/dist/runtime/editor/providers/texts.js +20 -6
  455. package/dist/runtime/editor/providers/types.d.ts +7 -0
  456. package/dist/runtime/editor/providers/types.js +4 -0
  457. package/dist/runtime/editor/providers/ui.d.ts +40 -0
  458. package/dist/runtime/editor/providers/ui.js +27 -1
  459. package/dist/runtime/editor/translations/de.json +2738 -0
  460. package/dist/runtime/editor/translations/fr.json +2738 -0
  461. package/dist/runtime/editor/translations/gsw_CH.json +2738 -0
  462. package/dist/runtime/editor/translations/it.json +2738 -0
  463. package/dist/runtime/editor/types/app.d.ts +9 -2
  464. package/dist/runtime/editor/types/definitions.d.ts +5 -0
  465. package/dist/runtime/editor/types/features.d.ts +3 -1
  466. package/dist/runtime/editor/types/permissions.d.ts +17 -0
  467. package/dist/runtime/editor/types/permissions.js +0 -0
  468. package/dist/runtime/types/index.d.ts +6 -0
  469. package/dist/shared/editor.CGf7C_0M.mjs +10 -0
  470. package/dist/shared/editor.DMFfaLVE.mjs +175 -0
  471. package/dist/shared/{editor.BKQCh70G.d.mts → editor.Iax3GCvt.d.mts} +94 -40
  472. package/dist/types.d.mts +8 -2
  473. package/package.json +29 -7
@@ -1,6 +1,6 @@
1
1
  import type { ComputedRef } from 'vue';
2
2
  import type { DomProvider } from '../providers/dom.js';
3
- import type { AdapterContext, BlokkliAdapter } from '#blokkli/editor/adapter';
3
+ import type { AdapterContext, FullBlokkliAdapter } from '#blokkli/editor/adapter';
4
4
  import type { Eventbus } from '../events/index.js';
5
5
  import type { StorageProvider } from '../providers/storage.js';
6
6
  import type { BlockDefinitionProvider } from '../providers/types.js';
@@ -25,11 +25,17 @@ import type { TourProvider } from '../providers/tour.js';
25
25
  import type { DropAreaProvider } from '../providers/dropArea.js';
26
26
  import type { ThemeProvider } from '../providers/theme.js';
27
27
  import type { DefinitionProvider } from '../providers/definition.js';
28
+ import type { PermissionsProvider } from '../providers/permissions.js';
29
+ import type { AdaptersProvider } from '../providers/adapters.js';
28
30
  export interface BlokkliApp {
29
31
  /**
30
32
  * The adapter.
31
33
  */
32
- adapter: BlokkliAdapter<any>;
34
+ adapter: FullBlokkliAdapter<any>;
35
+ /**
36
+ * The adapters provider for accessing base adapter and extensions.
37
+ */
38
+ adapters: AdaptersProvider;
33
39
  eventBus: Eventbus;
34
40
  dom: DomProvider;
35
41
  storage: StorageProvider;
@@ -56,4 +62,5 @@ export interface BlokkliApp {
56
62
  directive: DirectiveProvider;
57
63
  fields: FieldsProvider;
58
64
  icons: IconsProvider;
65
+ permissions: PermissionsProvider;
59
66
  }
@@ -2,6 +2,7 @@ export interface BlockBundleDefinition {
2
2
  id: string;
3
3
  label: string;
4
4
  description?: string;
5
+ imageUrl?: string;
5
6
  allowReusable?: boolean;
6
7
  isTranslatable?: boolean;
7
8
  hasPublishOn?: boolean;
@@ -16,3 +17,7 @@ export type FieldConfig = {
16
17
  canEdit: boolean;
17
18
  allowedBundles: string[];
18
19
  };
20
+ export type EntityTypeRestriction = {
21
+ type: string;
22
+ bundles: string[];
23
+ };
@@ -2,8 +2,10 @@ import type { BlokkliIcon } from '#blokkli-build/icons';
2
2
  import type { FeatureDefinitionBase, FeatureDefinitionSettingCheckbox, FeatureDefinitionSettingMethod, FeatureDefinitionSettingRadios, FeatureDefinitionSettingSlider } from './../../../global/types/features.js';
3
3
  import type { AdapterMethods } from '#blokkli/editor/adapter';
4
4
  import type { BlokkliApp } from './app.js';
5
+ import type { UserPermissions } from './permissions.js';
5
6
  export type FeatureDefinitionSetting = FeatureDefinitionSettingCheckbox | FeatureDefinitionSettingRadios<BlokkliIcon> | FeatureDefinitionSettingMethod<BlokkliApp> | FeatureDefinitionSettingSlider;
6
- export type FeatureDefinition<Methods extends AdapterMethods[] = [], T extends string = ''> = Omit<FeatureDefinitionBase<AdapterMethods, BlokkliIcon, T>, 'requiredAdapterMethods' | 'settings'> & {
7
+ export type FeatureDefinition<Methods extends AdapterMethods[] = [], T extends string = ''> = Omit<FeatureDefinitionBase<AdapterMethods, BlokkliIcon, T>, 'requiredAdapterMethods' | 'settings' | 'requiredPermissions'> & {
7
8
  requiredAdapterMethods?: [...Methods];
8
9
  settings?: Record<string, FeatureDefinitionSetting>;
10
+ requiredPermissions?: UserPermissions[];
9
11
  };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Map of permission keys to their descriptions.
3
+ *
4
+ * Features can augment this interface to register additional permissions:
5
+ *
6
+ * ```ts
7
+ * declare module '#blokkli/editor/types/permissions' {
8
+ * interface UserPermissionMap {
9
+ * my_permission: 'Description of what this permission grants.'
10
+ * }
11
+ * }
12
+ * ```
13
+ */
14
+ export interface UserPermissionMap {
15
+ use_blokkli: 'use the blökkli editor';
16
+ }
17
+ export type UserPermissions = keyof UserPermissionMap;
File without changes
@@ -5,5 +5,11 @@ export type EntityContext = {
5
5
  type: string;
6
6
  bundle: string;
7
7
  };
8
+ export type EntityMetadata = {
9
+ description: string | null;
10
+ createdBy: string | null;
11
+ dateUpdated: string | null;
12
+ dateCreated: string | null;
13
+ };
8
14
  declare const _default: {};
9
15
  export default _default;
@@ -0,0 +1,10 @@
1
+ function defineBlokkliModule(init) {
2
+ return function(options) {
3
+ return {
4
+ options,
5
+ init
6
+ };
7
+ };
8
+ }
9
+
10
+ export { defineBlokkliModule as d };
@@ -0,0 +1,175 @@
1
+ class CollectedFile {
2
+ constructor(filePath, fileContents) {
3
+ this.filePath = filePath;
4
+ this.fileContents = fileContents;
5
+ }
6
+ async handleChange(_helper) {
7
+ return Promise.resolve(true);
8
+ }
9
+ /**
10
+ * Validate the collected file and return any errors.
11
+ * Override this method in subclasses to add validation logic.
12
+ */
13
+ validate(_icons) {
14
+ return [];
15
+ }
16
+ }
17
+ class Collector {
18
+ constructor(helper) {
19
+ this.helper = helper;
20
+ this.files = /* @__PURE__ */ new Map();
21
+ }
22
+ files;
23
+ needsFileContents = true;
24
+ async addFile(filePath) {
25
+ if (this.needsFileContents) {
26
+ const contents = await this.helper.fileCache.read(filePath);
27
+ const file = this.createCollectedFile(filePath, contents.toString());
28
+ await file.handleChange(this.helper);
29
+ this.files.set(filePath, file);
30
+ } else {
31
+ const file = this.createCollectedFile(filePath);
32
+ await file.handleChange(this.helper);
33
+ this.files.set(filePath, file);
34
+ }
35
+ }
36
+ async handleAdd(filePath) {
37
+ const applies = await this.applies(filePath);
38
+ if (applies) {
39
+ await this.addFile(filePath);
40
+ return true;
41
+ }
42
+ return false;
43
+ }
44
+ async handleChange(filePath) {
45
+ const applies = await this.applies(filePath);
46
+ if (!applies) {
47
+ return this.handleUnlink(filePath);
48
+ }
49
+ const file = this.files.get(filePath);
50
+ if (!file) {
51
+ return false;
52
+ }
53
+ if (this.needsFileContents) {
54
+ const contents = await this.helper.fileCache.read(filePath);
55
+ file.fileContents = contents.toString();
56
+ return await file.handleChange(this.helper);
57
+ }
58
+ return true;
59
+ }
60
+ handleUnlink(filePath) {
61
+ if (this.files.has(filePath)) {
62
+ this.files.delete(filePath);
63
+ return true;
64
+ }
65
+ return false;
66
+ }
67
+ handleAddDir() {
68
+ return false;
69
+ }
70
+ handleUnlinkDir(folderPath) {
71
+ const allKeys = [...this.files.keys()];
72
+ const toRemove = allKeys.filter((filePath) => filePath.includes(folderPath));
73
+ if (toRemove.length) {
74
+ toRemove.forEach((key) => this.files.delete(key));
75
+ return true;
76
+ }
77
+ return false;
78
+ }
79
+ async handleWatchEvent(event, filePath) {
80
+ let hasChanged = false;
81
+ if (event === "add") {
82
+ hasChanged = await this.handleAdd(filePath);
83
+ } else if (event === "change") {
84
+ hasChanged = await this.handleChange(filePath);
85
+ } else if (event === "unlink") {
86
+ hasChanged = await this.handleUnlink(filePath);
87
+ } else if (event === "addDir") {
88
+ hasChanged = this.handleAddDir();
89
+ } else if (event === "unlinkDir") {
90
+ hasChanged = this.handleUnlinkDir(filePath);
91
+ }
92
+ return { hasChanged };
93
+ }
94
+ /**
95
+ * Validate all collected files and log any errors/warnings to the console.
96
+ * @returns true if there are validation errors (not warnings), false otherwise.
97
+ */
98
+ validate(icons) {
99
+ const allIssues = [];
100
+ for (const file of this.files.values()) {
101
+ const issues = file.validate(icons);
102
+ if (issues.length > 0) {
103
+ allIssues.push({ filePath: file.filePath, issues });
104
+ }
105
+ }
106
+ if (allIssues.length === 0) {
107
+ return false;
108
+ }
109
+ const errors = [];
110
+ const warnings = [];
111
+ for (const { filePath, issues } of allIssues) {
112
+ const fileErrors = issues.filter((i) => i.severity !== "warning");
113
+ const fileWarnings = issues.filter((i) => i.severity === "warning");
114
+ if (fileErrors.length > 0) {
115
+ errors.push({ filePath, issues: fileErrors });
116
+ }
117
+ if (fileWarnings.length > 0) {
118
+ warnings.push({ filePath, issues: fileWarnings });
119
+ }
120
+ }
121
+ if (warnings.length > 0) {
122
+ const lines = warnings.flatMap(({ filePath, issues }) => [
123
+ ` ${filePath}:`,
124
+ ...issues.map((e) => ` - ${e.message}`)
125
+ ]);
126
+ this.helper.logger.warn(
127
+ `bl\xF6kkli validation warnings:
128
+ ${lines.join("\n")}`
129
+ );
130
+ }
131
+ if (errors.length > 0) {
132
+ const lines = errors.flatMap(({ filePath, issues }) => [
133
+ ` ${filePath}:`,
134
+ ...issues.map((e) => ` - ${e.message}`)
135
+ ]);
136
+ this.helper.logger.error(
137
+ `bl\xF6kkli validation errors:
138
+ ${lines.join("\n")}`
139
+ );
140
+ return true;
141
+ }
142
+ return false;
143
+ }
144
+ }
145
+
146
+ function defineCodeTemplate(name, buildCode, buildTypes, options) {
147
+ return {
148
+ type: "code",
149
+ name,
150
+ buildCode,
151
+ buildTypes,
152
+ options: {
153
+ dependencies: options?.dependencies || [],
154
+ write: !!options?.write,
155
+ context: options?.context || "app"
156
+ }
157
+ };
158
+ }
159
+ function defineFileTemplate(fileName, build, options) {
160
+ return {
161
+ type: "file",
162
+ fileName,
163
+ build,
164
+ options: {
165
+ dependencies: options?.dependencies || [],
166
+ write: options?.write ?? true,
167
+ context: options?.context || "app"
168
+ }
169
+ };
170
+ }
171
+ function withHelper(cb) {
172
+ return cb;
173
+ }
174
+
175
+ export { Collector as C, CollectedFile as a, defineFileTemplate as b, defineCodeTemplate as d, withHelper as w };
@@ -6,23 +6,40 @@ import { Resolver } from '@nuxt/kit';
6
6
  import { FeatureDefinitionBase } from '../../dist/global/types/features.js';
7
7
 
8
8
  type TemplateCallback = (context: ModuleContext) => string | Promise<string>;
9
- type TemplateDependency = 'icons' | 'features' | 'block-content' | 'block-path' | 'block-global-options';
9
+ type TemplateDependency = 'icons' | 'features' | 'block-content' | 'block-path' | 'block-global-options' | 'agent-mcp-tools' | 'agent-server' | 'agent-prompts';
10
+ /**
11
+ * Where the template should be available:
12
+ * - 'app': Only in app context (default)
13
+ * - 'server': Only in server/Nitro context (will be inlined for Nitro build)
14
+ * - 'both': Available in both contexts
15
+ */
16
+ type TemplateContext = 'app' | 'server' | 'both';
10
17
  type TemplateOptions = {
11
18
  dependencies?: TemplateDependency[];
12
19
  write?: boolean;
20
+ /**
21
+ * The context where this template should be available.
22
+ * Server templates will be inlined for Nitro build.
23
+ * @default 'app'
24
+ */
25
+ context?: TemplateContext;
13
26
  };
14
27
  type ModuleCodeTemplate = {
15
28
  type: 'code';
16
29
  name: string;
17
30
  buildCode: TemplateCallback;
18
31
  buildTypes: TemplateCallback;
19
- options: Required<TemplateOptions>;
32
+ options: Required<TemplateOptions> & {
33
+ context: TemplateContext;
34
+ };
20
35
  };
21
36
  type ModuleFileTemplate = {
22
37
  type: 'file';
23
38
  fileName: string;
24
39
  build: TemplateCallback;
25
- options: Required<TemplateOptions>;
40
+ options: Required<TemplateOptions> & {
41
+ context: TemplateContext;
42
+ };
26
43
  };
27
44
  type ModuleTemplate = ModuleCodeTemplate | ModuleFileTemplate;
28
45
 
@@ -37,6 +54,7 @@ type BlockValidationError = ValidationError & OptionValidationError;
37
54
  declare class CollectedBlockFile extends CollectedFile {
38
55
  folder: string;
39
56
  iconPath: string | null;
57
+ imagePath: string | null;
40
58
  iconContents: string | null;
41
59
  diffComponentPath: string | null;
42
60
  proxyComponentPath: string | null;
@@ -99,7 +117,7 @@ type ModuleOptions = {
99
117
  /**
100
118
  * An array of blökkli modules to use.
101
119
  */
102
- modules?: BlokkliModule[];
120
+ modules?: BlokkliModule<any>[];
103
121
  /**
104
122
  * The pattern of source files to scan for blokkli components.
105
123
  */
@@ -144,6 +162,12 @@ type ModuleOptions = {
144
162
  * Using the paragraphs_blokkli integration this value should be set to "paragraph".
145
163
  */
146
164
  itemEntityType?: string;
165
+ /**
166
+ * The entity type of template entities.
167
+ *
168
+ * Using the paragraphs_blokkli integration this value should be set to "blokkli_paragraph_template".
169
+ */
170
+ templateEntityType?: string;
147
171
  /**
148
172
  * The name of the 'from library' block bundle.
149
173
  */
@@ -333,10 +357,61 @@ declare class ModuleHelper implements ValidationInterface {
333
357
  addComponent(name: string): void;
334
358
  addComposable(name: string): void;
335
359
  addAlias(name: string, path: string): void;
360
+ /**
361
+ * Add a path to Nitro's externals.inline for server-side usage.
362
+ * @see https://github.com/nuxt/nuxt/issues/28995
363
+ */
364
+ inlineForNitro(path: string): void;
336
365
  getMappedBlockBundle(bundle: string): string;
337
366
  validate(icons: IconCollector): boolean;
338
367
  }
339
368
 
369
+ type ExtractedFeatureDefinition = {
370
+ id: string;
371
+ componentName: string;
372
+ componentPath: string;
373
+ definition: FeatureDefinitionBase;
374
+ definitionSource: string;
375
+ };
376
+ declare class CollectedFeatureFile extends CollectedFile {
377
+ private definition;
378
+ private composableName;
379
+ private enabled;
380
+ private objectLiteral;
381
+ getDefinition(): ExtractedFeatureDefinition | null;
382
+ handleChange(): Promise<boolean>;
383
+ isEnabled(): boolean;
384
+ /**
385
+ * Disable the feature.
386
+ */
387
+ disable(): void;
388
+ }
389
+ declare class FeatureCollector extends Collector<CollectedFeatureFile> {
390
+ protected needsFileContents: boolean;
391
+ private disabledFeatures;
392
+ private srcFromModule;
393
+ constructor(helper: ModuleHelper);
394
+ getEnabledFeatures(): ExtractedFeatureDefinition[];
395
+ init(): Promise<void>;
396
+ runHooks(): any;
397
+ createCollectedFile(filePath: string, fileContents?: string): CollectedFeatureFile;
398
+ applies(filePath: string): Promise<boolean>;
399
+ getDependencyTypes(): TemplateDependency[];
400
+ disableFeature(id: string): void;
401
+ }
402
+
403
+ type AlterHookContext<K extends string, T extends CollectedFile> = {
404
+ [P in K]: T[];
405
+ };
406
+ interface ModuleHooks {
407
+ 'blokkli:alter-features': (ctx: AlterHookContext<'features', CollectedFeatureFile>) => void | Promise<void>;
408
+ 'blokkli:alter-icons': (ctx: AlterHookContext<'icons', CollectedFile>) => void | Promise<void>;
409
+ 'blokkli:alter-blocks': (ctx: AlterHookContext<'blocks', CollectedBlockFile>) => void | Promise<void>;
410
+ }
411
+ declare module '@nuxt/schema' {
412
+ interface NuxtHooks extends ModuleHooks {
413
+ }
414
+ }
340
415
  type HandleWatchEventResult = {
341
416
  hasChanged: boolean;
342
417
  };
@@ -421,40 +496,6 @@ declare class IconCollector extends Collector {
421
496
  createCollectedFile(filePath: string, fileContents?: string): CollectedFile;
422
497
  }
423
498
 
424
- type ExtractedFeatureDefinition = {
425
- id: string;
426
- componentName: string;
427
- componentPath: string;
428
- definition: FeatureDefinitionBase;
429
- definitionSource: string;
430
- };
431
- declare class CollectedFeatureFile extends CollectedFile {
432
- private definition;
433
- private composableName;
434
- private enabled;
435
- private objectLiteral;
436
- getDefinition(): ExtractedFeatureDefinition | null;
437
- handleChange(): Promise<boolean>;
438
- isEnabled(): boolean;
439
- /**
440
- * Disable the feature.
441
- */
442
- disable(): void;
443
- }
444
- declare class FeatureCollector extends Collector<CollectedFeatureFile> {
445
- protected needsFileContents: boolean;
446
- private disabledFeatures;
447
- private srcFromModule;
448
- constructor(helper: ModuleHelper);
449
- getEnabledFeatures(): ExtractedFeatureDefinition[];
450
- init(): Promise<void>;
451
- runHooks(): any;
452
- createCollectedFile(filePath: string, fileContents?: string): CollectedFeatureFile;
453
- applies(filePath: string): Promise<boolean>;
454
- getDependencyTypes(): TemplateDependency[];
455
- disableFeature(id: string): void;
456
- }
457
-
458
499
  declare class ThemeData {
459
500
  css: string;
460
501
  fullTheme: Record<string, any>;
@@ -462,6 +503,10 @@ declare class ThemeData {
462
503
  constructor(helper: ModuleHelper);
463
504
  }
464
505
 
506
+ interface AdapterExtensionDefinition {
507
+ namespace: string;
508
+ path: string;
509
+ }
465
510
  declare class ModuleContext {
466
511
  helper: ModuleHelper;
467
512
  icons: IconCollector;
@@ -470,11 +515,21 @@ declare class ModuleContext {
470
515
  theme: ThemeData;
471
516
  private templates;
472
517
  private templateContents;
518
+ private adapterExtensions;
519
+ collectors: Collector[];
473
520
  constructor(helper: ModuleHelper, icons: IconCollector, features: FeatureCollector, blocks: BlockCollector, theme: ThemeData);
521
+ registerAdapterExtension(namespace: string, path: string): void;
522
+ getAdapterExtensions(): AdapterExtensionDefinition[];
523
+ addCollector(collector: Collector): void;
474
524
  private getTemplateContents;
475
525
  private setTemplateContents;
476
526
  generateTemplates(dependencies?: TemplateDependency[]): Promise<void>;
477
527
  addTemplate(template: ModuleTemplate): void;
528
+ /**
529
+ * Add a template path to Nitro's externals.inline for server-side usage.
530
+ * @see https://github.com/nuxt/nuxt/issues/28995
531
+ */
532
+ private inlineForNitro;
478
533
  /**
479
534
  * Register a type template without adding to globalTypeFiles.
480
535
  *
@@ -498,5 +553,4 @@ type BlokkliModule<O extends object = object> = {
498
553
  init: BlokkliModuleInit<O>;
499
554
  };
500
555
 
501
- export { CollectedFile as C, CollectedFeatureFile as a, CollectedBlockFile as b };
502
- export type { BlokkliModule as B, ModuleOptions as M };
556
+ export type { BlokkliModule as B, ModuleOptions as M, ModuleHooks as a };
package/dist/types.d.mts CHANGED
@@ -1,3 +1,9 @@
1
- export { type ModuleOptions } from './shared/editor.BKQCh70G.mjs'
1
+ import type { ModuleHooks } from './module.mjs'
2
2
 
3
- export { default } from './module.mjs'
3
+ declare module '@nuxt/schema' {
4
+ interface NuxtHooks extends ModuleHooks {}
5
+ }
6
+
7
+ export { type ModuleHooks } from './shared/editor.Iax3GCvt.mjs'
8
+
9
+ export { type ModuleOptions, default } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blokkli/editor",
3
- "version": "2.0.0-alpha.32",
3
+ "version": "2.0.0-alpha.34",
4
4
  "description": "Interactive page building experience for Nuxt",
5
5
  "keywords": [
6
6
  "cms",
@@ -39,6 +39,9 @@
39
39
  ],
40
40
  "drupal": [
41
41
  "./dist/modules/drupal/index.d.mts"
42
+ ],
43
+ "agent": [
44
+ "./dist/modules/agent/index.d.mts"
42
45
  ]
43
46
  }
44
47
  },
@@ -50,15 +53,20 @@
50
53
  "./drupal": {
51
54
  "types": "./dist/modules/drupal/index.d.mts",
52
55
  "import": "./dist/modules/drupal/index.mjs"
56
+ },
57
+ "./agent": {
58
+ "types": "./dist/modules/agent/index.d.mts",
59
+ "import": "./dist/modules/agent/index.mjs"
53
60
  }
54
61
  },
55
62
  "scripts": {
56
63
  "prepack": "rm -rf dist && nuxt-module-build build && find dist/ -type f -name '*.*' | grep '.spec.' | xargs rm -f",
57
64
  "dev": "nuxi dev playground --host",
58
- "typecheck": "npm run typecheck:build && npm run typecheck:runtime && npm run typecheck:playground",
65
+ "typecheck": "npm run typecheck:build && npm run typecheck:runtime && npm run typecheck:server && npm run typecheck:playground",
59
66
  "typecheck:build": "vue-tsc --noEmit -p .nuxt/tsconfig.node.json",
60
67
  "typecheck:runtime": "vue-tsc --noEmit -p .nuxt/tsconfig.app.json",
61
- "typecheck:playground": "cd playground && vue-tsc --noEmit",
68
+ "typecheck:server": "vue-tsc --noEmit -p .nuxt/tsconfig.server.json",
69
+ "typecheck:playground": "vue-tsc --noEmit -p ./playground/.nuxt/tsconfig.app.json",
62
70
  "dev:minimal": "nuxi dev playground-minimal --host",
63
71
  "styles:build": "postcss ./css/index.css -o ./src/runtime/editor/css/output.css",
64
72
  "styles:watch": "postcss ./css/index.css -o ./src/runtime/editor/css/output.css --watch",
@@ -72,8 +80,8 @@
72
80
  "lint:fix": "npx oxlint --fix && eslint ./src --fix",
73
81
  "test": "vitest run",
74
82
  "test:watch": "vitest watch",
75
- "format": "oxfmt --check",
76
- "format:fix": "oxfmt",
83
+ "format": "prettier . --check",
84
+ "format:fix": "prettier . --write",
77
85
  "docs:dev": "vitepress dev docs",
78
86
  "docs:build": "vitepress build docs",
79
87
  "docs:preview": "vitepress preview docs",
@@ -87,11 +95,15 @@
87
95
  "fzf": "^0.5.2",
88
96
  "get-video-id": "^4.1.7",
89
97
  "html-diff-ts": "^1.4.2",
98
+ "marked": "^17.0.1",
90
99
  "mitt": "^3.0.1",
91
100
  "qrcode.vue": "^3.6.0",
92
- "twgl.js": "^7.0.0"
101
+ "turndown": "^7.2.0",
102
+ "twgl.js": "^7.0.0",
103
+ "zod": "^4.0.0"
93
104
  },
94
105
  "devDependencies": {
106
+ "@anthropic-ai/sdk": "^0.71.2",
95
107
  "@ckeditor/ckeditor5-vue": "^7.3.0",
96
108
  "@lunarisapp/readability": "^1.0.2",
97
109
  "@nuxt/devtools": "^3.1.1",
@@ -106,10 +118,12 @@
106
118
  "@types/gettext-parser": "^8.0.0",
107
119
  "@types/micromatch": "^4.0.10",
108
120
  "@types/node": "^25.0.3",
121
+ "@types/turndown": "^5.0.5",
109
122
  "@vue/test-utils": "^2.4.6",
110
123
  "axe-core": "^4.11.0",
111
124
  "changelogen": "^0.6.2",
112
125
  "ckeditor5": "^47.3.0",
126
+ "commander": "^13.1.0",
113
127
  "cypress": "^15.8.1",
114
128
  "eslint": "^9.39.2",
115
129
  "eslint-plugin-oxlint": "^1.35.0",
@@ -120,7 +134,7 @@
120
134
  "nuxt": "^4.2.2",
121
135
  "nuxt-graphql-middleware": "^5.3.0",
122
136
  "nuxt-svg-icon-sprite": "^2.0.2",
123
- "openai": "^5.13.1",
137
+ "openai": "^6.17.0",
124
138
  "oxfmt": "^0.20.0",
125
139
  "oxlint": "^1.35.0",
126
140
  "playwright-core": "^1.57.0",
@@ -141,10 +155,12 @@
141
155
  "vue-tsc": "^3.1.8"
142
156
  },
143
157
  "peerDependencies": {
158
+ "@anthropic-ai/sdk": "^0.71.2",
144
159
  "@lunarisapp/readability": "^1.0.2",
145
160
  "axe-core": "^4.10.0",
146
161
  "magic-string": "^0.30.0",
147
162
  "micromatch": "^4.0.0",
163
+ "openai": "^4.0.0",
148
164
  "oxc-walker": "^0.5.0",
149
165
  "typescript": "^5.0.0"
150
166
  },
@@ -154,6 +170,12 @@
154
170
  },
155
171
  "axe-core": {
156
172
  "optional": true
173
+ },
174
+ "openai": {
175
+ "optional": true
176
+ },
177
+ "@anthropic-ai/sdk": {
178
+ "optional": true
157
179
  }
158
180
  },
159
181
  "engines": {