@versa-stack/v-craft 1.1.0-alpha.1 → 1.1.0-alpha.3
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/types/components/CraftEditorPanelNodeDataSourceSettings.vue.d.ts +11 -0
- package/dist/types/components/CraftEditorPanelNodeSlotPropsSettings.vue.d.ts +50 -0
- package/dist/types/components/CraftEditorPanelSettings.vue.d.ts +6 -1
- package/dist/types/components/CraftNodeEditor.vue.d.ts +2 -0
- package/dist/types/components/CraftNodeStatic.vue.d.ts +4 -0
- package/dist/types/components/CraftNodeViewer.vue.d.ts +2 -0
- package/dist/types/components/composable/index.d.ts +2 -0
- package/dist/types/components/composable/useAncestorContextBuckets.d.ts +20 -0
- package/dist/types/components/composable/useCraftFrame.d.ts +38 -0
- package/dist/types/components/composable/useCraftNodeEvents.d.ts +12 -1
- package/dist/types/components/composable/useCraftNodeWrapper.d.ts +38 -0
- package/dist/types/components/composable/useResolveCraftNode.d.ts +4 -2
- package/dist/types/components/composable/useResolveCraftNodeProps.d.ts +10 -0
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/utils.d.ts +1 -0
- package/dist/types/lib/CraftNodeResolver.d.ts +2 -0
- package/dist/types/lib/craftNode.d.ts +1 -0
- package/dist/types/lib/extractSchemaFieldNames.d.ts +11 -0
- package/dist/types/store/editor.d.ts +42 -0
- package/dist/v-craft.css +1 -1
- package/dist/v-craft.es.js +3210 -2774
- package/dist/v-craft.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CraftNode, CraftNodeDatasource } from '../lib/craftNode';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
craftNode?: CraftNode;
|
|
4
|
+
nodeData?: CraftNodeDatasource | null;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
+
"update:nodeData": (value: CraftNodeDatasource | null) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onUpdate:nodeData"?: ((value: CraftNodeDatasource | null) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { CraftNode } from '../lib/craftNode';
|
|
2
|
+
import { SchemaFieldOption } from '../lib/extractSchemaFieldNames';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
craftNode?: CraftNode;
|
|
5
|
+
availableProps?: SchemaFieldOption[];
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
'panel-content'?(_: {
|
|
11
|
+
craftNode: CraftNode | undefined;
|
|
12
|
+
mappingGroups: {
|
|
13
|
+
id: string;
|
|
14
|
+
bucket: string;
|
|
15
|
+
fields: {
|
|
16
|
+
id: string;
|
|
17
|
+
targetProp: string;
|
|
18
|
+
fromPath: string;
|
|
19
|
+
}[];
|
|
20
|
+
}[];
|
|
21
|
+
bucketOptions: {
|
|
22
|
+
value: string;
|
|
23
|
+
label: string;
|
|
24
|
+
}[];
|
|
25
|
+
availableProps: SchemaFieldOption[];
|
|
26
|
+
targetPropOptionsFor: (currentValue: string) => SchemaFieldOption[];
|
|
27
|
+
addGroup: () => void;
|
|
28
|
+
removeGroup: (groupIndex: number) => void;
|
|
29
|
+
updateBucket: (groupIndex: number, value: string) => void;
|
|
30
|
+
addField: (groupIndex: number) => void;
|
|
31
|
+
removeField: (groupIndex: number, fieldIndex: number) => void;
|
|
32
|
+
updateField: (groupIndex: number, fieldIndex: number, key: "targetProp" | "fromPath", value: string) => void;
|
|
33
|
+
}): any;
|
|
34
|
+
};
|
|
35
|
+
refs: {};
|
|
36
|
+
rootEl: any;
|
|
37
|
+
};
|
|
38
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
39
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
40
|
+
"update:slotsPropsPropsMap": (value: Record<string, Record<string, string>>) => any;
|
|
41
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
42
|
+
"onUpdate:slotsPropsPropsMap"?: ((value: Record<string, Record<string, string>>) => any) | undefined;
|
|
43
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
44
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
47
|
+
new (): {
|
|
48
|
+
$slots: S;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CraftNodeDatasource } from '../lib/craftNode';
|
|
1
2
|
import { FormKitSchemaDefinition } from '@formkit/core';
|
|
2
3
|
declare const _default: <T extends FormKitSchemaDefinition = FormKitSchemaDefinition>(__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<{
|
|
3
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & {} & Partial<{}>> & import('vue').PublicProps;
|
|
@@ -5,12 +6,16 @@ declare const _default: <T extends FormKitSchemaDefinition = FormKitSchemaDefini
|
|
|
5
6
|
attrs: any;
|
|
6
7
|
slots: {
|
|
7
8
|
'panel-content'?(_: {
|
|
8
|
-
selectedNode: import('
|
|
9
|
+
selectedNode: import('../lib/craftNode').CraftNode | null;
|
|
9
10
|
nodeName: string;
|
|
10
11
|
handlePropsUpdate: (newProps: Record<string, any>) => void;
|
|
11
12
|
schema: never[] | T;
|
|
12
13
|
eventsSchema: never[] | T;
|
|
13
14
|
handleEventsUpdate: (newEvents: Record<string, any>) => void;
|
|
15
|
+
availableProps: import('../lib/extractSchemaFieldNames').SchemaFieldOption[];
|
|
16
|
+
handleSlotsPropsPropsMapUpdate: (slotsPropsPropsMap: Record<string, Record<string, string>>) => void;
|
|
17
|
+
nodeData: CraftNodeDatasource | null;
|
|
18
|
+
handleNodeDataUpdate: (data: CraftNodeDatasource | null) => void;
|
|
14
19
|
deleteable: string | null | undefined;
|
|
15
20
|
removeNode: () => void;
|
|
16
21
|
}): any;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CraftNode } from '../lib/craftNode';
|
|
2
|
+
import { CraftNodePropsContext } from './composable/useResolveCraftNodeProps';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
craftNode: CraftNode;
|
|
5
|
+
context?: CraftNodePropsContext;
|
|
4
6
|
};
|
|
5
7
|
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, {
|
|
6
8
|
nodeRef: unknown;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { CraftNode, CraftNodeDatasource } from '../lib/craftNode';
|
|
2
|
+
import { CraftNodePropsContext } from './composable/useResolveCraftNodeProps';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
craftNode: CraftNode;
|
|
4
5
|
nodeMap: Map<string, CraftNode>;
|
|
5
6
|
nodeDataMap?: Record<string, CraftNodeDatasource>;
|
|
6
7
|
eventsContext?: Record<string, any>;
|
|
8
|
+
nodeRuntimeProps?: Record<string, Record<string, any>>;
|
|
9
|
+
pageState?: Record<string, any>;
|
|
10
|
+
context?: CraftNodePropsContext;
|
|
7
11
|
};
|
|
8
12
|
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, any>;
|
|
9
13
|
export default _default;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { CraftNode, CraftNodeDatasource } from '../lib/craftNode';
|
|
2
|
+
import { CraftNodePropsContext } from './composable/useResolveCraftNodeProps';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
craftNode: CraftNode;
|
|
4
5
|
nodeDataMap?: Record<string, CraftNodeDatasource>;
|
|
5
6
|
eventsContext?: Record<string, any>;
|
|
7
|
+
context?: CraftNodePropsContext;
|
|
6
8
|
};
|
|
7
9
|
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, any>;
|
|
8
10
|
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { CraftNode } from '../../lib/craftNode';
|
|
3
|
+
export type ContextBucketInfo = {
|
|
4
|
+
slotName: string;
|
|
5
|
+
ancestorUuid: string;
|
|
6
|
+
ancestorComponentName: string;
|
|
7
|
+
keys: string[];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Walks up from a node to the root, collecting the context bucket each
|
|
11
|
+
* ancestor exposes - either a named slot bucket (from the resolver's
|
|
12
|
+
* slotsProps, mirroring the scoped-slot accumulation CraftNodeStatic
|
|
13
|
+
* performs at runtime) or the reserved "data" bucket (from that ancestor's
|
|
14
|
+
* own nodeDataMap entry). Both feed the same useResolveCraftNodeProps
|
|
15
|
+
* mapping mechanism, so the editor can offer every bucket name actually
|
|
16
|
+
* available at runtime.
|
|
17
|
+
*/
|
|
18
|
+
export declare const useAncestorContextBuckets: (craftNode: Ref<CraftNode | null | undefined>) => {
|
|
19
|
+
buckets: ComputedRef<ContextBucketInfo[]>;
|
|
20
|
+
};
|
|
@@ -5,6 +5,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
5
5
|
hasNodes: (state: {
|
|
6
6
|
nodeMap: Map<string, {
|
|
7
7
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
8
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
8
9
|
componentName: string;
|
|
9
10
|
parentUuid?: string | null | undefined;
|
|
10
11
|
props: any;
|
|
@@ -23,6 +24,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
23
24
|
selectedUuid: string | null;
|
|
24
25
|
draggedNode: {
|
|
25
26
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
27
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
26
28
|
componentName: string;
|
|
27
29
|
parentUuid?: string | null | undefined;
|
|
28
30
|
props: any;
|
|
@@ -50,14 +52,18 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
50
52
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
51
53
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
52
54
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
55
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
53
56
|
} | null;
|
|
54
57
|
eventsContext: Record<string, any>;
|
|
55
58
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
56
59
|
draggingDisabled: boolean;
|
|
60
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
61
|
+
pageState: Record<string, any>;
|
|
57
62
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => boolean;
|
|
58
63
|
selectedNode: (state: {
|
|
59
64
|
nodeMap: Map<string, {
|
|
60
65
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
66
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
61
67
|
componentName: string;
|
|
62
68
|
parentUuid?: string | null | undefined;
|
|
63
69
|
props: any;
|
|
@@ -76,6 +82,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
76
82
|
selectedUuid: string | null;
|
|
77
83
|
draggedNode: {
|
|
78
84
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
85
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
79
86
|
componentName: string;
|
|
80
87
|
parentUuid?: string | null | undefined;
|
|
81
88
|
props: any;
|
|
@@ -103,14 +110,18 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
103
110
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
104
111
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
105
112
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
113
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
106
114
|
} | null;
|
|
107
115
|
eventsContext: Record<string, any>;
|
|
108
116
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
109
117
|
draggingDisabled: boolean;
|
|
118
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
119
|
+
pageState: Record<string, any>;
|
|
110
120
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => import('../..').CraftNode | null;
|
|
111
121
|
selectedRef: (state: {
|
|
112
122
|
nodeMap: Map<string, {
|
|
113
123
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
124
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
114
125
|
componentName: string;
|
|
115
126
|
parentUuid?: string | null | undefined;
|
|
116
127
|
props: any;
|
|
@@ -129,6 +140,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
129
140
|
selectedUuid: string | null;
|
|
130
141
|
draggedNode: {
|
|
131
142
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
143
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
132
144
|
componentName: string;
|
|
133
145
|
parentUuid?: string | null | undefined;
|
|
134
146
|
props: any;
|
|
@@ -156,14 +168,18 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
156
168
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
157
169
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
158
170
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
171
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
159
172
|
} | null;
|
|
160
173
|
eventsContext: Record<string, any>;
|
|
161
174
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
162
175
|
draggingDisabled: boolean;
|
|
176
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
177
|
+
pageState: Record<string, any>;
|
|
163
178
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => HTMLElement | null;
|
|
164
179
|
getRef: (state: {
|
|
165
180
|
nodeMap: Map<string, {
|
|
166
181
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
182
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
167
183
|
componentName: string;
|
|
168
184
|
parentUuid?: string | null | undefined;
|
|
169
185
|
props: any;
|
|
@@ -182,6 +198,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
182
198
|
selectedUuid: string | null;
|
|
183
199
|
draggedNode: {
|
|
184
200
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
201
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
185
202
|
componentName: string;
|
|
186
203
|
parentUuid?: string | null | undefined;
|
|
187
204
|
props: any;
|
|
@@ -209,14 +226,18 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
209
226
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
210
227
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
211
228
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
229
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
212
230
|
} | null;
|
|
213
231
|
eventsContext: Record<string, any>;
|
|
214
232
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
215
233
|
draggingDisabled: boolean;
|
|
234
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
235
|
+
pageState: Record<string, any>;
|
|
216
236
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => (uuid: string) => HTMLElement;
|
|
217
237
|
allNodes: (state: {
|
|
218
238
|
nodeMap: Map<string, {
|
|
219
239
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
240
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
220
241
|
componentName: string;
|
|
221
242
|
parentUuid?: string | null | undefined;
|
|
222
243
|
props: any;
|
|
@@ -235,6 +256,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
235
256
|
selectedUuid: string | null;
|
|
236
257
|
draggedNode: {
|
|
237
258
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
259
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
238
260
|
componentName: string;
|
|
239
261
|
parentUuid?: string | null | undefined;
|
|
240
262
|
props: any;
|
|
@@ -262,14 +284,18 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
262
284
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
263
285
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
264
286
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
287
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
265
288
|
} | null;
|
|
266
289
|
eventsContext: Record<string, any>;
|
|
267
290
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
268
291
|
draggingDisabled: boolean;
|
|
292
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
293
|
+
pageState: Record<string, any>;
|
|
269
294
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => import('../..').CraftNode[];
|
|
270
295
|
getDraggedNode: (state: {
|
|
271
296
|
nodeMap: Map<string, {
|
|
272
297
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
298
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
273
299
|
componentName: string;
|
|
274
300
|
parentUuid?: string | null | undefined;
|
|
275
301
|
props: any;
|
|
@@ -288,6 +314,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
288
314
|
selectedUuid: string | null;
|
|
289
315
|
draggedNode: {
|
|
290
316
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
317
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
291
318
|
componentName: string;
|
|
292
319
|
parentUuid?: string | null | undefined;
|
|
293
320
|
props: any;
|
|
@@ -315,12 +342,16 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
315
342
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
316
343
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
317
344
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
345
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
318
346
|
} | null;
|
|
319
347
|
eventsContext: Record<string, any>;
|
|
320
348
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
321
349
|
draggingDisabled: boolean;
|
|
350
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
351
|
+
pageState: Record<string, any>;
|
|
322
352
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => {
|
|
323
353
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
354
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
324
355
|
componentName: string;
|
|
325
356
|
parentUuid?: string | null | undefined;
|
|
326
357
|
props: any;
|
|
@@ -338,6 +369,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
338
369
|
nodeTree: (state: {
|
|
339
370
|
nodeMap: Map<string, {
|
|
340
371
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
372
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
341
373
|
componentName: string;
|
|
342
374
|
parentUuid?: string | null | undefined;
|
|
343
375
|
props: any;
|
|
@@ -356,6 +388,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
356
388
|
selectedUuid: string | null;
|
|
357
389
|
draggedNode: {
|
|
358
390
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
391
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
359
392
|
componentName: string;
|
|
360
393
|
parentUuid?: string | null | undefined;
|
|
361
394
|
props: any;
|
|
@@ -383,10 +416,13 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
383
416
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
384
417
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
385
418
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
419
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
386
420
|
} | null;
|
|
387
421
|
eventsContext: Record<string, any>;
|
|
388
422
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
389
423
|
draggingDisabled: boolean;
|
|
424
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
425
|
+
pageState: Record<string, any>;
|
|
390
426
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => import('../..').CraftNode[];
|
|
391
427
|
}, {
|
|
392
428
|
clear(): void;
|
|
@@ -400,6 +436,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
400
436
|
setNodeData(uuid: string, data: import('../..').CraftNodeDatasource | null): void;
|
|
401
437
|
updateNodeProps(nodeUuid: string, newProps: Record<string, any>): void;
|
|
402
438
|
updateNodeEvents(nodeUuid: string, newEvents: Record<string, string>): void;
|
|
439
|
+
updateNodeSlotsPropsPropsMap(nodeUuid: string, slotsPropsPropsMap: Record<string, Record<string, string>>): void;
|
|
403
440
|
setNodes(nodes: import('../..').CraftNode[]): void;
|
|
404
441
|
addNodeRecursively(node: import('../..').CraftNode, parentUuid?: string | null): void;
|
|
405
442
|
selectNode(craftNode: import('../..').CraftNode | null): void;
|
|
@@ -412,6 +449,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
412
449
|
insertNodeBefore(node: import('../..').CraftNode, targetNode: import('../..').CraftNode, slotName?: string): void;
|
|
413
450
|
insertNodeAfter(node: import('../..').CraftNode, targetNode: import('../..').CraftNode, slotName?: string): void;
|
|
414
451
|
setEventsContext(context: Record<string, any>): void;
|
|
452
|
+
setNodeRuntimeProps(uuid: string, patch: Record<string, any>): void;
|
|
415
453
|
}>;
|
|
416
454
|
mountNodes: () => void;
|
|
417
455
|
};
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { CraftNode } from '../../lib/craftNode';
|
|
3
|
-
|
|
3
|
+
/** Extra lookups/channels merged into `ctx` for compiled event code. */
|
|
4
|
+
export interface CraftNodeEventsRuntime {
|
|
5
|
+
getNodes?: () => Record<string, CraftNode> | null;
|
|
6
|
+
getNode?: (uuid: string) => CraftNode | null;
|
|
7
|
+
/** Live runtime values captured from value-bearing nodes (e.g. what a user typed), keyed by uuid. */
|
|
8
|
+
nodeValues?: Record<string, Record<string, any>>;
|
|
9
|
+
/** Patch another node's rendered props at runtime, by uuid. */
|
|
10
|
+
setNodeProps?: (uuid: string, patch: Record<string, any>) => void;
|
|
11
|
+
/** Page-scoped bag shared across event handlers, e.g. a pending flag. */
|
|
12
|
+
state?: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export declare const useCraftNodeEvents: (craftNode: Ref<CraftNode>, ctx: Record<string, any>, runtime?: CraftNodeEventsRuntime) => {
|
|
4
15
|
eventHandlers: import('vue').ComputedRef<any>;
|
|
5
16
|
};
|
|
@@ -5,6 +5,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
5
5
|
hasNodes: (state: {
|
|
6
6
|
nodeMap: Map<string, {
|
|
7
7
|
slots: Record<string, CraftNode[]>;
|
|
8
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
8
9
|
componentName: string;
|
|
9
10
|
parentUuid?: string | null | undefined;
|
|
10
11
|
props: any;
|
|
@@ -23,6 +24,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
23
24
|
selectedUuid: string | null;
|
|
24
25
|
draggedNode: {
|
|
25
26
|
slots: Record<string, CraftNode[]>;
|
|
27
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
26
28
|
componentName: string;
|
|
27
29
|
parentUuid?: string | null | undefined;
|
|
28
30
|
props: any;
|
|
@@ -50,14 +52,18 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
50
52
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
51
53
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
52
54
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
55
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
53
56
|
} | null;
|
|
54
57
|
eventsContext: Record<string, any>;
|
|
55
58
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
56
59
|
draggingDisabled: boolean;
|
|
60
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
61
|
+
pageState: Record<string, any>;
|
|
57
62
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => boolean;
|
|
58
63
|
selectedNode: (state: {
|
|
59
64
|
nodeMap: Map<string, {
|
|
60
65
|
slots: Record<string, CraftNode[]>;
|
|
66
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
61
67
|
componentName: string;
|
|
62
68
|
parentUuid?: string | null | undefined;
|
|
63
69
|
props: any;
|
|
@@ -76,6 +82,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
76
82
|
selectedUuid: string | null;
|
|
77
83
|
draggedNode: {
|
|
78
84
|
slots: Record<string, CraftNode[]>;
|
|
85
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
79
86
|
componentName: string;
|
|
80
87
|
parentUuid?: string | null | undefined;
|
|
81
88
|
props: any;
|
|
@@ -103,14 +110,18 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
103
110
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
104
111
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
105
112
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
113
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
106
114
|
} | null;
|
|
107
115
|
eventsContext: Record<string, any>;
|
|
108
116
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
109
117
|
draggingDisabled: boolean;
|
|
118
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
119
|
+
pageState: Record<string, any>;
|
|
110
120
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => CraftNode | null;
|
|
111
121
|
selectedRef: (state: {
|
|
112
122
|
nodeMap: Map<string, {
|
|
113
123
|
slots: Record<string, CraftNode[]>;
|
|
124
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
114
125
|
componentName: string;
|
|
115
126
|
parentUuid?: string | null | undefined;
|
|
116
127
|
props: any;
|
|
@@ -129,6 +140,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
129
140
|
selectedUuid: string | null;
|
|
130
141
|
draggedNode: {
|
|
131
142
|
slots: Record<string, CraftNode[]>;
|
|
143
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
132
144
|
componentName: string;
|
|
133
145
|
parentUuid?: string | null | undefined;
|
|
134
146
|
props: any;
|
|
@@ -156,14 +168,18 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
156
168
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
157
169
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
158
170
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
171
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
159
172
|
} | null;
|
|
160
173
|
eventsContext: Record<string, any>;
|
|
161
174
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
162
175
|
draggingDisabled: boolean;
|
|
176
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
177
|
+
pageState: Record<string, any>;
|
|
163
178
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => HTMLElement | null;
|
|
164
179
|
getRef: (state: {
|
|
165
180
|
nodeMap: Map<string, {
|
|
166
181
|
slots: Record<string, CraftNode[]>;
|
|
182
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
167
183
|
componentName: string;
|
|
168
184
|
parentUuid?: string | null | undefined;
|
|
169
185
|
props: any;
|
|
@@ -182,6 +198,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
182
198
|
selectedUuid: string | null;
|
|
183
199
|
draggedNode: {
|
|
184
200
|
slots: Record<string, CraftNode[]>;
|
|
201
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
185
202
|
componentName: string;
|
|
186
203
|
parentUuid?: string | null | undefined;
|
|
187
204
|
props: any;
|
|
@@ -209,14 +226,18 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
209
226
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
210
227
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
211
228
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
229
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
212
230
|
} | null;
|
|
213
231
|
eventsContext: Record<string, any>;
|
|
214
232
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
215
233
|
draggingDisabled: boolean;
|
|
234
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
235
|
+
pageState: Record<string, any>;
|
|
216
236
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => (uuid: string) => HTMLElement;
|
|
217
237
|
allNodes: (state: {
|
|
218
238
|
nodeMap: Map<string, {
|
|
219
239
|
slots: Record<string, CraftNode[]>;
|
|
240
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
220
241
|
componentName: string;
|
|
221
242
|
parentUuid?: string | null | undefined;
|
|
222
243
|
props: any;
|
|
@@ -235,6 +256,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
235
256
|
selectedUuid: string | null;
|
|
236
257
|
draggedNode: {
|
|
237
258
|
slots: Record<string, CraftNode[]>;
|
|
259
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
238
260
|
componentName: string;
|
|
239
261
|
parentUuid?: string | null | undefined;
|
|
240
262
|
props: any;
|
|
@@ -262,14 +284,18 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
262
284
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
263
285
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
264
286
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
287
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
265
288
|
} | null;
|
|
266
289
|
eventsContext: Record<string, any>;
|
|
267
290
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
268
291
|
draggingDisabled: boolean;
|
|
292
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
293
|
+
pageState: Record<string, any>;
|
|
269
294
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => CraftNode[];
|
|
270
295
|
getDraggedNode: (state: {
|
|
271
296
|
nodeMap: Map<string, {
|
|
272
297
|
slots: Record<string, CraftNode[]>;
|
|
298
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
273
299
|
componentName: string;
|
|
274
300
|
parentUuid?: string | null | undefined;
|
|
275
301
|
props: any;
|
|
@@ -288,6 +314,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
288
314
|
selectedUuid: string | null;
|
|
289
315
|
draggedNode: {
|
|
290
316
|
slots: Record<string, CraftNode[]>;
|
|
317
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
291
318
|
componentName: string;
|
|
292
319
|
parentUuid?: string | null | undefined;
|
|
293
320
|
props: any;
|
|
@@ -315,12 +342,16 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
315
342
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
316
343
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
317
344
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
345
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
318
346
|
} | null;
|
|
319
347
|
eventsContext: Record<string, any>;
|
|
320
348
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
321
349
|
draggingDisabled: boolean;
|
|
350
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
351
|
+
pageState: Record<string, any>;
|
|
322
352
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => {
|
|
323
353
|
slots: Record<string, CraftNode[]>;
|
|
354
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
324
355
|
componentName: string;
|
|
325
356
|
parentUuid?: string | null | undefined;
|
|
326
357
|
props: any;
|
|
@@ -338,6 +369,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
338
369
|
nodeTree: (state: {
|
|
339
370
|
nodeMap: Map<string, {
|
|
340
371
|
slots: Record<string, CraftNode[]>;
|
|
372
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
341
373
|
componentName: string;
|
|
342
374
|
parentUuid?: string | null | undefined;
|
|
343
375
|
props: any;
|
|
@@ -356,6 +388,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
356
388
|
selectedUuid: string | null;
|
|
357
389
|
draggedNode: {
|
|
358
390
|
slots: Record<string, CraftNode[]>;
|
|
391
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
359
392
|
componentName: string;
|
|
360
393
|
parentUuid?: string | null | undefined;
|
|
361
394
|
props: any;
|
|
@@ -383,10 +416,13 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
383
416
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
384
417
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
385
418
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
419
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
386
420
|
} | null;
|
|
387
421
|
eventsContext: Record<string, any>;
|
|
388
422
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
389
423
|
draggingDisabled: boolean;
|
|
424
|
+
nodeRuntimeProps: Record<string, Record<string, any>>;
|
|
425
|
+
pageState: Record<string, any>;
|
|
390
426
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => CraftNode[];
|
|
391
427
|
}, {
|
|
392
428
|
clear(): void;
|
|
@@ -400,6 +436,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
400
436
|
setNodeData(uuid: string, data: import('../../lib/craftNode').CraftNodeDatasource | null): void;
|
|
401
437
|
updateNodeProps(nodeUuid: string, newProps: Record<string, any>): void;
|
|
402
438
|
updateNodeEvents(nodeUuid: string, newEvents: Record<string, string>): void;
|
|
439
|
+
updateNodeSlotsPropsPropsMap(nodeUuid: string, slotsPropsPropsMap: Record<string, Record<string, string>>): void;
|
|
403
440
|
setNodes(nodes: CraftNode[]): void;
|
|
404
441
|
addNodeRecursively(node: CraftNode, parentUuid?: string | null): void;
|
|
405
442
|
selectNode(craftNode: CraftNode | null): void;
|
|
@@ -412,6 +449,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
412
449
|
insertNodeBefore(node: CraftNode, targetNode: CraftNode, slotName?: string): void;
|
|
413
450
|
insertNodeAfter(node: CraftNode, targetNode: CraftNode, slotName?: string): void;
|
|
414
451
|
setEventsContext(context: Record<string, any>): void;
|
|
452
|
+
setNodeRuntimeProps(uuid: string, patch: Record<string, any>): void;
|
|
415
453
|
}> | null;
|
|
416
454
|
craftNode: Ref<CraftNode, CraftNode>;
|
|
417
455
|
enabled: import('vue').ComputedRef<any>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { ComputedRef, Ref, Component } from 'vue';
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter, Ref, Component } from 'vue';
|
|
2
2
|
import { CraftNode } from '../../lib/craftNode';
|
|
3
3
|
import { FormKitSchemaDefinition } from '@formkit/core';
|
|
4
4
|
import { default as CraftNodeResolver, CraftNodeComponentMap } from '../../lib/CraftNodeResolver';
|
|
5
|
-
|
|
5
|
+
import { CraftNodePropsContext } from './useResolveCraftNodeProps';
|
|
6
|
+
export declare const useResolveCraftNode: <T extends FormKitSchemaDefinition = FormKitSchemaDefinition>(craftNode: Ref<CraftNode>, context?: MaybeRefOrGetter<CraftNodePropsContext>) => {
|
|
6
7
|
resolvedNode: ComputedRef<CraftNodeComponentMap<T>>;
|
|
7
8
|
resolver: ComputedRef<CraftNodeResolver<T>>;
|
|
8
9
|
defaultProps: ComputedRef<Record<string, any>>;
|
|
9
10
|
componentToRender: ComputedRef<string | Component>;
|
|
11
|
+
props: ComputedRef<any>;
|
|
10
12
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { CraftNode } from '../../lib/craftNode';
|
|
3
|
+
/**
|
|
4
|
+
* A bag of named context buckets available to a node, e.g. the scoped slot
|
|
5
|
+
* props exposed by an ancestor's slot, keyed by that slot's name.
|
|
6
|
+
*/
|
|
7
|
+
export type CraftNodePropsContext = Record<string, Record<string, any>>;
|
|
8
|
+
export declare const useResolveCraftNodeProps: (node: MaybeRefOrGetter<CraftNode>, context?: MaybeRefOrGetter<CraftNodePropsContext>) => {
|
|
9
|
+
props: ComputedRef<Record<string, any>>;
|
|
10
|
+
};
|