@blokkli/editor 2.0.0-alpha.52 → 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.vue +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
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<SearchOverlay
|
|
3
|
+
v-slot="{ focusedIndex, onMouseEnter }"
|
|
4
|
+
v-model:text="searchText"
|
|
5
|
+
:title="$t('workspaceTitle', 'Switch page')"
|
|
6
|
+
:total-items="displayItems.length"
|
|
7
|
+
:is-searching
|
|
8
|
+
:placeholder="$t('workspaceSearchPlaceholder', 'Search pages...')"
|
|
9
|
+
:item-height="70"
|
|
10
|
+
:is-loading
|
|
11
|
+
@select="onSelectByIndex"
|
|
12
|
+
@close="emit('close')"
|
|
13
|
+
>
|
|
14
|
+
<a
|
|
15
|
+
v-for="(item, i) in displayItems"
|
|
16
|
+
:key="item.uuid"
|
|
17
|
+
ref="itemEls"
|
|
18
|
+
:href="item.url"
|
|
19
|
+
class="bk-command _bk_flex _bk_items-center _bk_gap-10 _bk_px-15 _bk_w-full _bk_text-left _bk_no-underline _bk_max-w-full _bk_min-w-0 _bk_border _bk_border-transparent"
|
|
20
|
+
:class="
|
|
21
|
+
focusedIndex === i ? '_bk_bg-mono-800 _bk_border-mono-100 _bk_text-white' : '_bk_text-mono-300'
|
|
22
|
+
"
|
|
23
|
+
@mouseenter="onMouseEnter(i)"
|
|
24
|
+
>
|
|
25
|
+
<div class="_bk_flex-1 _bk_min-w-0">
|
|
26
|
+
<div class="_bk_truncate _bk_font-semibold _bk_text-base">
|
|
27
|
+
{{ item.label }}
|
|
28
|
+
<span class="_bk_font-normal _bk_text-mono-500">{{ item.id }}</span>
|
|
29
|
+
</div>
|
|
30
|
+
<ul class="_bk_flex _bk_gap-5 _bk_mt-3">
|
|
31
|
+
<li class="bk-workspace-pill _bk_px-0 _bk_text-mono-300">
|
|
32
|
+
{{ getBundleLabel(item) }}
|
|
33
|
+
</li>
|
|
34
|
+
<li
|
|
35
|
+
v-if="item.lastChanged"
|
|
36
|
+
class="bk-workspace-pill _bk_bg-yellow-dark/60 _bk_text-yellow-light"
|
|
37
|
+
>
|
|
38
|
+
<RelativeTime :timestamp="item.lastChanged" />
|
|
39
|
+
</li>
|
|
40
|
+
<li
|
|
41
|
+
v-if="item.uid && item.uid === ownerId"
|
|
42
|
+
class="bk-workspace-pill _bk_bg-accent-700/80"
|
|
43
|
+
>
|
|
44
|
+
<span>{{ $t("owner", "Owner") }}</span>
|
|
45
|
+
</li>
|
|
46
|
+
</ul>
|
|
47
|
+
</div>
|
|
48
|
+
</a>
|
|
49
|
+
</SearchOverlay>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup>
|
|
53
|
+
import {
|
|
54
|
+
ref,
|
|
55
|
+
computed,
|
|
56
|
+
useBlokkli,
|
|
57
|
+
onMounted,
|
|
58
|
+
onBeforeUnmount,
|
|
59
|
+
watch
|
|
60
|
+
} from "#imports";
|
|
61
|
+
import { SearchOverlay, RelativeTime } from "#blokkli/editor/components";
|
|
62
|
+
import { AsyncFzf, asyncExtendedMatch } from "fzf";
|
|
63
|
+
const emit = defineEmits(["close"]);
|
|
64
|
+
const { adapter, $t, context, state, cache } = useBlokkli();
|
|
65
|
+
const searchText = ref("");
|
|
66
|
+
const isLoading = ref(true);
|
|
67
|
+
const allItems = ref([]);
|
|
68
|
+
const labelMap = ref(null);
|
|
69
|
+
const fzfResults = ref([]);
|
|
70
|
+
const isSearching = ref(false);
|
|
71
|
+
const ownerId = computed(() => state.owner.value?.id);
|
|
72
|
+
const currentEntityUuid = computed(() => context.value.entityUuid);
|
|
73
|
+
const defaultSorted = computed(() => {
|
|
74
|
+
return allItems.value.filter((v) => v.uuid !== currentEntityUuid.value).sort((a, b) => {
|
|
75
|
+
const aHasState = a.lastChanged !== null ? 0 : 1;
|
|
76
|
+
const bHasState = b.lastChanged !== null ? 0 : 1;
|
|
77
|
+
if (aHasState !== bHasState) return aHasState - bHasState;
|
|
78
|
+
const aIsOwner = a.uid && a.uid === ownerId.value ? 0 : 1;
|
|
79
|
+
const bIsOwner = b.uid && b.uid === ownerId.value ? 0 : 1;
|
|
80
|
+
if (aIsOwner !== bIsOwner) return aIsOwner - bIsOwner;
|
|
81
|
+
if (a.lastChanged && b.lastChanged) {
|
|
82
|
+
return new Date(b.lastChanged).getTime() - new Date(a.lastChanged).getTime();
|
|
83
|
+
}
|
|
84
|
+
if (a.lastChanged) return -1;
|
|
85
|
+
if (b.lastChanged) return 1;
|
|
86
|
+
return a.label.localeCompare(b.label);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
const allSortedItems = computed(() => {
|
|
90
|
+
if (searchText.value.trim()) {
|
|
91
|
+
return fzfResults.value.filter((v) => v.uuid !== currentEntityUuid.value);
|
|
92
|
+
}
|
|
93
|
+
return defaultSorted.value;
|
|
94
|
+
});
|
|
95
|
+
const displayItems = computed(() => allSortedItems.value.slice(0, 50));
|
|
96
|
+
function getBundleLabel(item) {
|
|
97
|
+
return labelMap.value?.bundles[item.bundle] ?? item.bundle;
|
|
98
|
+
}
|
|
99
|
+
function onSelectByIndex(index) {
|
|
100
|
+
const item = displayItems.value[index];
|
|
101
|
+
if (item) {
|
|
102
|
+
window.location.href = item.url;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function getFzf() {
|
|
106
|
+
return cache.get(
|
|
107
|
+
"workspace:fzf",
|
|
108
|
+
() => new AsyncFzf(allItems.value, {
|
|
109
|
+
selector: (item) => item.context ? item.label + " " + item.context : item.label,
|
|
110
|
+
match: asyncExtendedMatch
|
|
111
|
+
})
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
let searchTimeout = null;
|
|
115
|
+
watch(searchText, (newValue) => {
|
|
116
|
+
if (searchTimeout) {
|
|
117
|
+
clearTimeout(searchTimeout);
|
|
118
|
+
searchTimeout = null;
|
|
119
|
+
}
|
|
120
|
+
if (!newValue.trim()) {
|
|
121
|
+
fzfResults.value = [];
|
|
122
|
+
isSearching.value = false;
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
isSearching.value = true;
|
|
126
|
+
const query = newValue.trim();
|
|
127
|
+
searchTimeout = setTimeout(async () => {
|
|
128
|
+
if (searchText.value.trim() !== query) {
|
|
129
|
+
isSearching.value = false;
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
const results = await getFzf().find(query);
|
|
134
|
+
if (searchText.value.trim() === query) {
|
|
135
|
+
fzfResults.value = results.map((r) => r.item);
|
|
136
|
+
}
|
|
137
|
+
} finally {
|
|
138
|
+
if (searchText.value.trim() === query) {
|
|
139
|
+
isSearching.value = false;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}, 150);
|
|
143
|
+
});
|
|
144
|
+
onMounted(async () => {
|
|
145
|
+
try {
|
|
146
|
+
const result = await cache.getAsync(
|
|
147
|
+
"workspace:hostEntities",
|
|
148
|
+
() => adapter.getHostEntities()
|
|
149
|
+
);
|
|
150
|
+
allItems.value = result.items;
|
|
151
|
+
labelMap.value = result.labelMap;
|
|
152
|
+
} finally {
|
|
153
|
+
isLoading.value = false;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
onBeforeUnmount(() => {
|
|
157
|
+
if (searchTimeout) {
|
|
158
|
+
clearTimeout(searchTimeout);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
</script>
|
|
162
|
+
|
|
163
|
+
<style>
|
|
164
|
+
.bk .bk-workspace-pill {
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
gap: 3px;
|
|
168
|
+
border-radius: 9999px;
|
|
169
|
+
padding-left: 5px;
|
|
170
|
+
padding-right: 5px;
|
|
171
|
+
padding-top: 1px;
|
|
172
|
+
padding-bottom: 1px;
|
|
173
|
+
font-size: 12px;
|
|
174
|
+
line-height: 16px;
|
|
175
|
+
font-weight: 500
|
|
176
|
+
}
|
|
177
|
+
</style>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
1
|
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
2
|
close: () => any;
|
|
5
|
-
submit: (result: import("../types.js").AssistantResultMarkup) => any;
|
|
6
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
7
4
|
onClose?: (() => any) | undefined;
|
|
8
|
-
onSubmit?: ((result: import("../types.js").AssistantResultMarkup) => any) | undefined;
|
|
9
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport :to="ui.mainLayoutElement.value">
|
|
3
|
+
<div class="bk">
|
|
4
|
+
<BlokkliTransition name="command-palette">
|
|
5
|
+
<Overlay v-if="isVisible" @close="isVisible = false" />
|
|
6
|
+
</BlokkliTransition>
|
|
7
|
+
</div>
|
|
8
|
+
</Teleport>
|
|
9
|
+
|
|
10
|
+
<PluginToolbarButton
|
|
11
|
+
id="workspace"
|
|
12
|
+
:title="$t('workspaceOpen', 'Switch page')"
|
|
13
|
+
meta
|
|
14
|
+
key-code="P"
|
|
15
|
+
no-command
|
|
16
|
+
region="title"
|
|
17
|
+
weight="500"
|
|
18
|
+
icon="bk_mdi_feature_search"
|
|
19
|
+
class="_bk_relative"
|
|
20
|
+
@click="isVisible = !isVisible"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup>
|
|
25
|
+
import { useBlokkli, defineBlokkliFeature } from "#imports";
|
|
26
|
+
import { BlokkliTransition } from "#blokkli/editor/components";
|
|
27
|
+
import { PluginToolbarButton } from "#blokkli/editor/plugins";
|
|
28
|
+
import Overlay from "./Overlay/index.vue";
|
|
29
|
+
import { onBlokkliEvent, useDialog } from "#blokkli/editor/composables";
|
|
30
|
+
defineBlokkliFeature({
|
|
31
|
+
id: "workspace",
|
|
32
|
+
icon: "bk_mdi_workspaces",
|
|
33
|
+
label: "Workspace",
|
|
34
|
+
description: "Allows users to switch between edit states.",
|
|
35
|
+
requiredAdapterMethods: ["getHostEntities"]
|
|
36
|
+
});
|
|
37
|
+
const { $t, ui } = useBlokkli();
|
|
38
|
+
const isVisible = useDialog("workspace", "center");
|
|
39
|
+
onBlokkliEvent("window:clickAway", () => isVisible.value = false);
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
export default {
|
|
44
|
+
name: "Workspace"
|
|
45
|
+
};
|
|
46
|
+
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export type HostEntitySearchResultLabelMap = {
|
|
2
|
+
label: string;
|
|
3
|
+
bundles: Record<string, string>;
|
|
4
|
+
};
|
|
5
|
+
export type HostEntitySearchResultItem = {
|
|
6
|
+
/**
|
|
7
|
+
* The ID of the host entity.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The UUID of the host entity.
|
|
12
|
+
*/
|
|
13
|
+
uuid: string;
|
|
14
|
+
/**
|
|
15
|
+
* The entity type of the host entity.
|
|
16
|
+
*/
|
|
17
|
+
entityType: string;
|
|
18
|
+
/**
|
|
19
|
+
* The entity bundle of the host entity.
|
|
20
|
+
*/
|
|
21
|
+
bundle: string;
|
|
22
|
+
/**
|
|
23
|
+
* The label of the host entity.
|
|
24
|
+
*/
|
|
25
|
+
label: string;
|
|
26
|
+
/**
|
|
27
|
+
* The url to start editing.
|
|
28
|
+
*/
|
|
29
|
+
url: string;
|
|
30
|
+
/**
|
|
31
|
+
* If an edit state exists: The time when the edit state was last changed.
|
|
32
|
+
*/
|
|
33
|
+
lastChanged: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* If an edit state exists: The ID of the owner of the edit state.
|
|
36
|
+
*/
|
|
37
|
+
uid: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Optional additional context used for searching (e.g. SKU, internal ID).
|
|
40
|
+
*
|
|
41
|
+
* Not displayed in the UI, but included in the fzf search.
|
|
42
|
+
*/
|
|
43
|
+
context?: string;
|
|
44
|
+
};
|
|
45
|
+
export type HostEntitySearchResult = {
|
|
46
|
+
items: HostEntitySearchResultItem[];
|
|
47
|
+
/**
|
|
48
|
+
* A map with keys that are entity types.
|
|
49
|
+
*/
|
|
50
|
+
labelMap: HostEntitySearchResultLabelMap;
|
|
51
|
+
};
|
|
52
|
+
declare module '#blokkli/editor/adapter' {
|
|
53
|
+
interface BlokkliAdapter<T> {
|
|
54
|
+
/**
|
|
55
|
+
* Search for host entities.
|
|
56
|
+
*/
|
|
57
|
+
getHostEntities?: () => Promise<HostEntitySearchResult>;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
File without changes
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<svg
|
|
2
2
|
aria-hidden="true"
|
|
3
3
|
viewBox="0 0 100 101"
|
|
4
|
-
fill="none"
|
|
5
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
6
5
|
>
|
|
7
6
|
<path
|
|
8
7
|
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
|
9
8
|
fill="currentColor"
|
|
9
|
+
style="opacity: 0.3"
|
|
10
10
|
/>
|
|
11
11
|
<path
|
|
12
12
|
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
|
|
13
|
-
fill="
|
|
13
|
+
fill="currentColor"
|
|
14
14
|
/>
|
|
15
15
|
</svg>
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="bk bk-context-menu _bk_fixed _bk_z-context-menu _bk_pointer-events-auto"
|
|
4
|
+
:style="{ left: x + 'px', top: y + 'px' }"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
ref="rootEl"
|
|
8
|
+
class="bk-context-menu-inner _bk_absolute _bk_bg-mono-950 _bk_text-mono-100 _bk_shadow-xl-even _bk_border _bk_border-mono-600 _bk_rounded _bk_overflow-hidden _bk_min-w-200"
|
|
9
|
+
:style="innerStyle"
|
|
10
|
+
>
|
|
4
11
|
<div v-for="(item, i) in menu" :key="i">
|
|
5
|
-
<hr v-if="item.type === 'rule'" />
|
|
6
|
-
<button
|
|
7
|
-
|
|
12
|
+
<hr v-if="item.type === 'rule'" class="_bk_border-t-mono-600" />
|
|
13
|
+
<button
|
|
14
|
+
v-else-if="item.type === 'button'"
|
|
15
|
+
class="_bk_p-10 _bk_whitespace-nowrap _bk_text-left _bk_flex _bk_items-center _bk_gap-5 _bk_font-sans _bk_font-semibold _bk_hover:bg-mono-800 _bk_w-full _bk_text-base _bk_text-mono-300 _bk_hover:text-mono-50"
|
|
16
|
+
@click="onClick(i)"
|
|
17
|
+
>
|
|
18
|
+
<Icon :name="item.icon" class="_bk_size-20" />
|
|
8
19
|
<span>{{ item.label }}</span>
|
|
9
20
|
</button>
|
|
10
21
|
</div>
|
|
@@ -32,8 +43,11 @@ const emit = defineEmits(["close"]);
|
|
|
32
43
|
const { ui, selection } = useBlokkli();
|
|
33
44
|
const rootEl = ref(null);
|
|
34
45
|
const innerStyle = computed(() => {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
46
|
+
const vp = ui.visibleViewportPadded.value;
|
|
47
|
+
const vpRight = vp.x + vp.width;
|
|
48
|
+
const vpBottom = vp.y + vp.height;
|
|
49
|
+
const horizontal = props.x + 300 > vpRight ? { right: 0 } : { left: 0 };
|
|
50
|
+
const vertical = props.y + 300 > vpBottom ? { bottom: 0 } : { top: 0 };
|
|
37
51
|
return {
|
|
38
52
|
...horizontal,
|
|
39
53
|
...vertical
|
|
@@ -32,6 +32,10 @@ const onContextMenu = (e) => {
|
|
|
32
32
|
if (!props.id || typeof props.id !== "string" || !props.menu.length) {
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
+
if (props.id === ui.openContextMenu.value) {
|
|
36
|
+
ui.openContextMenu.value = "";
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
35
39
|
x.value = e.clientX;
|
|
36
40
|
y.value = e.clientY;
|
|
37
41
|
ui.openContextMenu.value = props.id;
|
|
@@ -59,6 +59,13 @@ type __VLS_Props = {
|
|
|
59
59
|
* Unlike disabled, this completely hides the button via v-show.
|
|
60
60
|
*/
|
|
61
61
|
hidden?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* When true, the disabled reason tooltip is rendered in lime (success)
|
|
64
|
+
* instead of the default yellow (warning).
|
|
65
|
+
*
|
|
66
|
+
* Use this when the disabled state is a positive outcome rather than an error.
|
|
67
|
+
*/
|
|
68
|
+
disabledReasonSuccess?: boolean;
|
|
62
69
|
/**
|
|
63
70
|
* Optional icon to display in the button.
|
|
64
71
|
*/
|
|
@@ -70,14 +77,14 @@ type __VLS_Props = {
|
|
|
70
77
|
*/
|
|
71
78
|
tourText?: string;
|
|
72
79
|
};
|
|
73
|
-
declare var __VLS_7: {},
|
|
80
|
+
declare var __VLS_7: {}, __VLS_34: {
|
|
74
81
|
items: any;
|
|
75
82
|
uuids: any;
|
|
76
83
|
};
|
|
77
84
|
type __VLS_Slots = {} & {
|
|
78
85
|
icon?: (props: typeof __VLS_7) => any;
|
|
79
86
|
} & {
|
|
80
|
-
default?: (props: typeof
|
|
87
|
+
default?: (props: typeof __VLS_34) => any;
|
|
81
88
|
};
|
|
82
89
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
83
90
|
click: (items: RenderedFieldListItem[]) => any;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
v-show="!hidden"
|
|
6
6
|
ref="el"
|
|
7
7
|
:disabled="isDisabled"
|
|
8
|
-
class="bk-item-action"
|
|
8
|
+
class="bk-item-action _bk_group/tooltip"
|
|
9
9
|
:class="[
|
|
10
10
|
{ 'bk-is-active': active, 'bk-is-last': weight === 'last' },
|
|
11
11
|
$attrs.class
|
|
@@ -16,20 +16,24 @@
|
|
|
16
16
|
<slot name="icon">
|
|
17
17
|
<Icon v-if="icon" :name="icon" class="bk-item-action-icon" />
|
|
18
18
|
</slot>
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
<Tooltip :label="title" placement="above-left" class="_bk_min-w-full">
|
|
20
|
+
<template v-if="keyCode" #shortcut>
|
|
21
|
+
<ShortcutIndicator
|
|
22
|
+
:meta="meta"
|
|
23
|
+
:label="title"
|
|
24
|
+
:key-code="keyCode"
|
|
25
|
+
group="blocks"
|
|
26
|
+
@pressed="onClick"
|
|
27
|
+
/>
|
|
28
|
+
</template>
|
|
29
|
+
<template #status>
|
|
30
|
+
<TooltipStatus
|
|
31
|
+
v-if="disabledReason"
|
|
32
|
+
:description="disabledReason"
|
|
33
|
+
:status="disabledReasonSuccess ? 'success' : 'warning'"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
</Tooltip>
|
|
33
37
|
</button>
|
|
34
38
|
</Teleport>
|
|
35
39
|
<slot :items="selection.items.value" :uuids="uuids" />
|
|
@@ -37,7 +41,12 @@
|
|
|
37
41
|
|
|
38
42
|
<script setup>
|
|
39
43
|
import { computed, ref, useBlokkli } from "#imports";
|
|
40
|
-
import {
|
|
44
|
+
import {
|
|
45
|
+
Icon,
|
|
46
|
+
ShortcutIndicator,
|
|
47
|
+
Tooltip,
|
|
48
|
+
TooltipStatus
|
|
49
|
+
} from "#blokkli/editor/components";
|
|
41
50
|
import { defineCommands, defineTourItem } from "#blokkli/editor/composables";
|
|
42
51
|
const { selection, state } = useBlokkli();
|
|
43
52
|
const el = ref(null);
|
|
@@ -53,6 +62,7 @@ const props = defineProps({
|
|
|
53
62
|
editOnly: { type: Boolean, required: false },
|
|
54
63
|
weight: { type: [Number, String], required: false },
|
|
55
64
|
hidden: { type: Boolean, required: false },
|
|
65
|
+
disabledReasonSuccess: { type: Boolean, required: false },
|
|
56
66
|
icon: { type: null, required: false },
|
|
57
67
|
tourText: { type: String, required: false }
|
|
58
68
|
});
|
|
@@ -59,6 +59,13 @@ type __VLS_Props = {
|
|
|
59
59
|
* Unlike disabled, this completely hides the button via v-show.
|
|
60
60
|
*/
|
|
61
61
|
hidden?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* When true, the disabled reason tooltip is rendered in lime (success)
|
|
64
|
+
* instead of the default yellow (warning).
|
|
65
|
+
*
|
|
66
|
+
* Use this when the disabled state is a positive outcome rather than an error.
|
|
67
|
+
*/
|
|
68
|
+
disabledReasonSuccess?: boolean;
|
|
62
69
|
/**
|
|
63
70
|
* Optional icon to display in the button.
|
|
64
71
|
*/
|
|
@@ -70,14 +77,14 @@ type __VLS_Props = {
|
|
|
70
77
|
*/
|
|
71
78
|
tourText?: string;
|
|
72
79
|
};
|
|
73
|
-
declare var __VLS_7: {},
|
|
80
|
+
declare var __VLS_7: {}, __VLS_34: {
|
|
74
81
|
items: any;
|
|
75
82
|
uuids: any;
|
|
76
83
|
};
|
|
77
84
|
type __VLS_Slots = {} & {
|
|
78
85
|
icon?: (props: typeof __VLS_7) => any;
|
|
79
86
|
} & {
|
|
80
|
-
default?: (props: typeof
|
|
87
|
+
default?: (props: typeof __VLS_34) => any;
|
|
81
88
|
};
|
|
82
89
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
83
90
|
click: (items: RenderedFieldListItem[]) => any;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<ViewportBlockingRect
|
|
3
3
|
:id="storageKey"
|
|
4
4
|
ref="root"
|
|
5
|
-
class="bk-sidebar-detached bk-sidebar-inner"
|
|
5
|
+
class="bk bk-sidebar-detached bk-sidebar-inner"
|
|
6
6
|
:class="{ 'bk-is-focused': focusedSidebar === id }"
|
|
7
7
|
:style="style"
|
|
8
8
|
tabindex="10"
|
|
@@ -10,34 +10,32 @@
|
|
|
10
10
|
@focus.capture="onFocus"
|
|
11
11
|
>
|
|
12
12
|
<ScrollBoundary>
|
|
13
|
-
<div
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
<div
|
|
14
|
+
class="bk-sidebar-title"
|
|
15
|
+
@mousedown.stop="onMouseDown($event, 'move')"
|
|
16
|
+
>
|
|
17
|
+
<div class="bk-sidebar-title-icon">
|
|
18
|
+
<slot name="icon">
|
|
19
|
+
<Icon v-if="icon" :name="icon" />
|
|
20
|
+
</slot>
|
|
21
|
+
</div>
|
|
22
|
+
<span>{{ title }}</span>
|
|
23
|
+
<button
|
|
24
|
+
@click.prevent.stop.capture="isMinimized = !isMinimized"
|
|
25
|
+
@mousedown.capture.stop
|
|
26
|
+
>
|
|
27
|
+
<Icon :name="isMinimized ? 'window-maximize' : 'window-minimize'" />
|
|
28
|
+
</button>
|
|
29
|
+
<button
|
|
30
|
+
@click.prevent.stop.capture="$emit('attach')"
|
|
31
|
+
@mousedown.capture.stop
|
|
17
32
|
>
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
<Icon v-if="icon" :name="icon" />
|
|
21
|
-
</slot>
|
|
22
|
-
</div>
|
|
23
|
-
<span>{{ title }}</span>
|
|
24
|
-
<button
|
|
25
|
-
@click.prevent.stop.capture="isMinimized = !isMinimized"
|
|
26
|
-
@mousedown.capture.stop
|
|
27
|
-
>
|
|
28
|
-
<Icon :name="isMinimized ? 'window-maximize' : 'window-minimize'" />
|
|
29
|
-
</button>
|
|
30
|
-
<button
|
|
31
|
-
@click.prevent.stop.capture="$emit('attach')"
|
|
32
|
-
@mousedown.capture.stop
|
|
33
|
-
>
|
|
34
|
-
<Icon
|
|
35
|
-
:name="
|
|
33
|
+
<Icon
|
|
34
|
+
:name="
|
|
36
35
|
region === 'left' ? 'bk_mdi_dock_to_left' : 'bk_mdi_dock_to_right'
|
|
37
36
|
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</div>
|
|
37
|
+
/>
|
|
38
|
+
</button>
|
|
41
39
|
</div>
|
|
42
40
|
<div class="bk-sidebar-detached-inner" :style="innerStyle">
|
|
43
41
|
<slot
|