@blokkli/editor 2.0.0-alpha.24 → 2.0.0-alpha.25
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 +191 -27
- package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue.d.ts +38 -0
- package/dist/runtime/blokkliPlugins/ContextMenu/index.vue.d.ts +15 -0
- package/dist/runtime/blokkliPlugins/DebugOverlay/index.vue.d.ts +6 -0
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +28 -3
- package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue +6 -4
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue +11 -3
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +138 -3
- package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue.d.ts +114 -0
- package/dist/runtime/blokkliPlugins/TourItem/index.vue.d.ts +21 -0
- package/dist/runtime/blokkliPlugins/ViewOption/index.vue.d.ts +98 -0
- package/dist/runtime/components/Blocks/NotImplemented/index.vue +24 -0
- package/dist/runtime/components/Blocks/NotImplemented/index.vue.d.ts +6 -0
- package/dist/runtime/components/BlokkliEditable.vue.d.ts +11 -0
- package/dist/runtime/components/BlokkliItem.vue +16 -3
- package/dist/runtime/components/BlokkliItem.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Actions/index.vue +1 -1
- package/dist/runtime/components/Edit/AddListItem/index.vue +1 -6
- package/dist/runtime/components/Edit/AddListItem/index.vue.d.ts +5 -13
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +6 -0
- package/dist/runtime/components/Edit/BlockProxy/index.vue +2 -2
- package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue +3 -0
- package/dist/runtime/components/Edit/BlokkliRootErrorBoundary.vue +4 -1
- package/dist/runtime/components/Edit/Dialog/index.vue +15 -50
- package/dist/runtime/components/Edit/DraggableList.vue +12 -9
- package/dist/runtime/components/Edit/EditIndicator.vue +11 -4
- package/dist/runtime/components/Edit/EditProvider.vue +27 -24
- package/dist/runtime/components/Edit/Features/AddList/Actions/Action.vue +1 -0
- package/dist/runtime/components/Edit/Features/AddList/Blocks/index.vue +2 -3
- package/dist/runtime/components/Edit/Features/AddList/index.vue +17 -5
- package/dist/runtime/components/Edit/Features/Analyze/Icon.vue +85 -0
- package/dist/runtime/components/Edit/Features/Analyze/Icon.vue.d.ts +5 -0
- package/dist/runtime/components/Edit/Features/Analyze/Main.vue +288 -59
- package/dist/runtime/components/Edit/Features/Analyze/Main.vue.d.ts +8 -1
- package/dist/runtime/components/Edit/Features/Analyze/Renderer/fragment.glsl +25 -13
- package/dist/runtime/components/Edit/Features/Analyze/Renderer/index.vue +114 -52
- package/dist/runtime/components/Edit/Features/Analyze/Renderer/index.vue.d.ts +16 -2
- package/dist/runtime/components/Edit/Features/Analyze/Renderer/vertex.glsl +31 -11
- package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue +2 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue.d.ts +8 -1
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue +4 -4
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue.d.ts +20 -2
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue +11 -18
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue.d.ts +10 -3
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +46 -40
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue.d.ts +10 -4
- package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue +8 -4
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.js +1 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.d.ts +4 -3
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.js +2 -1
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.js +61 -20
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.d.ts +15 -1
- package/dist/runtime/components/Edit/Features/Analyze/index.vue +23 -2
- package/dist/runtime/components/Edit/Features/Artboard/Overview/index.vue +22 -8
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +1 -1
- package/dist/runtime/components/Edit/Features/Artboard/Scrollbar/index.vue +8 -3
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +10 -1
- package/dist/runtime/components/Edit/Features/Debug/Main.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Features/Debug/Rects/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Debug/Section/Logging.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Features/EditForm/Frame/index.vue +8 -2
- package/dist/runtime/components/Edit/Features/EditForm/index.vue +1 -7
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Plaintext/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +4 -3
- package/dist/runtime/components/Edit/Features/EditableMask/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/EntityTitle/index.vue +7 -2
- package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +9 -2
- package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +12 -3
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Options/Form/Item.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/Features/PreviewGrant/index.vue +1 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +9 -0
- package/dist/runtime/components/Edit/Features/ResponsivePreview/Frame/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/ResponsivePreview/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Content/index.vue +8 -2
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Page/index.vue +12 -2
- package/dist/runtime/components/Edit/Features/Search/Overlay/index.vue +11 -3
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +126 -33
- package/dist/runtime/components/Edit/Features/Selection/Renderer/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Settings/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/Structure/List/Field/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue +7 -1
- package/dist/runtime/components/Edit/Form/Textarea/index.vue +1 -1
- package/dist/runtime/components/Edit/FormOverlay/index.vue +1 -1
- package/dist/runtime/components/Edit/Indicators/index.vue +1 -1
- package/dist/runtime/components/Edit/InfoBox/index.vue +3 -2
- package/dist/runtime/components/Edit/InfoBox/index.vue.d.ts +6 -1
- package/dist/runtime/components/Edit/Overlay/index.vue +4 -0
- package/dist/runtime/components/Edit/PreviewProvider.vue +3 -3
- package/dist/runtime/components/Edit/ScaleToFit/index.vue +4 -4
- package/dist/runtime/composables/defineBlokkliFeature.d.ts +1 -1
- package/dist/runtime/composables/useBlokkli.d.ts +6 -1
- package/dist/runtime/composables/useBlokkli.js +4 -1
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/composables/defineItemDropdownAction.d.ts +1 -1
- package/dist/runtime/helpers/composables/defineMenuButton.d.ts +1 -1
- package/dist/runtime/helpers/composables/defineRenderer.d.ts +1 -1
- package/dist/runtime/helpers/composables/onBroadcastEvent.d.ts +1 -1
- package/dist/runtime/helpers/composables/useBlockRegistration.d.ts +1 -1
- package/dist/runtime/helpers/composables/useBlockRegistration.js +12 -1
- package/dist/runtime/helpers/composables/useDebugLogger.d.ts +1 -1
- package/dist/runtime/helpers/composables/useFocusTrap.d.ts +52 -0
- package/dist/runtime/helpers/composables/useFocusTrap.js +59 -0
- package/dist/runtime/helpers/composables/useGlobalBlokkliObject.d.ts +1 -1
- package/dist/runtime/helpers/{useTransitionedValue.js → composables/useTransitionedValue.js} +1 -1
- package/dist/runtime/helpers/imports/index.d.ts +2 -1
- package/dist/runtime/helpers/imports/index.js +10 -1
- package/dist/runtime/helpers/{animationProvider.d.ts → providers/animation.d.ts} +100 -7
- package/dist/runtime/helpers/{animationProvider.js → providers/animation.js} +21 -11
- package/dist/runtime/helpers/providers/blocks.d.ts +25 -3
- package/dist/runtime/helpers/providers/blocks.js +9 -0
- package/dist/runtime/helpers/providers/commands.d.ts +41 -0
- package/dist/runtime/helpers/{commandsProvider.js → providers/commands.js} +1 -1
- package/dist/runtime/helpers/providers/debug.d.ts +125 -0
- package/dist/runtime/helpers/{debugProvider.js → providers/debug.js} +2 -2
- package/dist/runtime/helpers/providers/definition.d.ts +87 -0
- package/dist/runtime/helpers/providers/directive.d.ts +88 -2
- package/dist/runtime/helpers/providers/directive.js +18 -2
- package/dist/runtime/helpers/providers/dom.d.ts +225 -0
- package/dist/runtime/helpers/{domProvider.js → providers/dom.js} +27 -74
- package/dist/runtime/helpers/providers/dropArea.d.ts +47 -0
- package/dist/runtime/helpers/{dropAreaProvider.js → providers/dropArea.js} +1 -1
- package/dist/runtime/helpers/providers/element.d.ts +58 -1
- package/dist/runtime/helpers/providers/features.d.ts +56 -0
- package/dist/runtime/helpers/{featuresProvider.js → providers/features.js} +1 -1
- package/dist/runtime/helpers/providers/fields.d.ts +18 -11
- package/dist/runtime/helpers/providers/fields.js +1 -1
- package/dist/runtime/helpers/providers/indicators.d.ts +44 -0
- package/dist/runtime/helpers/providers/keyboard.d.ts +76 -0
- package/dist/runtime/helpers/{keyboardProvider.js → providers/keyboard.js} +1 -8
- package/dist/runtime/helpers/{pluginProvider.d.ts → providers/plugin.d.ts} +36 -0
- package/dist/runtime/helpers/{selectionProvider.d.ts → providers/selection.d.ts} +4 -1
- package/dist/runtime/helpers/{selectionProvider.js → providers/selection.js} +1 -1
- package/dist/runtime/helpers/providers/state.d.ts +227 -0
- package/dist/runtime/helpers/{stateProvider.js → providers/state.js} +3 -3
- package/dist/runtime/helpers/providers/storage.d.ts +64 -0
- package/dist/runtime/helpers/{textProvider.d.ts → providers/texts.d.ts} +1 -1
- package/dist/runtime/helpers/providers/theme.d.ts +119 -0
- package/dist/runtime/helpers/{themeProvider.js → providers/theme.js} +3 -3
- package/dist/runtime/helpers/providers/tour.d.ts +49 -0
- package/dist/runtime/helpers/{tourProvider.js → providers/tour.js} +1 -1
- package/dist/runtime/helpers/providers/types.d.ts +170 -0
- package/dist/runtime/helpers/{typesProvider.js → providers/types.js} +45 -1
- package/dist/runtime/helpers/providers/ui.d.ts +339 -0
- package/dist/runtime/helpers/{uiProvider.js → providers/ui.js} +11 -5
- package/dist/runtime/helpers/runtimeHelpers/index.d.ts +1 -1
- package/dist/runtime/helpers/symbols.d.ts +1 -0
- package/dist/runtime/helpers/symbols.js +3 -0
- package/dist/runtime/types/blockOptions.d.ts +349 -0
- package/dist/runtime/types/index.d.ts +22 -26
- package/package.json +2 -2
- package/dist/runtime/helpers/commandsProvider.d.ts +0 -9
- package/dist/runtime/helpers/debugProvider.d.ts +0 -33
- package/dist/runtime/helpers/definitionProvider.d.ts +0 -19
- package/dist/runtime/helpers/domProvider.d.ts +0 -91
- package/dist/runtime/helpers/dropAreaProvider.d.ts +0 -9
- package/dist/runtime/helpers/featuresProvider.d.ts +0 -17
- package/dist/runtime/helpers/indicatorsProvider.d.ts +0 -10
- package/dist/runtime/helpers/keyboardProvider.d.ts +0 -20
- package/dist/runtime/helpers/stateProvider.d.ts +0 -47
- package/dist/runtime/helpers/storageProvider.d.ts +0 -17
- package/dist/runtime/helpers/themeProvider.d.ts +0 -30
- package/dist/runtime/helpers/tourProvider.d.ts +0 -11
- package/dist/runtime/helpers/typesProvider.d.ts +0 -36
- package/dist/runtime/helpers/uiProvider.d.ts +0 -57
- package/dist/runtime/types/blokkOptions.d.ts +0 -100
- /package/dist/runtime/helpers/{addElementClasses.d.ts → composables/addElementClasses.d.ts} +0 -0
- /package/dist/runtime/helpers/{addElementClasses.js → composables/addElementClasses.js} +0 -0
- /package/dist/runtime/helpers/{defineElementStyle.d.ts → composables/defineElementStyle.d.ts} +0 -0
- /package/dist/runtime/helpers/{defineElementStyle.js → composables/defineElementStyle.js} +0 -0
- /package/dist/runtime/helpers/{useTransitionedValue.d.ts → composables/useTransitionedValue.d.ts} +0 -0
- /package/dist/runtime/helpers/{broadcastProvider.d.ts → providers/broadcast.d.ts} +0 -0
- /package/dist/runtime/helpers/{broadcastProvider.js → providers/broadcast.js} +0 -0
- /package/dist/runtime/helpers/{definitionProvider.js → providers/definition.js} +0 -0
- /package/dist/runtime/helpers/{indicatorsProvider.js → providers/indicators.js} +0 -0
- /package/dist/runtime/helpers/{pluginProvider.js → providers/plugin.js} +0 -0
- /package/dist/runtime/helpers/{storageProvider.js → providers/storage.js} +0 -0
- /package/dist/runtime/helpers/{textProvider.js → providers/texts.js} +0 -0
- /package/dist/runtime/types/{blokkOptions.js → blockOptions.js} +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { type Ref, type ComputedRef } from 'vue';
|
|
2
|
-
import type { BlokkliAdapter, AdapterContext } from '../adapter/index.js';
|
|
3
|
-
import type { MutatedField, EditEntity, MutatedOptions, TranslationState, MappedState, MutationItem, Validation, MutateWithLoadingStateFunction, EditMode, FieldListItem, PublishOptions, EditPermission } from '#blokkli/types';
|
|
4
|
-
import type { TextProvider } from './textProvider.js';
|
|
5
|
-
export type BlokkliOwner = {
|
|
6
|
-
name: string | undefined;
|
|
7
|
-
currentUserIsOwner: boolean;
|
|
8
|
-
};
|
|
9
|
-
export type RenderedBlock = {
|
|
10
|
-
item: FieldListItem;
|
|
11
|
-
parentEntityType: string;
|
|
12
|
-
parentEntityBundle: string;
|
|
13
|
-
parentEntityUuid: string;
|
|
14
|
-
};
|
|
15
|
-
export type StateProvider = {
|
|
16
|
-
owner: Readonly<Ref<BlokkliOwner | null>>;
|
|
17
|
-
refreshKey: Readonly<Ref<string>>;
|
|
18
|
-
mutatedFields: Readonly<Ref<MutatedField[]>>;
|
|
19
|
-
entity: Readonly<Ref<EditEntity>>;
|
|
20
|
-
mutatedOptions: MutatedOptions;
|
|
21
|
-
translation: Readonly<Ref<TranslationState>>;
|
|
22
|
-
publishOptions: Readonly<Ref<PublishOptions>>;
|
|
23
|
-
mutations: Readonly<Ref<MutationItem[]>>;
|
|
24
|
-
currentMutationIndex: Readonly<Ref<number>>;
|
|
25
|
-
violations: Readonly<Ref<Validation[]>>;
|
|
26
|
-
mutateWithLoadingState: MutateWithLoadingStateFunction;
|
|
27
|
-
editMode: Readonly<Ref<EditMode>>;
|
|
28
|
-
mutatedEntity: Readonly<Ref<any>>;
|
|
29
|
-
canEdit: ComputedRef<boolean>;
|
|
30
|
-
permissions: ComputedRef<EditPermission[]>;
|
|
31
|
-
stateAvailable: ComputedRef<boolean>;
|
|
32
|
-
isLoading: Readonly<Ref<boolean>>;
|
|
33
|
-
fromLibraryUuids: Readonly<Ref<Readonly<string[]>>>;
|
|
34
|
-
getFieldBlockCount: (key: string) => number;
|
|
35
|
-
getBlockBundleCount: (bundle: string) => number;
|
|
36
|
-
getFieldListItem: (uuid: string) => FieldListItem | undefined;
|
|
37
|
-
getFieldListForBlock: (uuid: string) => MutatedField | undefined;
|
|
38
|
-
getMutatedField: (uuid: string, fieldName: string) => MutatedField | undefined;
|
|
39
|
-
getAllUuids: (bundle?: string) => string[];
|
|
40
|
-
getNestingLevel: (uuid: string) => number;
|
|
41
|
-
isChildOf: (childUuid: string, parentUuid: string) => boolean;
|
|
42
|
-
getMappedState: () => MappedState;
|
|
43
|
-
setOverrideState: (state: MappedState) => void;
|
|
44
|
-
clearOverrideState: () => void;
|
|
45
|
-
getFieldKeyForUuid: (uuid: string) => string | null;
|
|
46
|
-
};
|
|
47
|
-
export default function (adapter: BlokkliAdapter<any>, context: ComputedRef<AdapterContext>, $t: TextProvider, providerKey: string, permissions: EditPermission[]): Promise<StateProvider>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type ComputedRef, type WritableComputedRef } from '#imports';
|
|
2
|
-
import type { AdapterContext, BlokkliAdapter } from '#blokkli/adapter';
|
|
3
|
-
export type StorageProvider = {
|
|
4
|
-
use: <T>(key: string | ComputedRef<string>, defaultValue: T, persist?: boolean) => WritableComputedRef<T>;
|
|
5
|
-
useWithContextPrefix: <T>(key: string, defaultValue: T, persist?: boolean) => WritableComputedRef<T>;
|
|
6
|
-
clearAll: () => void;
|
|
7
|
-
clear: (key: string) => void;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Create a reactive variable that is synced to local storage using the
|
|
11
|
-
* given key. The sync only happens client side and after the component
|
|
12
|
-
* has been mounted.
|
|
13
|
-
*
|
|
14
|
-
* This composable can be used to keep state across page navigations and
|
|
15
|
-
* even after a refresh.
|
|
16
|
-
*/
|
|
17
|
-
export default function (adapter: BlokkliAdapter<any>, context: ComputedRef<AdapterContext>): Promise<StorageProvider>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { DraggableStyle } from '#blokkli/types';
|
|
2
|
-
import type { RGB, ThemeColorGroup, ThemeColorShade, ThemeColors, ThemeContextColorGroup, ThemeContextColorShade, ThemeContextColors, ThemeName } from '#blokkli/types/theme';
|
|
3
|
-
import { type Ref } from '#imports';
|
|
4
|
-
import type { ElementProvider } from './providers/element.js';
|
|
5
|
-
type ThemeMap = {
|
|
6
|
-
accent: Ref<ThemeColors>;
|
|
7
|
-
mono: Ref<ThemeColors>;
|
|
8
|
-
teal: Ref<ThemeContextColors>;
|
|
9
|
-
yellow: Ref<ThemeContextColors>;
|
|
10
|
-
red: Ref<ThemeContextColors>;
|
|
11
|
-
lime: Ref<ThemeContextColors>;
|
|
12
|
-
orange: Ref<ThemeContextColors>;
|
|
13
|
-
};
|
|
14
|
-
export type ThemeProvider = {
|
|
15
|
-
accent: Ref<ThemeColors>;
|
|
16
|
-
mono: Ref<ThemeColors>;
|
|
17
|
-
teal: Ref<ThemeContextColors>;
|
|
18
|
-
yellow: Ref<ThemeContextColors>;
|
|
19
|
-
red: Ref<ThemeContextColors>;
|
|
20
|
-
lime: Ref<ThemeContextColors>;
|
|
21
|
-
orange: Ref<ThemeContextColors>;
|
|
22
|
-
getDraggableStyle: (el: HTMLElement | SVGElement) => DraggableStyle;
|
|
23
|
-
setColor: <Group extends ThemeColorGroup | ThemeContextColorGroup>(group: Group, shade: Group extends ThemeColorGroup ? ThemeColorShade : ThemeContextColorShade, value: RGB) => void;
|
|
24
|
-
applyTheme: (name: ThemeName | 'custom') => void;
|
|
25
|
-
invalidateCachedStyle: (el: HTMLElement | SVGElement) => void;
|
|
26
|
-
getColor<K extends keyof ThemeMap, T extends ThemeMap[K]['value']>(color: K, key: keyof T): RGB;
|
|
27
|
-
getColorString<K extends keyof ThemeMap, T extends ThemeMap[K]['value']>(color: K, key: keyof T, alpha?: number): string;
|
|
28
|
-
};
|
|
29
|
-
export default function (element: ElementProvider): ThemeProvider;
|
|
30
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { TourItem } from '#blokkli/types';
|
|
2
|
-
import { type Ref } from '#imports';
|
|
3
|
-
type TourProviderFunction = () => TourItem[] | TourItem | undefined;
|
|
4
|
-
export type TourProvider = {
|
|
5
|
-
add: (fn: TourProviderFunction) => void;
|
|
6
|
-
remove: (fn: TourProviderFunction) => void;
|
|
7
|
-
getTourItems: () => TourItem[];
|
|
8
|
-
isTouring: Ref<boolean>;
|
|
9
|
-
};
|
|
10
|
-
export default function (): TourProvider;
|
|
11
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef } from 'vue';
|
|
2
|
-
import type { FieldConfig, BlockBundleDefinition, EditableFieldConfig, BlockDefinitionInput, BlockDefinitionOptionsInput, DroppableFieldConfig, DraggableExistingBlock, EntityContext } from '../types/index.js';
|
|
3
|
-
import type { AdapterContext, BlokkliAdapter } from '../adapter/index.js';
|
|
4
|
-
import type { SelectionProvider } from './selectionProvider.js';
|
|
5
|
-
export type BlokkliBlockType = BlockBundleDefinition & {
|
|
6
|
-
definition: BlockDefinitionInput<BlockDefinitionOptionsInput, never[]> | undefined;
|
|
7
|
-
};
|
|
8
|
-
interface MappableConfig {
|
|
9
|
-
entityType: string;
|
|
10
|
-
entityBundle: string;
|
|
11
|
-
name: string;
|
|
12
|
-
}
|
|
13
|
-
declare class ConfigMap<T extends MappableConfig> {
|
|
14
|
-
private configs;
|
|
15
|
-
private mapEntityType;
|
|
16
|
-
private mapEntityTypeBundle;
|
|
17
|
-
private mapEntityTypeBundleName;
|
|
18
|
-
constructor(items: T[]);
|
|
19
|
-
forEntityType(entityType: string): T[];
|
|
20
|
-
forEntityTypeAndBundle(entityType: string, entityBundle: string): T[];
|
|
21
|
-
forName(entityType: string, entityBundle: string, name: string): T | undefined;
|
|
22
|
-
all(): T[];
|
|
23
|
-
}
|
|
24
|
-
export type BlockDefinitionProvider = {
|
|
25
|
-
itemBundlesWithNested: string[];
|
|
26
|
-
allowedTypesInList: ComputedRef<string[]>;
|
|
27
|
-
generallyAvailableBundles: BlockBundleDefinition[];
|
|
28
|
-
getBlockBundleDefinition: (bundle: string) => BlockBundleDefinition | undefined;
|
|
29
|
-
getFieldConfig: (entityType: string, entityBundle: string, fieldName: string) => FieldConfig | undefined;
|
|
30
|
-
fieldConfig: ConfigMap<FieldConfig>;
|
|
31
|
-
editableFieldConfig: ConfigMap<EditableFieldConfig>;
|
|
32
|
-
droppableFieldConfig: ConfigMap<DroppableFieldConfig>;
|
|
33
|
-
getDroppableFieldConfig: (fieldName: string, host: DraggableExistingBlock | EntityContext) => DroppableFieldConfig;
|
|
34
|
-
};
|
|
35
|
-
export default function (adapter: BlokkliAdapter<any>, selection: SelectionProvider, context: ComputedRef<AdapterContext>): Promise<BlockDefinitionProvider>;
|
|
36
|
-
export {};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { type Ref, type ComputedRef } from '#imports';
|
|
2
|
-
import type { ShallowRef } from 'vue';
|
|
3
|
-
import type { StorageProvider } from './storageProvider.js';
|
|
4
|
-
import type { Coord, GlobalUiDialog, Rectangle, SidebarRegion, Size } from '#blokkli/types';
|
|
5
|
-
import type { Viewport } from '#blokkli/constants';
|
|
6
|
-
import type { AdapterContext } from '#blokkli/adapter';
|
|
7
|
-
import type { ThemeColorName } from '#blokkli/types/theme';
|
|
8
|
-
import type { ElementProvider } from './providers/element.js';
|
|
9
|
-
export type UiProvider = {
|
|
10
|
-
rootElement: () => HTMLElement;
|
|
11
|
-
artboardElement: () => HTMLElement;
|
|
12
|
-
providerElement: HTMLElement;
|
|
13
|
-
isMobile: ComputedRef<boolean>;
|
|
14
|
-
isDesktop: ComputedRef<boolean>;
|
|
15
|
-
isAnimating: Ref<boolean>;
|
|
16
|
-
isAnalyzing: Ref<boolean>;
|
|
17
|
-
isProxyMode: Ref<boolean>;
|
|
18
|
-
hasDialogOpen: ComputedRef<boolean>;
|
|
19
|
-
currentDialog: Readonly<Ref<GlobalUiDialog | null>>;
|
|
20
|
-
openDialog: (dialog: GlobalUiDialog) => void;
|
|
21
|
-
closeDialog: (id?: string) => void;
|
|
22
|
-
hasTooltipOpen: ComputedRef<boolean>;
|
|
23
|
-
openTooltip: Ref<string>;
|
|
24
|
-
selectionColor: ComputedRef<ThemeColorName | null>;
|
|
25
|
-
setSelectionColor: (id: string, color: ThemeColorName) => void;
|
|
26
|
-
removeSelectionColor: (id: string) => void;
|
|
27
|
-
hasTransformOverlayOpen: Ref<boolean>;
|
|
28
|
-
isTransforming: ComputedRef<boolean>;
|
|
29
|
-
setTransform: (label?: string | null | undefined) => void;
|
|
30
|
-
transformLabel: ComputedRef<string>;
|
|
31
|
-
useAnimations: ComputedRef<boolean>;
|
|
32
|
-
lowPerformanceMode: ComputedRef<boolean>;
|
|
33
|
-
visibleViewport: ComputedRef<Rectangle>;
|
|
34
|
-
visibleViewportPadded: ComputedRef<Rectangle>;
|
|
35
|
-
setViewportBlockingRectangle: (key: string, rect?: Rectangle) => void;
|
|
36
|
-
viewportBlockingRects: ComputedRef<Rectangle[]>;
|
|
37
|
-
appViewport: ComputedRef<Viewport>;
|
|
38
|
-
openContextMenu: Ref<string>;
|
|
39
|
-
viewport: ComputedRef<Size>;
|
|
40
|
-
artboardSize: ComputedRef<Size>;
|
|
41
|
-
artboardScale: Ref<number>;
|
|
42
|
-
artboardOffset: Ref<Coord>;
|
|
43
|
-
selectionTopLeft: Ref<Coord>;
|
|
44
|
-
interfaceLanguage: ComputedRef<string>;
|
|
45
|
-
locale: ComputedRef<string>;
|
|
46
|
-
formatDate: (date: string | Date, options?: Intl.DateTimeFormatOptions) => string;
|
|
47
|
-
getAbsoluteElementRect: (v: HTMLElement | Rectangle, scale?: number, offset?: Coord) => Rectangle;
|
|
48
|
-
getViewportRelativeRect: (rect: Rectangle, scale?: number, offset?: Coord) => Rectangle;
|
|
49
|
-
setBannerHeight: (id: string, height: number) => void;
|
|
50
|
-
removeBanner: (id: string) => void;
|
|
51
|
-
setActiveSidebar: (region: SidebarRegion, id: string) => void;
|
|
52
|
-
removeActiveSidebar: (region: SidebarRegion, id: string) => void;
|
|
53
|
-
hasSidebarLeft: ComputedRef<boolean>;
|
|
54
|
-
hasSidebarRight: ComputedRef<boolean>;
|
|
55
|
-
mainLayoutElement: Readonly<ShallowRef<HTMLDivElement | null>>;
|
|
56
|
-
};
|
|
57
|
-
export default function (providerElement: HTMLElement, storage: StorageProvider, context: ComputedRef<AdapterContext>, element: ElementProvider, mainLayoutElement: Readonly<ShallowRef<HTMLDivElement | null>>, visibleViewportElement: Readonly<ShallowRef<HTMLDivElement | null>>): UiProvider;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
-
type DefinitionOptionText = {
|
|
3
|
-
type: 'text';
|
|
4
|
-
default: string;
|
|
5
|
-
label: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
inputType?: 'text' | 'number' | 'date';
|
|
8
|
-
group?: string;
|
|
9
|
-
};
|
|
10
|
-
type DefinitionOptionNumber = {
|
|
11
|
-
type: 'number';
|
|
12
|
-
default: number;
|
|
13
|
-
label: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
min: number;
|
|
16
|
-
max: number;
|
|
17
|
-
group?: string;
|
|
18
|
-
};
|
|
19
|
-
type DefinitionOptionRange = {
|
|
20
|
-
type: 'range';
|
|
21
|
-
default: number;
|
|
22
|
-
label: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
min: number;
|
|
25
|
-
max: number;
|
|
26
|
-
step: number;
|
|
27
|
-
group?: string;
|
|
28
|
-
};
|
|
29
|
-
type DefinitionOptionDateTimeLocal = {
|
|
30
|
-
type: 'datetime-local';
|
|
31
|
-
label: string;
|
|
32
|
-
description?: string;
|
|
33
|
-
default?: string;
|
|
34
|
-
min?: string;
|
|
35
|
-
max?: string;
|
|
36
|
-
group?: string;
|
|
37
|
-
};
|
|
38
|
-
type DefinitionOptionCheckbox = {
|
|
39
|
-
type: 'checkbox';
|
|
40
|
-
default: boolean;
|
|
41
|
-
label: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
group?: string;
|
|
44
|
-
};
|
|
45
|
-
type DefinitionOptionColor = {
|
|
46
|
-
type: 'color';
|
|
47
|
-
default: `#${string}`;
|
|
48
|
-
label: string;
|
|
49
|
-
description?: string;
|
|
50
|
-
group?: string;
|
|
51
|
-
};
|
|
52
|
-
type DefinitionOptionCheckboxes = {
|
|
53
|
-
type: 'checkboxes';
|
|
54
|
-
label: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
/**
|
|
57
|
-
* The default values.
|
|
58
|
-
*/
|
|
59
|
-
default: string[];
|
|
60
|
-
options: Record<string, string>;
|
|
61
|
-
group?: string;
|
|
62
|
-
};
|
|
63
|
-
type DefinitionOptionRadiosGridOption = {
|
|
64
|
-
columns: number[];
|
|
65
|
-
label: string;
|
|
66
|
-
};
|
|
67
|
-
type DefinitionOptionRadiosGrid = {
|
|
68
|
-
displayAs: 'grid';
|
|
69
|
-
options: Record<string, DefinitionOptionRadiosGridOption>;
|
|
70
|
-
};
|
|
71
|
-
type DefinitionOptionRadiosColorsOption = {
|
|
72
|
-
hex?: `#${string}`;
|
|
73
|
-
class?: string;
|
|
74
|
-
label: string;
|
|
75
|
-
};
|
|
76
|
-
type DefinitionOptionRadiosColors = {
|
|
77
|
-
displayAs: 'colors';
|
|
78
|
-
options: Record<string, DefinitionOptionRadiosColorsOption>;
|
|
79
|
-
};
|
|
80
|
-
type DefinitionOptionRadiosRadios = {
|
|
81
|
-
displayAs?: 'radios' | undefined;
|
|
82
|
-
options: Record<string, string>;
|
|
83
|
-
};
|
|
84
|
-
type DefinitionOptionRadiosIconsOption = {
|
|
85
|
-
icon: BlokkliIcon;
|
|
86
|
-
label: string;
|
|
87
|
-
};
|
|
88
|
-
type DefinitionOptionRadiosIcons = {
|
|
89
|
-
displayAs: 'icons';
|
|
90
|
-
options: Record<string, DefinitionOptionRadiosIconsOption>;
|
|
91
|
-
};
|
|
92
|
-
type DefinitionOptionRadios = {
|
|
93
|
-
type: 'radios';
|
|
94
|
-
label: string;
|
|
95
|
-
description?: string;
|
|
96
|
-
default: string;
|
|
97
|
-
group?: string;
|
|
98
|
-
} & (DefinitionOptionRadiosColors | DefinitionOptionRadiosGrid | DefinitionOptionRadiosRadios | DefinitionOptionRadiosIcons);
|
|
99
|
-
export type BlockOptionDefinition = DefinitionOptionColor | DefinitionOptionCheckbox | DefinitionOptionCheckboxes | DefinitionOptionRadios | DefinitionOptionText | DefinitionOptionRange | DefinitionOptionNumber | DefinitionOptionDateTimeLocal;
|
|
100
|
-
export {};
|
|
File without changes
|
|
File without changes
|
/package/dist/runtime/helpers/{defineElementStyle.d.ts → composables/defineElementStyle.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/runtime/helpers/{useTransitionedValue.d.ts → composables/useTransitionedValue.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|