@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
|
@@ -97,6 +97,20 @@ export function getRuntimeOptionValue(definition, value) {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
return value;
|
|
100
|
+
} else if (type === "json") {
|
|
101
|
+
if (typeof value === "string") {
|
|
102
|
+
try {
|
|
103
|
+
return JSON.parse(value);
|
|
104
|
+
} catch {
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (typeof defaultValue === "string") {
|
|
108
|
+
try {
|
|
109
|
+
return JSON.parse(defaultValue);
|
|
110
|
+
} catch {
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return "";
|
|
100
114
|
}
|
|
101
115
|
if (defaultValue === void 0) {
|
|
102
116
|
return "";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
+
import type { ComplexOptionTypeMap } from '#blokkli-build/complex-option-types';
|
|
2
3
|
import type { BlockOptionDefinitionBase } from '../../global/types/blockOptions.js';
|
|
3
|
-
export type BlockOptionDefinition = BlockOptionDefinitionBase<BlokkliIcon>;
|
|
4
|
+
export type BlockOptionDefinition = BlockOptionDefinitionBase<BlokkliIcon, keyof ComplexOptionTypeMap>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue';
|
|
2
2
|
import type { BlockOptionDefinition } from './blockOptions.js';
|
|
3
3
|
import type { AdapterContext } from '../editor/adapter/index.js';
|
|
4
|
-
import type { BlockBundleWithNested, FieldListItemTyped, GlobalOptionsKey, ValidChunkNames, ValidFieldListTypes, ValidGlobalConfigKeys, BundleProps } from '#blokkli-build/generated-types';
|
|
5
|
-
import type { BlockDefinitionInputBase, BlockDefinitionRenderForBase, BlockDefinitionRenderForFieldListBase, BlockDefinitionRenderForFieldListTypeBase, BlockDefinitionRenderForParentBase, BlokkliDefinitionInputEditorBase, FragmentDefinitionInputBase, ProviderDefinitionInputBase } from './../../global/types/definitions.js';
|
|
4
|
+
import type { BlockBundleWithNested, FieldListItemTyped, GlobalOptionsKey, ValidChunkNames, ValidFieldListTypes, ValidGlobalConfigKeys, BundleProps, ValidProviderTypes } from '#blokkli-build/generated-types';
|
|
5
|
+
import type { BlockDefinitionInputBase, BlockDefinitionRenderForBase, BlockDefinitionRenderForFieldListBase, BlockDefinitionRenderForFieldListTypeBase, BlockDefinitionRenderForParentBase, BlockDefinitionRenderForProviderTypeBase, BlokkliDefinitionInputEditorBase, FragmentDefinitionInputBase, ProviderDefinitionInputBase } from './../../global/types/definitions.js';
|
|
6
6
|
import type { GlobalOptionsType } from '#blokkli-build/definitions';
|
|
7
7
|
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
8
|
+
import type { ComplexOptionTypeMap } from '#blokkli-build/complex-option-types';
|
|
8
9
|
import type { BlokkliProviderEntityContext } from './provider.js';
|
|
9
10
|
type GetType<T> = T extends {
|
|
10
11
|
options: infer O;
|
|
@@ -16,7 +17,12 @@ type GetType<T> = T extends {
|
|
|
16
17
|
type: 'range';
|
|
17
18
|
} ? number : T extends {
|
|
18
19
|
type: 'number';
|
|
19
|
-
} ? number :
|
|
20
|
+
} ? number : T extends {
|
|
21
|
+
type: 'json';
|
|
22
|
+
dataType: infer D;
|
|
23
|
+
} ? D extends keyof ComplexOptionTypeMap ? ComplexOptionTypeMap[D] : any : T extends {
|
|
24
|
+
type: 'json';
|
|
25
|
+
} ? any : string;
|
|
20
26
|
export type BlockDefinitionOptionsInput = {
|
|
21
27
|
[key: string]: BlockOptionDefinition;
|
|
22
28
|
};
|
|
@@ -104,8 +110,9 @@ export type BlokkliDefinitionInputEditor<Options extends BlockDefinitionOptionsI
|
|
|
104
110
|
export type BlockDefinitionRenderForParent = BlockDefinitionRenderForParentBase<BlockBundleWithNested>;
|
|
105
111
|
export type BlockDefinitionRenderForFieldList = BlockDefinitionRenderForFieldListBase<ValidFieldListTypes>;
|
|
106
112
|
export type BlockDefinitionRenderForFieldListType = BlockDefinitionRenderForFieldListTypeBase<ValidFieldListTypes>;
|
|
107
|
-
export type
|
|
108
|
-
export type
|
|
113
|
+
export type BlockDefinitionRenderForProviderType = BlockDefinitionRenderForProviderTypeBase<ValidProviderTypes>;
|
|
114
|
+
export type BlockDefinitionRenderFor = BlockDefinitionRenderForBase<BlockBundleWithNested, ValidFieldListTypes, ValidProviderTypes>;
|
|
115
|
+
export type BlockDefinitionInput<Options extends BlockDefinitionOptionsInput = BlockDefinitionOptionsInput, GlobalOptions extends GlobalOptionsKey[] | undefined = [], Bundle extends BundleKey | string = string> = Omit<BlockDefinitionInputBase<Options, GlobalOptions, Bundle, ValidChunkNames, BlockBundleWithNested, ValidFieldListTypes, BlokkliIcon, BundleProps, ValidProviderTypes>, 'editor'> & {
|
|
109
116
|
/**
|
|
110
117
|
* Settings for the behaviour in the editor.
|
|
111
118
|
*/
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { ValidProviderTypes } from '#blokkli-build/generated-types';
|
|
1
2
|
import type { EntityContext } from '.';
|
|
2
3
|
export type EditPermission = 'view' | 'edit' | 'review' | 'delete';
|
|
3
4
|
export type BlokkliProviderEntityContext = EntityContext & {
|
|
5
|
+
providerType: ValidProviderTypes;
|
|
4
6
|
language?: string;
|
|
5
7
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function defineCodeTemplate(name, buildCode, buildTypes, options) {
|
|
2
|
+
return {
|
|
3
|
+
type: "code",
|
|
4
|
+
name,
|
|
5
|
+
buildCode,
|
|
6
|
+
buildTypes,
|
|
7
|
+
options: {
|
|
8
|
+
dependencies: options?.dependencies || [],
|
|
9
|
+
write: !!options?.write,
|
|
10
|
+
context: options?.context || "app"
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function defineFileTemplate(fileName, build, options) {
|
|
15
|
+
return {
|
|
16
|
+
type: "file",
|
|
17
|
+
fileName,
|
|
18
|
+
build,
|
|
19
|
+
options: {
|
|
20
|
+
dependencies: options?.dependencies || [],
|
|
21
|
+
write: options?.write ?? true,
|
|
22
|
+
context: options?.context || "app"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function withHelper(cb) {
|
|
27
|
+
return cb;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { defineFileTemplate as a, defineCodeTemplate as d, withHelper as w };
|
|
@@ -143,33 +143,4 @@ ${lines.join("\n")}`
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
return {
|
|
148
|
-
type: "code",
|
|
149
|
-
name,
|
|
150
|
-
buildCode,
|
|
151
|
-
buildTypes,
|
|
152
|
-
options: {
|
|
153
|
-
dependencies: options?.dependencies || [],
|
|
154
|
-
write: !!options?.write,
|
|
155
|
-
context: options?.context || "app"
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function defineFileTemplate(fileName, build, options) {
|
|
160
|
-
return {
|
|
161
|
-
type: "file",
|
|
162
|
-
fileName,
|
|
163
|
-
build,
|
|
164
|
-
options: {
|
|
165
|
-
dependencies: options?.dependencies || [],
|
|
166
|
-
write: options?.write ?? true,
|
|
167
|
-
context: options?.context || "app"
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function withHelper(cb) {
|
|
172
|
-
return cb;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export { Collector as C, CollectedFile as a, defineFileTemplate as b, defineCodeTemplate as d, withHelper as w };
|
|
146
|
+
export { Collector as C, CollectedFile as a };
|
|
@@ -114,6 +114,17 @@ type ModuleOptionsStorageDefaults = {
|
|
|
114
114
|
* Options for the module.
|
|
115
115
|
*/
|
|
116
116
|
type ModuleOptions = {
|
|
117
|
+
/**
|
|
118
|
+
* Additional blokkli/ directories provided by modules.
|
|
119
|
+
*
|
|
120
|
+
* These follow the same structure as <rootDir>/blokkli/ (tools/, skills/,
|
|
121
|
+
* prompts/, system-prompts/) and are scanned by collectors that support it.
|
|
122
|
+
*
|
|
123
|
+
* Modules should push to this array during alterOptions.
|
|
124
|
+
*
|
|
125
|
+
* @internal
|
|
126
|
+
*/
|
|
127
|
+
blokkliDirs?: string[];
|
|
117
128
|
/**
|
|
118
129
|
* An array of blökkli modules to use.
|
|
119
130
|
*/
|
|
@@ -156,6 +167,14 @@ type ModuleOptions = {
|
|
|
156
167
|
* this field.
|
|
157
168
|
*/
|
|
158
169
|
fieldListTypes?: string[];
|
|
170
|
+
/**
|
|
171
|
+
* Valid blokkli provider types.
|
|
172
|
+
*
|
|
173
|
+
* If one or more values are defined, they can be passed to the
|
|
174
|
+
* BlokkliProvider component as a prop. The value is made available to all
|
|
175
|
+
* blokkli items inside this provider.
|
|
176
|
+
*/
|
|
177
|
+
providerTypes?: string[];
|
|
159
178
|
/**
|
|
160
179
|
* The entity type of blokkli items.
|
|
161
180
|
*
|
|
@@ -507,6 +526,14 @@ interface AdapterExtensionDefinition {
|
|
|
507
526
|
namespace: string;
|
|
508
527
|
path: string;
|
|
509
528
|
}
|
|
529
|
+
interface ComplexOptionTypeDefinition {
|
|
530
|
+
id: string;
|
|
531
|
+
typeName: string;
|
|
532
|
+
typePath: string;
|
|
533
|
+
editorComponentPath: string;
|
|
534
|
+
editorButtonLabel: string;
|
|
535
|
+
editorIcon: string;
|
|
536
|
+
}
|
|
510
537
|
declare class ModuleContext {
|
|
511
538
|
helper: ModuleHelper;
|
|
512
539
|
icons: IconCollector;
|
|
@@ -516,8 +543,14 @@ declare class ModuleContext {
|
|
|
516
543
|
private templates;
|
|
517
544
|
private templateContents;
|
|
518
545
|
private adapterExtensions;
|
|
546
|
+
private featureFragments;
|
|
547
|
+
private complexOptionTypes;
|
|
519
548
|
collectors: Collector[];
|
|
520
549
|
constructor(helper: ModuleHelper, icons: IconCollector, features: FeatureCollector, blocks: BlockCollector, theme: ThemeData);
|
|
550
|
+
addFeatureFragment(name: string): void;
|
|
551
|
+
getFeatureFragmentNames(): string[];
|
|
552
|
+
registerComplexOptionType(def: ComplexOptionTypeDefinition): void;
|
|
553
|
+
getComplexOptionTypes(): ComplexOptionTypeDefinition[];
|
|
521
554
|
registerAdapterExtension(namespace: string, path: string): void;
|
|
522
555
|
getAdapterExtensions(): AdapterExtensionDefinition[];
|
|
523
556
|
addCollector(collector: Collector): void;
|
|
@@ -543,6 +576,7 @@ declare class ModuleContext {
|
|
|
543
576
|
type Blokkli = {
|
|
544
577
|
helper: ModuleHelper;
|
|
545
578
|
context: ModuleContext;
|
|
579
|
+
$t: (key: string, defaultText: string) => string;
|
|
546
580
|
};
|
|
547
581
|
type BlokkliModuleInit<O extends object> = {
|
|
548
582
|
alterOptions?: (options: ModuleOptions) => void;
|
package/dist/types.d.mts
CHANGED
|
@@ -4,6 +4,6 @@ declare module '@nuxt/schema' {
|
|
|
4
4
|
interface NuxtHooks extends ModuleHooks {}
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export { type ModuleHooks } from './shared/editor.
|
|
7
|
+
export { type ModuleHooks } from './shared/editor.BdBm1Z7C.mjs'
|
|
8
8
|
|
|
9
9
|
export { type ModuleOptions, default } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blokkli/editor",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.37",
|
|
4
4
|
"description": "Interactive page building experience for Nuxt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
|
@@ -42,6 +42,12 @@
|
|
|
42
42
|
],
|
|
43
43
|
"agent": [
|
|
44
44
|
"./dist/modules/agent/index.d.mts"
|
|
45
|
+
],
|
|
46
|
+
"table-of-contents": [
|
|
47
|
+
"./dist/modules/table-of-contents/index.d.mts"
|
|
48
|
+
],
|
|
49
|
+
"charts": [
|
|
50
|
+
"./dist/modules/charts/index.d.mts"
|
|
45
51
|
]
|
|
46
52
|
}
|
|
47
53
|
},
|
|
@@ -57,6 +63,14 @@
|
|
|
57
63
|
"./agent": {
|
|
58
64
|
"types": "./dist/modules/agent/index.d.mts",
|
|
59
65
|
"import": "./dist/modules/agent/index.mjs"
|
|
66
|
+
},
|
|
67
|
+
"./table-of-contents": {
|
|
68
|
+
"types": "./dist/modules/table-of-contents/index.d.mts",
|
|
69
|
+
"import": "./dist/modules/table-of-contents/index.mjs"
|
|
70
|
+
},
|
|
71
|
+
"./charts": {
|
|
72
|
+
"types": "./dist/modules/charts/index.d.mts",
|
|
73
|
+
"import": "./dist/modules/charts/index.mjs"
|
|
60
74
|
}
|
|
61
75
|
},
|
|
62
76
|
"scripts": {
|
|
@@ -70,7 +84,7 @@
|
|
|
70
84
|
"dev:minimal": "nuxi dev playground-minimal --host",
|
|
71
85
|
"styles:build": "postcss ./css/index.css -o ./src/runtime/editor/css/output.css",
|
|
72
86
|
"styles:watch": "postcss ./css/index.css -o ./src/runtime/editor/css/output.css --watch",
|
|
73
|
-
"dev:build": "npm run dev:prepare &&
|
|
87
|
+
"dev:build": "npm run dev:prepare && nuxt build playground",
|
|
74
88
|
"dev:start": "npx serve playground/.output/public",
|
|
75
89
|
"dev:prepare": "PLAYGROUND_MODULE_BUILD=true nuxt-module-build build --stub && PLAYGROUND_MODULE_BUILD=true nuxt-module-build prepare && nuxi prepare playground",
|
|
76
90
|
"release": "npm run lint && npm run prepack && changelogen --release",
|
|
@@ -90,7 +104,8 @@
|
|
|
90
104
|
"dependencies": {
|
|
91
105
|
"@material-symbols/svg-600": "0.40.2",
|
|
92
106
|
"@nuxt/kit": "^4.2.2",
|
|
93
|
-
"
|
|
107
|
+
"apexcharts": "^5.4.0",
|
|
108
|
+
"artboard-deluxe": "^0.1.4",
|
|
94
109
|
"estree-walker-ts": "^1.1.0",
|
|
95
110
|
"fzf": "^0.5.2",
|
|
96
111
|
"get-video-id": "^4.1.7",
|
|
@@ -100,6 +115,7 @@
|
|
|
100
115
|
"qrcode.vue": "^3.6.0",
|
|
101
116
|
"turndown": "^7.2.0",
|
|
102
117
|
"twgl.js": "^7.0.0",
|
|
118
|
+
"vue3-apexcharts": "^1.10.0",
|
|
103
119
|
"zod": "^4.0.0"
|
|
104
120
|
},
|
|
105
121
|
"devDependencies": {
|
|
@@ -157,7 +173,9 @@
|
|
|
157
173
|
"peerDependencies": {
|
|
158
174
|
"@anthropic-ai/sdk": "^0.71.2",
|
|
159
175
|
"@lunarisapp/readability": "^1.0.2",
|
|
176
|
+
"acorn": "^8.0.0",
|
|
160
177
|
"axe-core": "^4.10.0",
|
|
178
|
+
"esbuild": ">=0.20.0",
|
|
161
179
|
"magic-string": "^0.30.0",
|
|
162
180
|
"micromatch": "^4.0.0",
|
|
163
181
|
"openai": "^4.0.0",
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { defineBlokkliAgentTool } from "#blokkli/agent/app/composables";
|
|
3
|
-
const paramsSchema = z.object({
|
|
4
|
-
parentUuid: z.string().describe("The parent entity UUID"),
|
|
5
|
-
field: z.string().describe("The field name")
|
|
6
|
-
});
|
|
7
|
-
const bundleSchema = z.object({
|
|
8
|
-
bundle: z.string().describe("The paragraph type identifier"),
|
|
9
|
-
label: z.string().describe("Human-readable label"),
|
|
10
|
-
description: z.string().optional().describe("Bundle description if available"),
|
|
11
|
-
contentFields: z.array(
|
|
12
|
-
z.object({
|
|
13
|
-
name: z.string().describe("The field name"),
|
|
14
|
-
type: z.string().describe("Field type: plain, markup, reference, or link")
|
|
15
|
-
})
|
|
16
|
-
).describe("Content fields (text, media, links) on this bundle"),
|
|
17
|
-
paragraphFields: z.array(
|
|
18
|
-
z.object({
|
|
19
|
-
name: z.string().describe("The field name"),
|
|
20
|
-
label: z.string().describe("Human-readable label"),
|
|
21
|
-
allowedBundles: z.array(z.string()).describe("Paragraph types allowed in this field"),
|
|
22
|
-
cardinality: z.number().describe("Max paragraphs allowed (-1 = unlimited)")
|
|
23
|
-
})
|
|
24
|
-
).describe("Paragraph fields (for nested paragraphs) on this bundle")
|
|
25
|
-
});
|
|
26
|
-
const resultSchema = z.object({
|
|
27
|
-
fieldLabel: z.string().describe("Human-readable field label"),
|
|
28
|
-
cardinality: z.number().describe("Max paragraphs allowed (-1 = unlimited)"),
|
|
29
|
-
currentCount: z.number().describe("Current number of paragraphs in the field"),
|
|
30
|
-
bundles: z.array(bundleSchema).describe("Available paragraph types"),
|
|
31
|
-
nestingInfo: z.string().optional().describe(
|
|
32
|
-
"Summary of which bundles have paragraph fields for nested paragraphs. Use get_child_paragraphs after adding these bundles to populate their nested fields."
|
|
33
|
-
)
|
|
34
|
-
});
|
|
35
|
-
export default defineBlokkliAgentTool({
|
|
36
|
-
name: "get_bundle_info",
|
|
37
|
-
description: "Get detailed information about which paragraph types can be added to a specific field, including their content fields and paragraph fields (for nested paragraphs).",
|
|
38
|
-
category: "query",
|
|
39
|
-
modes: ["readonly", "editing", "translating", "review"],
|
|
40
|
-
label($t) {
|
|
41
|
-
return $t("aiAgentGetBundleInfoRunning", "Getting bundle info...");
|
|
42
|
-
},
|
|
43
|
-
paramsSchema,
|
|
44
|
-
resultSchema,
|
|
45
|
-
execute(ctx, params) {
|
|
46
|
-
const { fields, types, state, $t } = ctx.app;
|
|
47
|
-
const label = $t(
|
|
48
|
-
"aiAgentGetBundleInfoDone",
|
|
49
|
-
"Got bundle info for @field"
|
|
50
|
-
).replace("@field", params.field);
|
|
51
|
-
const field = fields.find(params.parentUuid, params.field);
|
|
52
|
-
if (!field) {
|
|
53
|
-
return {
|
|
54
|
-
label,
|
|
55
|
-
result: {
|
|
56
|
-
fieldLabel: params.field,
|
|
57
|
-
cardinality: -1,
|
|
58
|
-
currentCount: 0,
|
|
59
|
-
bundles: []
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
const fieldKey = `${params.parentUuid}:${params.field}`;
|
|
64
|
-
const currentCount = state.getFieldBlockCount(fieldKey);
|
|
65
|
-
const bundles = field.allowedBundles.map((bundle) => {
|
|
66
|
-
const bundleDefinition = types.getBlockBundleDefinition(bundle);
|
|
67
|
-
const editableConfigs = types.editableFieldConfig.forEntityTypeAndBundle(ctx.itemEntityType, bundle).filter((c) => c.type !== "table").map((c) => ({
|
|
68
|
-
name: c.name,
|
|
69
|
-
type: c.type === "frame" || c.type === "markup" ? "markup" : "plain"
|
|
70
|
-
}));
|
|
71
|
-
const droppableConfigs = types.droppableFieldConfig.forEntityTypeAndBundle(ctx.itemEntityType, bundle).map((c) => ({
|
|
72
|
-
name: c.name,
|
|
73
|
-
type: c.type
|
|
74
|
-
}));
|
|
75
|
-
const blockFieldConfigs = types.fieldConfig.forEntityTypeAndBundle(ctx.itemEntityType, bundle).map((c) => ({
|
|
76
|
-
name: c.name,
|
|
77
|
-
label: c.label,
|
|
78
|
-
allowedBundles: c.allowedBundles,
|
|
79
|
-
cardinality: c.cardinality
|
|
80
|
-
}));
|
|
81
|
-
return {
|
|
82
|
-
bundle,
|
|
83
|
-
label: bundleDefinition?.label ?? bundle,
|
|
84
|
-
description: bundleDefinition?.description,
|
|
85
|
-
contentFields: [...editableConfigs, ...droppableConfigs],
|
|
86
|
-
paragraphFields: blockFieldConfigs
|
|
87
|
-
};
|
|
88
|
-
});
|
|
89
|
-
const nestingBundles = bundles.filter((b) => b.paragraphFields.length > 0);
|
|
90
|
-
const nestingInfo = nestingBundles.length ? nestingBundles.map(
|
|
91
|
-
(b) => `${b.bundle} has paragraph fields: ${b.paragraphFields.map((f) => `${f.name} (${f.allowedBundles.join(", ")})`).join(", ")}`
|
|
92
|
-
).join("; ") : void 0;
|
|
93
|
-
return {
|
|
94
|
-
label,
|
|
95
|
-
result: {
|
|
96
|
-
fieldLabel: field.label,
|
|
97
|
-
cardinality: field.cardinality,
|
|
98
|
-
currentCount,
|
|
99
|
-
bundles,
|
|
100
|
-
nestingInfo
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ClipboardItemFile } from '../../types.js';
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<ClipboardItemFile, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ClipboardItemFile> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
declare const _default: typeof __VLS_export;
|
|
4
|
-
export default _default;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bk-clipboard-item-file">
|
|
3
|
-
<div class="bk-clipboard-item-file-lines">
|
|
4
|
-
<div
|
|
5
|
-
v-for="n in 10"
|
|
6
|
-
:key="n"
|
|
7
|
-
:style="{
|
|
8
|
-
width: Math.max(Math.min(prng(n + fileSize) * 230, 100), 40) + '%'
|
|
9
|
-
}"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
<h3>{{ fileName }}</h3>
|
|
13
|
-
<ul>
|
|
14
|
-
<li>{{ extension }}</li>
|
|
15
|
-
<li>{{ fileSizeReadable }}</li>
|
|
16
|
-
</ul>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script setup>
|
|
21
|
-
import { computed } from "#imports";
|
|
22
|
-
const props = defineProps({
|
|
23
|
-
type: { type: String, required: true },
|
|
24
|
-
id: { type: String, required: true },
|
|
25
|
-
itemBundle: { type: String, required: true },
|
|
26
|
-
data: { type: String, required: true },
|
|
27
|
-
additional: { type: String, required: true },
|
|
28
|
-
fileName: { type: String, required: true },
|
|
29
|
-
fileSize: { type: Number, required: true },
|
|
30
|
-
fileType: { type: String, required: true }
|
|
31
|
-
});
|
|
32
|
-
function prng(seed) {
|
|
33
|
-
seed = (seed ^ 1831565813) + (seed << 1);
|
|
34
|
-
seed = seed ^ seed >> 15;
|
|
35
|
-
seed = seed + (seed << 4);
|
|
36
|
-
seed = seed ^ seed >> 13;
|
|
37
|
-
seed = seed * 2246822507;
|
|
38
|
-
seed = seed ^ seed >> 16;
|
|
39
|
-
seed = seed >>> 0;
|
|
40
|
-
return seed / 4294967296;
|
|
41
|
-
}
|
|
42
|
-
function humanFileSize(bytes, si = false, dp = 1) {
|
|
43
|
-
const thresh = si ? 1e3 : 1024;
|
|
44
|
-
if (Math.abs(bytes) < thresh) {
|
|
45
|
-
return bytes + " B";
|
|
46
|
-
}
|
|
47
|
-
const units = si ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
|
48
|
-
let u = -1;
|
|
49
|
-
const r = 10 ** dp;
|
|
50
|
-
do {
|
|
51
|
-
bytes /= thresh;
|
|
52
|
-
++u;
|
|
53
|
-
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
54
|
-
return bytes.toFixed(dp) + " " + units[u];
|
|
55
|
-
}
|
|
56
|
-
const fileSizeReadable = computed(() => humanFileSize(props.fileSize));
|
|
57
|
-
const extension = computed(() => {
|
|
58
|
-
return (props.fileType.split("/")[1] || props.fileType || "").toUpperCase();
|
|
59
|
-
});
|
|
60
|
-
</script>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ClipboardItemFile } from '../../types.js';
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<ClipboardItemFile, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ClipboardItemFile> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
declare const _default: typeof __VLS_export;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ClipboardItemVideo } from '../../types.js';
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<ClipboardItemVideo, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ClipboardItemVideo> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
declare const _default: typeof __VLS_export;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ClipboardItemVideo } from '../../types.js';
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<ClipboardItemVideo, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ClipboardItemVideo> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
declare const _default: typeof __VLS_export;
|
|
4
|
-
export default _default;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Sortli class="bk-clipboard-list" :build-item>
|
|
3
|
-
<div
|
|
4
|
-
v-for="(item, index) in items"
|
|
5
|
-
:key="index + item.data + renderKey"
|
|
6
|
-
class="bk-parent bk-sidebar-padding bk-clipboard-list-item"
|
|
7
|
-
:data-sortli-id="index"
|
|
8
|
-
>
|
|
9
|
-
<div class="bk-clipboard-item">
|
|
10
|
-
<div class="bk bk-clipboard-item-header">
|
|
11
|
-
<div class="bk-blokkli-item-label">
|
|
12
|
-
<div class="bk-blokkli-item-label-icon">
|
|
13
|
-
<ItemIcon :bundle="item.itemBundle" />
|
|
14
|
-
</div>
|
|
15
|
-
<span>{{ getLabel(item.itemBundle) }}</span>
|
|
16
|
-
</div>
|
|
17
|
-
<button @click.prevent.stop.capture="$emit('remove', index)">
|
|
18
|
-
<Icon name="bk_mdi_delete" />
|
|
19
|
-
</button>
|
|
20
|
-
</div>
|
|
21
|
-
<div>
|
|
22
|
-
<div
|
|
23
|
-
v-if="item.type === 'text'"
|
|
24
|
-
class="bk-clipboard-item-inner"
|
|
25
|
-
v-html="item.data"
|
|
26
|
-
/>
|
|
27
|
-
<ClipboardItemVideo v-if="item.type === 'video'" v-bind="item" />
|
|
28
|
-
<div
|
|
29
|
-
v-else-if="item.type === 'image'"
|
|
30
|
-
class="bk-clipboard-item-image"
|
|
31
|
-
>
|
|
32
|
-
<img :src="item.data" />
|
|
33
|
-
</div>
|
|
34
|
-
<ClipboardItemFile v-else-if="item.type === 'file'" v-bind="item" />
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</Sortli>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script setup>
|
|
42
|
-
import { ref, useBlokkli } from "#imports";
|
|
43
|
-
import { ItemIcon, Icon, Sortli } from "#blokkli/editor/components";
|
|
44
|
-
import ClipboardItemVideo from "./Item/Video.vue";
|
|
45
|
-
import ClipboardItemFile from "./Item/File.vue";
|
|
46
|
-
const renderKey = ref(0);
|
|
47
|
-
const props = defineProps({
|
|
48
|
-
items: { type: Array, required: true }
|
|
49
|
-
});
|
|
50
|
-
defineEmits(["remove"]);
|
|
51
|
-
const { types } = useBlokkli();
|
|
52
|
-
function getLabel(bundle) {
|
|
53
|
-
return types.getBlockBundleDefinition(bundle)?.label || bundle;
|
|
54
|
-
}
|
|
55
|
-
function buildItem(element) {
|
|
56
|
-
if (!element.dataset.sortliId) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const index = Number.parseInt(element.dataset.sortliId);
|
|
60
|
-
const item = props.items[index];
|
|
61
|
-
if (!item) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
itemType: "clipboard",
|
|
66
|
-
element: () => element,
|
|
67
|
-
itemBundle: item.itemBundle,
|
|
68
|
-
additional: item.additional,
|
|
69
|
-
clipboardId: item.id
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
start: (...args: any[]) => void;
|
|
3
|
-
close: (...args: any[]) => void;
|
|
4
|
-
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
5
|
-
onStart?: ((...args: any[]) => any) | undefined;
|
|
6
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
7
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
-
declare const _default: typeof __VLS_export;
|
|
9
|
-
export default _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Teleport :to="ui.mainLayoutElement.value">
|
|
3
|
-
<ViewportBlockingRect id="tour-popup" class="bk bk-tour-popup">
|
|
4
|
-
<div class="bk-tour-popup-title">
|
|
5
|
-
<h2>{{ $t("tourLabel", "Take a tour") }}</h2>
|
|
6
|
-
<button class="bk-tour-popup-close" @click="$emit('close')">
|
|
7
|
-
<Icon name="bk_mdi_close" />
|
|
8
|
-
</button>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div class="bk-tour-popup-content">
|
|
12
|
-
<p>
|
|
13
|
-
{{
|
|
14
|
-
$t(
|
|
15
|
-
"tourIntro",
|
|
16
|
-
"Explore the most important features of the editor and learn how to get started using bl\xF6kkli."
|
|
17
|
-
)
|
|
18
|
-
}}
|
|
19
|
-
</p>
|
|
20
|
-
|
|
21
|
-
<button class="bk-button" @click="$emit('start')">
|
|
22
|
-
{{ $t("tourStartButton", "Start the tour") }}
|
|
23
|
-
</button>
|
|
24
|
-
</div>
|
|
25
|
-
</ViewportBlockingRect>
|
|
26
|
-
</Teleport>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script setup>
|
|
30
|
-
import { Icon, ViewportBlockingRect } from "#blokkli/editor/components";
|
|
31
|
-
import { useBlokkli } from "#imports";
|
|
32
|
-
const { $t, ui } = useBlokkli();
|
|
33
|
-
defineEmits(["start", "close"]);
|
|
34
|
-
</script>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
start: (...args: any[]) => void;
|
|
3
|
-
close: (...args: any[]) => void;
|
|
4
|
-
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
5
|
-
onStart?: ((...args: any[]) => any) | undefined;
|
|
6
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
7
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
-
declare const _default: typeof __VLS_export;
|
|
9
|
-
export default _default;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { DropArea } from '#blokkli/editor/types/ui';
|
|
2
|
-
import type { DraggableItem } from '../types/draggable.js';
|
|
3
|
-
type DropAreaProviderFunction = (items: DraggableItem[]) => DropArea[] | DropArea | undefined;
|
|
4
|
-
export type DropAreaProvider = {
|
|
5
|
-
/**
|
|
6
|
-
* Register a drop area provider function.
|
|
7
|
-
*
|
|
8
|
-
* The function will be called when drop areas are requested during drag operations.
|
|
9
|
-
* It receives the currently dragged items and can return drop areas where those items can be dropped.
|
|
10
|
-
*
|
|
11
|
-
* @param fn - Function that returns drop areas based on dragged items
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* dropArea.add((items) => {
|
|
16
|
-
* // Only provide drop area for text blocks
|
|
17
|
-
* if (items.every(item => item.bundle === 'text')) {
|
|
18
|
-
* return {
|
|
19
|
-
* id: 'custom-area',
|
|
20
|
-
* label: 'Text Only Area',
|
|
21
|
-
* accepts: (item) => item.bundle === 'text',
|
|
22
|
-
* }
|
|
23
|
-
* }
|
|
24
|
-
* })
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
add: (fn: DropAreaProviderFunction) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Unregister a drop area provider function.
|
|
30
|
-
*
|
|
31
|
-
* Removes a previously registered function so it no longer provides drop areas.
|
|
32
|
-
*
|
|
33
|
-
* @param fn - The function to remove (must be the same reference used in add)
|
|
34
|
-
*/
|
|
35
|
-
remove: (fn: DropAreaProviderFunction) => void;
|
|
36
|
-
/**
|
|
37
|
-
* Get all drop areas from all registered providers.
|
|
38
|
-
*
|
|
39
|
-
* Calls all registered provider functions with the dragged items,
|
|
40
|
-
* flattens the results, and filters out undefined values.
|
|
41
|
-
*
|
|
42
|
-
* @param items - The currently dragged items
|
|
43
|
-
* @returns Array of all available drop areas for these items
|
|
44
|
-
*/
|
|
45
|
-
getDropAreas: (items: DraggableItem[]) => DropArea[];
|
|
46
|
-
};
|
|
47
|
-
export default function (): DropAreaProvider;
|
|
48
|
-
export {};
|