@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
|
@@ -74,7 +74,11 @@ import {
|
|
|
74
74
|
useState,
|
|
75
75
|
useTemplateRef
|
|
76
76
|
} from "#imports";
|
|
77
|
-
import {
|
|
77
|
+
import {
|
|
78
|
+
Icon,
|
|
79
|
+
ViewportBlockingRect,
|
|
80
|
+
ScrollBoundary
|
|
81
|
+
} from "#blokkli/editor/components";
|
|
78
82
|
import { addElementClasses, onBlokkliEvent } from "#blokkli/editor/composables";
|
|
79
83
|
const props = defineProps({
|
|
80
84
|
id: { type: String, required: true },
|
|
@@ -98,18 +102,17 @@ function onPointerMove(e) {
|
|
|
98
102
|
}
|
|
99
103
|
e.stopPropagation();
|
|
100
104
|
}
|
|
101
|
-
const BASE_Z = 19e4;
|
|
102
105
|
const isMinimized = storage.use(
|
|
103
106
|
computed(() => "sidebar:detached:minimized:" + props.id),
|
|
104
107
|
false
|
|
105
108
|
);
|
|
106
109
|
const storageKey = computed(() => "sidebar:detached:size:" + props.id);
|
|
107
110
|
const focusedSidebar = storage.use("sidebar:focused", "");
|
|
108
|
-
const zStorageKey = computed(() => "sidebar:detached:
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
|
|
111
|
+
const zStorageKey = computed(() => "sidebar:detached:zindexOffset:" + props.id);
|
|
112
|
+
const globalZOffset = useState("blokkli:zOffset", () => 0);
|
|
113
|
+
const zOffset = storage.use(zStorageKey.value, 0);
|
|
114
|
+
if (zOffset.value > globalZOffset.value) {
|
|
115
|
+
globalZOffset.value = zOffset.value;
|
|
113
116
|
}
|
|
114
117
|
const offsetX = computed(() => {
|
|
115
118
|
if (x.value + width.value > ui.visibleViewport.value.x + ui.visibleViewport.value.width) {
|
|
@@ -183,7 +186,7 @@ watch(
|
|
|
183
186
|
const style = computed(() => {
|
|
184
187
|
return {
|
|
185
188
|
transform: `translate(${x.value - offsetX.value}px, ${y.value}px)`,
|
|
186
|
-
zIndex: z.value
|
|
189
|
+
zIndex: `calc(var(--bk-z-index-sidebar-detached) + ${zOffset.value})`
|
|
187
190
|
};
|
|
188
191
|
});
|
|
189
192
|
const innerStyle = computed(() => {
|
|
@@ -194,8 +197,8 @@ const innerStyle = computed(() => {
|
|
|
194
197
|
});
|
|
195
198
|
const onFocus = () => {
|
|
196
199
|
focusedSidebar.value = props.id;
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
globalZOffset.value++;
|
|
201
|
+
zOffset.value = globalZOffset.value;
|
|
199
202
|
};
|
|
200
203
|
const onMouseDown = (e, mode) => {
|
|
201
204
|
mouseMode.value = mode;
|
|
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
34
34
|
width: number;
|
|
35
35
|
height: number;
|
|
36
36
|
};
|
|
37
|
-
minWidth: number;
|
|
38
37
|
minHeight: number;
|
|
38
|
+
minWidth: number;
|
|
39
39
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
41
41
|
declare const _default: typeof __VLS_export;
|
|
@@ -190,9 +190,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
190
190
|
width: number;
|
|
191
191
|
height: number;
|
|
192
192
|
};
|
|
193
|
+
minHeight: number;
|
|
193
194
|
tourText: string;
|
|
194
195
|
minWidth: number;
|
|
195
|
-
minHeight: number;
|
|
196
196
|
region: SidebarRegion;
|
|
197
197
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
198
198
|
icon?: (props: {}) => any;
|
|
@@ -205,6 +205,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
205
205
|
key: string;
|
|
206
206
|
scrolledToEnd: any;
|
|
207
207
|
isDetached: any;
|
|
208
|
+
isShown: any;
|
|
208
209
|
width: any;
|
|
209
210
|
height: any;
|
|
210
211
|
toggleSidebar: () => void;
|
|
@@ -215,6 +216,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
215
216
|
key: string;
|
|
216
217
|
scrolledToEnd: any;
|
|
217
218
|
isDetached: any;
|
|
219
|
+
isShown: any;
|
|
218
220
|
width: undefined;
|
|
219
221
|
height: undefined;
|
|
220
222
|
toggleSidebar: () => void;
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
v-if="
|
|
35
35
|
(activeSidebar === id || isRenderedDetached || renderAlways) && !isDisabled
|
|
36
36
|
"
|
|
37
|
-
:to="
|
|
37
|
+
:to="
|
|
38
|
+
isRenderedDetached ? ui.mainLayoutElement.value : '#bk-sidebar-content-' + region
|
|
39
|
+
"
|
|
38
40
|
>
|
|
39
41
|
<SidebarDetached
|
|
40
42
|
v-if="isRenderedDetached"
|
|
@@ -59,6 +61,7 @@
|
|
|
59
61
|
:key="isRenderedDetached ? 'detached' : 'attached'"
|
|
60
62
|
:scrolled-to-end
|
|
61
63
|
:is-detached="isRenderedDetached"
|
|
64
|
+
:is-shown="isShown"
|
|
62
65
|
:width
|
|
63
66
|
:height
|
|
64
67
|
:toggle-sidebar
|
|
@@ -92,6 +95,7 @@
|
|
|
92
95
|
:key="isRenderedDetached ? 'detached' : 'attached'"
|
|
93
96
|
:scrolled-to-end="scrolledToEnd"
|
|
94
97
|
:is-detached="isRenderedDetached"
|
|
98
|
+
:is-shown="isShown"
|
|
95
99
|
:width="undefined"
|
|
96
100
|
:height="undefined"
|
|
97
101
|
:toggle-sidebar="toggleSidebar"
|
|
@@ -119,7 +123,12 @@ import {
|
|
|
119
123
|
Loading
|
|
120
124
|
} from "#blokkli/editor/components";
|
|
121
125
|
import SidebarDetached from "./Detached/index.vue";
|
|
122
|
-
import {
|
|
126
|
+
import {
|
|
127
|
+
defineCommands,
|
|
128
|
+
defineTourItem,
|
|
129
|
+
onBlokkliEvent,
|
|
130
|
+
useAnimationFrame
|
|
131
|
+
} from "#blokkli/editor/composables";
|
|
123
132
|
const props = defineProps({
|
|
124
133
|
id: { type: String, required: true },
|
|
125
134
|
title: { type: String, required: true },
|
|
@@ -169,6 +178,9 @@ watch(
|
|
|
169
178
|
const isRenderedDetached = computed(
|
|
170
179
|
() => isDetached.value && !ui.isMobile.value
|
|
171
180
|
);
|
|
181
|
+
const isShown = computed(
|
|
182
|
+
() => (activeSidebar.value === props.id || isRenderedDetached.value) && !isDisabled.value
|
|
183
|
+
);
|
|
172
184
|
watch(isDisabled, (v) => {
|
|
173
185
|
if (v && activeSidebar.value === props.id) {
|
|
174
186
|
activeSidebar.value = "";
|
|
@@ -190,9 +190,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
190
190
|
width: number;
|
|
191
191
|
height: number;
|
|
192
192
|
};
|
|
193
|
+
minHeight: number;
|
|
193
194
|
tourText: string;
|
|
194
195
|
minWidth: number;
|
|
195
|
-
minHeight: number;
|
|
196
196
|
region: SidebarRegion;
|
|
197
197
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
198
198
|
icon?: (props: {}) => any;
|
|
@@ -205,6 +205,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
205
205
|
key: string;
|
|
206
206
|
scrolledToEnd: any;
|
|
207
207
|
isDetached: any;
|
|
208
|
+
isShown: any;
|
|
208
209
|
width: any;
|
|
209
210
|
height: any;
|
|
210
211
|
toggleSidebar: () => void;
|
|
@@ -215,6 +216,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
215
216
|
key: string;
|
|
216
217
|
scrolledToEnd: any;
|
|
217
218
|
isDetached: any;
|
|
219
|
+
isShown: any;
|
|
218
220
|
width: undefined;
|
|
219
221
|
height: undefined;
|
|
220
222
|
toggleSidebar: () => void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
import type { FullBlokkliAdapter, BlokkliAdapterExtension, AdapterExtensionMethods, AdapterContext, BlokkliAdapterExtensionFactory } from '#blokkli/editor/adapter';
|
|
3
|
+
export type AdapterExtensionDefinition = {
|
|
4
|
+
namespace: string;
|
|
5
|
+
factory: BlokkliAdapterExtensionFactory<any>;
|
|
6
|
+
};
|
|
7
|
+
export interface AdaptersProvider {
|
|
8
|
+
/**
|
|
9
|
+
* The base adapter.
|
|
10
|
+
*/
|
|
11
|
+
adapter: FullBlokkliAdapter<any>;
|
|
12
|
+
/**
|
|
13
|
+
* All registered extensions.
|
|
14
|
+
*/
|
|
15
|
+
extensions: BlokkliAdapterExtension<any>[];
|
|
16
|
+
/**
|
|
17
|
+
* Get aggregated results from base adapter + all extensions.
|
|
18
|
+
* Results from extensions have their IDs prefixed with namespace.
|
|
19
|
+
*/
|
|
20
|
+
getAggregated<K extends keyof AdapterExtensionMethods<any>>(methodName: K): Promise<any[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Call a method, routing to the correct source based on namespace in pluginId.
|
|
23
|
+
* If pluginId has namespace prefix, calls extension; otherwise calls base adapter.
|
|
24
|
+
*/
|
|
25
|
+
callNamespaced<K extends keyof AdapterExtensionMethods<any>>(methodName: K, args: {
|
|
26
|
+
pluginId: string;
|
|
27
|
+
} & Record<string, any>): Promise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* Get extension by namespace.
|
|
30
|
+
*/
|
|
31
|
+
getExtension(namespace: string): BlokkliAdapterExtension<any> | undefined;
|
|
32
|
+
}
|
|
33
|
+
export default function adaptersProvider(adapter: FullBlokkliAdapter<any>, extensionDefinitions: AdapterExtensionDefinition[], context: ComputedRef<AdapterContext>): Promise<AdaptersProvider>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const NAMESPACE_SEPARATOR = ":";
|
|
2
|
+
export default async function adaptersProvider(adapter, extensionDefinitions, context) {
|
|
3
|
+
const extensions = await Promise.all(
|
|
4
|
+
extensionDefinitions.map(async (def) => ({
|
|
5
|
+
namespace: def.namespace,
|
|
6
|
+
methods: await Promise.resolve(def.factory(context))
|
|
7
|
+
}))
|
|
8
|
+
);
|
|
9
|
+
const extensionsByNamespace = /* @__PURE__ */ new Map();
|
|
10
|
+
for (const ext of extensions) {
|
|
11
|
+
extensionsByNamespace.set(ext.namespace, ext);
|
|
12
|
+
}
|
|
13
|
+
function prefixId(namespace, id) {
|
|
14
|
+
return `${namespace}${NAMESPACE_SEPARATOR}${id}`;
|
|
15
|
+
}
|
|
16
|
+
function parseNamespace(id) {
|
|
17
|
+
const sepIndex = id.indexOf(NAMESPACE_SEPARATOR);
|
|
18
|
+
if (sepIndex > 0 && id.startsWith("@")) {
|
|
19
|
+
return [id.substring(0, sepIndex), id.substring(sepIndex + 1)];
|
|
20
|
+
}
|
|
21
|
+
return [null, id];
|
|
22
|
+
}
|
|
23
|
+
function normalizeToArray(result) {
|
|
24
|
+
if (Array.isArray(result)) {
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
if (result !== void 0 && result !== null) {
|
|
28
|
+
return [result];
|
|
29
|
+
}
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
async function getAggregated(methodName) {
|
|
33
|
+
const results = [];
|
|
34
|
+
const baseMethod = adapter[methodName];
|
|
35
|
+
if (typeof baseMethod === "function") {
|
|
36
|
+
const baseResults = await baseMethod.call(adapter);
|
|
37
|
+
results.push(...normalizeToArray(baseResults));
|
|
38
|
+
}
|
|
39
|
+
for (const ext of extensions) {
|
|
40
|
+
const extMethod = ext.methods[methodName];
|
|
41
|
+
if (typeof extMethod === "function") {
|
|
42
|
+
const extResults = await extMethod();
|
|
43
|
+
results.push(
|
|
44
|
+
...normalizeToArray(extResults).map((item) => {
|
|
45
|
+
if (item && typeof item === "object" && "id" in item) {
|
|
46
|
+
return { ...item, id: prefixId(ext.namespace, item.id) };
|
|
47
|
+
}
|
|
48
|
+
return item;
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return results;
|
|
54
|
+
}
|
|
55
|
+
async function callNamespaced(methodName, args) {
|
|
56
|
+
const [namespace, localId] = parseNamespace(args.pluginId);
|
|
57
|
+
if (namespace) {
|
|
58
|
+
const ext = extensionsByNamespace.get(namespace);
|
|
59
|
+
if (!ext) {
|
|
60
|
+
throw new Error(
|
|
61
|
+
`No adapter extension found for namespace: ${namespace}`
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
const method = ext.methods[methodName];
|
|
65
|
+
if (typeof method !== "function") {
|
|
66
|
+
throw new Error(
|
|
67
|
+
`Extension ${namespace} does not implement ${String(methodName)}`
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
return method({ ...args, pluginId: localId });
|
|
71
|
+
}
|
|
72
|
+
const baseMethod = adapter[methodName];
|
|
73
|
+
if (typeof baseMethod !== "function") {
|
|
74
|
+
throw new Error(`Base adapter does not implement ${String(methodName)}`);
|
|
75
|
+
}
|
|
76
|
+
return baseMethod.call(adapter, args);
|
|
77
|
+
}
|
|
78
|
+
function getExtension(namespace) {
|
|
79
|
+
return extensionsByNamespace.get(namespace);
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
adapter,
|
|
83
|
+
extensions,
|
|
84
|
+
getAggregated,
|
|
85
|
+
callNamespaced,
|
|
86
|
+
getExtension
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -328,6 +328,9 @@ export default function(eventBus, ui, storage, selection, debug, keyboard) {
|
|
|
328
328
|
}
|
|
329
329
|
);
|
|
330
330
|
useAnimationFrame((time) => {
|
|
331
|
+
if (ui.hasNestedEditorOpen.value) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
331
334
|
const selectedUuids = [...selection.uuids.value];
|
|
332
335
|
const changeOptionsTransition = getChangeOptionsTransition();
|
|
333
336
|
if (iterator < 1) {
|
|
@@ -50,6 +50,13 @@ export type DefinitionProvider = {
|
|
|
50
50
|
* @returns The icon name, or undefined if no icon is defined
|
|
51
51
|
*/
|
|
52
52
|
getBlockIcon: (bundle: string) => string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Get the image of a block.
|
|
55
|
+
*
|
|
56
|
+
* @param bundle - The block bundle name
|
|
57
|
+
* @returns The url of the image.
|
|
58
|
+
*/
|
|
59
|
+
getBlockImage: (bundle: string) => string | undefined;
|
|
53
60
|
/**
|
|
54
61
|
* List of all registered fragment definitions.
|
|
55
62
|
*
|
|
@@ -7,6 +7,7 @@ export default function() {
|
|
|
7
7
|
const providers = ref(definitions.providers);
|
|
8
8
|
const renderKey = ref(definitions.renderKey);
|
|
9
9
|
const blockIcons = ref(definitions.icons);
|
|
10
|
+
const blockImages = ref(definitions.images);
|
|
10
11
|
const allGlobalOptions = ref(
|
|
11
12
|
definitions.globalOptions
|
|
12
13
|
);
|
|
@@ -19,6 +20,7 @@ export default function() {
|
|
|
19
20
|
fragments.value = newDefinitions?.default?.fragments || [];
|
|
20
21
|
providers.value = newDefinitions?.default?.providers || [];
|
|
21
22
|
blockIcons.value = newDefinitions?.default?.icons || {};
|
|
23
|
+
blockImages.value = newDefinitions?.default?.images || {};
|
|
22
24
|
allGlobalOptions.value = newDefinitions?.default?.globalOptions || {};
|
|
23
25
|
});
|
|
24
26
|
import.meta.hot.accept("#blokkli-build/runtime-options", (mod) => {
|
|
@@ -93,6 +95,9 @@ export default function() {
|
|
|
93
95
|
function getBlockIcon(bundle) {
|
|
94
96
|
return blockIcons.value[bundle];
|
|
95
97
|
}
|
|
98
|
+
function getBlockImage(bundle) {
|
|
99
|
+
return blockImages.value[bundle];
|
|
100
|
+
}
|
|
96
101
|
const bundlesWithAutoAdd = computed(() => {
|
|
97
102
|
return blocks.value.filter((v) => {
|
|
98
103
|
const addBehaviour = v.editor?.addBehaviour ?? "form";
|
|
@@ -105,6 +110,7 @@ export default function() {
|
|
|
105
110
|
getProviderDefinition,
|
|
106
111
|
getDefaultDefinition,
|
|
107
112
|
getBlockIcon,
|
|
113
|
+
getBlockImage,
|
|
108
114
|
fragmentDefinitions: computed(() => fragments.value),
|
|
109
115
|
blockDefinitions: computed(() => blocks.value),
|
|
110
116
|
globalOptions: readonly(allGlobalOptions),
|
|
@@ -84,6 +84,13 @@ export type DomProvider = {
|
|
|
84
84
|
* @returns The registered field data, or undefined if not found
|
|
85
85
|
*/
|
|
86
86
|
getRegisteredField: (uuid: string, fieldName: string) => RegisteredField | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Get all registered fields that allow a specific fragment.
|
|
89
|
+
*
|
|
90
|
+
* @param fragmentName - The fragment name to search for
|
|
91
|
+
* @returns Array of RegisteredField objects that allow the fragment
|
|
92
|
+
*/
|
|
93
|
+
getFieldsAllowingFragment: (fragmentName: string) => RegisteredField[];
|
|
87
94
|
/**
|
|
88
95
|
* List of unique field types currently registered.
|
|
89
96
|
*
|
|
@@ -188,6 +188,17 @@ export default function(ui, debug, state, element) {
|
|
|
188
188
|
const key = `${uuid}:${fieldName}`;
|
|
189
189
|
return registeredFields[key];
|
|
190
190
|
};
|
|
191
|
+
const getFieldsAllowingFragment = (fragmentName) => {
|
|
192
|
+
const results = [];
|
|
193
|
+
for (const field of Object.values(registeredFields)) {
|
|
194
|
+
if (field && field.allowedFragments.includes(
|
|
195
|
+
fragmentName
|
|
196
|
+
)) {
|
|
197
|
+
results.push(field);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return results;
|
|
201
|
+
};
|
|
191
202
|
const getDropElementMarkup = (item, checkSize) => {
|
|
192
203
|
const getElement = () => {
|
|
193
204
|
if ("itemType" in item) {
|
|
@@ -513,6 +524,7 @@ export default function(ui, debug, state, element) {
|
|
|
513
524
|
registeredBlockUuids,
|
|
514
525
|
getDebugData,
|
|
515
526
|
getRegisteredField,
|
|
527
|
+
getFieldsAllowingFragment,
|
|
516
528
|
registeredBlocks: computed(() => registeredBlocks),
|
|
517
529
|
getBoundingClientRect
|
|
518
530
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BlokkliAdapter } from '#blokkli/editor/adapter';
|
|
2
|
+
import type { UserPermissions } from '../types/permissions.js';
|
|
3
|
+
export type PermissionsProvider = {
|
|
4
|
+
hasPermission: (permission: UserPermissions) => boolean;
|
|
5
|
+
};
|
|
6
|
+
export default function (adapter: BlokkliAdapter<any>): Promise<PermissionsProvider>;
|
|
@@ -301,6 +301,7 @@ export default async function(eventBus, adapter, context, $t, providerKey, permi
|
|
|
301
301
|
}
|
|
302
302
|
return true;
|
|
303
303
|
} catch (e) {
|
|
304
|
+
console.log(e);
|
|
304
305
|
if (errorMessage !== false) {
|
|
305
306
|
emitMessage(
|
|
306
307
|
errorMessage || $t("unexpectedMutationError", "An unexpected error happened."),
|
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
import { computed } from "vue";
|
|
2
|
-
import {
|
|
1
|
+
import { computed, ref } from "vue";
|
|
2
|
+
import {
|
|
3
|
+
translations
|
|
4
|
+
} from "#blokkli-build/translations";
|
|
3
5
|
import {
|
|
4
6
|
defaultLanguage,
|
|
5
7
|
forceDefaultLanguage
|
|
6
8
|
} from "#blokkli-build/editor-config";
|
|
9
|
+
import { LANGUAGES } from "../../../global/constants";
|
|
10
|
+
function isInterfaceLanguage(value) {
|
|
11
|
+
return LANGUAGES.includes(value);
|
|
12
|
+
}
|
|
7
13
|
const DEBUG_SWISS_GERMAN = false;
|
|
8
14
|
export default function(context) {
|
|
15
|
+
const allTranslations = ref(translations);
|
|
16
|
+
if (import.meta.hot) {
|
|
17
|
+
import.meta.hot.accept("#blokkli-build/translations", (mod) => {
|
|
18
|
+
if (mod?.translations) {
|
|
19
|
+
allTranslations.value = mod.translations;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
9
23
|
const language = computed(() => {
|
|
10
24
|
if (forceDefaultLanguage) {
|
|
11
25
|
return defaultLanguage;
|
|
12
26
|
}
|
|
13
|
-
if (context?.value.language &&
|
|
27
|
+
if (context?.value.language && isInterfaceLanguage(context.value.language)) {
|
|
14
28
|
return context.value.language;
|
|
15
29
|
}
|
|
16
30
|
return defaultLanguage;
|
|
@@ -19,11 +33,11 @@ export default function(context) {
|
|
|
19
33
|
const today = /* @__PURE__ */ new Date();
|
|
20
34
|
const isAprilFirst = today.getMonth() === 3 && today.getDate() === 1;
|
|
21
35
|
if (isAprilFirst && language.value === "de" || DEBUG_SWISS_GERMAN && import.meta.dev) {
|
|
22
|
-
return
|
|
36
|
+
return allTranslations.value.gsw_CH || allTranslations.value[language.value] || {};
|
|
23
37
|
}
|
|
24
|
-
return
|
|
38
|
+
return allTranslations.value[language.value] || {};
|
|
25
39
|
});
|
|
26
40
|
return (key, defaultValue) => {
|
|
27
|
-
return currentTranslations.value[key] || defaultValue;
|
|
41
|
+
return currentTranslations.value[key] || defaultValue || key;
|
|
28
42
|
};
|
|
29
43
|
}
|
|
@@ -127,6 +127,13 @@ export type BlockDefinitionProvider = {
|
|
|
127
127
|
* @returns The bundle definition, or undefined if not found
|
|
128
128
|
*/
|
|
129
129
|
getBlockBundleDefinition: (bundle: string) => BlockBundleDefinition | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Get the label of a bundle.
|
|
132
|
+
*
|
|
133
|
+
* @param bundle - The block bundle ID (e.g., 'text', 'image')
|
|
134
|
+
* @returns The label.
|
|
135
|
+
*/
|
|
136
|
+
getBlockLabel: (bundle: string) => string;
|
|
130
137
|
/**
|
|
131
138
|
* Get the field configuration for a specific field on an entity.
|
|
132
139
|
*
|
|
@@ -120,6 +120,9 @@ export default async function(adapter, selection, context) {
|
|
|
120
120
|
function getBlockBundleDefinition(bundle) {
|
|
121
121
|
return typeMap[bundle];
|
|
122
122
|
}
|
|
123
|
+
function getBlockLabel(bundle) {
|
|
124
|
+
return typeMap[bundle]?.label ?? bundle;
|
|
125
|
+
}
|
|
123
126
|
function getFieldConfig(entityType, entityBundle, fieldName) {
|
|
124
127
|
return fieldConfig.forName(entityType, entityBundle, fieldName);
|
|
125
128
|
}
|
|
@@ -155,6 +158,7 @@ export default async function(adapter, selection, context) {
|
|
|
155
158
|
return {
|
|
156
159
|
itemBundlesWithNested,
|
|
157
160
|
allowedTypesInList,
|
|
161
|
+
getBlockLabel,
|
|
158
162
|
getBlockBundleDefinition,
|
|
159
163
|
getDroppableFieldConfig,
|
|
160
164
|
generallyAvailableBundles,
|
|
@@ -65,6 +65,14 @@ export type UiProvider = {
|
|
|
65
65
|
* Whether any dialog is currently open.
|
|
66
66
|
*/
|
|
67
67
|
hasDialogOpen: ComputedRef<boolean>;
|
|
68
|
+
/**
|
|
69
|
+
* Whether a nested editor overlay is currently open.
|
|
70
|
+
*/
|
|
71
|
+
hasNestedEditorOpen: ComputedRef<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* Set the currently open nested editor.
|
|
74
|
+
*/
|
|
75
|
+
setNestedEditor: (key: string | null) => void;
|
|
68
76
|
/**
|
|
69
77
|
* The currently open dialog, or null if none is open.
|
|
70
78
|
*/
|
|
@@ -258,6 +266,33 @@ export type UiProvider = {
|
|
|
258
266
|
* ```
|
|
259
267
|
*/
|
|
260
268
|
formatDate: (date: string | Date, options?: Intl.DateTimeFormatOptions) => string;
|
|
269
|
+
/**
|
|
270
|
+
* Format a number using the current locale.
|
|
271
|
+
*
|
|
272
|
+
* @param value - The number to format
|
|
273
|
+
* @param options - Intl.NumberFormat options
|
|
274
|
+
* @returns Localized number string
|
|
275
|
+
*
|
|
276
|
+
* @example
|
|
277
|
+
* ```ts
|
|
278
|
+
* formatNumber(12345) // "12'345" (de-CH) or "12,345" (en)
|
|
279
|
+
* formatNumber(0.5, { style: 'percent' }) // "50%"
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;
|
|
283
|
+
/**
|
|
284
|
+
* Format a price in USD using the current locale.
|
|
285
|
+
*
|
|
286
|
+
* @param value - The price value
|
|
287
|
+
* @returns Localized currency string
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* ```ts
|
|
291
|
+
* formatPrice(12.5) // "$12.50" (en) or "12.50 $" (de-CH)
|
|
292
|
+
* formatPrice(0.0042) // "$0.0042"
|
|
293
|
+
* ```
|
|
294
|
+
*/
|
|
295
|
+
formatPrice: (value: number) => string;
|
|
261
296
|
/**
|
|
262
297
|
* Get absolute rectangle for an element or rectangle.
|
|
263
298
|
*
|
|
@@ -346,5 +381,10 @@ export type UiProvider = {
|
|
|
346
381
|
* The container element for the primary editor interface.
|
|
347
382
|
*/
|
|
348
383
|
mainLayoutElement: Readonly<ShallowRef<HTMLDivElement | null>>;
|
|
384
|
+
/**
|
|
385
|
+
* Whether the canvas is currently focused.
|
|
386
|
+
*/
|
|
387
|
+
canvasFocused: Readonly<Ref<boolean>>;
|
|
388
|
+
setCanvasFocused: (isFocused: boolean) => void;
|
|
349
389
|
};
|
|
350
390
|
export default function (eventBus: BlokkliEventBus, providerElement: HTMLElement, storage: StorageProvider, context: ComputedRef<AdapterContext>, element: ElementProvider, mainLayoutElement: Readonly<ShallowRef<HTMLDivElement | null>>, visibleViewportElement: Readonly<ShallowRef<HTMLDivElement | null>>): UiProvider;
|
|
@@ -32,12 +32,21 @@ export default function(eventBus, providerElement, storage, context, element, ma
|
|
|
32
32
|
const lang = interfaceLanguage.value;
|
|
33
33
|
return localeMap[lang] || lang;
|
|
34
34
|
});
|
|
35
|
+
const nestedEditorKey = ref("");
|
|
36
|
+
const hasNestedEditorOpen = computed(() => !!nestedEditorKey.value);
|
|
37
|
+
function setNestedEditor(key) {
|
|
38
|
+
nestedEditorKey.value = key ?? "";
|
|
39
|
+
}
|
|
35
40
|
const viewportWidth = ref(window.innerWidth);
|
|
36
41
|
const viewportHeight = ref(window.innerHeight);
|
|
37
42
|
const visibleViewportWidth = ref(0);
|
|
38
43
|
const visibleViewportHeight = ref(0);
|
|
39
44
|
const visibleViewportX = ref(0);
|
|
40
45
|
const visibleViewportY = ref(0);
|
|
46
|
+
const canvasFocused = ref(false);
|
|
47
|
+
function setCanvasFocused(isFocused) {
|
|
48
|
+
canvasFocused.value = isFocused;
|
|
49
|
+
}
|
|
41
50
|
const isProxyMode = ref(false);
|
|
42
51
|
const currentDialog = ref(null);
|
|
43
52
|
const openTooltip = ref("");
|
|
@@ -295,6 +304,17 @@ export default function(eventBus, providerElement, storage, context, element, ma
|
|
|
295
304
|
};
|
|
296
305
|
return dateObj.toLocaleString(locale.value, options || defaultOptions);
|
|
297
306
|
}
|
|
307
|
+
function formatNumber(value, options) {
|
|
308
|
+
return value.toLocaleString(locale.value, options);
|
|
309
|
+
}
|
|
310
|
+
function formatPrice(value) {
|
|
311
|
+
return value.toLocaleString(locale.value, {
|
|
312
|
+
style: "currency",
|
|
313
|
+
currency: "USD",
|
|
314
|
+
minimumFractionDigits: 2,
|
|
315
|
+
maximumFractionDigits: 4
|
|
316
|
+
});
|
|
317
|
+
}
|
|
298
318
|
addElementClasses(document.documentElement, "bk-is-animating", isAnimating);
|
|
299
319
|
addElementClasses(
|
|
300
320
|
document.documentElement,
|
|
@@ -383,6 +403,8 @@ export default function(eventBus, providerElement, storage, context, element, ma
|
|
|
383
403
|
interfaceLanguage,
|
|
384
404
|
locale,
|
|
385
405
|
formatDate,
|
|
406
|
+
formatNumber,
|
|
407
|
+
formatPrice,
|
|
386
408
|
hasDialogOpen,
|
|
387
409
|
hasTransformOverlayOpen,
|
|
388
410
|
hasTooltipOpen,
|
|
@@ -401,6 +423,10 @@ export default function(eventBus, providerElement, storage, context, element, ma
|
|
|
401
423
|
closeDialog,
|
|
402
424
|
currentDialog: readonly(currentDialog),
|
|
403
425
|
requireDialogCloseConfirm,
|
|
404
|
-
toArtboardCoords
|
|
426
|
+
toArtboardCoords,
|
|
427
|
+
hasNestedEditorOpen,
|
|
428
|
+
setNestedEditor,
|
|
429
|
+
setCanvasFocused,
|
|
430
|
+
canvasFocused: readonly(canvasFocused)
|
|
405
431
|
};
|
|
406
432
|
}
|