@blokkli/editor 2.0.0-alpha.52 → 2.0.0-alpha.54
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 +215 -4
- 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 +10 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +47 -5
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue.d.ts +10 -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 +417 -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
|
@@ -7,9 +7,26 @@
|
|
|
7
7
|
placement-y="top"
|
|
8
8
|
:placement-x="useHorizontalPlacement ? 'auto-side' : 'center'"
|
|
9
9
|
class="bk-editable-field"
|
|
10
|
+
:class="{ 'bk-is-fullscreen': isFullscreen }"
|
|
10
11
|
close-icon="bk_mdi_check"
|
|
12
|
+
:fullscreen="isFullscreen"
|
|
13
|
+
:button-label="$t('save', 'Save')"
|
|
11
14
|
@close="save"
|
|
12
15
|
>
|
|
16
|
+
<template #header>
|
|
17
|
+
<button
|
|
18
|
+
v-if="canDoFullscreen"
|
|
19
|
+
type="button"
|
|
20
|
+
@click="isFullscreenPreference = !isFullscreenPreference"
|
|
21
|
+
>
|
|
22
|
+
<Icon
|
|
23
|
+
:name="isFullscreen ? 'bk_mdi_fullscreen_exit' : 'bk_mdi_fullscreen'"
|
|
24
|
+
/>
|
|
25
|
+
<span>{{
|
|
26
|
+
isFullscreen ? $t("editableFieldExitFullscreen", "Exit Fullscreen") : $t("editableFieldFullscreen", "Fullscreen")
|
|
27
|
+
}}</span>
|
|
28
|
+
</button>
|
|
29
|
+
</template>
|
|
13
30
|
<form ref="form" class="bk-editable-field-input" @submit.prevent="save">
|
|
14
31
|
<div ref="input">
|
|
15
32
|
<InputContenteditable
|
|
@@ -21,11 +38,14 @@
|
|
|
21
38
|
|
|
22
39
|
<InputFrame
|
|
23
40
|
v-else-if="config.type === 'frame'"
|
|
41
|
+
ref="inputFrame"
|
|
24
42
|
v-model="modelValue"
|
|
25
43
|
:type="config.type"
|
|
26
44
|
:field-name="fieldName"
|
|
27
45
|
:host="host"
|
|
28
46
|
:initial-height="scrollHeight"
|
|
47
|
+
:is-fullscreen
|
|
48
|
+
@formatted="onFormattedValue"
|
|
29
49
|
/>
|
|
30
50
|
|
|
31
51
|
<InputPlaintext
|
|
@@ -40,9 +60,30 @@
|
|
|
40
60
|
</div>
|
|
41
61
|
|
|
42
62
|
<div class="bk-artboard-tooltip-info">
|
|
43
|
-
<button
|
|
63
|
+
<button
|
|
64
|
+
:disabled="!hasChanged"
|
|
65
|
+
class="bk-artboard-tooltip-info-button bk-scheme-red"
|
|
66
|
+
@click.prevent="discard"
|
|
67
|
+
>
|
|
44
68
|
{{ $t("editableFieldDiscard", "Discard") }}
|
|
45
69
|
</button>
|
|
70
|
+
<button
|
|
71
|
+
v-if="canTranslate"
|
|
72
|
+
:disabled="isAutoTranslating"
|
|
73
|
+
class="bk-artboard-tooltip-info-button bk-scheme-mono _bk_relative _bk_group/tooltip"
|
|
74
|
+
@click.prevent="autoTranslate"
|
|
75
|
+
>
|
|
76
|
+
<Icon name="bk_mdi_translate" class="_bk_size-15" />
|
|
77
|
+
{{ $t("editableFieldTranslate", "Translate") }}
|
|
78
|
+
<Tooltip
|
|
79
|
+
:label="
|
|
80
|
+
$t(
|
|
81
|
+
'editableFieldTranslateTooltip',
|
|
82
|
+
'Automatically translate the current text.'
|
|
83
|
+
)
|
|
84
|
+
"
|
|
85
|
+
/>
|
|
86
|
+
</button>
|
|
46
87
|
<div v-if="errorText" class="bk-editable-field-info-error">
|
|
47
88
|
{{ errorText }}
|
|
48
89
|
</div>
|
|
@@ -57,9 +98,18 @@
|
|
|
57
98
|
:text="modelValue"
|
|
58
99
|
:field-type="readabilityFieldType"
|
|
59
100
|
/>
|
|
60
|
-
<div
|
|
101
|
+
<div
|
|
102
|
+
v-if="!isMarkup"
|
|
103
|
+
class="bk-editable-field-info-count _bk_relative _bk_group/tooltip"
|
|
104
|
+
>
|
|
61
105
|
<span>{{ count }}</span>
|
|
62
106
|
<span v-if="maxlength >= 1"> / {{ maxlength }}</span>
|
|
107
|
+
<Tooltip
|
|
108
|
+
v-if="maxlength >= 1"
|
|
109
|
+
:label="
|
|
110
|
+
$t('editableFieldCharCountMax', '@count of @max characters used').replace('@count', count.toString()).replace('@max', maxlength.toString())
|
|
111
|
+
"
|
|
112
|
+
/>
|
|
63
113
|
</div>
|
|
64
114
|
</div>
|
|
65
115
|
</form>
|
|
@@ -73,7 +123,7 @@
|
|
|
73
123
|
</template>
|
|
74
124
|
|
|
75
125
|
<script setup>
|
|
76
|
-
import { ArtboardTooltip } from "#blokkli/editor/components";
|
|
126
|
+
import { ArtboardTooltip, Icon, Tooltip } from "#blokkli/editor/components";
|
|
77
127
|
import {
|
|
78
128
|
computed,
|
|
79
129
|
ref,
|
|
@@ -95,7 +145,16 @@ import {
|
|
|
95
145
|
} from "#blokkli/editor/composables";
|
|
96
146
|
import ReadabilityIndicator from "./ReadabilityIndicator/index.vue";
|
|
97
147
|
import ChunkOverlay from "./ReadabilityIndicator/ChunkOverlay.vue";
|
|
98
|
-
const {
|
|
148
|
+
const {
|
|
149
|
+
state,
|
|
150
|
+
adapter,
|
|
151
|
+
$t,
|
|
152
|
+
types,
|
|
153
|
+
context,
|
|
154
|
+
fieldValue,
|
|
155
|
+
element: elementProvider,
|
|
156
|
+
storage
|
|
157
|
+
} = useBlokkli();
|
|
99
158
|
const props = defineProps({
|
|
100
159
|
fieldName: { type: String, required: true },
|
|
101
160
|
host: { type: Object, required: true },
|
|
@@ -110,7 +169,17 @@ const loaded = ref(false);
|
|
|
110
169
|
const originalText = ref("");
|
|
111
170
|
const modelValue = ref("");
|
|
112
171
|
const form = useTemplateRef("form");
|
|
172
|
+
const inputFrame = useTemplateRef("inputFrame");
|
|
113
173
|
const isClosing = ref(false);
|
|
174
|
+
const isAutoTranslating = ref(false);
|
|
175
|
+
const isFullscreenPreference = storage.use("editableOverlayFullscreen", false);
|
|
176
|
+
const canDoFullscreen = computed(
|
|
177
|
+
() => props.config.type === "markup" || props.config.type === "frame"
|
|
178
|
+
);
|
|
179
|
+
const isFullscreen = computed(
|
|
180
|
+
() => canDoFullscreen.value && isFullscreenPreference.value
|
|
181
|
+
);
|
|
182
|
+
const formattedValue = ref(null);
|
|
114
183
|
const override = useEditableFieldOverride(props.fieldName, props.host);
|
|
115
184
|
const hasChanged = computed(
|
|
116
185
|
() => modelValue.value.trim() !== originalText.value.trim()
|
|
@@ -146,6 +215,37 @@ const isReadabilityField = computed(
|
|
|
146
215
|
const readabilityFieldType = computed(
|
|
147
216
|
() => props.config.type === "frame" || props.config.type === "markup" ? "markup" : "plain"
|
|
148
217
|
);
|
|
218
|
+
function onFormattedValue(text) {
|
|
219
|
+
formattedValue.value = text;
|
|
220
|
+
}
|
|
221
|
+
const canTranslate = computed(
|
|
222
|
+
() => state.editMode.value === "translating" && !!adapter.requestTranslation
|
|
223
|
+
);
|
|
224
|
+
async function autoTranslate() {
|
|
225
|
+
if (isAutoTranslating.value) return;
|
|
226
|
+
isAutoTranslating.value = true;
|
|
227
|
+
try {
|
|
228
|
+
const sourceLanguage = state.translation.value.sourceLanguage || "en";
|
|
229
|
+
const targetLanguage = context.value.language;
|
|
230
|
+
const key = `${props.host.uuid}:${props.fieldName}`;
|
|
231
|
+
const response = await adapter.requestTranslation([
|
|
232
|
+
{
|
|
233
|
+
key,
|
|
234
|
+
text: modelValue.value,
|
|
235
|
+
isHtml: readabilityFieldType.value === "markup",
|
|
236
|
+
sourceLanguage,
|
|
237
|
+
targetLanguage
|
|
238
|
+
}
|
|
239
|
+
]);
|
|
240
|
+
if (response.success && response.data.length) {
|
|
241
|
+
const translatedText = response.data[0].translatedText;
|
|
242
|
+
modelValue.value = translatedText;
|
|
243
|
+
inputFrame.value?.setValue(translatedText);
|
|
244
|
+
}
|
|
245
|
+
} finally {
|
|
246
|
+
isAutoTranslating.value = false;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
149
249
|
function restoreOriginalState() {
|
|
150
250
|
override.restore();
|
|
151
251
|
}
|
|
@@ -183,6 +283,8 @@ async function save() {
|
|
|
183
283
|
}
|
|
184
284
|
isClosing.value = true;
|
|
185
285
|
if (hasChanged.value) {
|
|
286
|
+
console.log("modelValue", modelValue.value);
|
|
287
|
+
console.log("originalText", originalText.value);
|
|
186
288
|
if (errorText.value) {
|
|
187
289
|
restoreOriginalState();
|
|
188
290
|
} else {
|
|
@@ -192,9 +294,14 @@ async function save() {
|
|
|
192
294
|
emit("close");
|
|
193
295
|
}
|
|
194
296
|
onBlokkliEvent("window:clickAway", save);
|
|
195
|
-
watch(
|
|
196
|
-
|
|
197
|
-
|
|
297
|
+
watch(
|
|
298
|
+
() => props.config.type === "frame" ? formattedValue.value : modelValue.value,
|
|
299
|
+
(newText) => {
|
|
300
|
+
if (newText !== null) {
|
|
301
|
+
override.setValue(newText);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
);
|
|
198
305
|
const focusInput = (el) => {
|
|
199
306
|
if (!el) {
|
|
200
307
|
return;
|
|
@@ -232,7 +339,10 @@ onMounted(() => {
|
|
|
232
339
|
if (props.isComponent) {
|
|
233
340
|
modelValue.value = props.value || "";
|
|
234
341
|
} else {
|
|
235
|
-
|
|
342
|
+
const tfv = fieldValue.getTextFieldValues().find(
|
|
343
|
+
(v) => v.uuid === props.host.uuid && v.fieldName === props.fieldName
|
|
344
|
+
);
|
|
345
|
+
modelValue.value = tfv?.value || override.originalValue || (isMarkup.value ? props.element.innerHTML : props.element.textContent) || "";
|
|
236
346
|
}
|
|
237
347
|
originalText.value = modelValue.value;
|
|
238
348
|
nextTick(() => {
|
|
@@ -252,3 +362,302 @@ onBeforeUnmount(async () => {
|
|
|
252
362
|
}
|
|
253
363
|
});
|
|
254
364
|
</script>
|
|
365
|
+
|
|
366
|
+
<style>
|
|
367
|
+
.bk.bk-editable-field {
|
|
368
|
+
--bk-bg: white;
|
|
369
|
+
--bk-header-bg: rgb(var(--bk-theme-teal-normal) / 1);
|
|
370
|
+
--bk-header-text: rgb(var(--bk-theme-teal-dark) / 1);
|
|
371
|
+
--bk-border: rgb(var(--bk-theme-teal-normal) / 1);
|
|
372
|
+
--bk-header-hover: rgb(var(--bk-theme-teal-dark) / 0.2);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.bk.bk-editable-field.bk-is-fullscreen .bk-editable-field-input {
|
|
376
|
+
display: flex;
|
|
377
|
+
max-width: none;
|
|
378
|
+
flex: 1 1 0%;
|
|
379
|
+
flex-direction: column;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.bk.bk-editable-field.bk-is-fullscreen .bk-editable-field-input > div:first-child {
|
|
383
|
+
display: flex;
|
|
384
|
+
flex: 1 1 0%;
|
|
385
|
+
flex-direction: column;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.bk.bk-editable-field.bk-is-fullscreen .bk-editable-field-input > div:first-child > * {
|
|
389
|
+
flex: 1 1 0%;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.bk.bk-editable-field .bk-editable-field-input {
|
|
393
|
+
width: 100%;
|
|
394
|
+
min-width: 360px;
|
|
395
|
+
max-width: 700px;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
@media (min-width: 768px) {
|
|
399
|
+
|
|
400
|
+
.bk.bk-editable-field .bk-editable-field-input {
|
|
401
|
+
border-radius: 4px;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.bk.bk-editable-field .bk-editable-field-input .bk-editable-field-textarea {
|
|
406
|
+
position: relative;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
@media (min-width: 1024px) {
|
|
410
|
+
|
|
411
|
+
.bk.bk-editable-field .bk-editable-field-input .bk-editable-field-textarea {
|
|
412
|
+
min-width: 600px;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.bk.bk-editable-field .bk-editable-field-input textarea {
|
|
417
|
+
display: block;
|
|
418
|
+
resize: none;
|
|
419
|
+
appearance: none;
|
|
420
|
+
padding: 10px;
|
|
421
|
+
border-style: none;
|
|
422
|
+
--bk-tw-shadow: 0 0 #0000;
|
|
423
|
+
--bk-tw-shadow-colored: 0 0 #0000;
|
|
424
|
+
box-shadow: var(--bk-tw-ring-offset-shadow, 0 0 #0000), var(--bk-tw-ring-shadow, 0 0 #0000), var(--bk-tw-shadow);
|
|
425
|
+
outline: 2px solid transparent;
|
|
426
|
+
outline-offset: 2px;
|
|
427
|
+
background-color: transparent;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.bk.bk-editable-field .bk-editable-field-input textarea:focus {
|
|
431
|
+
border-style: none !important;
|
|
432
|
+
--bk-tw-shadow: 0 0 #0000 !important;
|
|
433
|
+
--bk-tw-shadow-colored: 0 0 #0000 !important;
|
|
434
|
+
box-shadow: var(--bk-tw-ring-offset-shadow, 0 0 #0000), var(--bk-tw-ring-shadow, 0 0 #0000), var(--bk-tw-shadow) !important;
|
|
435
|
+
outline: 2px solid transparent !important;
|
|
436
|
+
outline-offset: 2px !important;
|
|
437
|
+
--bk-tw-ring-offset-shadow: var(--bk-tw-ring-inset) 0 0 0 var(--bk-tw-ring-offset-width) var(--bk-tw-ring-offset-color) !important;
|
|
438
|
+
--bk-tw-ring-shadow: var(--bk-tw-ring-inset) 0 0 0 calc(0px + var(--bk-tw-ring-offset-width)) var(--bk-tw-ring-color) !important;
|
|
439
|
+
box-shadow: var(--bk-tw-ring-offset-shadow), var(--bk-tw-ring-shadow), var(--bk-tw-shadow, 0 0 #0000) !important;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.bk.bk-editable-field .bk-editable-field-input textarea {
|
|
443
|
+
min-height: 50px;
|
|
444
|
+
width: 100%;
|
|
445
|
+
font-size: 16px;
|
|
446
|
+
line-height: 24px;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
@media (min-width: 1024px) {
|
|
450
|
+
|
|
451
|
+
.bk.bk-editable-field .bk-editable-field-input textarea {
|
|
452
|
+
font-size: 18px;
|
|
453
|
+
line-height: 28px;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.bk.bk-editable-field .bk-editable-field-input textarea {
|
|
458
|
+
position: absolute;
|
|
459
|
+
top: 0px;
|
|
460
|
+
left: 0px;
|
|
461
|
+
height: 100%;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.bk.bk-editable-field .bk-editable-field-translate {
|
|
465
|
+
display: flex;
|
|
466
|
+
align-items: center;
|
|
467
|
+
gap: 3px;
|
|
468
|
+
border-right-width: 1px;
|
|
469
|
+
--bk-tw-border-opacity: 1;
|
|
470
|
+
border-right-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-border-opacity, 1));
|
|
471
|
+
padding-left: 10px;
|
|
472
|
+
padding-right: 10px;
|
|
473
|
+
--bk-tw-text-opacity: 1;
|
|
474
|
+
color: rgb(var(--bk-theme-teal-dark) / var(--bk-tw-text-opacity, 1));
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.bk.bk-editable-field .bk-editable-field-translate:disabled {
|
|
478
|
+
opacity: 0.5;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.bk.bk-editable-field .bk-editable-field-info-error {
|
|
482
|
+
margin-left: auto;
|
|
483
|
+
padding-left: 10px;
|
|
484
|
+
padding-right: 10px;
|
|
485
|
+
--bk-tw-text-opacity: 1;
|
|
486
|
+
color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-text-opacity, 1));
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.bk.bk-editable-field .bk-editable-field-info-hint {
|
|
490
|
+
margin-left: auto;
|
|
491
|
+
padding-left: 10px;
|
|
492
|
+
padding-right: 10px;
|
|
493
|
+
text-align: right;
|
|
494
|
+
font-size: 12px;
|
|
495
|
+
line-height: 16px;
|
|
496
|
+
font-weight: 400;
|
|
497
|
+
--bk-tw-text-opacity: 1;
|
|
498
|
+
color: rgb(var(--bk-theme-mono-500) / var(--bk-tw-text-opacity, 1));
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.bk.bk-editable-field .bk-editable-field-readability {
|
|
502
|
+
position: relative;
|
|
503
|
+
display: flex;
|
|
504
|
+
height: 32px;
|
|
505
|
+
cursor: default;
|
|
506
|
+
align-items: center;
|
|
507
|
+
gap: 5px;
|
|
508
|
+
border-left-width: 1px;
|
|
509
|
+
--bk-tw-border-opacity: 1;
|
|
510
|
+
border-left-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-border-opacity, 1));
|
|
511
|
+
padding-left: 10px;
|
|
512
|
+
padding-right: 10px;
|
|
513
|
+
font-size: 12px;
|
|
514
|
+
line-height: 16px;
|
|
515
|
+
--bk-tw-text-opacity: 1;
|
|
516
|
+
color: rgb(var(--bk-theme-mono-600) / var(--bk-tw-text-opacity, 1));
|
|
517
|
+
transition-property: opacity;
|
|
518
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
519
|
+
transition-duration: 200ms;
|
|
520
|
+
cursor: help;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.bk.bk-editable-field .bk-editable-field-readability.bk-is-stale {
|
|
524
|
+
opacity: 0.4;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.bk.bk-editable-field .bk-readability-scale {
|
|
528
|
+
margin-top: 15px;
|
|
529
|
+
width: 100%;
|
|
530
|
+
padding-bottom: 25px;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.bk.bk-editable-field .bk-readability-scale-labels {
|
|
534
|
+
position: relative;
|
|
535
|
+
height: 16px;
|
|
536
|
+
font-size: 12px;
|
|
537
|
+
line-height: 16px;
|
|
538
|
+
font-weight: 600;
|
|
539
|
+
--bk-tw-text-opacity: 1;
|
|
540
|
+
color: rgb(var(--bk-theme-mono-50) / var(--bk-tw-text-opacity, 1));
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.bk.bk-editable-field .bk-readability-scale-labels > span {
|
|
544
|
+
position: absolute;
|
|
545
|
+
top: -5px;
|
|
546
|
+
--bk-tw-translate-x: -50%;
|
|
547
|
+
transform: translate(var(--bk-tw-translate-x), var(--bk-tw-translate-y)) rotate(var(--bk-tw-rotate)) skewX(var(--bk-tw-skew-x)) skewY(var(--bk-tw-skew-y)) scaleX(var(--bk-tw-scale-x)) scaleY(var(--bk-tw-scale-y));
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.bk.bk-editable-field .bk-readability-scale-bar {
|
|
551
|
+
position: relative;
|
|
552
|
+
height: 12px;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.bk.bk-editable-field .bk-readability-scale-segments {
|
|
556
|
+
position: absolute;
|
|
557
|
+
inset: 0px;
|
|
558
|
+
overflow: hidden;
|
|
559
|
+
border-radius: 9999px;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.bk.bk-editable-field .bk-readability-scale-segment {
|
|
563
|
+
position: absolute;
|
|
564
|
+
top: 0px;
|
|
565
|
+
height: 100%;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.bk.bk-editable-field .bk-readability-scale-segment.bk-is-left {
|
|
569
|
+
left: 0px;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.bk.bk-editable-field .bk-readability-scale-segment.bk-is-middle {
|
|
573
|
+
--bk-tw-bg-opacity: 1;
|
|
574
|
+
background-color: rgb(var(--bk-theme-yellow-normal) / var(--bk-tw-bg-opacity, 1));
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/* higher_easier (e.g. FRE): low=hard, high=easy */
|
|
578
|
+
|
|
579
|
+
.bk.bk-editable-field .bk-readability-scale.bk-is-higher_easier .bk-is-left {
|
|
580
|
+
--bk-tw-bg-opacity: 1;
|
|
581
|
+
background-color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-bg-opacity, 1));
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.bk.bk-editable-field .bk-readability-scale.bk-is-higher_easier .bk-is-right {
|
|
585
|
+
--bk-tw-bg-opacity: 1;
|
|
586
|
+
background-color: rgb(var(--bk-theme-lime-normal) / var(--bk-tw-bg-opacity, 1));
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/* higher_harder (e.g. LIX): low=easy, high=hard */
|
|
590
|
+
|
|
591
|
+
.bk.bk-editable-field .bk-readability-scale.bk-is-higher_harder .bk-is-left {
|
|
592
|
+
--bk-tw-bg-opacity: 1;
|
|
593
|
+
background-color: rgb(var(--bk-theme-lime-normal) / var(--bk-tw-bg-opacity, 1));
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.bk.bk-editable-field .bk-readability-scale.bk-is-higher_harder .bk-is-right {
|
|
597
|
+
--bk-tw-bg-opacity: 1;
|
|
598
|
+
background-color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-bg-opacity, 1));
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.bk.bk-editable-field .bk-readability-scale-marker {
|
|
602
|
+
position: absolute;
|
|
603
|
+
top: -5px;
|
|
604
|
+
bottom: -5px;
|
|
605
|
+
width: 3px;
|
|
606
|
+
--bk-tw-translate-x: -50%;
|
|
607
|
+
transform: translate(var(--bk-tw-translate-x), var(--bk-tw-translate-y)) rotate(var(--bk-tw-rotate)) skewX(var(--bk-tw-skew-x)) skewY(var(--bk-tw-skew-y)) scaleX(var(--bk-tw-scale-x)) scaleY(var(--bk-tw-scale-y));
|
|
608
|
+
border-radius: 9999px;
|
|
609
|
+
--bk-tw-bg-opacity: 1;
|
|
610
|
+
background-color: rgb(255 255 255 / var(--bk-tw-bg-opacity, 1));
|
|
611
|
+
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.3);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.bk.bk-editable-field .bk-readability-scale-marker > span {
|
|
615
|
+
position: absolute;
|
|
616
|
+
top: 100%;
|
|
617
|
+
left: 50%;
|
|
618
|
+
margin-top: 5px;
|
|
619
|
+
--bk-tw-translate-x: -50%;
|
|
620
|
+
transform: translate(var(--bk-tw-translate-x), var(--bk-tw-translate-y)) rotate(var(--bk-tw-rotate)) skewX(var(--bk-tw-skew-x)) skewY(var(--bk-tw-skew-y)) scaleX(var(--bk-tw-scale-x)) scaleY(var(--bk-tw-scale-y));
|
|
621
|
+
white-space: nowrap;
|
|
622
|
+
font-size: 14px;
|
|
623
|
+
line-height: 20px;
|
|
624
|
+
font-weight: 700;
|
|
625
|
+
--bk-tw-text-opacity: 1;
|
|
626
|
+
color: rgb(255 255 255 / var(--bk-tw-text-opacity, 1));
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.bk.bk-editable-field .bk-editable-field-readability-dot {
|
|
630
|
+
height: 8px;
|
|
631
|
+
width: 8px;
|
|
632
|
+
flex-shrink: 0;
|
|
633
|
+
border-radius: 9999px;
|
|
634
|
+
--bk-tw-bg-opacity: 1;
|
|
635
|
+
background-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-bg-opacity, 1));
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.bk.bk-editable-field .bk-editable-field-readability-dot.bk-is-easy {
|
|
639
|
+
--bk-tw-bg-opacity: 1;
|
|
640
|
+
background-color: rgb(var(--bk-theme-lime-normal) / var(--bk-tw-bg-opacity, 1));
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.bk.bk-editable-field .bk-editable-field-readability-dot.bk-is-ok {
|
|
644
|
+
--bk-tw-bg-opacity: 1;
|
|
645
|
+
background-color: rgb(var(--bk-theme-yellow-normal) / var(--bk-tw-bg-opacity, 1));
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.bk.bk-editable-field .bk-editable-field-readability-dot.bk-is-hard {
|
|
649
|
+
--bk-tw-bg-opacity: 1;
|
|
650
|
+
background-color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-bg-opacity, 1));
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.bk.bk-editable-field .bk-editable-field-info-count {
|
|
654
|
+
display: flex;
|
|
655
|
+
height: 32px;
|
|
656
|
+
align-items: center;
|
|
657
|
+
border-left-width: 1px;
|
|
658
|
+
--bk-tw-border-opacity: 1;
|
|
659
|
+
border-left-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-border-opacity, 1));
|
|
660
|
+
padding-left: 10px;
|
|
661
|
+
padding-right: 10px;
|
|
662
|
+
}
|
|
663
|
+
</style>
|
|
@@ -37,3 +37,12 @@ export default {
|
|
|
37
37
|
name: "EditableMask"
|
|
38
38
|
};
|
|
39
39
|
</script>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
html.bk-hide-non-editable .bk-main-canvas > * {
|
|
43
|
+
visibility: hidden
|
|
44
|
+
}
|
|
45
|
+
html.bk-hide-non-editable .bk-main-canvas [data-blokkli-provider-active='true'] {
|
|
46
|
+
visibility: visible
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -2,49 +2,35 @@
|
|
|
2
2
|
<Teleport to="#bk-toolbar-title">
|
|
3
3
|
<button
|
|
4
4
|
v-if="scheduledDate"
|
|
5
|
-
class="bk-toolbar-title-scheduled"
|
|
5
|
+
class="bk-toolbar-title-scheduled _bk_group/tooltip"
|
|
6
6
|
@click.prevent="eventBus.emit('publish:show-dialog')"
|
|
7
7
|
>
|
|
8
8
|
<Icon name="bk_mdi_calendar_clock" />
|
|
9
9
|
<div class="bk-toolbar-title-scheduled-text">
|
|
10
10
|
<div>{{ formattedScheduledDate }}</div>
|
|
11
11
|
</div>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
12
|
+
<Tooltip
|
|
13
|
+
:label="
|
|
14
|
+
$t('scheduledFor', 'The changes will be published on this date.')
|
|
15
|
+
"
|
|
16
|
+
/>
|
|
19
17
|
</button>
|
|
20
18
|
<button
|
|
21
19
|
ref="buttonEl"
|
|
22
|
-
class="bk-toolbar-button"
|
|
20
|
+
class="bk-toolbar-button _bk_group/tooltip _bk_w-full _bk_justify-start _bk_relative"
|
|
23
21
|
:disabled="!state.canEdit.value"
|
|
24
22
|
@click="eventBus.emit('editEntity')"
|
|
25
23
|
>
|
|
26
|
-
<div class="bk-toolbar-title">
|
|
27
|
-
<div
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'bk-is-warning': entity.status && mutations.length
|
|
33
|
-
}"
|
|
34
|
-
/>
|
|
35
|
-
<strong>{{ entity.label }}</strong>
|
|
24
|
+
<div class="bk-toolbar-title _bk_relative _bk_size-full">
|
|
25
|
+
<div
|
|
26
|
+
class="_bk_min-w-0 _bk_truncate _bk_absolute _bk_top-1/2 _bk_left-0 _bk_w-full _bk_-translate-y-1/2 _bk_text-left _bk_flex _bk_items-center"
|
|
27
|
+
>
|
|
28
|
+
<StatusIndicator :status="statusIndicatorStatus" />
|
|
29
|
+
<strong class="_bk_text-mono-100">{{ entity.label }}</strong>
|
|
36
30
|
<span> {{ entity.bundleLabel }}</span>
|
|
37
31
|
</div>
|
|
38
32
|
</div>
|
|
39
|
-
<
|
|
40
|
-
<span v-if="entity.status && !mutations.length">{{
|
|
41
|
-
statusPublished
|
|
42
|
-
}}</span>
|
|
43
|
-
<span v-else-if="entity.status && mutations.length">{{
|
|
44
|
-
statusPending
|
|
45
|
-
}}</span>
|
|
46
|
-
<span v-else>{{ statusUnpublished }}</span>
|
|
47
|
-
</div>
|
|
33
|
+
<Tooltip :label="tooltipLabel" />
|
|
48
34
|
</button>
|
|
49
35
|
</Teleport>
|
|
50
36
|
</template>
|
|
@@ -56,7 +42,7 @@ import {
|
|
|
56
42
|
computed,
|
|
57
43
|
useTemplateRef
|
|
58
44
|
} from "#imports";
|
|
59
|
-
import { Icon } from "#blokkli/editor/components";
|
|
45
|
+
import { Icon, StatusIndicator, Tooltip } from "#blokkli/editor/components";
|
|
60
46
|
import { defineCommands, defineTourItem } from "#blokkli/editor/composables";
|
|
61
47
|
defineBlokkliFeature({
|
|
62
48
|
id: "entity-title",
|
|
@@ -81,18 +67,17 @@ const formattedScheduledDate = computed(() => {
|
|
|
81
67
|
minute: "2-digit"
|
|
82
68
|
});
|
|
83
69
|
});
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
);
|
|
70
|
+
const tooltipLabel = computed(() => {
|
|
71
|
+
if (entity.value.status && !mutations.value.length) {
|
|
72
|
+
return $t("pageIsPublished", "Page is published");
|
|
73
|
+
} else if (entity.value.status && mutations.value.length) {
|
|
74
|
+
return $t(
|
|
75
|
+
"pageIsPublishedWithPendingChanges",
|
|
76
|
+
"Page is published (changes pending)"
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return $t("pageIsNotPublished", "Page is not published");
|
|
80
|
+
});
|
|
96
81
|
defineCommands(() => {
|
|
97
82
|
return {
|
|
98
83
|
id: "feature:entity-title:edit-entity",
|
|
@@ -105,28 +90,27 @@ defineCommands(() => {
|
|
|
105
90
|
icon: "bk_mdi_edit"
|
|
106
91
|
};
|
|
107
92
|
});
|
|
108
|
-
const tourText = computed(() => {
|
|
109
|
-
const intro = $t(
|
|
110
|
-
"entityTitleTourText",
|
|
111
|
-
"<p>Shows the title and status of the current page.</p><p>Click on the title to open the page edit form.</p>"
|
|
112
|
-
);
|
|
113
|
-
return `
|
|
114
|
-
${intro}
|
|
115
|
-
<ul>
|
|
116
|
-
<li><div class="bk-status-indicator"></div>${statusUnpublished.value}</li>
|
|
117
|
-
<li><div class="bk-status-indicator bk-is-warning"></div>${statusPending.value}</li>
|
|
118
|
-
<li><div class="bk-status-indicator bk-is-success"></div>${statusPublished.value}</li>
|
|
119
|
-
</ul>
|
|
120
|
-
`;
|
|
121
|
-
});
|
|
122
93
|
defineTourItem(() => {
|
|
123
94
|
return {
|
|
124
95
|
id: "entity-title",
|
|
125
96
|
title: $t("entityTitleTourTitle", "Page"),
|
|
126
|
-
text:
|
|
97
|
+
text: $t(
|
|
98
|
+
"entityTitleTourText",
|
|
99
|
+
"<p>Shows the title and status of the current page.</p><p>Click on the title to open the page edit form.</p>"
|
|
100
|
+
),
|
|
127
101
|
element: buttonEl.value
|
|
128
102
|
};
|
|
129
103
|
});
|
|
104
|
+
const statusIndicatorStatus = computed(() => {
|
|
105
|
+
if (entity.value.status) {
|
|
106
|
+
if (mutations.value.length) {
|
|
107
|
+
return "warning";
|
|
108
|
+
} else {
|
|
109
|
+
return "success";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return "error";
|
|
113
|
+
});
|
|
130
114
|
</script>
|
|
131
115
|
|
|
132
116
|
<script>
|