@versa-stack/v-craft 1.1.0-alpha.1 → 1.1.0-alpha.2
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 +2 -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 +23 -0
- package/dist/types/components/composable/useCraftNodeWrapper.d.ts +23 -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 +23 -0
- package/dist/v-craft.css +1 -1
- package/dist/v-craft.es.js +3145 -2779
- 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,11 @@
|
|
|
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
|
+
context?: CraftNodePropsContext;
|
|
7
9
|
};
|
|
8
10
|
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
11
|
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,6 +52,7 @@ 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>;
|
|
@@ -58,6 +61,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
58
61
|
selectedNode: (state: {
|
|
59
62
|
nodeMap: Map<string, {
|
|
60
63
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
64
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
61
65
|
componentName: string;
|
|
62
66
|
parentUuid?: string | null | undefined;
|
|
63
67
|
props: any;
|
|
@@ -76,6 +80,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
76
80
|
selectedUuid: string | null;
|
|
77
81
|
draggedNode: {
|
|
78
82
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
83
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
79
84
|
componentName: string;
|
|
80
85
|
parentUuid?: string | null | undefined;
|
|
81
86
|
props: any;
|
|
@@ -103,6 +108,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
103
108
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
104
109
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
105
110
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
111
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
106
112
|
} | null;
|
|
107
113
|
eventsContext: Record<string, any>;
|
|
108
114
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
@@ -111,6 +117,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
111
117
|
selectedRef: (state: {
|
|
112
118
|
nodeMap: Map<string, {
|
|
113
119
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
120
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
114
121
|
componentName: string;
|
|
115
122
|
parentUuid?: string | null | undefined;
|
|
116
123
|
props: any;
|
|
@@ -129,6 +136,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
129
136
|
selectedUuid: string | null;
|
|
130
137
|
draggedNode: {
|
|
131
138
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
139
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
132
140
|
componentName: string;
|
|
133
141
|
parentUuid?: string | null | undefined;
|
|
134
142
|
props: any;
|
|
@@ -156,6 +164,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
156
164
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
157
165
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
158
166
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
167
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
159
168
|
} | null;
|
|
160
169
|
eventsContext: Record<string, any>;
|
|
161
170
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
@@ -164,6 +173,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
164
173
|
getRef: (state: {
|
|
165
174
|
nodeMap: Map<string, {
|
|
166
175
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
176
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
167
177
|
componentName: string;
|
|
168
178
|
parentUuid?: string | null | undefined;
|
|
169
179
|
props: any;
|
|
@@ -182,6 +192,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
182
192
|
selectedUuid: string | null;
|
|
183
193
|
draggedNode: {
|
|
184
194
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
195
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
185
196
|
componentName: string;
|
|
186
197
|
parentUuid?: string | null | undefined;
|
|
187
198
|
props: any;
|
|
@@ -209,6 +220,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
209
220
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
210
221
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
211
222
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
223
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
212
224
|
} | null;
|
|
213
225
|
eventsContext: Record<string, any>;
|
|
214
226
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
@@ -217,6 +229,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
217
229
|
allNodes: (state: {
|
|
218
230
|
nodeMap: Map<string, {
|
|
219
231
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
232
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
220
233
|
componentName: string;
|
|
221
234
|
parentUuid?: string | null | undefined;
|
|
222
235
|
props: any;
|
|
@@ -235,6 +248,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
235
248
|
selectedUuid: string | null;
|
|
236
249
|
draggedNode: {
|
|
237
250
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
251
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
238
252
|
componentName: string;
|
|
239
253
|
parentUuid?: string | null | undefined;
|
|
240
254
|
props: any;
|
|
@@ -262,6 +276,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
262
276
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
263
277
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
264
278
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
279
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
265
280
|
} | null;
|
|
266
281
|
eventsContext: Record<string, any>;
|
|
267
282
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
@@ -270,6 +285,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
270
285
|
getDraggedNode: (state: {
|
|
271
286
|
nodeMap: Map<string, {
|
|
272
287
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
288
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
273
289
|
componentName: string;
|
|
274
290
|
parentUuid?: string | null | undefined;
|
|
275
291
|
props: any;
|
|
@@ -288,6 +304,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
288
304
|
selectedUuid: string | null;
|
|
289
305
|
draggedNode: {
|
|
290
306
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
307
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
291
308
|
componentName: string;
|
|
292
309
|
parentUuid?: string | null | undefined;
|
|
293
310
|
props: any;
|
|
@@ -315,12 +332,14 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
315
332
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
316
333
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
317
334
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
335
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
318
336
|
} | null;
|
|
319
337
|
eventsContext: Record<string, any>;
|
|
320
338
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
321
339
|
draggingDisabled: boolean;
|
|
322
340
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => {
|
|
323
341
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
342
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
324
343
|
componentName: string;
|
|
325
344
|
parentUuid?: string | null | undefined;
|
|
326
345
|
props: any;
|
|
@@ -338,6 +357,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
338
357
|
nodeTree: (state: {
|
|
339
358
|
nodeMap: Map<string, {
|
|
340
359
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
360
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
341
361
|
componentName: string;
|
|
342
362
|
parentUuid?: string | null | undefined;
|
|
343
363
|
props: any;
|
|
@@ -356,6 +376,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
356
376
|
selectedUuid: string | null;
|
|
357
377
|
draggedNode: {
|
|
358
378
|
slots: Record<string, import('../..').CraftNode[]>;
|
|
379
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
359
380
|
componentName: string;
|
|
360
381
|
parentUuid?: string | null | undefined;
|
|
361
382
|
props: any;
|
|
@@ -383,6 +404,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
383
404
|
getSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
384
405
|
getEventsSchema: (craftNode: import('../..').CraftNode) => FormKitSchemaDefinition;
|
|
385
406
|
getRules: (craftNode: import('../..').CraftNode) => import('../..').CraftNodeRules;
|
|
407
|
+
getSlotsProps: (craftNode: import('../..').CraftNode) => Record<string, string[]>;
|
|
386
408
|
} | null;
|
|
387
409
|
eventsContext: Record<string, any>;
|
|
388
410
|
nodeDataMap: Record<string, import('../..').CraftNodeDatasource | null>;
|
|
@@ -400,6 +422,7 @@ export declare const useCraftFrame: <T extends FormKitSchemaDefinition = FormKit
|
|
|
400
422
|
setNodeData(uuid: string, data: import('../..').CraftNodeDatasource | null): void;
|
|
401
423
|
updateNodeProps(nodeUuid: string, newProps: Record<string, any>): void;
|
|
402
424
|
updateNodeEvents(nodeUuid: string, newEvents: Record<string, string>): void;
|
|
425
|
+
updateNodeSlotsPropsPropsMap(nodeUuid: string, slotsPropsPropsMap: Record<string, Record<string, string>>): void;
|
|
403
426
|
setNodes(nodes: import('../..').CraftNode[]): void;
|
|
404
427
|
addNodeRecursively(node: import('../..').CraftNode, parentUuid?: string | null): void;
|
|
405
428
|
selectNode(craftNode: import('../..').CraftNode | null): void;
|
|
@@ -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,6 +52,7 @@ 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>;
|
|
@@ -58,6 +61,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
58
61
|
selectedNode: (state: {
|
|
59
62
|
nodeMap: Map<string, {
|
|
60
63
|
slots: Record<string, CraftNode[]>;
|
|
64
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
61
65
|
componentName: string;
|
|
62
66
|
parentUuid?: string | null | undefined;
|
|
63
67
|
props: any;
|
|
@@ -76,6 +80,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
76
80
|
selectedUuid: string | null;
|
|
77
81
|
draggedNode: {
|
|
78
82
|
slots: Record<string, CraftNode[]>;
|
|
83
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
79
84
|
componentName: string;
|
|
80
85
|
parentUuid?: string | null | undefined;
|
|
81
86
|
props: any;
|
|
@@ -103,6 +108,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
103
108
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
104
109
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
105
110
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
111
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
106
112
|
} | null;
|
|
107
113
|
eventsContext: Record<string, any>;
|
|
108
114
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
@@ -111,6 +117,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
111
117
|
selectedRef: (state: {
|
|
112
118
|
nodeMap: Map<string, {
|
|
113
119
|
slots: Record<string, CraftNode[]>;
|
|
120
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
114
121
|
componentName: string;
|
|
115
122
|
parentUuid?: string | null | undefined;
|
|
116
123
|
props: any;
|
|
@@ -129,6 +136,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
129
136
|
selectedUuid: string | null;
|
|
130
137
|
draggedNode: {
|
|
131
138
|
slots: Record<string, CraftNode[]>;
|
|
139
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
132
140
|
componentName: string;
|
|
133
141
|
parentUuid?: string | null | undefined;
|
|
134
142
|
props: any;
|
|
@@ -156,6 +164,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
156
164
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
157
165
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
158
166
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
167
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
159
168
|
} | null;
|
|
160
169
|
eventsContext: Record<string, any>;
|
|
161
170
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
@@ -164,6 +173,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
164
173
|
getRef: (state: {
|
|
165
174
|
nodeMap: Map<string, {
|
|
166
175
|
slots: Record<string, CraftNode[]>;
|
|
176
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
167
177
|
componentName: string;
|
|
168
178
|
parentUuid?: string | null | undefined;
|
|
169
179
|
props: any;
|
|
@@ -182,6 +192,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
182
192
|
selectedUuid: string | null;
|
|
183
193
|
draggedNode: {
|
|
184
194
|
slots: Record<string, CraftNode[]>;
|
|
195
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
185
196
|
componentName: string;
|
|
186
197
|
parentUuid?: string | null | undefined;
|
|
187
198
|
props: any;
|
|
@@ -209,6 +220,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
209
220
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
210
221
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
211
222
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
223
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
212
224
|
} | null;
|
|
213
225
|
eventsContext: Record<string, any>;
|
|
214
226
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
@@ -217,6 +229,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
217
229
|
allNodes: (state: {
|
|
218
230
|
nodeMap: Map<string, {
|
|
219
231
|
slots: Record<string, CraftNode[]>;
|
|
232
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
220
233
|
componentName: string;
|
|
221
234
|
parentUuid?: string | null | undefined;
|
|
222
235
|
props: any;
|
|
@@ -235,6 +248,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
235
248
|
selectedUuid: string | null;
|
|
236
249
|
draggedNode: {
|
|
237
250
|
slots: Record<string, CraftNode[]>;
|
|
251
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
238
252
|
componentName: string;
|
|
239
253
|
parentUuid?: string | null | undefined;
|
|
240
254
|
props: any;
|
|
@@ -262,6 +276,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
262
276
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
263
277
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
264
278
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
279
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
265
280
|
} | null;
|
|
266
281
|
eventsContext: Record<string, any>;
|
|
267
282
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
@@ -270,6 +285,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
270
285
|
getDraggedNode: (state: {
|
|
271
286
|
nodeMap: Map<string, {
|
|
272
287
|
slots: Record<string, CraftNode[]>;
|
|
288
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
273
289
|
componentName: string;
|
|
274
290
|
parentUuid?: string | null | undefined;
|
|
275
291
|
props: any;
|
|
@@ -288,6 +304,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
288
304
|
selectedUuid: string | null;
|
|
289
305
|
draggedNode: {
|
|
290
306
|
slots: Record<string, CraftNode[]>;
|
|
307
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
291
308
|
componentName: string;
|
|
292
309
|
parentUuid?: string | null | undefined;
|
|
293
310
|
props: any;
|
|
@@ -315,12 +332,14 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
315
332
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
316
333
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
317
334
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
335
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
318
336
|
} | null;
|
|
319
337
|
eventsContext: Record<string, any>;
|
|
320
338
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
321
339
|
draggingDisabled: boolean;
|
|
322
340
|
} & import('pinia').PiniaCustomStateProperties<import('../../store/editor').EditorState>) => {
|
|
323
341
|
slots: Record<string, CraftNode[]>;
|
|
342
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
324
343
|
componentName: string;
|
|
325
344
|
parentUuid?: string | null | undefined;
|
|
326
345
|
props: any;
|
|
@@ -338,6 +357,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
338
357
|
nodeTree: (state: {
|
|
339
358
|
nodeMap: Map<string, {
|
|
340
359
|
slots: Record<string, CraftNode[]>;
|
|
360
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
341
361
|
componentName: string;
|
|
342
362
|
parentUuid?: string | null | undefined;
|
|
343
363
|
props: any;
|
|
@@ -356,6 +376,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
356
376
|
selectedUuid: string | null;
|
|
357
377
|
draggedNode: {
|
|
358
378
|
slots: Record<string, CraftNode[]>;
|
|
379
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
359
380
|
componentName: string;
|
|
360
381
|
parentUuid?: string | null | undefined;
|
|
361
382
|
props: any;
|
|
@@ -383,6 +404,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
383
404
|
getSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
384
405
|
getEventsSchema: (craftNode: CraftNode) => import('@formkit/core').FormKitSchemaDefinition;
|
|
385
406
|
getRules: (craftNode: CraftNode) => import('../../lib/craftNode').CraftNodeRules;
|
|
407
|
+
getSlotsProps: (craftNode: CraftNode) => Record<string, string[]>;
|
|
386
408
|
} | null;
|
|
387
409
|
eventsContext: Record<string, any>;
|
|
388
410
|
nodeDataMap: Record<string, import('../../lib/craftNode').CraftNodeDatasource | null>;
|
|
@@ -400,6 +422,7 @@ export declare const useCraftNodeWrapper: (craftNode: Ref<CraftNode>) => {
|
|
|
400
422
|
setNodeData(uuid: string, data: import('../../lib/craftNode').CraftNodeDatasource | null): void;
|
|
401
423
|
updateNodeProps(nodeUuid: string, newProps: Record<string, any>): void;
|
|
402
424
|
updateNodeEvents(nodeUuid: string, newEvents: Record<string, string>): void;
|
|
425
|
+
updateNodeSlotsPropsPropsMap(nodeUuid: string, slotsPropsPropsMap: Record<string, Record<string, string>>): void;
|
|
403
426
|
setNodes(nodes: CraftNode[]): void;
|
|
404
427
|
addNodeRecursively(node: CraftNode, parentUuid?: string | null): void;
|
|
405
428
|
selectNode(craftNode: CraftNode | null): void;
|
|
@@ -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
|
+
};
|
|
@@ -8,9 +8,11 @@ import { default as CraftEditorPanelBlueprints } from './CraftEditorPanelBluepri
|
|
|
8
8
|
import { default as CraftEditorPanelForm } from './CraftEditorPanelForm.vue';
|
|
9
9
|
import { default as CraftEditorPanelLayers } from './CraftEditorPanelLayers.vue';
|
|
10
10
|
import { default as CraftEditorPanelLayout } from './CraftEditorPanelLayout.vue';
|
|
11
|
+
import { default as CraftEditorPanelNodeDataSourceSettings } from './CraftEditorPanelNodeDataSourceSettings.vue';
|
|
11
12
|
import { default as CraftEditorPanelNodeEventsSettings } from './CraftEditorPanelNodeEventsSettings.vue';
|
|
12
13
|
import { default as CraftEditorPanelNodeLayer } from './CraftEditorPanelNodeLayer.vue';
|
|
13
14
|
import { default as CraftEditorPanelNodeSettings } from './CraftEditorPanelNodeSettings.vue';
|
|
15
|
+
import { default as CraftEditorPanelNodeSlotPropsSettings } from './CraftEditorPanelNodeSlotPropsSettings.vue';
|
|
14
16
|
import { default as CraftEditorPanelSettings } from './CraftEditorPanelSettings.vue';
|
|
15
17
|
import { default as CraftFrame } from './CraftFrame.vue';
|
|
16
18
|
import { default as CraftNodeEditor } from './CraftNodeEditor.vue';
|
|
@@ -18,7 +20,7 @@ import { default as CraftNodeViewer } from './CraftNodeViewer.vue';
|
|
|
18
20
|
import { default as CraftIframe } from './CraftIframe.vue';
|
|
19
21
|
import { default as CraftStaticRenderer } from './CraftStaticRenderer.vue';
|
|
20
22
|
import * as Utils from "./utils";
|
|
21
|
-
export { CraftCanvas, CraftComponentSimpleText, CraftEditor, CraftEditorBlueprint, CraftEditorBlueprintsList, CraftEditorPanelBlueprints, CraftEditorPanelForm, CraftEditorPanelLayers, CraftEditorPanelLayout, CraftEditorPanelNodeEventsSettings, CraftEditorPanelNodeLayer, CraftEditorPanelNodeSettings, CraftEditorPanelSettings, CraftFrame, CraftIframe, CraftNodeEditor, CraftNodeViewer, CraftStaticRenderer, Utils, };
|
|
23
|
+
export { CraftCanvas, CraftComponentSimpleText, CraftEditor, CraftEditorBlueprint, CraftEditorBlueprintsList, CraftEditorPanelBlueprints, CraftEditorPanelForm, CraftEditorPanelLayers, CraftEditorPanelLayout, CraftEditorPanelNodeDataSourceSettings, CraftEditorPanelNodeEventsSettings, CraftEditorPanelNodeLayer, CraftEditorPanelNodeSettings, CraftEditorPanelNodeSlotPropsSettings, CraftEditorPanelSettings, CraftFrame, CraftIframe, CraftNodeEditor, CraftNodeViewer, CraftStaticRenderer, Utils, };
|
|
22
24
|
export type CraftDataListItem = {
|
|
23
25
|
dataItem: any;
|
|
24
26
|
dataIndex: number;
|
|
@@ -5,6 +5,7 @@ import { FormKitSchemaDefinition } from '@formkit/core';
|
|
|
5
5
|
export declare const blueprintsWithDefaults: <T extends FormKitSchemaDefinition>(group: BlueprintGroup, resolver: CraftNodeResolver<T>) => {
|
|
6
6
|
props: any;
|
|
7
7
|
slots: Record<string, CraftNode[]> & Record<string, import('../lib/model').Blueprint[]>;
|
|
8
|
+
slotsPropsPropsMap?: Record<string, Record<string, string>> | undefined;
|
|
8
9
|
componentName: string;
|
|
9
10
|
rules?: import('../lib/craftNode').CraftNodeRules | undefined;
|
|
10
11
|
visible?: boolean | undefined;
|
|
@@ -10,6 +10,7 @@ export type CraftNodeComponentMap<T extends FormKitSchemaDefinition = FormKitSch
|
|
|
10
10
|
defaultProps?: Record<string, any>;
|
|
11
11
|
rules?: CraftNodeRules;
|
|
12
12
|
slots?: string[];
|
|
13
|
+
slotsProps?: Record<string, string[]>;
|
|
13
14
|
};
|
|
14
15
|
export type CraftNodeResolverMap<T extends FormKitSchemaDefinition = FormKitSchemaDefinition> = Record<string, CraftNodeComponentMap<T>>;
|
|
15
16
|
export type ResolveComponentHook = (craftNode: CraftNode, defaultResolver: (name: string) => Component | undefined) => Component | undefined;
|
|
@@ -26,5 +27,6 @@ export declare class CraftNodeResolver<T extends FormKitSchemaDefinition = FormK
|
|
|
26
27
|
getSchema(craftNode: CraftNode): T;
|
|
27
28
|
getEventsSchema(craftNode: CraftNode): T;
|
|
28
29
|
getRules(craftNode: CraftNode): CraftNodeRules;
|
|
30
|
+
getSlotsProps(craftNode: CraftNode): Record<string, string[]>;
|
|
29
31
|
}
|
|
30
32
|
export default CraftNodeResolver;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormKitSchemaDefinition } from '@formkit/core';
|
|
2
|
+
export type SchemaFieldOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Reads the flat `propsSchema`/`eventsSchema` array shape used throughout
|
|
8
|
+
* this project's resolvers (each entry a FormKit node carrying `name` and
|
|
9
|
+
* an optional `label`) and turns it into options for a target-prop picker.
|
|
10
|
+
*/
|
|
11
|
+
export declare const extractSchemaFieldNames: (schema: FormKitSchemaDefinition | undefined | null) => SchemaFieldOption[];
|