@blokkli/editor 2.0.0-alpha.51 → 2.0.0-alpha.53
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/chunks/tailwindConfig.mjs +3 -3
- package/dist/global/types/blockOptions.d.ts +18 -2
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +281 -18
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +1 -0
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.d.vue.ts +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.vue +14 -49
- package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.vue.d.ts +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.d.vue.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.vue +102 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.vue.d.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +8 -5
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.d.vue.ts +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue +9 -5
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue.d.ts +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.d.vue.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +16 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue.d.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +29 -0
- package/dist/modules/agent/runtime/app/features/agent/types.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +3 -1
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +8 -1
- package/dist/modules/charts/index.d.mts +1 -1
- package/dist/modules/charts/index.mjs +2 -3
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +1 -1
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +16 -0
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +9 -0
- package/dist/modules/drupal/graphql/features/agent.graphql +20 -0
- package/dist/modules/drupal/graphql/features/publishNew.graphql +14 -0
- package/dist/modules/drupal/graphql/features/referenced-entities.graphql +21 -0
- package/dist/modules/drupal/graphql/features/textFieldValues.graphql +20 -0
- package/dist/modules/drupal/graphql/features/workspace.graphql +23 -0
- package/dist/modules/drupal/graphql/mutations/bulk_translate_field_values.graphql +19 -0
- package/dist/modules/drupal/graphql/mutations/clear_outdated_translation.graphql +15 -0
- package/dist/modules/drupal/graphql/mutations/ignore_analyze.graphql +15 -0
- package/dist/modules/drupal/graphql/mutations/request_translation.graphql +10 -0
- package/dist/modules/drupal/graphql/mutations/unignore_analyze.graphql +15 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/index.mjs +16 -0
- package/dist/modules/drupal/runtime/adapter/index.js +180 -11
- package/dist/modules/iframes/index.d.mts +31 -0
- package/dist/modules/iframes/index.mjs +52 -0
- package/dist/modules/iframes/runtime/components/BlokkliIframe/index.d.vue.ts +18 -0
- package/dist/modules/iframes/runtime/components/BlokkliIframe/index.vue +61 -0
- package/dist/modules/iframes/runtime/components/BlokkliIframe/index.vue.d.ts +18 -0
- package/dist/modules/iframes/runtime/components/index.d.ts +1 -0
- package/dist/modules/iframes/runtime/components/index.js +1 -0
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.d.vue.ts +12 -0
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.vue +220 -0
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.vue.d.ts +12 -0
- package/dist/modules/iframes/runtime/types.d.ts +10 -0
- package/dist/modules/index.d.mts +1 -1
- package/dist/modules/table-of-contents/index.d.mts +1 -1
- package/dist/runtime/components/Blocks/NotImplemented/index.vue +57 -0
- package/dist/runtime/components/BlokkliEditable.d.vue.ts +2 -1
- package/dist/runtime/components/BlokkliEditable.vue +58 -42
- package/dist/runtime/components/BlokkliEditable.vue.d.ts +2 -1
- package/dist/runtime/components/BlokkliItem.d.vue.ts +1 -1
- package/dist/runtime/components/BlokkliItem.vue.d.ts +1 -1
- package/dist/runtime/editor/adapter/index.d.ts +8 -1
- package/dist/runtime/editor/components/Actions/Interactions/index.vue +77 -17
- package/dist/runtime/editor/components/Actions/{ItemDropdown.vue → ItemDropdown/index.vue} +9 -10
- package/dist/runtime/editor/components/Actions/index.vue +586 -23
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +1 -0
- package/dist/runtime/editor/components/AppMenu/MenuButton.vue +185 -1
- package/dist/runtime/editor/components/AppMenu/index.vue +24 -10
- package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +6 -2
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +223 -3
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +6 -2
- package/dist/runtime/editor/components/AutoHeight/index.vue +23 -0
- package/dist/runtime/editor/components/Banner/Inner.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Banner/Inner.vue +32 -0
- package/dist/runtime/editor/components/Banner/Inner.vue.d.ts +30 -0
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +3 -13
- package/dist/runtime/editor/components/Banner/index.vue +2 -14
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +3 -13
- package/dist/runtime/editor/components/BetaIndicator/index.d.vue.ts +6 -0
- package/dist/runtime/editor/components/BetaIndicator/index.vue +16 -0
- package/dist/runtime/editor/components/BetaIndicator/index.vue.d.ts +6 -0
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue +51 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue +27 -1
- package/dist/runtime/editor/components/BlockProxy/index.vue +148 -1
- package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +59 -0
- package/dist/runtime/editor/components/BundleSelector/index.vue +170 -20
- package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -0
- package/dist/runtime/editor/components/Dialog/index.vue +341 -0
- package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +117 -0
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +224 -28
- package/dist/runtime/editor/components/DiffViewer/DiffValue.d.vue.ts +1 -0
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue +5 -1
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue.d.ts +1 -0
- package/dist/runtime/editor/components/DiffViewer/State.vue +319 -0
- package/dist/runtime/editor/components/DraggableList.vue +103 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +84 -0
- package/dist/runtime/editor/components/EditProvider.vue +72 -15
- package/dist/runtime/editor/components/FileDropHandler/index.d.vue.ts +23 -0
- package/dist/runtime/editor/components/FileDropHandler/index.vue +108 -0
- package/dist/runtime/editor/components/FileDropHandler/index.vue.d.ts +23 -0
- package/dist/runtime/editor/components/FlexTextarea/index.vue +4 -2
- package/dist/runtime/editor/components/Form/Datepicker/index.vue +149 -0
- package/dist/runtime/editor/components/Form/Toggle/index.vue +205 -1
- package/dist/runtime/editor/components/FormOverlay/index.vue +90 -0
- package/dist/runtime/editor/components/Icon/index.vue +6 -0
- package/dist/runtime/editor/components/Indicators/index.vue +161 -0
- package/dist/runtime/editor/components/InfoBox/index.vue +65 -0
- package/dist/runtime/editor/components/Konami/index.vue +119 -0
- package/dist/runtime/editor/components/Loading/index.d.vue.ts +6 -3
- package/dist/runtime/editor/components/Loading/index.vue +10 -5
- package/dist/runtime/editor/components/Loading/index.vue.d.ts +6 -3
- package/dist/runtime/editor/components/Messages/index.vue +131 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +246 -12
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/NotEditStateInfo/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/NotEditStateInfo/index.vue +19 -0
- package/dist/runtime/editor/components/NotEditStateInfo/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Overlay/index.vue +84 -0
- package/dist/runtime/editor/components/Pagination/index.vue +41 -0
- package/dist/runtime/editor/components/PluginConfigForm/index.vue +23 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/FilterSelect/index.vue +429 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/index.d.vue.ts +22 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/index.vue +150 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/index.vue.d.ts +22 -0
- package/dist/runtime/editor/components/Popup/index.vue +77 -2
- package/dist/runtime/editor/components/PreviewProvider.vue +7 -0
- package/dist/runtime/editor/components/Resizable/index.vue +90 -1
- package/dist/runtime/editor/components/ScaleToFit/index.vue +30 -1
- package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +43 -0
- package/dist/runtime/editor/components/SearchOverlay/index.vue +264 -0
- package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +43 -0
- package/dist/runtime/editor/components/StatusIcon/index.vue +104 -0
- package/dist/runtime/editor/components/StatusIndicator/index.d.vue.ts +9 -0
- package/dist/runtime/editor/components/StatusIndicator/index.vue +16 -0
- package/dist/runtime/editor/components/StatusIndicator/index.vue.d.ts +9 -0
- package/dist/runtime/editor/components/SystemRequirements/index.vue +57 -0
- package/dist/runtime/editor/components/Tabs/index.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Tabs/index.vue +32 -0
- package/dist/runtime/editor/components/Tabs/index.vue.d.ts +30 -0
- package/dist/runtime/editor/components/Toolbar/index.vue +214 -3
- package/dist/runtime/editor/components/Tooltip/Context.d.vue.ts +7 -0
- package/dist/runtime/editor/components/Tooltip/Context.vue +13 -0
- package/dist/runtime/editor/components/Tooltip/Context.vue.d.ts +7 -0
- package/dist/runtime/editor/components/Tooltip/Status.d.vue.ts +8 -0
- package/dist/runtime/editor/components/Tooltip/Status.vue +27 -0
- package/dist/runtime/editor/components/Tooltip/Status.vue.d.ts +8 -0
- package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +27 -0
- package/dist/runtime/editor/components/Tooltip/index.vue +40 -0
- package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +27 -0
- package/dist/runtime/editor/components/index.d.ts +59 -49
- package/dist/runtime/editor/components/index.js +59 -98
- package/dist/runtime/editor/composables/defineHighlight.d.ts +2 -0
- package/dist/runtime/editor/composables/defineHighlight.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/useBlockRegistration.js +8 -0
- package/dist/runtime/editor/composables/useStickyToolbar.d.ts +1 -0
- package/dist/runtime/editor/composables/useStickyToolbar.js +16 -0
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +10 -0
- package/dist/runtime/editor/features/add-list/Help/index.vue +193 -0
- package/dist/runtime/editor/features/add-list/index.vue +441 -0
- package/dist/runtime/editor/features/analyze/Ignored/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/analyze/Ignored/index.vue +35 -0
- package/dist/runtime/editor/features/analyze/Ignored/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/analyze/Main.vue +148 -24
- package/dist/runtime/editor/features/analyze/Results/Results.d.vue.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/Results.vue +0 -2
- package/dist/runtime/editor/features/analyze/Results/Results.vue.d.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.d.vue.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue +1 -2
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue.d.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.d.vue.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue +11 -8
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue.d.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.d.vue.ts +3 -10
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue +63 -25
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue.d.ts +3 -10
- package/dist/runtime/editor/features/analyze/analyzers/altText.js +2 -0
- package/dist/runtime/editor/features/analyze/analyzers/headingStructure.js +3 -0
- package/dist/runtime/editor/features/analyze/analyzers/helpers/hashString.d.ts +7 -0
- package/dist/runtime/editor/features/analyze/analyzers/helpers/hashString.js +8 -0
- package/dist/runtime/editor/features/analyze/analyzers/readability.js +6 -12
- package/dist/runtime/editor/features/analyze/analyzers/types.d.ts +20 -0
- package/dist/runtime/editor/features/analyze/index.vue +458 -0
- package/dist/runtime/editor/features/analyze/types.d.ts +12 -0
- package/dist/runtime/editor/features/artboard/Overview/index.vue +37 -4
- package/dist/runtime/editor/features/artboard/Renderer.vue +79 -9
- package/dist/runtime/editor/features/artboard/Scrollbar/index.vue +84 -0
- package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/block-scheduler/index.vue +114 -0
- package/dist/runtime/editor/features/breadcrumbs/index.vue +150 -0
- package/dist/runtime/editor/features/changelog/Dialog/index.vue +62 -7
- package/dist/runtime/editor/features/changelog/changelog.json +9 -1
- package/dist/runtime/editor/features/clipboard/index.vue +153 -1
- package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +39 -16
- package/dist/runtime/editor/features/command-palette/Palette/index.vue +24 -130
- package/dist/runtime/editor/features/comments/index.vue +235 -0
- package/dist/runtime/editor/features/complex-options/index.vue +4 -1
- package/dist/runtime/editor/features/debug/Main.vue +1 -1
- package/dist/runtime/editor/features/debug/Section/Features.vue +2 -4
- package/dist/runtime/editor/features/debug/index.vue +168 -0
- package/dist/runtime/editor/features/dev-mode/index.vue +92 -27
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/dragging-overlay/index.vue +330 -0
- package/dist/runtime/editor/features/edit/index.vue +15 -17
- package/dist/runtime/editor/features/edit-form/Frame/index.vue +21 -4
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.d.vue.ts +9 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +32 -3
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue.d.ts +9 -1
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +77 -0
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +55 -56
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +416 -8
- package/dist/runtime/editor/features/editable-mask/index.vue +9 -0
- package/dist/runtime/editor/features/entity-title/index.vue +40 -56
- package/dist/runtime/editor/features/fragments/Dialog/index.vue +90 -0
- package/dist/runtime/editor/features/help/Shortcuts/index.vue +71 -0
- package/dist/runtime/editor/features/help/index.vue +17 -0
- package/dist/runtime/editor/features/highlights/Renderer/fragment.glsl +89 -0
- package/dist/runtime/editor/features/highlights/Renderer/index.vue +408 -0
- package/dist/runtime/editor/features/highlights/Renderer/vertex.glsl +87 -0
- package/dist/runtime/editor/features/highlights/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/highlights/index.vue +20 -0
- package/dist/runtime/editor/features/highlights/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/history/List/index.vue +209 -0
- package/dist/runtime/editor/features/history/index.vue +0 -1
- package/dist/runtime/editor/features/hover/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/hover/Renderer/vertex.glsl +1 -1
- package/dist/runtime/editor/features/import-existing/Dialog/index.vue +18 -0
- package/dist/runtime/editor/features/media-library/Library/index.vue +10 -30
- package/dist/runtime/editor/features/media-library/index.vue +331 -0
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +6 -2
- package/dist/runtime/editor/features/options/Form/Item.vue +21 -18
- package/dist/runtime/editor/features/options/Form/Radios/index.d.vue.ts +6 -0
- package/dist/runtime/editor/features/options/Form/Radios/index.vue +25 -6
- package/dist/runtime/editor/features/options/Form/Radios/index.vue.d.ts +6 -0
- package/dist/runtime/editor/features/options/Form/index.vue +1 -4
- package/dist/runtime/editor/features/options/index.vue +729 -0
- package/dist/runtime/editor/features/ownership/Banner/index.vue +9 -8
- package/dist/runtime/editor/features/ownership/index.vue +1 -1
- package/dist/runtime/editor/features/preview-grant/QrCode/index.vue +8 -3
- package/dist/runtime/editor/features/publish/Dialog/Item.vue +18 -20
- package/dist/runtime/editor/features/publish/Dialog/index.vue +5 -1
- package/dist/runtime/editor/features/publish/index.vue +835 -0
- package/dist/runtime/editor/features/publish/types.d.ts +5 -1
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.d.vue.ts +4 -0
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue +81 -0
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue.d.ts +4 -0
- package/dist/runtime/editor/features/referenced-entities/List/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/referenced-entities/List/index.vue +78 -0
- package/dist/runtime/editor/features/referenced-entities/List/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/referenced-entities/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/referenced-entities/index.vue +36 -0
- package/dist/runtime/editor/features/referenced-entities/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/referenced-entities/types.d.ts +13 -0
- package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +188 -0
- package/dist/runtime/editor/features/search/Overlay/Results/Page/index.vue +1 -1
- package/dist/runtime/editor/features/search/index.vue +511 -0
- package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +58 -0
- package/dist/runtime/editor/features/selection/index.vue +47 -15
- package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +23 -0
- package/dist/runtime/editor/features/settings/Dialog/index.vue +5 -2
- package/dist/runtime/editor/features/settings/index.vue +152 -0
- package/dist/runtime/editor/features/structure/List/Item/index.vue +7 -0
- package/dist/runtime/editor/features/structure/index.vue +178 -0
- package/dist/runtime/editor/features/templates/ManageDialog/Item.vue +3 -3
- package/dist/runtime/editor/features/templates/ManageDialog/index.vue +24 -3
- package/dist/runtime/editor/features/theme/index.vue +94 -0
- package/dist/runtime/editor/features/touch-action-bar/Bar/index.vue +34 -0
- package/dist/runtime/editor/features/tour/Overlay/index.vue +243 -13
- package/dist/runtime/editor/features/transform/Dialog/index.vue +132 -1
- package/dist/runtime/editor/features/translations/Banner/index.d.vue.ts +14 -1
- package/dist/runtime/editor/features/translations/Banner/index.vue +139 -12
- package/dist/runtime/editor/features/translations/Banner/index.vue.d.ts +14 -1
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.vue +272 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.d.vue.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +382 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue.d.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/csv.d.ts +22 -0
- package/dist/runtime/editor/features/translations/CsvDialog/csv.js +50 -0
- package/dist/runtime/editor/features/translations/CsvDialog/index.d.vue.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/index.vue +37 -0
- package/dist/runtime/editor/features/translations/CsvDialog/index.vue.d.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/po.d.ts +7 -0
- package/dist/runtime/editor/features/translations/CsvDialog/po.js +36 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.d.vue.ts +37 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue +102 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue.d.ts +37 -0
- package/dist/runtime/editor/features/translations/TranslateDialog/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +294 -0
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/translations/index.vue +276 -6
- package/dist/runtime/editor/features/translations/types.d.ts +47 -0
- package/dist/runtime/editor/features/validations/Overlay/index.vue +130 -0
- package/dist/runtime/editor/features/validations/index.vue +41 -0
- package/dist/runtime/editor/features/{assistant → workspace}/Overlay/index.d.vue.ts +2 -4
- package/dist/runtime/editor/features/workspace/Overlay/index.vue +177 -0
- package/dist/runtime/editor/features/{assistant → workspace}/Overlay/index.vue.d.ts +2 -4
- package/dist/runtime/editor/features/workspace/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/workspace/index.vue +46 -0
- package/dist/runtime/editor/features/workspace/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/workspace/types.d.ts +59 -0
- package/dist/runtime/editor/features/workspace/types.js +0 -0
- package/dist/runtime/editor/icons/svg/spinner.svg +2 -2
- package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +21 -7
- package/dist/runtime/editor/plugins/ContextMenu/index.vue +4 -0
- package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +9 -2
- package/dist/runtime/editor/plugins/ItemAction/index.vue +26 -16
- package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +9 -2
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue +24 -26
- package/dist/runtime/editor/plugins/Sidebar/index.vue +612 -27
- package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +13 -84
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +36 -22
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +13 -84
- package/dist/runtime/editor/plugins/ViewOption/index.vue +13 -14
- package/dist/runtime/editor/providers/blocks.js +1 -0
- package/dist/runtime/editor/providers/cache.d.ts +23 -0
- package/dist/runtime/editor/providers/cache.js +29 -0
- package/dist/runtime/editor/providers/directive.d.ts +25 -0
- package/dist/runtime/editor/providers/directive.js +20 -0
- package/dist/runtime/editor/providers/fieldValue.d.ts +5 -5
- package/dist/runtime/editor/providers/fieldValue.js +8 -7
- package/dist/runtime/editor/providers/plugin.d.ts +14 -0
- package/dist/runtime/editor/providers/plugin.js +9 -0
- package/dist/runtime/editor/providers/readability.js +1 -1
- package/dist/runtime/editor/providers/selection.js +1 -1
- package/dist/runtime/editor/providers/state.d.ts +1 -0
- package/dist/runtime/editor/providers/state.js +1 -0
- package/dist/runtime/editor/providers/texts.js +11 -1
- package/dist/runtime/editor/providers/ui.d.ts +11 -0
- package/dist/runtime/editor/providers/ui.js +5 -1
- package/dist/runtime/editor/translations/de.json +316 -56
- package/dist/runtime/editor/translations/fr.json +310 -50
- package/dist/runtime/editor/translations/gsw_CH.json +311 -51
- package/dist/runtime/editor/translations/it.json +310 -50
- package/dist/runtime/editor/types/app.d.ts +2 -0
- package/dist/runtime/editor/types/definitions.d.ts +8 -0
- package/dist/runtime/editor/types/field.d.ts +1 -0
- package/dist/runtime/editor/types/state.d.ts +10 -0
- package/dist/runtime/editor/types/ui.d.ts +3 -1
- package/dist/runtime/helpers/tw.d.ts +15 -0
- package/dist/runtime/helpers/tw.js +3 -0
- package/dist/runtime/types/field.d.ts +1 -0
- package/dist/shared/{editor.DsGJIlGn.d.mts → editor.BTOBvmaz.d.mts} +20 -3
- package/dist/types.d.mts +1 -1
- package/package.json +16 -3
- package/dist/runtime/editor/features/analyze/Renderer/fragment.glsl +0 -74
- package/dist/runtime/editor/features/analyze/Renderer/index.d.vue.ts +0 -24
- package/dist/runtime/editor/features/analyze/Renderer/index.vue +0 -330
- package/dist/runtime/editor/features/analyze/Renderer/index.vue.d.ts +0 -24
- package/dist/runtime/editor/features/analyze/Renderer/vertex.glsl +0 -94
- package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.d.vue.ts +0 -7
- package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.vue +0 -17
- package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.vue.d.ts +0 -7
- package/dist/runtime/editor/features/assistant/Overlay/index.vue +0 -108
- package/dist/runtime/editor/features/assistant/docs.md +0 -7
- package/dist/runtime/editor/features/assistant/index.vue +0 -66
- package/dist/runtime/editor/features/assistant/types.d.ts +0 -37
- package/dist/runtime/editor/features/media-library/Library/FilterSelect/index.vue +0 -168
- package/dist/runtime/editor/providers/fieldValueAdapterTypes.d.ts +0 -13
- /package/dist/{runtime/editor/features/assistant → modules/iframes/runtime}/types.js +0 -0
- /package/dist/runtime/editor/components/Actions/{ItemDropdown.d.vue.ts → ItemDropdown/index.d.vue.ts} +0 -0
- /package/dist/runtime/editor/components/Actions/{ItemDropdown.vue.d.ts → ItemDropdown/index.vue.d.ts} +0 -0
- /package/dist/runtime/editor/{features/media-library/Library → components/PluginConfigFormInline}/FilterSelect/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/{features/media-library/Library → components/PluginConfigFormInline}/FilterSelect/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/{assistant → highlights/Renderer}/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/{assistant → highlights/Renderer}/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/{providers/fieldValueAdapterTypes.js → features/referenced-entities/types.js} +0 -0
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bk-assistant-result-markup">
|
|
3
|
-
<div class="ck-content" v-html="markup" />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script setup>
|
|
8
|
-
defineProps({
|
|
9
|
-
markup: { type: String, required: true }
|
|
10
|
-
});
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
export default {
|
|
15
|
-
name: "AssistantResultMarkup"
|
|
16
|
-
};
|
|
17
|
-
</script>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
|
-
declare const __VLS_export: import("vue").DefineComponent<{
|
|
4
|
-
markup: string;
|
|
5
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
-
markup: string;
|
|
7
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FormOverlay
|
|
3
|
-
id="assistant"
|
|
4
|
-
:title="$t('assistantDialogTitle', 'Generate content with AI assistant')"
|
|
5
|
-
icon="robot"
|
|
6
|
-
@close="onClose"
|
|
7
|
-
>
|
|
8
|
-
<div class="bk-assistant-form">
|
|
9
|
-
<div class="bk">
|
|
10
|
-
<p class="bk-lead">
|
|
11
|
-
{{
|
|
12
|
-
$t(
|
|
13
|
-
"assistantDialogLead",
|
|
14
|
-
"Please enter what you'd like the assistant to generate."
|
|
15
|
-
)
|
|
16
|
-
}}
|
|
17
|
-
</p>
|
|
18
|
-
<label class="bk-form-label" for="assistant_prompt">
|
|
19
|
-
{{ $t("assistantPromptLabel", "Prompt") }}
|
|
20
|
-
</label>
|
|
21
|
-
<div class="bk-assistant-form-textarea">
|
|
22
|
-
<textarea
|
|
23
|
-
id="assistant_prompt"
|
|
24
|
-
v-model="prompt"
|
|
25
|
-
type="text"
|
|
26
|
-
class="bk-form-input"
|
|
27
|
-
rows="10"
|
|
28
|
-
:placeholder="
|
|
29
|
-
$t(
|
|
30
|
-
'assistantPromptPlaceholder',
|
|
31
|
-
'Generate content for a page about how taxes work in Switzerland'
|
|
32
|
-
)
|
|
33
|
-
"
|
|
34
|
-
required
|
|
35
|
-
/>
|
|
36
|
-
<button
|
|
37
|
-
class="bk-button bk-is-small"
|
|
38
|
-
:class="{ 'bk-is-loading': isGenerating }"
|
|
39
|
-
@click.prevent="onGenerate"
|
|
40
|
-
>
|
|
41
|
-
Generate
|
|
42
|
-
</button>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="bk-assistant-form-result">
|
|
46
|
-
<div class="bk-form-label">Result</div>
|
|
47
|
-
<div>
|
|
48
|
-
<template v-if="result">
|
|
49
|
-
<ResultMarkup
|
|
50
|
-
v-if="result.type === 'markup'"
|
|
51
|
-
:markup="result.content"
|
|
52
|
-
/>
|
|
53
|
-
</template>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
<template #footer>
|
|
58
|
-
<button class="bk-button bk-is-primary" @click="onSubmit">
|
|
59
|
-
{{ $t("assistantDialogSubmit", "Create blocks") }}
|
|
60
|
-
</button>
|
|
61
|
-
</template>
|
|
62
|
-
</FormOverlay>
|
|
63
|
-
</template>
|
|
64
|
-
|
|
65
|
-
<script setup>
|
|
66
|
-
import { FormOverlay } from "#blokkli/editor/components";
|
|
67
|
-
import { useBlokkli, ref } from "#imports";
|
|
68
|
-
import ResultMarkup from "./ResultMarkup/index.vue";
|
|
69
|
-
const { $t, adapter } = useBlokkli();
|
|
70
|
-
const emit = defineEmits(["close", "submit"]);
|
|
71
|
-
const prompt = ref("");
|
|
72
|
-
const isGenerating = ref(false);
|
|
73
|
-
const result = ref({
|
|
74
|
-
type: "markup",
|
|
75
|
-
content: ""
|
|
76
|
-
});
|
|
77
|
-
const onSubmit = () => {
|
|
78
|
-
if (!result.value) {
|
|
79
|
-
emit("close");
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
emit("submit", result.value);
|
|
83
|
-
};
|
|
84
|
-
const onClose = () => {
|
|
85
|
-
emit("close");
|
|
86
|
-
};
|
|
87
|
-
const onGenerate = async () => {
|
|
88
|
-
if (isGenerating.value) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
isGenerating.value = true;
|
|
92
|
-
try {
|
|
93
|
-
const fetched = await adapter.assistantGetResults({
|
|
94
|
-
type: "create",
|
|
95
|
-
prompt: prompt.value
|
|
96
|
-
});
|
|
97
|
-
result.value = fetched || null;
|
|
98
|
-
} catch (_e) {
|
|
99
|
-
}
|
|
100
|
-
isGenerating.value = false;
|
|
101
|
-
};
|
|
102
|
-
</script>
|
|
103
|
-
|
|
104
|
-
<script>
|
|
105
|
-
export default {
|
|
106
|
-
name: "AssistantOverlay"
|
|
107
|
-
};
|
|
108
|
-
</script>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
## Overview
|
|
2
|
-
|
|
3
|
-
The `assistant` feature implements an add action that can be dragged anywhere on
|
|
4
|
-
the page. Once placed, a modal overlay is shown with a basic prompt textarea,
|
|
5
|
-
where the user can enter a prompt. Clicking on _Generate_ calls the
|
|
6
|
-
[adapter.assistantGetResults] method which is expected to return the content
|
|
7
|
-
that should be generated.
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Teleport :to="ui.mainLayoutElement.value">
|
|
3
|
-
<BlokkliTransition name="slide-in">
|
|
4
|
-
<Overlay v-if="placedAction" @close="onClose" @submit="onSubmit" />
|
|
5
|
-
</BlokkliTransition>
|
|
6
|
-
</Teleport>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script setup>
|
|
10
|
-
import { useBlokkli, defineBlokkliFeature, ref } from "#imports";
|
|
11
|
-
import { BlokkliTransition } from "#blokkli/editor/components";
|
|
12
|
-
import Overlay from "./Overlay/index.vue";
|
|
13
|
-
import { defineAddAction } from "#blokkli/editor/composables";
|
|
14
|
-
const { adapter } = defineBlokkliFeature({
|
|
15
|
-
id: "assistant",
|
|
16
|
-
icon: "robot",
|
|
17
|
-
label: "Assistant",
|
|
18
|
-
description: "Provides a dynamic add block action to add one or more blocks generated by an AI assistant.",
|
|
19
|
-
requiredAdapterMethods: [
|
|
20
|
-
"assistantGetResults",
|
|
21
|
-
"assistantAddBlockFromResult"
|
|
22
|
-
],
|
|
23
|
-
screenshot: "feature-assistant.jpg",
|
|
24
|
-
dependencies: ["add-list"]
|
|
25
|
-
});
|
|
26
|
-
const { state, $t, ui } = useBlokkli();
|
|
27
|
-
const placedAction = ref(null);
|
|
28
|
-
const onClose = () => {
|
|
29
|
-
placedAction.value = null;
|
|
30
|
-
};
|
|
31
|
-
const onSubmit = async (result) => {
|
|
32
|
-
if (adapter.assistantAddBlockFromResult && placedAction.value) {
|
|
33
|
-
await state.mutateWithLoadingState(
|
|
34
|
-
() => adapter.assistantAddBlockFromResult({
|
|
35
|
-
result,
|
|
36
|
-
host: placedAction.value.host,
|
|
37
|
-
preceedingUuid: placedAction.value.preceedingUuid
|
|
38
|
-
}),
|
|
39
|
-
$t("assistantAddResultError", "Failed to add block from assistant.")
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
onClose();
|
|
43
|
-
};
|
|
44
|
-
defineAddAction(() => {
|
|
45
|
-
return {
|
|
46
|
-
id: "assistant",
|
|
47
|
-
title: $t("assistantAddAction", "Add with AI Assistant"),
|
|
48
|
-
description: $t(
|
|
49
|
-
"assistantAddActionDescription",
|
|
50
|
-
"Add content using an AI assistant."
|
|
51
|
-
),
|
|
52
|
-
icon: "robot",
|
|
53
|
-
color: "rose",
|
|
54
|
-
weight: 0,
|
|
55
|
-
callback: (data) => {
|
|
56
|
-
placedAction.value = data;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<script>
|
|
63
|
-
export default {
|
|
64
|
-
name: "Assistant"
|
|
65
|
-
};
|
|
66
|
-
</script>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { BlokkliItemHost } from '#blokkli/editor/types/field';
|
|
2
|
-
export type AssistantResultMarkup = {
|
|
3
|
-
type: 'markup';
|
|
4
|
-
content: string;
|
|
5
|
-
};
|
|
6
|
-
export type AssistantResult = AssistantResultMarkup;
|
|
7
|
-
type AdapterAssistantAddBlockFromResult = {
|
|
8
|
-
result: AssistantResult;
|
|
9
|
-
host: BlokkliItemHost;
|
|
10
|
-
preceedingUuid: string | null;
|
|
11
|
-
};
|
|
12
|
-
type AdapterAssistantGetResultsCreate = {
|
|
13
|
-
type: 'create';
|
|
14
|
-
prompt: string;
|
|
15
|
-
};
|
|
16
|
-
type AdapterAssistantGetResultsEdit = {
|
|
17
|
-
type: 'edit';
|
|
18
|
-
/**
|
|
19
|
-
* The text that should be edited.
|
|
20
|
-
*/
|
|
21
|
-
text: string;
|
|
22
|
-
prompt: string;
|
|
23
|
-
};
|
|
24
|
-
type AdapterAssistantGetResults = AdapterAssistantGetResultsCreate | AdapterAssistantGetResultsEdit;
|
|
25
|
-
declare module '#blokkli/editor/adapter' {
|
|
26
|
-
interface BlokkliAdapter<T> {
|
|
27
|
-
/**
|
|
28
|
-
* Get the result for an assistant query.
|
|
29
|
-
*/
|
|
30
|
-
assistantGetResults?: (e: AdapterAssistantGetResults) => Promise<AssistantResult | undefined>;
|
|
31
|
-
/**
|
|
32
|
-
* Add one or more blocks from the given assistant result.
|
|
33
|
-
*/
|
|
34
|
-
assistantAddBlockFromResult?: (e: AdapterAssistantAddBlockFromResult) => Promise<MutationResponseLike<T>> | undefined;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
ref="root"
|
|
4
|
-
class="bk-media-library-filter-select"
|
|
5
|
-
:class="{ 'bk-is-open': isOpen }"
|
|
6
|
-
@keydown.stop="onKeydown"
|
|
7
|
-
>
|
|
8
|
-
<button type="button" @click="toggle">
|
|
9
|
-
<div>
|
|
10
|
-
<span class="bk-media-library-filter-select-label">{{ label }}</span>
|
|
11
|
-
<span
|
|
12
|
-
v-if="selectedLabel"
|
|
13
|
-
class="bk-media-library-filter-select-value"
|
|
14
|
-
>{{ selectedLabel }}</span
|
|
15
|
-
>
|
|
16
|
-
</div>
|
|
17
|
-
<Icon name="bk_mdi_arrow_drop_down" />
|
|
18
|
-
</button>
|
|
19
|
-
<div
|
|
20
|
-
v-if="isOpen"
|
|
21
|
-
class="bk-media-library-filter-select-dropdown bk-scrollbar-dark"
|
|
22
|
-
>
|
|
23
|
-
<div
|
|
24
|
-
v-if="options.length > 10"
|
|
25
|
-
class="bk-media-library-filter-select-search"
|
|
26
|
-
>
|
|
27
|
-
<input
|
|
28
|
-
ref="searchInput"
|
|
29
|
-
v-model="search"
|
|
30
|
-
class="bk-form-input bk-is-small"
|
|
31
|
-
type="text"
|
|
32
|
-
:placeholder="$t('filterSelectSearch', 'Search...')"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
<ul ref="listEl">
|
|
36
|
-
<li v-for="(option, index) in filteredOptions" :key="option.value">
|
|
37
|
-
<button
|
|
38
|
-
type="button"
|
|
39
|
-
:class="{
|
|
40
|
-
'bk-is-active': option.value === modelValue,
|
|
41
|
-
'bk-is-highlighted': index === highlightedIndex
|
|
42
|
-
}"
|
|
43
|
-
@click="select(option.value)"
|
|
44
|
-
@mouseenter="highlightedIndex = index"
|
|
45
|
-
>
|
|
46
|
-
{{ option.label }}
|
|
47
|
-
</button>
|
|
48
|
-
</li>
|
|
49
|
-
<li
|
|
50
|
-
v-if="!filteredOptions.length"
|
|
51
|
-
class="bk-media-library-filter-select-empty"
|
|
52
|
-
>
|
|
53
|
-
{{ $t("filterSelectNoResults", "No results") }}
|
|
54
|
-
</li>
|
|
55
|
-
</ul>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</template>
|
|
59
|
-
|
|
60
|
-
<script setup>
|
|
61
|
-
import {
|
|
62
|
-
ref,
|
|
63
|
-
computed,
|
|
64
|
-
nextTick,
|
|
65
|
-
watch,
|
|
66
|
-
useTemplateRef,
|
|
67
|
-
onBeforeUnmount,
|
|
68
|
-
useBlokkli
|
|
69
|
-
} from "#imports";
|
|
70
|
-
import { Icon } from "#blokkli/editor/components";
|
|
71
|
-
const { $t } = useBlokkli();
|
|
72
|
-
const props = defineProps({
|
|
73
|
-
label: { type: String, required: true },
|
|
74
|
-
options: { type: Array, required: true },
|
|
75
|
-
modelValue: { type: String, required: false }
|
|
76
|
-
});
|
|
77
|
-
const emit = defineEmits(["update:modelValue"]);
|
|
78
|
-
const isOpen = ref(false);
|
|
79
|
-
const search = ref("");
|
|
80
|
-
const highlightedIndex = ref(-1);
|
|
81
|
-
const searchInput = useTemplateRef("searchInput");
|
|
82
|
-
const root = useTemplateRef("root");
|
|
83
|
-
const listEl = useTemplateRef("listEl");
|
|
84
|
-
const selectedLabel = computed(() => {
|
|
85
|
-
const option = props.options.find((o) => o.value === props.modelValue);
|
|
86
|
-
return option?.label ?? "";
|
|
87
|
-
});
|
|
88
|
-
const filteredOptions = computed(() => {
|
|
89
|
-
if (!search.value) {
|
|
90
|
-
return props.options;
|
|
91
|
-
}
|
|
92
|
-
const term = search.value.toLowerCase();
|
|
93
|
-
return props.options.filter((o) => o.label.toLowerCase().includes(term));
|
|
94
|
-
});
|
|
95
|
-
watch(filteredOptions, () => {
|
|
96
|
-
highlightedIndex.value = -1;
|
|
97
|
-
});
|
|
98
|
-
function scrollToHighlighted() {
|
|
99
|
-
if (!listEl.value || highlightedIndex.value < 0) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
const buttons = listEl.value.querySelectorAll("button");
|
|
103
|
-
buttons[highlightedIndex.value]?.scrollIntoView({ block: "nearest" });
|
|
104
|
-
}
|
|
105
|
-
function toggle() {
|
|
106
|
-
isOpen.value = !isOpen.value;
|
|
107
|
-
if (isOpen.value) {
|
|
108
|
-
search.value = "";
|
|
109
|
-
highlightedIndex.value = -1;
|
|
110
|
-
nextTick(() => {
|
|
111
|
-
searchInput.value?.focus();
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
function select(value) {
|
|
116
|
-
emit("update:modelValue", value);
|
|
117
|
-
isOpen.value = false;
|
|
118
|
-
}
|
|
119
|
-
function onKeydown(e) {
|
|
120
|
-
if (!isOpen.value) {
|
|
121
|
-
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
122
|
-
e.preventDefault();
|
|
123
|
-
toggle();
|
|
124
|
-
}
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
const options = filteredOptions.value;
|
|
128
|
-
switch (e.key) {
|
|
129
|
-
case "ArrowDown":
|
|
130
|
-
e.preventDefault();
|
|
131
|
-
highlightedIndex.value = highlightedIndex.value < options.length - 1 ? highlightedIndex.value + 1 : 0;
|
|
132
|
-
nextTick(scrollToHighlighted);
|
|
133
|
-
break;
|
|
134
|
-
case "ArrowUp":
|
|
135
|
-
e.preventDefault();
|
|
136
|
-
highlightedIndex.value = highlightedIndex.value > 0 ? highlightedIndex.value - 1 : options.length - 1;
|
|
137
|
-
nextTick(scrollToHighlighted);
|
|
138
|
-
break;
|
|
139
|
-
case "Enter": {
|
|
140
|
-
e.preventDefault();
|
|
141
|
-
const option = options[highlightedIndex.value];
|
|
142
|
-
if (option) {
|
|
143
|
-
select(option.value);
|
|
144
|
-
}
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
case "Escape":
|
|
148
|
-
e.preventDefault();
|
|
149
|
-
isOpen.value = false;
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
function onClickOutside(e) {
|
|
154
|
-
if (root.value && !root.value.contains(e.target)) {
|
|
155
|
-
isOpen.value = false;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
watch(isOpen, (open) => {
|
|
159
|
-
if (open) {
|
|
160
|
-
document.addEventListener("click", onClickOutside, true);
|
|
161
|
-
} else {
|
|
162
|
-
document.removeEventListener("click", onClickOutside, true);
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
onBeforeUnmount(() => {
|
|
166
|
-
document.removeEventListener("click", onClickOutside, true);
|
|
167
|
-
});
|
|
168
|
-
</script>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { TextFieldValue } from './fieldValue.js';
|
|
2
|
-
declare module '#blokkli/editor/adapter' {
|
|
3
|
-
interface BlokkliAdapter<T> {
|
|
4
|
-
/**
|
|
5
|
-
* Return raw text field values for all blocks.
|
|
6
|
-
*
|
|
7
|
-
* Used by the fieldValue provider to score unprocessed markup instead of
|
|
8
|
-
* DOM-rendered content. If not implemented, the provider falls back to
|
|
9
|
-
* reading text from the directive system / DOM.
|
|
10
|
-
*/
|
|
11
|
-
getTextFieldValues?: () => Promise<TextFieldValue[]>;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|