@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.
- package/dist/global/constants/index.d.ts +1 -0
- package/dist/global/constants/index.js +1 -0
- package/dist/global/types/features.d.ts +4 -0
- package/dist/module.d.mts +5 -27
- package/dist/module.json +1 -1
- package/dist/module.mjs +430 -10823
- package/dist/modules/agent/index.d.mts +64 -0
- package/dist/modules/agent/index.mjs +407 -0
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +55 -0
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +875 -0
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentPrompt.d.ts +32 -0
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentPrompt.js +6 -0
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.d.ts +65 -0
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.js +6 -0
- package/dist/modules/agent/runtime/app/composables/index.d.ts +4 -0
- package/dist/modules/agent/runtime/app/composables/index.js +2 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.d.vue.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.vue +62 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Attachment/index.vue.d.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.d.vue.ts +9 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +38 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue.d.ts +9 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.d.vue.ts +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.vue +68 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Error/index.vue.d.ts +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.d.vue.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.vue +72 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/ServerTool/index.vue.d.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.d.vue.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.vue +37 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Tool/index.vue.d.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.d.vue.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.vue +17 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Unknown/index.vue.d.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.d.vue.ts +11 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +29 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue.d.ts +11 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.d.vue.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.vue +30 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/index.vue.d.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.d.vue.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.vue +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Thinking/index.vue.d.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.d.vue.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.vue +46 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/index.vue.d.ts +13 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.d.vue.ts +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue +50 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ConversationList/index.vue.d.ts +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.d.vue.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +160 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue.d.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.d.vue.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.vue +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/DropdownItem/index.vue.d.ts +12 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.d.vue.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue +67 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/TokenUsage/index.vue.d.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.d.vue.ts +23 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +109 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue.d.ts +23 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.d.vue.ts +45 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +120 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue.d.ts +45 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.d.vue.ts +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.vue +47 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/PendingMutation/index.vue.d.ts +15 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.d.vue.ts +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.vue +55 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Plan/index.vue.d.ts +14 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.d.vue.ts +25 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue +36 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue.d.ts +25 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/de.md +19 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/en.md +18 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.d.vue.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue +44 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/index.vue.d.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.d.vue.ts +58 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +274 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue.d.ts +58 -0
- package/dist/modules/agent/runtime/app/features/agent/index.d.vue.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +162 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue.d.ts +3 -0
- package/dist/modules/agent/runtime/app/features/agent/types.d.ts +58 -0
- package/dist/modules/agent/runtime/app/features/agent/types.js +0 -0
- package/dist/modules/agent/runtime/app/helpers/index.d.ts +55 -0
- package/dist/modules/agent/runtime/app/helpers/index.js +88 -0
- package/dist/modules/agent/runtime/app/helpers/pageStructure.d.ts +5 -0
- package/dist/modules/agent/runtime/app/helpers/pageStructure.js +106 -0
- package/dist/modules/agent/runtime/app/helpers/validation.d.ts +35 -0
- package/dist/modules/agent/runtime/app/helpers/validation.js +77 -0
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +69 -0
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +83 -0
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +62 -0
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +289 -0
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +76 -0
- package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +58 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/Component.d.vue.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue +113 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/Component.vue.d.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/ask_question/index.js +54 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.d.vue.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.vue +190 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Component.vue.d.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.d.vue.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.vue +90 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/Item.vue.d.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/index.d.ts +18 -0
- package/dist/modules/agent/runtime/app/tools/batch_rewrite_text/index.js +55 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +47 -0
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +47 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +144 -0
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +180 -0
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +33 -0
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +93 -0
- package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +104 -0
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +108 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +192 -0
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +102 -0
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +113 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +275 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +63 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +180 -0
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +46 -0
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +54 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +69 -0
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +95 -0
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +80 -0
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +85 -0
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +128 -0
- package/dist/modules/agent/runtime/app/tools/schemas.js +242 -0
- package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +65 -0
- package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +14 -0
- package/dist/modules/agent/runtime/app/tools/search_media/index.js +60 -0
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +75 -0
- package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/search_templates/index.js +51 -0
- package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/search_text/index.js +114 -0
- package/dist/modules/agent/runtime/app/tools/select_media/Component.d.vue.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +70 -0
- package/dist/modules/agent/runtime/app/tools/select_media/Component.vue.d.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +30 -0
- package/dist/modules/agent/runtime/app/tools/select_media/index.js +74 -0
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +109 -0
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +74 -0
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +51 -0
- package/dist/modules/agent/runtime/app/types/index.d.ts +440 -0
- package/dist/modules/agent/runtime/app/types/index.js +51 -0
- package/dist/modules/agent/runtime/server/Session.d.ts +94 -0
- package/dist/modules/agent/runtime/server/Session.js +734 -0
- package/dist/modules/agent/runtime/server/SessionManager.d.ts +21 -0
- package/dist/modules/agent/runtime/server/SessionManager.js +80 -0
- package/dist/modules/agent/runtime/server/agent.d.ts +2 -0
- package/dist/modules/agent/runtime/server/agent.js +148 -0
- package/dist/modules/agent/runtime/server/agentPrompt.d.ts +22 -0
- package/dist/modules/agent/runtime/server/agentPrompt.js +53 -0
- package/dist/modules/agent/runtime/server/default-skills/adding-new-paragraphs.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/adding-new-paragraphs.js +21 -0
- package/dist/modules/agent/runtime/server/default-skills/pageReview.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/pageReview.js +28 -0
- package/dist/modules/agent/runtime/server/default-skills/reusable-paragraphs.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/reusable-paragraphs.js +21 -0
- package/dist/modules/agent/runtime/server/default-skills/rewriteAndTranslate.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/rewriteAndTranslate.js +14 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/architecture.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/architecture.js +39 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/available-skills.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/available-skills.js +18 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/available-tools.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/available-tools.js +18 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/fragments.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/fragments.js +19 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +22 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/interaction.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/interaction.js +20 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/introduction.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/introduction.js +14 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/page-context.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/page-context.js +60 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/paragraph-bundles.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/paragraph-bundles.js +37 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/plan-mode.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/plan-mode.js +36 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/security.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/security.js +27 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/workflow.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/workflow.js +22 -0
- package/dist/modules/agent/runtime/server/fetch.d.ts +2 -0
- package/dist/modules/agent/runtime/server/fetch.js +127 -0
- package/dist/modules/agent/runtime/server/helpers.d.ts +77 -0
- package/dist/modules/agent/runtime/server/helpers.js +352 -0
- package/dist/modules/agent/runtime/server/providers/anthropic.d.ts +12 -0
- package/dist/modules/agent/runtime/server/providers/anthropic.js +128 -0
- package/dist/modules/agent/runtime/server/providers/openai.d.ts +12 -0
- package/dist/modules/agent/runtime/server/providers/openai.js +165 -0
- package/dist/modules/agent/runtime/server/providers/types.d.ts +74 -0
- package/dist/modules/agent/runtime/server/providers/types.js +0 -0
- package/dist/modules/agent/runtime/server/server-tools/complete_plan_step/index.d.ts +3 -0
- package/dist/modules/agent/runtime/server/server-tools/complete_plan_step/index.js +79 -0
- package/dist/modules/agent/runtime/server/server-tools/create_plan/index.d.ts +9 -0
- package/dist/modules/agent/runtime/server/server-tools/create_plan/index.js +86 -0
- package/dist/modules/agent/runtime/server/server-tools/index.d.ts +86 -0
- package/dist/modules/agent/runtime/server/server-tools/index.js +30 -0
- package/dist/modules/agent/runtime/server/server-tools/load_skill/index.d.ts +7 -0
- package/dist/modules/agent/runtime/server/server-tools/load_skill/index.js +58 -0
- package/dist/modules/agent/runtime/server/server-tools/load_tools/index.d.ts +7 -0
- package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +43 -0
- package/dist/modules/agent/runtime/server/skills/defineBlokkliAgentSkill.d.ts +23 -0
- package/dist/modules/agent/runtime/server/skills/defineBlokkliAgentSkill.js +3 -0
- package/dist/modules/agent/runtime/server/skills/index.d.ts +2 -0
- package/dist/modules/agent/runtime/server/skills/index.js +1 -0
- package/dist/modules/agent/runtime/server/skills/types.d.ts +45 -0
- package/dist/modules/agent/runtime/server/skills/types.js +0 -0
- package/dist/modules/agent/runtime/server/system-prompts/defineBlokkliAgentSystemPrompt.d.ts +21 -0
- package/dist/modules/agent/runtime/server/system-prompts/defineBlokkliAgentSystemPrompt.js +3 -0
- package/dist/modules/agent/runtime/server/system-prompts/helpers.d.ts +20 -0
- package/dist/modules/agent/runtime/server/system-prompts/helpers.js +41 -0
- package/dist/modules/agent/runtime/server/system-prompts/index.d.ts +2 -0
- package/dist/modules/agent/runtime/server/system-prompts/index.js +1 -0
- package/dist/modules/agent/runtime/server/system-prompts/types.d.ts +49 -0
- package/dist/modules/agent/runtime/server/system-prompts/types.js +0 -0
- package/dist/modules/agent/runtime/shared/placeholders.d.ts +4 -0
- package/dist/modules/agent/runtime/shared/placeholders.js +1 -0
- package/dist/modules/agent/runtime/shared/types.d.ts +426 -0
- package/dist/modules/agent/runtime/shared/types.js +147 -0
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +27 -2
- package/dist/modules/drupal/graphql/features/agent.graphql +69 -0
- package/dist/modules/drupal/graphql/features/search.graphql +5 -0
- package/dist/modules/drupal/graphql/features/templates.graphql +36 -2
- package/dist/modules/drupal/graphql/mutations/add_multiple.graphql +25 -0
- package/dist/modules/drupal/graphql/mutations/bulk_update_field_values.graphql +15 -0
- package/dist/modules/drupal/graphql/mutations/rearrange.graphql +23 -0
- package/dist/modules/drupal/graphql/mutations/replace_entity_reference.graphql +25 -0
- package/dist/modules/drupal/graphql/mutations/swap.graphql +16 -0
- package/dist/modules/drupal/index.d.mts +18 -2
- package/dist/modules/drupal/index.mjs +60 -12
- package/dist/modules/drupal/runtime/adapter/index.js +246 -21
- package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.d.vue.ts +9 -0
- package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.vue +26 -0
- package/dist/modules/drupal/runtime/components/BlokkliDrupalEditTemplate/index.vue.d.ts +9 -0
- package/dist/runtime/components/Blocks/Fragment/index.vue +11 -2
- package/dist/runtime/components/BlokkliItem.vue +3 -1
- package/dist/runtime/composables/defineBlokkliFeature.d.ts +5 -3
- package/dist/runtime/composables/defineBlokkliFeature.js +2 -1
- package/dist/runtime/editor/adapter/index.d.ts +45 -4
- package/dist/runtime/editor/adapter/index.js +3 -0
- package/dist/runtime/editor/components/Actions/ItemDropdown.vue +6 -1
- package/dist/runtime/editor/components/Actions/index.vue +4 -1
- package/dist/runtime/editor/components/AddListItem/index.d.vue.ts +9 -1
- package/dist/runtime/editor/components/AddListItem/index.vue +36 -2
- package/dist/runtime/editor/components/AddListItem/index.vue.d.ts +9 -1
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +17 -7
- package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +3 -1
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -3
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +3 -1
- package/dist/runtime/editor/components/AutoHeight/index.d.vue.ts +16 -0
- package/dist/runtime/editor/components/AutoHeight/index.vue +32 -0
- package/dist/runtime/editor/components/AutoHeight/index.vue.d.ts +16 -0
- package/dist/runtime/editor/components/BlockPreviewItem/index.d.vue.ts +5 -1
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue +10 -7
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue.d.ts +5 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
- package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
- package/dist/runtime/editor/components/DiffViewer/DiffValue.d.vue.ts +7 -0
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue +21 -0
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue.d.ts +7 -0
- package/dist/runtime/editor/components/DiffViewer/State.vue +4 -9
- package/dist/runtime/editor/components/EditProvider.vue +25 -4
- package/dist/runtime/editor/components/FeaturesRenderer/index.vue +26 -8
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +31 -0
- package/dist/runtime/editor/components/FlexTextarea/index.vue +179 -0
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +31 -0
- package/dist/runtime/editor/components/Form/Text/index.vue +23 -11
- package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Toggle/index.vue +7 -3
- package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/Icon/index.vue +3 -1
- package/dist/runtime/editor/components/Indicators/index.vue +20 -10
- package/dist/runtime/editor/components/ItemIcon/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/ItemIcon/index.vue +3 -2
- package/dist/runtime/editor/components/ItemIcon/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/ItemIconBox/index.vue +4 -1
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +3 -1
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +150 -71
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +3 -1
- package/dist/runtime/editor/components/PluginConfigForm/index.vue +6 -2
- package/dist/runtime/editor/components/RelativeTime/index.d.vue.ts +3 -2
- package/dist/runtime/editor/components/RelativeTime/index.vue +21 -7
- package/dist/runtime/editor/components/RelativeTime/index.vue.d.ts +3 -2
- package/dist/runtime/editor/components/StatusIcon/index.d.vue.ts +9 -0
- package/dist/runtime/editor/components/StatusIcon/index.vue +31 -0
- package/dist/runtime/editor/components/StatusIcon/index.vue.d.ts +9 -0
- package/dist/runtime/editor/components/SystemRequirements/index.vue +5 -1
- package/dist/runtime/editor/components/Transition/Height.vue +3 -2
- package/dist/runtime/editor/components/Transition/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Transition/index.vue +2 -1
- package/dist/runtime/editor/components/Transition/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/index.d.ts +10 -6
- package/dist/runtime/editor/components/index.js +19 -11
- package/dist/runtime/editor/composables/index.d.ts +2 -0
- package/dist/runtime/editor/composables/index.js +2 -0
- package/dist/runtime/editor/composables/onElementResize.d.ts +3 -0
- package/dist/runtime/editor/composables/onElementResize.js +37 -0
- package/dist/runtime/editor/composables/useEditableFieldOverride.d.ts +24 -0
- package/dist/runtime/editor/composables/useEditableFieldOverride.js +130 -0
- package/dist/runtime/editor/composables/useStickyToolbar.d.ts +4 -3
- package/dist/runtime/editor/composables/useStickyToolbar.js +26 -10
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +31 -0
- package/dist/runtime/editor/features/add-list/Actions/Action.d.vue.ts +8 -1
- package/dist/runtime/editor/features/add-list/Actions/Action.vue +7 -1
- package/dist/runtime/editor/features/add-list/Actions/Action.vue.d.ts +8 -1
- package/dist/runtime/editor/features/add-list/Actions/index.d.vue.ts +11 -1
- package/dist/runtime/editor/features/add-list/Actions/index.vue +29 -8
- package/dist/runtime/editor/features/add-list/Actions/index.vue.d.ts +11 -1
- package/dist/runtime/editor/features/add-list/Blocks/index.d.vue.ts +11 -2
- package/dist/runtime/editor/features/add-list/Blocks/index.vue +27 -1
- package/dist/runtime/editor/features/add-list/Blocks/index.vue.d.ts +11 -2
- package/dist/runtime/editor/features/add-list/Help/Item.d.vue.ts +12 -0
- package/dist/runtime/editor/features/add-list/Help/Item.vue +186 -0
- package/dist/runtime/editor/features/add-list/Help/Item.vue.d.ts +12 -0
- package/dist/runtime/editor/features/add-list/Help/index.d.vue.ts +13 -0
- package/dist/runtime/editor/features/add-list/Help/index.vue +127 -0
- package/dist/runtime/editor/features/add-list/Help/index.vue.d.ts +13 -0
- package/dist/runtime/editor/features/add-list/docs.md +2 -2
- package/dist/runtime/editor/features/add-list/index.vue +108 -9
- package/dist/runtime/editor/features/add-list/types.d.ts +5 -0
- package/dist/runtime/editor/features/analyze/Main.vue +4 -1
- package/dist/runtime/editor/features/analyze/Summary/Chart.vue +9 -9
- package/dist/runtime/editor/features/analyze/index.vue +2 -14
- package/dist/runtime/editor/features/analyze/types.d.ts +4 -1
- package/dist/runtime/editor/features/artboard/Renderer.vue +43 -0
- package/dist/runtime/editor/features/assistant/docs.md +5 -5
- package/dist/runtime/editor/features/breadcrumbs/index.vue +4 -1
- package/dist/runtime/editor/features/clipboard/index.vue +6 -2
- package/dist/runtime/editor/features/comments/index.vue +1 -0
- package/dist/runtime/editor/features/comments/types.d.ts +6 -0
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.d.vue.ts +2 -1
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +32 -13
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue.d.ts +2 -1
- package/dist/runtime/editor/features/dragging-overlay/Renderer/fragment.glsl +77 -2
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.d.vue.ts +1 -0
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +143 -52
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue.d.ts +1 -0
- package/dist/runtime/editor/features/dragging-overlay/Renderer/vertex.glsl +84 -31
- package/dist/runtime/editor/features/dragging-overlay/index.vue +3 -2
- package/dist/runtime/editor/features/edit/index.vue +7 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +13 -23
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +10 -102
- package/dist/runtime/editor/features/editable-field/types.d.ts +12 -2
- package/dist/runtime/editor/features/entity-title/index.vue +7 -7
- package/dist/runtime/editor/features/fragments/index.vue +1 -1
- package/dist/runtime/editor/features/import-existing/Dialog/index.vue +8 -13
- package/dist/runtime/editor/features/library/ReusableDialog/index.vue +6 -1
- package/dist/runtime/editor/features/library/index.vue +14 -5
- package/dist/runtime/editor/features/library/types.d.ts +6 -0
- package/dist/runtime/editor/features/media-library/Library/Item.d.vue.ts +2 -2
- package/dist/runtime/editor/features/media-library/Library/Item.vue +17 -1
- package/dist/runtime/editor/features/media-library/Library/Item.vue.d.ts +2 -2
- package/dist/runtime/editor/features/media-library/Library/index.vue +6 -1
- package/dist/runtime/editor/features/media-library/index.vue +4 -4
- package/dist/runtime/editor/features/options/Form/index.vue +11 -43
- package/dist/runtime/editor/features/ownership/Banner/index.d.vue.ts +6 -3
- package/dist/runtime/editor/features/ownership/Banner/index.vue +10 -1
- package/dist/runtime/editor/features/ownership/Banner/index.vue.d.ts +6 -3
- package/dist/runtime/editor/features/ownership/index.vue +18 -6
- package/dist/runtime/editor/features/ownership/types.d.ts +5 -0
- package/dist/runtime/editor/features/publish/index.vue +5 -1
- package/dist/runtime/editor/features/search/Overlay/index.vue +5 -2
- package/dist/runtime/editor/features/search/index.vue +64 -3
- package/dist/runtime/editor/features/search/types.d.ts +16 -1
- package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +1 -3
- package/dist/runtime/editor/features/selection/AddButtons/index.vue +24 -4
- package/dist/runtime/editor/features/selection/Renderer/index.vue +5 -1
- package/dist/runtime/editor/features/selection/index.vue +5 -1
- package/dist/runtime/editor/features/settings/Dialog/index.vue +3 -1
- package/dist/runtime/editor/features/settings/index.vue +4 -1
- package/dist/runtime/editor/features/templates/CreateDialog/index.vue +21 -2
- package/dist/runtime/editor/features/templates/Dialog/Item/index.d.vue.ts +1 -1
- package/dist/runtime/editor/features/templates/Dialog/Item/index.vue +3 -3
- package/dist/runtime/editor/features/templates/Dialog/Item/index.vue.d.ts +1 -1
- package/dist/runtime/editor/features/templates/Dialog/index.vue +21 -5
- package/dist/runtime/editor/features/templates/ManageDialog/Item.d.vue.ts +8 -0
- package/dist/runtime/editor/features/templates/ManageDialog/Item.vue +147 -0
- package/dist/runtime/editor/features/templates/ManageDialog/Item.vue.d.ts +8 -0
- package/dist/runtime/editor/features/templates/ManageDialog/index.vue +30 -107
- package/dist/runtime/editor/features/templates/index.vue +7 -5
- package/dist/runtime/editor/features/templates/types.d.ts +11 -2
- package/dist/runtime/editor/features/transform/Dialog/index.vue +6 -1
- package/dist/runtime/editor/features/transform/index.vue +25 -20
- package/dist/runtime/editor/features/transform/types.d.ts +6 -4
- package/dist/runtime/editor/features/validations/index.vue +6 -1
- package/dist/runtime/editor/helpers/date/index.d.ts +1 -0
- package/dist/runtime/editor/helpers/date/index.js +3 -0
- package/dist/runtime/editor/helpers/options/index.d.ts +20 -0
- package/dist/runtime/editor/helpers/options/index.js +60 -0
- package/dist/runtime/editor/helpers/webgl/index.d.ts +5 -1
- package/dist/runtime/editor/helpers/webgl/index.js +45 -13
- package/dist/runtime/editor/icons/svg/stars.svg +1 -0
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue +13 -10
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +3 -1
- package/dist/runtime/editor/plugins/Sidebar/index.vue +14 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +3 -1
- package/dist/runtime/editor/providers/adapters.d.ts +33 -0
- package/dist/runtime/editor/providers/adapters.js +88 -0
- package/dist/runtime/editor/providers/animation.js +3 -0
- package/dist/runtime/editor/providers/definition.d.ts +7 -0
- package/dist/runtime/editor/providers/definition.js +6 -0
- package/dist/runtime/editor/providers/dom.d.ts +7 -0
- package/dist/runtime/editor/providers/dom.js +12 -0
- package/dist/runtime/editor/providers/permissions.d.ts +6 -0
- package/dist/runtime/editor/providers/permissions.js +9 -0
- package/dist/runtime/editor/providers/plugin.d.ts +1 -0
- package/dist/runtime/editor/providers/state.js +1 -0
- package/dist/runtime/editor/providers/texts.js +20 -6
- package/dist/runtime/editor/providers/types.d.ts +7 -0
- package/dist/runtime/editor/providers/types.js +4 -0
- package/dist/runtime/editor/providers/ui.d.ts +40 -0
- package/dist/runtime/editor/providers/ui.js +27 -1
- package/dist/runtime/editor/translations/de.json +2738 -0
- package/dist/runtime/editor/translations/fr.json +2738 -0
- package/dist/runtime/editor/translations/gsw_CH.json +2738 -0
- package/dist/runtime/editor/translations/it.json +2738 -0
- package/dist/runtime/editor/types/app.d.ts +9 -2
- package/dist/runtime/editor/types/definitions.d.ts +5 -0
- package/dist/runtime/editor/types/features.d.ts +3 -1
- package/dist/runtime/editor/types/permissions.d.ts +17 -0
- package/dist/runtime/editor/types/permissions.js +0 -0
- package/dist/runtime/types/index.d.ts +6 -0
- package/dist/shared/editor.CGf7C_0M.mjs +10 -0
- package/dist/shared/editor.DMFfaLVE.mjs +175 -0
- package/dist/shared/{editor.BKQCh70G.d.mts → editor.Iax3GCvt.d.mts} +94 -40
- package/dist/types.d.mts +8 -2
- package/package.json +29 -7
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
} from "#blokkli/editor/adapter";
|
|
4
4
|
import { falsy } from "#blokkli/helpers";
|
|
5
5
|
import { availableFeaturesAtBuild } from "#blokkli-build/features";
|
|
6
|
+
import { templateEditRouteName } from "#blokkli-build/drupal-config";
|
|
6
7
|
import { operationSources } from "#nuxt-graphql-middleware/sources";
|
|
7
8
|
import {
|
|
8
9
|
useGraphqlQuery,
|
|
@@ -23,6 +24,29 @@ function mapPublishOptions(publishOptions) {
|
|
|
23
24
|
revisionLogMessage: publishOptions.revisionLogMessage ?? null
|
|
24
25
|
};
|
|
25
26
|
}
|
|
27
|
+
const PERMISSION_FIELDS = {
|
|
28
|
+
use_blokkli: "use_blokkli",
|
|
29
|
+
take_ownership: "take_ownership",
|
|
30
|
+
manage_default_templates: "manage_default_templates",
|
|
31
|
+
create_library_item: "create_library_item",
|
|
32
|
+
edit_library_item: "edit_library_item",
|
|
33
|
+
create_comments: "create_comments",
|
|
34
|
+
view_comments: "view_comments",
|
|
35
|
+
use_agent: "use_agent"
|
|
36
|
+
};
|
|
37
|
+
function mapUserPermissions(user) {
|
|
38
|
+
return Object.entries(PERMISSION_FIELDS).filter(([, field]) => user[field] === true).map(([permission]) => permission);
|
|
39
|
+
}
|
|
40
|
+
function valueToFilterString(v) {
|
|
41
|
+
if (typeof v === "string") {
|
|
42
|
+
return v;
|
|
43
|
+
} else if (typeof v === "number") {
|
|
44
|
+
return v.toString();
|
|
45
|
+
} else if (typeof v === "boolean") {
|
|
46
|
+
return v ? "1" : "0";
|
|
47
|
+
}
|
|
48
|
+
return "";
|
|
49
|
+
}
|
|
26
50
|
function configObjectToUserConfigInput(values) {
|
|
27
51
|
if (!values) {
|
|
28
52
|
return [];
|
|
@@ -30,7 +54,7 @@ function configObjectToUserConfigInput(values) {
|
|
|
30
54
|
return Object.entries(values).map(([name, value]) => {
|
|
31
55
|
return {
|
|
32
56
|
name,
|
|
33
|
-
value
|
|
57
|
+
value: valueToFilterString(value)
|
|
34
58
|
};
|
|
35
59
|
});
|
|
36
60
|
}
|
|
@@ -111,6 +135,7 @@ export default defineBlokkliEditAdapter(
|
|
|
111
135
|
}).then((v) => {
|
|
112
136
|
return {
|
|
113
137
|
clipboard: v.data.clipboards || [],
|
|
138
|
+
userPermissions: v.data.userPermissions,
|
|
114
139
|
availableFeatures: v.data.features,
|
|
115
140
|
allTypes: (v.data.allTypes.items || []).filter(
|
|
116
141
|
(v2) => v2 && "id" in v2
|
|
@@ -255,7 +280,14 @@ export default defineBlokkliEditAdapter(
|
|
|
255
280
|
}
|
|
256
281
|
return Promise.resolve(disabled);
|
|
257
282
|
};
|
|
258
|
-
const mapMutation = (v) =>
|
|
283
|
+
const mapMutation = (v) => {
|
|
284
|
+
const action = v.data?.state?.action;
|
|
285
|
+
return {
|
|
286
|
+
success: !!action?.success,
|
|
287
|
+
state: action?.state,
|
|
288
|
+
errors: (action?.errors ?? []).filter(falsy)
|
|
289
|
+
};
|
|
290
|
+
};
|
|
259
291
|
const route = useRoute();
|
|
260
292
|
const router = useRouter();
|
|
261
293
|
const changeLanguage = (translation) => {
|
|
@@ -332,6 +364,10 @@ export default defineBlokkliEditAdapter(
|
|
|
332
364
|
const adapter = {
|
|
333
365
|
addNewBlock,
|
|
334
366
|
buildEditableFrameUrl,
|
|
367
|
+
getUserPermissions: function() {
|
|
368
|
+
const permissions = config.userPermissions ? mapUserPermissions(config.userPermissions) : [];
|
|
369
|
+
return Promise.resolve(permissions);
|
|
370
|
+
},
|
|
335
371
|
changeLanguage,
|
|
336
372
|
formFrameBuilder,
|
|
337
373
|
getAllBundles,
|
|
@@ -755,15 +791,20 @@ export default defineBlokkliEditAdapter(
|
|
|
755
791
|
if (hasQuery("pbSearchTabs")) {
|
|
756
792
|
adapter.getContentSearchTabs = () => {
|
|
757
793
|
return useGraphqlQuery("pbSearchTabs").then((v) => {
|
|
758
|
-
return (v.data.tabs
|
|
759
|
-
(
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
794
|
+
return (v.data.tabs ?? []).map((tab) => {
|
|
795
|
+
if (!tab) {
|
|
796
|
+
return null;
|
|
797
|
+
}
|
|
798
|
+
return {
|
|
799
|
+
id: tab.id,
|
|
800
|
+
title: tab.label,
|
|
801
|
+
description: tab.description ?? null,
|
|
802
|
+
types: tab.types.map((t) => ({
|
|
803
|
+
type: t.entityType,
|
|
804
|
+
bundles: t.bundles
|
|
805
|
+
}))
|
|
806
|
+
};
|
|
807
|
+
}).filter(falsy);
|
|
767
808
|
});
|
|
768
809
|
};
|
|
769
810
|
}
|
|
@@ -893,21 +934,38 @@ export default defineBlokkliEditAdapter(
|
|
|
893
934
|
adapter.templatesSearch = (e) => {
|
|
894
935
|
return useGraphqlQuery("pbSearchTemplates", {
|
|
895
936
|
filters: configObjectToUserConfigInput(e.filters),
|
|
896
|
-
page: e.page
|
|
937
|
+
page: e.page,
|
|
938
|
+
includeItems: e.includeItems
|
|
897
939
|
}).then((data) => {
|
|
898
940
|
return {
|
|
899
|
-
filters: mapPluginConfigInputs(
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
941
|
+
filters: mapPluginConfigInputs(data.data.results?.filters ?? []),
|
|
942
|
+
items: (data.data.results?.items || []).filter(falsy).map((v) => {
|
|
943
|
+
const permissions = [];
|
|
944
|
+
if (v.blokkliMetadata.canDelete) {
|
|
945
|
+
permissions.push("delete");
|
|
946
|
+
}
|
|
947
|
+
if (v.blokkliMetadata.canEdit) {
|
|
948
|
+
permissions.push("edit");
|
|
949
|
+
}
|
|
903
950
|
return {
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
951
|
+
uuid: v.uuid,
|
|
952
|
+
label: v.label ?? "",
|
|
953
|
+
description: v.description,
|
|
954
|
+
isDefault: !!v.isDefault,
|
|
955
|
+
itemBundles: v.templateBundles,
|
|
956
|
+
items: (v.items ?? []).filter(falsy),
|
|
957
|
+
permissions,
|
|
958
|
+
translationLanguages: v.translationLanguages,
|
|
959
|
+
metadata: {
|
|
960
|
+
description: v.description ?? null,
|
|
961
|
+
createdBy: v.blokkliMetadata.createdBy ?? null,
|
|
962
|
+
dateUpdated: v.blokkliMetadata.dateUpdated ?? null,
|
|
963
|
+
dateCreated: v.blokkliMetadata.dateCreated ?? null
|
|
964
|
+
}
|
|
907
965
|
};
|
|
908
966
|
}),
|
|
909
|
-
total: data.data.
|
|
910
|
-
perPage: data.data.
|
|
967
|
+
total: data.data.results?.total || 0,
|
|
968
|
+
perPage: data.data.results?.perPage || 50
|
|
911
969
|
};
|
|
912
970
|
});
|
|
913
971
|
};
|
|
@@ -924,6 +982,19 @@ export default defineBlokkliEditAdapter(
|
|
|
924
982
|
}).then(mapMutation);
|
|
925
983
|
};
|
|
926
984
|
}
|
|
985
|
+
if (hasMutation("pbTemplateDelete")) {
|
|
986
|
+
adapter.templatesDelete = (e) => {
|
|
987
|
+
return useGraphqlMutation("pbTemplateDelete", {
|
|
988
|
+
uuid: e.templateUuid
|
|
989
|
+
}).then((v) => {
|
|
990
|
+
return {
|
|
991
|
+
success: !!v.data.action.success,
|
|
992
|
+
state: v.data.action.state,
|
|
993
|
+
errors: (v.data.action.errors ?? []).filter(falsy)
|
|
994
|
+
};
|
|
995
|
+
});
|
|
996
|
+
};
|
|
997
|
+
}
|
|
927
998
|
if (hasMutation("pbCreateTemplate")) {
|
|
928
999
|
adapter.templatesCreate = (e) => {
|
|
929
1000
|
return useGraphqlMutation("pbCreateTemplate", {
|
|
@@ -935,6 +1006,23 @@ export default defineBlokkliEditAdapter(
|
|
|
935
1006
|
}).then(mapMutation);
|
|
936
1007
|
};
|
|
937
1008
|
}
|
|
1009
|
+
if (hasQuery("pbGetTemplateEntity") && templateEditRouteName) {
|
|
1010
|
+
try {
|
|
1011
|
+
const href = router.resolve({
|
|
1012
|
+
name: templateEditRouteName,
|
|
1013
|
+
params: {
|
|
1014
|
+
uuid: "UUID_PLACEHOLDER"
|
|
1015
|
+
}
|
|
1016
|
+
}).path;
|
|
1017
|
+
adapter.templatesGetEditUrl = (e) => {
|
|
1018
|
+
return href.replace("UUID_PLACEHOLDER", e.templateUuid) + "?blokkliEditing=" + e.templateUuid;
|
|
1019
|
+
};
|
|
1020
|
+
} catch {
|
|
1021
|
+
console.error(
|
|
1022
|
+
`The provided templateEditRouteName "${templateEditRouteName}" is not valid. Editing templates will not be possible.`
|
|
1023
|
+
);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
938
1026
|
if (hasMutation("pbUnschedule")) {
|
|
939
1027
|
adapter.unscheduleEditState = (options) => useGraphqlMutation("pbUnschedule", {
|
|
940
1028
|
entityType: options.hostEntityType.toUpperCase(),
|
|
@@ -957,6 +1045,143 @@ export default defineBlokkliEditAdapter(
|
|
|
957
1045
|
items: blocks
|
|
958
1046
|
}).then(mapMutation);
|
|
959
1047
|
}
|
|
1048
|
+
if (hasMutation("pbSwapParagraphs")) {
|
|
1049
|
+
adapter.swapBlocks = (uuid1, uuid2) => useGraphqlMutation("pbSwapParagraphs", {
|
|
1050
|
+
entityType: ctx.value.entityType,
|
|
1051
|
+
entityUuid: ctx.value.entityUuid,
|
|
1052
|
+
langcode: ctx.value.langcode,
|
|
1053
|
+
uuid1,
|
|
1054
|
+
uuid2
|
|
1055
|
+
}).then(mapMutation);
|
|
1056
|
+
}
|
|
1057
|
+
if (hasMutation("pbReplaceEntityReference")) {
|
|
1058
|
+
adapter.replaceContentSearchItem = (data) => useGraphqlMutation("pbReplaceEntityReference", {
|
|
1059
|
+
entityType: ctx.value.entityType,
|
|
1060
|
+
entityUuid: ctx.value.entityUuid,
|
|
1061
|
+
langcode: ctx.value.langcode,
|
|
1062
|
+
targetType: data.item.entityType,
|
|
1063
|
+
targetBundle: data.item.entityBundle,
|
|
1064
|
+
targetId: data.item.id,
|
|
1065
|
+
uuid: data.host.uuid
|
|
1066
|
+
}).then(mapMutation);
|
|
1067
|
+
}
|
|
1068
|
+
if (hasMutation("pbAddMultipleParagraphs")) {
|
|
1069
|
+
const mapBlockToGraphQL = (block) => {
|
|
1070
|
+
const values = {};
|
|
1071
|
+
for (const entry of block.values ?? []) {
|
|
1072
|
+
const droppableConfig = config.droppableFieldConfig.find(
|
|
1073
|
+
(f) => f.entityBundle === block.bundle && f.name === entry.fieldName
|
|
1074
|
+
);
|
|
1075
|
+
if (droppableConfig) {
|
|
1076
|
+
if (droppableConfig.type === "reference") {
|
|
1077
|
+
if (typeof entry.fieldValue !== "string") {
|
|
1078
|
+
values[entry.fieldName] = {
|
|
1079
|
+
target_id: entry.fieldValue.entityId
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
} else if (droppableConfig.type === "link") {
|
|
1083
|
+
if (typeof entry.fieldValue === "string") {
|
|
1084
|
+
values[entry.fieldName] = entry.fieldValue;
|
|
1085
|
+
} else {
|
|
1086
|
+
values[entry.fieldName] = `entity:${entry.fieldValue.entityType}/${entry.fieldValue.entityId}`;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
} else if (typeof entry.fieldValue === "string") {
|
|
1090
|
+
values[entry.fieldName] = entry.fieldValue;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
return {
|
|
1094
|
+
bundle: block.bundle,
|
|
1095
|
+
uuid: block.blockUuid,
|
|
1096
|
+
values,
|
|
1097
|
+
options: block.options,
|
|
1098
|
+
children: block.children ? Object.entries(block.children).map(
|
|
1099
|
+
([fieldName, childBlocks]) => ({
|
|
1100
|
+
fieldName,
|
|
1101
|
+
items: childBlocks.map(mapBlockToGraphQL)
|
|
1102
|
+
})
|
|
1103
|
+
) : void 0
|
|
1104
|
+
};
|
|
1105
|
+
};
|
|
1106
|
+
adapter.addNewBlocks = (data) => useGraphqlMutation("pbAddMultipleParagraphs", {
|
|
1107
|
+
entityType: ctx.value.entityType,
|
|
1108
|
+
entityUuid: ctx.value.entityUuid,
|
|
1109
|
+
langcode: ctx.value.langcode,
|
|
1110
|
+
hostType: data.host.type,
|
|
1111
|
+
hostUuid: data.host.uuid,
|
|
1112
|
+
hostFieldName: data.host.fieldName,
|
|
1113
|
+
afterUuid: data.afterUuid,
|
|
1114
|
+
items: data.blocks.map(mapBlockToGraphQL)
|
|
1115
|
+
}).then(mapMutation);
|
|
1116
|
+
}
|
|
1117
|
+
if (hasMutation("paragraphsBlokkliAgentToken")) {
|
|
1118
|
+
adapter.getAgentAuthToken = function() {
|
|
1119
|
+
return useGraphqlMutation("paragraphsBlokkliAgentToken").then(
|
|
1120
|
+
(v) => v.data.token ?? null
|
|
1121
|
+
);
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
if (hasMutation("pbAgentConversationUpsert") && hasMutation("pbAgentConversationDelete") && hasQuery("pbAgentConversations") && hasQuery("pbAgentConversation")) {
|
|
1125
|
+
const hostParams = () => ({
|
|
1126
|
+
hostEntityType: providedContext.value.entityType,
|
|
1127
|
+
hostEntityUuid: providedContext.value.entityUuid
|
|
1128
|
+
});
|
|
1129
|
+
adapter.agentConversations = {
|
|
1130
|
+
upsert: (data) => useGraphqlMutation("pbAgentConversationUpsert", {
|
|
1131
|
+
...hostParams(),
|
|
1132
|
+
uuid: data.uuid,
|
|
1133
|
+
title: data.title,
|
|
1134
|
+
dataUser: data.clientState,
|
|
1135
|
+
dataServer: data.serverState,
|
|
1136
|
+
hash: data.hash
|
|
1137
|
+
}).then((v) => v.data.result.success),
|
|
1138
|
+
load: (uuid) => useGraphqlQuery("pbAgentConversation", {
|
|
1139
|
+
...hostParams(),
|
|
1140
|
+
uuid
|
|
1141
|
+
}).then((v) => v.data.conversation ?? null),
|
|
1142
|
+
loadLatest: () => useGraphqlQuery("pbAgentConversation", hostParams()).then(
|
|
1143
|
+
(v) => v.data.conversation ?? null
|
|
1144
|
+
),
|
|
1145
|
+
list: () => useGraphqlQuery("pbAgentConversations", hostParams()).then(
|
|
1146
|
+
(v) => v.data.conversations
|
|
1147
|
+
),
|
|
1148
|
+
delete: (uuid) => useGraphqlMutation("pbAgentConversationDelete", { uuid }).then(
|
|
1149
|
+
(v) => v.data.result.success
|
|
1150
|
+
)
|
|
1151
|
+
};
|
|
1152
|
+
}
|
|
1153
|
+
if (hasMutation("pbBulkUpdateFieldValues")) {
|
|
1154
|
+
adapter.updateFieldValueBatched = (data) => {
|
|
1155
|
+
const entityItems = data.entityItems.map((item) => {
|
|
1156
|
+
return {
|
|
1157
|
+
name: item.fieldName,
|
|
1158
|
+
value: item.fieldValue
|
|
1159
|
+
};
|
|
1160
|
+
});
|
|
1161
|
+
const blockItems = data.items.map((item) => {
|
|
1162
|
+
return {
|
|
1163
|
+
uuid: item.uuid,
|
|
1164
|
+
name: item.fieldName,
|
|
1165
|
+
value: item.fieldValue
|
|
1166
|
+
};
|
|
1167
|
+
});
|
|
1168
|
+
return useGraphqlMutation("pbBulkUpdateFieldValues", {
|
|
1169
|
+
...ctx.value,
|
|
1170
|
+
items: [...entityItems, ...blockItems]
|
|
1171
|
+
}).then(mapMutation);
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
if (hasMutation("pbRearrangeParagraphs")) {
|
|
1175
|
+
adapter.rearrangeBlocks = (data) => {
|
|
1176
|
+
return useGraphqlMutation("pbRearrangeParagraphs", {
|
|
1177
|
+
...ctx.value,
|
|
1178
|
+
hostType: data.host.type,
|
|
1179
|
+
hostFieldName: data.host.fieldName,
|
|
1180
|
+
hostUuid: data.host.uuid,
|
|
1181
|
+
uuids: data.uuids
|
|
1182
|
+
}).then(mapMutation);
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
960
1185
|
return adapter;
|
|
961
1186
|
}
|
|
962
1187
|
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/**
|
|
3
|
+
* The UUID of the template.
|
|
4
|
+
*/
|
|
5
|
+
uuid: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BlokkliProvider v-if="entity" v-bind="entity.blokkliProps">
|
|
3
|
+
<BlokkliField name="paragraphs" :list="entity.items" />
|
|
4
|
+
</BlokkliProvider>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import { BlokkliProvider, BlokkliField } from "#components";
|
|
9
|
+
import { useGraphqlQuery, useAsyncData } from "#imports";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
uuid: { type: String, required: true }
|
|
12
|
+
});
|
|
13
|
+
const { data: entity } = await useAsyncData(
|
|
14
|
+
"blokkli-drupal-edit-template-" + props.uuid,
|
|
15
|
+
() => {
|
|
16
|
+
return useGraphqlQuery("pbGetTemplateEntity", { uuid: props.uuid }).then(
|
|
17
|
+
(v) => {
|
|
18
|
+
if (v.data.paragraphsBlokkliTemplateGet) {
|
|
19
|
+
return v.data.paragraphsBlokkliTemplateGet;
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/**
|
|
3
|
+
* The UUID of the template.
|
|
4
|
+
*/
|
|
5
|
+
uuid: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { getComponent } from "#blokkli/helpers/imports";
|
|
7
7
|
import { provide, defineBlokkli, inject } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
INJECT_ALL_COMPONENTS_CHUNK,
|
|
10
|
+
INJECT_FRAGMENT_CONTEXT
|
|
11
|
+
} from "#blokkli/helpers/injections";
|
|
9
12
|
const componentProps = defineProps({
|
|
10
13
|
name: { type: null, required: true }
|
|
11
14
|
});
|
|
@@ -17,6 +20,12 @@ const ctx = defineBlokkli({
|
|
|
17
20
|
}
|
|
18
21
|
});
|
|
19
22
|
const allComponentsChunk = inject(INJECT_ALL_COMPONENTS_CHUNK, null);
|
|
20
|
-
const component = getComponent(
|
|
23
|
+
const component = getComponent(
|
|
24
|
+
"fragment",
|
|
25
|
+
componentProps.name,
|
|
26
|
+
void 0,
|
|
27
|
+
void 0,
|
|
28
|
+
allComponentsChunk
|
|
29
|
+
);
|
|
21
30
|
provide(INJECT_FRAGMENT_CONTEXT, ctx);
|
|
22
31
|
</script>
|
|
@@ -65,7 +65,9 @@ const itemProps = computed(() => {
|
|
|
65
65
|
}
|
|
66
66
|
return componentProps.props;
|
|
67
67
|
});
|
|
68
|
-
const component = isProxyMode || isGlobalProxyMode?.value ? defineAsyncComponent(
|
|
68
|
+
const component = isProxyMode || isGlobalProxyMode?.value ? defineAsyncComponent(
|
|
69
|
+
() => import("./../editor/components/BlockProxy/index.vue")
|
|
70
|
+
) : getComponent(
|
|
69
71
|
"block",
|
|
70
72
|
componentProps.bundle,
|
|
71
73
|
fieldListType?.value || "default",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ComputedRef } from '#imports';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FullBlokkliAdapter, AdapterMethods } from '#blokkli/editor/adapter';
|
|
3
3
|
import type { ValidFeatureKey } from '#blokkli-build/features';
|
|
4
4
|
import type { DebugLogger } from '#blokkli/editor/providers/debug';
|
|
5
|
+
import type { AdaptersProvider } from '#blokkli/editor/providers/adapters';
|
|
5
6
|
import type { FeatureDefinition } from '#blokkli/editor/types/features';
|
|
6
7
|
type SettingType<S> = S extends {
|
|
7
8
|
type: 'checkbox';
|
|
@@ -15,9 +16,10 @@ type SettingType<S> = S extends {
|
|
|
15
16
|
type SettingsTypes<S> = {
|
|
16
17
|
[P in keyof S]: SettingType<S[P]>;
|
|
17
18
|
};
|
|
18
|
-
type RequireAdapterMethods<T extends
|
|
19
|
+
type RequireAdapterMethods<T extends FullBlokkliAdapter<any>, Methods extends readonly AdapterMethods[]> = Omit<T, Methods[number]> & Required<Pick<T, Methods[number] & keyof T>>;
|
|
19
20
|
type DefineBlokkliFeature<F extends FeatureDefinition<any, any>> = {
|
|
20
|
-
adapter: F['requiredAdapterMethods'] extends readonly
|
|
21
|
+
adapter: F['requiredAdapterMethods'] extends readonly AdapterMethods[] ? RequireAdapterMethods<FullBlokkliAdapter<any>, F['requiredAdapterMethods']> : FullBlokkliAdapter<any>;
|
|
22
|
+
adapters: AdaptersProvider;
|
|
21
23
|
settings: ComputedRef<SettingsTypes<F['settings']>>;
|
|
22
24
|
logger: DebugLogger;
|
|
23
25
|
};
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import { settingsOverride } from "#blokkli-build/editor-config";
|
|
9
9
|
import { INJECT_EDIT_LOGGER } from "#blokkli/helpers/injections";
|
|
10
10
|
export function defineBlokkliFeature(feature) {
|
|
11
|
-
const { adapter, storage, features, debug } = useBlokkli();
|
|
11
|
+
const { adapter, adapters, storage, features, debug } = useBlokkli();
|
|
12
12
|
const logger = debug.createLogger(feature.label || feature.id);
|
|
13
13
|
const storageKey = computed(() => `feature:${feature.id}:settings`);
|
|
14
14
|
const defaults = Object.entries(feature.settings || {}).reduce((acc, [key, config]) => {
|
|
@@ -56,6 +56,7 @@ export function defineBlokkliFeature(feature) {
|
|
|
56
56
|
provide(INJECT_EDIT_LOGGER, logger);
|
|
57
57
|
return {
|
|
58
58
|
adapter,
|
|
59
|
+
adapters,
|
|
59
60
|
settings,
|
|
60
61
|
logger
|
|
61
62
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue';
|
|
2
|
-
import type { AddNewBlockEvent, MoveBlockEvent, MoveMultipleBlocksEvent } from '../events/index.js';
|
|
2
|
+
import type { AddNewBlockEvent, AddNewBlocksEvent, MoveBlockEvent, MoveMultipleBlocksEvent } from '../events/index.js';
|
|
3
3
|
import type { PluginConfigInput } from '../types/pluginConfig.js';
|
|
4
4
|
import type { EntityTranslation, MappedState } from '../types/state.js';
|
|
5
5
|
import type { BlockBundleDefinition, FieldConfig } from '../types/definitions.js';
|
|
6
6
|
import type { EditBlockEvent } from '../features/edit/types.js';
|
|
7
|
+
import type { UserPermissions } from '../types/permissions.js';
|
|
7
8
|
export interface MutationResponseLike<T> {
|
|
8
9
|
success: boolean;
|
|
9
|
-
state
|
|
10
|
+
state?: T;
|
|
10
11
|
errors?: string[];
|
|
11
12
|
}
|
|
12
13
|
export type UpdateEntityFieldValueEvent = {
|
|
@@ -66,6 +67,7 @@ export interface BlokkliAdapter<T> {
|
|
|
66
67
|
*/
|
|
67
68
|
loadStateAtIndex?: (index: number) => Promise<T | undefined>;
|
|
68
69
|
mapState(state: T): MappedState;
|
|
70
|
+
getUserPermissions: () => Promise<UserPermissions[]>;
|
|
69
71
|
/**
|
|
70
72
|
* Get disabled features at runtime.
|
|
71
73
|
*
|
|
@@ -88,6 +90,10 @@ export interface BlokkliAdapter<T> {
|
|
|
88
90
|
* Add a new block.
|
|
89
91
|
*/
|
|
90
92
|
addNewBlock(e: AddNewBlockEvent): Promise<MutationResponseLike<T>>;
|
|
93
|
+
/**
|
|
94
|
+
* Add multiple new blocks at once.
|
|
95
|
+
*/
|
|
96
|
+
addNewBlocks?(e: AddNewBlocksEvent): Promise<MutationResponseLike<T>>;
|
|
91
97
|
/**
|
|
92
98
|
* Move an item.
|
|
93
99
|
*/
|
|
@@ -115,7 +121,42 @@ export interface BlokkliAdapter<T> {
|
|
|
115
121
|
persist: (settings: string) => Promise<undefined>;
|
|
116
122
|
};
|
|
117
123
|
}
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Methods that adapter extensions can implement.
|
|
126
|
+
* Features augment this interface via module augmentation to add extensible methods.
|
|
127
|
+
* These methods can be implemented by both the base adapter AND extensions.
|
|
128
|
+
*/
|
|
129
|
+
export interface AdapterExtensionMethods<T> {
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The full adapter type combining core methods with extensible methods.
|
|
133
|
+
*/
|
|
134
|
+
export type FullBlokkliAdapter<T> = BlokkliAdapter<T> & Partial<AdapterExtensionMethods<T>>;
|
|
135
|
+
export type BlokkliAdapterFactory<T> = (ctx: ComputedRef<AdapterContext>) => Promise<FullBlokkliAdapter<T>> | FullBlokkliAdapter<T>;
|
|
136
|
+
export type AdapterMethods = keyof BlokkliAdapter<any> | keyof AdapterExtensionMethods<any>;
|
|
120
137
|
export declare function defineBlokkliEditAdapter<T>(cb: BlokkliAdapterFactory<T>): BlokkliAdapterFactory<T>;
|
|
138
|
+
/**
|
|
139
|
+
* An adapter extension (with namespace assigned by build system).
|
|
140
|
+
*/
|
|
141
|
+
export interface BlokkliAdapterExtension<T = any> {
|
|
142
|
+
/**
|
|
143
|
+
* Unique namespace (e.g., '@my-org/ai').
|
|
144
|
+
* Assigned by the build system from registerAdapterExtension().
|
|
145
|
+
*/
|
|
146
|
+
namespace: string;
|
|
147
|
+
/**
|
|
148
|
+
* Extension methods.
|
|
149
|
+
*/
|
|
150
|
+
methods: Partial<AdapterExtensionMethods<T>>;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Factory type for extension files.
|
|
154
|
+
* Just returns methods - namespace is assigned externally.
|
|
155
|
+
*/
|
|
156
|
+
export type BlokkliAdapterExtensionFactory<T> = (ctx: ComputedRef<AdapterContext>) => Promise<Partial<AdapterExtensionMethods<T>>> | Partial<AdapterExtensionMethods<T>>;
|
|
157
|
+
/**
|
|
158
|
+
* Define an adapter extension.
|
|
159
|
+
* The namespace is NOT specified here - it's assigned via registerAdapterExtension().
|
|
160
|
+
*/
|
|
161
|
+
export declare function defineBlokkliAdapterExtension<T>(factory: BlokkliAdapterExtensionFactory<T>): BlokkliAdapterExtensionFactory<T>;
|
|
121
162
|
export {};
|
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
id="bk-blokkli-item-actions-dropdown"
|
|
4
4
|
class="bk-blokkli-item-actions-type-dropdown"
|
|
5
5
|
>
|
|
6
|
-
<div
|
|
6
|
+
<div
|
|
7
|
+
v-for="group in groups"
|
|
8
|
+
:key="group.name"
|
|
9
|
+
:class="'bk-is-' + group.name"
|
|
10
|
+
>
|
|
7
11
|
<ol>
|
|
8
12
|
<li v-for="action in group.actions" :key="action.id">
|
|
9
13
|
<button
|
|
10
14
|
class="bk-blokkli-item-actions-type-dropdown-button"
|
|
15
|
+
:class="'bk-is-variant-' + action.variant || 'default'"
|
|
11
16
|
:disabled="action.enabled === false"
|
|
12
17
|
@click.prevent="onActionClick(action)"
|
|
13
18
|
>
|
|
@@ -87,7 +87,10 @@ import { falsy } from "#blokkli/helpers";
|
|
|
87
87
|
import { Icon, ItemIconBox } from "#blokkli/editor/components";
|
|
88
88
|
import EditActionsItemDropdown from "./ItemDropdown.vue";
|
|
89
89
|
import { onBlokkliEvent, useStickyToolbar } from "#blokkli/editor/composables";
|
|
90
|
-
import {
|
|
90
|
+
import {
|
|
91
|
+
fragmentBlockBundle,
|
|
92
|
+
fromLibraryBlockBundle
|
|
93
|
+
} from "#blokkli-build/config";
|
|
91
94
|
const { selection, $t, types, state, ui, definitions, debug } = useBlokkli();
|
|
92
95
|
const editingEnabled = computed(
|
|
93
96
|
() => state.editMode.value === "editing" || state.editMode.value === "translating"
|
|
@@ -10,10 +10,18 @@ export type AddListItemProps = {
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
isAutoAdd?: boolean;
|
|
12
12
|
noContextMenu?: boolean;
|
|
13
|
+
useHelp?: boolean;
|
|
14
|
+
helpActive?: boolean;
|
|
13
15
|
};
|
|
14
16
|
declare const __VLS_export: import("vue").DefineComponent<AddListItemProps, {
|
|
15
17
|
getElement: () => HTMLElement | null;
|
|
16
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
help: (d: HTMLElement) => void;
|
|
20
|
+
startHelp: (d: HTMLElement) => void;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<AddListItemProps> & Readonly<{
|
|
22
|
+
onHelp?: ((d: HTMLElement) => any) | undefined;
|
|
23
|
+
onStartHelp?: ((d: HTMLElement) => any) | undefined;
|
|
24
|
+
}>, {
|
|
17
25
|
bundle: string;
|
|
18
26
|
description: string;
|
|
19
27
|
icon: BlokkliIcon;
|