@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
|
@@ -35,18 +35,79 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script setup>
|
|
38
|
-
import {
|
|
38
|
+
import {
|
|
39
|
+
nextTick,
|
|
40
|
+
ref,
|
|
41
|
+
useBlokkli,
|
|
42
|
+
defineBlokkliFeature,
|
|
43
|
+
useTemplateRef
|
|
44
|
+
} from "#imports";
|
|
39
45
|
import Overlay from "./Overlay/index.vue";
|
|
40
46
|
import { BlokkliTransition } from "#blokkli/editor/components";
|
|
41
47
|
import { PluginToolbarButton } from "#blokkli/editor/plugins";
|
|
42
|
-
import { onBlokkliEvent } from "#blokkli/editor/composables";
|
|
48
|
+
import { onBlokkliEvent, defineDropAreas } from "#blokkli/editor/composables";
|
|
49
|
+
import { falsy } from "#blokkli/helpers";
|
|
50
|
+
import { itemEntityType } from "#blokkli-build/config";
|
|
43
51
|
defineBlokkliFeature({
|
|
44
52
|
id: "search",
|
|
45
53
|
icon: "bk_mdi_search",
|
|
46
54
|
label: "Search",
|
|
47
55
|
description: "Provides an overlay with shortcut to search for blocks on the current page or existing content to add as blocks."
|
|
48
56
|
});
|
|
49
|
-
const { $t, selection, ui } = useBlokkli();
|
|
57
|
+
const { $t, selection, ui, adapter, state, types, directive } = useBlokkli();
|
|
58
|
+
const ERROR_MESSAGE = $t(
|
|
59
|
+
"searchContentReplaceFailed",
|
|
60
|
+
"Failed to replace content."
|
|
61
|
+
);
|
|
62
|
+
defineDropAreas((dragItems) => {
|
|
63
|
+
if (!adapter.replaceContentSearchItem) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (dragItems.length !== 1) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const item = dragItems[0];
|
|
70
|
+
if (item.itemType !== "search_content") {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const searchItem = item.searchItem;
|
|
74
|
+
return directive.getDroppableElements().map((field) => {
|
|
75
|
+
if (field.type !== itemEntityType) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const config = types.getDroppableFieldConfig(field.fieldName, field);
|
|
79
|
+
const allowedBundles = config.allowed.find(
|
|
80
|
+
(v) => v.type === searchItem.entityType
|
|
81
|
+
)?.bundles;
|
|
82
|
+
if (!allowedBundles || !allowedBundles.includes(searchItem.entityBundle)) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const host = {
|
|
86
|
+
uuid: field.uuid,
|
|
87
|
+
type: field.type,
|
|
88
|
+
fieldName: field.fieldName
|
|
89
|
+
};
|
|
90
|
+
const label = $t("searchContentReplace", "Replace @field").replace(
|
|
91
|
+
"@field",
|
|
92
|
+
config.label
|
|
93
|
+
);
|
|
94
|
+
return {
|
|
95
|
+
id: `replace-search-content:${field.uuid}:${field.fieldName}`,
|
|
96
|
+
label,
|
|
97
|
+
element: field.element,
|
|
98
|
+
icon: "bk_mdi_swap_horiz",
|
|
99
|
+
onDrop: () => {
|
|
100
|
+
return state.mutateWithLoadingState(
|
|
101
|
+
() => adapter.replaceContentSearchItem({
|
|
102
|
+
host,
|
|
103
|
+
item: searchItem
|
|
104
|
+
}),
|
|
105
|
+
ERROR_MESSAGE
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}).filter(falsy);
|
|
110
|
+
});
|
|
50
111
|
const isRendered = ref(false);
|
|
51
112
|
const isVisible = ref(false);
|
|
52
113
|
const overlay = useTemplateRef("overlay");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EntityTypeRestriction } from '#blokkli/editor/types/definitions';
|
|
1
2
|
import type { BlokkliItemHost } from '#blokkli/editor/types/field';
|
|
2
3
|
export type AddContentSearchItemEvent = {
|
|
3
4
|
item: SearchContentItem;
|
|
@@ -5,12 +6,22 @@ export type AddContentSearchItemEvent = {
|
|
|
5
6
|
bundle: string;
|
|
6
7
|
afterUuid: string | null;
|
|
7
8
|
};
|
|
9
|
+
export type ReplaceContentSearchItemEvent = {
|
|
10
|
+
host: BlokkliItemHost;
|
|
11
|
+
item: SearchContentItem;
|
|
12
|
+
};
|
|
8
13
|
export interface DraggableSearchContentItem {
|
|
9
14
|
itemType: 'search_content';
|
|
10
15
|
element: () => HTMLElement;
|
|
11
16
|
itemBundles: string[];
|
|
12
17
|
searchItem: SearchContentItem;
|
|
13
18
|
}
|
|
19
|
+
export type ContentSearchTab = {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
description: string | null;
|
|
23
|
+
types: EntityTypeRestriction[];
|
|
24
|
+
};
|
|
14
25
|
/**
|
|
15
26
|
* Defines a content search item.
|
|
16
27
|
*/
|
|
@@ -53,7 +64,7 @@ declare module '#blokkli/editor/adapter' {
|
|
|
53
64
|
/**
|
|
54
65
|
* Return the possible content search tabs.
|
|
55
66
|
*/
|
|
56
|
-
getContentSearchTabs?: () =>
|
|
67
|
+
getContentSearchTabs?: () => ContentSearchTab[] | Promise<ContentSearchTab[]>;
|
|
57
68
|
/**
|
|
58
69
|
* Return items for the "content" search.
|
|
59
70
|
*
|
|
@@ -64,6 +75,10 @@ declare module '#blokkli/editor/adapter' {
|
|
|
64
75
|
* Add the dropped item from a search content item.
|
|
65
76
|
*/
|
|
66
77
|
addContentSearchItem?: (e: AddContentSearchItemEvent) => Promise<MutationResponseLike<T>> | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Replace a content reference on an existing block from a search content item.
|
|
80
|
+
*/
|
|
81
|
+
replaceContentSearchItem?: (e: ReplaceContentSearchItemEvent) => Promise<MutationResponseLike<T>> | undefined;
|
|
67
82
|
}
|
|
68
83
|
}
|
|
69
84
|
declare module '#blokkli/editor/types/draggable' {
|
|
@@ -293,9 +293,7 @@ function adjustEmptyFieldButtonPosition(fieldX, fieldY, blockRect, artboardScale
|
|
|
293
293
|
const distToBefore = Math.sqrt(
|
|
294
294
|
(fieldX - beforeX) ** 2 + (fieldY - beforeY) ** 2
|
|
295
295
|
);
|
|
296
|
-
const distToAfter = Math.sqrt(
|
|
297
|
-
(fieldX - afterX) ** 2 + (fieldY - afterY) ** 2
|
|
298
|
-
);
|
|
296
|
+
const distToAfter = Math.sqrt((fieldX - afterX) ** 2 + (fieldY - afterY) ** 2);
|
|
299
297
|
if (distToBefore < minDistanceArtboard || distToAfter < minDistanceArtboard) {
|
|
300
298
|
return {
|
|
301
299
|
x: blockRect.x + blockRect.width / 2,
|
|
@@ -49,7 +49,18 @@ import { onBlokkliEvent } from "#blokkli/editor/composables";
|
|
|
49
49
|
const props = defineProps({
|
|
50
50
|
items: { type: Array, required: true }
|
|
51
51
|
});
|
|
52
|
-
const {
|
|
52
|
+
const {
|
|
53
|
+
dom,
|
|
54
|
+
state,
|
|
55
|
+
eventBus,
|
|
56
|
+
types,
|
|
57
|
+
$t,
|
|
58
|
+
blocks,
|
|
59
|
+
fields,
|
|
60
|
+
animation,
|
|
61
|
+
context,
|
|
62
|
+
selection
|
|
63
|
+
} = useBlokkli();
|
|
53
64
|
const isLocked = ref(false);
|
|
54
65
|
const shouldRender = computed(() => {
|
|
55
66
|
return props.items.length === 1;
|
|
@@ -81,7 +92,10 @@ const emptyBlockFields = computed(() => {
|
|
|
81
92
|
});
|
|
82
93
|
});
|
|
83
94
|
const emptyHostFields = computed(() => {
|
|
84
|
-
return types.fieldConfig.forEntityTypeAndBundle(
|
|
95
|
+
return types.fieldConfig.forEntityTypeAndBundle(
|
|
96
|
+
context.value.entityType,
|
|
97
|
+
context.value.entityBundle
|
|
98
|
+
).map((field) => {
|
|
85
99
|
const key = getFieldKey(context.value.entityUuid, field.name);
|
|
86
100
|
const count = state.getFieldBlockCount(key);
|
|
87
101
|
return {
|
|
@@ -176,7 +190,10 @@ const fieldTooltips = computed(() => {
|
|
|
176
190
|
});
|
|
177
191
|
const hostFieldTooltips = computed(() => {
|
|
178
192
|
return emptyHostFields.value.map((field) => {
|
|
179
|
-
const fieldConfig = types.fieldConfig.forEntityTypeAndBundle(
|
|
193
|
+
const fieldConfig = types.fieldConfig.forEntityTypeAndBundle(
|
|
194
|
+
context.value.entityType,
|
|
195
|
+
context.value.entityBundle
|
|
196
|
+
).find((f) => f.name === field.name);
|
|
180
197
|
const fieldLabel = fieldConfig?.label || field.name;
|
|
181
198
|
const fieldElement = fields.find(context.value.entityUuid, field.name);
|
|
182
199
|
if (fieldElement) {
|
|
@@ -191,7 +208,10 @@ const hostFieldTooltips = computed(() => {
|
|
|
191
208
|
}
|
|
192
209
|
}
|
|
193
210
|
}
|
|
194
|
-
return $t("addButtonToField", "Add to @fieldLabel...").replace(
|
|
211
|
+
return $t("addButtonToField", "Add to @fieldLabel...").replace(
|
|
212
|
+
"@fieldLabel",
|
|
213
|
+
fieldLabel
|
|
214
|
+
);
|
|
195
215
|
});
|
|
196
216
|
});
|
|
197
217
|
watch(emptyBlockFields, (fields2) => {
|
|
@@ -13,7 +13,11 @@ import vs from "./vertex.glsl?raw";
|
|
|
13
13
|
import fs from "./fragment.glsl?raw";
|
|
14
14
|
import { RectangleBufferCollector } from "#blokkli/editor/helpers/webgl";
|
|
15
15
|
import { toShaderColor } from "#blokkli/editor/helpers/color";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
defineRenderer,
|
|
18
|
+
onBlokkliEvent,
|
|
19
|
+
useTransitionedValue
|
|
20
|
+
} from "#blokkli/editor/composables";
|
|
17
21
|
const props = defineProps({
|
|
18
22
|
blocks: { type: Array, required: true },
|
|
19
23
|
hasHostSelected: { type: Boolean, required: true }
|
|
@@ -30,7 +30,11 @@ import {
|
|
|
30
30
|
watch
|
|
31
31
|
} from "#imports";
|
|
32
32
|
import { itemEntityType } from "#blokkli-build/config";
|
|
33
|
-
import {
|
|
33
|
+
import {
|
|
34
|
+
defineItemDropdownAction,
|
|
35
|
+
onBlokkliEvent,
|
|
36
|
+
useStateBasedCache
|
|
37
|
+
} from "#blokkli/editor/composables";
|
|
34
38
|
defineBlokkliFeature({
|
|
35
39
|
id: "selection",
|
|
36
40
|
icon: "bk_mdi_select",
|
|
@@ -31,7 +31,9 @@
|
|
|
31
31
|
import { useBlokkli, computed } from "#imports";
|
|
32
32
|
import { DialogModal } from "#blokkli/editor/components";
|
|
33
33
|
import FeatureSettingComponent from "./FeatureSetting/index.vue";
|
|
34
|
-
import {
|
|
34
|
+
import {
|
|
35
|
+
SETTINGS_GROUP
|
|
36
|
+
} from "../../../../../global/constants";
|
|
35
37
|
import { settingsOverride } from "#blokkli-build/editor-config";
|
|
36
38
|
const { $t, features, ui } = useBlokkli();
|
|
37
39
|
const getTranslation = $t;
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
import { useBlokkli, defineBlokkliFeature, computed } from "#imports";
|
|
11
11
|
import SettingsDialog from "./Dialog/index.vue";
|
|
12
12
|
import { BlokkliTransition } from "#blokkli/editor/components";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
addElementClasses,
|
|
15
|
+
defineMenuButton
|
|
16
|
+
} from "#blokkli/editor/composables";
|
|
14
17
|
const { ui, $t } = useBlokkli();
|
|
15
18
|
const { settings } = defineBlokkliFeature({
|
|
16
19
|
id: "settings",
|
|
@@ -41,10 +41,12 @@
|
|
|
41
41
|
"
|
|
42
42
|
/>
|
|
43
43
|
</FormItem>
|
|
44
|
-
<FormItem
|
|
44
|
+
<FormItem>
|
|
45
45
|
<FormToggle
|
|
46
46
|
v-model="isDefault"
|
|
47
47
|
:label="$t('templatesCreateDialogDefaultLabel', 'Use as default')"
|
|
48
|
+
:disabled="!!disabledReason"
|
|
49
|
+
:disabled-reason
|
|
48
50
|
:description="
|
|
49
51
|
$t(
|
|
50
52
|
'templatesCreateDialogDefaultDescription',
|
|
@@ -74,7 +76,7 @@ import {
|
|
|
74
76
|
BlockPreviewRenderer
|
|
75
77
|
} from "#blokkli/editor/components";
|
|
76
78
|
const emit = defineEmits(["confirm", "cancel"]);
|
|
77
|
-
const { $t, ui } = useBlokkli();
|
|
79
|
+
const { $t, ui, permissions } = useBlokkli();
|
|
78
80
|
const props = defineProps({
|
|
79
81
|
uuids: { type: Array, required: true }
|
|
80
82
|
});
|
|
@@ -82,6 +84,23 @@ const label = ref("");
|
|
|
82
84
|
const description = ref("");
|
|
83
85
|
const isDefault = ref(false);
|
|
84
86
|
const canBeDefault = computed(() => props.uuids.length === 1);
|
|
87
|
+
const userCanMakeDefault = computed(
|
|
88
|
+
() => permissions.hasPermission("manage_default_templates")
|
|
89
|
+
);
|
|
90
|
+
const disabledReason = computed(() => {
|
|
91
|
+
if (!canBeDefault.value) {
|
|
92
|
+
return $t(
|
|
93
|
+
"templatesCanNotBeDefault",
|
|
94
|
+
"Only single blocks can be made default."
|
|
95
|
+
);
|
|
96
|
+
} else if (!userCanMakeDefault.value) {
|
|
97
|
+
return $t(
|
|
98
|
+
"templatesMissingDefaultPermissions",
|
|
99
|
+
"Missing permission to create default templates."
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
});
|
|
85
104
|
watch(
|
|
86
105
|
label,
|
|
87
106
|
() => {
|
|
@@ -3,7 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
uuid: string;
|
|
4
4
|
label: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
items
|
|
6
|
+
items?: FieldListItem[];
|
|
7
7
|
isDefault: boolean;
|
|
8
8
|
};
|
|
9
9
|
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>;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<BlockPreviewItem
|
|
3
3
|
:items="items"
|
|
4
4
|
:title="label"
|
|
5
|
-
:description
|
|
5
|
+
:description
|
|
6
6
|
:max-height="200"
|
|
7
|
-
:no-preview="!items
|
|
7
|
+
:no-preview="!items?.length"
|
|
8
8
|
/>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ defineProps({
|
|
|
14
14
|
uuid: { type: String, required: true },
|
|
15
15
|
label: { type: String, required: true },
|
|
16
16
|
description: { type: String, required: false },
|
|
17
|
-
items: { type: Array, required:
|
|
17
|
+
items: { type: Array, required: false },
|
|
18
18
|
isDefault: { type: Boolean, required: true }
|
|
19
19
|
});
|
|
20
20
|
</script>
|
|
@@ -3,7 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
uuid: string;
|
|
4
4
|
label: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
items
|
|
6
|
+
items?: FieldListItem[];
|
|
7
7
|
isDefault: boolean;
|
|
8
8
|
};
|
|
9
9
|
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>;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
<div class="bk-library-dialog-content">
|
|
24
24
|
<Loading v-if="status === 'pending'" />
|
|
25
|
-
<ul v-
|
|
25
|
+
<ul v-if="items.length" class="bk-library-dialog-list">
|
|
26
26
|
<li
|
|
27
27
|
v-for="item in items"
|
|
28
28
|
:key="item.uuid"
|
|
@@ -35,7 +35,9 @@
|
|
|
35
35
|
</li>
|
|
36
36
|
</ul>
|
|
37
37
|
<p v-else class="bk-lead">
|
|
38
|
-
{{
|
|
38
|
+
{{
|
|
39
|
+
$t("templatesNoResults", "No templates available for this field.")
|
|
40
|
+
}}
|
|
39
41
|
</p>
|
|
40
42
|
</div>
|
|
41
43
|
<div v-if="totalPages > 1" class="bk bk-library-pagination">
|
|
@@ -55,8 +57,21 @@
|
|
|
55
57
|
</template>
|
|
56
58
|
|
|
57
59
|
<script setup>
|
|
58
|
-
import {
|
|
59
|
-
|
|
60
|
+
import {
|
|
61
|
+
FormOverlay,
|
|
62
|
+
Pagination,
|
|
63
|
+
Loading,
|
|
64
|
+
InfoBox,
|
|
65
|
+
ConfigForm
|
|
66
|
+
} from "#blokkli/editor/components";
|
|
67
|
+
import {
|
|
68
|
+
ref,
|
|
69
|
+
useBlokkli,
|
|
70
|
+
computed,
|
|
71
|
+
useAsyncData,
|
|
72
|
+
reactive,
|
|
73
|
+
watch
|
|
74
|
+
} from "#imports";
|
|
60
75
|
import TemplateItem from "./Item/index.vue";
|
|
61
76
|
const props = defineProps({
|
|
62
77
|
field: { type: Object, required: true }
|
|
@@ -74,7 +89,8 @@ const host = computed(() => ({
|
|
|
74
89
|
const searchParams = computed(() => ({
|
|
75
90
|
host: host.value,
|
|
76
91
|
page: page.value,
|
|
77
|
-
filters: { ...filters }
|
|
92
|
+
filters: { ...filters },
|
|
93
|
+
includeItems: true
|
|
78
94
|
}));
|
|
79
95
|
watch(filters, function() {
|
|
80
96
|
page.value = 0;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TemplateItem } from '../types.js';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<TemplateItem, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
|
+
refresh: () => any;
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<TemplateItem> & Readonly<{
|
|
5
|
+
onRefresh?: (() => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tr>
|
|
3
|
+
<td>
|
|
4
|
+
<div>
|
|
5
|
+
<span>{{ label }}</span>
|
|
6
|
+
<span
|
|
7
|
+
v-if="isDefault"
|
|
8
|
+
class="bk-pill bk-is-strong"
|
|
9
|
+
:title="
|
|
10
|
+
$t(
|
|
11
|
+
'templatesDefaultPillDescription',
|
|
12
|
+
'This template is used when new blocks of this type are created.'
|
|
13
|
+
)
|
|
14
|
+
"
|
|
15
|
+
>{{ $t("templatesDefaultPill", "Default") }}</span
|
|
16
|
+
>
|
|
17
|
+
</div>
|
|
18
|
+
<div v-if="description">{{ description }}</div>
|
|
19
|
+
<ul class="bk-pill-list">
|
|
20
|
+
<li v-for="(bundle, index) in bundleLabels" :key="index">
|
|
21
|
+
<span class="bk-pill bk-is-mono" v-text="bundle" />
|
|
22
|
+
</li>
|
|
23
|
+
</ul>
|
|
24
|
+
</td>
|
|
25
|
+
<td>
|
|
26
|
+
<span v-if="metadata?.createdBy">{{ metadata.createdBy }}</span>
|
|
27
|
+
</td>
|
|
28
|
+
<td>
|
|
29
|
+
<RelativeTime v-if="dateCreated" :timestamp="dateCreated" />
|
|
30
|
+
</td>
|
|
31
|
+
<td>
|
|
32
|
+
<RelativeTime v-if="dateUpdated" :timestamp="dateUpdated" />
|
|
33
|
+
</td>
|
|
34
|
+
<td class="bk-templates-manage-table-actions">
|
|
35
|
+
<div>
|
|
36
|
+
<template v-if="confirmDelete">
|
|
37
|
+
<button
|
|
38
|
+
class="bk-button bk-is-danger bk-is-small"
|
|
39
|
+
:disabled="isDeleting"
|
|
40
|
+
:class="{ 'bk-is-loading': isDeleting }"
|
|
41
|
+
@click="onConfirmDelete"
|
|
42
|
+
>
|
|
43
|
+
{{ $t("templatesManageDialogConfirmDelete", "Delete") }}
|
|
44
|
+
</button>
|
|
45
|
+
<button
|
|
46
|
+
class="bk-button bk-is-small"
|
|
47
|
+
:disabled="isDeleting"
|
|
48
|
+
@click="confirmDelete = false"
|
|
49
|
+
>
|
|
50
|
+
{{ $t("templatesManageDialogCancelDelete", "Cancel") }}
|
|
51
|
+
</button>
|
|
52
|
+
</template>
|
|
53
|
+
<template v-else>
|
|
54
|
+
<button
|
|
55
|
+
v-if="adapterHasEdit && permissions.includes('edit')"
|
|
56
|
+
ref="editButtonEl"
|
|
57
|
+
class="bk-button bk-is-small"
|
|
58
|
+
@click.prevent="isEditing = true"
|
|
59
|
+
>
|
|
60
|
+
<Icon name="bk_mdi_edit" />
|
|
61
|
+
{{ $t("templatesManageDialogEdit", "Edit") }}
|
|
62
|
+
</button>
|
|
63
|
+
<button
|
|
64
|
+
v-if="permissions.includes('delete')"
|
|
65
|
+
class="bk-button bk-is-small"
|
|
66
|
+
@click="confirmDelete = true"
|
|
67
|
+
>
|
|
68
|
+
<Icon name="bk_mdi_delete" />
|
|
69
|
+
{{ $t("templatesManageDialogDelete", "Delete") }}
|
|
70
|
+
</button>
|
|
71
|
+
</template>
|
|
72
|
+
</div>
|
|
73
|
+
</td>
|
|
74
|
+
</tr>
|
|
75
|
+
<NestedEditorOverlay
|
|
76
|
+
v-if="isEditing && editUrl"
|
|
77
|
+
:url="editUrl"
|
|
78
|
+
:uuid
|
|
79
|
+
:element="editButtonEl"
|
|
80
|
+
:title="$t('templatesEditOverlayTitle', 'Edit template')"
|
|
81
|
+
theme="red"
|
|
82
|
+
icon="bk_mdi_dashboard"
|
|
83
|
+
@close="isEditing = false"
|
|
84
|
+
@submit="onSubmitEdit"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<script setup>
|
|
89
|
+
import { computed, ref, useBlokkli, useTemplateRef } from "#imports";
|
|
90
|
+
import {
|
|
91
|
+
Icon,
|
|
92
|
+
NestedEditorOverlay,
|
|
93
|
+
RelativeTime
|
|
94
|
+
} from "#blokkli/editor/components";
|
|
95
|
+
import { falsy, onlyUnique } from "#blokkli/helpers";
|
|
96
|
+
const props = defineProps({
|
|
97
|
+
uuid: { type: String, required: true },
|
|
98
|
+
label: { type: String, required: true },
|
|
99
|
+
description: { type: String, required: false },
|
|
100
|
+
items: { type: Array, required: false },
|
|
101
|
+
itemBundles: { type: Array, required: true },
|
|
102
|
+
isDefault: { type: Boolean, required: true },
|
|
103
|
+
translationLanguages: { type: Array, required: true },
|
|
104
|
+
permissions: { type: Array, required: true },
|
|
105
|
+
metadata: { type: [Object, null], required: true }
|
|
106
|
+
});
|
|
107
|
+
const emit = defineEmits(["refresh"]);
|
|
108
|
+
const { $t, adapter, state, types } = useBlokkli();
|
|
109
|
+
const editButtonEl = useTemplateRef("editButtonEl");
|
|
110
|
+
const confirmDelete = ref(false);
|
|
111
|
+
const isDeleting = ref(false);
|
|
112
|
+
const isEditing = ref(false);
|
|
113
|
+
const dateCreated = computed(() => props.metadata?.dateCreated);
|
|
114
|
+
const dateUpdated = computed(() => props.metadata?.dateUpdated);
|
|
115
|
+
const editUrl = computed(() => {
|
|
116
|
+
if (!adapter.templatesGetEditUrl) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
return adapter.templatesGetEditUrl({ templateUuid: props.uuid });
|
|
120
|
+
});
|
|
121
|
+
function onSubmitEdit() {
|
|
122
|
+
isEditing.value = false;
|
|
123
|
+
}
|
|
124
|
+
const adapterHasEdit = !!adapter.templatesGetEditUrl;
|
|
125
|
+
const bundleLabels = computed(
|
|
126
|
+
() => props.itemBundles.map((bundle) => {
|
|
127
|
+
return types.getBlockBundleDefinition(bundle)?.label;
|
|
128
|
+
}).filter(falsy).filter(onlyUnique)
|
|
129
|
+
);
|
|
130
|
+
async function onConfirmDelete() {
|
|
131
|
+
if (!adapter.templatesDelete) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
isDeleting.value = true;
|
|
135
|
+
const success = await state.mutateWithLoadingState(
|
|
136
|
+
() => adapter.templatesDelete({ templateUuid: props.uuid }),
|
|
137
|
+
$t("templatesDeleteError", "Failed to delete template."),
|
|
138
|
+
$t("templatesDeleteSuccess", "Template deleted successfully.")
|
|
139
|
+
);
|
|
140
|
+
if (success) {
|
|
141
|
+
emit("refresh");
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
isDeleting.value = false;
|
|
145
|
+
confirmDelete.value = false;
|
|
146
|
+
}
|
|
147
|
+
</script>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TemplateItem } from '../types.js';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<TemplateItem, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
|
+
refresh: () => any;
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<TemplateItem> & Readonly<{
|
|
5
|
+
onRefresh?: (() => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|