@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
|
@@ -4,12 +4,10 @@ type __VLS_Props = {
|
|
|
4
4
|
text: string;
|
|
5
5
|
selector?: string;
|
|
6
6
|
};
|
|
7
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
8
7
|
declare var __VLS_1: {};
|
|
9
|
-
type __VLS_Slots =
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
10
9
|
default?: (props: typeof __VLS_1) => any;
|
|
11
|
-
}
|
|
12
|
-
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
};
|
|
13
11
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
12
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
15
13
|
export default _default;
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script setup>
|
|
33
|
-
import { useBlokkli, computed, ref } from "#imports";
|
|
33
|
+
import { useBlokkli, computed, ref, watch } from "#imports";
|
|
34
34
|
import { ShortcutIndicator, Icon } from "#blokkli/components";
|
|
35
35
|
import defineCommands from "#blokkli/helpers/composables/defineCommands";
|
|
36
36
|
import defineTourItem from "#blokkli/helpers/composables/defineTourItem";
|
|
37
|
-
const { storage, ui } = useBlokkli();
|
|
37
|
+
const { storage, ui, eventBus } = useBlokkli();
|
|
38
38
|
const props = defineProps({
|
|
39
39
|
id: { type: String, required: true },
|
|
40
40
|
label: { type: String, required: true },
|
|
@@ -50,7 +50,7 @@ const props = defineProps({
|
|
|
50
50
|
const emit = defineEmits(["update:modelValue"]);
|
|
51
51
|
const storageKey = "view_option_" + props.id;
|
|
52
52
|
const button = ref(null);
|
|
53
|
-
const isActiveStorage = storage.use(storageKey, false);
|
|
53
|
+
const isActiveStorage = storage.use(storageKey, false, true);
|
|
54
54
|
const isActive = computed({
|
|
55
55
|
get() {
|
|
56
56
|
return isActiveStorage.value;
|
|
@@ -60,6 +60,9 @@ const isActive = computed({
|
|
|
60
60
|
emit("update:modelValue", v);
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
+
watch(isActive, () => {
|
|
64
|
+
eventBus.emit("view-option:toggle", { id: props.id });
|
|
65
|
+
});
|
|
63
66
|
emit("update:modelValue", isActiveStorage.value);
|
|
64
67
|
const title = computed(() => isActive.value ? props.titleOff : props.titleOn);
|
|
65
68
|
const onClick = () => {
|
|
@@ -26,10 +26,11 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
26
26
|
}> & Readonly<{
|
|
27
27
|
"onUpdate:modelValue"?: ((data: boolean) => any) | undefined;
|
|
28
28
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
29
|
-
icon?: (
|
|
30
|
-
|
|
29
|
+
icon?: (props: {}) => any;
|
|
30
|
+
} & {
|
|
31
|
+
default?: (props: {
|
|
31
32
|
isActive: boolean;
|
|
32
|
-
}) => any
|
|
33
|
+
}) => any;
|
|
33
34
|
}>;
|
|
34
35
|
export default _default;
|
|
35
36
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import PluginAddAction from './AddAction/index.vue.js';
|
|
2
|
+
import PluginBlockIndicator from './BlockIndicator/index.vue.js';
|
|
3
|
+
import PluginContextMenu from './ContextMenu/index.vue.js';
|
|
4
|
+
import PluginDebugOverlay from './DebugOverlay/index.vue.js';
|
|
5
|
+
import PluginDroppableEdit from './DroppableEdit/index.vue.js';
|
|
2
6
|
import PluginItemAction from './ItemAction/index.vue.js';
|
|
3
7
|
import PluginItemDropdown from './ItemDropdown/index.vue.js';
|
|
8
|
+
import PluginMenuButton from './MenuButton/index.vue.js';
|
|
4
9
|
import PluginSidebar from './Sidebar/index.vue.js';
|
|
5
10
|
import PluginToolbarButton from './ToolbarButton/index.vue.js';
|
|
6
|
-
import PluginViewOption from './ViewOption/index.vue.js';
|
|
7
|
-
import PluginAddAction from './AddAction/index.vue.js';
|
|
8
|
-
import PluginContextMenu from './ContextMenu/index.vue.js';
|
|
9
11
|
import PluginTourItem from './TourItem/index.vue.js';
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
export { PluginMenuButton, PluginItemAction, PluginSidebar, PluginToolbarButton, PluginViewOption, PluginItemDropdown, PluginAddAction, PluginContextMenu, PluginTourItem, PluginDroppableEdit, PluginDebugOverlay, };
|
|
12
|
+
import PluginViewOption from './ViewOption/index.vue.js';
|
|
13
|
+
export { PluginAddAction, PluginBlockIndicator, PluginContextMenu, PluginDebugOverlay, PluginDroppableEdit, PluginItemAction, PluginItemDropdown, PluginMenuButton, PluginSidebar, PluginToolbarButton, PluginTourItem, PluginViewOption, };
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import PluginAddAction from "./AddAction/index.vue";
|
|
2
|
+
import PluginBlockIndicator from "./BlockIndicator/index.vue";
|
|
3
|
+
import PluginContextMenu from "./ContextMenu/index.vue";
|
|
4
|
+
import PluginDebugOverlay from "./DebugOverlay/index.vue";
|
|
5
|
+
import PluginDroppableEdit from "./DroppableEdit/index.vue";
|
|
2
6
|
import PluginItemAction from "./ItemAction/index.vue";
|
|
3
7
|
import PluginItemDropdown from "./ItemDropdown/index.vue";
|
|
8
|
+
import PluginMenuButton from "./MenuButton/index.vue";
|
|
4
9
|
import PluginSidebar from "./Sidebar/index.vue";
|
|
5
10
|
import PluginToolbarButton from "./ToolbarButton/index.vue";
|
|
6
|
-
import PluginViewOption from "./ViewOption/index.vue";
|
|
7
|
-
import PluginAddAction from "./AddAction/index.vue";
|
|
8
|
-
import PluginContextMenu from "./ContextMenu/index.vue";
|
|
9
11
|
import PluginTourItem from "./TourItem/index.vue";
|
|
10
|
-
import
|
|
11
|
-
import PluginDebugOverlay from "./DebugOverlay/index.vue";
|
|
12
|
+
import PluginViewOption from "./ViewOption/index.vue";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
PluginAddAction,
|
|
15
|
+
PluginBlockIndicator,
|
|
16
|
+
PluginContextMenu,
|
|
17
|
+
PluginDebugOverlay,
|
|
18
|
+
PluginDroppableEdit,
|
|
14
19
|
PluginItemAction,
|
|
20
|
+
PluginItemDropdown,
|
|
21
|
+
PluginMenuButton,
|
|
15
22
|
PluginSidebar,
|
|
16
23
|
PluginToolbarButton,
|
|
17
|
-
PluginViewOption,
|
|
18
|
-
PluginItemDropdown,
|
|
19
|
-
PluginAddAction,
|
|
20
|
-
PluginContextMenu,
|
|
21
24
|
PluginTourItem,
|
|
22
|
-
|
|
23
|
-
PluginDebugOverlay
|
|
25
|
+
PluginViewOption
|
|
24
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20,11H4V8H20M20,15H13V13H20M20,19H13V17H20M11,19H4V13H11M20.33,4.67L18.67,3L17,4.67L15.33,3L13.67,4.67L12,3L10.33,4.67L8.67,3L7,4.67L5.33,3L3.67,4.67L2,3V19A2,2 0 0,0 4,21H20A2,2 0 0,0 22,19V3L20.33,4.67Z" /></svg>
|
|
@@ -18,16 +18,18 @@
|
|
|
18
18
|
import { computed, provide, defineBlokkli } from "#imports";
|
|
19
19
|
import {
|
|
20
20
|
INJECT_IS_IN_REUSABLE,
|
|
21
|
-
INJECT_REUSABLE_OPTIONS
|
|
21
|
+
INJECT_REUSABLE_OPTIONS,
|
|
22
|
+
INJECT_REUSABLE_UUID
|
|
22
23
|
} from "#blokkli/helpers/symbols";
|
|
23
24
|
const props = defineProps({
|
|
24
25
|
libraryItem: { type: Object, required: false }
|
|
25
26
|
});
|
|
26
|
-
const { index, options, parentType, isEditing } = defineBlokkli({
|
|
27
|
+
const { index, options, parentType, isEditing, uuid } = defineBlokkli({
|
|
27
28
|
bundle: "from_library"
|
|
28
29
|
});
|
|
29
30
|
provide(INJECT_REUSABLE_OPTIONS, options);
|
|
30
31
|
provide(INJECT_IS_IN_REUSABLE, true);
|
|
32
|
+
provide(INJECT_REUSABLE_UUID, uuid);
|
|
31
33
|
const item = computed(() => {
|
|
32
34
|
const v = props.libraryItem?.block;
|
|
33
35
|
if (v && "uuid" in v) {
|
|
@@ -1,54 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component :is="tag"
|
|
2
|
+
<component :is="tag" ref="root">
|
|
3
3
|
<slot :value="renderedValue" />
|
|
4
4
|
</component>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
-
import { ref, computed, inject, onMounted, onBeforeUnmount } from "#imports";
|
|
9
8
|
import {
|
|
9
|
+
ref,
|
|
10
|
+
computed,
|
|
11
|
+
inject,
|
|
12
|
+
onMounted,
|
|
13
|
+
onBeforeUnmount,
|
|
14
|
+
useTemplateRef
|
|
15
|
+
} from "#imports";
|
|
16
|
+
import {
|
|
17
|
+
INJECT_APP,
|
|
10
18
|
INJECT_EDIT_CONTEXT,
|
|
11
19
|
INJECT_ENTITY_CONTEXT,
|
|
12
|
-
INJECT_IS_EDITING
|
|
20
|
+
INJECT_IS_EDITING,
|
|
21
|
+
INJECT_IS_IN_REUSABLE
|
|
13
22
|
} from "#blokkli/helpers/symbols";
|
|
14
23
|
const props = defineProps({
|
|
15
24
|
name: { type: String, required: true },
|
|
16
|
-
value: { type: String, required:
|
|
25
|
+
value: { type: String, required: false, default: "" },
|
|
17
26
|
tag: { type: String, required: false, default: "div" }
|
|
18
27
|
});
|
|
19
28
|
defineSlots();
|
|
29
|
+
const root = useTemplateRef("root");
|
|
20
30
|
const valueOverride = ref("");
|
|
21
31
|
const isEditing = inject(INJECT_IS_EDITING, false);
|
|
22
32
|
const entity = inject(INJECT_ENTITY_CONTEXT);
|
|
23
33
|
const editContext = inject(INJECT_EDIT_CONTEXT, null);
|
|
34
|
+
const app = inject(INJECT_APP, null);
|
|
35
|
+
const isInReusable = inject(INJECT_IS_IN_REUSABLE, false);
|
|
24
36
|
if (!entity) {
|
|
25
37
|
throw new Error("Missing entity context.");
|
|
26
38
|
}
|
|
27
|
-
const renderedValue = computed(() => valueOverride.value || props.value);
|
|
28
|
-
const attrs = computed(() => {
|
|
29
|
-
if (isEditing && props.name) {
|
|
30
|
-
return {
|
|
31
|
-
"data-blokkli-editable-field": props.name,
|
|
32
|
-
"data-blokkli-editable-component": "true",
|
|
33
|
-
"data-blokkli-editable-value": props.value
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
return void 0;
|
|
37
|
-
});
|
|
39
|
+
const renderedValue = computed(() => valueOverride.value || props.value || "");
|
|
38
40
|
const onEditableUpdateValue = (e) => {
|
|
39
41
|
if (e.name === props.name && e.entityUuid === entity.uuid) {
|
|
40
42
|
valueOverride.value = e.value;
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
45
|
onMounted(() => {
|
|
44
|
-
if (!isEditing || !editContext) {
|
|
46
|
+
if (!isEditing || !editContext || !app || isInReusable) {
|
|
45
47
|
return;
|
|
46
48
|
}
|
|
47
49
|
editContext.eventBus.on("editable:update", onEditableUpdateValue);
|
|
50
|
+
if (root.value instanceof HTMLElement && entity) {
|
|
51
|
+
app.directive.registerDirectiveElement(
|
|
52
|
+
root.value,
|
|
53
|
+
props.name,
|
|
54
|
+
entity,
|
|
55
|
+
"editable"
|
|
56
|
+
);
|
|
57
|
+
}
|
|
48
58
|
});
|
|
49
59
|
onBeforeUnmount(() => {
|
|
50
60
|
if (editContext) {
|
|
51
61
|
editContext.eventBus.off("editable:update", onEditableUpdateValue);
|
|
52
62
|
}
|
|
63
|
+
if (app && root.value instanceof HTMLElement && entity) {
|
|
64
|
+
app.directive.unregisterDirectiveElement(
|
|
65
|
+
root.value,
|
|
66
|
+
props.name,
|
|
67
|
+
entity,
|
|
68
|
+
"editable"
|
|
69
|
+
);
|
|
70
|
+
}
|
|
53
71
|
});
|
|
54
72
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
name: string;
|
|
3
|
-
value
|
|
3
|
+
value?: string;
|
|
4
4
|
tag?: string;
|
|
5
5
|
};
|
|
6
6
|
type __VLS_Slots = {
|
|
@@ -9,6 +9,7 @@ type __VLS_Slots = {
|
|
|
9
9
|
}): any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
value: string;
|
|
12
13
|
tag: string;
|
|
13
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
15
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -4,23 +4,23 @@
|
|
|
4
4
|
:is="DraggableList"
|
|
5
5
|
v-if="DraggableList && isEditing && canEdit && !isInReusable && entity"
|
|
6
6
|
:list="filteredList"
|
|
7
|
-
:name
|
|
8
|
-
:entity
|
|
9
|
-
:field-key
|
|
10
|
-
:allowed-fragments
|
|
11
|
-
:nesting-level
|
|
12
|
-
:drop-alignment
|
|
13
|
-
:field-list-type
|
|
7
|
+
:name
|
|
8
|
+
:entity
|
|
9
|
+
:field-key
|
|
10
|
+
:allowed-fragments
|
|
11
|
+
:nesting-level
|
|
12
|
+
:drop-alignment
|
|
13
|
+
:field-list-type
|
|
14
14
|
:class="[
|
|
15
15
|
attrs.class,
|
|
16
16
|
listClass,
|
|
17
17
|
editClass,
|
|
18
18
|
{ [nonEmptyClass]: filteredList.length }
|
|
19
19
|
]"
|
|
20
|
-
:is-nested
|
|
20
|
+
:is-nested
|
|
21
21
|
:language="providerEntity?.language"
|
|
22
|
-
:proxy-mode
|
|
23
|
-
:tag
|
|
22
|
+
:proxy-mode
|
|
23
|
+
:tag
|
|
24
24
|
:global-proxy-mode="!!isGlobalProxyMode"
|
|
25
25
|
:should-render-item="shouldRenderItem"
|
|
26
26
|
/>
|
|
@@ -81,6 +81,20 @@ if (import.meta.hot) {
|
|
|
81
81
|
import.meta.hot.accept("#blokkli/helpers/runtimeHelpers", () => {
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
+
const props = defineProps({
|
|
85
|
+
name: { type: String, required: true },
|
|
86
|
+
list: { type: [Array, Object, null], required: false, default: () => [] },
|
|
87
|
+
tag: { type: String, required: false, default: "div" },
|
|
88
|
+
fieldListType: { type: null, required: false, default: "default" },
|
|
89
|
+
editOnly: { type: Boolean, required: false },
|
|
90
|
+
listClass: { type: [String, Object, Array], required: false, default: "" },
|
|
91
|
+
editClass: { type: [String, Object, Array], required: false, default: "" },
|
|
92
|
+
nonEmptyClass: { type: String, required: false, default: "" },
|
|
93
|
+
allowedFragments: { type: null, required: false, default: () => [] },
|
|
94
|
+
dropAlignment: { type: String, required: false, default: void 0 },
|
|
95
|
+
proxyMode: { type: Boolean, required: false },
|
|
96
|
+
shouldRenderItem: { type: Function, required: false, default: void 0 }
|
|
97
|
+
});
|
|
84
98
|
const DraggableList = inject(
|
|
85
99
|
INJECT_EDIT_FIELD_LIST_COMPONENT,
|
|
86
100
|
null
|
|
@@ -116,26 +130,12 @@ if (!providerEntity) {
|
|
|
116
130
|
"Missing bl\xF6kkli injection: " + INJECT_PROVIDER_CONTEXT.toString()
|
|
117
131
|
);
|
|
118
132
|
}
|
|
119
|
-
const props = defineProps({
|
|
120
|
-
name: { type: String, required: true },
|
|
121
|
-
list: { type: [Array, Object, null], required: false, default: () => [] },
|
|
122
|
-
tag: { type: String, required: false, default: "div" },
|
|
123
|
-
fieldListType: { type: null, required: false, default: "default" },
|
|
124
|
-
editOnly: { type: Boolean, required: false },
|
|
125
|
-
listClass: { type: String, required: false, default: "" },
|
|
126
|
-
editClass: { type: String, required: false, default: "" },
|
|
127
|
-
nonEmptyClass: { type: String, required: false, default: "" },
|
|
128
|
-
allowedFragments: { type: Array, required: false, default: () => [] },
|
|
129
|
-
dropAlignment: { type: String, required: false, default: void 0 },
|
|
130
|
-
proxyMode: { type: Boolean, required: false },
|
|
131
|
-
shouldRenderItem: { type: Function, required: false, default: void 0 }
|
|
132
|
-
});
|
|
133
133
|
const canEdit = ref(true);
|
|
134
134
|
const fieldKey = computed(() => {
|
|
135
135
|
if (canEdit.value) {
|
|
136
136
|
return entity.uuid + ":" + props.name;
|
|
137
137
|
}
|
|
138
|
-
return
|
|
138
|
+
return "";
|
|
139
139
|
});
|
|
140
140
|
const fieldListType = computed(() => props.fieldListType);
|
|
141
141
|
function filterVisible(item) {
|
|
@@ -145,6 +145,9 @@ function filterVisible(item) {
|
|
|
145
145
|
if (isEditing) {
|
|
146
146
|
return true;
|
|
147
147
|
}
|
|
148
|
+
if (!item.isVisible) {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
148
151
|
const isVisible = isVisibleByOptions(item, providerEntity.value.language);
|
|
149
152
|
const isVisibleCustom = props.shouldRenderItem ? props.shouldRenderItem(item) : true;
|
|
150
153
|
return isVisible && isVisibleCustom;
|
|
@@ -152,11 +155,12 @@ function filterVisible(item) {
|
|
|
152
155
|
const filteredList = computed(() => {
|
|
153
156
|
if (mutatedFields && !isInReusable && editContext && fieldKey.value && (isPreview?.value || isEditing)) {
|
|
154
157
|
return ((mutatedFields[fieldKey.value] || {}).list || []).map((v) => {
|
|
158
|
+
const mutatedOptions = editContext.mutatedOptions[v.uuid] || {};
|
|
155
159
|
return {
|
|
156
160
|
...v,
|
|
157
161
|
options: {
|
|
158
|
-
...v.options
|
|
159
|
-
|
|
162
|
+
...v.options,
|
|
163
|
+
...mutatedOptions
|
|
160
164
|
}
|
|
161
165
|
};
|
|
162
166
|
});
|
|
@@ -1,27 +1,63 @@
|
|
|
1
1
|
import type { BlokkliFragmentName } from '#blokkli-build/definitions';
|
|
2
|
-
import type { FieldListItem } from '#blokkli/types';
|
|
2
|
+
import type { FieldListItem, FieldDropAlignment, VueClassProp } from '#blokkli/types';
|
|
3
3
|
import type { ValidFieldListTypes, FieldListItemTyped } from '#blokkli-build/generated-types';
|
|
4
|
-
type __VLS_Slots = {
|
|
5
|
-
default(props: {
|
|
6
|
-
items: FieldListItemTyped[];
|
|
7
|
-
}): any;
|
|
8
|
-
after(props: {
|
|
9
|
-
items: FieldListItemTyped[];
|
|
10
|
-
}): any;
|
|
11
|
-
};
|
|
12
4
|
type __VLS_Props = {
|
|
5
|
+
/**
|
|
6
|
+
* The name of the field.
|
|
7
|
+
*/
|
|
13
8
|
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* The field list items. Can be an array or a single item, also allows nullable values in an array.
|
|
11
|
+
*/
|
|
14
12
|
list?: Array<FieldListItem | null | undefined> | FieldListItem | null;
|
|
13
|
+
/**
|
|
14
|
+
* The tag to use for rendering the root element.
|
|
15
|
+
*/
|
|
15
16
|
tag?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The field list types. The available types can be defined in the "fieldListTypes" module option.
|
|
19
|
+
*/
|
|
16
20
|
fieldListType?: ValidFieldListTypes;
|
|
21
|
+
/**
|
|
22
|
+
* If true, the field list items are only rendered in edit mode.
|
|
23
|
+
* In normal mode, you are responsible yourself to render the items.
|
|
24
|
+
*/
|
|
17
25
|
editOnly?: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The classes to render for the list. Same as passing classes via the :class prop.
|
|
28
|
+
*/
|
|
29
|
+
listClass?: VueClassProp;
|
|
30
|
+
/**
|
|
31
|
+
* Classes only applied during editing.
|
|
32
|
+
*/
|
|
33
|
+
editClass?: VueClassProp;
|
|
34
|
+
/**
|
|
35
|
+
* Classes to apply if the field is not empty.
|
|
36
|
+
*/
|
|
20
37
|
nonEmptyClass?: string;
|
|
21
|
-
|
|
22
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Define which fragments are allowed in this field.
|
|
40
|
+
*
|
|
41
|
+
* Note that this is only used during editing. It defines which fragments
|
|
42
|
+
* can be added here. If you change this prop but there are existing
|
|
43
|
+
* fragments already in the field list, they will continue to be rendered.
|
|
44
|
+
*
|
|
45
|
+
* Note that in addition, also the "blokkli_fragment" block must be allowed
|
|
46
|
+
* as a bundle in this field.
|
|
47
|
+
*/
|
|
48
|
+
allowedFragments?: BlokkliFragmentName[] | BlokkliFragmentName;
|
|
49
|
+
/**
|
|
50
|
+
* Force an alignment during drag and drop interactions.
|
|
51
|
+
*/
|
|
52
|
+
dropAlignment?: FieldDropAlignment;
|
|
23
53
|
/**
|
|
24
54
|
* Renders proxy blocks during editing.
|
|
55
|
+
*
|
|
56
|
+
* Doing this will *not* render the actual block components.
|
|
57
|
+
*
|
|
58
|
+
* During editing, a separate element is rendered with "position: absolute"
|
|
59
|
+
* that contains "proxy blocks" for drag and drop interactions. This means
|
|
60
|
+
* that you need to have a wrapper somewhere with "position: relative".
|
|
25
61
|
*/
|
|
26
62
|
proxyMode?: boolean;
|
|
27
63
|
/**
|
|
@@ -29,15 +65,23 @@ type __VLS_Props = {
|
|
|
29
65
|
*/
|
|
30
66
|
shouldRenderItem?: (item: FieldListItem | FieldListItemTyped) => boolean;
|
|
31
67
|
};
|
|
68
|
+
type __VLS_Slots = {
|
|
69
|
+
default(props: {
|
|
70
|
+
items: FieldListItemTyped[];
|
|
71
|
+
}): any;
|
|
72
|
+
after(props: {
|
|
73
|
+
items: FieldListItemTyped[];
|
|
74
|
+
}): any;
|
|
75
|
+
};
|
|
32
76
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
33
77
|
list: Array<FieldListItem | null | undefined> | FieldListItem | null;
|
|
34
78
|
fieldListType: ValidFieldListTypes;
|
|
35
|
-
allowedFragments: BlokkliFragmentName[];
|
|
79
|
+
allowedFragments: BlokkliFragmentName[] | BlokkliFragmentName;
|
|
80
|
+
dropAlignment: FieldDropAlignment;
|
|
36
81
|
tag: string;
|
|
37
|
-
dropAlignment: "vertical" | "horizontal";
|
|
38
82
|
shouldRenderItem: (item: FieldListItem | FieldListItemTyped) => boolean;
|
|
39
|
-
listClass:
|
|
40
|
-
editClass:
|
|
83
|
+
listClass: VueClassProp;
|
|
84
|
+
editClass: VueClassProp;
|
|
41
85
|
nonEmptyClass: string;
|
|
42
86
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
43
87
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:is="component"
|
|
13
13
|
v-else-if="component"
|
|
14
14
|
v-bind="props"
|
|
15
|
-
:data-bk-in-proxy="fieldUsesProxy || void 0"
|
|
15
|
+
:data-bk-in-proxy="fieldUsesProxy || (isEditing ? 'false' : void 0)"
|
|
16
16
|
/>
|
|
17
17
|
<div v-else-if="isEditing">Block not implemented</div>
|
|
18
18
|
</template>
|
|
@@ -38,10 +38,10 @@ const itemEntityType = useRuntimeConfig().public.blokkli.itemEntityType;
|
|
|
38
38
|
const componentProps = defineProps({
|
|
39
39
|
uuid: { type: String, required: true },
|
|
40
40
|
bundle: { type: String, required: true },
|
|
41
|
-
isNew: { type: Boolean, required: false },
|
|
42
41
|
options: { type: null, required: false, default: () => ({}) },
|
|
43
42
|
props: { type: null, required: false, default: () => ({}) },
|
|
44
43
|
index: { type: Number, required: false, default: 0 },
|
|
44
|
+
editContext: { type: Object, required: false, default: void 0 },
|
|
45
45
|
parentType: { type: String, required: false, default: "" },
|
|
46
46
|
isEditing: { type: Boolean, required: false, default: false }
|
|
47
47
|
});
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import type { BlockEditContext } from '#blokkli/types';
|
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
|
2
3
|
uuid: string;
|
|
3
4
|
bundle: string;
|
|
4
|
-
isNew?: boolean;
|
|
5
5
|
options?: any;
|
|
6
6
|
props?: any;
|
|
7
7
|
index?: number;
|
|
8
|
+
editContext?: BlockEditContext;
|
|
8
9
|
parentType?: string;
|
|
9
10
|
isEditing?: boolean;
|
|
10
11
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
11
12
|
uuid: string;
|
|
12
13
|
bundle: string;
|
|
13
|
-
isNew?: boolean;
|
|
14
14
|
options?: any;
|
|
15
15
|
props?: any;
|
|
16
16
|
index?: number;
|
|
17
|
+
editContext?: BlockEditContext;
|
|
17
18
|
parentType?: string;
|
|
18
19
|
isEditing?: boolean;
|
|
19
20
|
}> & Readonly<{}>, {
|
|
@@ -21,6 +22,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
22
|
options: any;
|
|
22
23
|
parentType: string;
|
|
23
24
|
isEditing: boolean;
|
|
25
|
+
editContext: BlockEditContext;
|
|
24
26
|
props: any;
|
|
25
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
28
|
export default _default;
|