@blokkli/editor 2.0.0-alpha.2 → 2.0.0-alpha.20
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 +51 -39
- 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 +153 -64
- 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 +96 -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
|
@@ -1,12 +1,81 @@
|
|
|
1
|
-
import { defineBlokkliEditAdapter } from
|
|
2
|
-
import { falsy } from
|
|
3
|
-
import { availableFeaturesAtBuild } from
|
|
4
|
-
import { operationSources } from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { defineBlokkliEditAdapter } from "#blokkli/adapter";
|
|
2
|
+
import { falsy } from "#blokkli/helpers";
|
|
3
|
+
import { availableFeaturesAtBuild } from "#blokkli-build/features";
|
|
4
|
+
import { operationSources } from "#nuxt-graphql-middleware/sources";
|
|
5
|
+
import {
|
|
6
|
+
useGraphqlQuery,
|
|
7
|
+
useGraphqlMutation,
|
|
8
|
+
computed,
|
|
9
|
+
useRoute,
|
|
10
|
+
useRouter
|
|
11
|
+
} from "#imports";
|
|
12
|
+
import { ParagraphsBlokkliRemoteVideoProvider } from "#graphql-operations";
|
|
13
|
+
function mapPublishOptions(publishOptions) {
|
|
14
|
+
return {
|
|
15
|
+
canPublish: !!publishOptions.canPublish,
|
|
16
|
+
isRevisionable: !!publishOptions.isRevisionable,
|
|
17
|
+
hasRevisionLogMessage: !!publishOptions.hasRevisionLogMessage,
|
|
18
|
+
lastChanged: publishOptions.lastChanged ?? null,
|
|
19
|
+
canSchedule: !!publishOptions.canSchedule,
|
|
20
|
+
publishOn: publishOptions.publishOn ?? null,
|
|
21
|
+
revisionLogMessage: publishOptions.revisionLogMessage ?? null
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function mapPluginConfigInputs(inputs) {
|
|
25
|
+
return inputs.map((input) => {
|
|
26
|
+
if (input.__typename === "ParagraphsBlokkliConfigInputText") {
|
|
27
|
+
return {
|
|
28
|
+
type: "text",
|
|
29
|
+
name: input.name,
|
|
30
|
+
label: input.label,
|
|
31
|
+
description: input.description,
|
|
32
|
+
required: input.required,
|
|
33
|
+
defaultValue: input.defaultValueText,
|
|
34
|
+
minLength: input.minLength,
|
|
35
|
+
maxLength: input.maxLength,
|
|
36
|
+
placeholder: input.placeholder,
|
|
37
|
+
pattern: input.pattern,
|
|
38
|
+
multiline: input.multiline,
|
|
39
|
+
rows: input.rows
|
|
40
|
+
};
|
|
41
|
+
} else if (input.__typename === "ParagraphsBlokkliConfigInputCheckbox") {
|
|
42
|
+
return {
|
|
43
|
+
type: "checkbox",
|
|
44
|
+
name: input.name,
|
|
45
|
+
label: input.label,
|
|
46
|
+
description: input.description,
|
|
47
|
+
required: input.required,
|
|
48
|
+
defaultValue: input.defaultValueCheckbox ?? false,
|
|
49
|
+
checkboxLabel: input.checkboxLabel
|
|
50
|
+
};
|
|
51
|
+
} else if (input.__typename === "ParagraphsBlokkliConfigInputOptions") {
|
|
52
|
+
return {
|
|
53
|
+
type: "options",
|
|
54
|
+
name: input.name,
|
|
55
|
+
label: input.label,
|
|
56
|
+
description: input.description,
|
|
57
|
+
required: input.required,
|
|
58
|
+
defaultValue: input.defaultValueOptions ?? "",
|
|
59
|
+
variant: input.variant,
|
|
60
|
+
options: input.options
|
|
61
|
+
};
|
|
62
|
+
} else if (input.__typename === "ParagraphsBlokkliConfigInputSeed") {
|
|
63
|
+
return {
|
|
64
|
+
type: "seed",
|
|
65
|
+
name: input.name,
|
|
66
|
+
label: input.label,
|
|
67
|
+
description: input.description,
|
|
68
|
+
required: input.required
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}).filter(falsy);
|
|
73
|
+
}
|
|
74
|
+
export default defineBlokkliEditAdapter(
|
|
9
75
|
async (providedContext) => {
|
|
76
|
+
if (import.meta.dev) {
|
|
77
|
+
console.log("initialise Drupal bl\xF6kkli adapter");
|
|
78
|
+
}
|
|
10
79
|
const availableFeatureIds = new Set(availableFeaturesAtBuild);
|
|
11
80
|
const availableGraphqlOperations = new Set(Object.keys(operationSources));
|
|
12
81
|
function hasQuery(name) {
|
|
@@ -31,7 +100,7 @@ const index = defineBlokkliEditAdapter(
|
|
|
31
100
|
clipboard: v.data.clipboards || [],
|
|
32
101
|
availableFeatures: v.data.features,
|
|
33
102
|
allTypes: (v.data.allTypes.items || []).filter(
|
|
34
|
-
(v2) => v2 && "
|
|
103
|
+
(v2) => v2 && "id" in v2
|
|
35
104
|
),
|
|
36
105
|
fieldConfig: v.data.fieldConfig || [],
|
|
37
106
|
editableFieldConfig: v.data.editableFieldConfig || [],
|
|
@@ -47,6 +116,14 @@ const index = defineBlokkliEditAdapter(
|
|
|
47
116
|
)
|
|
48
117
|
};
|
|
49
118
|
});
|
|
119
|
+
const entityConfig = await useGraphqlQuery("pbEntityConfig", {
|
|
120
|
+
entityType: providedContext.value.entityType,
|
|
121
|
+
entityUuid: providedContext.value.entityUuid
|
|
122
|
+
}).then((v) => {
|
|
123
|
+
return {
|
|
124
|
+
linkPath: v.data.config?.linkPath ?? ""
|
|
125
|
+
};
|
|
126
|
+
});
|
|
50
127
|
const loadState = async () => {
|
|
51
128
|
const state = await useGraphqlQuery("pbEditState", {
|
|
52
129
|
...ctx.value
|
|
@@ -70,6 +147,10 @@ const index = defineBlokkliEditAdapter(
|
|
|
70
147
|
const fields = state?.mutatedState?.fields || [];
|
|
71
148
|
const violations = state.mutatedState?.violations || [];
|
|
72
149
|
const entity = state.entity;
|
|
150
|
+
if (!state.publishOptions) {
|
|
151
|
+
throw new Error("Missing publish options.");
|
|
152
|
+
}
|
|
153
|
+
const publishOptions = mapPublishOptions(state.publishOptions);
|
|
73
154
|
const mutatedOptions = state.mutatedState?.mutatedOptions || {};
|
|
74
155
|
Object.keys(mutatedOptions).forEach((uuid) => {
|
|
75
156
|
mutatedOptions[uuid] = mutatedOptions[uuid]?.paragraphs_blokkli_data || {};
|
|
@@ -96,6 +177,7 @@ const index = defineBlokkliEditAdapter(
|
|
|
96
177
|
return null;
|
|
97
178
|
}).filter(falsy)
|
|
98
179
|
};
|
|
180
|
+
const mutatedHostOptions = state.mutatedState?.hostOptions || {};
|
|
99
181
|
return {
|
|
100
182
|
currentIndex,
|
|
101
183
|
mutations,
|
|
@@ -104,8 +186,11 @@ const index = defineBlokkliEditAdapter(
|
|
|
104
186
|
mutatedState: {
|
|
105
187
|
fields,
|
|
106
188
|
violations,
|
|
107
|
-
mutatedOptions
|
|
189
|
+
mutatedOptions,
|
|
190
|
+
// PHP and its arrays...
|
|
191
|
+
mutatedHostOptions: Array.isArray(mutatedHostOptions) ? {} : mutatedHostOptions
|
|
108
192
|
},
|
|
193
|
+
publishOptions,
|
|
109
194
|
entity,
|
|
110
195
|
mutatedEntity: state.mutatedEntity,
|
|
111
196
|
translationState
|
|
@@ -121,7 +206,7 @@ const index = defineBlokkliEditAdapter(
|
|
|
121
206
|
}).then(mapMutation);
|
|
122
207
|
const moveBlock = (e) => useGraphqlMutation("pbMoveParagraph", {
|
|
123
208
|
...ctx.value,
|
|
124
|
-
uuid: e.item.uuid,
|
|
209
|
+
uuid: e.item.block.uuid,
|
|
125
210
|
hostType: e.host.type,
|
|
126
211
|
hostUuid: e.host.uuid,
|
|
127
212
|
hostFieldName: e.host.fieldName,
|
|
@@ -228,6 +313,9 @@ const index = defineBlokkliEditAdapter(
|
|
|
228
313
|
const getLastChanged = () => $fetch(
|
|
229
314
|
`/paragraphs_blokkli/${ctx.value.entityType}/${ctx.value.entityUuid}/last_changed`
|
|
230
315
|
).then((v) => v.changed);
|
|
316
|
+
const buildAnchorLink = (id, _uuid) => {
|
|
317
|
+
return `${entityConfig.linkPath}#${id}`;
|
|
318
|
+
};
|
|
231
319
|
const adapter = {
|
|
232
320
|
addNewBlock,
|
|
233
321
|
buildEditableFrameUrl,
|
|
@@ -243,7 +331,8 @@ const index = defineBlokkliEditAdapter(
|
|
|
243
331
|
loadStateAtIndex,
|
|
244
332
|
mapState,
|
|
245
333
|
moveBlock,
|
|
246
|
-
moveMultipleBlocks
|
|
334
|
+
moveMultipleBlocks,
|
|
335
|
+
buildAnchorLink
|
|
247
336
|
};
|
|
248
337
|
if (hasQuery("pbPublishOptions")) {
|
|
249
338
|
adapter.getPublishOptions = () => useGraphqlQuery("pbPublishOptions", ctx.value).then((v) => {
|
|
@@ -251,7 +340,7 @@ const index = defineBlokkliEditAdapter(
|
|
|
251
340
|
if (!options) {
|
|
252
341
|
throw new Error("Failed to load publish options.");
|
|
253
342
|
}
|
|
254
|
-
return options;
|
|
343
|
+
return mapPublishOptions(options);
|
|
255
344
|
});
|
|
256
345
|
}
|
|
257
346
|
if (hasQuery("pbGetImportSourceEntities")) {
|
|
@@ -281,6 +370,12 @@ const index = defineBlokkliEditAdapter(
|
|
|
281
370
|
if (hasMutation("pbTakeOwnership")) {
|
|
282
371
|
adapter.takeOwnership = () => useGraphqlMutation("pbTakeOwnership", ctx.value).then(mapMutation);
|
|
283
372
|
}
|
|
373
|
+
if (hasMutation("pbUpdateHostOptions")) {
|
|
374
|
+
adapter.updateHostOptions = (items) => useGraphqlMutation("pbUpdateHostOptions", {
|
|
375
|
+
...ctx.value,
|
|
376
|
+
items
|
|
377
|
+
}).then(mapMutation);
|
|
378
|
+
}
|
|
284
379
|
if (hasMutation("pbSetHistoryIndex")) {
|
|
285
380
|
adapter.setHistoryIndex = (index) => useGraphqlMutation("pbSetHistoryIndex", {
|
|
286
381
|
...ctx.value,
|
|
@@ -299,7 +394,6 @@ const index = defineBlokkliEditAdapter(
|
|
|
299
394
|
entityType: options.hostEntityType.toUpperCase(),
|
|
300
395
|
entityUuid: options.hostEntityUuid,
|
|
301
396
|
createNewState: !options.closeAfterPublish,
|
|
302
|
-
// @ts-expect-error Might not exist.
|
|
303
397
|
publishIfUnpublished: options.publishIfUnpublished,
|
|
304
398
|
revisionLogMessage: options.revisionLogMessage
|
|
305
399
|
}).then(mapMutation);
|
|
@@ -433,13 +527,13 @@ const index = defineBlokkliEditAdapter(
|
|
|
433
527
|
...ctx.value,
|
|
434
528
|
blockUuids,
|
|
435
529
|
body
|
|
436
|
-
}).then((v) => mapComments(v.data.
|
|
530
|
+
}).then((v) => mapComments(v.data.action || []));
|
|
437
531
|
}
|
|
438
532
|
if (hasMutation("pbResolveComment")) {
|
|
439
533
|
adapter.resolveComment = (uuid) => useGraphqlMutation("pbResolveComment", {
|
|
440
534
|
...ctx.value,
|
|
441
535
|
uuid
|
|
442
|
-
}).then((v) => mapComments(v.data.
|
|
536
|
+
}).then((v) => mapComments(v.data.action || []));
|
|
443
537
|
}
|
|
444
538
|
if (hasQuery("pbLibraryItems")) {
|
|
445
539
|
adapter.getLibraryItems = (data) => {
|
|
@@ -482,10 +576,26 @@ const index = defineBlokkliEditAdapter(
|
|
|
482
576
|
return {
|
|
483
577
|
id: plugin.id,
|
|
484
578
|
label: plugin.label,
|
|
579
|
+
description: plugin.description,
|
|
485
580
|
bundles: plugin.bundles,
|
|
486
581
|
targetBundles: plugin.targetBundles,
|
|
487
582
|
min: plugin.min,
|
|
488
|
-
max: plugin.max
|
|
583
|
+
max: plugin.max,
|
|
584
|
+
configInputs: mapPluginConfigInputs(plugin.configInputs),
|
|
585
|
+
preview: plugin.allowPreview
|
|
586
|
+
};
|
|
587
|
+
})
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
if (hasQuery("pbGetHostTransformPlugins")) {
|
|
591
|
+
adapter.getHostTransformPlugins = () => useGraphqlQuery("pbGetHostTransformPlugins", ctx.value).then((v) => v.data.paragraphsBlokkliGetHostTransformPlugins || []).then(
|
|
592
|
+
(plugins) => plugins.map((plugin) => {
|
|
593
|
+
return {
|
|
594
|
+
id: plugin.id,
|
|
595
|
+
label: plugin.label,
|
|
596
|
+
description: plugin.description,
|
|
597
|
+
configInputs: mapPluginConfigInputs(plugin.configInputs),
|
|
598
|
+
preview: plugin.allowPreview
|
|
489
599
|
};
|
|
490
600
|
})
|
|
491
601
|
);
|
|
@@ -495,6 +605,22 @@ const index = defineBlokkliEditAdapter(
|
|
|
495
605
|
...ctx.value,
|
|
496
606
|
...e
|
|
497
607
|
}).then(mapMutation);
|
|
608
|
+
adapter.previewTransformPlugin = (e) => useGraphqlMutation("pbApplyTransformPlugin", {
|
|
609
|
+
...ctx.value,
|
|
610
|
+
...e,
|
|
611
|
+
preview: true
|
|
612
|
+
}).then(mapMutation);
|
|
613
|
+
}
|
|
614
|
+
if (hasMutation("pbApplyHostTransformPlugin")) {
|
|
615
|
+
adapter.applyHostTransformPlugin = (e) => useGraphqlMutation("pbApplyHostTransformPlugin", {
|
|
616
|
+
...ctx.value,
|
|
617
|
+
...e
|
|
618
|
+
}).then(mapMutation);
|
|
619
|
+
adapter.previewHostTransformPlugin = (e) => useGraphqlMutation("pbApplyHostTransformPlugin", {
|
|
620
|
+
...ctx.value,
|
|
621
|
+
...e,
|
|
622
|
+
preview: true
|
|
623
|
+
}).then(mapMutation);
|
|
498
624
|
}
|
|
499
625
|
const buildFormUrl = (parts, langcode) => {
|
|
500
626
|
const prefix = config.urlPrefixes[langcode];
|
|
@@ -659,7 +785,7 @@ const index = defineBlokkliEditAdapter(
|
|
|
659
785
|
}).then(mapMutation);
|
|
660
786
|
};
|
|
661
787
|
}
|
|
662
|
-
if (availableFeatureIds.has("
|
|
788
|
+
if (availableFeatureIds.has("clipboard")) {
|
|
663
789
|
adapter.clipboardMapBundle = (e) => {
|
|
664
790
|
if (e.type === "video") {
|
|
665
791
|
return config.clipboard.find((v) => {
|
|
@@ -755,8 +881,28 @@ const index = defineBlokkliEditAdapter(
|
|
|
755
881
|
});
|
|
756
882
|
};
|
|
757
883
|
}
|
|
884
|
+
if (hasMutation("pbUnschedule")) {
|
|
885
|
+
adapter.unscheduleEditState = (options) => useGraphqlMutation("pbUnschedule", {
|
|
886
|
+
entityType: options.hostEntityType.toUpperCase(),
|
|
887
|
+
entityUuid: options.hostEntityUuid
|
|
888
|
+
}).then(mapMutation);
|
|
889
|
+
}
|
|
890
|
+
if (hasMutation("pbSchedule")) {
|
|
891
|
+
adapter.scheduleEditState = (options) => useGraphqlMutation("pbSchedule", {
|
|
892
|
+
entityType: options.hostEntityType.toUpperCase(),
|
|
893
|
+
entityUuid: options.hostEntityUuid,
|
|
894
|
+
date: options.date,
|
|
895
|
+
revisionLogMessage: options.revisionLogMessage
|
|
896
|
+
}).then(mapMutation);
|
|
897
|
+
}
|
|
898
|
+
if (hasMutation("pbSetParagraphSchedule")) {
|
|
899
|
+
adapter.setBlockScheduleDate = (blocks) => useGraphqlMutation("pbSetParagraphSchedule", {
|
|
900
|
+
entityType: ctx.value.entityType,
|
|
901
|
+
entityUuid: ctx.value.entityUuid,
|
|
902
|
+
langcode: ctx.value.langcode,
|
|
903
|
+
items: blocks
|
|
904
|
+
}).then(mapMutation);
|
|
905
|
+
}
|
|
758
906
|
return adapter;
|
|
759
907
|
}
|
|
760
908
|
);
|
|
761
|
-
|
|
762
|
-
export { index as default };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue';
|
|
2
|
-
import type { CommentItem, ConversionItem, MappedState, ImportItem, LibraryItem, BlockBundleDefinition, EntityTranslation, SearchContentItem, AddClipboardItemEvent, AddNewBlockEvent, AddReusableItemEvent, ImportFromExistingEvent, MakeReusableEvent, MoveMultipleBlocksEvent, MoveBlockEvent, UpdateBlockOptionEvent, AddContentSearchItemEvent, TransformPlugin, EditBlockEvent, PasteExistingBlocksEvent, UpdateFieldValueEvent, AssistantResult, DraggableHostData, DetachReusableBlockEvent, FieldConfig, EditableFieldConfig, DraggableMediaLibraryItem, DroppableFieldConfig, PublishOptions, GetEditStatesItem } from './../types/index.js';
|
|
2
|
+
import type { CommentItem, ConversionItem, MappedState, ImportItem, LibraryItem, BlockBundleDefinition, EntityTranslation, SearchContentItem, AddClipboardItemEvent, AddNewBlockEvent, AddReusableItemEvent, ImportFromExistingEvent, MakeReusableEvent, MoveMultipleBlocksEvent, MoveBlockEvent, UpdateBlockOptionEvent, AddContentSearchItemEvent, TransformPlugin, EditBlockEvent, PasteExistingBlocksEvent, UpdateFieldValueEvent, AssistantResult, DraggableHostData, DetachReusableBlockEvent, FieldConfig, EditableFieldConfig, DraggableMediaLibraryItem, DroppableFieldConfig, PublishOptions, GetEditStatesItem, UpdateHostOptionEvent, HostTransformPlugin, PluginConfigInputItem } from './../types/index.js';
|
|
3
3
|
import type getVideoId from 'get-video-id';
|
|
4
4
|
import type { GetMediaLibraryFunction } from './../components/Edit/Features/MediaLibrary/types.js';
|
|
5
|
+
import type { Analyzer } from '#blokkli/analyzer/types';
|
|
5
6
|
export type { GetMediaLibraryFunction };
|
|
6
7
|
export interface MutationResponseLike<T> {
|
|
7
8
|
success: boolean;
|
|
@@ -11,6 +12,11 @@ export interface MutationResponseLike<T> {
|
|
|
11
12
|
type AdapterApplyTransformPlugin = {
|
|
12
13
|
pluginId: string;
|
|
13
14
|
uuids: string[];
|
|
15
|
+
config?: PluginConfigInputItem[];
|
|
16
|
+
};
|
|
17
|
+
type AdapterApplyHostTransformPlugin = {
|
|
18
|
+
pluginId: string;
|
|
19
|
+
config?: PluginConfigInputItem[];
|
|
14
20
|
};
|
|
15
21
|
export type UpdateEntityFieldValueEvent = {
|
|
16
22
|
fieldName: string;
|
|
@@ -155,6 +161,51 @@ export type BlokkliAdapterPublishOptions = {
|
|
|
155
161
|
*/
|
|
156
162
|
revisionLogMessage?: string;
|
|
157
163
|
};
|
|
164
|
+
export type BlokkliAdapterScheduleOptions = {
|
|
165
|
+
/**
|
|
166
|
+
* The host entity type.
|
|
167
|
+
*/
|
|
168
|
+
hostEntityType: string;
|
|
169
|
+
/**
|
|
170
|
+
* The host entity UUID.
|
|
171
|
+
*/
|
|
172
|
+
hostEntityUuid: string;
|
|
173
|
+
/**
|
|
174
|
+
* The revision log message.
|
|
175
|
+
*/
|
|
176
|
+
revisionLogMessage?: string;
|
|
177
|
+
/**
|
|
178
|
+
* The date and time when the edit state should be published.
|
|
179
|
+
*/
|
|
180
|
+
date: string;
|
|
181
|
+
};
|
|
182
|
+
export type BlokkliAdapterSetBlockScheduleOptions = {
|
|
183
|
+
/**
|
|
184
|
+
* The UUID of the block.
|
|
185
|
+
*/
|
|
186
|
+
uuid: string;
|
|
187
|
+
/**
|
|
188
|
+
* The schedule type.
|
|
189
|
+
*/
|
|
190
|
+
type: 'publish' | 'unpublish';
|
|
191
|
+
/**
|
|
192
|
+
* The date. If empty, remove the schedule date.
|
|
193
|
+
*/
|
|
194
|
+
date?: string;
|
|
195
|
+
};
|
|
196
|
+
export type BlokkliAdapterUnscheduleBlockOptions = {
|
|
197
|
+
uuid: string;
|
|
198
|
+
};
|
|
199
|
+
export type BlokkliAdapterUnscheduleOptions = {
|
|
200
|
+
/**
|
|
201
|
+
* The host entity type.
|
|
202
|
+
*/
|
|
203
|
+
hostEntityType: string;
|
|
204
|
+
/**
|
|
205
|
+
* The host entity UUID.
|
|
206
|
+
*/
|
|
207
|
+
hostEntityUuid: string;
|
|
208
|
+
};
|
|
158
209
|
export interface BlokkliAdapter<T> {
|
|
159
210
|
/**
|
|
160
211
|
* Load the state.
|
|
@@ -203,10 +254,38 @@ export interface BlokkliAdapter<T> {
|
|
|
203
254
|
* Get all possible transform plugins.
|
|
204
255
|
*/
|
|
205
256
|
getTransformPlugins?: () => Promise<TransformPlugin[]>;
|
|
257
|
+
/**
|
|
258
|
+
* Get all possible host transform plugins.
|
|
259
|
+
*/
|
|
260
|
+
getHostTransformPlugins?: () => Promise<HostTransformPlugin[]>;
|
|
206
261
|
/**
|
|
207
262
|
* Apply a transform plugin.
|
|
208
263
|
*/
|
|
209
264
|
applyTransformPlugin?: (e: AdapterApplyTransformPlugin) => Promise<MutationResponseLike<T>>;
|
|
265
|
+
/**
|
|
266
|
+
* Preview the output of a transform plugin.
|
|
267
|
+
*
|
|
268
|
+
* The transform plugin is expected to apply its transform without actually
|
|
269
|
+
* persisting it and not creating any side effects.
|
|
270
|
+
*
|
|
271
|
+
* It must produce the same result when called for the "final"
|
|
272
|
+
* transformation that is added to the edit state.
|
|
273
|
+
*/
|
|
274
|
+
previewTransformPlugin?: (e: AdapterApplyTransformPlugin) => Promise<MutationResponseLike<T>>;
|
|
275
|
+
/**
|
|
276
|
+
* Apply a host transform plugin.
|
|
277
|
+
*/
|
|
278
|
+
applyHostTransformPlugin?: (e: AdapterApplyHostTransformPlugin) => Promise<MutationResponseLike<T>>;
|
|
279
|
+
/**
|
|
280
|
+
* Preview the output of a host transform plugin.
|
|
281
|
+
*
|
|
282
|
+
* The transform plugin is expected to apply its transform without actually
|
|
283
|
+
* persisting it and not creating any side effects.
|
|
284
|
+
*
|
|
285
|
+
* It must produce the same result when called for the "final"
|
|
286
|
+
* transformation that is added to the edit state.
|
|
287
|
+
*/
|
|
288
|
+
previewHostTransformPlugin?: (e: AdapterApplyHostTransformPlugin) => Promise<MutationResponseLike<T>>;
|
|
210
289
|
/**
|
|
211
290
|
* Add a new block.
|
|
212
291
|
*/
|
|
@@ -215,6 +294,10 @@ export interface BlokkliAdapter<T> {
|
|
|
215
294
|
* Update multiple options.
|
|
216
295
|
*/
|
|
217
296
|
updateOptions?: (options: UpdateBlockOptionEvent[]) => Promise<MutationResponseLike<T>>;
|
|
297
|
+
/**
|
|
298
|
+
* Update multiple host options.
|
|
299
|
+
*/
|
|
300
|
+
updateHostOptions?: (options: UpdateHostOptionEvent[]) => Promise<MutationResponseLike<T>>;
|
|
218
301
|
/**
|
|
219
302
|
* Determine the block bundle for the given clipboard item.
|
|
220
303
|
*/
|
|
@@ -270,6 +353,18 @@ export interface BlokkliAdapter<T> {
|
|
|
270
353
|
* Publish all changes.
|
|
271
354
|
*/
|
|
272
355
|
publish?: (options: BlokkliAdapterPublishOptions) => Promise<MutationResponseLike<T | undefined | null>>;
|
|
356
|
+
/**
|
|
357
|
+
* Schedule an edit state.
|
|
358
|
+
*/
|
|
359
|
+
scheduleEditState?: (options: BlokkliAdapterScheduleOptions) => Promise<MutationResponseLike<T | undefined | null>>;
|
|
360
|
+
/**
|
|
361
|
+
* Unschedule an already scheduled edit state.
|
|
362
|
+
*/
|
|
363
|
+
unscheduleEditState?: (options: BlokkliAdapterUnscheduleOptions) => Promise<MutationResponseLike<T | undefined | null>>;
|
|
364
|
+
/**
|
|
365
|
+
* Schedule a block.
|
|
366
|
+
*/
|
|
367
|
+
setBlockScheduleDate?: (blocks: BlokkliAdapterSetBlockScheduleOptions[]) => Promise<MutationResponseLike<T | undefined | null>>;
|
|
273
368
|
/**
|
|
274
369
|
* Set a specific history index.
|
|
275
370
|
*/
|
|
@@ -400,6 +495,21 @@ export interface BlokkliAdapter<T> {
|
|
|
400
495
|
* Add a fragment block.
|
|
401
496
|
*/
|
|
402
497
|
fragmentsAddBlock?: (e: AdapterFragmentsAddBlock) => Promise<MutationResponseLike<T>> | undefined;
|
|
498
|
+
/**
|
|
499
|
+
* Build the link that is copied to the clipboard when clicking on an "anchor link" indicator.
|
|
500
|
+
*/
|
|
501
|
+
buildAnchorLink?: (id: string, uuid: string) => string;
|
|
502
|
+
getAnalyzers?: () => Analyzer | Analyzer[] | Promise<Analyzer> | Promise<Analyzer[]>;
|
|
503
|
+
userSettings?: {
|
|
504
|
+
/**
|
|
505
|
+
* Load user settings.
|
|
506
|
+
*/
|
|
507
|
+
load: () => Promise<string | Record<string, any>>;
|
|
508
|
+
/**
|
|
509
|
+
* Persist user settings.
|
|
510
|
+
*/
|
|
511
|
+
persist: (settings: string) => Promise<undefined>;
|
|
512
|
+
};
|
|
403
513
|
}
|
|
404
514
|
export type BlokkliAdapterFactory<T> = (ctx: ComputedRef<AdapterContext>) => Promise<BlokkliAdapter<T>> | BlokkliAdapter<T>;
|
|
405
515
|
export type AdapterMethods = keyof BlokkliAdapter<any>;
|
|
@@ -17,7 +17,14 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script setup>
|
|
20
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
computed,
|
|
22
|
+
useBlokkli,
|
|
23
|
+
nextTick,
|
|
24
|
+
ref,
|
|
25
|
+
onMounted,
|
|
26
|
+
onBeforeUnmount
|
|
27
|
+
} from "#imports";
|
|
21
28
|
import { AddListItem } from "#blokkli/components";
|
|
22
29
|
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
23
30
|
import defineTourItem from "#blokkli/helpers/composables/defineTourItem";
|
|
@@ -33,7 +40,7 @@ const props = defineProps({
|
|
|
33
40
|
});
|
|
34
41
|
const item = ref(null);
|
|
35
42
|
const emit = defineEmits(["placed"]);
|
|
36
|
-
const { ui, state, features } = useBlokkli();
|
|
43
|
+
const { ui, state, features, plugins } = useBlokkli();
|
|
37
44
|
const addListAvailable = computed(
|
|
38
45
|
() => !!features.mountedFeatures.value.find((v) => v.id === "add-list")
|
|
39
46
|
);
|
|
@@ -47,7 +54,7 @@ onBlokkliEvent("add-list:change", () => {
|
|
|
47
54
|
});
|
|
48
55
|
});
|
|
49
56
|
onBlokkliEvent("action:placed", (e) => {
|
|
50
|
-
if (e.
|
|
57
|
+
if (e.id !== props.type) {
|
|
51
58
|
return;
|
|
52
59
|
}
|
|
53
60
|
emit("placed", e);
|
|
@@ -63,6 +70,23 @@ defineTourItem(() => {
|
|
|
63
70
|
element: () => item.value?.getElement()
|
|
64
71
|
};
|
|
65
72
|
});
|
|
73
|
+
function addActionFunction() {
|
|
74
|
+
return {
|
|
75
|
+
id: props.type,
|
|
76
|
+
icon: props.icon,
|
|
77
|
+
color: props.color,
|
|
78
|
+
itemBundle: props.itemBundle,
|
|
79
|
+
title: props.title,
|
|
80
|
+
description: props.description,
|
|
81
|
+
enabled: !props.disabled
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
onMounted(() => {
|
|
85
|
+
plugins.addAddAction(addActionFunction);
|
|
86
|
+
});
|
|
87
|
+
onBeforeUnmount(() => {
|
|
88
|
+
plugins.removeAddAction(addActionFunction);
|
|
89
|
+
});
|
|
66
90
|
</script>
|
|
67
91
|
|
|
68
92
|
<script>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport to="#bk-indicators-left">
|
|
3
|
+
<div
|
|
4
|
+
ref="el"
|
|
5
|
+
class="bk-indicator-item"
|
|
6
|
+
@click.prevent="$emit('click')"
|
|
7
|
+
@mouseenter="onMouseEnter"
|
|
8
|
+
@mouseleave="onMouseLeave"
|
|
9
|
+
>
|
|
10
|
+
<slot>
|
|
11
|
+
<div class="bk-indicator-item-inner">
|
|
12
|
+
<div v-if="label">{{ label }}</div>
|
|
13
|
+
<div v-if="icon">
|
|
14
|
+
<Icon :name="icon" />
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</slot>
|
|
18
|
+
</div>
|
|
19
|
+
</Teleport>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import {
|
|
24
|
+
useBlokkli,
|
|
25
|
+
onMounted,
|
|
26
|
+
useTemplateRef,
|
|
27
|
+
onBeforeUnmount
|
|
28
|
+
} from "#imports";
|
|
29
|
+
import { Icon } from "#blokkli/components";
|
|
30
|
+
const props = defineProps({
|
|
31
|
+
id: { type: String, required: true },
|
|
32
|
+
uuid: { type: String, required: true },
|
|
33
|
+
label: { type: String, required: false },
|
|
34
|
+
position: { type: String, required: false },
|
|
35
|
+
icon: { type: null, required: false }
|
|
36
|
+
});
|
|
37
|
+
defineEmits(["click"]);
|
|
38
|
+
const { indicators } = useBlokkli();
|
|
39
|
+
const el = useTemplateRef("el");
|
|
40
|
+
function onMouseEnter() {
|
|
41
|
+
indicators.setHovered(props.uuid);
|
|
42
|
+
}
|
|
43
|
+
function onMouseLeave() {
|
|
44
|
+
indicators.setHovered();
|
|
45
|
+
}
|
|
46
|
+
onMounted(() => {
|
|
47
|
+
if (el.value) {
|
|
48
|
+
indicators.addIndicator({
|
|
49
|
+
id: props.id,
|
|
50
|
+
uuid: props.uuid,
|
|
51
|
+
position: props.position ?? "left",
|
|
52
|
+
element: el.value
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
onBeforeUnmount(() => {
|
|
57
|
+
indicators.removeIndicator(props.id, props.uuid);
|
|
58
|
+
});
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
export default {
|
|
63
|
+
name: "PluginBlockIndicator"
|
|
64
|
+
};
|
|
65
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
3
|
+
id: string;
|
|
4
|
+
uuid: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
position?: "left" | "right";
|
|
7
|
+
icon?: BlokkliIcon;
|
|
8
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
click: () => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
11
|
+
id: string;
|
|
12
|
+
uuid: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
position?: "left" | "right";
|
|
15
|
+
icon?: BlokkliIcon;
|
|
16
|
+
}> & Readonly<{
|
|
17
|
+
onClick?: (() => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
19
|
+
default?: (props: {}) => any;
|
|
20
|
+
}>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -40,10 +40,16 @@ const innerStyle = computed(() => {
|
|
|
40
40
|
};
|
|
41
41
|
});
|
|
42
42
|
onBlokkliEvent("keyPressed", (e) => {
|
|
43
|
+
if (ui.hasDialogOpen.value) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
43
46
|
if (e.code === "Escape") {
|
|
44
47
|
emit("close");
|
|
45
48
|
}
|
|
46
49
|
});
|
|
50
|
+
onBlokkliEvent("window:clickAway", () => {
|
|
51
|
+
emit("close");
|
|
52
|
+
});
|
|
47
53
|
watch(selection.uuids, () => emit("close"));
|
|
48
54
|
const onClick = (index) => {
|
|
49
55
|
const item = props.menu[index];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<Component :is="tag" @contextmenu.stop.prevent="onContextMenu">
|
|
3
3
|
<slot />
|
|
4
4
|
<Teleport to="body">
|
|
5
|
-
<
|
|
5
|
+
<BlokkliTransition name="context-menu">
|
|
6
6
|
<ContextMenuMenu
|
|
7
7
|
v-if="isVisible"
|
|
8
8
|
:menu="menu"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:y="y"
|
|
11
11
|
@close="ui.openContextMenu.value = ''"
|
|
12
12
|
/>
|
|
13
|
-
</
|
|
13
|
+
</BlokkliTransition>
|
|
14
14
|
</Teleport>
|
|
15
15
|
</Component>
|
|
16
16
|
</template>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<script setup>
|
|
19
19
|
import { ref, computed, useBlokkli } from "#imports";
|
|
20
20
|
import ContextMenuMenu from "./Menu/index.vue";
|
|
21
|
+
import { BlokkliTransition } from "#blokkli/components";
|
|
21
22
|
const props = defineProps({
|
|
22
23
|
id: { type: String, required: true },
|
|
23
24
|
menu: { type: Array, required: true },
|