@blokkli/editor 2.0.0-alpha.31 → 2.0.0-alpha.33
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/blockOptions.d.ts +16 -0
- package/dist/global/types/features.d.ts +4 -0
- package/dist/module.d.mts +1 -24
- package/dist/module.json +1 -1
- package/dist/module.mjs +453 -10828
- 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/defineBlokkli.js +1 -3
- package/dist/runtime/composables/defineBlokkliFeature.d.ts +5 -3
- package/dist/runtime/composables/defineBlokkliFeature.js +2 -1
- package/dist/runtime/composables/defineBlokkliProvider.js +1 -3
- 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/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 +30 -10
- 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/DragItem.d.vue.ts +1 -0
- package/dist/runtime/editor/features/dragging-overlay/DragItems/DragItem.vue +6 -31
- package/dist/runtime/editor/features/dragging-overlay/DragItems/DragItem.vue.d.ts +1 -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 +42 -18
- 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 +8 -1
- package/dist/runtime/editor/providers/definition.js +7 -3
- 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/helpers/runtimeHelpers/index.d.ts +2 -1
- package/dist/runtime/helpers/runtimeHelpers/index.js +44 -6
- 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 +7 -1
- package/package.json +29 -7
- package/dist/runtime/css/output.css +0 -1
- package/dist/runtime/material-icons/index.d.ts +0 -12
- package/dist/runtime/material-icons/index.js +0 -1
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
type="button"
|
|
7
7
|
class="bk-add-item"
|
|
8
8
|
:menu="menu"
|
|
9
|
-
:title="description"
|
|
10
9
|
:data-sortli-id="id"
|
|
11
10
|
:class="[
|
|
12
11
|
{
|
|
@@ -14,6 +13,8 @@
|
|
|
14
13
|
},
|
|
15
14
|
'bk-is-' + color
|
|
16
15
|
]"
|
|
16
|
+
@mouseenter="onMouseEnter"
|
|
17
|
+
@mouseleave="onMouseLeave"
|
|
17
18
|
>
|
|
18
19
|
<div class="bk-add-item-icon">
|
|
19
20
|
<ItemIconBox :color :bundle :icon />
|
|
@@ -29,6 +30,7 @@ import { useBlokkli, computed, useTemplateRef } from "#imports";
|
|
|
29
30
|
import { ItemIconBox } from "#blokkli/editor/components";
|
|
30
31
|
import { PluginContextMenu } from "#blokkli/editor/plugins";
|
|
31
32
|
const { storage, $t } = useBlokkli();
|
|
33
|
+
const emit = defineEmits(["help", "startHelp"]);
|
|
32
34
|
const props = defineProps({
|
|
33
35
|
id: { type: String, required: true },
|
|
34
36
|
context: { type: String, required: true },
|
|
@@ -39,7 +41,9 @@ const props = defineProps({
|
|
|
39
41
|
icon: { type: null, required: false, default: void 0 },
|
|
40
42
|
disabled: { type: Boolean, required: false },
|
|
41
43
|
isAutoAdd: { type: Boolean, required: false },
|
|
42
|
-
noContextMenu: { type: Boolean, required: false }
|
|
44
|
+
noContextMenu: { type: Boolean, required: false },
|
|
45
|
+
useHelp: { type: Boolean, required: false },
|
|
46
|
+
helpActive: { type: Boolean, required: false }
|
|
43
47
|
});
|
|
44
48
|
const el = useTemplateRef("pluginContextMenu");
|
|
45
49
|
const favorites = storage.use("blockFavorites", []);
|
|
@@ -65,5 +69,35 @@ const menu = computed(() => {
|
|
|
65
69
|
];
|
|
66
70
|
});
|
|
67
71
|
const getElement = () => el.value?.$el;
|
|
72
|
+
let helpTimeout = null;
|
|
73
|
+
function onMouseEnter() {
|
|
74
|
+
if (!props.useHelp) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (helpTimeout) {
|
|
78
|
+
window.clearTimeout(helpTimeout);
|
|
79
|
+
helpTimeout = null;
|
|
80
|
+
}
|
|
81
|
+
if (props.helpActive) {
|
|
82
|
+
const element = getElement();
|
|
83
|
+
if (!element) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
emit("help", element);
|
|
87
|
+
}
|
|
88
|
+
helpTimeout = window.setTimeout(() => {
|
|
89
|
+
const element = getElement();
|
|
90
|
+
if (!element) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
emit("startHelp", element);
|
|
94
|
+
}, 800);
|
|
95
|
+
}
|
|
96
|
+
function onMouseLeave() {
|
|
97
|
+
if (helpTimeout) {
|
|
98
|
+
window.clearTimeout(helpTimeout);
|
|
99
|
+
helpTimeout = null;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
68
102
|
defineExpose({ getElement });
|
|
69
103
|
</script>
|
|
@@ -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;
|
|
@@ -4,23 +4,21 @@
|
|
|
4
4
|
id="bk-animation-canvas-webgl"
|
|
5
5
|
:key="animation.canvasKey.value"
|
|
6
6
|
ref="canvasEl"
|
|
7
|
+
tabindex="0"
|
|
7
8
|
:style
|
|
8
9
|
@click.capture="onClick"
|
|
9
10
|
@pointerdown.capture="onPointerDown"
|
|
10
11
|
@pointerup.capture="onPointerUp"
|
|
11
12
|
@pointermove="onPointerMove"
|
|
13
|
+
@focus="onCanvasFocus"
|
|
14
|
+
@blur="onCanvasBlur"
|
|
12
15
|
/>
|
|
13
16
|
</Teleport>
|
|
14
17
|
</template>
|
|
15
18
|
|
|
16
19
|
<script setup>
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
} from "#blokkli/helpers";
|
|
20
|
-
import {
|
|
21
|
-
getDistance,
|
|
22
|
-
isInsideRect
|
|
23
|
-
} from "#blokkli/editor/helpers/geometry";
|
|
20
|
+
import { falsy } from "#blokkli/helpers";
|
|
21
|
+
import { getDistance, isInsideRect } from "#blokkli/editor/helpers/geometry";
|
|
24
22
|
import {
|
|
25
23
|
MOUSE_BUTTON,
|
|
26
24
|
MOUSE_BUTTONS,
|
|
@@ -47,6 +45,12 @@ const {
|
|
|
47
45
|
directive,
|
|
48
46
|
blocks
|
|
49
47
|
} = useBlokkli();
|
|
48
|
+
function onCanvasFocus() {
|
|
49
|
+
ui.setCanvasFocused(true);
|
|
50
|
+
}
|
|
51
|
+
function onCanvasBlur() {
|
|
52
|
+
ui.setCanvasFocused(false);
|
|
53
|
+
}
|
|
50
54
|
let handlePointerMove = false;
|
|
51
55
|
const cursor = computed(
|
|
52
56
|
() => state.isLoading.value ? "wait" : animation.cursor.value
|
|
@@ -191,6 +195,9 @@ function onPointerDown(e) {
|
|
|
191
195
|
if (e.buttons === MOUSE_BUTTONS.AUXILIARY) {
|
|
192
196
|
return;
|
|
193
197
|
}
|
|
198
|
+
if (canvasEl.value) {
|
|
199
|
+
canvasEl.value.focus();
|
|
200
|
+
}
|
|
194
201
|
if (!keyboard.isPressingSpace.value) {
|
|
195
202
|
e.preventDefault();
|
|
196
203
|
e.stopPropagation();
|
|
@@ -432,6 +439,9 @@ function onClick(e) {
|
|
|
432
439
|
e.preventDefault();
|
|
433
440
|
e.stopImmediatePropagation();
|
|
434
441
|
e.stopPropagation();
|
|
442
|
+
if (canvasEl.value) {
|
|
443
|
+
canvasEl.value.focus();
|
|
444
|
+
}
|
|
435
445
|
}
|
|
436
446
|
const canvasEl = useTemplateRef("canvasEl");
|
|
437
447
|
watch(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PlacementVertical } from '#blokkli/editor/composables/useStickyToolbar';
|
|
1
|
+
import { type PlacementVertical, type PlacementHorizontal } from '#blokkli/editor/composables/useStickyToolbar';
|
|
2
2
|
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
3
3
|
import type { Coord } from '#blokkli/editor/types/geometry';
|
|
4
4
|
type __VLS_Props = {
|
|
@@ -7,6 +7,7 @@ type __VLS_Props = {
|
|
|
7
7
|
anchorEl?: HTMLElement | null;
|
|
8
8
|
anchorCoordinates?: Coord | null;
|
|
9
9
|
placementY?: PlacementVertical;
|
|
10
|
+
placementX?: PlacementHorizontal;
|
|
10
11
|
closeIcon?: BlokkliIcon;
|
|
11
12
|
};
|
|
12
13
|
declare var __VLS_6: {};
|
|
@@ -21,6 +22,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
21
22
|
anchorEl: HTMLElement | null;
|
|
22
23
|
anchorCoordinates: Coord | null;
|
|
23
24
|
placementY: PlacementVertical;
|
|
25
|
+
placementX: PlacementHorizontal;
|
|
24
26
|
closeIcon: BlokkliIcon;
|
|
25
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="el"
|
|
4
4
|
class="bk bk-artboard-tooltip"
|
|
5
|
-
:class="'bk-is-' + placementY"
|
|
5
|
+
:class="['bk-is-y-' + placementY, 'bk-is-x-' + placementX]"
|
|
6
6
|
:style="{
|
|
7
7
|
'--bk-caret-x': caretX
|
|
8
8
|
}"
|
|
@@ -39,6 +39,7 @@ const props = defineProps({
|
|
|
39
39
|
anchorEl: { type: null, required: false, default: null },
|
|
40
40
|
anchorCoordinates: { type: [Object, null], required: false, default: null },
|
|
41
41
|
placementY: { type: String, required: false, default: "auto" },
|
|
42
|
+
placementX: { type: String, required: false, default: "center" },
|
|
42
43
|
closeIcon: { type: null, required: false, default: "bk_mdi_close" }
|
|
43
44
|
});
|
|
44
45
|
const emit = defineEmits(["close"]);
|
|
@@ -48,7 +49,7 @@ const { onKeyDown } = useFocusTrap({
|
|
|
48
49
|
debugLabel: "ArtboardTooltip: " + props.id
|
|
49
50
|
});
|
|
50
51
|
const { ui } = useBlokkli();
|
|
51
|
-
const { placementY, caretX } = useStickyToolbar(el, {
|
|
52
|
+
const { placementY, placementX, caretX } = useStickyToolbar(el, {
|
|
52
53
|
getAnchorElement() {
|
|
53
54
|
return props.anchorEl ?? null;
|
|
54
55
|
},
|
|
@@ -59,7 +60,7 @@ const { placementY, caretX } = useStickyToolbar(el, {
|
|
|
59
60
|
return props.placementY;
|
|
60
61
|
},
|
|
61
62
|
getPlacementX() {
|
|
62
|
-
return
|
|
63
|
+
return props.placementX;
|
|
63
64
|
},
|
|
64
65
|
getCaretWidth() {
|
|
65
66
|
return 30;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PlacementVertical } from '#blokkli/editor/composables/useStickyToolbar';
|
|
1
|
+
import { type PlacementVertical, type PlacementHorizontal } from '#blokkli/editor/composables/useStickyToolbar';
|
|
2
2
|
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
3
3
|
import type { Coord } from '#blokkli/editor/types/geometry';
|
|
4
4
|
type __VLS_Props = {
|
|
@@ -7,6 +7,7 @@ type __VLS_Props = {
|
|
|
7
7
|
anchorEl?: HTMLElement | null;
|
|
8
8
|
anchorCoordinates?: Coord | null;
|
|
9
9
|
placementY?: PlacementVertical;
|
|
10
|
+
placementX?: PlacementHorizontal;
|
|
10
11
|
closeIcon?: BlokkliIcon;
|
|
11
12
|
};
|
|
12
13
|
declare var __VLS_6: {};
|
|
@@ -21,6 +22,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
21
22
|
anchorEl: HTMLElement | null;
|
|
22
23
|
anchorCoordinates: Coord | null;
|
|
23
24
|
placementY: PlacementVertical;
|
|
25
|
+
placementX: PlacementHorizontal;
|
|
24
26
|
closeIcon: BlokkliIcon;
|
|
25
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
anchor: 'top' | 'bottom';
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: 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>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="bk-auto-height"
|
|
4
|
+
:class="'bk-is-' + anchor"
|
|
5
|
+
:style="{ height: height + 'px' }"
|
|
6
|
+
>
|
|
7
|
+
<div ref="inner" class="bk-auto-height-inner">
|
|
8
|
+
<slot />
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
import { useTemplateRef, ref, onMounted, onBeforeUnmount } from "#imports";
|
|
15
|
+
defineProps({
|
|
16
|
+
anchor: { type: String, required: true }
|
|
17
|
+
});
|
|
18
|
+
const inner = useTemplateRef("inner");
|
|
19
|
+
const height = ref(0);
|
|
20
|
+
let observer = null;
|
|
21
|
+
onMounted(() => {
|
|
22
|
+
const el = inner.value;
|
|
23
|
+
if (!el) return;
|
|
24
|
+
observer = new ResizeObserver(() => {
|
|
25
|
+
height.value = el.scrollHeight;
|
|
26
|
+
});
|
|
27
|
+
observer.observe(el);
|
|
28
|
+
});
|
|
29
|
+
onBeforeUnmount(() => {
|
|
30
|
+
observer?.disconnect();
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
anchor: 'top' | 'bottom';
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: 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>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FieldListItem } from '#blokkli/types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
items
|
|
3
|
+
items?: FieldListItem[] | FieldListItem;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
bundle?: string;
|
|
@@ -8,6 +8,10 @@ type __VLS_Props = {
|
|
|
8
8
|
noPreview?: boolean;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
bundle: string;
|
|
12
|
+
description: string;
|
|
13
|
+
noPreview: boolean;
|
|
14
|
+
items: FieldListItem[] | FieldListItem;
|
|
11
15
|
maxHeight: number;
|
|
12
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -41,17 +41,20 @@ import {
|
|
|
41
41
|
INJECT_PROVIDER_BLOCKS
|
|
42
42
|
} from "#blokkli/helpers/injections";
|
|
43
43
|
const props = defineProps({
|
|
44
|
-
items: { type: [Array, Object], required:
|
|
44
|
+
items: { type: [Array, Object], required: false, default: () => [] },
|
|
45
45
|
title: { type: String, required: true },
|
|
46
|
-
description: { type: String, required: false },
|
|
47
|
-
bundle: { type: String, required: false },
|
|
46
|
+
description: { type: String, required: false, default: void 0 },
|
|
47
|
+
bundle: { type: String, required: false, default: void 0 },
|
|
48
48
|
maxHeight: { type: Number, required: false, default: 400 },
|
|
49
|
-
noPreview: { type: Boolean, required: false }
|
|
49
|
+
noPreview: { type: Boolean, required: false, default: false }
|
|
50
50
|
});
|
|
51
51
|
const { types, definitions } = useBlokkli();
|
|
52
|
-
const normalizedItems = computed(
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const normalizedItems = computed(() => {
|
|
53
|
+
if (!props.items) {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
return Array.isArray(props.items) ? props.items : [props.items];
|
|
57
|
+
});
|
|
55
58
|
const bundleLabel = computed(
|
|
56
59
|
() => props.bundle ? types.getBlockBundleDefinition(props.bundle)?.label || props.bundle : ""
|
|
57
60
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FieldListItem } from '#blokkli/types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
items
|
|
3
|
+
items?: FieldListItem[] | FieldListItem;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
bundle?: string;
|
|
@@ -8,6 +8,10 @@ type __VLS_Props = {
|
|
|
8
8
|
noPreview?: boolean;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
bundle: string;
|
|
12
|
+
description: string;
|
|
13
|
+
noPreview: boolean;
|
|
14
|
+
items: FieldListItem[] | FieldListItem;
|
|
11
15
|
maxHeight: number;
|
|
12
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
before: string;
|
|
3
|
+
after: string;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-diff-value" v-html="diffHtml" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "#imports";
|
|
7
|
+
import diff from "html-diff-ts";
|
|
8
|
+
const MAX_CHANGES = 6;
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
before: { type: String, required: true },
|
|
11
|
+
after: { type: String, required: true }
|
|
12
|
+
});
|
|
13
|
+
const diffHtml = computed(() => {
|
|
14
|
+
const result = diff(props.before, props.after);
|
|
15
|
+
const changes = (result.match(/<ins[\s>]/g)?.length || 0) + (result.match(/<del[\s>]/g)?.length || 0);
|
|
16
|
+
if (changes > MAX_CHANGES) {
|
|
17
|
+
return `<del>${props.before}</del><ins>${props.after}</ins>`;
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
before: string;
|
|
3
|
+
after: string;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
>
|
|
65
65
|
<h3>{{ prop.key }}</h3>
|
|
66
66
|
<div class="bk-diff-monospace">
|
|
67
|
-
<
|
|
67
|
+
<DiffValue
|
|
68
68
|
v-if="diffMode === 'inline'"
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
:before="prop.before || ''"
|
|
70
|
+
:after="prop.after || ''"
|
|
71
71
|
/>
|
|
72
72
|
<div
|
|
73
73
|
v-else-if="diffMode === 'side_by_side'"
|
|
@@ -102,8 +102,7 @@
|
|
|
102
102
|
|
|
103
103
|
<script setup>
|
|
104
104
|
import { computed, useBlokkli } from "#imports";
|
|
105
|
-
import { ItemIcon, FormRadioTabs } from "#blokkli/editor/components";
|
|
106
|
-
import diff from "html-diff-ts";
|
|
105
|
+
import { ItemIcon, FormRadioTabs, DiffValue } from "#blokkli/editor/components";
|
|
107
106
|
const props = defineProps({
|
|
108
107
|
stateBefore: { type: Object, required: true },
|
|
109
108
|
stateAfter: { type: Object, required: true },
|
|
@@ -191,7 +190,6 @@ const diffItems = computed(() => {
|
|
|
191
190
|
status: "removed",
|
|
192
191
|
props: Object.entries(beforeProps).map(([key, value]) => ({
|
|
193
192
|
key,
|
|
194
|
-
diff: diff(toString(value), ""),
|
|
195
193
|
before: toString(value),
|
|
196
194
|
after: ""
|
|
197
195
|
}))
|
|
@@ -204,7 +202,6 @@ const diffItems = computed(() => {
|
|
|
204
202
|
if (beforeValue !== afterValue) {
|
|
205
203
|
changedProps.push({
|
|
206
204
|
key,
|
|
207
|
-
diff: diff(toString(beforeValue), toString(afterValue)),
|
|
208
205
|
before: toString(beforeValue),
|
|
209
206
|
after: toString(afterValue)
|
|
210
207
|
});
|
|
@@ -214,7 +211,6 @@ const diffItems = computed(() => {
|
|
|
214
211
|
if (!(key in beforeProps)) {
|
|
215
212
|
changedProps.push({
|
|
216
213
|
key,
|
|
217
|
-
diff: diff("", toString(afterProps[key])),
|
|
218
214
|
before: "",
|
|
219
215
|
after: toString(afterProps[key])
|
|
220
216
|
});
|
|
@@ -246,7 +242,6 @@ const diffItems = computed(() => {
|
|
|
246
242
|
status: "added",
|
|
247
243
|
props: Object.entries(afterProps).map(([key, value]) => ({
|
|
248
244
|
key,
|
|
249
|
-
diff: diff("", toString(value)),
|
|
250
245
|
before: "",
|
|
251
246
|
after: toString(value)
|
|
252
247
|
}))
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
<Loading v-if="showLoading" screen />
|
|
9
9
|
</Transition>
|
|
10
10
|
|
|
11
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
ref="mainLayoutElement"
|
|
13
|
+
class="bk-main-layout"
|
|
14
|
+
:lang="ui.interfaceLanguage.value"
|
|
15
|
+
>
|
|
12
16
|
<Toolbar @loaded="toolbarLoaded = true" />
|
|
13
17
|
<div ref="viewportElement" class="bk bk-viewport">
|
|
14
18
|
<Messages />
|
|
@@ -103,9 +107,12 @@ import pluginProvider from "#blokkli/editor/providers/plugin";
|
|
|
103
107
|
import directiveProvider from "#blokkli/editor/providers/directive";
|
|
104
108
|
import fieldsProvider from "#blokkli/editor/providers/fields";
|
|
105
109
|
import iconsProvider from "#blokkli/editor/providers/icons";
|
|
110
|
+
import permissionsProvider from "#blokkli/editor/providers/permissions";
|
|
111
|
+
import adaptersProvider from "#blokkli/editor/providers/adapters";
|
|
106
112
|
import { eventBus } from "#blokkli/editor/events";
|
|
107
113
|
import "#blokkli-build/styles.css";
|
|
108
114
|
import getAdapter from "#blokkli-build/edit-adapter";
|
|
115
|
+
import getExtensions from "#blokkli-build/adapter-extensions";
|
|
109
116
|
import {
|
|
110
117
|
INJECT_ALL_COMPONENTS_CHUNK,
|
|
111
118
|
INJECT_APP,
|
|
@@ -120,7 +127,10 @@ import {
|
|
|
120
127
|
} from "#blokkli/helpers/injections";
|
|
121
128
|
import { allComponents } from "#blokkli-build/chunk-editing";
|
|
122
129
|
import { falsy } from "#blokkli/helpers";
|
|
123
|
-
import {
|
|
130
|
+
import {
|
|
131
|
+
addElementClasses,
|
|
132
|
+
useBlockRegistration
|
|
133
|
+
} from "#blokkli/editor/composables";
|
|
124
134
|
const props = defineProps({
|
|
125
135
|
entity: { type: null, required: false, default: void 0 },
|
|
126
136
|
entityType: { type: String, required: true },
|
|
@@ -150,6 +160,7 @@ const context = computed(() => {
|
|
|
150
160
|
};
|
|
151
161
|
});
|
|
152
162
|
const adapter = await getAdapter(context);
|
|
163
|
+
const adapters = await adaptersProvider(adapter, getExtensions, context);
|
|
153
164
|
const providerKey = inject(INJECT_PROVIDER_KEY, "");
|
|
154
165
|
const route = useRoute();
|
|
155
166
|
const toolbarLoaded = ref(false);
|
|
@@ -191,11 +202,19 @@ const theme = themeProvider(element);
|
|
|
191
202
|
const blocks = blocksProvider(state, dom, context);
|
|
192
203
|
const selection = selectionProvider(blocks);
|
|
193
204
|
const keyboard = keyboardProvider(eventBus);
|
|
194
|
-
const animation = animationProvider(
|
|
205
|
+
const animation = animationProvider(
|
|
206
|
+
eventBus,
|
|
207
|
+
ui,
|
|
208
|
+
storage,
|
|
209
|
+
selection,
|
|
210
|
+
debug,
|
|
211
|
+
keyboard
|
|
212
|
+
);
|
|
195
213
|
const types = await typesProvider(adapter, selection, context);
|
|
196
214
|
const indicators = indicatorsProvider();
|
|
197
215
|
const directive = directiveProvider(debug, ui);
|
|
198
216
|
const fields = fieldsProvider(dom, types);
|
|
217
|
+
const permissionsInstance = await permissionsProvider(adapter);
|
|
199
218
|
const mutatedEntityProps = computed(() => state.mutatedItemProps.HOST);
|
|
200
219
|
const mutatedEntity = computed(() => {
|
|
201
220
|
return {
|
|
@@ -255,6 +274,7 @@ provide(INJECT_EDIT_CONTEXT, {
|
|
|
255
274
|
const app = {
|
|
256
275
|
$t,
|
|
257
276
|
adapter,
|
|
277
|
+
adapters,
|
|
258
278
|
animation,
|
|
259
279
|
broadcast,
|
|
260
280
|
commands,
|
|
@@ -279,7 +299,8 @@ const app = {
|
|
|
279
299
|
types,
|
|
280
300
|
ui,
|
|
281
301
|
fields,
|
|
282
|
-
icons
|
|
302
|
+
icons,
|
|
303
|
+
permissions: permissionsInstance
|
|
283
304
|
};
|
|
284
305
|
provide(INJECT_APP, app);
|
|
285
306
|
function textWithHighlight(title, text) {
|
|
@@ -12,27 +12,45 @@ import {
|
|
|
12
12
|
} from "#blokkli-build/features";
|
|
13
13
|
import { useBlokkli, computed, watch } from "#imports";
|
|
14
14
|
const emit = defineEmits(["loaded"]);
|
|
15
|
-
const { adapter, features, ui, debug } = useBlokkli();
|
|
15
|
+
const { adapter, adapters, features, ui, debug, permissions } = useBlokkli();
|
|
16
16
|
const logger = debug.createLogger("Features");
|
|
17
17
|
const renderedFeatures = computed(
|
|
18
18
|
() => features.mountedFeatures.value.map((v) => v.id)
|
|
19
19
|
);
|
|
20
20
|
const disabledFeatures = adapter.getDisabledFeatures ? await adapter.getDisabledFeatures() : await Promise.resolve([]);
|
|
21
21
|
const availableFeatures = computed(() => {
|
|
22
|
-
return features.features.value.filter((
|
|
23
|
-
if (disabledFeatures.includes(
|
|
22
|
+
return features.features.value.filter((feature) => {
|
|
23
|
+
if (disabledFeatures.includes(feature.id)) {
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
26
|
-
if (
|
|
27
|
-
|
|
26
|
+
if (feature.requiredAdapterMethods?.length) {
|
|
27
|
+
const hasAllMethods = feature.requiredAdapterMethods.every((method) => {
|
|
28
|
+
if (adapter[method]) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
return adapters.extensions.some((ext) => ext.methods[method]);
|
|
32
|
+
});
|
|
33
|
+
if (!hasAllMethods) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (feature.requiredPermissions?.length) {
|
|
38
|
+
const hasAllPermissions = feature.requiredPermissions.every(
|
|
39
|
+
(permission) => permissions.hasPermission(permission)
|
|
40
|
+
);
|
|
41
|
+
if (!hasAllPermissions) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
28
44
|
}
|
|
29
|
-
if (
|
|
45
|
+
if (feature.dependencies?.length && !feature.dependencies.every((id) => renderedFeatures.value.includes(id))) {
|
|
30
46
|
return false;
|
|
31
47
|
}
|
|
32
|
-
if (
|
|
48
|
+
if (feature.beta && !features.enabledBetaFeatures.value.includes(
|
|
49
|
+
feature.id
|
|
50
|
+
)) {
|
|
33
51
|
return false;
|
|
34
52
|
}
|
|
35
|
-
return !
|
|
53
|
+
return !feature.viewports?.length || feature.viewports.includes(ui.appViewport.value);
|
|
36
54
|
}).map((v) => {
|
|
37
55
|
return v.id;
|
|
38
56
|
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
maxHeight?: number;
|
|
3
|
+
minHeight?: number;
|
|
4
|
+
submitOnEnter?: boolean;
|
|
5
|
+
/** When true, convert pasted HTML to markdown */
|
|
6
|
+
pasteMarkdown?: boolean;
|
|
7
|
+
textareaClass?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
modelValue: string;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
14
|
+
focus: () => void | undefined;
|
|
15
|
+
blur: () => void | undefined;
|
|
16
|
+
element: Readonly<import("vue").ShallowRef<HTMLTextAreaElement | null, HTMLTextAreaElement | null>>;
|
|
17
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: string) => any;
|
|
19
|
+
} & {
|
|
20
|
+
keydown: (event: KeyboardEvent) => any;
|
|
21
|
+
submit: () => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
24
|
+
onSubmit?: (() => any) | undefined;
|
|
25
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
maxHeight: number;
|
|
28
|
+
minHeight: number;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|