@builder-builder/builder 0.0.9 → 0.0.10
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/entities/bind.d.ts +4 -0
- package/dist/entities/bind.js +44 -0
- package/dist/entities/builder/bind.d.ts +85 -0
- package/dist/entities/builder/bind.js +9 -0
- package/dist/entities/builder/builder.d.ts +111 -92
- package/dist/entities/builder/builder.js +11 -8
- package/dist/entities/builder/builders.d.ts +23 -8
- package/dist/entities/builder/builders.js +6 -5
- package/dist/entities/builder/index.d.ts +3 -3
- package/dist/entities/builder/index.js +1 -1
- package/dist/entities/builder/methods.d.ts +17 -17
- package/dist/entities/builder/state.d.ts +4 -4
- package/dist/entities/builder/validate.js +7 -7
- package/dist/entities/collection/collection.d.ts +6 -5
- package/dist/entities/collection/collection.js +6 -5
- package/dist/entities/collection/config.d.ts +280 -232
- package/dist/entities/collection/config.js +4 -4
- package/dist/entities/collection/index.d.ts +1 -1
- package/dist/entities/collection/index.js +1 -1
- package/dist/entities/collection/when.d.ts +5 -5
- package/dist/entities/component/component.d.ts +91 -90
- package/dist/entities/component/component.js +5 -4
- package/dist/entities/component/details.d.ts +16 -16
- package/dist/entities/component/details.js +2 -2
- package/dist/entities/component/index.d.ts +1 -1
- package/dist/entities/component/index.js +1 -1
- package/dist/entities/component/when.d.ts +5 -5
- package/dist/entities/index.d.ts +10 -8
- package/dist/entities/index.js +7 -6
- package/dist/entities/kind.d.ts +6 -0
- package/dist/entities/kind.js +6 -0
- package/dist/entities/option/index.d.ts +1 -1
- package/dist/entities/option/index.js +1 -1
- package/dist/entities/option/option.d.ts +39 -38
- package/dist/entities/option/option.js +5 -4
- package/dist/entities/option/values.d.ts +5 -7
- package/dist/entities/option/values.js +4 -4
- package/dist/entities/option/when.d.ts +5 -5
- package/dist/entities/serialise.d.ts +1582 -2226
- package/dist/entities/serialise.js +52 -22
- package/dist/entities/ui/bind.d.ts +10 -0
- package/dist/entities/ui/bind.js +9 -0
- package/dist/entities/ui/describe.d.ts +26 -51
- package/dist/entities/ui/describe.js +3 -4
- package/dist/entities/ui/index.d.ts +5 -7
- package/dist/entities/ui/index.js +2 -3
- package/dist/entities/ui/page.d.ts +26 -51
- package/dist/entities/ui/page.js +3 -4
- package/dist/entities/ui/pages.d.ts +17 -405
- package/dist/entities/ui/pages.js +6 -6
- package/dist/entities/ui/ui.d.ts +307 -688
- package/dist/entities/ui/ui.js +16 -17
- package/dist/entities/ui/uis.d.ts +11 -5
- package/dist/entities/ui/uis.js +9 -10
- package/dist/entities/ui/validate.d.ts +2 -2
- package/dist/entities/ui/validate.js +3 -3
- package/dist/entities/validate.d.ts +3 -3
- package/dist/entities/when.d.ts +45 -44
- package/dist/entities/when.js +10 -7
- package/dist/index.d.ts +19 -15
- package/dist/index.js +6 -3
- package/dist/mappers/assert/builder.js +13 -13
- package/dist/mappers/assert/ui.js +4 -4
- package/dist/mappers/index.d.ts +2 -0
- package/dist/mappers/index.js +1 -0
- package/dist/mappers/refs.d.ts +12 -0
- package/dist/mappers/refs.js +36 -0
- package/dist/mappers/render/render.js +3 -3
- package/dist/model.d.ts +29 -8
- package/dist/model.js +9 -1
- package/dist/references.d.ts +55 -29
- package/dist/references.js +25 -10
- package/dist/walker/walker.d.ts +13 -5
- package/dist/walker/walker.js +39 -27
- package/dist/walker/walkers.d.ts +4 -3
- package/dist/walker/walkers.js +18 -14
- package/package.json +9 -7
- package/dist/entities/builder/parameter.d.ts +0 -62
- package/dist/entities/builder/parameter.js +0 -18
- package/dist/entities/ui/label.d.ts +0 -18
- package/dist/entities/ui/label.js +0 -12
- package/dist/entities/ui/parameter.d.ts +0 -7
- package/dist/entities/ui/parameter.js +0 -29
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Paramable, ParamableSerialised } from '../../references';
|
|
2
2
|
import type { BuilderUIDescribe, BuilderUIDescribeSerialised } from './describe';
|
|
3
|
-
import type { BuilderUILabel, BuilderUILabelSerialised } from './label';
|
|
4
3
|
import type { BuilderUIPage, BuilderUIPageSerialised } from './page';
|
|
5
4
|
import * as v from 'valibot';
|
|
6
|
-
export type BuilderUIItem =
|
|
5
|
+
export type BuilderUIItem = Paramable<BuilderUIPage | BuilderUIDescribe | BuilderUIPages>;
|
|
7
6
|
export type BuilderUIItems = ReadonlyArray<BuilderUIItem>;
|
|
8
|
-
export declare class BuilderUIPages<const Name extends string = string, const Label extends
|
|
7
|
+
export declare class BuilderUIPages<const Name extends string = string, const Label extends Paramable<string> = Paramable<string>, const Items extends Paramable<BuilderUIItems> = Paramable<BuilderUIItems>> {
|
|
9
8
|
readonly type: "pages";
|
|
10
9
|
readonly name: Name;
|
|
11
10
|
readonly label: Label;
|
|
@@ -16,416 +15,29 @@ export declare const BuilderUIPagesSchema: v.InstanceSchema<typeof BuilderUIPage
|
|
|
16
15
|
export type BuilderUIPagesSerialised = {
|
|
17
16
|
readonly type: 'pages';
|
|
18
17
|
readonly name: string;
|
|
19
|
-
readonly label:
|
|
20
|
-
readonly items:
|
|
18
|
+
readonly label: ParamableSerialised<string>;
|
|
19
|
+
readonly items: ParamableSerialised<BuilderUIItemsSerialised>;
|
|
21
20
|
};
|
|
22
|
-
export type BuilderUIItemSerialised =
|
|
23
|
-
export type BuilderUIItemsSerialised = ReadonlyArray<BuilderUIItemSerialised
|
|
21
|
+
export type BuilderUIItemSerialised = BuilderUIPageSerialised | BuilderUIDescribeSerialised | BuilderUIPagesSerialised;
|
|
22
|
+
export type BuilderUIItemsSerialised = ReadonlyArray<ParamableSerialised<BuilderUIItemSerialised>>;
|
|
24
23
|
export declare const BuilderUIPagesSerialisedSchema: v.GenericSchema<BuilderUIPagesSerialised>;
|
|
24
|
+
export declare const BuilderUIItemSerialisedSchema: v.GenericSchema<BuilderUIItemSerialised>;
|
|
25
25
|
export declare const BuilderUIItemsSerialisedSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
26
|
-
readonly type: v.LiteralSchema<"
|
|
26
|
+
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
27
27
|
readonly id: v.StringSchema<undefined>;
|
|
28
28
|
readonly name: v.StringSchema<undefined>;
|
|
29
29
|
}, undefined>, v.ReadonlyAction<{
|
|
30
|
-
type: "
|
|
30
|
+
type: "parameter";
|
|
31
31
|
id: string;
|
|
32
32
|
name: string;
|
|
33
|
-
}>]>, v.InstanceSchema<typeof import("../..").
|
|
34
|
-
|
|
35
|
-
readonly label: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
36
|
-
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
37
|
-
readonly id: v.StringSchema<undefined>;
|
|
38
|
-
readonly name: v.StringSchema<undefined>;
|
|
39
|
-
}, undefined>, v.ReadonlyAction<{
|
|
40
|
-
type: "ref";
|
|
41
|
-
id: string;
|
|
42
|
-
name: string;
|
|
43
|
-
}>]>, v.InstanceSchema<typeof import("../..").BuilderRef, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
44
|
-
readonly label: v.StringSchema<undefined>;
|
|
45
|
-
}, undefined>, v.MetadataAction<{
|
|
46
|
-
label: string;
|
|
47
|
-
}, {
|
|
48
|
-
readonly serialisable: typeof BuilderUILabel;
|
|
49
|
-
readonly instance: v.InstanceSchema<typeof BuilderUILabel, undefined>;
|
|
50
|
-
}>, v.ReadonlyAction<{
|
|
51
|
-
label: string;
|
|
52
|
-
}>]>], undefined>, v.MetadataAction<import("../..").BuilderRef | Readonly<{
|
|
53
|
-
type: "ref";
|
|
54
|
-
id: string;
|
|
55
|
-
name: string;
|
|
56
|
-
}> | Readonly<{
|
|
57
|
-
label: string;
|
|
58
|
-
}>, {
|
|
59
|
-
readonly refable: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
60
|
-
readonly label: v.StringSchema<undefined>;
|
|
61
|
-
}, undefined>, v.MetadataAction<{
|
|
62
|
-
label: string;
|
|
63
|
-
}, {
|
|
64
|
-
readonly serialisable: typeof BuilderUILabel;
|
|
65
|
-
readonly instance: v.InstanceSchema<typeof BuilderUILabel, undefined>;
|
|
66
|
-
}>, v.ReadonlyAction<{
|
|
67
|
-
label: string;
|
|
68
|
-
}>]>;
|
|
69
|
-
}>]>;
|
|
70
|
-
readonly paths: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
71
|
-
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
72
|
-
readonly id: v.StringSchema<undefined>;
|
|
73
|
-
readonly name: v.StringSchema<undefined>;
|
|
74
|
-
}, undefined>, v.ReadonlyAction<{
|
|
75
|
-
type: "ref";
|
|
76
|
-
id: string;
|
|
77
|
-
name: string;
|
|
78
|
-
}>]>, v.InstanceSchema<typeof import("../..").BuilderRef, undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>, undefined>, v.ReadonlyAction<(readonly (string | number)[])[]>]>], undefined>, v.MetadataAction<readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
79
|
-
type: "ref";
|
|
80
|
-
id: string;
|
|
81
|
-
name: string;
|
|
82
|
-
}>, {
|
|
83
|
-
readonly refable: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>, undefined>, v.ReadonlyAction<(readonly (string | number)[])[]>]>;
|
|
84
|
-
}>]>;
|
|
85
|
-
}, undefined>, v.MetadataAction<{
|
|
86
|
-
type: "page";
|
|
87
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
88
|
-
type: "ref";
|
|
89
|
-
id: string;
|
|
90
|
-
name: string;
|
|
91
|
-
}> | Readonly<{
|
|
92
|
-
label: string;
|
|
93
|
-
}>;
|
|
94
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
95
|
-
type: "ref";
|
|
96
|
-
id: string;
|
|
97
|
-
name: string;
|
|
98
|
-
}>;
|
|
99
|
-
}, {
|
|
100
|
-
readonly serialisable: typeof BuilderUIPage;
|
|
101
|
-
readonly instance: v.InstanceSchema<typeof BuilderUIPage, undefined>;
|
|
102
|
-
}>, v.ReadonlyAction<{
|
|
103
|
-
type: "page";
|
|
104
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
105
|
-
type: "ref";
|
|
106
|
-
id: string;
|
|
107
|
-
name: string;
|
|
108
|
-
}> | Readonly<{
|
|
109
|
-
label: string;
|
|
110
|
-
}>;
|
|
111
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
112
|
-
type: "ref";
|
|
113
|
-
id: string;
|
|
114
|
-
name: string;
|
|
115
|
-
}>;
|
|
116
|
-
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
117
|
-
readonly type: v.LiteralSchema<"describe", undefined>;
|
|
118
|
-
readonly label: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
119
|
-
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
120
|
-
readonly id: v.StringSchema<undefined>;
|
|
121
|
-
readonly name: v.StringSchema<undefined>;
|
|
122
|
-
}, undefined>, v.ReadonlyAction<{
|
|
123
|
-
type: "ref";
|
|
124
|
-
id: string;
|
|
125
|
-
name: string;
|
|
126
|
-
}>]>, v.InstanceSchema<typeof import("../..").BuilderRef, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
127
|
-
readonly label: v.StringSchema<undefined>;
|
|
128
|
-
}, undefined>, v.MetadataAction<{
|
|
129
|
-
label: string;
|
|
130
|
-
}, {
|
|
131
|
-
readonly serialisable: typeof BuilderUILabel;
|
|
132
|
-
readonly instance: v.InstanceSchema<typeof BuilderUILabel, undefined>;
|
|
133
|
-
}>, v.ReadonlyAction<{
|
|
134
|
-
label: string;
|
|
135
|
-
}>]>], undefined>, v.MetadataAction<import("../..").BuilderRef | Readonly<{
|
|
136
|
-
type: "ref";
|
|
137
|
-
id: string;
|
|
138
|
-
name: string;
|
|
139
|
-
}> | Readonly<{
|
|
140
|
-
label: string;
|
|
141
|
-
}>, {
|
|
142
|
-
readonly refable: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
143
|
-
readonly label: v.StringSchema<undefined>;
|
|
144
|
-
}, undefined>, v.MetadataAction<{
|
|
145
|
-
label: string;
|
|
146
|
-
}, {
|
|
147
|
-
readonly serialisable: typeof BuilderUILabel;
|
|
148
|
-
readonly instance: v.InstanceSchema<typeof BuilderUILabel, undefined>;
|
|
149
|
-
}>, v.ReadonlyAction<{
|
|
150
|
-
label: string;
|
|
151
|
-
}>]>;
|
|
152
|
-
}>]>;
|
|
153
|
-
readonly paths: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
154
|
-
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
155
|
-
readonly id: v.StringSchema<undefined>;
|
|
156
|
-
readonly name: v.StringSchema<undefined>;
|
|
157
|
-
}, undefined>, v.ReadonlyAction<{
|
|
158
|
-
type: "ref";
|
|
159
|
-
id: string;
|
|
160
|
-
name: string;
|
|
161
|
-
}>]>, v.InstanceSchema<typeof import("../..").BuilderRef, undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>, undefined>, v.ReadonlyAction<(readonly (string | number)[])[]>]>], undefined>, v.MetadataAction<readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
162
|
-
type: "ref";
|
|
163
|
-
id: string;
|
|
164
|
-
name: string;
|
|
165
|
-
}>, {
|
|
166
|
-
readonly refable: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>, undefined>, v.ReadonlyAction<(readonly (string | number)[])[]>]>;
|
|
167
|
-
}>]>;
|
|
168
|
-
}, undefined>, v.MetadataAction<{
|
|
169
|
-
type: "describe";
|
|
170
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
171
|
-
type: "ref";
|
|
172
|
-
id: string;
|
|
173
|
-
name: string;
|
|
174
|
-
}> | Readonly<{
|
|
175
|
-
label: string;
|
|
176
|
-
}>;
|
|
177
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
178
|
-
type: "ref";
|
|
179
|
-
id: string;
|
|
180
|
-
name: string;
|
|
181
|
-
}>;
|
|
182
|
-
}, {
|
|
183
|
-
readonly serialisable: typeof BuilderUIDescribe;
|
|
184
|
-
readonly instance: v.InstanceSchema<typeof BuilderUIDescribe, undefined>;
|
|
185
|
-
}>, v.ReadonlyAction<{
|
|
186
|
-
type: "describe";
|
|
187
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
188
|
-
type: "ref";
|
|
189
|
-
id: string;
|
|
190
|
-
name: string;
|
|
191
|
-
}> | Readonly<{
|
|
192
|
-
label: string;
|
|
193
|
-
}>;
|
|
194
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
195
|
-
type: "ref";
|
|
196
|
-
id: string;
|
|
197
|
-
name: string;
|
|
198
|
-
}>;
|
|
199
|
-
}>]>, v.GenericSchema<BuilderUIPagesSerialised>], undefined>], undefined>, v.MetadataAction<import("../..").BuilderRef | Readonly<{
|
|
200
|
-
type: "ref";
|
|
33
|
+
}>]>, v.InstanceSchema<typeof import("../..").BuilderParameter, undefined>, v.GenericSchema<BuilderUIItemSerialised>], undefined>, v.MetadataAction<Readonly<{
|
|
34
|
+
type: "parameter";
|
|
201
35
|
id: string;
|
|
202
36
|
name: string;
|
|
203
|
-
}> |
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
id: string;
|
|
208
|
-
name: string;
|
|
209
|
-
}> | Readonly<{
|
|
210
|
-
label: string;
|
|
211
|
-
}>;
|
|
212
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
213
|
-
type: "ref";
|
|
214
|
-
id: string;
|
|
215
|
-
name: string;
|
|
216
|
-
}>;
|
|
217
|
-
}> | Readonly<{
|
|
218
|
-
type: "page";
|
|
219
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
220
|
-
type: "ref";
|
|
221
|
-
id: string;
|
|
222
|
-
name: string;
|
|
223
|
-
}> | Readonly<{
|
|
224
|
-
label: string;
|
|
225
|
-
}>;
|
|
226
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
227
|
-
type: "ref";
|
|
228
|
-
id: string;
|
|
229
|
-
name: string;
|
|
230
|
-
}>;
|
|
231
|
-
}> | BuilderUIPagesSerialised, {
|
|
232
|
-
readonly refable: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
233
|
-
readonly type: v.LiteralSchema<"page", undefined>;
|
|
234
|
-
readonly label: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
235
|
-
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
236
|
-
readonly id: v.StringSchema<undefined>;
|
|
237
|
-
readonly name: v.StringSchema<undefined>;
|
|
238
|
-
}, undefined>, v.ReadonlyAction<{
|
|
239
|
-
type: "ref";
|
|
240
|
-
id: string;
|
|
241
|
-
name: string;
|
|
242
|
-
}>]>, v.InstanceSchema<typeof import("../..").BuilderRef, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
243
|
-
readonly label: v.StringSchema<undefined>;
|
|
244
|
-
}, undefined>, v.MetadataAction<{
|
|
245
|
-
label: string;
|
|
246
|
-
}, {
|
|
247
|
-
readonly serialisable: typeof BuilderUILabel;
|
|
248
|
-
readonly instance: v.InstanceSchema<typeof BuilderUILabel, undefined>;
|
|
249
|
-
}>, v.ReadonlyAction<{
|
|
250
|
-
label: string;
|
|
251
|
-
}>]>], undefined>, v.MetadataAction<import("../..").BuilderRef | Readonly<{
|
|
252
|
-
type: "ref";
|
|
253
|
-
id: string;
|
|
254
|
-
name: string;
|
|
255
|
-
}> | Readonly<{
|
|
256
|
-
label: string;
|
|
257
|
-
}>, {
|
|
258
|
-
readonly refable: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
259
|
-
readonly label: v.StringSchema<undefined>;
|
|
260
|
-
}, undefined>, v.MetadataAction<{
|
|
261
|
-
label: string;
|
|
262
|
-
}, {
|
|
263
|
-
readonly serialisable: typeof BuilderUILabel;
|
|
264
|
-
readonly instance: v.InstanceSchema<typeof BuilderUILabel, undefined>;
|
|
265
|
-
}>, v.ReadonlyAction<{
|
|
266
|
-
label: string;
|
|
267
|
-
}>]>;
|
|
268
|
-
}>]>;
|
|
269
|
-
readonly paths: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
270
|
-
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
271
|
-
readonly id: v.StringSchema<undefined>;
|
|
272
|
-
readonly name: v.StringSchema<undefined>;
|
|
273
|
-
}, undefined>, v.ReadonlyAction<{
|
|
274
|
-
type: "ref";
|
|
275
|
-
id: string;
|
|
276
|
-
name: string;
|
|
277
|
-
}>]>, v.InstanceSchema<typeof import("../..").BuilderRef, undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>, undefined>, v.ReadonlyAction<(readonly (string | number)[])[]>]>], undefined>, v.MetadataAction<readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
278
|
-
type: "ref";
|
|
279
|
-
id: string;
|
|
280
|
-
name: string;
|
|
281
|
-
}>, {
|
|
282
|
-
readonly refable: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>, undefined>, v.ReadonlyAction<(readonly (string | number)[])[]>]>;
|
|
283
|
-
}>]>;
|
|
284
|
-
}, undefined>, v.MetadataAction<{
|
|
285
|
-
type: "page";
|
|
286
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
287
|
-
type: "ref";
|
|
288
|
-
id: string;
|
|
289
|
-
name: string;
|
|
290
|
-
}> | Readonly<{
|
|
291
|
-
label: string;
|
|
292
|
-
}>;
|
|
293
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
294
|
-
type: "ref";
|
|
295
|
-
id: string;
|
|
296
|
-
name: string;
|
|
297
|
-
}>;
|
|
298
|
-
}, {
|
|
299
|
-
readonly serialisable: typeof BuilderUIPage;
|
|
300
|
-
readonly instance: v.InstanceSchema<typeof BuilderUIPage, undefined>;
|
|
301
|
-
}>, v.ReadonlyAction<{
|
|
302
|
-
type: "page";
|
|
303
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
304
|
-
type: "ref";
|
|
305
|
-
id: string;
|
|
306
|
-
name: string;
|
|
307
|
-
}> | Readonly<{
|
|
308
|
-
label: string;
|
|
309
|
-
}>;
|
|
310
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
311
|
-
type: "ref";
|
|
312
|
-
id: string;
|
|
313
|
-
name: string;
|
|
314
|
-
}>;
|
|
315
|
-
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
316
|
-
readonly type: v.LiteralSchema<"describe", undefined>;
|
|
317
|
-
readonly label: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
318
|
-
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
319
|
-
readonly id: v.StringSchema<undefined>;
|
|
320
|
-
readonly name: v.StringSchema<undefined>;
|
|
321
|
-
}, undefined>, v.ReadonlyAction<{
|
|
322
|
-
type: "ref";
|
|
323
|
-
id: string;
|
|
324
|
-
name: string;
|
|
325
|
-
}>]>, v.InstanceSchema<typeof import("../..").BuilderRef, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
326
|
-
readonly label: v.StringSchema<undefined>;
|
|
327
|
-
}, undefined>, v.MetadataAction<{
|
|
328
|
-
label: string;
|
|
329
|
-
}, {
|
|
330
|
-
readonly serialisable: typeof BuilderUILabel;
|
|
331
|
-
readonly instance: v.InstanceSchema<typeof BuilderUILabel, undefined>;
|
|
332
|
-
}>, v.ReadonlyAction<{
|
|
333
|
-
label: string;
|
|
334
|
-
}>]>], undefined>, v.MetadataAction<import("../..").BuilderRef | Readonly<{
|
|
335
|
-
type: "ref";
|
|
336
|
-
id: string;
|
|
337
|
-
name: string;
|
|
338
|
-
}> | Readonly<{
|
|
339
|
-
label: string;
|
|
340
|
-
}>, {
|
|
341
|
-
readonly refable: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
342
|
-
readonly label: v.StringSchema<undefined>;
|
|
343
|
-
}, undefined>, v.MetadataAction<{
|
|
344
|
-
label: string;
|
|
345
|
-
}, {
|
|
346
|
-
readonly serialisable: typeof BuilderUILabel;
|
|
347
|
-
readonly instance: v.InstanceSchema<typeof BuilderUILabel, undefined>;
|
|
348
|
-
}>, v.ReadonlyAction<{
|
|
349
|
-
label: string;
|
|
350
|
-
}>]>;
|
|
351
|
-
}>]>;
|
|
352
|
-
readonly paths: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
353
|
-
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
354
|
-
readonly id: v.StringSchema<undefined>;
|
|
355
|
-
readonly name: v.StringSchema<undefined>;
|
|
356
|
-
}, undefined>, v.ReadonlyAction<{
|
|
357
|
-
type: "ref";
|
|
358
|
-
id: string;
|
|
359
|
-
name: string;
|
|
360
|
-
}>]>, v.InstanceSchema<typeof import("../..").BuilderRef, undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>, undefined>, v.ReadonlyAction<(readonly (string | number)[])[]>]>], undefined>, v.MetadataAction<readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
361
|
-
type: "ref";
|
|
362
|
-
id: string;
|
|
363
|
-
name: string;
|
|
364
|
-
}>, {
|
|
365
|
-
readonly refable: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>, undefined>, v.ReadonlyAction<(readonly (string | number)[])[]>]>;
|
|
366
|
-
}>]>;
|
|
367
|
-
}, undefined>, v.MetadataAction<{
|
|
368
|
-
type: "describe";
|
|
369
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
370
|
-
type: "ref";
|
|
371
|
-
id: string;
|
|
372
|
-
name: string;
|
|
373
|
-
}> | Readonly<{
|
|
374
|
-
label: string;
|
|
375
|
-
}>;
|
|
376
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
377
|
-
type: "ref";
|
|
378
|
-
id: string;
|
|
379
|
-
name: string;
|
|
380
|
-
}>;
|
|
381
|
-
}, {
|
|
382
|
-
readonly serialisable: typeof BuilderUIDescribe;
|
|
383
|
-
readonly instance: v.InstanceSchema<typeof BuilderUIDescribe, undefined>;
|
|
384
|
-
}>, v.ReadonlyAction<{
|
|
385
|
-
type: "describe";
|
|
386
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
387
|
-
type: "ref";
|
|
388
|
-
id: string;
|
|
389
|
-
name: string;
|
|
390
|
-
}> | Readonly<{
|
|
391
|
-
label: string;
|
|
392
|
-
}>;
|
|
393
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
394
|
-
type: "ref";
|
|
395
|
-
id: string;
|
|
396
|
-
name: string;
|
|
397
|
-
}>;
|
|
398
|
-
}>]>, v.GenericSchema<BuilderUIPagesSerialised>], undefined>;
|
|
399
|
-
}>]>, undefined>, v.ReadonlyAction<(import("../..").BuilderRef | Readonly<{
|
|
400
|
-
type: "ref";
|
|
37
|
+
}> | import("../..").BuilderParameter<string> | BuilderUIItemSerialised, {
|
|
38
|
+
readonly paramable: v.GenericSchema<BuilderUIItemSerialised>;
|
|
39
|
+
}>]>, undefined>, v.ReadonlyAction<(Readonly<{
|
|
40
|
+
type: "parameter";
|
|
401
41
|
id: string;
|
|
402
42
|
name: string;
|
|
403
|
-
}> |
|
|
404
|
-
type: "describe";
|
|
405
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
406
|
-
type: "ref";
|
|
407
|
-
id: string;
|
|
408
|
-
name: string;
|
|
409
|
-
}> | Readonly<{
|
|
410
|
-
label: string;
|
|
411
|
-
}>;
|
|
412
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
413
|
-
type: "ref";
|
|
414
|
-
id: string;
|
|
415
|
-
name: string;
|
|
416
|
-
}>;
|
|
417
|
-
}> | Readonly<{
|
|
418
|
-
type: "page";
|
|
419
|
-
label: import("../..").BuilderRef | Readonly<{
|
|
420
|
-
type: "ref";
|
|
421
|
-
id: string;
|
|
422
|
-
name: string;
|
|
423
|
-
}> | Readonly<{
|
|
424
|
-
label: string;
|
|
425
|
-
}>;
|
|
426
|
-
paths: readonly (readonly (string | number)[])[] | import("../..").BuilderRef | Readonly<{
|
|
427
|
-
type: "ref";
|
|
428
|
-
id: string;
|
|
429
|
-
name: string;
|
|
430
|
-
}>;
|
|
431
|
-
}> | BuilderUIPagesSerialised)[]>]>;
|
|
43
|
+
}> | import("../..").BuilderParameter<string> | BuilderUIItemSerialised)[]>]>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
import {
|
|
2
|
+
import { paramable } from '../../references.js';
|
|
3
3
|
import { serialisable } from '../../serialisable.js';
|
|
4
4
|
import { BuilderUIDescribeSerialisedSchema } from './describe.js';
|
|
5
|
-
import { BuilderUILabelSerialisedSchema } from './label.js';
|
|
6
5
|
import { BuilderUIPageSerialisedSchema } from './page.js';
|
|
7
6
|
export class BuilderUIPages {
|
|
8
7
|
type = 'pages';
|
|
@@ -19,11 +18,12 @@ export const BuilderUIPagesSchema = v.instance(BuilderUIPages);
|
|
|
19
18
|
export const BuilderUIPagesSerialisedSchema = serialisable(BuilderUIPages, v.object({
|
|
20
19
|
type: v.literal('pages'),
|
|
21
20
|
name: v.string(),
|
|
22
|
-
label:
|
|
23
|
-
items:
|
|
21
|
+
label: paramable(v.string()),
|
|
22
|
+
items: paramable(v.lazy(() => BuilderUIItemsSerialisedSchema))
|
|
24
23
|
}));
|
|
25
|
-
export const
|
|
24
|
+
export const BuilderUIItemSerialisedSchema = v.union([
|
|
26
25
|
BuilderUIPageSerialisedSchema,
|
|
27
26
|
BuilderUIDescribeSerialisedSchema,
|
|
28
27
|
BuilderUIPagesSerialisedSchema
|
|
29
|
-
])
|
|
28
|
+
]);
|
|
29
|
+
export const BuilderUIItemsSerialisedSchema = v.pipe(v.array(paramable(BuilderUIItemSerialisedSchema)), v.readonly());
|