@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
|
@@ -8,74 +8,44 @@
|
|
|
8
8
|
'View, edit and delete your block templates.'
|
|
9
9
|
)
|
|
10
10
|
"
|
|
11
|
-
:width="
|
|
11
|
+
:width="1200"
|
|
12
12
|
icon="bk_mdi_dashboard"
|
|
13
13
|
hide-buttons
|
|
14
14
|
@cancel="$emit('cancel')"
|
|
15
15
|
>
|
|
16
16
|
<div ref="dialogEl" class="bk-templates-manage">
|
|
17
|
+
<div v-if="config.length" class="bk-form-group">
|
|
18
|
+
<ConfigForm v-model="filters" :config />
|
|
19
|
+
</div>
|
|
17
20
|
<Loading v-if="status === 'pending'" />
|
|
18
|
-
<template v-
|
|
21
|
+
<template v-if="items.length">
|
|
19
22
|
<table class="bk-table">
|
|
20
23
|
<thead>
|
|
21
24
|
<tr>
|
|
22
|
-
<th>{{ $t("templatesManageDialogLabelColumn", "Name") }}</th>
|
|
23
25
|
<th>
|
|
24
|
-
{{
|
|
25
|
-
$t("templatesManageDialogDescriptionColumn", "Description")
|
|
26
|
-
}}
|
|
26
|
+
{{ $t("nameDescription", "Name / Description") }}
|
|
27
27
|
</th>
|
|
28
28
|
<th>
|
|
29
|
-
{{ $t("
|
|
29
|
+
{{ $t("createdBy", "Created by") }}
|
|
30
|
+
</th>
|
|
31
|
+
<th>
|
|
32
|
+
{{ $t("created", "Created") }}
|
|
33
|
+
</th>
|
|
34
|
+
<th>
|
|
35
|
+
{{ $t("dateUpdated", "Updated") }}
|
|
36
|
+
</th>
|
|
37
|
+
<th>
|
|
38
|
+
{{ $t("actions", "Actions") }}
|
|
30
39
|
</th>
|
|
31
40
|
</tr>
|
|
32
41
|
</thead>
|
|
33
42
|
<tbody>
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<button
|
|
41
|
-
class="bk-button bk-is-danger bk-is-small"
|
|
42
|
-
:disabled="isDeleting"
|
|
43
|
-
:class="{ 'bk-is-loading': isDeleting }"
|
|
44
|
-
@click="onConfirmDelete(item.uuid)"
|
|
45
|
-
>
|
|
46
|
-
{{ $t("templatesManageDialogConfirmDelete", "Delete") }}
|
|
47
|
-
</button>
|
|
48
|
-
<button
|
|
49
|
-
class="bk-button bk-is-small"
|
|
50
|
-
:disabled="isDeleting"
|
|
51
|
-
@click="confirmDeleteUuid = ''"
|
|
52
|
-
>
|
|
53
|
-
{{ $t("templatesManageDialogCancelDelete", "Cancel") }}
|
|
54
|
-
</button>
|
|
55
|
-
</template>
|
|
56
|
-
<template v-else>
|
|
57
|
-
<button
|
|
58
|
-
v-if="
|
|
59
|
-
adapterHasEditMethod && item.permissions.includes('edit')
|
|
60
|
-
"
|
|
61
|
-
class="bk-button bk-is-small"
|
|
62
|
-
@click.prevent="onEdit(item.uuid)"
|
|
63
|
-
>
|
|
64
|
-
<Icon name="bk_mdi_edit" />
|
|
65
|
-
{{ $t("templatesManageDialogEdit", "Edit") }}
|
|
66
|
-
</button>
|
|
67
|
-
<button
|
|
68
|
-
v-if="item.permissions.includes('delete')"
|
|
69
|
-
class="bk-button bk-is-small"
|
|
70
|
-
@click="confirmDeleteUuid = item.uuid"
|
|
71
|
-
>
|
|
72
|
-
<Icon name="bk_mdi_delete" />
|
|
73
|
-
{{ $t("templatesManageDialogDelete", "Delete") }}
|
|
74
|
-
</button>
|
|
75
|
-
</template>
|
|
76
|
-
</div>
|
|
77
|
-
</td>
|
|
78
|
-
</tr>
|
|
43
|
+
<TabelRow
|
|
44
|
+
v-for="item in items"
|
|
45
|
+
:key="item.uuid"
|
|
46
|
+
v-bind="item"
|
|
47
|
+
@refresh="refresh"
|
|
48
|
+
/>
|
|
79
49
|
</tbody>
|
|
80
50
|
</table>
|
|
81
51
|
<div v-if="totalPages > 1">
|
|
@@ -86,13 +56,6 @@
|
|
|
86
56
|
{{ $t("templatesManageDialogNoResults", "No templates found.") }}
|
|
87
57
|
</p>
|
|
88
58
|
</div>
|
|
89
|
-
<NestedEditorOverlay
|
|
90
|
-
v-if="itemBeingEdited"
|
|
91
|
-
v-bind="itemBeingEdited"
|
|
92
|
-
:element="dialogEl"
|
|
93
|
-
@close="onCloseNested"
|
|
94
|
-
@submit="onSubmitNested"
|
|
95
|
-
/>
|
|
96
59
|
</DialogModal>
|
|
97
60
|
</template>
|
|
98
61
|
|
|
@@ -103,28 +66,24 @@ import {
|
|
|
103
66
|
computed,
|
|
104
67
|
useAsyncData,
|
|
105
68
|
watch,
|
|
106
|
-
|
|
69
|
+
reactive
|
|
107
70
|
} from "#imports";
|
|
108
71
|
import {
|
|
109
72
|
DialogModal,
|
|
110
73
|
Pagination,
|
|
111
74
|
Loading,
|
|
112
|
-
|
|
113
|
-
NestedEditorOverlay
|
|
75
|
+
ConfigForm
|
|
114
76
|
} from "#blokkli/editor/components";
|
|
77
|
+
import TabelRow from "./Item.vue";
|
|
115
78
|
defineEmits(["cancel"]);
|
|
116
|
-
const { $t, adapter
|
|
117
|
-
const dialogEl = useTemplateRef("dialogEl");
|
|
79
|
+
const { $t, adapter } = useBlokkli();
|
|
118
80
|
const page = ref(0);
|
|
119
81
|
const confirmDeleteUuid = ref("");
|
|
120
|
-
const
|
|
121
|
-
const itemBeingEdited = ref(null);
|
|
122
|
-
const adapterHasEditMethod = computed(
|
|
123
|
-
() => !!adapter.templatesGetEditUrl
|
|
124
|
-
);
|
|
82
|
+
const filters = reactive({});
|
|
125
83
|
const searchParams = computed(() => ({
|
|
126
84
|
page: page.value,
|
|
127
|
-
filters: {}
|
|
85
|
+
filters: { ...filters },
|
|
86
|
+
includeItems: false
|
|
128
87
|
}));
|
|
129
88
|
const { data, status, refresh } = await useAsyncData(
|
|
130
89
|
() => adapter.templatesSearch(searchParams.value),
|
|
@@ -138,47 +97,11 @@ const { data, status, refresh } = await useAsyncData(
|
|
|
138
97
|
})
|
|
139
98
|
}
|
|
140
99
|
);
|
|
141
|
-
function onCloseNested() {
|
|
142
|
-
itemBeingEdited.value = null;
|
|
143
|
-
}
|
|
144
|
-
function onSubmitNested() {
|
|
145
|
-
itemBeingEdited.value = null;
|
|
146
|
-
refresh();
|
|
147
|
-
}
|
|
148
100
|
const perPage = computed(() => data.value.perPage);
|
|
149
101
|
const totalPages = computed(() => Math.ceil(data.value.total / perPage.value));
|
|
150
102
|
const items = computed(() => data.value.items);
|
|
103
|
+
const config = computed(() => data.value.filters);
|
|
151
104
|
watch(page, () => {
|
|
152
105
|
confirmDeleteUuid.value = "";
|
|
153
106
|
});
|
|
154
|
-
function onEdit(templateUuid) {
|
|
155
|
-
const editUrl = adapter.templatesGetEditUrl({ templateUuid });
|
|
156
|
-
if (!editUrl) {
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
const template = items.value.find((v) => v.uuid === templateUuid);
|
|
160
|
-
if (!template) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
itemBeingEdited.value = {
|
|
164
|
-
url: editUrl,
|
|
165
|
-
uuid: templateUuid,
|
|
166
|
-
title: $t("templatesEditOverlayTitle", "Edit template"),
|
|
167
|
-
label: template.label
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
async function onConfirmDelete(uuid) {
|
|
171
|
-
if (!adapter.templatesDelete) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
isDeleting.value = true;
|
|
175
|
-
await state.mutateWithLoadingState(
|
|
176
|
-
() => adapter.templatesDelete({ templateUuid: uuid }),
|
|
177
|
-
$t("templatesDeleteError", "Failed to delete template."),
|
|
178
|
-
$t("templatesDeleteSuccess", "Template deleted successfully.")
|
|
179
|
-
);
|
|
180
|
-
isDeleting.value = false;
|
|
181
|
-
confirmDeleteUuid.value = "";
|
|
182
|
-
await refresh();
|
|
183
|
-
}
|
|
184
107
|
</script>
|
|
@@ -49,7 +49,7 @@ const { adapter } = defineBlokkliFeature({
|
|
|
49
49
|
label: "Templates",
|
|
50
50
|
description: "Add blocks from templates.",
|
|
51
51
|
requiredAdapterMethods: ["templatesAdd", "templatesSearch"],
|
|
52
|
-
dependencies: ["add-list"]
|
|
52
|
+
dependencies: ["add-list", "entity-title"]
|
|
53
53
|
});
|
|
54
54
|
const { state, $t, ui, selection } = useBlokkli();
|
|
55
55
|
const placedAction = ref(null);
|
|
@@ -77,7 +77,7 @@ async function onCreateTemplateConfirm(label, description, isDefault) {
|
|
|
77
77
|
if (!adapter.templatesCreate || !createTemplateUuids.value.length) {
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
await state.mutateWithLoadingState(
|
|
80
|
+
const isSuccess = await state.mutateWithLoadingState(
|
|
81
81
|
() => adapter.templatesCreate({
|
|
82
82
|
label,
|
|
83
83
|
description: description || void 0,
|
|
@@ -90,7 +90,9 @@ async function onCreateTemplateConfirm(label, description, isDefault) {
|
|
|
90
90
|
'Successfully created template "@label"'
|
|
91
91
|
).replace("@label", label)
|
|
92
92
|
);
|
|
93
|
-
|
|
93
|
+
if (isSuccess) {
|
|
94
|
+
closeCreateDialog();
|
|
95
|
+
}
|
|
94
96
|
}
|
|
95
97
|
function onCreateTemplate() {
|
|
96
98
|
const uuids = selection.uuids.value;
|
|
@@ -110,11 +112,11 @@ defineAddAction(() => {
|
|
|
110
112
|
id: "template",
|
|
111
113
|
icon: "bk_mdi_dashboard",
|
|
112
114
|
color: "rose",
|
|
113
|
-
title: $t("templatesAddTemplate", "
|
|
115
|
+
title: $t("templatesAddTemplate", "Template"),
|
|
114
116
|
weight: 10,
|
|
115
117
|
description: $t(
|
|
116
118
|
"templatesAddTemplateDescription",
|
|
117
|
-
"<p>Drag the icon into the page to add blocks from a template.</p>"
|
|
119
|
+
"<p>Drag the icon into the page to add blocks from a template.</p><p>Templates are copied to your page and can be changed without affecting other pages.</p>"
|
|
118
120
|
),
|
|
119
121
|
callback: (action) => {
|
|
120
122
|
placedAction.value = action;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlokkliAdapterSearchResults, AdapterSearchArguments } from '#blokkli/editor/adapter';
|
|
2
2
|
import type { BlokkliItemHost } from '#blokkli/editor/types/field';
|
|
3
|
-
import type { FieldListItem } from '#blokkli/types';
|
|
3
|
+
import type { EntityMetadata, FieldListItem } from '#blokkli/types';
|
|
4
4
|
import type { EditPermission } from '#blokkli/types/provider';
|
|
5
5
|
export type AdapterAddTemplate = {
|
|
6
6
|
templateUuid: string;
|
|
@@ -17,13 +17,17 @@ export type TemplateItem = {
|
|
|
17
17
|
uuid: string;
|
|
18
18
|
label: string;
|
|
19
19
|
description?: string;
|
|
20
|
-
items
|
|
20
|
+
items?: FieldListItem[];
|
|
21
|
+
itemBundles: string[];
|
|
21
22
|
isDefault: boolean;
|
|
23
|
+
translationLanguages: string[];
|
|
22
24
|
permissions: EditPermission[];
|
|
25
|
+
metadata: EntityMetadata | null;
|
|
23
26
|
};
|
|
24
27
|
export type AdapterTemplatesGetResult = BlokkliAdapterSearchResults<TemplateItem>;
|
|
25
28
|
export type TemplatesSearchArguments = {
|
|
26
29
|
host?: BlokkliItemHost;
|
|
30
|
+
includeItems: boolean;
|
|
27
31
|
} & AdapterSearchArguments;
|
|
28
32
|
export type AdapterDeleteTemplate = {
|
|
29
33
|
templateUuid: string;
|
|
@@ -55,3 +59,8 @@ declare module '#blokkli/editor/adapter' {
|
|
|
55
59
|
templatesGetEditUrl?: (e: AdapterTemplatesGetEditUrl) => string;
|
|
56
60
|
}
|
|
57
61
|
}
|
|
62
|
+
declare module '#blokkli/editor/types/permissions' {
|
|
63
|
+
interface UserPermissionMap {
|
|
64
|
+
manage_default_templates: 'Manage default block templates.';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -64,7 +64,12 @@ import {
|
|
|
64
64
|
onMounted,
|
|
65
65
|
onBeforeUnmount
|
|
66
66
|
} from "#imports";
|
|
67
|
-
import {
|
|
67
|
+
import {
|
|
68
|
+
ConfigForm,
|
|
69
|
+
DiffViewerState,
|
|
70
|
+
Icon,
|
|
71
|
+
Loading
|
|
72
|
+
} from "#blokkli/editor/components";
|
|
68
73
|
const props = defineProps({
|
|
69
74
|
plugin: { type: Object, required: true },
|
|
70
75
|
uuids: { type: Array, required: false }
|
|
@@ -23,7 +23,10 @@ import {
|
|
|
23
23
|
} from "#imports";
|
|
24
24
|
import { BlokkliTransition } from "#blokkli/editor/components";
|
|
25
25
|
import TransformDialog from "./Dialog/index.vue";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
defineCommands,
|
|
28
|
+
defineItemDropdownAction
|
|
29
|
+
} from "#blokkli/editor/composables";
|
|
27
30
|
function filterTransforms(plugins2, selectedItems, selectedBundles, allowedBundles) {
|
|
28
31
|
return plugins2.filter((plugin) => {
|
|
29
32
|
if (selectedItems.length < plugin.min) {
|
|
@@ -39,7 +42,7 @@ function filterTransforms(plugins2, selectedItems, selectedBundles, allowedBundl
|
|
|
39
42
|
return selectedBundles.every((bundle) => plugin.bundles.includes(bundle));
|
|
40
43
|
});
|
|
41
44
|
}
|
|
42
|
-
const {
|
|
45
|
+
const { adapters } = defineBlokkliFeature({
|
|
43
46
|
id: "transform",
|
|
44
47
|
icon: "bk_mdi_function",
|
|
45
48
|
label: "Transform",
|
|
@@ -56,7 +59,7 @@ const {
|
|
|
56
59
|
status
|
|
57
60
|
} = await useLazyAsyncData(
|
|
58
61
|
() => {
|
|
59
|
-
return
|
|
62
|
+
return adapters.getAggregated("getTransformPlugins");
|
|
60
63
|
},
|
|
61
64
|
{
|
|
62
65
|
immediate: false,
|
|
@@ -77,10 +80,7 @@ const {
|
|
|
77
80
|
execute: executeHostPlugins
|
|
78
81
|
} = await useLazyAsyncData(
|
|
79
82
|
() => {
|
|
80
|
-
|
|
81
|
-
return adapter.getHostTransformPlugins();
|
|
82
|
-
}
|
|
83
|
-
return Promise.resolve([]);
|
|
83
|
+
return adapters.getAggregated("getHostTransformPlugins");
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
immediate: !openPlugin.value,
|
|
@@ -118,7 +118,9 @@ function cancelTransform() {
|
|
|
118
118
|
}
|
|
119
119
|
watch(selection.uuids, async () => {
|
|
120
120
|
if (status.value === "idle") {
|
|
121
|
-
execute()
|
|
121
|
+
execute().then(() => {
|
|
122
|
+
console.log(plugins.value);
|
|
123
|
+
});
|
|
122
124
|
}
|
|
123
125
|
});
|
|
124
126
|
watch(selection.hasHostSelected, () => {
|
|
@@ -151,11 +153,14 @@ async function onTransformBlock(plugin, uuids, values) {
|
|
|
151
153
|
ui.setTransform(plugin.label);
|
|
152
154
|
openPlugin.value = null;
|
|
153
155
|
await state.mutateWithLoadingState(
|
|
154
|
-
() =>
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
() => (
|
|
157
|
+
// Route to correct source (base adapter or extension) based on plugin ID namespace
|
|
158
|
+
adapters.callNamespaced("applyTransformPlugin", {
|
|
159
|
+
uuids,
|
|
160
|
+
pluginId: plugin.id,
|
|
161
|
+
config: values
|
|
162
|
+
})
|
|
163
|
+
),
|
|
159
164
|
$t(
|
|
160
165
|
"failedToTransform",
|
|
161
166
|
'The action "@name" could not be executed.'
|
|
@@ -174,16 +179,16 @@ function onSubmitDialog(values) {
|
|
|
174
179
|
}
|
|
175
180
|
}
|
|
176
181
|
async function onTransformHost(plugin, values) {
|
|
177
|
-
if (!adapter.applyHostTransformPlugin) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
182
|
ui.setTransform(plugin.label);
|
|
181
183
|
openPlugin.value = null;
|
|
182
184
|
await state.mutateWithLoadingState(
|
|
183
|
-
() =>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
() => (
|
|
186
|
+
// Route to correct source (base adapter or extension) based on plugin ID namespace
|
|
187
|
+
adapters.callNamespaced("applyHostTransformPlugin", {
|
|
188
|
+
pluginId: plugin.id,
|
|
189
|
+
config: values
|
|
190
|
+
})
|
|
191
|
+
),
|
|
187
192
|
$t(
|
|
188
193
|
"failedToTransform",
|
|
189
194
|
'The action "@name" could not be executed.'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { PluginConfigInput, PluginConfigInputItem } from '#blokkli/editor/types/pluginConfig';
|
|
2
|
-
type AdapterApplyTransformPlugin = {
|
|
2
|
+
export type AdapterApplyTransformPlugin = {
|
|
3
3
|
pluginId: string;
|
|
4
4
|
uuids: string[];
|
|
5
5
|
config?: PluginConfigInputItem[];
|
|
6
6
|
};
|
|
7
|
-
type AdapterApplyHostTransformPlugin = {
|
|
7
|
+
export type AdapterApplyHostTransformPlugin = {
|
|
8
8
|
pluginId: string;
|
|
9
9
|
config?: PluginConfigInputItem[];
|
|
10
10
|
};
|
|
@@ -63,7 +63,10 @@ export interface HostTransformPlugin {
|
|
|
63
63
|
preview?: boolean;
|
|
64
64
|
}
|
|
65
65
|
declare module '#blokkli/editor/adapter' {
|
|
66
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Extensible transform methods - available on both base adapter and extensions.
|
|
68
|
+
*/
|
|
69
|
+
interface AdapterExtensionMethods<T> {
|
|
67
70
|
/**
|
|
68
71
|
* Get all possible transform plugins.
|
|
69
72
|
*/
|
|
@@ -102,4 +105,3 @@ declare module '#blokkli/editor/adapter' {
|
|
|
102
105
|
previewHostTransformPlugin?: (e: AdapterApplyHostTransformPlugin) => Promise<MutationResponseLike<T>>;
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
|
-
export {};
|
|
@@ -35,7 +35,12 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script setup>
|
|
38
|
-
import {
|
|
38
|
+
import {
|
|
39
|
+
useBlokkli,
|
|
40
|
+
defineBlokkliFeature,
|
|
41
|
+
computed,
|
|
42
|
+
useTemplateRef
|
|
43
|
+
} from "#imports";
|
|
39
44
|
import { PluginSidebar } from "#blokkli/editor/plugins";
|
|
40
45
|
import { Icon } from "#blokkli/editor/components";
|
|
41
46
|
import ValidationOverlay from "./Overlay/index.vue";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isValidDate(d: Date): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BlockOptionDefinition } from '#blokkli/types/blockOptions';
|
|
2
|
+
import type { BlockDefinitionOptionsInput } from '#blokkli/types/definitions';
|
|
3
|
+
export type OptionItem = {
|
|
4
|
+
property: string;
|
|
5
|
+
option: BlockOptionDefinition;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Get available options for a block definition by merging
|
|
9
|
+
* block-specific options with referenced global options.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getAvailableOptions(definitionOptions: BlockDefinitionOptionsInput | undefined, globalOptionKeys: string[] | undefined, globalOptionsMap: Record<string, BlockOptionDefinition>): OptionItem[];
|
|
12
|
+
/**
|
|
13
|
+
* Get the current value for an option, checking mutated options first,
|
|
14
|
+
* then falling back to the default value.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getMutatedOptionValue(mutatedOptions: Record<string, Record<string, string>> | undefined, uuid: string, key: string, defaultValue: string | boolean | string[] | number | undefined): string | boolean | string[] | number | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Convert a typed option value to the string format expected by the adapter.
|
|
19
|
+
*/
|
|
20
|
+
export declare function optionValueToStorable(definition: BlockOptionDefinition, value: string | string[] | boolean | undefined | null | number): string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export function getAvailableOptions(definitionOptions, globalOptionKeys, globalOptionsMap) {
|
|
2
|
+
const options = definitionOptions || {};
|
|
3
|
+
const global = (globalOptionKeys || []).reduce(
|
|
4
|
+
(acc, key) => {
|
|
5
|
+
const globalDefinition = globalOptionsMap[key];
|
|
6
|
+
if (globalDefinition) {
|
|
7
|
+
acc[key] = globalDefinition;
|
|
8
|
+
}
|
|
9
|
+
return acc;
|
|
10
|
+
},
|
|
11
|
+
{}
|
|
12
|
+
);
|
|
13
|
+
return Object.entries({ ...options, ...global }).map(
|
|
14
|
+
([property, option]) => ({
|
|
15
|
+
property,
|
|
16
|
+
option
|
|
17
|
+
})
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export function getMutatedOptionValue(mutatedOptions, uuid, key, defaultValue) {
|
|
21
|
+
if (!uuid) {
|
|
22
|
+
return "";
|
|
23
|
+
}
|
|
24
|
+
const blockMutatedOptions = mutatedOptions?.[uuid];
|
|
25
|
+
if (blockMutatedOptions !== void 0 && blockMutatedOptions[key] !== void 0) {
|
|
26
|
+
return blockMutatedOptions[key];
|
|
27
|
+
}
|
|
28
|
+
return defaultValue;
|
|
29
|
+
}
|
|
30
|
+
export function optionValueToStorable(definition, value) {
|
|
31
|
+
if (definition.type === "checkbox") {
|
|
32
|
+
if (typeof value === "string" && (value === "1" || value === "0")) {
|
|
33
|
+
return value;
|
|
34
|
+
} else if (typeof value === "boolean") {
|
|
35
|
+
return value === true ? "1" : "0";
|
|
36
|
+
}
|
|
37
|
+
return "0";
|
|
38
|
+
} else if (definition.type === "text" || definition.type === "radios" || definition.type === "datetime-local") {
|
|
39
|
+
if (typeof value === "string") {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
} else if (definition.type === "checkboxes") {
|
|
43
|
+
if (Array.isArray(value)) {
|
|
44
|
+
return value.join(",");
|
|
45
|
+
} else if (typeof value === "string") {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
} else if (definition.type === "number" || definition.type === "range") {
|
|
49
|
+
if (typeof value === "number") {
|
|
50
|
+
return String(value);
|
|
51
|
+
} else if (typeof value === "string") {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
} else if (definition.type === "color") {
|
|
55
|
+
if (typeof value === "string") {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return "";
|
|
60
|
+
}
|
|
@@ -5,6 +5,7 @@ type RectangleBufferRect = Rectangle & {
|
|
|
5
5
|
index: number;
|
|
6
6
|
radius?: [number, number, number, number];
|
|
7
7
|
state?: number;
|
|
8
|
+
nestingLevel?: number;
|
|
8
9
|
};
|
|
9
10
|
type RectangleBufferCollectorOptions = {
|
|
10
11
|
padding?: number;
|
|
@@ -12,6 +13,7 @@ type RectangleBufferCollectorOptions = {
|
|
|
12
13
|
};
|
|
13
14
|
type PlacedRectangle = Rectangle & {
|
|
14
15
|
originalY: number;
|
|
16
|
+
nestingLevel?: number;
|
|
15
17
|
};
|
|
16
18
|
type PendingRect<T> = {
|
|
17
19
|
rect: Omit<T, 'index'>;
|
|
@@ -35,7 +37,9 @@ export declare class RectangleBufferCollector<T extends RectangleBufferRect> {
|
|
|
35
37
|
pendingRects: PendingRect<T>[];
|
|
36
38
|
constructor(options?: RectangleBufferCollectorOptions);
|
|
37
39
|
reset(): void;
|
|
38
|
-
getIdealPosition(x: number, y: number, width: number, height: number, isEmptyField?: boolean): Rectangle
|
|
40
|
+
getIdealPosition(x: number, y: number, width: number, height: number, isEmptyField?: boolean, nestingLevel?: number): Rectangle & {
|
|
41
|
+
nestingLevel?: number;
|
|
42
|
+
};
|
|
39
43
|
addRectangle(rect: Omit<T, 'index'>, type: number, checkOverlap?: boolean): void;
|
|
40
44
|
processPendingRects(): void;
|
|
41
45
|
getIndex(id: string): number | undefined;
|
|
@@ -35,14 +35,15 @@ export class RectangleBufferCollector {
|
|
|
35
35
|
this.bufferInfo = null;
|
|
36
36
|
this.pendingRects = [];
|
|
37
37
|
}
|
|
38
|
-
getIdealPosition(x, y, width, height, isEmptyField = false) {
|
|
38
|
+
getIdealPosition(x, y, width, height, isEmptyField = false, nestingLevel) {
|
|
39
39
|
const MIN_HEIGHT = 5;
|
|
40
40
|
const rect = {
|
|
41
41
|
x,
|
|
42
42
|
y,
|
|
43
43
|
width,
|
|
44
44
|
height,
|
|
45
|
-
originalY: y
|
|
45
|
+
originalY: y,
|
|
46
|
+
nestingLevel
|
|
46
47
|
};
|
|
47
48
|
const intersections = [];
|
|
48
49
|
for (let i = 0; i < this.placedRects.length; i++) {
|
|
@@ -52,7 +53,17 @@ export class RectangleBufferCollector {
|
|
|
52
53
|
...placed,
|
|
53
54
|
height: Math.max(placed.height, MIN_HEIGHT)
|
|
54
55
|
};
|
|
55
|
-
if (
|
|
56
|
+
if (isEmptyField) {
|
|
57
|
+
const buffer = 1;
|
|
58
|
+
const bufferedRect = {
|
|
59
|
+
...testRect,
|
|
60
|
+
y: testRect.y - buffer,
|
|
61
|
+
height: testRect.height + buffer * 2
|
|
62
|
+
};
|
|
63
|
+
if (intersects(bufferedRect, testPlaced)) {
|
|
64
|
+
intersections.push(placed);
|
|
65
|
+
}
|
|
66
|
+
} else if (intersects(testRect, testPlaced)) {
|
|
56
67
|
intersections.push(placed);
|
|
57
68
|
}
|
|
58
69
|
}
|
|
@@ -62,19 +73,39 @@ export class RectangleBufferCollector {
|
|
|
62
73
|
}
|
|
63
74
|
intersections.sort((a, b) => a.originalY - b.originalY);
|
|
64
75
|
if (isEmptyField) {
|
|
76
|
+
const MAX_DISPLACEMENT = 100;
|
|
65
77
|
for (let i = 0; i < intersections.length; i++) {
|
|
66
78
|
const existingRect = intersections[i];
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
const intersectionIsAbove = existingRect.y < y;
|
|
80
|
+
let gapStart;
|
|
81
|
+
let gapEnd;
|
|
82
|
+
if (intersectionIsAbove) {
|
|
83
|
+
gapStart = existingRect.y + existingRect.height;
|
|
84
|
+
const rectsBelow = this.placedRects.filter(
|
|
85
|
+
(r) => r.y >= gapStart && r.y <= y + MAX_DISPLACEMENT && r.x < x + width && r.x + r.width > x
|
|
86
|
+
);
|
|
87
|
+
if (rectsBelow.length > 0) {
|
|
88
|
+
gapEnd = Math.min(...rectsBelow.map((r) => r.y));
|
|
89
|
+
} else {
|
|
90
|
+
gapEnd = y + MAX_DISPLACEMENT;
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
gapEnd = existingRect.y;
|
|
94
|
+
const rectsAbove = this.placedRects.filter(
|
|
95
|
+
(r) => r.y + r.height <= gapEnd && r.y + r.height >= y - MAX_DISPLACEMENT && r.x < x + width && r.x + r.width > x
|
|
96
|
+
);
|
|
97
|
+
if (rectsAbove.length > 0) {
|
|
98
|
+
gapStart = Math.max(...rectsAbove.map((r) => r.y + r.height));
|
|
99
|
+
} else {
|
|
100
|
+
gapStart = Math.max(0, y - MAX_DISPLACEMENT);
|
|
101
|
+
}
|
|
73
102
|
}
|
|
74
|
-
const
|
|
75
|
-
const availableSpace = nextTop - prevBottom;
|
|
103
|
+
const availableSpace = gapEnd - gapStart;
|
|
76
104
|
if (availableSpace >= height) {
|
|
77
|
-
const centeredY =
|
|
105
|
+
const centeredY = gapStart + (availableSpace - height) / 2;
|
|
106
|
+
if (Math.abs(centeredY - y) > MAX_DISPLACEMENT) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
78
109
|
const centeredRect = { ...rect, y: centeredY };
|
|
79
110
|
let hasIntersection = false;
|
|
80
111
|
for (const placed of this.placedRects) {
|
|
@@ -210,7 +241,8 @@ export class RectangleBufferCollector {
|
|
|
210
241
|
rect.y,
|
|
211
242
|
rect.width,
|
|
212
243
|
rect.height,
|
|
213
|
-
isEmptyField
|
|
244
|
+
isEmptyField,
|
|
245
|
+
rect.nestingLevel
|
|
214
246
|
);
|
|
215
247
|
} else {
|
|
216
248
|
finalPosition = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19,1L17.74,3.75L15,5L17.74,6.26L19,9L20.25,6.26L23,5L20.25,3.75M9,4L6.5,9.5L1,12L6.5,14.5L9,20L11.5,14.5L17,12L11.5,9.5M19,15L17.74,17.74L15,19L17.74,20.25L19,23L20.25,20.25L23,19L20.25,17.74" /></svg>
|
|
@@ -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;
|