@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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IframeHeightMap } from '../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
src: string;
|
|
4
|
+
heights: IframeHeightMap;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BlokkliIframe } from './BlokkliIframe/index.vue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BlokkliIframe } from "./BlokkliIframe/index.vue";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IframeHeightMap } from '../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
data: IframeHeightMap | null;
|
|
4
|
+
uuid: string;
|
|
5
|
+
optionKey: string;
|
|
6
|
+
};
|
|
7
|
+
declare function getData(): IframeHeightMap;
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
9
|
+
getData: typeof getData;
|
|
10
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="_bk_flex _bk_h-full" @wheel.capture.stop>
|
|
3
|
+
<!-- Preview area -->
|
|
4
|
+
<div class="_bk_flex-1 _bk_min-w-0">
|
|
5
|
+
<div
|
|
6
|
+
v-if="iframeSrc"
|
|
7
|
+
class="_bk_overflow-auto _bk_bg-mono-50 _bk_rounded _bk_p-20 _bk_h-full"
|
|
8
|
+
>
|
|
9
|
+
<div class="_bk_relative _bk_mx-auto" :style="{ width: containerWidth + 'px' }">
|
|
10
|
+
<div class="_bk_border _bk_border-mono-200 _bk_overflow-hidden">
|
|
11
|
+
<iframe
|
|
12
|
+
:src="iframeSrc"
|
|
13
|
+
class="_bk_overflow-hidden"
|
|
14
|
+
scrolling="no"
|
|
15
|
+
:style="{
|
|
16
|
+
width: '100%',
|
|
17
|
+
height: resolved.height + 'px',
|
|
18
|
+
border: 'none',
|
|
19
|
+
display: 'block',
|
|
20
|
+
pointerEvents: isDragging ? 'none' : 'auto'
|
|
21
|
+
}"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<!-- Bottom resize handle -->
|
|
26
|
+
<div
|
|
27
|
+
class="_bk_flex _bk_items-center _bk_justify-center _bk_cursor-ns-resize _bk_bg-mono-200 _bk_hover:bg-accent-300"
|
|
28
|
+
style="height: 8px"
|
|
29
|
+
@pointerdown.prevent="onPointerDown('height', $event)"
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
<!-- Right resize handle -->
|
|
33
|
+
<div
|
|
34
|
+
class="_bk_absolute _bk_top-0 _bk_cursor-ew-resize _bk_bg-mono-200 _bk_hover:bg-accent-300"
|
|
35
|
+
:style="{
|
|
36
|
+
right: '-8px',
|
|
37
|
+
width: '8px',
|
|
38
|
+
height: '100%'
|
|
39
|
+
}"
|
|
40
|
+
@pointerdown.prevent="onPointerDown('width', $event)"
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
<!-- Corner resize handle -->
|
|
44
|
+
<div
|
|
45
|
+
class="_bk_absolute _bk_cursor-nwse-resize _bk_bg-mono-300 _bk_hover:bg-accent-400"
|
|
46
|
+
:style="{
|
|
47
|
+
right: '-8px',
|
|
48
|
+
bottom: '0',
|
|
49
|
+
width: '8px',
|
|
50
|
+
height: '8px'
|
|
51
|
+
}"
|
|
52
|
+
@pointerdown.prevent="onPointerDown('both', $event)"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div v-else class="_bk_text-mono-500 _bk_p-20 _bk_text-center">
|
|
58
|
+
The block must be rendered on the page before iframe heights can be
|
|
59
|
+
configured.
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<!-- Sidebar -->
|
|
64
|
+
<div
|
|
65
|
+
class="_bk_flex _bk_flex-col _bk_gap-15 _bk_border-l _bk_border-mono-200 _bk_p-15"
|
|
66
|
+
style="width: 200px; flex-shrink: 0"
|
|
67
|
+
>
|
|
68
|
+
<!-- Current dimensions -->
|
|
69
|
+
<div class="_bk_text-mono-500 _bk_font-mono _bk_text-center" style="font-size: 11px">
|
|
70
|
+
{{ containerWidth }}px × {{ resolved.height }}px
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<!-- Viewport presets -->
|
|
74
|
+
<div class="_bk_flex _bk_flex-col _bk_gap-3">
|
|
75
|
+
<div
|
|
76
|
+
class="_bk_text-mono-500 _bk_font-mono"
|
|
77
|
+
style="
|
|
78
|
+
font-size: 10px;
|
|
79
|
+
text-transform: uppercase;
|
|
80
|
+
letter-spacing: 0.05em;
|
|
81
|
+
"
|
|
82
|
+
>
|
|
83
|
+
Presets
|
|
84
|
+
</div>
|
|
85
|
+
<button
|
|
86
|
+
v-for="(vp, key) in VIEWPORTS"
|
|
87
|
+
:key="key"
|
|
88
|
+
type="button"
|
|
89
|
+
class="bk-button bk-is-small"
|
|
90
|
+
:class="{ 'bk-is-primary': containerWidth === vp.width }"
|
|
91
|
+
@click="containerWidth = vp.width"
|
|
92
|
+
>
|
|
93
|
+
{{ vp.label }} ({{ vp.width }}px)
|
|
94
|
+
</button>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<!-- Breakpoints list -->
|
|
98
|
+
<div v-if="sortedEntries.length" class="_bk_flex _bk_flex-col _bk_gap-3">
|
|
99
|
+
<div
|
|
100
|
+
class="_bk_text-mono-500 _bk_font-mono"
|
|
101
|
+
style="
|
|
102
|
+
font-size: 10px;
|
|
103
|
+
text-transform: uppercase;
|
|
104
|
+
letter-spacing: 0.05em;
|
|
105
|
+
"
|
|
106
|
+
>
|
|
107
|
+
Breakpoints
|
|
108
|
+
</div>
|
|
109
|
+
<div
|
|
110
|
+
v-for="entry in sortedEntries"
|
|
111
|
+
:key="entry.key"
|
|
112
|
+
class="_bk_flex _bk_items-center _bk_gap-5 _bk_rounded _bk_px-5 _bk_cursor-pointer"
|
|
113
|
+
:class="
|
|
114
|
+
entry.key === resolved.widthKey ? '_bk_bg-accent-100 _bk_text-accent-900' : '_bk_hover:bg-mono-100'
|
|
115
|
+
"
|
|
116
|
+
style="height: 30px"
|
|
117
|
+
@click="containerWidth = entry.width"
|
|
118
|
+
>
|
|
119
|
+
<span class="_bk_font-mono _bk_flex-1" style="font-size: 12px">
|
|
120
|
+
{{ entry.width }}px → {{ entry.height }}px
|
|
121
|
+
</span>
|
|
122
|
+
<button
|
|
123
|
+
type="button"
|
|
124
|
+
class="_bk_text-mono-400 _bk_hover:text-red-normal"
|
|
125
|
+
style="font-size: 14px; line-height: 1"
|
|
126
|
+
@click.stop="deleteEntry(entry.key)"
|
|
127
|
+
>
|
|
128
|
+
×
|
|
129
|
+
</button>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<script setup>
|
|
137
|
+
import { ref, computed, onBeforeUnmount, useBlokkli } from "#imports";
|
|
138
|
+
import { VIEWPORTS } from "#blokkli-build/iframes-config";
|
|
139
|
+
const props = defineProps({
|
|
140
|
+
data: { type: [Object, null], required: true },
|
|
141
|
+
uuid: { type: String, required: true },
|
|
142
|
+
optionKey: { type: String, required: true }
|
|
143
|
+
});
|
|
144
|
+
const DEFAULT_HEIGHT = 400;
|
|
145
|
+
const { directive } = useBlokkli();
|
|
146
|
+
const iframeSrc = computed(
|
|
147
|
+
() => directive.getValueElement(props.uuid, "iframe") || ""
|
|
148
|
+
);
|
|
149
|
+
const heights = ref(
|
|
150
|
+
props.data && Object.keys(props.data).length > 0 ? { ...props.data } : Object.values(VIEWPORTS).reduce((acc, vp) => {
|
|
151
|
+
acc[String(vp.width)] = DEFAULT_HEIGHT;
|
|
152
|
+
return acc;
|
|
153
|
+
}, {})
|
|
154
|
+
);
|
|
155
|
+
const firstViewport = Object.values(VIEWPORTS)[0];
|
|
156
|
+
const containerWidth = ref(firstViewport?.width ?? 375);
|
|
157
|
+
const sortedEntries = computed(
|
|
158
|
+
() => Object.entries(heights.value).map(([w, h]) => ({ width: Number(w), height: h, key: w })).filter((e) => !Number.isNaN(e.width)).sort((a, b) => a.width - b.width)
|
|
159
|
+
);
|
|
160
|
+
const resolved = computed(() => {
|
|
161
|
+
const sorted = sortedEntries.value;
|
|
162
|
+
if (!sorted.length) {
|
|
163
|
+
return { height: DEFAULT_HEIGHT, widthKey: "" };
|
|
164
|
+
}
|
|
165
|
+
const match = sorted.find((bp) => bp.width >= containerWidth.value);
|
|
166
|
+
if (match) {
|
|
167
|
+
return { height: match.height, widthKey: match.key };
|
|
168
|
+
}
|
|
169
|
+
const largest = sorted[sorted.length - 1];
|
|
170
|
+
return { height: largest.height, widthKey: largest.key };
|
|
171
|
+
});
|
|
172
|
+
function deleteEntry(key) {
|
|
173
|
+
const { [key]: _, ...rest } = heights.value;
|
|
174
|
+
heights.value = rest;
|
|
175
|
+
}
|
|
176
|
+
const isDragging = ref(false);
|
|
177
|
+
let dragAxis = "height";
|
|
178
|
+
let dragStartX = 0;
|
|
179
|
+
let dragStartY = 0;
|
|
180
|
+
let dragStartWidth = 0;
|
|
181
|
+
let dragStartHeight = 0;
|
|
182
|
+
function onPointerDown(axis, e) {
|
|
183
|
+
isDragging.value = true;
|
|
184
|
+
dragAxis = axis;
|
|
185
|
+
dragStartX = e.clientX;
|
|
186
|
+
dragStartY = e.clientY;
|
|
187
|
+
dragStartWidth = containerWidth.value;
|
|
188
|
+
dragStartHeight = resolved.value.height;
|
|
189
|
+
document.addEventListener("pointermove", onPointerMove);
|
|
190
|
+
document.addEventListener("pointerup", onPointerUp);
|
|
191
|
+
}
|
|
192
|
+
function onPointerMove(e) {
|
|
193
|
+
if (dragAxis === "width" || dragAxis === "both") {
|
|
194
|
+
const deltaX = e.clientX - dragStartX;
|
|
195
|
+
containerWidth.value = Math.max(
|
|
196
|
+
200,
|
|
197
|
+
Math.round(dragStartWidth + deltaX * 2)
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
if (dragAxis === "height" || dragAxis === "both") {
|
|
201
|
+
const deltaY = e.clientY - dragStartY;
|
|
202
|
+
const newHeight = Math.max(50, Math.round(dragStartHeight + deltaY));
|
|
203
|
+
const widthKey = String(containerWidth.value);
|
|
204
|
+
heights.value = { ...heights.value, [widthKey]: newHeight };
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function onPointerUp() {
|
|
208
|
+
isDragging.value = false;
|
|
209
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
210
|
+
document.removeEventListener("pointerup", onPointerUp);
|
|
211
|
+
}
|
|
212
|
+
onBeforeUnmount(() => {
|
|
213
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
214
|
+
document.removeEventListener("pointerup", onPointerUp);
|
|
215
|
+
});
|
|
216
|
+
function getData() {
|
|
217
|
+
return heights.value;
|
|
218
|
+
}
|
|
219
|
+
defineExpose({ getData });
|
|
220
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IframeHeightMap } from '../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
data: IframeHeightMap | null;
|
|
4
|
+
uuid: string;
|
|
5
|
+
optionKey: string;
|
|
6
|
+
};
|
|
7
|
+
declare function getData(): IframeHeightMap;
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
9
|
+
getData: typeof getData;
|
|
10
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A map of container widths (as strings) to iframe heights in pixels.
|
|
3
|
+
*
|
|
4
|
+
* The keys correspond to `@container` query breakpoints. For example,
|
|
5
|
+
* `{ "375": 400, "768": 600, "1440": 800 }` means:
|
|
6
|
+
* - At container width ≤ 375px, the iframe is 400px tall
|
|
7
|
+
* - At container width ≤ 768px, the iframe is 600px tall
|
|
8
|
+
* - At container width > 768px (default), the iframe is 800px tall
|
|
9
|
+
*/
|
|
10
|
+
export type IframeHeightMap = Record<string, number>;
|
package/dist/modules/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as Blokkli, B as BlokkliModule, d as defineBlokkliModule } from '../shared/editor.
|
|
1
|
+
export { b as Blokkli, B as BlokkliModule, d as defineBlokkliModule } from '../shared/editor.BTOBvmaz.mjs';
|
|
2
2
|
import 'nuxt/schema';
|
|
3
3
|
import 'consola';
|
|
4
4
|
import '../../dist/global/types/definitions.js';
|
|
@@ -22,3 +22,60 @@ const text = computed(() => {
|
|
|
22
22
|
});
|
|
23
23
|
useBlockRegistration(dom, props.uuid);
|
|
24
24
|
</script>
|
|
25
|
+
|
|
26
|
+
<style>
|
|
27
|
+
.bk.bk-block-not-implemented {
|
|
28
|
+
|
|
29
|
+
--bk-tw-bg-opacity: 1;
|
|
30
|
+
|
|
31
|
+
background-color: rgb(var(--bk-theme-red-light) / var(--bk-tw-bg-opacity, 1));
|
|
32
|
+
|
|
33
|
+
padding-top: 15px;
|
|
34
|
+
|
|
35
|
+
padding-bottom: 15px;
|
|
36
|
+
|
|
37
|
+
font-family: PB Inter, sans-serif;
|
|
38
|
+
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
|
|
41
|
+
--bk-tw-text-opacity: 1;
|
|
42
|
+
|
|
43
|
+
color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-text-opacity, 1));
|
|
44
|
+
|
|
45
|
+
border-radius: 6px;
|
|
46
|
+
|
|
47
|
+
font-size: 18px;
|
|
48
|
+
|
|
49
|
+
line-height: 28px;
|
|
50
|
+
|
|
51
|
+
outline-style: solid;
|
|
52
|
+
|
|
53
|
+
outline-width: 1px;
|
|
54
|
+
|
|
55
|
+
outline-offset: -1px;
|
|
56
|
+
|
|
57
|
+
outline-color: rgb(var(--bk-theme-red-normal) / 0.3);
|
|
58
|
+
|
|
59
|
+
display: flex;
|
|
60
|
+
|
|
61
|
+
align-items: center;
|
|
62
|
+
|
|
63
|
+
justify-content: center;
|
|
64
|
+
|
|
65
|
+
gap: 5px
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.bk.bk-block-not-implemented strong {
|
|
69
|
+
|
|
70
|
+
font-weight: 700 !important
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.bk.bk-block-not-implemented svg {
|
|
74
|
+
|
|
75
|
+
fill: currentColor;
|
|
76
|
+
|
|
77
|
+
width: 25px;
|
|
78
|
+
|
|
79
|
+
height: 25px
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -2,7 +2,7 @@ type __VLS_Props = {
|
|
|
2
2
|
/**
|
|
3
3
|
* The (machine) name of the field that is editable.
|
|
4
4
|
*/
|
|
5
|
-
name
|
|
5
|
+
name?: string | null;
|
|
6
6
|
/**
|
|
7
7
|
* The text value.
|
|
8
8
|
*/
|
|
@@ -20,6 +20,7 @@ type __VLS_Slots = {
|
|
|
20
20
|
}): any;
|
|
21
21
|
};
|
|
22
22
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
|
+
name: string | null;
|
|
23
24
|
value: string;
|
|
24
25
|
tag: string;
|
|
25
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<component
|
|
3
3
|
:is="tag"
|
|
4
4
|
ref="root"
|
|
5
|
-
:data-blokkli-editable-field="
|
|
5
|
+
:data-blokkli-editable-field="isEditingBuild ? name : void 0"
|
|
6
6
|
>
|
|
7
7
|
<slot :value="renderedValue" />
|
|
8
8
|
</component>
|
|
@@ -15,7 +15,8 @@ import {
|
|
|
15
15
|
inject,
|
|
16
16
|
onMounted,
|
|
17
17
|
onBeforeUnmount,
|
|
18
|
-
useTemplateRef
|
|
18
|
+
useTemplateRef,
|
|
19
|
+
watch
|
|
19
20
|
} from "#imports";
|
|
20
21
|
import {
|
|
21
22
|
INJECT_APP,
|
|
@@ -25,62 +26,77 @@ import {
|
|
|
25
26
|
INJECT_IS_IN_REUSABLE
|
|
26
27
|
} from "#blokkli/helpers/injections";
|
|
27
28
|
const props = defineProps({
|
|
28
|
-
name: { type: String, required:
|
|
29
|
+
name: { type: [String, null], required: false, default: null },
|
|
29
30
|
value: { type: String, required: false, default: "" },
|
|
30
31
|
tag: { type: String, required: false, default: "div" }
|
|
31
32
|
});
|
|
32
33
|
defineSlots();
|
|
33
|
-
const
|
|
34
|
+
const isEditingBuild = import.meta.blokkliEditing;
|
|
34
35
|
const valueOverride = ref("");
|
|
35
|
-
const isEditing = inject(INJECT_IS_EDITING, false);
|
|
36
|
-
const entity = inject(INJECT_ENTITY_CONTEXT, null);
|
|
37
|
-
const editContext = inject(INJECT_EDIT_CONTEXT, null);
|
|
38
|
-
const app = inject(INJECT_APP, null);
|
|
39
|
-
const isInReusable = inject(INJECT_IS_IN_REUSABLE, false);
|
|
40
|
-
if (!entity) {
|
|
41
|
-
throw new Error("Missing entity context.");
|
|
42
|
-
}
|
|
43
|
-
function getValueCallback() {
|
|
44
|
-
return props.value;
|
|
45
|
-
}
|
|
46
36
|
const renderedValue = computed(() => valueOverride.value || props.value || "");
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (!isEditing || !editContext || !app || isInReusable) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
editContext.eventBus.on("editable:update", onEditableUpdateValue);
|
|
60
|
-
editContext.eventBus.on("state:reloaded", onStateReloaded);
|
|
61
|
-
if (root.value instanceof HTMLElement && entity) {
|
|
37
|
+
if (isEditingBuild) {
|
|
38
|
+
let getValueCallback = function() {
|
|
39
|
+
return props.value;
|
|
40
|
+
}, onStateReloaded = function() {
|
|
41
|
+
valueOverride.value = "";
|
|
42
|
+
}, registerDirective = function(name) {
|
|
43
|
+
if (!name || !app || !(root.value instanceof HTMLElement) || !entity) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
62
46
|
app.directive.registerDirectiveElement(
|
|
63
47
|
root.value,
|
|
64
|
-
|
|
48
|
+
name,
|
|
65
49
|
entity,
|
|
66
50
|
"editable",
|
|
67
51
|
true,
|
|
68
52
|
getValueCallback
|
|
69
53
|
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
editContext.eventBus.off("editable:update", onEditableUpdateValue);
|
|
75
|
-
editContext.eventBus.off("state:reloaded", onStateReloaded);
|
|
76
|
-
}
|
|
77
|
-
if (app && root.value instanceof HTMLElement && entity) {
|
|
54
|
+
}, unregisterDirective = function(name) {
|
|
55
|
+
if (!name || !app || !(root.value instanceof HTMLElement) || !entity) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
78
58
|
app.directive.unregisterDirectiveElement(
|
|
79
59
|
root.value,
|
|
80
|
-
|
|
60
|
+
name,
|
|
81
61
|
entity,
|
|
82
62
|
"editable"
|
|
83
63
|
);
|
|
84
|
-
}
|
|
85
|
-
|
|
64
|
+
};
|
|
65
|
+
const root = useTemplateRef("root");
|
|
66
|
+
const isEditing = inject(INJECT_IS_EDITING, false);
|
|
67
|
+
const entity = inject(INJECT_ENTITY_CONTEXT, null);
|
|
68
|
+
const editContext = inject(INJECT_EDIT_CONTEXT, null);
|
|
69
|
+
const app = inject(INJECT_APP, null);
|
|
70
|
+
const isInReusable = inject(INJECT_IS_IN_REUSABLE, false);
|
|
71
|
+
const onEditableUpdateValue = (e) => {
|
|
72
|
+
if (e.name === props.name && e.entityUuid === entity?.uuid) {
|
|
73
|
+
valueOverride.value = e.value;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
onMounted(() => {
|
|
77
|
+
if (!isEditing || !editContext || !app || isInReusable) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
editContext.eventBus.on("editable:update", onEditableUpdateValue);
|
|
81
|
+
editContext.eventBus.on("state:reloaded", onStateReloaded);
|
|
82
|
+
registerDirective(props.name);
|
|
83
|
+
});
|
|
84
|
+
watch(
|
|
85
|
+
() => props.name,
|
|
86
|
+
(newName, oldName) => {
|
|
87
|
+
if (!isEditing || !app || !entity || isInReusable) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
unregisterDirective(oldName);
|
|
91
|
+
registerDirective(newName);
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
onBeforeUnmount(() => {
|
|
95
|
+
if (editContext) {
|
|
96
|
+
editContext.eventBus.off("editable:update", onEditableUpdateValue);
|
|
97
|
+
editContext.eventBus.off("state:reloaded", onStateReloaded);
|
|
98
|
+
}
|
|
99
|
+
unregisterDirective(props.name);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
86
102
|
</script>
|
|
@@ -2,7 +2,7 @@ type __VLS_Props = {
|
|
|
2
2
|
/**
|
|
3
3
|
* The (machine) name of the field that is editable.
|
|
4
4
|
*/
|
|
5
|
-
name
|
|
5
|
+
name?: string | null;
|
|
6
6
|
/**
|
|
7
7
|
* The text value.
|
|
8
8
|
*/
|
|
@@ -20,6 +20,7 @@ type __VLS_Slots = {
|
|
|
20
20
|
}): any;
|
|
21
21
|
};
|
|
22
22
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
|
+
name: string | null;
|
|
23
24
|
value: string;
|
|
24
25
|
tag: string;
|
|
25
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -22,10 +22,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
22
22
|
parentType?: string;
|
|
23
23
|
isEditing?: boolean;
|
|
24
24
|
}> & Readonly<{}>, {
|
|
25
|
-
isEditing: boolean;
|
|
26
25
|
props: any;
|
|
27
26
|
parentType: string;
|
|
28
27
|
options: any;
|
|
29
28
|
editContext: BlockEditContext;
|
|
30
29
|
index: number;
|
|
30
|
+
isEditing: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -22,10 +22,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
22
22
|
parentType?: string;
|
|
23
23
|
isEditing?: boolean;
|
|
24
24
|
}> & Readonly<{}>, {
|
|
25
|
-
isEditing: boolean;
|
|
26
25
|
props: any;
|
|
27
26
|
parentType: string;
|
|
28
27
|
options: any;
|
|
29
28
|
editContext: BlockEditContext;
|
|
30
29
|
index: number;
|
|
30
|
+
isEditing: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,7 +2,7 @@ import type { ComputedRef } from 'vue';
|
|
|
2
2
|
import type { AddNewBlockEvent, AddNewBlocksEvent, MoveBlockEvent, MoveMultipleBlocksEvent } from '../events/index.js';
|
|
3
3
|
import type { PluginConfigInput } from '../types/pluginConfig.js';
|
|
4
4
|
import type { EntityTranslation, MappedState } from '../types/state.js';
|
|
5
|
-
import type { BlockBundleDefinition, FieldConfig } from '../types/definitions.js';
|
|
5
|
+
import type { BlockBundleDefinition, EntityTypeBundleInfo, EntityTypeInfo, FieldConfig } from '../types/definitions.js';
|
|
6
6
|
import type { EditBlockEvent } from '../features/edit/types.js';
|
|
7
7
|
import type { UserPermissions } from '../types/permissions.js';
|
|
8
8
|
export interface MutationResponseLike<T> {
|
|
@@ -10,6 +10,11 @@ export interface MutationResponseLike<T> {
|
|
|
10
10
|
state?: T;
|
|
11
11
|
errors?: string[];
|
|
12
12
|
}
|
|
13
|
+
export interface GenericAdapterResponse<T> {
|
|
14
|
+
success: boolean;
|
|
15
|
+
data: T;
|
|
16
|
+
errors?: string[];
|
|
17
|
+
}
|
|
13
18
|
export type UpdateEntityFieldValueEvent = {
|
|
14
19
|
fieldName: string;
|
|
15
20
|
fieldValue: string;
|
|
@@ -120,6 +125,8 @@ export interface BlokkliAdapter<T> {
|
|
|
120
125
|
*/
|
|
121
126
|
persist: (settings: string) => Promise<undefined>;
|
|
122
127
|
};
|
|
128
|
+
getEntityTypeInfo?: (entityType: string) => EntityTypeInfo | null;
|
|
129
|
+
getEntityBundleInfo?: (entityType: string, bundle: string) => EntityTypeBundleInfo | null;
|
|
123
130
|
}
|
|
124
131
|
/**
|
|
125
132
|
* Methods that adapter extensions can implement.
|