@blokkli/editor 2.0.0-alpha.22 → 2.0.0-alpha.24
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.json +1 -1
- package/dist/module.mjs +150 -226
- package/dist/runtime/blokkliPlugins/ContextMenu/index.vue +1 -1
- package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue +20 -14
- package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue.d.ts +8 -4
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue +55 -25
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +5 -4
- package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue +9 -2
- package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue.d.ts +2 -0
- package/dist/runtime/blokkliPlugins/TourItem/index.vue +22 -13
- package/dist/runtime/blokkliPlugins/TourItem/index.vue.d.ts +1 -0
- package/dist/runtime/blokkliPlugins/ViewOption/index.vue +3 -1
- package/dist/runtime/blokkliPlugins/index.d.ts +1 -5
- package/dist/runtime/blokkliPlugins/index.js +0 -8
- package/dist/runtime/components/Blocks/FromLibrary/index.vue +0 -5
- package/dist/runtime/components/BlokkliEditable.vue +6 -1
- package/dist/runtime/components/BlokkliField.vue +1 -1
- package/dist/runtime/components/BlokkliProvider.vue +4 -4
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Actions/ItemDropdown.vue +66 -0
- package/dist/runtime/components/Edit/Actions/ItemDropdown.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Actions/index.vue +80 -117
- package/dist/runtime/components/Edit/AddListItem/index.vue +8 -29
- package/dist/runtime/components/Edit/AddListItem/index.vue.d.ts +2 -3
- package/dist/runtime/components/Edit/AnimationCanvas/index.vue +23 -68
- package/dist/runtime/components/Edit/AppMenu/MenuButton.vue +39 -0
- package/dist/runtime/{blokkliPlugins/MenuButton/index.vue.d.ts → components/Edit/AppMenu/MenuButton.vue.d.ts} +0 -4
- package/dist/runtime/components/Edit/AppMenu/index.vue +62 -40
- package/dist/runtime/components/Edit/BlockProxy/index.vue +2 -8
- package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue +33 -49
- package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue.d.ts +14 -1
- package/dist/runtime/components/Edit/BlokkliRootErrorBoundary.vue +93 -0
- package/dist/runtime/components/Edit/BlokkliRootErrorBoundary.vue.d.ts +12 -0
- package/dist/runtime/components/Edit/Dialog/index.vue +26 -5
- package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/DraggableList.vue +5 -25
- package/dist/runtime/components/Edit/EditProvider.vue +71 -41
- package/dist/runtime/components/Edit/EditProvider.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Features/AddList/Actions/Action.vue +52 -0
- package/dist/runtime/components/Edit/Features/AddList/Actions/Action.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Features/AddList/Actions/index.vue +41 -0
- package/dist/runtime/components/Edit/Features/{Selection/OverlayFallback → AddList/Actions}/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Features/{BlockAddList → AddList/Blocks}/index.vue +36 -108
- package/dist/runtime/components/Edit/Features/{Hover/Overlay → AddList/Blocks}/index.vue.d.ts +7 -2
- package/dist/runtime/components/Edit/Features/AddList/index.vue +76 -110
- package/dist/runtime/components/Edit/Features/Analyze/{Renderer.vue → Main.vue} +4 -8
- package/dist/runtime/components/Edit/Features/Analyze/{Overlay → Renderer}/fragment.glsl +10 -6
- package/dist/runtime/components/Edit/Features/Analyze/{Overlay → Renderer}/index.vue +43 -15
- package/dist/runtime/components/Edit/Features/Analyze/{Overlay → Renderer}/index.vue.d.ts +0 -2
- package/dist/runtime/components/Edit/Features/Analyze/{Overlay → Renderer}/vertex.glsl +11 -9
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +15 -3
- package/dist/runtime/components/Edit/Features/Analyze/index.vue +7 -3
- package/dist/runtime/components/Edit/Features/Anchors/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +41 -20
- package/dist/runtime/components/Edit/Features/Artboard/Scrollbar/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Assistant/Overlay/index.vue +2 -28
- package/dist/runtime/components/Edit/Features/Assistant/index.vue +18 -14
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +1 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Clipboard/List/index.vue +22 -11
- package/dist/runtime/components/Edit/Features/Clipboard/index.vue +70 -29
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue +0 -2
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue.d.ts +6 -4
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +77 -27
- package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +7 -4
- package/dist/runtime/components/Edit/Features/Comments/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Conversions/index.vue +16 -9
- package/dist/runtime/components/Edit/Features/Debug/DebugSection.vue +24 -0
- package/dist/runtime/components/Edit/Features/Debug/DebugSection.vue.d.ts +16 -0
- package/dist/runtime/components/Edit/Features/Debug/Main.vue +80 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Features.vue +34 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Icons.vue +15 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Icons.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Keyboard.vue +17 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Keyboard.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Logging.vue +66 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Logging.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Rendering.vue +96 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Rendering.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Selection.vue +25 -0
- package/dist/runtime/components/Edit/Features/Debug/Section/Selection.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Debug/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/DragItem.vue +113 -0
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/DragItem.vue.d.ts +25 -0
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +23 -119
- package/dist/runtime/components/Edit/Features/DraggingOverlay/Renderer/fragment.glsl +77 -0
- package/dist/runtime/components/Edit/Features/DraggingOverlay/{DropTargets → Renderer}/index.vue +138 -92
- package/dist/runtime/components/Edit/Features/DraggingOverlay/{DropTargets → Renderer}/vertex.glsl +60 -8
- package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +4 -5
- package/dist/runtime/components/Edit/Features/EditForm/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +0 -6
- package/dist/runtime/components/Edit/Features/EditableField/index.vue +8 -4
- package/dist/runtime/components/Edit/Features/Exit/index.vue +12 -9
- package/dist/runtime/components/Edit/Features/Fragments/Dialog/Item/index.vue +1 -5
- package/dist/runtime/components/Edit/Features/Fragments/index.vue +27 -31
- package/dist/runtime/components/Edit/Features/Hover/Renderer/fragment.glsl +141 -0
- package/dist/runtime/components/Edit/Features/Hover/{Overlay → Renderer}/index.vue +225 -38
- package/dist/runtime/components/Edit/Features/Hover/Renderer/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Hover/{Overlay → Renderer}/vertex.glsl +49 -11
- package/dist/runtime/components/Edit/Features/Hover/index.vue +9 -6
- package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +1 -0
- package/dist/runtime/components/Edit/Features/ImportExisting/index.vue +25 -24
- package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Library/LibraryDialog/Item/index.vue +1 -5
- package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +1 -0
- package/dist/runtime/components/Edit/Features/Library/index.vue +50 -36
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/Item.vue +1 -1
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +26 -13
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue.d.ts +0 -1
- package/dist/runtime/components/Edit/Features/MediaLibrary/index.vue +3 -47
- package/dist/runtime/components/Edit/Features/MultiSelect/{Overlay → Renderer}/fragment.glsl +13 -26
- package/dist/runtime/components/Edit/Features/MultiSelect/{Overlay → Renderer}/index.vue +131 -75
- package/dist/runtime/components/Edit/Features/MultiSelect/{Overlay → Renderer}/index.vue.d.ts +0 -1
- package/dist/runtime/components/Edit/Features/MultiSelect/{Overlay → Renderer}/vertex.glsl +27 -2
- package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +25 -12
- package/dist/runtime/components/Edit/Features/Ownership/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/PreviewGrant/index.vue +2 -1
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +1 -0
- package/dist/runtime/components/Edit/Features/Publish/index.vue +17 -15
- package/dist/runtime/components/Edit/Features/ResponsivePreview/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Revert/index.vue +24 -18
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Content/index.vue +23 -6
- package/dist/runtime/components/Edit/Features/Search/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +21 -17
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +6 -6
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/fragment.glsl +19 -17
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +242 -131
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/vertex.glsl +29 -12
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +15 -10
- package/dist/runtime/components/Edit/Features/Selection/{Overlay → Renderer}/fragment.glsl +23 -14
- package/dist/runtime/components/Edit/Features/Selection/{Overlay → Renderer}/index.vue +121 -28
- package/dist/runtime/components/Edit/Features/Selection/{Overlay → Renderer}/index.vue.d.ts +0 -2
- package/dist/runtime/components/Edit/Features/Selection/{Overlay → Renderer}/vertex.glsl +23 -14
- package/dist/runtime/components/Edit/Features/Selection/index.vue +46 -59
- package/dist/runtime/components/Edit/Features/Settings/Dialog/index.vue +1 -0
- package/dist/runtime/components/Edit/Features/Settings/index.vue +25 -17
- package/dist/runtime/components/Edit/Features/TouchActionBar/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Tour/Popup/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Tour/index.vue +12 -10
- package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue +5 -5
- package/dist/runtime/components/Edit/Features/Transform/index.vue +30 -23
- package/dist/runtime/components/Edit/Features/Translations/index.vue +18 -17
- package/dist/runtime/components/Edit/Form/Checkboxes/index.vue +43 -0
- package/dist/runtime/components/Edit/Form/Checkboxes/index.vue.d.ts +20 -0
- package/dist/runtime/components/Edit/FormOverlay/index.vue +13 -4
- package/dist/runtime/components/Edit/ItemIconBox/index.vue +41 -0
- package/dist/runtime/components/Edit/{AddListItemIcon → ItemIconBox}/index.vue.d.ts +5 -5
- package/dist/runtime/components/Edit/Konami/Game/index.vue +0 -1
- package/dist/runtime/components/Edit/Konami/index.vue +3 -5
- package/dist/runtime/components/Edit/Messages/Item/index.vue +11 -2
- package/dist/runtime/components/Edit/Messages/Item/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Messages/index.vue +6 -1
- package/dist/runtime/components/Edit/Overlay/index.vue +66 -0
- package/dist/runtime/components/Edit/Overlay/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/PreviewProvider.vue +1 -1
- package/dist/runtime/components/Edit/Sortli/index.vue +5 -8
- package/dist/runtime/components/Edit/Sortli/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/SystemRequirements/index.vue +36 -36
- package/dist/runtime/components/Edit/Toolbar/index.vue +47 -51
- package/dist/runtime/components/Edit/ViewportBlockingRect/index.vue +9 -2
- package/dist/runtime/components/Edit/ViewportBlockingRect/index.vue.d.ts +4 -1
- package/dist/runtime/components/Edit/index.d.ts +7 -5
- package/dist/runtime/components/Edit/index.js +13 -9
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/animationProvider.d.ts +58 -9
- package/dist/runtime/helpers/animationProvider.js +318 -75
- package/dist/runtime/helpers/composables/defineAddAction.d.ts +2 -0
- package/dist/runtime/helpers/composables/defineAddAction.js +10 -0
- package/dist/runtime/helpers/composables/defineItemDropdownAction.d.ts +2 -0
- package/dist/runtime/helpers/composables/defineItemDropdownAction.js +10 -0
- package/dist/runtime/helpers/composables/defineMenuButton.d.ts +2 -0
- package/dist/runtime/helpers/composables/defineMenuButton.js +10 -0
- package/dist/runtime/helpers/composables/defineRenderer.d.ts +5 -2
- package/dist/runtime/helpers/composables/defineRenderer.js +3 -2
- package/dist/runtime/helpers/composables/useDialog.d.ts +3 -0
- package/dist/runtime/helpers/composables/useDialog.js +16 -0
- package/dist/runtime/helpers/composables/useGlobalBlokkliObject.d.ts +16 -0
- package/dist/runtime/helpers/composables/useGlobalBlokkliObject.js +36 -0
- package/dist/runtime/helpers/debugProvider.d.ts +13 -3
- package/dist/runtime/helpers/debugProvider.js +80 -12
- package/dist/runtime/helpers/defineElementStyle.d.ts +2 -0
- package/dist/runtime/helpers/defineElementStyle.js +33 -0
- package/dist/runtime/helpers/domProvider.d.ts +1 -0
- package/dist/runtime/helpers/domProvider.js +51 -32
- package/dist/runtime/helpers/dropTargets/index.d.ts +1 -1
- package/dist/runtime/helpers/dropTargets/index.js +18 -4
- package/dist/runtime/helpers/eventBus.d.ts +1 -1
- package/dist/runtime/helpers/index.d.ts +1 -6
- package/dist/runtime/helpers/index.js +0 -81
- package/dist/runtime/helpers/pluginProvider.d.ts +38 -3
- package/dist/runtime/helpers/pluginProvider.js +49 -18
- package/dist/runtime/helpers/providers/blocks.js +10 -0
- package/dist/runtime/helpers/providers/directive.d.ts +4 -1
- package/dist/runtime/helpers/providers/directive.js +9 -2
- package/dist/runtime/helpers/providers/fields.d.ts +9 -1
- package/dist/runtime/helpers/stateProvider.js +1 -0
- package/dist/runtime/helpers/uiProvider.d.ts +13 -12
- package/dist/runtime/helpers/uiProvider.js +117 -81
- package/dist/runtime/helpers/webgl/index.d.ts +2 -3
- package/dist/runtime/helpers/webgl/index.js +9 -14
- package/dist/runtime/icons/click.svg +1 -0
- package/dist/runtime/icons/dock-left.svg +1 -0
- package/dist/runtime/icons/dock-right.svg +1 -0
- package/dist/runtime/icons/dock-window.svg +1 -0
- package/dist/runtime/plugins/blokkliDirectives.js +1 -1
- package/dist/runtime/types/index.d.ts +16 -26
- package/package.json +1 -1
- package/dist/runtime/blokkliPlugins/AddAction/index.vue +0 -96
- package/dist/runtime/blokkliPlugins/AddAction/index.vue.d.ts +0 -26
- package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue +0 -56
- package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue.d.ts +0 -24
- package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue +0 -76
- package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue.d.ts +0 -31
- package/dist/runtime/blokkliPlugins/MenuButton/index.vue +0 -66
- package/dist/runtime/components/Edit/AddListItemIcon/index.vue +0 -19
- package/dist/runtime/components/Edit/Features/BlockAddList/docs.md +0 -15
- package/dist/runtime/components/Edit/Features/Debug/Renderer.vue +0 -240
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/fragment.glsl +0 -96
- package/dist/runtime/components/Edit/Features/Hover/Overlay/fragment.glsl +0 -139
- package/dist/runtime/components/Edit/Features/Selection/OverlayFallback/index.vue +0 -42
- /package/dist/runtime/components/Edit/Features/Analyze/{Renderer.vue.d.ts → Main.vue.d.ts} +0 -0
- /package/dist/runtime/components/Edit/Features/Anchors/{Renderer.vue → Overlay/index.vue} +0 -0
- /package/dist/runtime/components/Edit/Features/{BlockAddList → Anchors/Overlay}/index.vue.d.ts +0 -0
- /package/dist/runtime/components/Edit/Features/Debug/{Renderer.vue.d.ts → Main.vue.d.ts} +0 -0
- /package/dist/runtime/components/Edit/Features/{Anchors/Renderer.vue.d.ts → Debug/Section/Features.vue.d.ts} +0 -0
- /package/dist/runtime/components/Edit/Features/DraggingOverlay/{DropTargets → Renderer}/index.vue.d.ts +0 -0
- /package/dist/runtime/components/Edit/Features/Ownership/{Renderer.vue → Banner/index.vue} +0 -0
- /package/dist/runtime/components/Edit/Features/Ownership/{Renderer.vue.d.ts → Banner/index.vue.d.ts} +0 -0
|
@@ -78,7 +78,7 @@ function createDirective(type) {
|
|
|
78
78
|
if (!fieldName) {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
app.directive.registerDirectiveElement(el, fieldName, entity, type);
|
|
81
|
+
app.directive.registerDirectiveElement(el, fieldName, entity, type, false);
|
|
82
82
|
},
|
|
83
83
|
beforeUnmount(el, binding, vnode) {
|
|
84
84
|
if (!isEditing()) {
|
|
@@ -707,6 +707,7 @@ export interface DraggableNewItem {
|
|
|
707
707
|
export interface DraggableActionItem {
|
|
708
708
|
itemType: 'action';
|
|
709
709
|
actionType: string;
|
|
710
|
+
action: AddAction;
|
|
710
711
|
itemBundle?: string;
|
|
711
712
|
element: () => HTMLElement;
|
|
712
713
|
}
|
|
@@ -737,23 +738,6 @@ export interface DraggableMediaLibraryItem {
|
|
|
737
738
|
mediaBundle: string;
|
|
738
739
|
}
|
|
739
740
|
export type DraggableItem = DraggableClipboardItem | DraggableNewItem | DraggableActionItem | DraggableExistingBlock | DraggableExistingStructureBlock | DraggableReusableItem | DraggableSearchContentItem | DraggableMediaLibraryItem;
|
|
740
|
-
/**
|
|
741
|
-
* Defines a droppable entity field.
|
|
742
|
-
*/
|
|
743
|
-
export type DroppableEntityField = {
|
|
744
|
-
/**
|
|
745
|
-
* The droppable field element.
|
|
746
|
-
*/
|
|
747
|
-
element: HTMLElement;
|
|
748
|
-
/**
|
|
749
|
-
* The host.
|
|
750
|
-
*/
|
|
751
|
-
host: DraggableExistingBlock | EntityContext;
|
|
752
|
-
/**
|
|
753
|
-
* The name of the field on which entities can be dropped.
|
|
754
|
-
*/
|
|
755
|
-
fieldName: string;
|
|
756
|
-
};
|
|
757
741
|
export type MoveBlockEvent = {
|
|
758
742
|
afterUuid?: string;
|
|
759
743
|
item: DraggableExistingBlock;
|
|
@@ -817,7 +801,7 @@ export type AnimationFrameEvent = {
|
|
|
817
801
|
time: number;
|
|
818
802
|
};
|
|
819
803
|
export type Message = {
|
|
820
|
-
type: 'success' | 'error';
|
|
804
|
+
type: 'success' | 'error' | 'warning';
|
|
821
805
|
message: string;
|
|
822
806
|
additional?: string | Error | unknown;
|
|
823
807
|
replace?: boolean;
|
|
@@ -832,7 +816,6 @@ export type Coord = {
|
|
|
832
816
|
};
|
|
833
817
|
export type Rectangle = Size & Coord;
|
|
834
818
|
export type CanvasDrawEvent = {
|
|
835
|
-
gl: WebGLRenderingContext;
|
|
836
819
|
mouseX: number;
|
|
837
820
|
mouseY: number;
|
|
838
821
|
mouseArtboard: Coord;
|
|
@@ -841,6 +824,7 @@ export type CanvasDrawEvent = {
|
|
|
841
824
|
artboardSize: Size;
|
|
842
825
|
time: number;
|
|
843
826
|
selectedUuids: string[];
|
|
827
|
+
dpi: number;
|
|
844
828
|
};
|
|
845
829
|
export type MakeReusableEvent = {
|
|
846
830
|
label: string;
|
|
@@ -880,7 +864,6 @@ export type ScrollIntoViewEvent = {
|
|
|
880
864
|
export type PluginMountEvent = {
|
|
881
865
|
type: 'ItemDropdown';
|
|
882
866
|
id: string;
|
|
883
|
-
isRendering: ComputedRef<boolean>;
|
|
884
867
|
};
|
|
885
868
|
export type PluginUnmountEvent = {
|
|
886
869
|
type: 'ItemDropdown';
|
|
@@ -927,8 +910,7 @@ export type BlokkliFieldElement = {
|
|
|
927
910
|
dropAlignment: FieldDropAlignment | null;
|
|
928
911
|
};
|
|
929
912
|
export type FieldDropAlignment = 'vertical' | 'horizontal';
|
|
930
|
-
export type
|
|
931
|
-
id: string;
|
|
913
|
+
export type ActionPlacedData = {
|
|
932
914
|
preceedingUuid?: string;
|
|
933
915
|
host: DraggableHostData;
|
|
934
916
|
field: BlokkliFieldElement;
|
|
@@ -1024,6 +1006,7 @@ export type EventbusEvents = {
|
|
|
1024
1006
|
'select:toggle': string;
|
|
1025
1007
|
'select:shiftToggle': string;
|
|
1026
1008
|
'select:end': string[] | undefined;
|
|
1009
|
+
'overlay:close': undefined;
|
|
1027
1010
|
'item:dropped': undefined;
|
|
1028
1011
|
'block:append': BlockAppendEvent;
|
|
1029
1012
|
'item:doubleClick': RenderedFieldListItem;
|
|
@@ -1031,6 +1014,7 @@ export type EventbusEvents = {
|
|
|
1031
1014
|
'animationFrame:before': AnimationFrameBeforeEvent;
|
|
1032
1015
|
'animationFrame:after': undefined;
|
|
1033
1016
|
'canvas:draw': CanvasDrawEvent;
|
|
1017
|
+
'state:reload:before': undefined;
|
|
1034
1018
|
'state:reloaded': undefined;
|
|
1035
1019
|
addContentSearchItem: AddContentSearchItemEvent;
|
|
1036
1020
|
'option:update': UpdateBlockOptionEvent;
|
|
@@ -1043,11 +1027,9 @@ export type EventbusEvents = {
|
|
|
1043
1027
|
'editable:focus': EditableFieldFocusEvent;
|
|
1044
1028
|
'editable:update': EditableFieldUpdateEvent;
|
|
1045
1029
|
'editable:save': undefined;
|
|
1046
|
-
'droppable:focus': DroppableEntityField;
|
|
1047
1030
|
'drop:clipboardItem': DropClipboardItemEvent;
|
|
1048
1031
|
'sidebar:close': undefined;
|
|
1049
1032
|
'sidebar:open': string;
|
|
1050
|
-
'action:placed': ActionPlacedEvent;
|
|
1051
1033
|
'action:selected': undefined;
|
|
1052
1034
|
'animator:add': AnimatorAddEvent;
|
|
1053
1035
|
'ui:resized': undefined;
|
|
@@ -1144,7 +1126,6 @@ export type AssistantResultMarkup = {
|
|
|
1144
1126
|
content: string;
|
|
1145
1127
|
};
|
|
1146
1128
|
export type AssistantResult = AssistantResultMarkup;
|
|
1147
|
-
export type AddListOrientation = 'horizontal' | 'vertical' | 'sidebar';
|
|
1148
1129
|
export type AdapterMethods = keyof BlokkliAdapter<any>;
|
|
1149
1130
|
export type FeatureDefinitionSettingRadiosOption = {
|
|
1150
1131
|
label: string;
|
|
@@ -1377,7 +1358,8 @@ export type AddAction = {
|
|
|
1377
1358
|
itemBundle?: string;
|
|
1378
1359
|
title: string;
|
|
1379
1360
|
description?: string;
|
|
1380
|
-
|
|
1361
|
+
callback: (action: ActionPlacedData) => void;
|
|
1362
|
+
enabled?: (item: RenderedFieldListItem) => boolean;
|
|
1381
1363
|
};
|
|
1382
1364
|
export type BlockEditContext = {
|
|
1383
1365
|
isPublished: boolean;
|
|
@@ -1400,6 +1382,9 @@ export type RenderedFieldListItem = {
|
|
|
1400
1382
|
libraryItemUuid: string;
|
|
1401
1383
|
reusableBundle: string;
|
|
1402
1384
|
} | null;
|
|
1385
|
+
fragment: {
|
|
1386
|
+
name: BlokkliFragmentName;
|
|
1387
|
+
} | null;
|
|
1403
1388
|
isNested: boolean;
|
|
1404
1389
|
publishOn?: string | null;
|
|
1405
1390
|
unpublishOn?: string | null;
|
|
@@ -1417,5 +1402,10 @@ export type RegisteredField = {
|
|
|
1417
1402
|
};
|
|
1418
1403
|
export type RegisterFieldData = Pick<RegisteredField, 'fieldListType' | 'allowedFragments' | 'isNested' | 'nestingLevel' | 'dropAlignment'>;
|
|
1419
1404
|
export type VueClassProp = string | Record<string, boolean> | VueClassProp[];
|
|
1405
|
+
export type SidebarRegion = 'left' | 'right';
|
|
1406
|
+
export type GlobalUiDialog = {
|
|
1407
|
+
id: string;
|
|
1408
|
+
alignment: 'left' | 'right' | 'center';
|
|
1409
|
+
};
|
|
1420
1410
|
declare const _default: {};
|
|
1421
1411
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Teleport v-if="shouldRender" :key="renderKey" to="#blokkli-add-list-actions">
|
|
3
|
-
<AddListItem
|
|
4
|
-
:id="type"
|
|
5
|
-
ref="item"
|
|
6
|
-
:label="title"
|
|
7
|
-
:icon="icon"
|
|
8
|
-
:orientation="ui.addListOrientation.value"
|
|
9
|
-
:color="color"
|
|
10
|
-
:disabled="disabled"
|
|
11
|
-
data-element-type="action"
|
|
12
|
-
:data-action-type="type"
|
|
13
|
-
:data-item-bundle="itemBundle"
|
|
14
|
-
no-context-menu
|
|
15
|
-
/>
|
|
16
|
-
</Teleport>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script setup>
|
|
20
|
-
import {
|
|
21
|
-
computed,
|
|
22
|
-
useBlokkli,
|
|
23
|
-
nextTick,
|
|
24
|
-
ref,
|
|
25
|
-
onMounted,
|
|
26
|
-
onBeforeUnmount
|
|
27
|
-
} from "#imports";
|
|
28
|
-
import { AddListItem } from "#blokkli/components";
|
|
29
|
-
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
30
|
-
import defineTourItem from "#blokkli/helpers/composables/defineTourItem";
|
|
31
|
-
const props = defineProps({
|
|
32
|
-
type: { type: String, required: true },
|
|
33
|
-
title: { type: String, required: true },
|
|
34
|
-
icon: { type: null, required: true },
|
|
35
|
-
itemBundle: { type: String, required: false },
|
|
36
|
-
color: { type: String, required: true },
|
|
37
|
-
description: { type: String, required: false },
|
|
38
|
-
disabled: { type: Boolean, required: false },
|
|
39
|
-
weight: { type: Number, required: false }
|
|
40
|
-
});
|
|
41
|
-
const item = ref(null);
|
|
42
|
-
const emit = defineEmits(["placed"]);
|
|
43
|
-
const { ui, state, features, plugins } = useBlokkli();
|
|
44
|
-
const addListAvailable = computed(
|
|
45
|
-
() => !!features.mountedFeatures.value.find((v) => v.id === "add-list")
|
|
46
|
-
);
|
|
47
|
-
const shouldRender = computed(
|
|
48
|
-
() => addListAvailable.value && state.editMode.value === "editing"
|
|
49
|
-
);
|
|
50
|
-
const renderKey = ref("");
|
|
51
|
-
onBlokkliEvent("add-list:change", () => {
|
|
52
|
-
nextTick(() => {
|
|
53
|
-
renderKey.value = Math.round(Math.random() * 1e9).toString();
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
onBlokkliEvent("action:placed", (e) => {
|
|
57
|
-
if (e.id !== props.type) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
emit("placed", e);
|
|
61
|
-
});
|
|
62
|
-
defineTourItem(() => {
|
|
63
|
-
if (!props.description) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
return {
|
|
67
|
-
id: "plugin:add_action:" + props.type,
|
|
68
|
-
title: props.title,
|
|
69
|
-
text: props.description,
|
|
70
|
-
element: () => item.value?.getElement()
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
function addActionFunction() {
|
|
74
|
-
return {
|
|
75
|
-
id: props.type,
|
|
76
|
-
icon: props.icon,
|
|
77
|
-
color: props.color,
|
|
78
|
-
itemBundle: props.itemBundle,
|
|
79
|
-
title: props.title,
|
|
80
|
-
description: props.description,
|
|
81
|
-
enabled: !props.disabled
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
onMounted(() => {
|
|
85
|
-
plugins.addAddAction(addActionFunction);
|
|
86
|
-
});
|
|
87
|
-
onBeforeUnmount(() => {
|
|
88
|
-
plugins.removeAddAction(addActionFunction);
|
|
89
|
-
});
|
|
90
|
-
</script>
|
|
91
|
-
|
|
92
|
-
<script>
|
|
93
|
-
export default {
|
|
94
|
-
name: "PluginAddAction"
|
|
95
|
-
};
|
|
96
|
-
</script>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
-
import type { ActionPlacedEvent } from '#blokkli/types';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
type: string;
|
|
5
|
-
title: string;
|
|
6
|
-
icon: BlokkliIcon;
|
|
7
|
-
itemBundle?: string;
|
|
8
|
-
color: "rose" | "lime" | "accent";
|
|
9
|
-
description?: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
weight?: number;
|
|
12
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
placed: (data: ActionPlacedEvent) => any;
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
15
|
-
type: string;
|
|
16
|
-
title: string;
|
|
17
|
-
icon: BlokkliIcon;
|
|
18
|
-
itemBundle?: string;
|
|
19
|
-
color: "rose" | "lime" | "accent";
|
|
20
|
-
description?: string;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
weight?: number;
|
|
23
|
-
}> & Readonly<{
|
|
24
|
-
onPlaced?: ((data: ActionPlacedEvent) => any) | undefined;
|
|
25
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
-
export default _default;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Teleport to="body">
|
|
3
|
-
<BlokkliTransition name="slide-in">
|
|
4
|
-
<FormOverlay
|
|
5
|
-
v-if="isVisible"
|
|
6
|
-
:id="id"
|
|
7
|
-
:title="title"
|
|
8
|
-
:icon="icon"
|
|
9
|
-
@close="onClose"
|
|
10
|
-
>
|
|
11
|
-
<slot />
|
|
12
|
-
<template #footer>
|
|
13
|
-
<button class="bk-button bk-is-primary" @click="onSubmit">
|
|
14
|
-
{{ $t("droppableEditFormSave", "Save") }}
|
|
15
|
-
</button>
|
|
16
|
-
</template>
|
|
17
|
-
</FormOverlay>
|
|
18
|
-
</BlokkliTransition>
|
|
19
|
-
</Teleport>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script setup>
|
|
23
|
-
import { FormOverlay, BlokkliTransition } from "#blokkli/components";
|
|
24
|
-
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
25
|
-
import { ref, useBlokkli } from "#imports";
|
|
26
|
-
const props = defineProps({
|
|
27
|
-
id: { type: String, required: true },
|
|
28
|
-
title: { type: String, required: true },
|
|
29
|
-
icon: { type: null, required: true },
|
|
30
|
-
entityType: { type: String, required: true }
|
|
31
|
-
});
|
|
32
|
-
const emit = defineEmits(["save"]);
|
|
33
|
-
const { $t, types, state } = useBlokkli();
|
|
34
|
-
const droppable = ref(null);
|
|
35
|
-
const isVisible = ref(false);
|
|
36
|
-
const onClose = () => {
|
|
37
|
-
isVisible.value = false;
|
|
38
|
-
};
|
|
39
|
-
const onSubmit = () => {
|
|
40
|
-
if (droppable.value) {
|
|
41
|
-
emit("save", droppable.value.field);
|
|
42
|
-
}
|
|
43
|
-
isVisible.value = false;
|
|
44
|
-
droppable.value = null;
|
|
45
|
-
};
|
|
46
|
-
onBlokkliEvent("droppable:focus", (field) => {
|
|
47
|
-
if (state.editMode.value !== "editing") {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const config = types.getDroppableFieldConfig(field.fieldName, field.host);
|
|
51
|
-
if (config.allowedEntityType === props.entityType) {
|
|
52
|
-
isVisible.value = true;
|
|
53
|
-
droppable.value = { field, config };
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
</script>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
-
import type { DroppableEntityField } from '#blokkli/types';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
icon: BlokkliIcon;
|
|
7
|
-
entityType: string;
|
|
8
|
-
};
|
|
9
|
-
declare var __VLS_18: {};
|
|
10
|
-
type __VLS_Slots = {} & {
|
|
11
|
-
default?: (props: typeof __VLS_18) => any;
|
|
12
|
-
};
|
|
13
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
-
save: (data: DroppableEntityField) => any;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
onSave?: ((data: DroppableEntityField) => any) | undefined;
|
|
17
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
|
-
export default _default;
|
|
20
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
-
new (): {
|
|
22
|
-
$slots: S;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Teleport v-if="enabled" to="#bk-blokkli-item-actions-dropdown">
|
|
3
|
-
<div
|
|
4
|
-
v-show="items.length"
|
|
5
|
-
:style="{
|
|
6
|
-
order: weight
|
|
7
|
-
}"
|
|
8
|
-
>
|
|
9
|
-
<ol>
|
|
10
|
-
<li v-for="item in itemsMapped" :key="item.id">
|
|
11
|
-
<button
|
|
12
|
-
class="bk-blokkli-item-actions-type-dropdown-button"
|
|
13
|
-
:disabled="!item.enabled"
|
|
14
|
-
@click.prevent="onClick(item)"
|
|
15
|
-
>
|
|
16
|
-
<div class="bk-blokkli-item-actions-type-dropdown-icon">
|
|
17
|
-
<Icon v-if="item.icon" :name="item.icon" />
|
|
18
|
-
<ItemIcon v-else-if="item.bundle" :bundle="item.bundle" />
|
|
19
|
-
</div>
|
|
20
|
-
<div>
|
|
21
|
-
<div>{{ item.label }}</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div v-if="item.description" class="bk-tooltip">
|
|
24
|
-
{{ item.description }}
|
|
25
|
-
</div>
|
|
26
|
-
</button>
|
|
27
|
-
</li>
|
|
28
|
-
</ol>
|
|
29
|
-
</div>
|
|
30
|
-
</Teleport>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script>
|
|
34
|
-
import { Icon, ItemIcon } from "#blokkli/components";
|
|
35
|
-
import { computed, useBlokkli, onMounted, onBeforeUnmount } from "#imports";
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<script setup>
|
|
39
|
-
const props = defineProps({
|
|
40
|
-
id: { type: String, required: true },
|
|
41
|
-
title: { type: String, required: true },
|
|
42
|
-
enabled: { type: Boolean, required: true },
|
|
43
|
-
items: { type: Array, required: true },
|
|
44
|
-
icon: { type: null, required: false },
|
|
45
|
-
weight: { type: [String, Number], required: false }
|
|
46
|
-
});
|
|
47
|
-
const emit = defineEmits(["select"]);
|
|
48
|
-
const itemsMapped = computed(() => {
|
|
49
|
-
return props.items.map((item) => {
|
|
50
|
-
return {
|
|
51
|
-
...item,
|
|
52
|
-
icon: item.icon ?? props.icon,
|
|
53
|
-
enabled: item.enabled !== false
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
const { eventBus } = useBlokkli();
|
|
58
|
-
const isRendering = computed(() => props.enabled);
|
|
59
|
-
function onClick(item) {
|
|
60
|
-
emit("select", item);
|
|
61
|
-
eventBus.emit("action:selected");
|
|
62
|
-
}
|
|
63
|
-
onMounted(() => {
|
|
64
|
-
eventBus.emit("plugin:mount", {
|
|
65
|
-
type: "ItemDropdown",
|
|
66
|
-
id: props.id,
|
|
67
|
-
isRendering
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
onBeforeUnmount(() => {
|
|
71
|
-
eventBus.emit("plugin:unmount", {
|
|
72
|
-
type: "ItemDropdown",
|
|
73
|
-
id: props.id
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
</script>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
-
type Item = {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
enabled?: boolean;
|
|
7
|
-
icon?: BlokkliIcon;
|
|
8
|
-
bundle?: string;
|
|
9
|
-
};
|
|
10
|
-
declare const _default: <T extends Item>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
11
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
12
|
-
readonly onSelect?: ((item: T) => any) | undefined;
|
|
13
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onSelect"> & {
|
|
14
|
-
id: string;
|
|
15
|
-
title: string;
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
items: T[];
|
|
18
|
-
icon?: BlokkliIcon;
|
|
19
|
-
weight?: string | number;
|
|
20
|
-
} & Partial<{}>> & import("vue").PublicProps;
|
|
21
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
22
|
-
attrs: any;
|
|
23
|
-
slots: {};
|
|
24
|
-
emit: (e: "select", item: T) => void;
|
|
25
|
-
}>) => import("vue").VNode & {
|
|
26
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
27
|
-
};
|
|
28
|
-
export default _default;
|
|
29
|
-
type __VLS_PrettifyLocal<T> = {
|
|
30
|
-
[K in keyof T]: T[K];
|
|
31
|
-
} & {};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Teleport :to="to">
|
|
3
|
-
<button
|
|
4
|
-
:id="'bk-menu-list-button-' + id"
|
|
5
|
-
class="bk-menu-list-button"
|
|
6
|
-
:disabled="disabled"
|
|
7
|
-
:class="type ? 'bk-is-' + type : ''"
|
|
8
|
-
:style="{ order: weight || 0 }"
|
|
9
|
-
@click.prevent.stop="onClick"
|
|
10
|
-
>
|
|
11
|
-
<div class="bk-menu-list-icon">
|
|
12
|
-
<slot>
|
|
13
|
-
<Icon v-if="icon" :name="icon" />
|
|
14
|
-
</slot>
|
|
15
|
-
</div>
|
|
16
|
-
<strong>{{ title }}</strong>
|
|
17
|
-
<span>{{ description }}</span>
|
|
18
|
-
</button>
|
|
19
|
-
</Teleport>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script setup>
|
|
23
|
-
import { computed, useBlokkli } from "#imports";
|
|
24
|
-
import { Icon } from "#blokkli/components";
|
|
25
|
-
import defineCommands from "#blokkli/helpers/composables/defineCommands";
|
|
26
|
-
const props = defineProps({
|
|
27
|
-
id: { type: String, required: true },
|
|
28
|
-
title: { type: String, required: true },
|
|
29
|
-
description: { type: String, required: true },
|
|
30
|
-
disabled: { type: Boolean, required: false },
|
|
31
|
-
icon: { type: null, required: false },
|
|
32
|
-
type: { type: String, required: false },
|
|
33
|
-
weight: { type: Number, required: false },
|
|
34
|
-
secondary: { type: Boolean, required: false }
|
|
35
|
-
});
|
|
36
|
-
const emit = defineEmits(["click"]);
|
|
37
|
-
const { ui } = useBlokkli();
|
|
38
|
-
const to = computed(
|
|
39
|
-
() => `#bk-menu-${props.secondary ? "secondary" : "primary"}`
|
|
40
|
-
);
|
|
41
|
-
function onClick() {
|
|
42
|
-
ui.menu.close();
|
|
43
|
-
emit("click");
|
|
44
|
-
}
|
|
45
|
-
const commandCallback = () => {
|
|
46
|
-
if (!props.disabled) {
|
|
47
|
-
emit("click");
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
defineCommands(() => {
|
|
51
|
-
return {
|
|
52
|
-
id: "plugin:menu_button:" + props.id,
|
|
53
|
-
group: "action",
|
|
54
|
-
label: props.title,
|
|
55
|
-
icon: props.icon,
|
|
56
|
-
disabled: props.disabled,
|
|
57
|
-
callback: commandCallback
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<script>
|
|
63
|
-
export default {
|
|
64
|
-
name: "PluginMenuButton"
|
|
65
|
-
};
|
|
66
|
-
</script>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="bk-list-item-icon"
|
|
4
|
-
:class="['bk-is-' + color, 'bk-is-' + orientation]"
|
|
5
|
-
>
|
|
6
|
-
<Icon v-if="icon" :name="icon" />
|
|
7
|
-
<ItemIcon v-else-if="bundle" :bundle="bundle" />
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script setup>
|
|
12
|
-
import { ItemIcon, Icon } from "#blokkli/components";
|
|
13
|
-
defineProps({
|
|
14
|
-
icon: { type: null, required: false, default: void 0 },
|
|
15
|
-
bundle: { type: String, required: false, default: void 0 },
|
|
16
|
-
color: { type: String, required: false, default: "default" },
|
|
17
|
-
orientation: { type: String, required: false, default: "horizontal" }
|
|
18
|
-
});
|
|
19
|
-
</script>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
## Selectable blocks
|
|
2
|
-
|
|
3
|
-
Renders a list of block bundles that can be added to the current page.
|
|
4
|
-
|
|
5
|
-
## Rendered bundles
|
|
6
|
-
|
|
7
|
-
The component uses the data returned by [adapter.getAllBundles] to get a list of
|
|
8
|
-
all block bundles. It then uses the value from [adapter.getFieldConfig] to only
|
|
9
|
-
render block bundles that can actually be added in the current edit session.
|
|
10
|
-
|
|
11
|
-
_can be added_ is defined as such:
|
|
12
|
-
|
|
13
|
-
- It can be added to any of the fields directly inside `<BlokkliProvider>`
|
|
14
|
-
- It can be added to any of the nested fields of blocks that are allowed on the
|
|
15
|
-
page
|