@blokkli/editor 2.0.0-alpha.35 → 2.0.0-alpha.37
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/types/blockOptions.d.ts +10 -2
- package/dist/global/types/definitions.d.ts +12 -5
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +126 -7
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +273 -25
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +2 -2
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +34 -17
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.d.ts +2 -20
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.js +0 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +1 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +1 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.d.vue.ts +1 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +67 -86
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue.d.ts +1 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +10 -12
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/de.md +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/en.md +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +1 -5
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.d.vue.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +138 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue.d.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +94 -38
- package/dist/modules/agent/runtime/app/helpers/index.d.ts +16 -19
- package/dist/modules/agent/runtime/app/helpers/index.js +22 -46
- package/dist/modules/agent/runtime/app/helpers/pageStructure.js +1 -1
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +5 -9
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +2 -3
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/analyze_content/index.js +120 -0
- package/dist/modules/agent/runtime/app/tools/check_readability/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/check_readability/index.js +57 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +176 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +7 -5
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -1
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -3
- package/dist/modules/agent/runtime/app/tools/helpers.d.ts +53 -0
- package/dist/modules/agent/runtime/app/tools/helpers.js +187 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +1 -44
- package/dist/modules/agent/runtime/app/tools/schemas.js +0 -174
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +40 -47
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +2 -5
- package/dist/modules/agent/runtime/app/types/index.d.ts +0 -61
- package/dist/modules/agent/runtime/server/Session.d.ts +29 -8
- package/dist/modules/agent/runtime/server/Session.js +168 -85
- package/dist/modules/agent/runtime/server/SessionManager.d.ts +3 -0
- package/dist/modules/agent/runtime/server/SessionManager.js +4 -1
- package/dist/modules/agent/runtime/server/agent.js +3 -2
- package/dist/modules/agent/runtime/server/agentPrompt.d.ts +9 -1
- package/dist/modules/agent/runtime/server/agentPrompt.js +26 -0
- package/dist/modules/agent/runtime/server/default-skills/fixReadability.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/fixReadability.js +69 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/page-context.js +28 -0
- package/dist/modules/agent/runtime/server/server-tools/index.d.ts +10 -2
- package/dist/modules/agent/runtime/server/server-tools/index.js +1 -1
- package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +1 -1
- package/dist/modules/agent/runtime/shared/types.d.ts +81 -12
- package/dist/modules/agent/runtime/shared/types.js +22 -10
- package/dist/modules/charts/index.d.mts +35 -0
- package/dist/modules/charts/index.mjs +57 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.js +42 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +86 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +136 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.js +93 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.js +66 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.js +40 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.js +89 -0
- package/dist/modules/charts/runtime/chartTypes/area.d.ts +7 -0
- package/dist/modules/charts/runtime/chartTypes/area.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/bar.d.ts +8 -0
- package/dist/modules/charts/runtime/chartTypes/bar.js +76 -0
- package/dist/modules/charts/runtime/chartTypes/define.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/define.js +3 -0
- package/dist/modules/charts/runtime/chartTypes/donut.d.ts +6 -0
- package/dist/modules/charts/runtime/chartTypes/donut.js +45 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.d.ts +4 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.js +54 -0
- package/dist/modules/charts/runtime/chartTypes/index.d.ts +39 -0
- package/dist/modules/charts/runtime/chartTypes/index.js +47 -0
- package/dist/modules/charts/runtime/chartTypes/line.d.ts +7 -0
- package/dist/modules/charts/runtime/chartTypes/line.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/pie.d.ts +5 -0
- package/dist/modules/charts/runtime/chartTypes/pie.js +28 -0
- package/dist/modules/charts/runtime/chartTypes/radar.d.ts +7 -0
- package/dist/modules/charts/runtime/chartTypes/radar.js +52 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.d.ts +6 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.js +44 -0
- package/dist/modules/charts/runtime/chartTypes/shared.d.ts +67 -0
- package/dist/modules/charts/runtime/chartTypes/shared.js +103 -0
- package/dist/modules/charts/runtime/chartTypes/types.d.ts +29 -0
- package/dist/modules/charts/runtime/chartTypes/types.js +0 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.d.vue.ts +147 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +120 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue.d.ts +147 -0
- package/dist/modules/charts/runtime/components/index.d.ts +1 -0
- package/dist/modules/charts/runtime/components/index.js +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.d.vue.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue +97 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue.d.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +34 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.d.vue.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +49 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue.d.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.d.vue.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue +89 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue.d.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.d.vue.ts +23 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +224 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue.d.ts +23 -0
- package/dist/{runtime/editor/features/clipboard/List → modules/charts/runtime/features/charts/Editor/FootnoteEditor}/index.d.vue.ts +4 -5
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue +61 -0
- package/dist/{runtime/editor/features/clipboard/List → modules/charts/runtime/features/charts/Editor/FootnoteEditor}/index.vue.d.ts +4 -5
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.d.vue.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue +45 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue.d.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +249 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.js +90 -0
- package/dist/modules/charts/runtime/features/charts/index.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/features/charts/index.vue +72 -0
- package/dist/modules/charts/runtime/features/charts/index.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/helpers/index.d.ts +26 -0
- package/dist/modules/charts/runtime/helpers/index.js +80 -0
- package/dist/modules/charts/runtime/types.d.ts +33 -0
- package/dist/modules/charts/runtime/types.js +0 -0
- package/dist/modules/drupal/graphql/features/fragments.graphql +2 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/runtime/adapter/index.d.ts +3 -1
- package/dist/modules/drupal/runtime/adapter/index.js +16 -12
- package/dist/modules/table-of-contents/index.d.mts +11 -0
- package/dist/modules/table-of-contents/index.mjs +24 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.d.vue.ts +44 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue +43 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue.d.ts +44 -0
- package/dist/modules/table-of-contents/runtime/types/index.d.ts +4 -0
- package/dist/modules/table-of-contents/runtime/types/index.js +0 -0
- package/dist/runtime/components/Blocks/Fragment/index.vue +6 -2
- package/dist/runtime/components/BlokkliItem.vue +9 -4
- package/dist/runtime/components/BlokkliProvider.d.vue.ts +7 -0
- package/dist/runtime/components/BlokkliProvider.vue +7 -1
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +7 -0
- package/dist/runtime/composables/defineBlokkli.js +1 -1
- package/dist/runtime/composables/useBlokkliHelper.js +4 -2
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +17 -27
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +13 -2
- package/dist/runtime/editor/components/Banner/index.vue +4 -2
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +13 -2
- package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +27 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +107 -0
- package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +27 -0
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.d.vue.ts +1 -0
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue +3 -2
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/EditProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/EditProvider.vue +11 -7
- package/dist/runtime/editor/components/EditProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +5 -1
- package/dist/runtime/editor/components/FlexTextarea/index.vue +24 -101
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +5 -1
- package/dist/runtime/editor/components/Form/Radio/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Radio/index.vue +3 -2
- package/dist/runtime/editor/components/Form/Radio/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/ItemIcon/index.vue +10 -2
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +13 -3
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +43 -16
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +13 -3
- package/dist/runtime/editor/components/Popup/index.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Popup/index.vue +82 -0
- package/dist/runtime/editor/components/Popup/index.vue.d.ts +30 -0
- package/dist/runtime/editor/components/PreviewProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
- package/dist/runtime/editor/components/PreviewProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/Resizable/index.vue +4 -1
- package/dist/runtime/editor/components/ShortcutIndicator/index.vue +1 -1
- package/dist/runtime/editor/components/Toolbar/index.vue +107 -6
- package/dist/runtime/editor/components/index.d.ts +4 -1
- package/dist/runtime/editor/components/index.js +6 -0
- package/dist/runtime/editor/composables/defineDropAreas.js +3 -3
- package/dist/runtime/editor/composables/defineDropHandler.d.ts +3 -0
- package/dist/runtime/editor/composables/defineDropHandler.js +10 -0
- package/dist/runtime/editor/composables/index.d.ts +1 -0
- package/dist/runtime/editor/composables/index.js +1 -0
- package/dist/runtime/editor/composables/onElementResize.js +0 -1
- package/dist/runtime/editor/composables/useEditableFieldOverride.js +4 -5
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +16 -0
- package/dist/runtime/editor/features/add-list/Help/Item.vue +5 -2
- package/dist/runtime/editor/features/add-list/index.vue +58 -1
- package/dist/runtime/editor/features/analyze/Main.d.vue.ts +3 -2
- package/dist/runtime/editor/features/analyze/Main.vue +28 -44
- package/dist/runtime/editor/features/analyze/Main.vue.d.ts +3 -2
- package/dist/runtime/editor/features/analyze/analyzers/readability.js +65 -0
- package/dist/runtime/editor/features/analyze/analyzers/types.d.ts +19 -0
- package/dist/runtime/editor/features/analyze/index.vue +18 -15
- package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
- package/dist/runtime/editor/features/clipboard/DropElement/Video.d.vue.ts +8 -0
- package/dist/runtime/editor/features/clipboard/{List/Item → DropElement}/Video.vue +1 -5
- package/dist/runtime/editor/features/clipboard/DropElement/Video.vue.d.ts +8 -0
- package/dist/runtime/editor/features/clipboard/DropElement/helpers.d.ts +1 -0
- package/dist/runtime/editor/features/clipboard/DropElement/helpers.js +14 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue +97 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/clipboard/helpers.d.ts +15 -0
- package/dist/runtime/editor/features/clipboard/helpers.js +62 -0
- package/dist/runtime/editor/features/clipboard/index.vue +586 -338
- package/dist/runtime/editor/features/clipboard/types.d.ts +14 -2
- package/dist/runtime/editor/features/debug/index.vue +1 -1
- package/dist/runtime/editor/features/dev-mode/index.vue +86 -2
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +17 -5
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +2 -2
- package/dist/runtime/editor/features/dragging-overlay/index.vue +125 -219
- package/dist/runtime/editor/features/edit/index.vue +20 -0
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +4 -4
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +6 -0
- package/dist/runtime/editor/features/fragments/types.d.ts +1 -0
- package/dist/runtime/editor/features/hover/Renderer/index.vue +30 -3
- package/dist/runtime/editor/features/hover/index.vue +1 -1
- package/dist/runtime/editor/features/library/index.vue +14 -0
- package/dist/runtime/editor/features/media-library/index.vue +32 -1
- package/dist/runtime/editor/features/options/Form/Checkbox/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +3 -3
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +5 -5
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/ComplexType/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +36 -0
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/options/Form/Item.d.vue.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Item.vue +24 -50
- package/dist/runtime/editor/features/options/Form/Item.vue.d.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Number/index.d.vue.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Number/index.vue +7 -17
- package/dist/runtime/editor/features/options/Form/Number/index.vue.d.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Range/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Range/index.vue +4 -4
- package/dist/runtime/editor/features/options/Form/Range/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/index.vue +15 -5
- package/dist/runtime/editor/features/search/index.vue +25 -1
- package/dist/runtime/editor/features/selection/index.vue +2 -2
- package/dist/runtime/editor/features/structure/index.vue +25 -1
- package/dist/runtime/editor/features/tour/index.vue +22 -12
- package/dist/runtime/editor/features/transform/index.vue +1 -3
- package/dist/runtime/editor/helpers/clipboardData/index.d.ts +11 -0
- package/dist/runtime/editor/helpers/clipboardData/index.js +157 -0
- package/dist/runtime/editor/helpers/options/index.js +5 -0
- package/dist/runtime/editor/icons/svg/stars.svg +5 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +15 -4
- package/dist/runtime/editor/plugins/Sidebar/index.vue +4 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +15 -4
- package/dist/runtime/editor/providers/analyze.d.ts +43 -0
- package/dist/runtime/editor/providers/analyze.js +78 -0
- package/dist/runtime/editor/providers/animation.d.ts +4 -0
- package/dist/runtime/editor/providers/animation.js +6 -0
- package/dist/runtime/editor/providers/definition.d.ts +2 -2
- package/dist/runtime/editor/providers/definition.js +7 -1
- package/dist/runtime/editor/providers/dom.d.ts +5 -0
- package/dist/runtime/editor/providers/dom.js +11 -2
- package/dist/runtime/editor/providers/dragdrop.d.ts +55 -0
- package/dist/runtime/editor/providers/dragdrop.js +37 -0
- package/dist/runtime/editor/providers/fields.d.ts +19 -1
- package/dist/runtime/editor/providers/fields.js +54 -2
- package/dist/runtime/editor/providers/storage.js +15 -0
- package/dist/runtime/editor/providers/ui.d.ts +6 -0
- package/dist/runtime/editor/providers/ui.js +19 -0
- package/dist/runtime/editor/translations/de.json +338 -58
- package/dist/runtime/editor/translations/fr.json +331 -51
- package/dist/runtime/editor/translations/gsw_CH.json +336 -56
- package/dist/runtime/editor/translations/it.json +331 -51
- package/dist/runtime/editor/types/app.d.ts +4 -2
- package/dist/runtime/editor/types/draggable.d.ts +1 -0
- package/dist/runtime/editor/types/ui.d.ts +1 -1
- package/dist/runtime/helpers/imports/index.d.ts +8 -1
- package/dist/runtime/helpers/imports/index.js +15 -6
- package/dist/runtime/helpers/injections.d.ts +6 -2
- package/dist/runtime/helpers/injections.js +3 -0
- package/dist/runtime/helpers/runtimeHelpers/index.js +14 -0
- package/dist/runtime/types/blockOptions.d.ts +2 -1
- package/dist/runtime/types/definitions.d.ts +12 -5
- package/dist/runtime/types/provider.d.ts +2 -0
- package/dist/shared/editor.6D5vApr0.mjs +30 -0
- package/dist/shared/{editor.DMFfaLVE.mjs → editor.BFIzNSQM.mjs} +1 -30
- package/dist/shared/{editor.Iax3GCvt.d.mts → editor.BdBm1Z7C.d.mts} +34 -0
- package/dist/types.d.mts +1 -1
- package/package.json +21 -3
- package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +0 -104
- package/dist/runtime/editor/features/clipboard/List/Item/File.d.vue.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/File.vue +0 -60
- package/dist/runtime/editor/features/clipboard/List/Item/File.vue.d.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/Video.d.vue.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/Video.vue.d.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/index.vue +0 -72
- package/dist/runtime/editor/features/tour/Popup/index.d.vue.ts +0 -9
- package/dist/runtime/editor/features/tour/Popup/index.vue +0 -34
- package/dist/runtime/editor/features/tour/Popup/index.vue.d.ts +0 -9
- package/dist/runtime/editor/providers/dropArea.d.ts +0 -48
- package/dist/runtime/editor/providers/dropArea.js +0 -22
- /package/dist/modules/agent/runtime/app/tools/{get_available_bundles → analyze_content}/index.d.ts +0 -0
|
@@ -34,12 +34,17 @@
|
|
|
34
34
|
class="bk bk-library-edit-overlay"
|
|
35
35
|
:class="'bk-is-' + theme"
|
|
36
36
|
>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
<div class="bk-library-edit-overlay-frame">
|
|
38
|
+
<slot>
|
|
39
|
+
<iframe
|
|
40
|
+
v-if="url"
|
|
41
|
+
ref="iframe"
|
|
42
|
+
:src="url"
|
|
43
|
+
style="width: 100%; height: 100%"
|
|
44
|
+
@load="onLoad"
|
|
45
|
+
/>
|
|
46
|
+
</slot>
|
|
47
|
+
</div>
|
|
43
48
|
</div>
|
|
44
49
|
</Transition>
|
|
45
50
|
</Teleport>
|
|
@@ -57,7 +62,7 @@ import {
|
|
|
57
62
|
import { Icon } from "#blokkli/editor/components";
|
|
58
63
|
import { onBroadcastEvent } from "#blokkli/editor/composables";
|
|
59
64
|
const props = defineProps({
|
|
60
|
-
url: { type: String, required:
|
|
65
|
+
url: { type: String, required: false },
|
|
61
66
|
uuid: { type: String, required: true },
|
|
62
67
|
title: { type: String, required: true },
|
|
63
68
|
theme: { type: String, required: true },
|
|
@@ -127,19 +132,28 @@ function onEnter(el, done) {
|
|
|
127
132
|
const overlayRect = el.getBoundingClientRect();
|
|
128
133
|
const scaleX = originatingRect.width / overlayRect.width;
|
|
129
134
|
const scaleY = originatingRect.height / overlayRect.height;
|
|
130
|
-
const
|
|
131
|
-
const
|
|
135
|
+
const scale = Math.max(scaleX, scaleY);
|
|
136
|
+
const scaledW = overlayRect.width * scale;
|
|
137
|
+
const scaledH = overlayRect.height * scale;
|
|
138
|
+
const centerX = originatingRect.x + originatingRect.width / 2;
|
|
139
|
+
const centerY = originatingRect.y + originatingRect.height / 2;
|
|
140
|
+
const offsetX = centerX - scaledW / 2 - overlayRect.x;
|
|
141
|
+
const offsetY = centerY - scaledH / 2 - overlayRect.y;
|
|
142
|
+
const clipY = (overlayRect.height - originatingRect.height / scale) / 2;
|
|
143
|
+
const clipX = (overlayRect.width - originatingRect.width / scale) / 2;
|
|
132
144
|
el.style.transition = "none";
|
|
133
145
|
el.style.opacity = "0";
|
|
134
146
|
el.style.transformOrigin = "0px 0px";
|
|
135
|
-
el.style.transform = `translate(${offsetX}px, ${offsetY}px) scale(${
|
|
147
|
+
el.style.transform = `translate(${offsetX}px, ${offsetY}px) scale(${scale})`;
|
|
148
|
+
el.style.clipPath = `inset(${clipY}px ${clipX}px ${clipY}px ${clipX}px round 4px)`;
|
|
136
149
|
el.getBoundingClientRect();
|
|
137
150
|
raf = requestAnimationFrame(() => {
|
|
138
151
|
el.style.transition = `opacity ${FADE_DURATION}ms ease-out`;
|
|
139
152
|
el.style.opacity = "1";
|
|
140
153
|
withTimeout(() => {
|
|
141
|
-
el.style.transition = `transform ${DURATION}ms ${EASING}`;
|
|
142
|
-
el.style.transform = "translate(0px, 0px) scale(1
|
|
154
|
+
el.style.transition = `transform ${DURATION}ms ${EASING}, clip-path ${DURATION}ms ${EASING}`;
|
|
155
|
+
el.style.transform = "translate(0px, 0px) scale(1)";
|
|
156
|
+
el.style.clipPath = "inset(0px 0px 0px 0px round 0px)";
|
|
143
157
|
withTimeout(() => {
|
|
144
158
|
pendingTimeouts = [];
|
|
145
159
|
done();
|
|
@@ -153,6 +167,7 @@ function onAfter(el) {
|
|
|
153
167
|
el.style.transition = "";
|
|
154
168
|
el.style.opacity = "";
|
|
155
169
|
el.style.transformOrigin = "";
|
|
170
|
+
el.style.clipPath = "";
|
|
156
171
|
}
|
|
157
172
|
pendingTimeouts = [];
|
|
158
173
|
}
|
|
@@ -161,6 +176,7 @@ function onBeforeLeave(el) {
|
|
|
161
176
|
if (el instanceof HTMLElement) {
|
|
162
177
|
el.style.transform = "none";
|
|
163
178
|
el.style.opacity = "1";
|
|
179
|
+
el.style.clipPath = "inset(0px 0px 0px 0px round 0px)";
|
|
164
180
|
}
|
|
165
181
|
}
|
|
166
182
|
function onLeave(el, done) {
|
|
@@ -180,11 +196,19 @@ function onLeave(el, done) {
|
|
|
180
196
|
const overlayRect = el.getBoundingClientRect();
|
|
181
197
|
const scaleX = originatingRect.width / overlayRect.width;
|
|
182
198
|
const scaleY = originatingRect.height / overlayRect.height;
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
|
|
199
|
+
const scale = Math.max(scaleX, scaleY);
|
|
200
|
+
const scaledW = overlayRect.width * scale;
|
|
201
|
+
const scaledH = overlayRect.height * scale;
|
|
202
|
+
const centerX = originatingRect.x + originatingRect.width / 2;
|
|
203
|
+
const centerY = originatingRect.y + originatingRect.height / 2;
|
|
204
|
+
const offsetX = centerX - scaledW / 2 - overlayRect.x;
|
|
205
|
+
const offsetY = centerY - scaledH / 2 - overlayRect.y;
|
|
206
|
+
const clipY = (overlayRect.height - originatingRect.height / scale) / 2;
|
|
207
|
+
const clipX = (overlayRect.width - originatingRect.width / scale) / 2;
|
|
208
|
+
el.style.transition = `transform ${DURATION}ms ${EASING}, clip-path ${DURATION}ms ${EASING}`;
|
|
186
209
|
el.style.transformOrigin = "0px 0px";
|
|
187
|
-
el.style.transform = `translate(${offsetX}px, ${offsetY}px) scale(${
|
|
210
|
+
el.style.transform = `translate(${offsetX}px, ${offsetY}px) scale(${scale})`;
|
|
211
|
+
el.style.clipPath = `inset(${clipY}px ${clipX}px ${clipY}px ${clipX}px round 4px)`;
|
|
188
212
|
withTimeout(() => {
|
|
189
213
|
el.style.transition = `opacity ${FADE_DURATION}ms ease-out`;
|
|
190
214
|
el.style.opacity = "0";
|
|
@@ -241,6 +265,9 @@ function onEditorLoaded({ uuid }) {
|
|
|
241
265
|
onMounted(() => {
|
|
242
266
|
isLoaded.value = true;
|
|
243
267
|
ui.setNestedEditor(props.uuid);
|
|
268
|
+
if (!props.url) {
|
|
269
|
+
isLoaded.value = true;
|
|
270
|
+
}
|
|
244
271
|
});
|
|
245
272
|
onBeforeUnmount(() => {
|
|
246
273
|
ui.setNestedEditor(null);
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
2
|
export type NestedEditorOverlayProps = {
|
|
3
|
-
url
|
|
3
|
+
url?: string;
|
|
4
4
|
uuid: string;
|
|
5
5
|
title: string;
|
|
6
|
-
theme: 'lime' | 'red';
|
|
6
|
+
theme: 'lime' | 'red' | 'accent';
|
|
7
7
|
icon: BlokkliIcon;
|
|
8
8
|
blockUuid?: string;
|
|
9
9
|
element?: HTMLElement | null;
|
|
10
10
|
};
|
|
11
|
-
declare
|
|
11
|
+
declare var __VLS_38: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_38) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<NestedEditorOverlayProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
16
|
close: (...args: any[]) => void;
|
|
13
17
|
submit: (...args: any[]) => void;
|
|
14
18
|
}, string, import("vue").PublicProps, Readonly<NestedEditorOverlayProps> & Readonly<{
|
|
15
19
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
16
20
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
17
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
23
|
declare const _default: typeof __VLS_export;
|
|
19
24
|
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
cta: string;
|
|
6
|
+
theme: 'default' | 'warning' | 'primary' | 'danger' | 'lime';
|
|
7
|
+
position: 'top-left' | 'bottom-right';
|
|
8
|
+
};
|
|
9
|
+
declare function closePopup(): void;
|
|
10
|
+
declare var __VLS_25: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_25) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
15
|
+
closePopup: typeof closePopup;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
close: (...args: any[]) => void;
|
|
18
|
+
submit: (...args: any[]) => void;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport :to="ui.mainLayoutElement.value">
|
|
3
|
+
<BlokkliTransition name="drop-up">
|
|
4
|
+
<ViewportBlockingRect
|
|
5
|
+
v-if="shouldRender"
|
|
6
|
+
:id="'popup-' + id"
|
|
7
|
+
class="bk bk-popup"
|
|
8
|
+
:class="['bk-is-' + position, 'bk-is-' + id]"
|
|
9
|
+
>
|
|
10
|
+
<div class="bk-popup-title">
|
|
11
|
+
<h2>{{ title }}</h2>
|
|
12
|
+
<button class="bk-popup-close" @click="onClose">
|
|
13
|
+
<Icon name="bk_mdi_close" />
|
|
14
|
+
</button>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div class="bk-popup-content">
|
|
18
|
+
<div class="bk-popup-content-text">
|
|
19
|
+
<slot>
|
|
20
|
+
<p v-if="text" v-html="text" />
|
|
21
|
+
</slot>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<button class="bk-button" :class="'bk-is-' + theme" @click="onSubmit">
|
|
25
|
+
{{ cta }}
|
|
26
|
+
</button>
|
|
27
|
+
</div>
|
|
28
|
+
</ViewportBlockingRect>
|
|
29
|
+
</BlokkliTransition>
|
|
30
|
+
</Teleport>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup>
|
|
34
|
+
import {
|
|
35
|
+
Icon,
|
|
36
|
+
ViewportBlockingRect,
|
|
37
|
+
BlokkliTransition
|
|
38
|
+
} from "#blokkli/editor/components";
|
|
39
|
+
import { onBeforeUnmount, onMounted, ref, useBlokkli } from "#imports";
|
|
40
|
+
const props = defineProps({
|
|
41
|
+
id: { type: String, required: true },
|
|
42
|
+
title: { type: String, required: true },
|
|
43
|
+
text: { type: String, required: false },
|
|
44
|
+
cta: { type: String, required: true },
|
|
45
|
+
theme: { type: String, required: true },
|
|
46
|
+
position: { type: String, required: true }
|
|
47
|
+
});
|
|
48
|
+
const { ui, storage } = useBlokkli();
|
|
49
|
+
const hasClosed = storage.use(`popup:${props.id}:closed`, false);
|
|
50
|
+
const shouldRender = ref(false);
|
|
51
|
+
let timeout = null;
|
|
52
|
+
const emit = defineEmits(["submit", "close"]);
|
|
53
|
+
function closePopup() {
|
|
54
|
+
hasClosed.value = true;
|
|
55
|
+
shouldRender.value = false;
|
|
56
|
+
}
|
|
57
|
+
function onSubmit() {
|
|
58
|
+
closePopup();
|
|
59
|
+
emit("submit");
|
|
60
|
+
}
|
|
61
|
+
function onClose() {
|
|
62
|
+
closePopup();
|
|
63
|
+
emit("close");
|
|
64
|
+
}
|
|
65
|
+
defineExpose({
|
|
66
|
+
closePopup
|
|
67
|
+
});
|
|
68
|
+
onMounted(() => {
|
|
69
|
+
if (hasClosed.value) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
timeout = window.setTimeout(() => {
|
|
73
|
+
shouldRender.value = true;
|
|
74
|
+
}, 1e3);
|
|
75
|
+
});
|
|
76
|
+
onBeforeUnmount(() => {
|
|
77
|
+
if (timeout) {
|
|
78
|
+
window.clearTimeout(timeout);
|
|
79
|
+
timeout = null;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
cta: string;
|
|
6
|
+
theme: 'default' | 'warning' | 'primary' | 'danger' | 'lime';
|
|
7
|
+
position: 'top-left' | 'bottom-right';
|
|
8
|
+
};
|
|
9
|
+
declare function closePopup(): void;
|
|
10
|
+
declare var __VLS_25: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_25) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
15
|
+
closePopup: typeof closePopup;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
close: (...args: any[]) => void;
|
|
18
|
+
submit: (...args: any[]) => void;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '#blokkli-build/styles.css';
|
|
2
|
+
import type { ValidProviderTypes } from '#blokkli-build/generated-types';
|
|
2
3
|
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
4
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
5
|
entity?: T;
|
|
@@ -6,6 +7,7 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
6
7
|
entityUuid: string;
|
|
7
8
|
entityBundle: string;
|
|
8
9
|
language: string;
|
|
10
|
+
providerType: ValidProviderTypes;
|
|
9
11
|
}> & (typeof globalThis extends {
|
|
10
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
11
13
|
} ? P : {});
|
|
@@ -31,7 +31,8 @@ const props = defineProps({
|
|
|
31
31
|
entityType: { type: String, required: true },
|
|
32
32
|
entityUuid: { type: String, required: true },
|
|
33
33
|
entityBundle: { type: String, required: true },
|
|
34
|
-
language: { type: String, required: true }
|
|
34
|
+
language: { type: String, required: true },
|
|
35
|
+
providerType: { type: null, required: true }
|
|
35
36
|
});
|
|
36
37
|
defineSlots();
|
|
37
38
|
const context = computed(() => {
|
|
@@ -45,7 +46,7 @@ const context = computed(() => {
|
|
|
45
46
|
const adapter = await getAdapter(context);
|
|
46
47
|
const router = useRouter();
|
|
47
48
|
const broadcast = broadcastProvider();
|
|
48
|
-
const definitions = definitionProvider();
|
|
49
|
+
const definitions = definitionProvider(props.providerType);
|
|
49
50
|
let timeout = null;
|
|
50
51
|
let lastChanged = 0;
|
|
51
52
|
const mutatedFieldsMap = reactive({});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '#blokkli-build/styles.css';
|
|
2
|
+
import type { ValidProviderTypes } from '#blokkli-build/generated-types';
|
|
2
3
|
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
4
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
5
|
entity?: T;
|
|
@@ -6,6 +7,7 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
6
7
|
entityUuid: string;
|
|
7
8
|
entityBundle: string;
|
|
8
9
|
language: string;
|
|
10
|
+
providerType: ValidProviderTypes;
|
|
9
11
|
}> & (typeof globalThis extends {
|
|
10
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
11
13
|
} ? P : {});
|
|
@@ -53,7 +53,7 @@ if (!props.viewOnly) {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
onBlokkliEvent("keyPressed", (e) => {
|
|
56
|
-
if (ui.hasDialogOpen.value) {
|
|
56
|
+
if (ui.hasDialogOpen.value || ui.hasNestedEditorOpen.value) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
const checkKey = [e.meta, e.shift, e.code.toLowerCase()].join("-");
|
|
@@ -7,11 +7,39 @@
|
|
|
7
7
|
/>
|
|
8
8
|
|
|
9
9
|
<div
|
|
10
|
-
v-show="activeSidebarRight"
|
|
11
|
-
|
|
12
|
-
class="bk-sidebar
|
|
13
|
-
:class="{
|
|
14
|
-
|
|
10
|
+
v-show="activeSidebarRight || activeSidebarRightBottom"
|
|
11
|
+
ref="sidebarRightWrapper"
|
|
12
|
+
class="bk-sidebar-right-wrapper"
|
|
13
|
+
:class="{
|
|
14
|
+
'bk-is-resizing-split': isResizingSplit,
|
|
15
|
+
'bk-is-split': activeSidebarRightBottom
|
|
16
|
+
}"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
v-show="activeSidebarRight"
|
|
20
|
+
id="bk-sidebar-content-right"
|
|
21
|
+
class="bk-sidebar bk-is-right"
|
|
22
|
+
:class="{ 'bk-is-hidden': !sidebarVisible }"
|
|
23
|
+
:style="rightSidebarStyle"
|
|
24
|
+
/>
|
|
25
|
+
<div
|
|
26
|
+
v-show="activeSidebarRight && activeSidebarRightBottom"
|
|
27
|
+
class="bk bk-sidebar-resize"
|
|
28
|
+
@mousedown.prevent.stop="onSplitMouseDown"
|
|
29
|
+
>
|
|
30
|
+
<div>
|
|
31
|
+
<hr />
|
|
32
|
+
<hr />
|
|
33
|
+
<hr />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div
|
|
37
|
+
v-show="activeSidebarRightBottom"
|
|
38
|
+
id="bk-sidebar-content-right-bottom"
|
|
39
|
+
class="bk-sidebar bk-is-right-bottom"
|
|
40
|
+
:class="{ 'bk-is-hidden': !sidebarVisible }"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
15
43
|
|
|
16
44
|
<AppMenu />
|
|
17
45
|
|
|
@@ -44,12 +72,23 @@
|
|
|
44
72
|
id="bk-sidebar-tabs-right"
|
|
45
73
|
class="bk-sidebar-container-tabs bk-is-right"
|
|
46
74
|
/>
|
|
75
|
+
<div
|
|
76
|
+
id="bk-sidebar-tabs-right-bottom"
|
|
77
|
+
class="bk-sidebar-container-tabs bk-is-right"
|
|
78
|
+
/>
|
|
47
79
|
</div>
|
|
48
80
|
</template>
|
|
49
81
|
|
|
50
82
|
<script setup>
|
|
51
83
|
import { Icon } from "#blokkli/editor/components";
|
|
52
|
-
import {
|
|
84
|
+
import {
|
|
85
|
+
onMounted,
|
|
86
|
+
useBlokkli,
|
|
87
|
+
onBeforeUnmount,
|
|
88
|
+
computed,
|
|
89
|
+
ref,
|
|
90
|
+
useTemplateRef
|
|
91
|
+
} from "#imports";
|
|
53
92
|
import AppMenu from "./../AppMenu/index.vue";
|
|
54
93
|
import { onBlokkliEvent } from "#blokkli/editor/composables";
|
|
55
94
|
const { ui, selection, storage, eventBus } = useBlokkli();
|
|
@@ -65,7 +104,67 @@ const sidebarVisible = computed(() => {
|
|
|
65
104
|
});
|
|
66
105
|
const activeSidebarLeft = storage.use("sidebar:active:left", "");
|
|
67
106
|
const activeSidebarRight = storage.use("sidebar:active:right", "");
|
|
107
|
+
const activeSidebarRightBottom = storage.use("sidebar:active:right-bottom", "");
|
|
68
108
|
const focusedSidebar = storage.use("sidebar:focused", "");
|
|
109
|
+
const splitPercent = storage.use("sidebar:right:split-percent", 50);
|
|
110
|
+
const sidebarRightWrapper = useTemplateRef("sidebarRightWrapper");
|
|
111
|
+
const activeSplitHeight = ref(null);
|
|
112
|
+
const isResizingSplit = ref(false);
|
|
113
|
+
const splitStartY = ref(0);
|
|
114
|
+
const splitStartHeight = ref(0);
|
|
115
|
+
const bothSidebarsVisible = computed(
|
|
116
|
+
() => !!activeSidebarRight.value && !!activeSidebarRightBottom.value
|
|
117
|
+
);
|
|
118
|
+
const rightSidebarStyle = computed(() => {
|
|
119
|
+
if (!bothSidebarsVisible.value) {
|
|
120
|
+
return {};
|
|
121
|
+
}
|
|
122
|
+
if (activeSplitHeight.value !== null) {
|
|
123
|
+
return { flex: `0 0 ${activeSplitHeight.value}px` };
|
|
124
|
+
}
|
|
125
|
+
return { flex: `0 0 ${splitPercent.value}%` };
|
|
126
|
+
});
|
|
127
|
+
function onSplitPointerMove(e) {
|
|
128
|
+
const wrapper = sidebarRightWrapper.value;
|
|
129
|
+
if (!wrapper) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const wrapperHeight = wrapper.clientHeight;
|
|
133
|
+
const delta = e.clientY - splitStartY.value;
|
|
134
|
+
const newHeight = Math.min(
|
|
135
|
+
Math.max(splitStartHeight.value + delta, 100),
|
|
136
|
+
wrapperHeight - 100
|
|
137
|
+
);
|
|
138
|
+
activeSplitHeight.value = newHeight;
|
|
139
|
+
}
|
|
140
|
+
function onSplitPointerUp() {
|
|
141
|
+
const wrapper = sidebarRightWrapper.value;
|
|
142
|
+
if (wrapper && activeSplitHeight.value !== null) {
|
|
143
|
+
const wrapperHeight = wrapper.clientHeight;
|
|
144
|
+
splitPercent.value = activeSplitHeight.value / wrapperHeight * 100;
|
|
145
|
+
}
|
|
146
|
+
activeSplitHeight.value = null;
|
|
147
|
+
isResizingSplit.value = false;
|
|
148
|
+
document.documentElement.style.cursor = "";
|
|
149
|
+
window.removeEventListener("mousemove", onSplitPointerMove);
|
|
150
|
+
window.removeEventListener("mouseup", onSplitPointerUp);
|
|
151
|
+
}
|
|
152
|
+
function onSplitMouseDown(e) {
|
|
153
|
+
if (ui.isMobile.value || e.button !== 0) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const wrapper = sidebarRightWrapper.value;
|
|
157
|
+
if (!wrapper) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const wrapperHeight = wrapper.clientHeight;
|
|
161
|
+
splitStartY.value = e.clientY;
|
|
162
|
+
splitStartHeight.value = splitPercent.value / 100 * wrapperHeight;
|
|
163
|
+
isResizingSplit.value = true;
|
|
164
|
+
document.documentElement.style.cursor = "ns-resize";
|
|
165
|
+
window.addEventListener("mousemove", onSplitPointerMove);
|
|
166
|
+
window.addEventListener("mouseup", onSplitPointerUp);
|
|
167
|
+
}
|
|
69
168
|
const emit = defineEmits(["loaded"]);
|
|
70
169
|
const onWindowMouseDown = (e) => {
|
|
71
170
|
if ((e.target instanceof HTMLElement || e.target instanceof SVGElement) && !e.target.closest(".bk-sidebar-detached")) {
|
|
@@ -79,6 +178,8 @@ onMounted(() => {
|
|
|
79
178
|
});
|
|
80
179
|
onBeforeUnmount(() => {
|
|
81
180
|
document.documentElement.removeEventListener("mousedown", onWindowMouseDown);
|
|
181
|
+
window.removeEventListener("mousemove", onSplitPointerMove);
|
|
182
|
+
window.removeEventListener("mouseup", onSplitPointerUp);
|
|
82
183
|
});
|
|
83
184
|
</script>
|
|
84
185
|
|
|
@@ -10,6 +10,8 @@ import ConfigForm from './PluginConfigForm/index.vue.js';
|
|
|
10
10
|
import DialogModal from './Dialog/index.vue.js';
|
|
11
11
|
import DiffValue from './DiffViewer/DiffValue.vue.js';
|
|
12
12
|
import DiffViewerState from './DiffViewer/State.vue.js';
|
|
13
|
+
import Dropdown from './Dropdown/index.vue.js';
|
|
14
|
+
import DropdownItem from './DropdownItem/index.vue.js';
|
|
13
15
|
import ErrorBoundary from './BlokkliErrorBoundary.vue.js';
|
|
14
16
|
import FlexTextarea from './FlexTextarea/index.vue.js';
|
|
15
17
|
import FormCheckboxes from './Form/Checkboxes/index.vue.js';
|
|
@@ -31,6 +33,7 @@ import ItemIconBox from './ItemIconBox/index.vue.js';
|
|
|
31
33
|
import Loading from './Loading/index.vue.js';
|
|
32
34
|
import NestedEditorOverlay from './NestedEditorOverlay/index.vue.js';
|
|
33
35
|
import Pagination from './Pagination/index.vue.js';
|
|
36
|
+
import Popup from './Popup/index.vue.js';
|
|
34
37
|
import RelativeTime from './RelativeTime/index.vue.js';
|
|
35
38
|
import Resizable from './Resizable/index.vue.js';
|
|
36
39
|
import ScaleToFit from './ScaleToFit/index.vue.js';
|
|
@@ -41,4 +44,4 @@ import Sortli from './Sortli/index.vue.js';
|
|
|
41
44
|
import StatusIcon from './StatusIcon/index.vue.js';
|
|
42
45
|
import TransitionHeight from './Transition/Height.vue.js';
|
|
43
46
|
import ViewportBlockingRect from './ViewportBlockingRect/index.vue.js';
|
|
44
|
-
export { AddListItem, ArtboardTooltip, AutoHeight, Banner, BlockPreviewItem, BlockPreviewRenderer, BlokkliTransition, BundleSelector, ConfigForm, DialogModal, DiffValue, DiffViewerState, ErrorBoundary, FlexTextarea, FormCheckboxes, FormDatepicker, FormGroup, FormItem, FormOverlay, FormRadio, FormRadioTabs, FormSelect, FormText, FormTextarea, FormToggle, Highlight, Icon, InfoBox, ItemIcon, ItemIconBox, Loading, NestedEditorOverlay, Pagination, RelativeTime, Resizable, ScaleToFit, ScheduleDate, ScrollBoundary, ShortcutIndicator, Sortli, StatusIcon, TransitionHeight, ViewportBlockingRect, };
|
|
47
|
+
export { AddListItem, ArtboardTooltip, AutoHeight, Banner, BlockPreviewItem, BlockPreviewRenderer, BlokkliTransition, BundleSelector, ConfigForm, DialogModal, DiffValue, DiffViewerState, Dropdown, DropdownItem, ErrorBoundary, FlexTextarea, FormCheckboxes, FormDatepicker, FormGroup, FormItem, FormOverlay, FormRadio, FormRadioTabs, FormSelect, FormText, FormTextarea, FormToggle, Highlight, Icon, InfoBox, ItemIcon, ItemIconBox, Loading, NestedEditorOverlay, Pagination, Popup, RelativeTime, Resizable, ScaleToFit, ScheduleDate, ScrollBoundary, ShortcutIndicator, Sortli, StatusIcon, TransitionHeight, ViewportBlockingRect, };
|
|
@@ -10,6 +10,8 @@ import ConfigForm from "./PluginConfigForm/index.vue";
|
|
|
10
10
|
import DialogModal from "./Dialog/index.vue";
|
|
11
11
|
import DiffValue from "./DiffViewer/DiffValue.vue";
|
|
12
12
|
import DiffViewerState from "./DiffViewer/State.vue";
|
|
13
|
+
import Dropdown from "./Dropdown/index.vue";
|
|
14
|
+
import DropdownItem from "./DropdownItem/index.vue";
|
|
13
15
|
import ErrorBoundary from "./BlokkliErrorBoundary.vue";
|
|
14
16
|
import FlexTextarea from "./FlexTextarea/index.vue";
|
|
15
17
|
import FormCheckboxes from "./Form/Checkboxes/index.vue";
|
|
@@ -31,6 +33,7 @@ import ItemIconBox from "./ItemIconBox/index.vue";
|
|
|
31
33
|
import Loading from "./Loading/index.vue";
|
|
32
34
|
import NestedEditorOverlay from "./NestedEditorOverlay/index.vue";
|
|
33
35
|
import Pagination from "./Pagination/index.vue";
|
|
36
|
+
import Popup from "./Popup/index.vue";
|
|
34
37
|
import RelativeTime from "./RelativeTime/index.vue";
|
|
35
38
|
import Resizable from "./Resizable/index.vue";
|
|
36
39
|
import ScaleToFit from "./ScaleToFit/index.vue";
|
|
@@ -54,6 +57,8 @@ export {
|
|
|
54
57
|
DialogModal,
|
|
55
58
|
DiffValue,
|
|
56
59
|
DiffViewerState,
|
|
60
|
+
Dropdown,
|
|
61
|
+
DropdownItem,
|
|
57
62
|
ErrorBoundary,
|
|
58
63
|
FlexTextarea,
|
|
59
64
|
FormCheckboxes,
|
|
@@ -75,6 +80,7 @@ export {
|
|
|
75
80
|
Loading,
|
|
76
81
|
NestedEditorOverlay,
|
|
77
82
|
Pagination,
|
|
83
|
+
Popup,
|
|
78
84
|
RelativeTime,
|
|
79
85
|
Resizable,
|
|
80
86
|
ScaleToFit,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { onBeforeUnmount, onMounted, useBlokkli } from "#imports";
|
|
2
2
|
export function defineDropAreas(cb) {
|
|
3
|
-
const {
|
|
3
|
+
const { dragdrop } = useBlokkli();
|
|
4
4
|
onMounted(() => {
|
|
5
|
-
|
|
5
|
+
dragdrop.addDropArea(cb);
|
|
6
6
|
});
|
|
7
7
|
onBeforeUnmount(() => {
|
|
8
|
-
|
|
8
|
+
dragdrop.removeDropArea(cb);
|
|
9
9
|
});
|
|
10
10
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { onBeforeUnmount, onMounted, useBlokkli } from "#imports";
|
|
2
|
+
export function defineDropHandler(itemType, handler) {
|
|
3
|
+
const { dragdrop } = useBlokkli();
|
|
4
|
+
onMounted(() => {
|
|
5
|
+
dragdrop.registerDropHandler(itemType, handler);
|
|
6
|
+
});
|
|
7
|
+
onBeforeUnmount(() => {
|
|
8
|
+
dragdrop.unregisterDropHandler(itemType, handler);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
@@ -2,6 +2,7 @@ export { addElementClasses } from './addElementClasses.js';
|
|
|
2
2
|
export { defineAddAction } from './defineAddAction.js';
|
|
3
3
|
export { defineCommands } from './defineCommands.js';
|
|
4
4
|
export { defineDropAreas } from './defineDropAreas.js';
|
|
5
|
+
export { defineDropHandler } from './defineDropHandler.js';
|
|
5
6
|
export { defineElementStyle } from './defineElementStyle.js';
|
|
6
7
|
export { defineItemDropdownAction } from './defineItemDropdownAction.js';
|
|
7
8
|
export { defineMenuButton } from './defineMenuButton.js';
|
|
@@ -2,6 +2,7 @@ export { addElementClasses } from "./addElementClasses.js";
|
|
|
2
2
|
export { defineAddAction } from "./defineAddAction.js";
|
|
3
3
|
export { defineCommands } from "./defineCommands.js";
|
|
4
4
|
export { defineDropAreas } from "./defineDropAreas.js";
|
|
5
|
+
export { defineDropHandler } from "./defineDropHandler.js";
|
|
5
6
|
export { defineElementStyle } from "./defineElementStyle.js";
|
|
6
7
|
export { defineItemDropdownAction } from "./defineItemDropdownAction.js";
|
|
7
8
|
export { defineMenuButton } from "./defineMenuButton.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useBlokkli } from "#imports";
|
|
2
|
-
import { FIELD_MAPPING } from "#blokkli-build/runtime-options";
|
|
3
2
|
import { itemEntityType } from "#blokkli-build/config";
|
|
4
3
|
const NOOP_OVERRIDE = {
|
|
5
4
|
element: null,
|
|
@@ -32,7 +31,7 @@ export function useEditableFieldOverride(fieldName, host) {
|
|
|
32
31
|
const isComponent = !!editableData?.isComponent;
|
|
33
32
|
function findMatchingProp(mapping) {
|
|
34
33
|
return Object.entries(mapping).find(
|
|
35
|
-
([_prop,
|
|
34
|
+
([_prop, propMapping]) => propMapping?.name === fieldName && propMapping.type === "editable"
|
|
36
35
|
)?.[0] ?? null;
|
|
37
36
|
}
|
|
38
37
|
const providerDefinition = definitions.getProviderDefinition(
|
|
@@ -41,9 +40,9 @@ export function useEditableFieldOverride(fieldName, host) {
|
|
|
41
40
|
);
|
|
42
41
|
let matchingProp = null;
|
|
43
42
|
if (host.type === itemEntityType) {
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
matchingProp = findMatchingProp(
|
|
43
|
+
const defintion = definitions.getBlockDefinition(host.bundle, "default");
|
|
44
|
+
if (defintion?.propsFieldMapping) {
|
|
45
|
+
matchingProp = findMatchingProp(defintion.propsFieldMapping);
|
|
47
46
|
}
|
|
48
47
|
} else if (providerDefinition) {
|
|
49
48
|
const mapping = providerDefinition.propsFieldMapping;
|