@blokkli/editor 2.0.0-alpha.2 → 2.0.0-alpha.21
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/module.d.mts +1 -1
- package/dist/module.json +5 -5
- package/dist/module.mjs +5549 -1269
- package/dist/modules/drupal/graphql/base/fragment.ParagraphsBlokkliConfigInput.graphql +31 -0
- package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +9 -0
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +5 -0
- package/dist/modules/drupal/graphql/base/fragment.paragraphsFieldItem.graphql +9 -0
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +1 -10
- package/dist/modules/drupal/graphql/base/query.pbEntityConfig.graphql +5 -0
- package/dist/modules/drupal/graphql/features/comments.graphql +11 -8
- package/dist/modules/drupal/graphql/features/publishNew.graphql +1 -4
- package/dist/modules/drupal/graphql/features/scheduler.graphql +31 -0
- package/dist/modules/drupal/graphql/features/transform.graphql +9 -1
- package/dist/modules/drupal/graphql/features/transform_host.graphql +38 -0
- package/dist/modules/drupal/graphql/mutations/set_paragraph_schedule.graphql +15 -0
- package/dist/modules/drupal/graphql/mutations/update_host_options.graphql +15 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/index.mjs +79 -9
- package/dist/modules/drupal/runtime/adapter/index.d.ts +3 -0
- package/dist/modules/drupal/{adapter/index.mjs → runtime/adapter/index.js} +166 -20
- package/dist/runtime/adapter/index.d.ts +111 -1
- package/dist/runtime/blokkliPlugins/AddAction/index.vue +27 -3
- package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue +65 -0
- package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue.d.ts +26 -0
- package/dist/runtime/blokkliPlugins/ContextMenu/Menu/index.vue +6 -0
- package/dist/runtime/blokkliPlugins/ContextMenu/index.vue +3 -2
- package/dist/runtime/blokkliPlugins/ContextMenu/index.vue.d.ts +2 -19
- package/dist/runtime/blokkliPlugins/DebugOverlay/index.vue.d.ts +2 -7
- package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue +3 -3
- package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue.d.ts +2 -19
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue +23 -15
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +21 -44
- package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue +49 -11
- package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue.d.ts +29 -15
- package/dist/runtime/blokkliPlugins/MenuButton/index.vue.d.ts +3 -3
- package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue +6 -7
- package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue.d.ts +2 -51
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue +2 -9
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +15 -9
- package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue.d.ts +1 -1
- package/dist/runtime/blokkliPlugins/TourItem/index.vue +10 -5
- package/dist/runtime/blokkliPlugins/TourItem/index.vue.d.ts +2 -4
- package/dist/runtime/blokkliPlugins/ViewOption/index.vue +6 -3
- package/dist/runtime/blokkliPlugins/ViewOption/index.vue.d.ts +4 -3
- package/dist/runtime/blokkliPlugins/index.d.ts +8 -7
- package/dist/runtime/blokkliPlugins/index.js +15 -13
- package/dist/runtime/components/Blocks/Fragment/icon.svg +1 -1
- package/dist/runtime/components/Blocks/FromLibrary/index.vue +4 -2
- package/dist/runtime/components/BlokkliEditable.vue +34 -16
- package/dist/runtime/components/BlokkliEditable.vue.d.ts +2 -1
- package/dist/runtime/components/BlokkliField.vue +31 -27
- package/dist/runtime/components/BlokkliField.vue.d.ts +61 -17
- package/dist/runtime/components/BlokkliItem.vue +2 -2
- package/dist/runtime/components/BlokkliItem.vue.d.ts +4 -2
- package/dist/runtime/components/BlokkliProvider.vue +60 -45
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +45 -7
- package/dist/runtime/components/Edit/Actions/index.vue +69 -78
- package/dist/runtime/components/Edit/AddListItem/index.vue +2 -5
- package/dist/runtime/components/Edit/AddListItem/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/AddListItemIcon/index.vue +19 -0
- package/dist/runtime/components/Edit/AddListItemIcon/index.vue.d.ts +15 -0
- package/dist/runtime/components/Edit/AnimationCanvas/index.vue +436 -25
- package/dist/runtime/components/Edit/AppMenu/index.vue +5 -5
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +83 -0
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue.d.ts +32 -0
- package/dist/runtime/components/Edit/Banner/index.vue +51 -0
- package/dist/runtime/components/Edit/Banner/index.vue.d.ts +18 -0
- package/dist/runtime/components/Edit/BlockProxy/index.vue +3 -1
- package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue.d.ts +2 -13
- package/dist/runtime/components/Edit/Dialog/index.vue +14 -5
- package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +4 -2
- package/dist/runtime/components/Edit/DiffViewer/State.vue +276 -0
- package/dist/runtime/components/Edit/DiffViewer/State.vue.d.ts +16 -0
- package/dist/runtime/components/Edit/DraggableList.vue +20 -50
- package/dist/runtime/components/Edit/DraggableList.vue.d.ts +7 -7
- package/dist/runtime/components/Edit/EditIndicator.vue +118 -44
- package/dist/runtime/components/Edit/EditIndicator.vue.d.ts +3 -0
- package/dist/runtime/components/Edit/EditProvider.vue +192 -80
- package/dist/runtime/components/Edit/EditProvider.vue.d.ts +3 -0
- package/dist/runtime/components/Edit/Features/AddList/index.vue +24 -36
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/fragment.glsl +58 -0
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +170 -0
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue.d.ts +9 -0
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/vertex.glsl +72 -0
- package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue +159 -0
- package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue +100 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue +56 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue.d.ts +3 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue +87 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +105 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue.d.ts +8 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Status.vue +18 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Status.vue.d.ts +8 -0
- package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue +92 -0
- package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue.d.ts +17 -0
- package/dist/runtime/components/Edit/Features/Analyze/Summary/index.vue +77 -0
- package/dist/runtime/components/Edit/Features/Analyze/Summary/index.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.d.ts +12 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.js +75 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/defineAnalyzer.d.ts +4 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/defineAnalyzer.js +5 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.d.ts +32 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.js +45 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/collectTextElements.d.ts +5 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/collectTextElements.js +95 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/normalizeArray.d.ts +3 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/normalizeArray.js +13 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/index.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/index.js +2 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.js +165 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.d.ts +44 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.js +0 -0
- package/dist/runtime/components/Edit/Features/Analyze/helper.d.ts +5 -0
- package/dist/runtime/components/Edit/Features/Analyze/helper.js +28 -0
- package/dist/runtime/components/Edit/Features/Analyze/index.vue +44 -0
- package/dist/runtime/components/Edit/Features/Anchors/Renderer.vue +53 -0
- package/dist/runtime/components/Edit/Features/Anchors/index.vue +32 -0
- package/dist/runtime/components/Edit/Features/Artboard/Overview/index.vue +25 -13
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +299 -0
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Features/Artboard/index.vue +10 -217
- package/dist/runtime/components/Edit/Features/Assistant/index.vue +5 -3
- package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +33 -57
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue +154 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue.d.ts +27 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +222 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue.d.ts +11 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue +96 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Clipboard/index.vue +177 -46
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue +51 -0
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue.d.ts +17 -0
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +48 -117
- package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +5 -2
- package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue +35 -20
- package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue.d.ts +5 -3
- package/dist/runtime/components/Edit/Features/Comments/CommentInput/index.vue +29 -0
- package/dist/runtime/components/Edit/Features/Comments/CommentInput/index.vue.d.ts +13 -0
- package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue +22 -16
- package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue.d.ts +1 -0
- package/dist/runtime/components/Edit/Features/Comments/Overlay/index.vue +15 -6
- package/dist/runtime/components/Edit/Features/Comments/index.vue +21 -9
- package/dist/runtime/components/Edit/Features/Conversions/index.vue +16 -21
- package/dist/runtime/components/Edit/Features/Debug/Rects/index.vue +26 -35
- package/dist/runtime/components/Edit/Features/Debug/Renderer.vue +240 -0
- package/dist/runtime/components/Edit/Features/Debug/Renderer.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Debug/Viewport/index.vue +14 -0
- package/dist/runtime/components/Edit/Features/Debug/index.vue +7 -162
- package/dist/runtime/components/Edit/Features/Delete/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Diff/DiffView/index.vue +13 -190
- package/dist/runtime/components/Edit/Features/Diff/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +18 -10
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/fragment.glsl +8 -2
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +111 -121
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue.d.ts +3 -132
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/vertex.glsl +2 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +87 -61
- package/dist/runtime/components/Edit/Features/Duplicate/index.vue +6 -8
- package/dist/runtime/components/Edit/Features/Edit/index.vue +16 -22
- package/dist/runtime/components/Edit/Features/EditForm/Frame/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/EditForm/index.vue +10 -9
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue +69 -4
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Plaintext/index.vue +13 -9
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +45 -87
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/EditableField/index.vue +45 -43
- package/dist/runtime/components/Edit/Features/EditableMask/index.vue +3 -20
- package/dist/runtime/components/Edit/Features/EntityTitle/index.vue +33 -1
- package/dist/runtime/components/Edit/Features/Fragments/Dialog/index.vue +11 -9
- package/dist/runtime/components/Edit/Features/Fragments/index.vue +8 -6
- package/dist/runtime/components/Edit/Features/History/index.vue +39 -13
- package/dist/runtime/components/Edit/Features/Hover/Overlay/fragment.glsl +139 -0
- package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue +261 -0
- package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Hover/Overlay/vertex.glsl +117 -0
- package/dist/runtime/components/Edit/Features/Hover/index.vue +25 -0
- package/dist/runtime/components/Edit/Features/Hover/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +6 -2
- package/dist/runtime/components/Edit/Features/ImportExisting/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +5 -7
- package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +19 -27
- package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +32 -28
- package/dist/runtime/components/Edit/Features/Library/index.vue +40 -32
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +11 -11
- package/dist/runtime/components/Edit/Features/MediaLibrary/index.vue +15 -12
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/fragment.glsl +1 -1
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +44 -32
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/vertex.glsl +1 -1
- package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +10 -18
- package/dist/runtime/components/Edit/Features/Options/Form/Checkbox/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Options/Form/Checkbox/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Options/Form/Group.vue.d.ts +2 -11
- package/dist/runtime/components/Edit/Features/Options/Form/Item.vue +14 -3
- package/dist/runtime/components/Edit/Features/Options/Form/Item.vue.d.ts +0 -1
- package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue +37 -19
- package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue.d.ts +8 -2
- package/dist/runtime/components/Edit/Features/Options/Form/index.vue +88 -42
- package/dist/runtime/components/Edit/Features/Options/Form/index.vue.d.ts +5 -5
- package/dist/runtime/components/Edit/Features/Options/index.vue +35 -11
- package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue +35 -0
- package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Ownership/index.vue +7 -25
- package/dist/runtime/components/Edit/Features/PreviewGrant/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/ProxyView/index.vue +5 -1
- package/dist/runtime/components/Edit/Features/Publish/Dialog/Item.vue +41 -14
- package/dist/runtime/components/Edit/Features/Publish/Dialog/Item.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/PublishOption.vue +47 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/PublishOption.vue.d.ts +19 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/Summary.vue +83 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/Summary.vue.d.ts +9 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +439 -123
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue.d.ts +3 -14
- package/dist/runtime/components/Edit/Features/Publish/index.vue +57 -24
- package/dist/runtime/components/Edit/Features/ResponsivePreview/Frame/index.vue.d.ts +2 -13
- package/dist/runtime/components/Edit/Features/Revert/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Page/index.vue +15 -15
- package/dist/runtime/components/Edit/Features/Search/index.vue +7 -3
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +85 -0
- package/dist/runtime/components/Edit/Features/{CommandPalette/Palette/Group → Selection/AddButtons/Overlay}/index.vue.d.ts +8 -13
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/fragment.glsl +106 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +440 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue.d.ts +32 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/vertex.glsl +102 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +387 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Selection/Overlay/fragment.glsl +15 -10
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue +105 -25
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue.d.ts +5 -3
- package/dist/runtime/components/Edit/Features/Selection/Overlay/vertex.glsl +12 -3
- package/dist/runtime/components/Edit/Features/Selection/OverlayFallback/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Selection/index.vue +135 -25
- package/dist/runtime/components/Edit/Features/Settings/Dialog/FeatureSetting/index.vue +12 -17
- package/dist/runtime/components/Edit/Features/Settings/index.vue +11 -25
- package/dist/runtime/components/Edit/Features/Structure/List/Field/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Structure/List/Item/index.vue +13 -6
- package/dist/runtime/components/Edit/Features/Theme/Color/index.vue +5 -1
- package/dist/runtime/components/Edit/Features/Theme/index.vue +2 -1
- package/dist/runtime/components/Edit/Features/TouchActionBar/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +3 -0
- package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue +198 -0
- package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue.d.ts +13 -0
- package/dist/runtime/components/Edit/Features/Transform/index.vue +156 -70
- package/dist/runtime/components/Edit/Features/Translations/Banner/index.vue +17 -11
- package/dist/runtime/components/Edit/Features/Translations/index.vue +20 -23
- package/dist/runtime/components/Edit/Features/Validations/SidebarItem/index.vue +5 -5
- package/dist/runtime/components/Edit/Features/index.vue +17 -7
- package/dist/runtime/components/Edit/Form/Datepicker/index.vue +198 -0
- package/dist/runtime/components/Edit/Form/Datepicker/index.vue.d.ts +15 -0
- package/dist/runtime/components/Edit/Form/Group/index.vue.d.ts +2 -4
- package/dist/runtime/components/Edit/Form/Item/index.vue.d.ts +2 -4
- package/dist/runtime/components/Edit/Form/Radio/index.vue +33 -0
- package/dist/runtime/components/Edit/Form/Radio/index.vue.d.ts +20 -0
- package/dist/runtime/components/Edit/Form/RadioTabs/index.vue +37 -0
- package/dist/runtime/components/Edit/Form/RadioTabs/index.vue.d.ts +22 -0
- package/dist/runtime/components/Edit/Form/Select/index.vue +29 -0
- package/dist/runtime/components/Edit/Form/Select/index.vue.d.ts +20 -0
- package/dist/runtime/components/Edit/Form/Text/index.vue +34 -0
- package/dist/runtime/components/Edit/Form/Text/index.vue.d.ts +20 -0
- package/dist/runtime/components/Edit/Form/Textarea/index.vue +13 -6
- package/dist/runtime/components/Edit/Form/Textarea/index.vue.d.ts +4 -0
- package/dist/runtime/components/Edit/Form/Toggle/index.vue +4 -3
- package/dist/runtime/components/Edit/Form/Toggle/index.vue.d.ts +12 -2
- package/dist/runtime/components/Edit/FormOverlay/index.vue +1 -1
- package/dist/runtime/components/Edit/FormOverlay/index.vue.d.ts +3 -2
- package/dist/runtime/components/Edit/Indicators/index.vue +123 -0
- package/dist/runtime/components/Edit/Indicators/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/InfoBox/index.vue +6 -2
- package/dist/runtime/components/Edit/InfoBox/index.vue.d.ts +12 -2
- package/dist/runtime/components/Edit/ItemIcon/index.vue +2 -1
- package/dist/runtime/components/Edit/Konami/Game/PixelGrid.vue +66 -0
- package/dist/runtime/components/Edit/Konami/Game/PixelGrid.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Konami/Game/blokkli.png +0 -0
- package/dist/runtime/components/Edit/Konami/Game/charmap.d.ts +2 -0
- package/dist/runtime/components/Edit/Konami/Game/charmap.js +168 -0
- package/dist/runtime/components/Edit/Konami/Game/index.vue +752 -0
- package/dist/runtime/components/Edit/Konami/Game/index.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Konami/Game/textRendering.d.ts +8 -0
- package/dist/runtime/components/Edit/Konami/Game/textRendering.js +138 -0
- package/dist/runtime/components/Edit/Konami/Game/useIconRendering.d.ts +9 -0
- package/dist/runtime/components/Edit/Konami/Game/useIconRendering.js +130 -0
- package/dist/runtime/components/Edit/Konami/index.vue +44 -0
- package/dist/runtime/components/Edit/Konami/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Loading/index.vue +6 -2
- package/dist/runtime/components/Edit/Loading/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Messages/index.vue +8 -3
- package/dist/runtime/components/Edit/PluginConfigForm/Checkbox/index.vue +17 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Checkbox/index.vue.d.ts +11 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Options/index.vue +37 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Options/index.vue.d.ts +11 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Text/index.vue +43 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Text/index.vue.d.ts +11 -0
- package/dist/runtime/components/Edit/PluginConfigForm/index.vue +57 -0
- package/dist/runtime/components/Edit/PluginConfigForm/index.vue.d.ts +16 -0
- package/dist/runtime/components/Edit/PreviewProvider.vue +3 -4
- package/dist/runtime/components/Edit/RelativeTime/index.vue +3 -2
- package/dist/runtime/components/Edit/RelativeTime/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Resizable/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/ScaleToFit/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/ScheduleDate/index.vue +131 -0
- package/dist/runtime/components/Edit/ScheduleDate/index.vue.d.ts +23 -0
- package/dist/runtime/components/Edit/ScrollBoundary/index.vue.d.ts +2 -7
- package/dist/runtime/components/Edit/ShortcutIndicator/index.vue +11 -3
- package/dist/runtime/components/Edit/Sortli/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/SystemRequirements/index.vue +3 -3
- package/dist/runtime/components/Edit/Toolbar/index.vue +3 -2
- package/dist/runtime/components/Edit/Transition/Height.vue +95 -0
- package/dist/runtime/components/Edit/Transition/Height.vue.d.ts +36 -0
- package/dist/runtime/components/Edit/Transition/index.vue +41 -0
- package/dist/runtime/components/Edit/Transition/index.vue.d.ts +19 -0
- package/dist/runtime/components/Edit/ViewportBlockingRect/index.vue.d.ts +2 -7
- package/dist/runtime/components/Edit/index.d.ts +28 -15
- package/dist/runtime/components/Edit/index.js +54 -28
- package/dist/runtime/composables/defineBlokkli.js +16 -3
- package/dist/runtime/composables/defineBlokkliFeature.d.ts +4 -7
- package/dist/runtime/composables/defineBlokkliFragment.js +8 -1
- package/dist/runtime/composables/defineBlokkliProvider.d.ts +11 -0
- package/dist/runtime/composables/defineBlokkliProvider.js +46 -0
- package/dist/runtime/composables/useBlokkliHelper.d.ts +19 -0
- package/dist/runtime/composables/useBlokkliHelper.js +95 -0
- package/dist/runtime/constants/index.d.ts +3 -0
- package/dist/runtime/constants/index.js +3 -0
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/addElementClasses.d.ts +2 -0
- package/dist/runtime/helpers/addElementClasses.js +24 -0
- package/dist/runtime/helpers/animationProvider.d.ts +38 -2
- package/dist/runtime/helpers/animationProvider.js +188 -47
- package/dist/runtime/helpers/bundles/index.d.ts +1 -0
- package/dist/runtime/helpers/bundles/index.js +4 -0
- package/dist/runtime/helpers/composables/defineRenderer.d.ts +8 -0
- package/dist/runtime/helpers/composables/defineRenderer.js +8 -0
- package/dist/runtime/helpers/composables/useBlockRegistration.d.ts +5 -0
- package/dist/runtime/helpers/composables/useBlockRegistration.js +23 -0
- package/dist/runtime/helpers/composables/useDelayedIntersectionObserver.d.ts +1 -1
- package/dist/runtime/helpers/composables/useDelayedIntersectionObserver.js +3 -2
- package/dist/runtime/helpers/composables/useStateBasedCache.d.ts +4 -0
- package/dist/runtime/helpers/composables/useStateBasedCache.js +13 -0
- package/dist/runtime/helpers/composables/useStickyToolbar.d.ts +23 -0
- package/dist/runtime/helpers/composables/useStickyToolbar.js +233 -0
- package/dist/runtime/helpers/definitionProvider.d.ts +3 -2
- package/dist/runtime/helpers/definitionProvider.js +17 -0
- package/dist/runtime/helpers/dom/index.d.ts +60 -0
- package/dist/runtime/helpers/dom/index.js +48 -0
- package/dist/runtime/helpers/domProvider.d.ts +58 -17
- package/dist/runtime/helpers/domProvider.js +320 -245
- package/dist/runtime/helpers/dropTargets/index.d.ts +6 -0
- package/dist/runtime/helpers/dropTargets/index.js +49 -0
- package/dist/runtime/helpers/eventBus.d.ts +1 -1
- package/dist/runtime/helpers/eventBus.js +2 -2
- package/dist/runtime/helpers/index.d.ts +10 -14
- package/dist/runtime/helpers/index.js +58 -121
- package/dist/runtime/helpers/indicatorsProvider.d.ts +10 -0
- package/dist/runtime/helpers/indicatorsProvider.js +23 -0
- package/dist/runtime/helpers/keyboardProvider.d.ts +2 -0
- package/dist/runtime/helpers/keyboardProvider.js +17 -1
- package/dist/runtime/helpers/pluginProvider.d.ts +10 -0
- package/dist/runtime/helpers/pluginProvider.js +33 -0
- package/dist/runtime/helpers/providers/blocks.d.ts +10 -0
- package/dist/runtime/helpers/providers/blocks.js +91 -0
- package/dist/runtime/helpers/providers/directive.d.ts +25 -0
- package/dist/runtime/helpers/providers/directive.js +208 -0
- package/dist/runtime/helpers/providers/element.d.ts +6 -0
- package/dist/runtime/helpers/providers/element.js +35 -0
- package/dist/runtime/helpers/providers/fields.d.ts +8 -0
- package/dist/runtime/helpers/providers/fields.js +47 -0
- package/dist/runtime/helpers/renderCycle.d.ts +1 -0
- package/dist/runtime/helpers/renderCycle.js +10 -0
- package/dist/runtime/helpers/runtimeHelpers/index.js +15 -12
- package/dist/runtime/helpers/selectionProvider.d.ts +27 -11
- package/dist/runtime/helpers/selectionProvider.js +79 -74
- package/dist/runtime/helpers/stateProvider.d.ts +12 -2
- package/dist/runtime/helpers/stateProvider.js +164 -20
- package/dist/runtime/helpers/storageProvider.d.ts +5 -3
- package/dist/runtime/helpers/storageProvider.js +61 -4
- package/dist/runtime/helpers/symbols.d.ts +2 -0
- package/dist/runtime/helpers/symbols.js +2 -0
- package/dist/runtime/helpers/textProvider.js +6 -0
- package/dist/runtime/helpers/themeProvider.d.ts +4 -1
- package/dist/runtime/helpers/themeProvider.js +28 -15
- package/dist/runtime/helpers/transform.js +1 -3
- package/dist/runtime/helpers/typesProvider.js +10 -26
- package/dist/runtime/helpers/uiProvider.d.ts +18 -3
- package/dist/runtime/helpers/uiProvider.js +114 -61
- package/dist/runtime/helpers/useTransitionedValue.d.ts +18 -0
- package/dist/runtime/helpers/useTransitionedValue.js +57 -0
- package/dist/runtime/helpers/webgl/index.d.ts +11 -2
- package/dist/runtime/helpers/webgl/index.js +162 -7
- package/dist/runtime/icons/anchor.svg +1 -0
- package/dist/runtime/icons/arrow-left.svg +1 -1
- package/dist/runtime/icons/arrow-right.svg +1 -1
- package/dist/runtime/icons/arrow-top-right.svg +1 -0
- package/dist/runtime/icons/calendar-clock.svg +1 -0
- package/dist/runtime/icons/calendar.svg +1 -0
- package/dist/runtime/icons/chart.svg +1 -0
- package/dist/runtime/icons/clock.svg +1 -0
- package/dist/runtime/icons/comment_add.svg +1 -5
- package/dist/runtime/icons/copy.svg +1 -0
- package/dist/runtime/icons/cursor-move.svg +1 -1
- package/dist/runtime/icons/delete.svg +1 -8
- package/dist/runtime/icons/diff.svg +1 -1
- package/dist/runtime/icons/duplicate.svg +1 -12
- package/dist/runtime/icons/edit.svg +1 -8
- package/dist/runtime/icons/eye-off.svg +1 -0
- package/dist/runtime/icons/eye.svg +1 -1
- package/dist/runtime/icons/info.svg +1 -1
- package/dist/runtime/icons/link.svg +1 -0
- package/dist/runtime/icons/reusable.svg +1 -5
- package/dist/runtime/icons/speedometer.svg +1 -0
- package/dist/runtime/plugins/blokkliDirectives.js +109 -0
- package/dist/runtime/types/blokkOptions.d.ts +8 -0
- package/dist/runtime/types/index.d.ts +278 -42
- package/dist/runtime/types/theme.d.ts +2 -1
- package/dist/shared/{editor.gz_ac6uT.d.mts → editor.CKsrTpc1.d.mts} +1 -1
- package/package.json +55 -38
- package/dist/modules/drupal/adapter/index.d.mts +0 -6
- package/dist/runtime/components/Edit/DragInteractions/index.vue +0 -364
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue +0 -51
- package/dist/runtime/components/Edit/Features/FieldAreas/Overlay/index.vue +0 -22
- package/dist/runtime/components/Edit/Features/FieldAreas/index.vue +0 -41
- package/dist/runtime/plugins/blokkliEditable.js +0 -31
- /package/dist/runtime/components/Edit/{DragInteractions → Features/Analyze}/index.vue.d.ts +0 -0
- /package/dist/runtime/components/Edit/Features/{FieldAreas/Overlay/index.vue.d.ts → Anchors/Renderer.vue.d.ts} +0 -0
- /package/dist/runtime/components/Edit/Features/{FieldAreas → Anchors}/index.vue.d.ts +0 -0
- /package/dist/runtime/plugins/{blokkliEditable.d.ts → blokkliDirectives.d.ts} +0 -0
|
@@ -2,12 +2,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2
2
|
label: string;
|
|
3
3
|
property: string;
|
|
4
4
|
modelValue?: string;
|
|
5
|
+
required?: boolean;
|
|
5
6
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
7
|
"update:modelValue": (...args: any[]) => void;
|
|
7
8
|
}, string, import("vue").PublicProps, Readonly<{
|
|
8
9
|
label: string;
|
|
9
10
|
property: string;
|
|
10
11
|
modelValue?: string;
|
|
12
|
+
required?: boolean;
|
|
11
13
|
}> & Readonly<{
|
|
12
14
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
13
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import { Icon } from '#blokkli/components';
|
|
2
1
|
type __VLS_Props = {
|
|
3
2
|
label: string;
|
|
4
3
|
isActive: boolean;
|
|
5
4
|
};
|
|
6
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
7
5
|
declare var __VLS_5: {};
|
|
8
|
-
type __VLS_Slots =
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
9
7
|
default?: (props: typeof __VLS_5) => any;
|
|
10
|
-
}
|
|
11
|
-
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
12
|
-
Icon: typeof Icon;
|
|
13
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
-
toggle: (...args: any[]) => void;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
onToggle?: ((...args: any[]) => any) | undefined;
|
|
17
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
};
|
|
18
9
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
10
|
toggle: (...args: any[]) => void;
|
|
20
11
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
v-if="showLabel"
|
|
5
5
|
:class="isGrouped ? 'bk-blokkli-item-options-item-label' : 'bk-tooltip'"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
7
|
+
<div class="bk-is-label">
|
|
8
|
+
<span>{{ label }}</span>
|
|
9
|
+
<span v-if="hoveredOption">: {{ hoveredOption }}</span>
|
|
10
|
+
</div>
|
|
11
|
+
<span v-if="description">{{ description }}</span>
|
|
8
12
|
</div>
|
|
9
13
|
<div
|
|
10
14
|
class="bk-blokkli-item-options-item-content"
|
|
@@ -15,6 +19,7 @@
|
|
|
15
19
|
<OptionRadios
|
|
16
20
|
v-if="option.type === 'radios'"
|
|
17
21
|
v-model="value"
|
|
22
|
+
v-model:hovered="hoveredOption"
|
|
18
23
|
:label="label"
|
|
19
24
|
:options="option.options"
|
|
20
25
|
:property="property"
|
|
@@ -74,7 +79,7 @@
|
|
|
74
79
|
</template>
|
|
75
80
|
|
|
76
81
|
<script setup>
|
|
77
|
-
import { computed, useBlokkli } from "#imports";
|
|
82
|
+
import { ref, computed, useBlokkli } from "#imports";
|
|
78
83
|
import OptionRadios from "./Radios/index.vue";
|
|
79
84
|
import OptionCheckbox from "./Checkbox/index.vue";
|
|
80
85
|
import OptionCheckboxes from "./Checkboxes/index.vue";
|
|
@@ -94,9 +99,9 @@ const props = defineProps({
|
|
|
94
99
|
option: { type: Object, required: true },
|
|
95
100
|
property: { type: String, required: true },
|
|
96
101
|
mutatedValue: { type: null, required: true },
|
|
97
|
-
uuids: { type: Array, required: true },
|
|
98
102
|
isGrouped: { type: Boolean, required: false }
|
|
99
103
|
});
|
|
104
|
+
const hoveredOption = ref("");
|
|
100
105
|
const showLabel = computed(() => {
|
|
101
106
|
if (props.isGrouped) {
|
|
102
107
|
if (props.option.type === "checkbox") {
|
|
@@ -108,6 +113,12 @@ const showLabel = computed(() => {
|
|
|
108
113
|
const label = computed(
|
|
109
114
|
() => $blokkliText(`blockOption_${props.property}_label`, props.option.label)
|
|
110
115
|
);
|
|
116
|
+
const description = computed(
|
|
117
|
+
() => $blokkliText(
|
|
118
|
+
`blockOption_${props.property}_description`,
|
|
119
|
+
props.option.description
|
|
120
|
+
)
|
|
121
|
+
);
|
|
111
122
|
const checkboxOptions = computed(() => {
|
|
112
123
|
if (props.option.type !== "checkboxes") {
|
|
113
124
|
return [];
|
|
@@ -3,7 +3,6 @@ type __VLS_Props = {
|
|
|
3
3
|
option: BlockOptionDefinition;
|
|
4
4
|
property: string;
|
|
5
5
|
mutatedValue: any;
|
|
6
|
-
uuids: string[];
|
|
7
6
|
isGrouped?: boolean;
|
|
8
7
|
};
|
|
9
8
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -6,8 +6,13 @@
|
|
|
6
6
|
'bk-is-grid': displayAs === 'grid',
|
|
7
7
|
'bk-is-icons': displayAs === 'icons'
|
|
8
8
|
}"
|
|
9
|
+
@mouseleave="onMouseLeave"
|
|
9
10
|
>
|
|
10
|
-
<label
|
|
11
|
+
<label
|
|
12
|
+
v-for="option in mappedOptions"
|
|
13
|
+
:key="option.key"
|
|
14
|
+
@mouseenter="active = option.label"
|
|
15
|
+
>
|
|
11
16
|
<div v-bind="getInputWrapperAttributes(option.value)">
|
|
12
17
|
<input
|
|
13
18
|
:id="option.key"
|
|
@@ -15,7 +20,7 @@
|
|
|
15
20
|
:name="property"
|
|
16
21
|
:value="option.key"
|
|
17
22
|
:checked="modelValue === option.key"
|
|
18
|
-
@change="
|
|
23
|
+
@change="value = option.key"
|
|
19
24
|
/>
|
|
20
25
|
<div
|
|
21
26
|
v-if="
|
|
@@ -51,7 +56,7 @@
|
|
|
51
56
|
</template>
|
|
52
57
|
|
|
53
58
|
<script setup>
|
|
54
|
-
import { computed, useBlokkli } from "#imports";
|
|
59
|
+
import { computed, useBlokkli, onMounted } from "#imports";
|
|
55
60
|
import { Icon } from "#blokkli/components";
|
|
56
61
|
import defineCommands from "#blokkli/helpers/composables/defineCommands";
|
|
57
62
|
const { $t, state } = useBlokkli();
|
|
@@ -59,37 +64,45 @@ const props = defineProps({
|
|
|
59
64
|
label: { type: String, required: true },
|
|
60
65
|
property: { type: String, required: true },
|
|
61
66
|
displayAs: { type: String, required: false },
|
|
62
|
-
options: { type: Object, required: true }
|
|
63
|
-
modelValue: { type: String, required: false }
|
|
67
|
+
options: { type: Object, required: true }
|
|
64
68
|
});
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
const value = defineModel({ type: String, ...{
|
|
70
|
+
default: ""
|
|
71
|
+
} });
|
|
72
|
+
const active = defineModel("hovered", { type: String, ...{
|
|
73
|
+
default: ""
|
|
74
|
+
} });
|
|
75
|
+
function getInputWrapperAttributes(value2) {
|
|
76
|
+
if (props.displayAs === "colors" && typeof value2 !== "string") {
|
|
77
|
+
if (value2.hex && value2.hex.indexOf("#") === 0) {
|
|
69
78
|
return {
|
|
70
|
-
style: "background-color: " +
|
|
79
|
+
style: "background-color: " + value2.hex
|
|
71
80
|
};
|
|
72
|
-
} else if (
|
|
81
|
+
} else if (value2.class) {
|
|
73
82
|
return {
|
|
74
|
-
class:
|
|
83
|
+
class: value2.class
|
|
75
84
|
};
|
|
76
85
|
}
|
|
77
86
|
}
|
|
78
87
|
return {};
|
|
79
88
|
}
|
|
80
89
|
const mappedOptions = computed(() => {
|
|
81
|
-
return Object.entries(props.options).map(([key,
|
|
82
|
-
|
|
90
|
+
return Object.entries(props.options).map(([key, value2]) => {
|
|
91
|
+
const label = typeof value2 === "string" ? value2 : value2.label;
|
|
92
|
+
return { key, value: value2, label };
|
|
83
93
|
});
|
|
84
94
|
});
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
};
|
|
95
|
+
const selectedLabel = computed(() => {
|
|
96
|
+
return mappedOptions.value.find((v) => v.key === value.value)?.label;
|
|
97
|
+
});
|
|
98
|
+
function onMouseLeave() {
|
|
99
|
+
active.value = selectedLabel.value ?? "";
|
|
100
|
+
}
|
|
88
101
|
defineCommands(() => {
|
|
89
102
|
if (state.editMode.value !== "editing") {
|
|
90
103
|
return;
|
|
91
104
|
}
|
|
92
|
-
return mappedOptions.value.filter((v) => v.key !==
|
|
105
|
+
return mappedOptions.value.filter((v) => v.key !== value.value).map((option) => {
|
|
93
106
|
return {
|
|
94
107
|
id: "options:" + props.property + option.key,
|
|
95
108
|
label: $t(
|
|
@@ -98,10 +111,15 @@ defineCommands(() => {
|
|
|
98
111
|
).replace("@option", props.label).replace("@value", option.key),
|
|
99
112
|
group: "selection",
|
|
100
113
|
icon: "form",
|
|
101
|
-
callback: () =>
|
|
114
|
+
callback: () => {
|
|
115
|
+
value.value = option.key;
|
|
116
|
+
}
|
|
102
117
|
};
|
|
103
118
|
});
|
|
104
119
|
});
|
|
120
|
+
onMounted(() => {
|
|
121
|
+
active.value = selectedLabel.value ?? "";
|
|
122
|
+
});
|
|
105
123
|
</script>
|
|
106
124
|
|
|
107
125
|
<script>
|
|
@@ -9,9 +9,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
icon?: string;
|
|
10
10
|
label: string;
|
|
11
11
|
}>;
|
|
12
|
+
} & {
|
|
12
13
|
modelValue?: string;
|
|
14
|
+
hovered?: string;
|
|
13
15
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
-
"update:modelValue": (
|
|
16
|
+
"update:modelValue": (value: string) => any;
|
|
17
|
+
"update:hovered": (value: string) => any;
|
|
15
18
|
}, string, import("vue").PublicProps, Readonly<{
|
|
16
19
|
label: string;
|
|
17
20
|
property: string;
|
|
@@ -23,8 +26,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
26
|
icon?: string;
|
|
24
27
|
label: string;
|
|
25
28
|
}>;
|
|
29
|
+
} & {
|
|
26
30
|
modelValue?: string;
|
|
31
|
+
hovered?: string;
|
|
27
32
|
}> & Readonly<{
|
|
28
|
-
"onUpdate:modelValue"?: ((
|
|
33
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
34
|
+
"onUpdate:hovered"?: ((value: string) => any) | undefined;
|
|
29
35
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
36
|
export default _default;
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
:option="plugin.option"
|
|
13
13
|
:property="plugin.property"
|
|
14
14
|
:mutated-value="currentValues[plugin.property]"
|
|
15
|
-
:uuids="uuids"
|
|
16
15
|
class="bk-blokkli-item-options-item"
|
|
17
16
|
:class="{
|
|
18
17
|
'bk-is-disabled': isDisabled(plugin)
|
|
@@ -34,7 +33,6 @@
|
|
|
34
33
|
:option="plugin.option"
|
|
35
34
|
:property="plugin.property"
|
|
36
35
|
:mutated-value="currentValues[plugin.property]"
|
|
37
|
-
:uuids="uuids"
|
|
38
36
|
class="bk-blokkli-item-options-item"
|
|
39
37
|
:class="{
|
|
40
38
|
'bk-is-disabled': isDisabled(plugin)
|
|
@@ -57,6 +55,8 @@ import {
|
|
|
57
55
|
BK_HIDDEN_GLOBALLY,
|
|
58
56
|
BK_VISIBLE_LANGUAGES
|
|
59
57
|
} from "#blokkli/helpers/symbols";
|
|
58
|
+
import { BUNDLE_FROM_LIBRARY } from "#blokkli/constants";
|
|
59
|
+
import { itemEntityType } from "#blokkli-build/config";
|
|
60
60
|
if (import.meta.hot) {
|
|
61
61
|
import.meta.hot.accept("#blokkli/runtime-helpers", () => {
|
|
62
62
|
});
|
|
@@ -95,14 +95,14 @@ const {
|
|
|
95
95
|
eventBus,
|
|
96
96
|
state,
|
|
97
97
|
selection,
|
|
98
|
-
runtimeConfig,
|
|
99
98
|
dom,
|
|
100
99
|
theme,
|
|
101
100
|
context,
|
|
102
|
-
definitions
|
|
101
|
+
definitions,
|
|
102
|
+
blocks
|
|
103
103
|
} = useBlokkli();
|
|
104
104
|
const props = defineProps({
|
|
105
|
-
uuids: { type: Array, required: true },
|
|
105
|
+
uuids: { type: [Array, String], required: true },
|
|
106
106
|
definition: { type: null, required: true }
|
|
107
107
|
});
|
|
108
108
|
let pointerTimeout = null;
|
|
@@ -134,17 +134,20 @@ function stopChangingOptions() {
|
|
|
134
134
|
if (!selection.isChangingOptions.value) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
props.uuids
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
if (Array.isArray(props.uuids)) {
|
|
138
|
+
props.uuids.forEach((uuid) => {
|
|
139
|
+
dom.refreshBlockRect(uuid);
|
|
140
|
+
const block = blocks.getBlock(uuid);
|
|
141
|
+
if (block) {
|
|
142
|
+
const el = dom.getDragElement(block);
|
|
143
|
+
if (el) {
|
|
144
|
+
theme.invalidateCachedStyle(el);
|
|
145
|
+
}
|
|
144
146
|
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
147
149
|
selection.isChangingOptions.value = false;
|
|
150
|
+
eventBus.emit("option:finish-change");
|
|
148
151
|
}
|
|
149
152
|
class OptionCollector {
|
|
150
153
|
options;
|
|
@@ -205,21 +208,28 @@ function getOptionValue(uuid, key, defaultValue) {
|
|
|
205
208
|
}
|
|
206
209
|
const currentValues = computed(() => {
|
|
207
210
|
return availableOptions.value.reduce((acc, v) => {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
+
if (Array.isArray(props.uuids)) {
|
|
212
|
+
const values = props.uuids.map((uuid) => {
|
|
213
|
+
return JSON.stringify(
|
|
214
|
+
getRuntimeOptionValue(
|
|
215
|
+
v.option,
|
|
216
|
+
getOptionValue(uuid, v.property, v.option.default)
|
|
217
|
+
)
|
|
218
|
+
);
|
|
219
|
+
}).filter(onlyUnique);
|
|
220
|
+
if (values.length === 1) {
|
|
221
|
+
acc[v.property] = getRuntimeOptionValue(
|
|
211
222
|
v.option,
|
|
212
|
-
getOptionValue(
|
|
213
|
-
)
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
223
|
+
getOptionValue(props.uuids[0], v.property, v.option.default)
|
|
224
|
+
);
|
|
225
|
+
} else {
|
|
226
|
+
acc[v.property] = "";
|
|
227
|
+
}
|
|
228
|
+
} else {
|
|
217
229
|
acc[v.property] = getRuntimeOptionValue(
|
|
218
230
|
v.option,
|
|
219
|
-
getOptionValue(
|
|
231
|
+
getOptionValue("HOST", v.property, v.option.default)
|
|
220
232
|
);
|
|
221
|
-
} else {
|
|
222
|
-
acc[v.property] = "";
|
|
223
233
|
}
|
|
224
234
|
return acc;
|
|
225
235
|
}, {});
|
|
@@ -234,17 +244,17 @@ function isInternalOption(property) {
|
|
|
234
244
|
return property === BK_VISIBLE_LANGUAGES || property === BK_HIDDEN_GLOBALLY;
|
|
235
245
|
}
|
|
236
246
|
const visibleOptions = computed(() => {
|
|
237
|
-
if (!props.definition.editor?.determineVisibleOptions) {
|
|
247
|
+
if (!("editor" in props.definition) || !props.definition.editor?.determineVisibleOptions) {
|
|
238
248
|
return availableOptions.value.filter(filterInternal);
|
|
239
249
|
}
|
|
240
250
|
const uuid = props.uuids[0];
|
|
241
251
|
const item = state.getFieldListItem(uuid);
|
|
242
|
-
const block = selection.
|
|
252
|
+
const block = selection.items.value.find((v) => v.uuid === uuid);
|
|
243
253
|
if (!item) {
|
|
244
254
|
return [];
|
|
245
255
|
}
|
|
246
|
-
const parentType = block?.
|
|
247
|
-
const ctxProps = item?.bundle ===
|
|
256
|
+
const parentType = block?.host.type === itemEntityType ? block.parentBlockBundle : void 0;
|
|
257
|
+
const ctxProps = item?.bundle === BUNDLE_FROM_LIBRARY ? item?.props?.libraryItem?.block?.props : item?.props;
|
|
248
258
|
const visibleKeys = (
|
|
249
259
|
// We have to cast to any here because the types are guaranteed to be correct.
|
|
250
260
|
props.definition.editor.determineVisibleOptions({
|
|
@@ -252,7 +262,7 @@ const visibleOptions = computed(() => {
|
|
|
252
262
|
parentType,
|
|
253
263
|
props: ctxProps,
|
|
254
264
|
entity: context.value,
|
|
255
|
-
fieldListType: block?.
|
|
265
|
+
fieldListType: block?.fieldListType ?? "default"
|
|
256
266
|
})
|
|
257
267
|
);
|
|
258
268
|
return availableOptions.value.filter(
|
|
@@ -289,30 +299,53 @@ const optionGroups = computed(() => {
|
|
|
289
299
|
);
|
|
290
300
|
});
|
|
291
301
|
function setOptionValue(key, value) {
|
|
292
|
-
props.uuids
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
state.mutatedOptions[uuid]
|
|
302
|
+
if (Array.isArray(props.uuids)) {
|
|
303
|
+
props.uuids.forEach((uuid) => {
|
|
304
|
+
updated.set(uuid, key, value);
|
|
305
|
+
if (!state.mutatedOptions[uuid]) {
|
|
306
|
+
state.mutatedOptions[uuid] = {};
|
|
307
|
+
}
|
|
308
|
+
state.mutatedOptions[uuid][key] = value;
|
|
309
|
+
eventBus.emit("option:update", { uuid, key, value });
|
|
310
|
+
});
|
|
311
|
+
} else {
|
|
312
|
+
updated.set("HOST", key, value);
|
|
313
|
+
if (!state.mutatedOptions.HOST) {
|
|
314
|
+
state.mutatedOptions.HOST = {};
|
|
296
315
|
}
|
|
297
|
-
state.mutatedOptions[
|
|
298
|
-
|
|
299
|
-
});
|
|
316
|
+
state.mutatedOptions.HOST[key] = value;
|
|
317
|
+
}
|
|
300
318
|
}
|
|
301
319
|
onMounted(() => {
|
|
302
|
-
props.uuids
|
|
320
|
+
if (Array.isArray(props.uuids)) {
|
|
321
|
+
props.uuids.forEach((uuid) => {
|
|
322
|
+
availableOptions.value.forEach((option) => {
|
|
323
|
+
const currentValue = getOptionValue(
|
|
324
|
+
uuid,
|
|
325
|
+
option.property,
|
|
326
|
+
option.option.default
|
|
327
|
+
);
|
|
328
|
+
original.set(
|
|
329
|
+
uuid,
|
|
330
|
+
option.property,
|
|
331
|
+
optionValueToStorable(option.option, currentValue)
|
|
332
|
+
);
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
} else {
|
|
303
336
|
availableOptions.value.forEach((option) => {
|
|
304
337
|
const currentValue = getOptionValue(
|
|
305
|
-
|
|
338
|
+
"HOST",
|
|
306
339
|
option.property,
|
|
307
340
|
option.option.default
|
|
308
341
|
);
|
|
309
342
|
original.set(
|
|
310
|
-
|
|
343
|
+
"HOST",
|
|
311
344
|
option.property,
|
|
312
345
|
optionValueToStorable(option.option, currentValue)
|
|
313
346
|
);
|
|
314
347
|
});
|
|
315
|
-
}
|
|
348
|
+
}
|
|
316
349
|
});
|
|
317
350
|
onBeforeUnmount(() => {
|
|
318
351
|
selection.isChangingOptions.value = false;
|
|
@@ -326,7 +359,20 @@ onBeforeUnmount(() => {
|
|
|
326
359
|
if (!values.length) {
|
|
327
360
|
return;
|
|
328
361
|
}
|
|
329
|
-
|
|
362
|
+
if (Array.isArray(props.uuids)) {
|
|
363
|
+
state.mutateWithLoadingState(() => adapter.updateOptions(values));
|
|
364
|
+
} else {
|
|
365
|
+
state.mutateWithLoadingState(
|
|
366
|
+
() => adapter.updateHostOptions(
|
|
367
|
+
values.map((v) => {
|
|
368
|
+
return {
|
|
369
|
+
...v,
|
|
370
|
+
uuid: void 0
|
|
371
|
+
};
|
|
372
|
+
})
|
|
373
|
+
)
|
|
374
|
+
);
|
|
375
|
+
}
|
|
330
376
|
});
|
|
331
377
|
</script>
|
|
332
378
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { BlockDefinitionInput, FragmentDefinitionInput } from '#blokkli/types';
|
|
1
|
+
import type { BlockDefinitionInput, FragmentDefinitionInput, ProviderDefinitionInput } from '#blokkli/types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
uuids: string[];
|
|
4
|
-
definition: BlockDefinitionInput | FragmentDefinitionInput;
|
|
3
|
+
uuids: string[] | "provider";
|
|
4
|
+
definition: BlockDefinitionInput | FragmentDefinitionInput | ProviderDefinitionInput;
|
|
5
5
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
-
uuids: string[];
|
|
7
|
-
definition: BlockDefinitionInput | FragmentDefinitionInput;
|
|
6
|
+
uuids: string[] | "provider";
|
|
7
|
+
definition: BlockDefinitionInput | FragmentDefinitionInput | ProviderDefinitionInput;
|
|
8
8
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
export default _default;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Teleport to="#bk-blokkli-item-actions-controls">
|
|
3
3
|
<OptionsForm
|
|
4
|
-
v-if="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
:
|
|
4
|
+
v-if="
|
|
5
|
+
definition && !selection.isDragging.value && !ui.isAnimating.value && uuids
|
|
6
|
+
"
|
|
7
|
+
:key="key + state.refreshKey.value + ui.isAnimating.value"
|
|
8
|
+
:uuids
|
|
9
|
+
:definition
|
|
8
10
|
/>
|
|
9
11
|
</Teleport>
|
|
10
12
|
</template>
|
|
@@ -20,17 +22,39 @@ defineBlokkliFeature({
|
|
|
20
22
|
description: "Renders the options form for one or more blocks.",
|
|
21
23
|
requiredAdapterMethods: ["updateOptions"]
|
|
22
24
|
});
|
|
23
|
-
const { selection, state, ui, definitions } = useBlokkli();
|
|
24
|
-
const uuids = computed(() =>
|
|
25
|
+
const { selection, state, ui, definitions, context } = useBlokkli();
|
|
26
|
+
const uuids = computed(() => {
|
|
27
|
+
const uuids2 = selection.items.value.map((v) => v.uuid);
|
|
28
|
+
if (uuids2.length) {
|
|
29
|
+
return uuids2;
|
|
30
|
+
} else if (selection.hasHostSelected.value) {
|
|
31
|
+
return "provider";
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
});
|
|
35
|
+
const key = computed(() => {
|
|
36
|
+
if (typeof uuids.value === "string") {
|
|
37
|
+
return uuids.value;
|
|
38
|
+
} else if (uuids.value && typeof uuids.value === "object") {
|
|
39
|
+
return uuids.value.join("-");
|
|
40
|
+
}
|
|
41
|
+
return "none";
|
|
42
|
+
});
|
|
25
43
|
const definition = computed(() => {
|
|
26
|
-
|
|
44
|
+
if (uuids.value === "provider") {
|
|
45
|
+
return definitions.getProviderDefinition(
|
|
46
|
+
context.value.entityType,
|
|
47
|
+
context.value.entityBundle
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
const bundles = selection.items.value.map((v) => v.library?.reusableBundle || v.bundle).filter(onlyUnique);
|
|
27
51
|
if (bundles.length !== 1) {
|
|
28
52
|
return;
|
|
29
53
|
}
|
|
30
54
|
const bundle = bundles[0];
|
|
31
55
|
if (bundle === "blokkli_fragment") {
|
|
32
|
-
const fragments = selection.
|
|
33
|
-
(v) => v.
|
|
56
|
+
const fragments = selection.items.value.filter(
|
|
57
|
+
(v) => v.bundle === "blokkli_fragment"
|
|
34
58
|
);
|
|
35
59
|
const fragmentNames = fragments.map((v) => {
|
|
36
60
|
const props = state.getFieldListItem(v.uuid)?.props;
|
|
@@ -43,10 +67,10 @@ const definition = computed(() => {
|
|
|
43
67
|
}
|
|
44
68
|
return definitions.getFragmentDefinition(fragmentNames[0]);
|
|
45
69
|
}
|
|
46
|
-
return selection.
|
|
70
|
+
return selection.items.value.map((block) => {
|
|
47
71
|
return definitions.getBlockDefinition(
|
|
48
72
|
bundle,
|
|
49
|
-
block.
|
|
73
|
+
block.fieldListType,
|
|
50
74
|
block.parentBlockBundle
|
|
51
75
|
);
|
|
52
76
|
}).filter(falsy).at(0);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Banner
|
|
3
|
+
id="ownership"
|
|
4
|
+
icon="user"
|
|
5
|
+
:text
|
|
6
|
+
:button="$t('ownershipTakeOwnership', 'Assign to me')"
|
|
7
|
+
@click="$emit('submit')"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import { computed, useBlokkli, onMounted, onBeforeUnmount } from "#imports";
|
|
13
|
+
import { Banner } from "#blokkli/components";
|
|
14
|
+
defineEmits(["submit"]);
|
|
15
|
+
const { state, $t, ui } = useBlokkli();
|
|
16
|
+
const name = computed(() => {
|
|
17
|
+
const v = state.owner.value?.name;
|
|
18
|
+
if (v) {
|
|
19
|
+
return `<strong>${v}</strong>`;
|
|
20
|
+
}
|
|
21
|
+
return "";
|
|
22
|
+
});
|
|
23
|
+
const text = computed(() => {
|
|
24
|
+
return $t(
|
|
25
|
+
"ownershipNote",
|
|
26
|
+
"This page is currently being edited by @name. Changes can only be made by one person at a time."
|
|
27
|
+
).replace("@name", name.value);
|
|
28
|
+
});
|
|
29
|
+
onMounted(() => {
|
|
30
|
+
ui.setSelectionColor("ownership", "mono");
|
|
31
|
+
});
|
|
32
|
+
onBeforeUnmount(() => {
|
|
33
|
+
ui.removeSelectionColor("ownership");
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
+
submit: () => any;
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onSubmit?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Teleport to="
|
|
3
|
-
<
|
|
4
|
-
v-if="!state.owner.value?.currentUserIsOwner"
|
|
5
|
-
class="bk-owner-indicator"
|
|
6
|
-
>
|
|
7
|
-
<p
|
|
8
|
-
v-html="
|
|
9
|
-
$t(
|
|
10
|
-
'ownershipNote',
|
|
11
|
-
'This page is currently being edited by @name. Changes can only be made by one person at a time.'
|
|
12
|
-
).replace('@name', name)
|
|
13
|
-
"
|
|
14
|
-
/>
|
|
15
|
-
<button class="bk-button bk-is-danger" @click="takeOwnership">
|
|
16
|
-
{{ $t("ownershipTakeOwnership", "Assign to me") }}
|
|
17
|
-
</button>
|
|
18
|
-
</div>
|
|
2
|
+
<Teleport to="#bk-banner-list">
|
|
3
|
+
<Renderer v-if="shouldRender" @submit="takeOwnership" />
|
|
19
4
|
</Teleport>
|
|
20
5
|
</template>
|
|
21
6
|
|
|
22
7
|
<script setup>
|
|
23
|
-
import {
|
|
8
|
+
import { useBlokkli, defineBlokkliFeature, computed } from "#imports";
|
|
9
|
+
import Renderer from "./Renderer.vue";
|
|
24
10
|
const { adapter } = defineBlokkliFeature({
|
|
25
11
|
id: "ownership",
|
|
26
12
|
icon: "user",
|
|
@@ -29,18 +15,14 @@ const { adapter } = defineBlokkliFeature({
|
|
|
29
15
|
description: "Renders a large button to take ownership of the current edit state."
|
|
30
16
|
});
|
|
31
17
|
const { state, $t } = useBlokkli();
|
|
18
|
+
const shouldRender = computed(
|
|
19
|
+
() => !state.owner.value?.currentUserIsOwner && state.permissions.value.includes("edit")
|
|
20
|
+
);
|
|
32
21
|
const takeOwnership = () => state.mutateWithLoadingState(
|
|
33
22
|
() => adapter.takeOwnership(),
|
|
34
23
|
$t("ownershipError", "Error in assigning"),
|
|
35
24
|
$t("ownershipSuccess", "You are now the owner.")
|
|
36
25
|
);
|
|
37
|
-
const name = computed(() => {
|
|
38
|
-
const v = state.owner.value?.name;
|
|
39
|
-
if (v) {
|
|
40
|
-
return `<strong>${v}</strong>`;
|
|
41
|
-
}
|
|
42
|
-
return "";
|
|
43
|
-
});
|
|
44
26
|
</script>
|
|
45
27
|
|
|
46
28
|
<script>
|