@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
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport to="#bk-canvas-overlay">
|
|
3
|
+
<BlokkliTransition name="caret-tooltip">
|
|
4
|
+
<Overlay
|
|
5
|
+
v-if="addData"
|
|
6
|
+
:key="addData.key"
|
|
7
|
+
:bundles="addData.allowedBundles"
|
|
8
|
+
:anchor-el="addData.anchorEl"
|
|
9
|
+
:anchor-coordinates="addData.anchorCoordinates"
|
|
10
|
+
:label="addData.label"
|
|
11
|
+
@select="onSelectBundle"
|
|
12
|
+
@close="closeOverlay"
|
|
13
|
+
@action="onSelectAction"
|
|
14
|
+
/>
|
|
15
|
+
</BlokkliTransition>
|
|
16
|
+
</Teleport>
|
|
17
|
+
|
|
18
|
+
<Renderer @toggle="onRendererToggle" @toggle-field="onRendererToggleField" />
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
23
|
+
import { computed, useBlokkli, ref, watch } from "#imports";
|
|
24
|
+
import { BlokkliTransition } from "#blokkli/components";
|
|
25
|
+
import {
|
|
26
|
+
getChildrenOrientation,
|
|
27
|
+
getGapSize,
|
|
28
|
+
MIN_GAP,
|
|
29
|
+
determineCanAddChildren
|
|
30
|
+
} from "#blokkli/helpers/dropTargets";
|
|
31
|
+
import Overlay from "./Overlay/index.vue";
|
|
32
|
+
import { renderCycle } from "#blokkli/helpers/renderCycle";
|
|
33
|
+
import { getFieldKey } from "#blokkli/helpers";
|
|
34
|
+
import { isInternalBundle } from "#blokkli/helpers/bundles";
|
|
35
|
+
import Renderer from "./Renderer/index.vue";
|
|
36
|
+
import { itemEntityType } from "#blokkli-build/config";
|
|
37
|
+
const props = defineProps({
|
|
38
|
+
items: { type: Array, required: true }
|
|
39
|
+
});
|
|
40
|
+
const { dom, state, eventBus, types, $t, blocks, fields } = useBlokkli();
|
|
41
|
+
const shouldRender = computed(() => {
|
|
42
|
+
return props.items.length === 1;
|
|
43
|
+
});
|
|
44
|
+
const block = computed(() => {
|
|
45
|
+
if (props.items.length === 1) {
|
|
46
|
+
return props.items[0] ?? null;
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
});
|
|
50
|
+
const uuid = computed(() => {
|
|
51
|
+
return block.value?.uuid ?? null;
|
|
52
|
+
});
|
|
53
|
+
const emptyBlockFields = computed(() => {
|
|
54
|
+
if (!block.value) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
const uuid2 = block.value.uuid;
|
|
58
|
+
return types.fieldConfig.forEntityTypeAndBundle(itemEntityType, block.value.bundle).map((field) => {
|
|
59
|
+
const key = getFieldKey(uuid2, field.name);
|
|
60
|
+
const count = state.getFieldBlockCount(key);
|
|
61
|
+
return {
|
|
62
|
+
key,
|
|
63
|
+
count,
|
|
64
|
+
name: field.name
|
|
65
|
+
};
|
|
66
|
+
}).filter((v) => {
|
|
67
|
+
return v.count === 0;
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
const containerStyle = ref({ visibility: "hidden" });
|
|
71
|
+
const orientationClass = ref("");
|
|
72
|
+
const containerRect = ref(null);
|
|
73
|
+
const fieldButtonSlots = ref([]);
|
|
74
|
+
const bundleLabel = computed(() => {
|
|
75
|
+
if (!block.value) {
|
|
76
|
+
return "";
|
|
77
|
+
}
|
|
78
|
+
return types.getBlockBundleDefinition(block.value.bundle)?.label || block.value.bundle;
|
|
79
|
+
});
|
|
80
|
+
const allowedBundlesForField = computed(() => {
|
|
81
|
+
if (!block.value) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
const blockData = blocks.getBlock(block.value.uuid);
|
|
85
|
+
if (!blockData) {
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
const field = fields.find(blockData.host.uuid, blockData.host.fieldName);
|
|
89
|
+
if (!field) {
|
|
90
|
+
return [];
|
|
91
|
+
}
|
|
92
|
+
return field.allowedBundles.filter((bundle) => !isInternalBundle(bundle));
|
|
93
|
+
});
|
|
94
|
+
const singleAllowedBundleLabel = computed(() => {
|
|
95
|
+
if (allowedBundlesForField.value.length === 1) {
|
|
96
|
+
const bundle = allowedBundlesForField.value[0];
|
|
97
|
+
if (bundle) {
|
|
98
|
+
return types.getBlockBundleDefinition(bundle)?.label || bundle;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
});
|
|
103
|
+
const beforeTooltip = computed(() => {
|
|
104
|
+
if (singleAllowedBundleLabel.value) {
|
|
105
|
+
return $t("addButtonBundleBefore", 'Add "@bundle" before').replace(
|
|
106
|
+
"@bundle",
|
|
107
|
+
singleAllowedBundleLabel.value
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
return $t("addButtonBeforeBundle", "Add before...");
|
|
111
|
+
});
|
|
112
|
+
const afterTooltip = computed(() => {
|
|
113
|
+
if (singleAllowedBundleLabel.value) {
|
|
114
|
+
return $t("addButtonBundleAfter", 'Add "@bundle" after').replace(
|
|
115
|
+
"@bundle",
|
|
116
|
+
singleAllowedBundleLabel.value
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
return $t("addButtonAfterBundle", "Add after...");
|
|
120
|
+
});
|
|
121
|
+
const fieldTooltips = computed(() => {
|
|
122
|
+
if (!block.value || !bundleLabel.value) {
|
|
123
|
+
return [];
|
|
124
|
+
}
|
|
125
|
+
return emptyBlockFields.value.map((field) => {
|
|
126
|
+
const fieldConfig = types.fieldConfig.forEntityTypeAndBundle(itemEntityType, block.value.bundle).find((f) => f.name === field.name);
|
|
127
|
+
const fieldLabel = fieldConfig?.label || field.name;
|
|
128
|
+
const fieldElement = fields.find(block.value.uuid, field.name);
|
|
129
|
+
if (fieldElement) {
|
|
130
|
+
const allowedBundles = fieldElement.allowedBundles.filter(
|
|
131
|
+
(bundle) => !isInternalBundle(bundle)
|
|
132
|
+
);
|
|
133
|
+
if (allowedBundles.length === 1) {
|
|
134
|
+
const bundle = allowedBundles[0];
|
|
135
|
+
if (bundle) {
|
|
136
|
+
const singleBundleLabel = types.getBlockBundleDefinition(bundle)?.label || bundle;
|
|
137
|
+
return $t(
|
|
138
|
+
"addButtonBundleInsideField",
|
|
139
|
+
'Add "@bundle" inside @parentBundle \xBB @fieldLabel'
|
|
140
|
+
).replace("@bundle", singleBundleLabel).replace("@parentBundle", bundleLabel.value).replace("@fieldLabel", fieldLabel);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return $t(
|
|
145
|
+
"addButtonInsideField",
|
|
146
|
+
"Add inside @parentBundle \xBB @fieldLabel..."
|
|
147
|
+
).replace("@parentBundle", bundleLabel.value).replace("@fieldLabel", fieldLabel);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
watch(emptyBlockFields, (fields2) => {
|
|
151
|
+
const neededCount = fields2.length;
|
|
152
|
+
while (fieldButtonSlots.value.length < neededCount) {
|
|
153
|
+
fieldButtonSlots.value.push({ fieldKey: void 0 });
|
|
154
|
+
}
|
|
155
|
+
for (let i = 0; i < fieldButtonSlots.value.length; i++) {
|
|
156
|
+
const slot = fieldButtonSlots.value[i];
|
|
157
|
+
if (!slot) {
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
if (i < fields2.length) {
|
|
161
|
+
const field = fields2[i];
|
|
162
|
+
slot.fieldKey = field?.key;
|
|
163
|
+
} else {
|
|
164
|
+
slot.fieldKey = void 0;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
const addData = ref(null);
|
|
169
|
+
function closeOverlay() {
|
|
170
|
+
addData.value = null;
|
|
171
|
+
}
|
|
172
|
+
function onSelectBundle(bundle) {
|
|
173
|
+
if (!addData.value) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
eventBus.emit("block:append", {
|
|
177
|
+
bundle,
|
|
178
|
+
host: { ...addData.value.host },
|
|
179
|
+
afterUuid: addData.value.preceedingUuid
|
|
180
|
+
});
|
|
181
|
+
closeOverlay();
|
|
182
|
+
}
|
|
183
|
+
function onSelectAction(id) {
|
|
184
|
+
if (!addData.value) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
eventBus.emit("action:placed", {
|
|
188
|
+
id,
|
|
189
|
+
field: addData.value.field,
|
|
190
|
+
preceedingUuid: addData.value.preceedingUuid,
|
|
191
|
+
host: { ...addData.value.host }
|
|
192
|
+
});
|
|
193
|
+
closeOverlay();
|
|
194
|
+
}
|
|
195
|
+
const cache = /* @__PURE__ */ new Map();
|
|
196
|
+
function clearAllCache() {
|
|
197
|
+
cache.clear();
|
|
198
|
+
containerStyle.value = { visibility: "hidden" };
|
|
199
|
+
orientationClass.value = "";
|
|
200
|
+
}
|
|
201
|
+
function updateCache(uuid2) {
|
|
202
|
+
let cachedState = cache.get(uuid2);
|
|
203
|
+
if (!cachedState) {
|
|
204
|
+
const block2 = blocks.getBlock(uuid2);
|
|
205
|
+
if (!block2) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const field = fields.find(block2.host.uuid, block2.host.fieldName);
|
|
209
|
+
if (!field) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const orientation = getChildrenOrientation(field.element);
|
|
213
|
+
const gap = Math.max(getGapSize(orientation, field.element), MIN_GAP);
|
|
214
|
+
const fieldChildren = [...field.element.children];
|
|
215
|
+
const currentCount = state.getFieldBlockCount(field.key);
|
|
216
|
+
const canShow = determineCanAddChildren(
|
|
217
|
+
field,
|
|
218
|
+
fieldChildren,
|
|
219
|
+
[],
|
|
220
|
+
// Not moving any blocks, adding a new one
|
|
221
|
+
currentCount,
|
|
222
|
+
1,
|
|
223
|
+
// Adding 1 new block
|
|
224
|
+
[]
|
|
225
|
+
// Don't know which bundle will be added
|
|
226
|
+
);
|
|
227
|
+
cachedState = {
|
|
228
|
+
orientation,
|
|
229
|
+
gap,
|
|
230
|
+
canShowBeforeAfter: canShow
|
|
231
|
+
};
|
|
232
|
+
cache.set(uuid2, cachedState);
|
|
233
|
+
}
|
|
234
|
+
orientationClass.value = cachedState.orientation === "vertical" ? "bk-is-vertical" : "bk-is-horizontal";
|
|
235
|
+
}
|
|
236
|
+
watch(
|
|
237
|
+
uuid,
|
|
238
|
+
async (newUuid) => {
|
|
239
|
+
closeOverlay();
|
|
240
|
+
if (!shouldRender.value) {
|
|
241
|
+
containerStyle.value = { visibility: "hidden" };
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (newUuid) {
|
|
245
|
+
await renderCycle();
|
|
246
|
+
updateCache(newUuid);
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{ immediate: true }
|
|
250
|
+
);
|
|
251
|
+
onBlokkliEvent("animationFrame:after", () => {
|
|
252
|
+
if (!shouldRender.value || !uuid.value) {
|
|
253
|
+
containerStyle.value = { visibility: "hidden" };
|
|
254
|
+
containerRect.value = null;
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
const cachedState = cache.get(uuid.value);
|
|
258
|
+
if (!cachedState) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const blockRect = dom.getBlockRect(uuid.value);
|
|
262
|
+
if (!blockRect) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
if (blockRect.width === 0) {
|
|
266
|
+
containerStyle.value = { visibility: "hidden" };
|
|
267
|
+
containerRect.value = null;
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
containerStyle.value = {
|
|
271
|
+
transform: `translate(${blockRect.x}px, ${blockRect.y}px)`,
|
|
272
|
+
width: `${blockRect.width}px`,
|
|
273
|
+
height: `${blockRect.height}px`,
|
|
274
|
+
"--gap": `${cachedState.gap}px`,
|
|
275
|
+
visibility: "visible"
|
|
276
|
+
};
|
|
277
|
+
containerRect.value = { x: blockRect.x, y: blockRect.y };
|
|
278
|
+
});
|
|
279
|
+
onBlokkliEvent("state:reloaded", () => {
|
|
280
|
+
clearAllCache();
|
|
281
|
+
if (shouldRender.value && uuid.value) {
|
|
282
|
+
updateCache(uuid.value);
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
function setAddData(key, field, label, preceedingUuid, anchorEl, anchorCoordinates) {
|
|
286
|
+
const allowedBundles = field.allowedBundles.filter(
|
|
287
|
+
(bundle) => !isInternalBundle(bundle)
|
|
288
|
+
);
|
|
289
|
+
if (allowedBundles.length === 0) {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
const host = {
|
|
293
|
+
type: field.hostEntityType,
|
|
294
|
+
uuid: field.hostEntityUuid,
|
|
295
|
+
fieldName: field.name
|
|
296
|
+
};
|
|
297
|
+
if (allowedBundles.length === 1) {
|
|
298
|
+
const bundle = allowedBundles[0];
|
|
299
|
+
eventBus.emit("block:append", {
|
|
300
|
+
bundle,
|
|
301
|
+
host,
|
|
302
|
+
afterUuid: preceedingUuid
|
|
303
|
+
});
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
addData.value = {
|
|
307
|
+
key,
|
|
308
|
+
allowedBundles,
|
|
309
|
+
preceedingUuid,
|
|
310
|
+
host,
|
|
311
|
+
anchorEl,
|
|
312
|
+
anchorCoordinates,
|
|
313
|
+
label,
|
|
314
|
+
field
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
function getPreceedingUuidBefore(uuid2, field) {
|
|
318
|
+
const children = [...field.element.children];
|
|
319
|
+
let prevUuid = void 0;
|
|
320
|
+
for (let i = 0; i < children.length; i++) {
|
|
321
|
+
const child = children[i];
|
|
322
|
+
if (!child) {
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
const childUuid = child.dataset.uuid;
|
|
326
|
+
if (childUuid === uuid2) {
|
|
327
|
+
return prevUuid;
|
|
328
|
+
}
|
|
329
|
+
prevUuid = childUuid;
|
|
330
|
+
}
|
|
331
|
+
return void 0;
|
|
332
|
+
}
|
|
333
|
+
function onRendererToggle(data) {
|
|
334
|
+
const key = data.position;
|
|
335
|
+
if (addData.value?.key === key) {
|
|
336
|
+
return closeOverlay();
|
|
337
|
+
}
|
|
338
|
+
if (!uuid.value) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
const cachedState = cache.get(uuid.value);
|
|
342
|
+
if (!cachedState) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const block2 = blocks.getBlock(uuid.value);
|
|
346
|
+
if (!block2) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const field = fields.find(block2.host.uuid, block2.host.fieldName);
|
|
350
|
+
if (!field) {
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
if (!field.allowedBundles.length) {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
let preceedingUuid;
|
|
357
|
+
let label;
|
|
358
|
+
if (data.position === "before") {
|
|
359
|
+
preceedingUuid = getPreceedingUuidBefore(uuid.value, field);
|
|
360
|
+
label = beforeTooltip.value.replace("...", "");
|
|
361
|
+
} else {
|
|
362
|
+
preceedingUuid = uuid.value;
|
|
363
|
+
label = afterTooltip.value.replace("...", "");
|
|
364
|
+
}
|
|
365
|
+
setAddData(key, field, label, preceedingUuid, void 0, data.coordinates);
|
|
366
|
+
}
|
|
367
|
+
function onRendererToggleField(data) {
|
|
368
|
+
const key = "field:" + data.index;
|
|
369
|
+
if (addData.value?.key === key) {
|
|
370
|
+
return closeOverlay();
|
|
371
|
+
}
|
|
372
|
+
if (!uuid.value) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
const emptyField = emptyBlockFields.value[data.index];
|
|
376
|
+
if (!emptyField) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
const field = fields.find(uuid.value, emptyField.name);
|
|
380
|
+
if (!field) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
const label = (fieldTooltips.value[data.index] || "").replace("...", "");
|
|
384
|
+
setAddData(key, field, label, void 0, void 0, data.coordinates);
|
|
385
|
+
}
|
|
386
|
+
onBlokkliEvent("dragging:start", closeOverlay);
|
|
387
|
+
</script>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RenderedFieldListItem } from '#blokkli/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: RenderedFieldListItem[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: 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>;
|
|
6
|
+
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
precision
|
|
1
|
+
precision highp float;
|
|
2
|
+
|
|
2
3
|
varying vec4 v_quad;
|
|
3
4
|
varying vec3 v_color;
|
|
4
5
|
varying vec4 v_rect_radius;
|
|
@@ -15,7 +16,7 @@ uniform float u_time;
|
|
|
15
16
|
uniform float u_is_transforming;
|
|
16
17
|
uniform vec2 u_resolution;
|
|
17
18
|
|
|
18
|
-
#define PI
|
|
19
|
+
#define PI 3.141592653589793
|
|
19
20
|
|
|
20
21
|
int pseudoQuadrant(vec2 p) {
|
|
21
22
|
return int(floor(step(0.0, p.x) + 2.0 * step(0.0, -p.y)));
|
|
@@ -80,9 +81,10 @@ vec4 drawBox(float thickness, vec4 bg, vec4 fill, vec4 border, float offset) {
|
|
|
80
81
|
(sin(u_time / 270.0 - v_rect_id + offset) + 1.0) / 2.0
|
|
81
82
|
);
|
|
82
83
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
// Smoothly transition borderThickness animation
|
|
85
|
+
float animatedThickness = (t * 0.7 + 0.5) * borderThickness;
|
|
86
|
+
borderThickness = mix(borderThickness, animatedThickness, u_is_transforming);
|
|
87
|
+
|
|
86
88
|
vec2 size = v_rect_size + borderThickness * 2.0 * v_transition;
|
|
87
89
|
float u_edgeSoftness = 1.0 + v_transition;
|
|
88
90
|
vec4 radius = v_rect_radius * u_scale + vec4(borderThickness);
|
|
@@ -100,12 +102,15 @@ vec4 drawBox(float thickness, vec4 bg, vec4 fill, vec4 border, float offset) {
|
|
|
100
102
|
float borderAlpha =
|
|
101
103
|
1.0 - smoothstep(-u_borderSoftness, 0.0, abs(mainDist) - borderThickness);
|
|
102
104
|
|
|
105
|
+
// Smoothly transition stripe pattern
|
|
103
106
|
vec4 stripedFill = vec4(1.0, 1.0, 1.0, 0.0);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
vec4 animatedStripedFill = fill;
|
|
108
|
+
animatedStripedFill.a = getStripePattern(posRelativeToQuad, u_time);
|
|
109
|
+
stripedFill = mix(stripedFill, animatedStripedFill, u_is_transforming);
|
|
110
|
+
|
|
111
|
+
// Smoothly transition borderAlpha modification
|
|
112
|
+
float animatedBorderAlpha = borderAlpha * (t + 0.6);
|
|
113
|
+
borderAlpha = mix(borderAlpha, animatedBorderAlpha, u_is_transforming);
|
|
109
114
|
|
|
110
115
|
vec4 res_with_fill = mix(bg, stripedFill, fillAlpha * stripedFill.a);
|
|
111
116
|
return mix(res_with_fill, border, borderAlpha * border.a);
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
7
|
-
import
|
|
7
|
+
import defineRenderer from "#blokkli/helpers/composables/defineRenderer";
|
|
8
|
+
import { useBlokkli, computed } from "#imports";
|
|
8
9
|
import {
|
|
9
10
|
setBuffersAndAttributes,
|
|
10
11
|
drawBufferInfo,
|
|
@@ -13,12 +14,14 @@ import {
|
|
|
13
14
|
import vs from "./vertex.glsl?raw";
|
|
14
15
|
import fs from "./fragment.glsl?raw";
|
|
15
16
|
import { RectangleBufferCollector } from "#blokkli/helpers/webgl";
|
|
17
|
+
import { useTransitionedValue } from "#blokkli/helpers/useTransitionedValue";
|
|
16
18
|
import { toShaderColor } from "#blokkli/helpers";
|
|
17
19
|
const props = defineProps({
|
|
18
20
|
blocks: { type: Array, required: true },
|
|
19
|
-
gl: { type: null, required: true }
|
|
21
|
+
gl: { type: null, required: true },
|
|
22
|
+
hasHostSelected: { type: Boolean, required: true }
|
|
20
23
|
});
|
|
21
|
-
const { animation, theme, dom, ui } = useBlokkli();
|
|
24
|
+
const { animation, theme, dom, ui, state } = useBlokkli();
|
|
22
25
|
const programInfo = animation.registerProgram("selection", props.gl, [vs, fs]);
|
|
23
26
|
class SelectionRectangleBufferCollector extends RectangleBufferCollector {
|
|
24
27
|
uuids = [];
|
|
@@ -32,11 +35,28 @@ class SelectionRectangleBufferCollector extends RectangleBufferCollector {
|
|
|
32
35
|
return uuid + "no_rect";
|
|
33
36
|
}
|
|
34
37
|
return uuid + rect.time;
|
|
35
|
-
}).join("_");
|
|
38
|
+
}).join("_") + "_host_" + props.hasHostSelected;
|
|
36
39
|
const hasChanged = force || this.prevKey !== key;
|
|
37
40
|
if (hasChanged) {
|
|
38
41
|
this.reset();
|
|
39
42
|
this.lastCount = 0;
|
|
43
|
+
if (props.hasHostSelected) {
|
|
44
|
+
this.addRectangle(
|
|
45
|
+
{
|
|
46
|
+
id: "host",
|
|
47
|
+
height: ui.artboardSize.value.height,
|
|
48
|
+
width: ui.artboardSize.value.width,
|
|
49
|
+
x: 0,
|
|
50
|
+
y: 0,
|
|
51
|
+
radius: [0, 0, 0, 0],
|
|
52
|
+
isInverted: false,
|
|
53
|
+
isFromLibrary: false
|
|
54
|
+
},
|
|
55
|
+
3
|
|
56
|
+
// Type 3 = host selection
|
|
57
|
+
);
|
|
58
|
+
this.lastCount++;
|
|
59
|
+
}
|
|
40
60
|
for (let i = 0; i < props.blocks.length; i++) {
|
|
41
61
|
const block = props.blocks[i];
|
|
42
62
|
if (this.added.has(block.uuid)) {
|
|
@@ -48,7 +68,14 @@ class SelectionRectangleBufferCollector extends RectangleBufferCollector {
|
|
|
48
68
|
if (!rect || !el) {
|
|
49
69
|
continue;
|
|
50
70
|
}
|
|
51
|
-
const style = theme.getDraggableStyle(el);
|
|
71
|
+
const style = ui.lowPerformanceMode.value ? null : theme.getDraggableStyle(el);
|
|
72
|
+
const isFromLibrary = state.fromLibraryUuids.value.includes(block.uuid);
|
|
73
|
+
let type = 0;
|
|
74
|
+
if (isFromLibrary) {
|
|
75
|
+
type = 2;
|
|
76
|
+
} else if (style?.isInverted) {
|
|
77
|
+
type = 1;
|
|
78
|
+
}
|
|
52
79
|
this.addRectangle(
|
|
53
80
|
{
|
|
54
81
|
id: block.uuid,
|
|
@@ -56,10 +83,11 @@ class SelectionRectangleBufferCollector extends RectangleBufferCollector {
|
|
|
56
83
|
width: rect.width,
|
|
57
84
|
x: rect.x,
|
|
58
85
|
y: rect.y,
|
|
59
|
-
radius: style
|
|
60
|
-
isInverted: style
|
|
86
|
+
radius: style?.radius ?? [0, 0, 0, 0],
|
|
87
|
+
isInverted: !!style?.isInverted,
|
|
88
|
+
isFromLibrary
|
|
61
89
|
},
|
|
62
|
-
|
|
90
|
+
type
|
|
63
91
|
);
|
|
64
92
|
this.lastCount++;
|
|
65
93
|
}
|
|
@@ -72,23 +100,78 @@ class SelectionRectangleBufferCollector extends RectangleBufferCollector {
|
|
|
72
100
|
}
|
|
73
101
|
}
|
|
74
102
|
const collector = new SelectionRectangleBufferCollector(props.gl);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (
|
|
86
|
-
return;
|
|
103
|
+
const hasTransformingStyle = computed(
|
|
104
|
+
() => ui.hasTransformOverlayOpen.value || ui.isTransforming.value
|
|
105
|
+
);
|
|
106
|
+
const selectionColorOverride = computed(() => {
|
|
107
|
+
const color = ui.selectionColor.value;
|
|
108
|
+
if (!color) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
if (color === "mono") {
|
|
112
|
+
return toShaderColor(theme.getColor(color, "500"));
|
|
113
|
+
} else if (color === "accent") {
|
|
114
|
+
return toShaderColor(theme.getColor(color, "700"));
|
|
115
|
+
}
|
|
116
|
+
return toShaderColor(theme.getColor(color, "normal"));
|
|
117
|
+
});
|
|
118
|
+
const getColorDefault = useTransitionedValue(() => {
|
|
119
|
+
if (selectionColorOverride.value) {
|
|
120
|
+
return selectionColorOverride.value;
|
|
121
|
+
}
|
|
122
|
+
if (hasTransformingStyle.value) {
|
|
123
|
+
return toShaderColor(theme.orange.value.normal);
|
|
87
124
|
}
|
|
88
|
-
|
|
125
|
+
return toShaderColor(theme.accent.value[600]);
|
|
126
|
+
});
|
|
127
|
+
const getColorInverted = useTransitionedValue(() => {
|
|
128
|
+
if (selectionColorOverride.value) {
|
|
129
|
+
return selectionColorOverride.value;
|
|
130
|
+
}
|
|
131
|
+
if (hasTransformingStyle.value) {
|
|
132
|
+
return toShaderColor(theme.orange.value.normal);
|
|
133
|
+
}
|
|
134
|
+
return toShaderColor([255, 255, 255]);
|
|
135
|
+
});
|
|
136
|
+
const getColorLibrary = useTransitionedValue(() => {
|
|
137
|
+
if (selectionColorOverride.value) {
|
|
138
|
+
return selectionColorOverride.value;
|
|
139
|
+
}
|
|
140
|
+
if (hasTransformingStyle.value) {
|
|
141
|
+
return toShaderColor(theme.orange.value.normal);
|
|
142
|
+
}
|
|
143
|
+
return toShaderColor(theme.lime.value.normal);
|
|
144
|
+
});
|
|
145
|
+
const getColorHost = useTransitionedValue(() => {
|
|
146
|
+
return toShaderColor(theme.mono.value[700]);
|
|
147
|
+
});
|
|
148
|
+
const getTransforming = useTransitionedValue(() => {
|
|
149
|
+
return ui.isTransforming.value ? 1 : 0;
|
|
150
|
+
});
|
|
151
|
+
defineRenderer("selection-overlay", {
|
|
152
|
+
zIndex: 100,
|
|
153
|
+
render: (ctx) => {
|
|
154
|
+
props.gl.useProgram(programInfo.program);
|
|
155
|
+
const { info } = collector.getBufferInfo();
|
|
156
|
+
if (!info) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
setUniforms(programInfo, {
|
|
160
|
+
u_color_default: getColorDefault(),
|
|
161
|
+
u_color_inverted: getColorInverted(),
|
|
162
|
+
u_color_library: getColorLibrary(),
|
|
163
|
+
u_color_host: getColorHost(),
|
|
164
|
+
u_artboard_size: [
|
|
165
|
+
ui.artboardSize.value.width,
|
|
166
|
+
ui.artboardSize.value.height
|
|
167
|
+
],
|
|
168
|
+
u_is_transforming: getTransforming(),
|
|
169
|
+
u_time: ctx.time
|
|
170
|
+
});
|
|
171
|
+
animation.setSharedUniforms(props.gl, programInfo);
|
|
89
172
|
setBuffersAndAttributes(props.gl, programInfo, info);
|
|
173
|
+
drawBufferInfo(props.gl, info, props.gl.TRIANGLES);
|
|
90
174
|
}
|
|
91
|
-
drawBufferInfo(props.gl, info, props.gl.TRIANGLES);
|
|
92
175
|
});
|
|
93
176
|
onBlokkliEvent("ui:resized", function() {
|
|
94
177
|
collector.reset();
|
|
@@ -96,9 +179,6 @@ onBlokkliEvent("ui:resized", function() {
|
|
|
96
179
|
onBlokkliEvent("state:reloaded", function() {
|
|
97
180
|
collector.reset();
|
|
98
181
|
});
|
|
99
|
-
onBeforeUnmount(() => {
|
|
100
|
-
props.gl.clear(props.gl.COLOR_BUFFER_BIT);
|
|
101
|
-
});
|
|
102
182
|
</script>
|
|
103
183
|
|
|
104
184
|
<script>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RenderedFieldListItem } from '#blokkli/types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
blocks:
|
|
3
|
+
blocks: RenderedFieldListItem[];
|
|
4
4
|
gl: WebGLRenderingContext;
|
|
5
|
+
hasHostSelected: boolean;
|
|
5
6
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
-
blocks:
|
|
7
|
+
blocks: RenderedFieldListItem[];
|
|
7
8
|
gl: WebGLRenderingContext;
|
|
9
|
+
hasHostSelected: boolean;
|
|
8
10
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
11
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
precision
|
|
1
|
+
precision highp float;
|
|
2
2
|
|
|
3
3
|
// [x, y] position.
|
|
4
4
|
attribute vec2 a_position;
|
|
@@ -18,6 +18,8 @@ uniform float u_offset_y;
|
|
|
18
18
|
uniform vec2 u_resolution;
|
|
19
19
|
uniform vec3 u_color_default;
|
|
20
20
|
uniform vec3 u_color_inverted;
|
|
21
|
+
uniform vec3 u_color_library;
|
|
22
|
+
uniform vec3 u_color_host;
|
|
21
23
|
|
|
22
24
|
// The transformed quad for the fragment shader.
|
|
23
25
|
varying vec4 v_quad;
|
|
@@ -79,8 +81,15 @@ void main() {
|
|
|
79
81
|
|
|
80
82
|
v_rect_width = adjusted_quad.x;
|
|
81
83
|
|
|
82
|
-
// Set color
|
|
83
|
-
v_color =
|
|
84
|
+
// Set color based on type: 0=default, 1=inverted, 2=library, 3=host
|
|
85
|
+
v_color = u_color_default;
|
|
86
|
+
if (a_rect_type > 2.5) {
|
|
87
|
+
v_color = u_color_host;
|
|
88
|
+
} else if (a_rect_type > 1.5) {
|
|
89
|
+
v_color = u_color_library;
|
|
90
|
+
} else if (a_rect_type > 0.5) {
|
|
91
|
+
v_color = u_color_inverted;
|
|
92
|
+
}
|
|
84
93
|
v_rect_radius = a_rect_radius * u_dpi;
|
|
85
94
|
v_thickness = thickness;
|
|
86
95
|
v_rect_id = a_rect_id;
|
|
@@ -22,11 +22,11 @@ import { useBlokkli, computed } from "#imports";
|
|
|
22
22
|
const props = defineProps({
|
|
23
23
|
uuids: { type: Array, required: true }
|
|
24
24
|
});
|
|
25
|
-
const { ui, dom } = useBlokkli();
|
|
25
|
+
const { ui, dom, blocks } = useBlokkli();
|
|
26
26
|
const artboard = ui.artboardElement();
|
|
27
27
|
const items = computed(() => {
|
|
28
28
|
return props.uuids.map((uuid) => {
|
|
29
|
-
const block =
|
|
29
|
+
const block = blocks.getBlock(uuid);
|
|
30
30
|
if (!block) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|