@blokkli/editor 2.0.0-alpha.32 → 2.0.0-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global/constants/index.d.ts +1 -0
- package/dist/global/constants/index.js +1 -0
- package/dist/global/types/features.d.ts +4 -0
- package/dist/module.d.mts +1 -24
- package/dist/module.json +1 -1
- package/dist/module.mjs +432 -10825
- 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 +7 -1
- package/package.json +29 -7
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@wheel.capture.passive="onWheel"
|
|
8
8
|
@mouseenter="onMouseEnter"
|
|
9
9
|
@mouseleave="onMouseLeave"
|
|
10
|
+
@mousemove="onMouseMove"
|
|
10
11
|
>
|
|
11
12
|
<div
|
|
12
13
|
class="bk-add-list-inner"
|
|
@@ -18,10 +19,32 @@
|
|
|
18
19
|
:selectable-bundles
|
|
19
20
|
:generally-available-bundles
|
|
20
21
|
:hide-disabled-blocks="settings.hideDisabledBlocks"
|
|
22
|
+
:help-active
|
|
23
|
+
@help="onHelp"
|
|
24
|
+
@start-help="onStartHelp"
|
|
25
|
+
/>
|
|
26
|
+
<AddListActions
|
|
27
|
+
:selectable-bundles
|
|
28
|
+
:help-active
|
|
29
|
+
:actions
|
|
30
|
+
@help="onHelp"
|
|
31
|
+
@start-help="onStartHelp"
|
|
21
32
|
/>
|
|
22
|
-
<AddListActions :selectable-bundles />
|
|
23
33
|
</div>
|
|
34
|
+
<Transition name="bk-add-list-help" :duration="200">
|
|
35
|
+
<AddListHelpComponent
|
|
36
|
+
v-if="hasOpenedHelpOnce || DEBUG_HELP"
|
|
37
|
+
v-show="helpIsVisible"
|
|
38
|
+
:id="helpId"
|
|
39
|
+
:is-visible="helpIsVisible"
|
|
40
|
+
:type="helpType"
|
|
41
|
+
:element="activeHelpItem?.element"
|
|
42
|
+
:actions
|
|
43
|
+
:bundles="generallyAvailableBundles"
|
|
44
|
+
/>
|
|
45
|
+
</Transition>
|
|
24
46
|
</div>
|
|
47
|
+
|
|
25
48
|
<PluginTourItem
|
|
26
49
|
id="add-blocks"
|
|
27
50
|
:element="wrapper"
|
|
@@ -37,13 +60,16 @@ import {
|
|
|
37
60
|
computed,
|
|
38
61
|
useBlokkli,
|
|
39
62
|
defineBlokkliFeature,
|
|
40
|
-
useTemplateRef
|
|
63
|
+
useTemplateRef,
|
|
64
|
+
onBeforeUnmount
|
|
41
65
|
} from "#imports";
|
|
42
66
|
import { PluginTourItem } from "#blokkli/editor/plugins";
|
|
43
67
|
import AddListBlocks from "./Blocks/index.vue";
|
|
44
68
|
import AddListActions from "./Actions/index.vue";
|
|
69
|
+
import AddListHelpComponent from "./Help/index.vue";
|
|
45
70
|
import { itemEntityType } from "#blokkli-build/config";
|
|
46
71
|
import { onlyUnique } from "#blokkli/helpers";
|
|
72
|
+
const DEBUG_HELP = false;
|
|
47
73
|
const { settings } = defineBlokkliFeature({
|
|
48
74
|
id: "add-list",
|
|
49
75
|
icon: "bk_mdi_add",
|
|
@@ -60,7 +86,20 @@ const { settings } = defineBlokkliFeature({
|
|
|
60
86
|
},
|
|
61
87
|
screenshot: "feature-add-list.jpg"
|
|
62
88
|
});
|
|
63
|
-
const { $t, ui, selection, state, tour, types, context, dom } = useBlokkli();
|
|
89
|
+
const { $t, ui, selection, state, tour, types, context, dom, plugins } = useBlokkli();
|
|
90
|
+
const actions = computed(() => {
|
|
91
|
+
return plugins.get("addAction").sort((a, b) => a.weight - b.weight);
|
|
92
|
+
});
|
|
93
|
+
const helpActive = ref(false);
|
|
94
|
+
const hasOpenedHelpOnce = ref(false);
|
|
95
|
+
const activeHelpItem = ref(null);
|
|
96
|
+
const helpType = computed(
|
|
97
|
+
() => DEBUG_HELP ? "bundle" : activeHelpItem.value?.type
|
|
98
|
+
);
|
|
99
|
+
const helpId = computed(() => DEBUG_HELP ? "image" : activeHelpItem.value?.id);
|
|
100
|
+
const helpIsVisible = computed(
|
|
101
|
+
() => isActive.value && helpActive.value || DEBUG_HELP
|
|
102
|
+
);
|
|
64
103
|
const getAllowedTypesForSelected = (p) => {
|
|
65
104
|
if (types.itemBundlesWithNested.includes(p.bundle)) {
|
|
66
105
|
return types.fieldConfig.forEntityTypeAndBundle(itemEntityType, p.bundle).flatMap((v) => v.allowedBundles).filter(Boolean);
|
|
@@ -107,24 +146,78 @@ const hasContextMenuOpen = computed(
|
|
|
107
146
|
const wrapper = useTemplateRef("wrapper");
|
|
108
147
|
const isHovered = ref(false);
|
|
109
148
|
let mouseTimeout = null;
|
|
149
|
+
let mouseLeaveTimeout = null;
|
|
150
|
+
const ANGLE_THRESHOLD = 35 * Math.PI / 180;
|
|
151
|
+
let lastMouseX = 0;
|
|
152
|
+
let lastMouseY = 0;
|
|
153
|
+
let pendingHelpItem = null;
|
|
154
|
+
let isMovingTowardsPopup = false;
|
|
155
|
+
function clearPendingHelp() {
|
|
156
|
+
pendingHelpItem = null;
|
|
157
|
+
}
|
|
158
|
+
function onMouseMove(e) {
|
|
159
|
+
const dx = e.clientX - lastMouseX;
|
|
160
|
+
const dy = e.clientY - lastMouseY;
|
|
161
|
+
if (Math.abs(dx) > 2 || Math.abs(dy) > 2) {
|
|
162
|
+
const angle = Math.abs(Math.atan2(Math.abs(dx), Math.abs(dy)));
|
|
163
|
+
isMovingTowardsPopup = angle >= ANGLE_THRESHOLD && dx > 0;
|
|
164
|
+
if (!isMovingTowardsPopup && pendingHelpItem) {
|
|
165
|
+
activeHelpItem.value = pendingHelpItem;
|
|
166
|
+
pendingHelpItem = null;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
lastMouseX = e.clientX;
|
|
170
|
+
lastMouseY = e.clientY;
|
|
171
|
+
}
|
|
172
|
+
function onHelp(item) {
|
|
173
|
+
if (isMovingTowardsPopup) {
|
|
174
|
+
pendingHelpItem = item;
|
|
175
|
+
} else {
|
|
176
|
+
pendingHelpItem = null;
|
|
177
|
+
activeHelpItem.value = item;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
110
180
|
const isActive = computed(() => {
|
|
111
181
|
return (isHovered.value || hasContextMenuOpen.value || tour.isTouring.value) && !selection.isDragging.value;
|
|
112
182
|
});
|
|
183
|
+
function onStartHelp(item) {
|
|
184
|
+
helpActive.value = true;
|
|
185
|
+
hasOpenedHelpOnce.value = true;
|
|
186
|
+
activeHelpItem.value = item;
|
|
187
|
+
}
|
|
113
188
|
function onMouseEnter() {
|
|
189
|
+
if (mouseLeaveTimeout) {
|
|
190
|
+
window.clearTimeout(mouseLeaveTimeout);
|
|
191
|
+
mouseLeaveTimeout = null;
|
|
192
|
+
}
|
|
114
193
|
if (mouseTimeout) {
|
|
115
|
-
clearTimeout(mouseTimeout);
|
|
116
|
-
isHovered.value = true;
|
|
194
|
+
window.clearTimeout(mouseTimeout);
|
|
117
195
|
mouseTimeout = null;
|
|
118
|
-
return;
|
|
119
196
|
}
|
|
120
|
-
mouseTimeout = setTimeout(() => {
|
|
197
|
+
mouseTimeout = window.setTimeout(() => {
|
|
121
198
|
isHovered.value = true;
|
|
122
199
|
mouseTimeout = null;
|
|
123
200
|
}, 300);
|
|
124
201
|
}
|
|
125
202
|
function onMouseLeave() {
|
|
126
|
-
|
|
127
|
-
|
|
203
|
+
clearPendingHelp();
|
|
204
|
+
if (mouseTimeout) {
|
|
205
|
+
window.clearTimeout(mouseTimeout);
|
|
206
|
+
mouseTimeout = null;
|
|
207
|
+
}
|
|
208
|
+
if (mouseLeaveTimeout) {
|
|
209
|
+
window.clearTimeout(mouseLeaveTimeout);
|
|
210
|
+
mouseLeaveTimeout = null;
|
|
211
|
+
}
|
|
212
|
+
if (helpActive.value) {
|
|
213
|
+
mouseLeaveTimeout = window.setTimeout(() => {
|
|
214
|
+
isHovered.value = false;
|
|
215
|
+
helpActive.value = false;
|
|
216
|
+
}, 300);
|
|
217
|
+
} else {
|
|
218
|
+
isHovered.value = false;
|
|
219
|
+
helpActive.value = false;
|
|
220
|
+
}
|
|
128
221
|
}
|
|
129
222
|
const onWheel = (e) => {
|
|
130
223
|
if (e.ctrlKey || e.metaKey) {
|
|
@@ -139,6 +232,12 @@ const tourText = computed(
|
|
|
139
232
|
"<p>This shows the list of available blocks that can be placed. Add a block by dragging the icon into the page.</p><p>When an existing block is selected, some blocks may be greyed out. This indicates which blocks can be placed inside or after the selected block.</p>"
|
|
140
233
|
)
|
|
141
234
|
);
|
|
235
|
+
onBeforeUnmount(() => {
|
|
236
|
+
clearPendingHelp();
|
|
237
|
+
if (mouseTimeout) {
|
|
238
|
+
window.clearTimeout(mouseTimeout);
|
|
239
|
+
}
|
|
240
|
+
});
|
|
142
241
|
</script>
|
|
143
242
|
|
|
144
243
|
<script>
|
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
<p v-if="lastRun" class="bk-analyze-last-run">
|
|
14
14
|
<RelativeTime v-slot="{ formatted }" :timestamp="lastRun">
|
|
15
15
|
{{
|
|
16
|
-
$t("analyzeLastRun", "Last run: @time").replace(
|
|
16
|
+
$t("analyzeLastRun", "Last run: @time").replace(
|
|
17
|
+
"@time",
|
|
18
|
+
formatted ?? "never"
|
|
19
|
+
)
|
|
17
20
|
}}
|
|
18
21
|
</RelativeTime>
|
|
19
22
|
</p>
|
|
@@ -80,17 +80,17 @@ function createPieSegment(cx, cy, radius, startAngle, endAngle) {
|
|
|
80
80
|
const largeArc = endAngle - startAngle > 180 ? 1 : 0;
|
|
81
81
|
if (endAngle - startAngle >= 360) {
|
|
82
82
|
return `
|
|
83
|
+
M ${cx} ${cy}
|
|
84
|
+
L ${cx + radius} ${cy}
|
|
85
|
+
A ${radius} ${radius} 0 1 1 ${cx + radius} ${cy + 1e-3}
|
|
86
|
+
Z
|
|
87
|
+
`;
|
|
88
|
+
}
|
|
89
|
+
return `
|
|
83
90
|
M ${cx} ${cy}
|
|
84
|
-
L ${
|
|
85
|
-
A ${radius} ${radius} 0
|
|
91
|
+
L ${x1} ${y1}
|
|
92
|
+
A ${radius} ${radius} 0 ${largeArc} 1 ${x2} ${y2}
|
|
86
93
|
Z
|
|
87
94
|
`;
|
|
88
|
-
}
|
|
89
|
-
return `
|
|
90
|
-
M ${cx} ${cy}
|
|
91
|
-
L ${x1} ${y1}
|
|
92
|
-
A ${radius} ${radius} 0 ${largeArc} 1 ${x2} ${y2}
|
|
93
|
-
Z
|
|
94
|
-
`;
|
|
95
95
|
}
|
|
96
96
|
</script>
|
|
@@ -37,7 +37,7 @@ import { PluginSidebar } from "#blokkli/editor/plugins";
|
|
|
37
37
|
import { InfoBox } from "#blokkli/editor/components";
|
|
38
38
|
import AnalyzerMain from "./Main.vue";
|
|
39
39
|
import AnalyzeIcon from "./Icon.vue";
|
|
40
|
-
const {
|
|
40
|
+
const { adapters } = defineBlokkliFeature({
|
|
41
41
|
id: "analyze",
|
|
42
42
|
label: "Analyze",
|
|
43
43
|
icon: "bk_mdi_speed",
|
|
@@ -47,19 +47,7 @@ const { adapter } = defineBlokkliFeature({
|
|
|
47
47
|
});
|
|
48
48
|
const { $t, context, animation, ui } = useBlokkli();
|
|
49
49
|
const isRunning = ref(false);
|
|
50
|
-
|
|
51
|
-
const result = adapter.getAnalyzers();
|
|
52
|
-
if (Array.isArray(result)) {
|
|
53
|
-
return Promise.resolve(result);
|
|
54
|
-
}
|
|
55
|
-
return Promise.resolve(result).then((result2) => {
|
|
56
|
-
if (Array.isArray(result2)) {
|
|
57
|
-
return result2;
|
|
58
|
-
}
|
|
59
|
-
return [result2];
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
const analyzers = await getAdapterAnalyzers();
|
|
50
|
+
const analyzers = await adapters.getAggregated("getAnalyzers");
|
|
63
51
|
</script>
|
|
64
52
|
|
|
65
53
|
<script>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Analyzer } from './analyzers/types.js';
|
|
2
2
|
declare module '#blokkli/editor/adapter' {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Extensible analyze methods - available on both base adapter and extensions.
|
|
5
|
+
*/
|
|
6
|
+
interface AdapterExtensionMethods<T> {
|
|
4
7
|
getAnalyzers?: () => Analyzer | Analyzer[] | Promise<Analyzer> | Promise<Analyzer[]>;
|
|
5
8
|
}
|
|
6
9
|
}
|
|
@@ -307,6 +307,10 @@ onBlokkliEvent("scrollIntoView", (e) => {
|
|
|
307
307
|
});
|
|
308
308
|
} else {
|
|
309
309
|
if (artboardElement.contains(e.element)) {
|
|
310
|
+
const elRect = e.element.getBoundingClientRect();
|
|
311
|
+
if (calculateIntersection(elRect, ui.visibleViewport.value) >= 0.75) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
310
314
|
artboard.scrollElementIntoView(e.element, {
|
|
311
315
|
scale: "none",
|
|
312
316
|
axis: "y",
|
|
@@ -319,4 +323,43 @@ onBlokkliEvent("scrollIntoView", (e) => {
|
|
|
319
323
|
}
|
|
320
324
|
}
|
|
321
325
|
});
|
|
326
|
+
onBlokkliEvent("scrollSelectionIntoView", (e) => {
|
|
327
|
+
const uuids = selection.uuids.value;
|
|
328
|
+
if (uuids.length === 0) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
let minX = Infinity;
|
|
332
|
+
let minY = Infinity;
|
|
333
|
+
let maxX = -Infinity;
|
|
334
|
+
let maxY = -Infinity;
|
|
335
|
+
for (const uuid of uuids) {
|
|
336
|
+
dom.refreshBlockRect(uuid);
|
|
337
|
+
const rect = dom.getBlockRect(uuid);
|
|
338
|
+
if (!rect) {
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
minX = Math.min(minX, rect.x);
|
|
342
|
+
minY = Math.min(minY, rect.y);
|
|
343
|
+
maxX = Math.max(maxX, rect.x + rect.width);
|
|
344
|
+
maxY = Math.max(maxY, rect.y + rect.height);
|
|
345
|
+
}
|
|
346
|
+
if (minX === Infinity) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const boundingRect = {
|
|
350
|
+
x: minX,
|
|
351
|
+
y: minY,
|
|
352
|
+
width: maxX - minX,
|
|
353
|
+
height: maxY - minY
|
|
354
|
+
};
|
|
355
|
+
const viewportRelativeRect = ui.getViewportRelativeRect(boundingRect);
|
|
356
|
+
if (calculateIntersection(viewportRelativeRect, ui.visibleViewport.value) >= 0.75) {
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
artboard.scrollIntoView(boundingRect, {
|
|
360
|
+
scale: "none",
|
|
361
|
+
axis: "both",
|
|
362
|
+
behavior: e.immediate ? "instant" : "auto"
|
|
363
|
+
});
|
|
364
|
+
});
|
|
322
365
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
## Overview
|
|
2
2
|
|
|
3
|
-
The `assistant` feature implements an
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
The `assistant` feature implements an add action that can be dragged anywhere on
|
|
4
|
+
the page. Once placed, a modal overlay is shown with a basic prompt textarea,
|
|
5
|
+
where the user can enter a prompt. Clicking on _Generate_ calls the
|
|
6
|
+
[adapter.assistantGetResults] method which is expected to return the content
|
|
7
|
+
that should be generated.
|
|
@@ -58,7 +58,10 @@
|
|
|
58
58
|
import { useBlokkli, defineBlokkliFeature, computed } from "#imports";
|
|
59
59
|
import { Icon } from "#blokkli/editor/components";
|
|
60
60
|
import { useStateBasedCache } from "#blokkli/editor/composables";
|
|
61
|
-
import {
|
|
61
|
+
import {
|
|
62
|
+
fragmentBlockBundle,
|
|
63
|
+
fromLibraryBlockBundle
|
|
64
|
+
} from "#blokkli-build/config";
|
|
62
65
|
defineBlokkliFeature({
|
|
63
66
|
id: "breadcrumbs",
|
|
64
67
|
label: "Breadcrumbs",
|
|
@@ -83,7 +83,11 @@ import { Icon } from "#blokkli/editor/components";
|
|
|
83
83
|
import getVideoId from "get-video-id";
|
|
84
84
|
import { emitMessage } from "#blokkli/editor/events";
|
|
85
85
|
import { fragmentBlockBundle, itemEntityType } from "#blokkli-build/config";
|
|
86
|
-
import {
|
|
86
|
+
import {
|
|
87
|
+
defineItemDropdownAction,
|
|
88
|
+
defineShortcut,
|
|
89
|
+
onBlokkliEvent
|
|
90
|
+
} from "#blokkli/editor/composables";
|
|
87
91
|
const { settings, logger } = defineBlokkliFeature({
|
|
88
92
|
id: "clipboard",
|
|
89
93
|
label: "Clipboard",
|
|
@@ -534,7 +538,7 @@ function copyCurrentSelectionToClipboard() {
|
|
|
534
538
|
selectionClipboard.value = selection.uuids.value;
|
|
535
539
|
}
|
|
536
540
|
onBlokkliEvent("keyPressed", (e) => {
|
|
537
|
-
if (e.code !== "c" || !e.meta || ui.hasDialogOpen.value) {
|
|
541
|
+
if (e.code !== "c" || !e.meta || ui.hasDialogOpen.value || !ui.canvasFocused.value) {
|
|
538
542
|
return;
|
|
539
543
|
}
|
|
540
544
|
copyCurrentSelectionToClipboard();
|
|
@@ -73,6 +73,7 @@ const { adapter } = defineBlokkliFeature({
|
|
|
73
73
|
icon: "bk_mdi_comment",
|
|
74
74
|
label: "Comments",
|
|
75
75
|
requiredAdapterMethods: ["loadComments", "addComment"],
|
|
76
|
+
requiredPermissions: ["view_comments"],
|
|
76
77
|
description: "Provides comment functionality for blocks.",
|
|
77
78
|
screenshot: "feature-comments.jpg"
|
|
78
79
|
});
|
|
@@ -24,3 +24,9 @@ declare module '#blokkli/editor/adapter' {
|
|
|
24
24
|
resolveComment?: (uuid: string) => Promise<CommentItem[]>;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
declare module '#blokkli/editor/types/permissions' {
|
|
28
|
+
interface UserPermissionMap {
|
|
29
|
+
create_comments: 'Post comments.';
|
|
30
|
+
view_comments: 'Access comments.';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -43,9 +43,12 @@ const props = defineProps({
|
|
|
43
43
|
y: { type: Number, required: true },
|
|
44
44
|
startCoords: { type: Object, required: true },
|
|
45
45
|
isTouch: { type: Boolean, required: true },
|
|
46
|
-
|
|
46
|
+
color: { type: String, required: false },
|
|
47
|
+
backgroundColor: { type: String, required: false },
|
|
47
48
|
activeLabel: { type: String, required: false }
|
|
48
49
|
});
|
|
50
|
+
const MAX_WIDTH = 350;
|
|
51
|
+
const MAX_HEIGHT = 150;
|
|
49
52
|
const labelEl = useTemplateRef("labelEl");
|
|
50
53
|
const labelWidth = ref(0);
|
|
51
54
|
const labelHeight = ref(0);
|
|
@@ -53,7 +56,8 @@ const isExisting = computed(
|
|
|
53
56
|
() => !!props.items.find((v) => v.itemType === "existing")
|
|
54
57
|
);
|
|
55
58
|
const currentActiveLabel = ref("");
|
|
56
|
-
const
|
|
59
|
+
const currentColor = ref("");
|
|
60
|
+
const currentBackgroundColor = ref("");
|
|
57
61
|
watch(
|
|
58
62
|
() => props.activeLabel,
|
|
59
63
|
function(label) {
|
|
@@ -63,10 +67,18 @@ watch(
|
|
|
63
67
|
}
|
|
64
68
|
);
|
|
65
69
|
watch(
|
|
66
|
-
() => props.
|
|
70
|
+
() => props.backgroundColor,
|
|
67
71
|
function(color) {
|
|
68
72
|
if (color) {
|
|
69
|
-
|
|
73
|
+
currentBackgroundColor.value = color;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
watch(
|
|
78
|
+
() => props.color,
|
|
79
|
+
function(color) {
|
|
80
|
+
if (color) {
|
|
81
|
+
currentColor.value = color;
|
|
70
82
|
}
|
|
71
83
|
}
|
|
72
84
|
);
|
|
@@ -91,7 +103,8 @@ const style = computed(() => {
|
|
|
91
103
|
width: width.value + "px",
|
|
92
104
|
height: height.value + "px",
|
|
93
105
|
transform: `translate(${translateX.value}px, ${translateY.value}px)`,
|
|
94
|
-
"--bk-active-color": props.
|
|
106
|
+
"--bk-active-background-color": props.backgroundColor && props.activeLabel ? props.backgroundColor : "rgba(255,255,255,0)",
|
|
107
|
+
"--bk-active-color": props.color && props.activeLabel ? props.color : "rgba(255,255,255,0)"
|
|
95
108
|
};
|
|
96
109
|
});
|
|
97
110
|
const styleLabel = computed(() => {
|
|
@@ -102,8 +115,8 @@ const styleLabel = computed(() => {
|
|
|
102
115
|
const y = Math.max(10, translateY.value - labelHeight.value - 20);
|
|
103
116
|
return {
|
|
104
117
|
transform: `translate(${x}px, ${y}px)`,
|
|
105
|
-
"--bk-active-color": props.
|
|
106
|
-
|
|
118
|
+
"--bk-active-background-color": props.backgroundColor && props.activeLabel ? props.backgroundColor : "rgba(255,255,255,0)",
|
|
119
|
+
"--bk-active-color": props.color && props.activeLabel ? props.color : "rgba(255,255,255,0)"
|
|
107
120
|
};
|
|
108
121
|
});
|
|
109
122
|
function getRect() {
|
|
@@ -116,10 +129,16 @@ function getRect() {
|
|
|
116
129
|
}
|
|
117
130
|
defineExpose({ getRect });
|
|
118
131
|
const rects = ref([]);
|
|
119
|
-
function getDraggingBounds(mouse, rect, maxWidth) {
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const
|
|
132
|
+
function getDraggingBounds(mouse, rect, maxWidth, maxHeight) {
|
|
133
|
+
const widthScale = rect.width > 0 ? maxWidth / rect.width : 1;
|
|
134
|
+
const heightScale = rect.height > 0 ? maxHeight / rect.height : 1;
|
|
135
|
+
const scale = Math.min(widthScale, heightScale, 1);
|
|
136
|
+
let effectiveWidth = rect.width * scale;
|
|
137
|
+
let effectiveHeight = rect.height * scale;
|
|
138
|
+
if (Math.abs(rect.width - effectiveWidth) < 10 || Math.abs(rect.height - effectiveHeight) < 10) {
|
|
139
|
+
effectiveWidth = rect.width;
|
|
140
|
+
effectiveHeight = rect.height;
|
|
141
|
+
}
|
|
123
142
|
const relativeX = mouse.x - rect.x;
|
|
124
143
|
const relativeY = mouse.y - rect.y;
|
|
125
144
|
const proportionX = rect.width > 0 ? relativeX / rect.width : 0;
|
|
@@ -170,8 +189,8 @@ onMounted(() => {
|
|
|
170
189
|
const bounds = getDraggingBounds(
|
|
171
190
|
props.startCoords,
|
|
172
191
|
boundRect.rect,
|
|
173
|
-
|
|
174
|
-
|
|
192
|
+
MAX_WIDTH,
|
|
193
|
+
MAX_HEIGHT
|
|
175
194
|
);
|
|
176
195
|
const boundsX = props.isTouch ? 0 : bounds.x;
|
|
177
196
|
const boundsY = props.isTouch ? translateY.value : bounds.y;
|
|
@@ -4,14 +4,22 @@ precision highp float;
|
|
|
4
4
|
|
|
5
5
|
in float v_intersecting;
|
|
6
6
|
in float v_is_hover_area;
|
|
7
|
+
in float v_is_field;
|
|
8
|
+
in float v_is_drop_area;
|
|
9
|
+
in float v_is_vertical;
|
|
7
10
|
in vec4 v_quad;
|
|
8
11
|
in vec3 v_color;
|
|
12
|
+
in vec3 v_grad_start;
|
|
13
|
+
in vec3 v_grad_end;
|
|
14
|
+
in vec3 v_border_outer;
|
|
15
|
+
in vec3 v_border_inner;
|
|
9
16
|
|
|
10
17
|
// Optimized varyings - values computed once per vertex instead of per pixel
|
|
11
18
|
in vec2 v_size;
|
|
12
19
|
in vec2 v_location;
|
|
13
20
|
in vec2 v_size_inner;
|
|
14
21
|
in float v_thickness;
|
|
22
|
+
in float v_border_width;
|
|
15
23
|
in float v_edge_softness;
|
|
16
24
|
in float v_radius_outer;
|
|
17
25
|
in float v_radius_inner;
|
|
@@ -24,12 +32,19 @@ uniform float u_dpi;
|
|
|
24
32
|
uniform vec2 u_resolution;
|
|
25
33
|
uniform float u_active_hover_nesting_level;
|
|
26
34
|
|
|
35
|
+
const float OUTER_BORDER_PX = 2.5;
|
|
36
|
+
const float INNER_BORDER_PX = 2.0;
|
|
37
|
+
const float INNER_BORDER_SOFTNESS_PX = 0.5;
|
|
38
|
+
const float OUTER_BORDER_SOFTNESS_PX = 0.3;
|
|
39
|
+
|
|
27
40
|
float roundedBoxSDF(vec2 CenterPosition, vec2 Size, float Radius) {
|
|
28
41
|
return length(max(abs(CenterPosition) - Size + Radius, 0.0)) - Radius;
|
|
29
42
|
}
|
|
30
43
|
|
|
31
44
|
void main() {
|
|
32
45
|
bool isHoverArea = v_is_hover_area >= 1.0;
|
|
46
|
+
bool isField = v_is_field >= 0.5;
|
|
47
|
+
bool isDropArea = v_is_drop_area >= 0.5;
|
|
33
48
|
|
|
34
49
|
// Compute different distance for inside and outside using pre-computed values
|
|
35
50
|
float distanceOuter = roundedBoxSDF(
|
|
@@ -60,16 +75,76 @@ void main() {
|
|
|
60
75
|
if (u_active_hover_nesting_level < 0.5) {
|
|
61
76
|
adjustedAlphaFill = 0.0;
|
|
62
77
|
} else {
|
|
63
|
-
adjustedAlphaFill *= 0.
|
|
78
|
+
adjustedAlphaFill *= 0.1;
|
|
64
79
|
}
|
|
65
80
|
}
|
|
66
81
|
|
|
82
|
+
vec3 fillColor = v_color;
|
|
83
|
+
vec3 borderOuter = v_color;
|
|
84
|
+
vec3 borderInner = v_color;
|
|
85
|
+
if (isField || isDropArea) {
|
|
86
|
+
vec2 minCorner = v_location - v_size * 0.5;
|
|
87
|
+
vec2 uv = (gl_FragCoord.xy - minCorner) / v_size;
|
|
88
|
+
float t = uv.y;
|
|
89
|
+
t = clamp(t, 0.0, 1.0);
|
|
90
|
+
fillColor = mix(v_grad_start, v_grad_end, t);
|
|
91
|
+
borderOuter = v_border_outer;
|
|
92
|
+
borderInner = v_border_inner;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (isField || isDropArea) {
|
|
96
|
+
vec2 pos = gl_FragCoord.xy - v_location;
|
|
97
|
+
float soft = v_edge_softness;
|
|
98
|
+
float outerBorderWidth = OUTER_BORDER_PX;
|
|
99
|
+
float innerBorderWidth = INNER_BORDER_PX;
|
|
100
|
+
|
|
101
|
+
float distOuter = roundedBoxSDF(pos, v_size / 2.0, v_radius_outer);
|
|
102
|
+
float inside = 1.0 - smoothstep(-soft, soft, distOuter);
|
|
103
|
+
float distFromOuter = -distOuter; // distance inside from outer edge in px
|
|
104
|
+
|
|
105
|
+
float outerBand = 0.0;
|
|
106
|
+
if (OUTER_BORDER_SOFTNESS_PX <= 0.0) {
|
|
107
|
+
outerBand = inside * step(0.0, distFromOuter) * step(distFromOuter, outerBorderWidth);
|
|
108
|
+
} else {
|
|
109
|
+
float s = OUTER_BORDER_SOFTNESS_PX;
|
|
110
|
+
outerBand = inside *
|
|
111
|
+
smoothstep(0.0, s, distFromOuter) *
|
|
112
|
+
(1.0 - smoothstep(outerBorderWidth - s, outerBorderWidth + s, distFromOuter));
|
|
113
|
+
}
|
|
114
|
+
float innerBand = 0.0;
|
|
115
|
+
if (INNER_BORDER_SOFTNESS_PX <= 0.0) {
|
|
116
|
+
innerBand = inside *
|
|
117
|
+
step(outerBorderWidth, distFromOuter) *
|
|
118
|
+
step(distFromOuter, outerBorderWidth + innerBorderWidth);
|
|
119
|
+
} else {
|
|
120
|
+
float s = INNER_BORDER_SOFTNESS_PX;
|
|
121
|
+
innerBand = inside *
|
|
122
|
+
smoothstep(outerBorderWidth - s, outerBorderWidth + s, distFromOuter) *
|
|
123
|
+
(1.0 - smoothstep(outerBorderWidth + innerBorderWidth - s, outerBorderWidth + innerBorderWidth + s, distFromOuter));
|
|
124
|
+
}
|
|
125
|
+
float fillMask = inside * step(outerBorderWidth + innerBorderWidth, distFromOuter);
|
|
126
|
+
|
|
127
|
+
vec3 color = fillColor;
|
|
128
|
+
color = mix(color, borderOuter, outerBand);
|
|
129
|
+
color = mix(color, borderInner, innerBand);
|
|
130
|
+
|
|
131
|
+
float a = isDropArea
|
|
132
|
+
? (v_intersecting >= 0.5 ? 0.6 : 0.3)
|
|
133
|
+
: (v_intersecting >= 0.5 ? 1.0 : 0.7);
|
|
134
|
+
float alpha = max(fillMask, max(outerBand, innerBand)) * a;
|
|
135
|
+
if (alpha <= 0.0) {
|
|
136
|
+
discard;
|
|
137
|
+
}
|
|
138
|
+
fragColor = vec4(color, alpha);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
|
|
67
142
|
if (alphaBorder > 0.0) {
|
|
68
143
|
float a = isHoverArea ? 0.6 : 1.0;
|
|
69
144
|
fragColor = vec4(v_color, a);
|
|
70
145
|
return;
|
|
71
146
|
} else if (adjustedAlphaFill > 0.0) {
|
|
72
|
-
fragColor = vec4(
|
|
147
|
+
fragColor = vec4(fillColor, adjustedAlphaFill);
|
|
73
148
|
return;
|
|
74
149
|
}
|
|
75
150
|
|