@builder-builder/builder 0.0.25 → 0.0.27
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/client/schema.d.ts +29 -4
- package/dist/client/schema.js +3 -1
- package/dist/components/Builder.svelte.d.ts +24 -0
- package/dist/components/BuilderCollectionButtons.svelte.d.ts +22 -0
- package/dist/components/BuilderCollections.svelte.d.ts +23 -0
- package/dist/components/BuilderDescription.svelte.d.ts +18 -0
- package/dist/components/BuilderLayout.svelte.d.ts +24 -0
- package/dist/components/BuilderOption.svelte.d.ts +31 -0
- package/dist/components/BuilderOptionSelect.svelte.d.ts +21 -0
- package/dist/components/BuilderOptionToggleBoolean.svelte.d.ts +20 -0
- package/dist/components/BuilderOptionToggleNumber.svelte.d.ts +21 -0
- package/dist/components/BuilderOptionToggleString.svelte.d.ts +21 -0
- package/dist/components/BuilderPrice.svelte.d.ts +21 -0
- package/dist/components/BuilderRender.svelte.d.ts +39 -0
- package/dist/components/config.d.ts +2 -0
- package/dist/components/config.js +1 -0
- package/dist/components/dispatch.d.ts +1 -0
- package/dist/components/dispatch.js +3 -0
- package/dist/components/id.d.ts +1 -0
- package/dist/components/id.js +3 -0
- package/dist/components/index.d.ts +25 -0
- package/dist/components/index.js +7441 -0
- package/dist/entities/builder/builder.js +2 -1
- package/dist/entities/collection/collection.js +2 -1
- package/dist/entities/collection/config.d.ts +20 -20
- package/dist/entities/collection/config.js +3 -2
- package/dist/entities/component/component.d.ts +30 -30
- package/dist/entities/component/component.js +2 -1
- package/dist/entities/component/config.d.ts +12 -12
- package/dist/entities/component/field.d.ts +4 -4
- package/dist/entities/component/field.js +4 -3
- package/dist/entities/expectation.d.ts +2 -2
- package/dist/entities/expectation.js +2 -1
- package/dist/entities/index.d.ts +1 -1
- package/dist/entities/kind.d.ts +1 -1
- package/dist/entities/kind.js +43 -3
- package/dist/entities/model/models.d.ts +3 -3
- package/dist/entities/option/config.d.ts +4 -4
- package/dist/entities/option/option.d.ts +22 -22
- package/dist/entities/option/option.js +2 -1
- package/dist/entities/option/select.d.ts +1 -1
- package/dist/entities/option/select.js +5 -4
- package/dist/entities/option/toggle.d.ts +1 -1
- package/dist/entities/option/toggle.js +4 -3
- package/dist/entities/paths.d.ts +2 -2
- package/dist/entities/paths.js +2 -1
- package/dist/entities/pricing/expression.js +5 -4
- package/dist/entities/pricing/rates.js +2 -1
- package/dist/entities/references.d.ts +50 -2
- package/dist/entities/references.js +2 -1
- package/dist/entities/serialise.d.ts +318 -113
- package/dist/entities/serialise.js +4 -3
- package/dist/entities/tags.d.ts +1 -1
- package/dist/entities/tags.js +2 -1
- package/dist/entities/ui/describe.d.ts +126 -34
- package/dist/entities/ui/describe.js +3 -2
- package/dist/entities/ui/input.d.ts +158 -49
- package/dist/entities/ui/input.js +13 -6
- package/dist/entities/ui/page.d.ts +124 -32
- package/dist/entities/ui/page.js +2 -1
- package/dist/entities/ui/pages.d.ts +11 -3
- package/dist/entities/ui/pages.js +3 -2
- package/dist/entities/validated.d.ts +1 -0
- package/dist/entities/when.d.ts +16 -16
- package/dist/entities/when.js +2 -2
- package/dist/errors/errors.d.ts +10 -0
- package/dist/errors/errors.js +6 -0
- package/dist/instance.d.ts +7 -7
- package/dist/instance.js +4 -4
- package/dist/mappers/index.d.ts +1 -1
- package/dist/mappers/order.js +4 -2
- package/dist/mappers/price.js +1 -2
- package/dist/mappers/render/collection.d.ts +9 -0
- package/dist/mappers/render/collection.js +27 -0
- package/dist/mappers/render/compose.d.ts +5 -0
- package/dist/mappers/render/compose.js +15 -0
- package/dist/mappers/render/description.d.ts +3 -0
- package/dist/mappers/render/description.js +17 -0
- package/dist/mappers/render/index.d.ts +3 -1
- package/dist/mappers/render/option.d.ts +21 -0
- package/dist/mappers/render/option.js +26 -0
- package/dist/mappers/render/page.d.ts +11 -0
- package/dist/mappers/render/page.js +11 -0
- package/dist/mappers/render/paths.d.ts +3 -0
- package/dist/mappers/render/paths.js +21 -0
- package/dist/mappers/render/render.d.ts +1 -1
- package/dist/mappers/render/render.js +33 -98
- package/dist/mappers/resolve.d.ts +2 -1
- package/dist/mappers/resolve.js +24 -23
- package/dist/primitive.d.ts +5 -0
- package/dist/primitive.js +6 -1
- package/dist/public.d.ts +1 -1
- package/dist/references.d.ts +6 -6
- package/dist/references.js +3 -2
- package/dist/validate/model.js +16 -5
- package/dist/validate/paths.js +3 -5
- package/dist/validate/pricing.js +5 -6
- package/dist/validate/resolve.d.ts +2 -1
- package/dist/validate/resolve.js +87 -73
- package/dist/validate/ui.js +14 -13
- package/package.json +7 -5
- package/dist/mappers/render/pages.d.ts +0 -24
- package/dist/mappers/render/pages.js +0 -2
|
@@ -15,44 +15,44 @@ export declare const BuilderUIPageSerialisedSchema: v.SchemaWithPipe<readonly [v
|
|
|
15
15
|
readonly type: v.LiteralSchema<"page", undefined>;
|
|
16
16
|
readonly label: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
17
17
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
18
|
-
readonly id: v.StringSchema<undefined>;
|
|
19
|
-
readonly name: v.StringSchema<undefined>;
|
|
18
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
19
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
20
20
|
}, undefined>, v.ReadonlyAction<{
|
|
21
21
|
type: "parameter";
|
|
22
22
|
id: string;
|
|
23
23
|
name: string;
|
|
24
24
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
25
25
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
26
|
-
readonly id: v.StringSchema<undefined>;
|
|
26
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
27
27
|
}, undefined>, v.ReadonlyAction<{
|
|
28
28
|
type: "ref";
|
|
29
29
|
id: string;
|
|
30
|
-
}>]>, v.StringSchema<undefined>], undefined>;
|
|
30
|
+
}>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>;
|
|
31
31
|
readonly inputs: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
32
32
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
33
|
-
readonly id: v.StringSchema<undefined>;
|
|
34
|
-
readonly name: v.StringSchema<undefined>;
|
|
33
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
34
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
35
35
|
}, undefined>, v.ReadonlyAction<{
|
|
36
36
|
type: "parameter";
|
|
37
37
|
id: string;
|
|
38
38
|
name: string;
|
|
39
39
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
40
40
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
41
|
-
readonly id: v.StringSchema<undefined>;
|
|
41
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
42
42
|
}, undefined>, v.ReadonlyAction<{
|
|
43
43
|
type: "ref";
|
|
44
44
|
id: string;
|
|
45
45
|
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
46
46
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
47
|
-
readonly id: v.StringSchema<undefined>;
|
|
48
|
-
readonly name: v.StringSchema<undefined>;
|
|
47
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
48
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
49
49
|
}, undefined>, v.ReadonlyAction<{
|
|
50
50
|
type: "parameter";
|
|
51
51
|
id: string;
|
|
52
52
|
name: string;
|
|
53
53
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
54
54
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
55
|
-
readonly id: v.StringSchema<undefined>;
|
|
55
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
56
56
|
}, undefined>, v.ReadonlyAction<{
|
|
57
57
|
type: "ref";
|
|
58
58
|
id: string;
|
|
@@ -60,81 +60,96 @@ export declare const BuilderUIPageSerialisedSchema: v.SchemaWithPipe<readonly [v
|
|
|
60
60
|
readonly type: v.LiteralSchema<"input", undefined>;
|
|
61
61
|
readonly path: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
62
62
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
63
|
-
readonly id: v.StringSchema<undefined>;
|
|
64
|
-
readonly name: v.StringSchema<undefined>;
|
|
63
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
64
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
65
65
|
}, undefined>, v.ReadonlyAction<{
|
|
66
66
|
type: "parameter";
|
|
67
67
|
id: string;
|
|
68
68
|
name: string;
|
|
69
69
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
70
70
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
71
|
-
readonly id: v.StringSchema<undefined>;
|
|
71
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
72
72
|
}, undefined>, v.ReadonlyAction<{
|
|
73
73
|
type: "ref";
|
|
74
74
|
id: string;
|
|
75
|
-
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
75
|
+
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
76
76
|
readonly displayName: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
77
77
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
78
|
-
readonly id: v.StringSchema<undefined>;
|
|
79
|
-
readonly name: v.StringSchema<undefined>;
|
|
78
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
79
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
80
80
|
}, undefined>, v.ReadonlyAction<{
|
|
81
81
|
type: "parameter";
|
|
82
82
|
id: string;
|
|
83
83
|
name: string;
|
|
84
84
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
85
85
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
86
|
-
readonly id: v.StringSchema<undefined>;
|
|
86
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
87
87
|
}, undefined>, v.ReadonlyAction<{
|
|
88
88
|
type: "ref";
|
|
89
89
|
id: string;
|
|
90
|
-
}>]>, v.StringSchema<undefined>], undefined>, undefined>;
|
|
90
|
+
}>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>, undefined>;
|
|
91
91
|
readonly kind: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
92
92
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
93
|
-
readonly id: v.StringSchema<undefined>;
|
|
94
|
-
readonly name: v.StringSchema<undefined>;
|
|
93
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
94
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
95
95
|
}, undefined>, v.ReadonlyAction<{
|
|
96
96
|
type: "parameter";
|
|
97
97
|
id: string;
|
|
98
98
|
name: string;
|
|
99
99
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
100
100
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
101
|
-
readonly id: v.StringSchema<undefined>;
|
|
101
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
102
102
|
}, undefined>, v.ReadonlyAction<{
|
|
103
103
|
type: "ref";
|
|
104
104
|
id: string;
|
|
105
|
-
}>]>, v.StringSchema<undefined>], undefined>, undefined>;
|
|
105
|
+
}>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>, undefined>;
|
|
106
|
+
readonly placeholderLabel: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
107
|
+
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
108
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
109
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
110
|
+
}, undefined>, v.ReadonlyAction<{
|
|
111
|
+
type: "parameter";
|
|
112
|
+
id: string;
|
|
113
|
+
name: string;
|
|
114
|
+
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
115
|
+
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
116
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
117
|
+
}, undefined>, v.ReadonlyAction<{
|
|
118
|
+
type: "ref";
|
|
119
|
+
id: string;
|
|
120
|
+
}>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>, undefined>;
|
|
106
121
|
readonly metadata: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
107
122
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
108
|
-
readonly id: v.StringSchema<undefined>;
|
|
109
|
-
readonly name: v.StringSchema<undefined>;
|
|
123
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
124
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
110
125
|
}, undefined>, v.ReadonlyAction<{
|
|
111
126
|
type: "parameter";
|
|
112
127
|
id: string;
|
|
113
128
|
name: string;
|
|
114
129
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
115
130
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
116
|
-
readonly id: v.StringSchema<undefined>;
|
|
131
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
117
132
|
}, undefined>, v.ReadonlyAction<{
|
|
118
133
|
type: "ref";
|
|
119
134
|
id: string;
|
|
120
|
-
}>]>, v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
135
|
+
}>]>, v.SchemaWithPipe<readonly [v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
121
136
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
122
|
-
readonly id: v.StringSchema<undefined>;
|
|
123
|
-
readonly name: v.StringSchema<undefined>;
|
|
137
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
138
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
124
139
|
}, undefined>, v.ReadonlyAction<{
|
|
125
140
|
type: "parameter";
|
|
126
141
|
id: string;
|
|
127
142
|
name: string;
|
|
128
143
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
129
144
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
130
|
-
readonly id: v.StringSchema<undefined>;
|
|
145
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
131
146
|
}, undefined>, v.ReadonlyAction<{
|
|
132
147
|
type: "ref";
|
|
133
148
|
id: string;
|
|
134
149
|
}>]>, v.UnknownSchema], undefined>, undefined>, v.ReadonlyAction<{
|
|
135
150
|
[x: string]: unknown;
|
|
136
151
|
}>]>], undefined>, undefined>;
|
|
137
|
-
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
152
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
138
153
|
}, undefined>, v.ReadonlyAction<{
|
|
139
154
|
type: "input";
|
|
140
155
|
path: readonly (string | number)[] | Readonly<{
|
|
@@ -161,6 +176,14 @@ export declare const BuilderUIPageSerialisedSchema: v.SchemaWithPipe<readonly [v
|
|
|
161
176
|
type: "ref";
|
|
162
177
|
id: string;
|
|
163
178
|
}> | undefined;
|
|
179
|
+
placeholderLabel?: string | Readonly<{
|
|
180
|
+
type: "parameter";
|
|
181
|
+
id: string;
|
|
182
|
+
name: string;
|
|
183
|
+
}> | Readonly<{
|
|
184
|
+
type: "ref";
|
|
185
|
+
id: string;
|
|
186
|
+
}> | undefined;
|
|
164
187
|
metadata?: Readonly<{
|
|
165
188
|
type: "parameter";
|
|
166
189
|
id: string;
|
|
@@ -172,7 +195,7 @@ export declare const BuilderUIPageSerialisedSchema: v.SchemaWithPipe<readonly [v
|
|
|
172
195
|
[x: string]: unknown;
|
|
173
196
|
}> | undefined;
|
|
174
197
|
tags?: readonly string[] | undefined;
|
|
175
|
-
}>]>], undefined>, undefined>, v.
|
|
198
|
+
}>]>], undefined>, undefined>, v.MinLengthAction<(Readonly<{
|
|
176
199
|
type: "parameter";
|
|
177
200
|
id: string;
|
|
178
201
|
name: string;
|
|
@@ -205,6 +228,66 @@ export declare const BuilderUIPageSerialisedSchema: v.SchemaWithPipe<readonly [v
|
|
|
205
228
|
type: "ref";
|
|
206
229
|
id: string;
|
|
207
230
|
}> | undefined;
|
|
231
|
+
placeholderLabel?: string | Readonly<{
|
|
232
|
+
type: "parameter";
|
|
233
|
+
id: string;
|
|
234
|
+
name: string;
|
|
235
|
+
}> | Readonly<{
|
|
236
|
+
type: "ref";
|
|
237
|
+
id: string;
|
|
238
|
+
}> | undefined;
|
|
239
|
+
metadata?: Readonly<{
|
|
240
|
+
type: "parameter";
|
|
241
|
+
id: string;
|
|
242
|
+
name: string;
|
|
243
|
+
}> | Readonly<{
|
|
244
|
+
type: "ref";
|
|
245
|
+
id: string;
|
|
246
|
+
}> | Readonly<{
|
|
247
|
+
[x: string]: unknown;
|
|
248
|
+
}> | undefined;
|
|
249
|
+
tags?: readonly string[] | undefined;
|
|
250
|
+
}>)[], 1, undefined>, v.ReadonlyAction<(Readonly<{
|
|
251
|
+
type: "parameter";
|
|
252
|
+
id: string;
|
|
253
|
+
name: string;
|
|
254
|
+
}> | Readonly<{
|
|
255
|
+
type: "ref";
|
|
256
|
+
id: string;
|
|
257
|
+
}> | Readonly<{
|
|
258
|
+
type: "input";
|
|
259
|
+
path: readonly (string | number)[] | Readonly<{
|
|
260
|
+
type: "parameter";
|
|
261
|
+
id: string;
|
|
262
|
+
name: string;
|
|
263
|
+
}> | Readonly<{
|
|
264
|
+
type: "ref";
|
|
265
|
+
id: string;
|
|
266
|
+
}>;
|
|
267
|
+
displayName?: string | Readonly<{
|
|
268
|
+
type: "parameter";
|
|
269
|
+
id: string;
|
|
270
|
+
name: string;
|
|
271
|
+
}> | Readonly<{
|
|
272
|
+
type: "ref";
|
|
273
|
+
id: string;
|
|
274
|
+
}> | undefined;
|
|
275
|
+
kind?: string | Readonly<{
|
|
276
|
+
type: "parameter";
|
|
277
|
+
id: string;
|
|
278
|
+
name: string;
|
|
279
|
+
}> | Readonly<{
|
|
280
|
+
type: "ref";
|
|
281
|
+
id: string;
|
|
282
|
+
}> | undefined;
|
|
283
|
+
placeholderLabel?: string | Readonly<{
|
|
284
|
+
type: "parameter";
|
|
285
|
+
id: string;
|
|
286
|
+
name: string;
|
|
287
|
+
}> | Readonly<{
|
|
288
|
+
type: "ref";
|
|
289
|
+
id: string;
|
|
290
|
+
}> | undefined;
|
|
208
291
|
metadata?: Readonly<{
|
|
209
292
|
type: "parameter";
|
|
210
293
|
id: string;
|
|
@@ -217,7 +300,7 @@ export declare const BuilderUIPageSerialisedSchema: v.SchemaWithPipe<readonly [v
|
|
|
217
300
|
}> | undefined;
|
|
218
301
|
tags?: readonly string[] | undefined;
|
|
219
302
|
}>)[]>]>], undefined>;
|
|
220
|
-
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
303
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
221
304
|
}, undefined>, v.ReadonlyAction<{
|
|
222
305
|
type: "page";
|
|
223
306
|
label: string | Readonly<{
|
|
@@ -268,6 +351,14 @@ export declare const BuilderUIPageSerialisedSchema: v.SchemaWithPipe<readonly [v
|
|
|
268
351
|
type: "ref";
|
|
269
352
|
id: string;
|
|
270
353
|
}> | undefined;
|
|
354
|
+
placeholderLabel?: string | Readonly<{
|
|
355
|
+
type: "parameter";
|
|
356
|
+
id: string;
|
|
357
|
+
name: string;
|
|
358
|
+
}> | Readonly<{
|
|
359
|
+
type: "ref";
|
|
360
|
+
id: string;
|
|
361
|
+
}> | undefined;
|
|
271
362
|
metadata?: Readonly<{
|
|
272
363
|
type: "parameter";
|
|
273
364
|
id: string;
|
|
@@ -291,6 +382,7 @@ export declare const validateUIPage: (input: unknown, references?: import("..").
|
|
|
291
382
|
readonly path: readonly (string | number)[];
|
|
292
383
|
readonly displayName?: string | undefined;
|
|
293
384
|
readonly kind?: string | undefined;
|
|
385
|
+
readonly placeholderLabel?: string | undefined;
|
|
294
386
|
readonly metadata?: {
|
|
295
387
|
readonly [x: string]: unknown;
|
|
296
388
|
} | undefined;
|
package/dist/entities/ui/page.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
import { NameSchema } from '../../primitive.js';
|
|
2
3
|
import { isParamable, paramable } from '../../references.js';
|
|
3
4
|
import { createEntityValidator } from '../kind.js';
|
|
4
5
|
import { serialisable } from '../serialisable.js';
|
|
@@ -21,7 +22,7 @@ export class BuilderUIPage {
|
|
|
21
22
|
export const BuilderUIPageSchema = v.instance(BuilderUIPage);
|
|
22
23
|
export const BuilderUIPageSerialisedSchema = serialisable(v.object({
|
|
23
24
|
type: v.literal('page'),
|
|
24
|
-
label: paramable(
|
|
25
|
+
label: paramable(NameSchema),
|
|
25
26
|
inputs: paramable(BuilderUIInputsSerialisedSchema),
|
|
26
27
|
tags: v.optional(BuilderTagsSchema)
|
|
27
28
|
}));
|
|
@@ -28,15 +28,15 @@ export declare const BuilderUIPagesSerialisedSchema: v.GenericSchema<BuilderUIPa
|
|
|
28
28
|
export declare const BuilderUIItemSerialisedSchema: v.GenericSchema<BuilderUIItemSerialised>;
|
|
29
29
|
export declare const BuilderUIItemsSerialisedSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
30
30
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
31
|
-
readonly id: v.StringSchema<undefined>;
|
|
32
|
-
readonly name: v.StringSchema<undefined>;
|
|
31
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
32
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
33
33
|
}, undefined>, v.ReadonlyAction<{
|
|
34
34
|
type: "parameter";
|
|
35
35
|
id: string;
|
|
36
36
|
name: string;
|
|
37
37
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
38
38
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
39
|
-
readonly id: v.StringSchema<undefined>;
|
|
39
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
40
40
|
}, undefined>, v.ReadonlyAction<{
|
|
41
41
|
type: "ref";
|
|
42
42
|
id: string;
|
|
@@ -60,6 +60,7 @@ export declare const validateUIPages: (input: unknown, references?: import("..")
|
|
|
60
60
|
readonly path: readonly (string | number)[];
|
|
61
61
|
readonly displayName?: string | undefined;
|
|
62
62
|
readonly kind?: string | undefined;
|
|
63
|
+
readonly placeholderLabel?: string | undefined;
|
|
63
64
|
readonly metadata?: {
|
|
64
65
|
readonly [x: string]: unknown;
|
|
65
66
|
} | undefined;
|
|
@@ -74,6 +75,7 @@ export declare const validateUIPages: (input: unknown, references?: import("..")
|
|
|
74
75
|
readonly path: readonly (string | number)[];
|
|
75
76
|
readonly displayName?: string | undefined;
|
|
76
77
|
readonly kind?: string | undefined;
|
|
78
|
+
readonly placeholderLabel?: string | undefined;
|
|
77
79
|
readonly metadata?: {
|
|
78
80
|
readonly [x: string]: unknown;
|
|
79
81
|
} | undefined;
|
|
@@ -92,6 +94,7 @@ export declare const validateUIPages: (input: unknown, references?: import("..")
|
|
|
92
94
|
readonly path: readonly (string | number)[];
|
|
93
95
|
readonly displayName?: string | undefined;
|
|
94
96
|
readonly kind?: string | undefined;
|
|
97
|
+
readonly placeholderLabel?: string | undefined;
|
|
95
98
|
readonly metadata?: {
|
|
96
99
|
readonly [x: string]: unknown;
|
|
97
100
|
} | undefined;
|
|
@@ -106,6 +109,7 @@ export declare const validateUIPages: (input: unknown, references?: import("..")
|
|
|
106
109
|
readonly path: readonly (string | number)[];
|
|
107
110
|
readonly displayName?: string | undefined;
|
|
108
111
|
readonly kind?: string | undefined;
|
|
112
|
+
readonly placeholderLabel?: string | undefined;
|
|
109
113
|
readonly metadata?: {
|
|
110
114
|
readonly [x: string]: unknown;
|
|
111
115
|
} | undefined;
|
|
@@ -125,6 +129,7 @@ export declare const validateUIItems: (input: unknown, references?: import("..")
|
|
|
125
129
|
readonly path: readonly (string | number)[];
|
|
126
130
|
readonly displayName?: string | undefined;
|
|
127
131
|
readonly kind?: string | undefined;
|
|
132
|
+
readonly placeholderLabel?: string | undefined;
|
|
128
133
|
readonly metadata?: {
|
|
129
134
|
readonly [x: string]: unknown;
|
|
130
135
|
} | undefined;
|
|
@@ -139,6 +144,7 @@ export declare const validateUIItems: (input: unknown, references?: import("..")
|
|
|
139
144
|
readonly path: readonly (string | number)[];
|
|
140
145
|
readonly displayName?: string | undefined;
|
|
141
146
|
readonly kind?: string | undefined;
|
|
147
|
+
readonly placeholderLabel?: string | undefined;
|
|
142
148
|
readonly metadata?: {
|
|
143
149
|
readonly [x: string]: unknown;
|
|
144
150
|
} | undefined;
|
|
@@ -157,6 +163,7 @@ export declare const validateUIItems: (input: unknown, references?: import("..")
|
|
|
157
163
|
readonly path: readonly (string | number)[];
|
|
158
164
|
readonly displayName?: string | undefined;
|
|
159
165
|
readonly kind?: string | undefined;
|
|
166
|
+
readonly placeholderLabel?: string | undefined;
|
|
160
167
|
readonly metadata?: {
|
|
161
168
|
readonly [x: string]: unknown;
|
|
162
169
|
} | undefined;
|
|
@@ -171,6 +178,7 @@ export declare const validateUIItems: (input: unknown, references?: import("..")
|
|
|
171
178
|
readonly path: readonly (string | number)[];
|
|
172
179
|
readonly displayName?: string | undefined;
|
|
173
180
|
readonly kind?: string | undefined;
|
|
181
|
+
readonly placeholderLabel?: string | undefined;
|
|
174
182
|
readonly metadata?: {
|
|
175
183
|
readonly [x: string]: unknown;
|
|
176
184
|
} | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
import { NameSchema } from '../../primitive.js';
|
|
2
3
|
import { isParamable, paramable } from '../../references.js';
|
|
3
4
|
import { createEntityValidator } from '../kind.js';
|
|
4
5
|
import { serialisable } from '../serialisable.js';
|
|
@@ -24,8 +25,8 @@ export class BuilderUIPages {
|
|
|
24
25
|
export const BuilderUIPagesSchema = v.instance(BuilderUIPages);
|
|
25
26
|
export const BuilderUIPagesSerialisedSchema = serialisable(v.object({
|
|
26
27
|
type: v.literal('pages'),
|
|
27
|
-
name:
|
|
28
|
-
label: paramable(
|
|
28
|
+
name: NameSchema,
|
|
29
|
+
label: paramable(NameSchema),
|
|
29
30
|
items: paramable(v.lazy(() => BuilderUIItemsSerialisedSchema)),
|
|
30
31
|
tags: v.optional(BuilderTagsSchema)
|
|
31
32
|
}));
|
|
@@ -30,6 +30,7 @@ export type BuilderModelValidated = BuilderValidatedMap['model'];
|
|
|
30
30
|
export type BuilderPricingValidated = BuilderValidatedMap['pricing'];
|
|
31
31
|
export type BuilderUIValidated = BuilderValidatedMap['ui'];
|
|
32
32
|
export type BuilderUIDescribeValidated = BuilderValidatedMap['uiDescribe'];
|
|
33
|
+
export type BuilderUIInputValidated = BuilderValidatedMap['uiInput'];
|
|
33
34
|
export type BuilderUIItemsValidated = BuilderValidatedMap['uiItems'];
|
|
34
35
|
export type BuilderUIPageValidated = BuilderValidatedMap['uiPage'];
|
|
35
36
|
export type BuilderInstanceValidated = Prettify<Validated<BuilderInstance>>;
|
package/dist/entities/when.d.ts
CHANGED
|
@@ -43,37 +43,37 @@ export declare const BuilderWhenMatchSchema: v.ObjectSchema<{
|
|
|
43
43
|
readonly type: v.LiteralSchema<"match", undefined>;
|
|
44
44
|
readonly matchPath: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
45
45
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
46
|
-
readonly id: v.StringSchema<undefined>;
|
|
47
|
-
readonly name: v.StringSchema<undefined>;
|
|
46
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
47
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
48
48
|
}, undefined>, v.ReadonlyAction<{
|
|
49
49
|
type: "parameter";
|
|
50
50
|
id: string;
|
|
51
51
|
name: string;
|
|
52
52
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
53
53
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
54
|
-
readonly id: v.StringSchema<undefined>;
|
|
54
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
55
55
|
}, undefined>, v.ReadonlyAction<{
|
|
56
56
|
type: "ref";
|
|
57
57
|
id: string;
|
|
58
|
-
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
58
|
+
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
59
59
|
}, undefined>;
|
|
60
60
|
export declare const BuilderWhenUnlessSchema: v.ObjectSchema<{
|
|
61
61
|
readonly type: v.LiteralSchema<"unless", undefined>;
|
|
62
62
|
readonly unlessPath: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
63
63
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
64
|
-
readonly id: v.StringSchema<undefined>;
|
|
65
|
-
readonly name: v.StringSchema<undefined>;
|
|
64
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
65
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
66
66
|
}, undefined>, v.ReadonlyAction<{
|
|
67
67
|
type: "parameter";
|
|
68
68
|
id: string;
|
|
69
69
|
name: string;
|
|
70
70
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
71
71
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
72
|
-
readonly id: v.StringSchema<undefined>;
|
|
72
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
73
73
|
}, undefined>, v.ReadonlyAction<{
|
|
74
74
|
type: "ref";
|
|
75
75
|
id: string;
|
|
76
|
-
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
76
|
+
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
77
77
|
}, undefined>;
|
|
78
78
|
export declare const BuilderWhenConfigSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.ObjectSchema<{
|
|
79
79
|
readonly type: v.LiteralSchema<"enable", undefined>;
|
|
@@ -81,36 +81,36 @@ export declare const BuilderWhenConfigSchema: v.SchemaWithPipe<readonly [v.Varia
|
|
|
81
81
|
readonly type: v.LiteralSchema<"match", undefined>;
|
|
82
82
|
readonly matchPath: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
83
83
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
84
|
-
readonly id: v.StringSchema<undefined>;
|
|
85
|
-
readonly name: v.StringSchema<undefined>;
|
|
84
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
85
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
86
86
|
}, undefined>, v.ReadonlyAction<{
|
|
87
87
|
type: "parameter";
|
|
88
88
|
id: string;
|
|
89
89
|
name: string;
|
|
90
90
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
91
91
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
92
|
-
readonly id: v.StringSchema<undefined>;
|
|
92
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
93
93
|
}, undefined>, v.ReadonlyAction<{
|
|
94
94
|
type: "ref";
|
|
95
95
|
id: string;
|
|
96
|
-
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
96
|
+
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
97
97
|
}, undefined>, v.ObjectSchema<{
|
|
98
98
|
readonly type: v.LiteralSchema<"unless", undefined>;
|
|
99
99
|
readonly unlessPath: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
100
100
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
101
|
-
readonly id: v.StringSchema<undefined>;
|
|
102
|
-
readonly name: v.StringSchema<undefined>;
|
|
101
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
102
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
103
103
|
}, undefined>, v.ReadonlyAction<{
|
|
104
104
|
type: "parameter";
|
|
105
105
|
id: string;
|
|
106
106
|
name: string;
|
|
107
107
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
108
108
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
109
|
-
readonly id: v.StringSchema<undefined>;
|
|
109
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
110
110
|
}, undefined>, v.ReadonlyAction<{
|
|
111
111
|
type: "ref";
|
|
112
112
|
id: string;
|
|
113
|
-
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
113
|
+
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
114
114
|
}, undefined>], undefined>, v.ReadonlyAction<{
|
|
115
115
|
type: "enable";
|
|
116
116
|
} | {
|
package/dist/entities/when.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { check } from '../errors/index.js';
|
|
3
|
-
import { BuilderPrimitivesSchema } from '../primitive.js';
|
|
3
|
+
import { BuilderPrimitivesSchema, StringSchema } from '../primitive.js';
|
|
4
4
|
import { isParamable, paramable } from '../references.js';
|
|
5
5
|
import { BuilderPathSchema } from './paths.js';
|
|
6
6
|
export const BuilderWhenEnableSchema = v.object({
|
|
@@ -36,7 +36,7 @@ export function whenBranches(payload, schema) {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
export function createSelectMapSerialisedSchema(payloadSchema) {
|
|
39
|
-
return v.pipe(v.record(
|
|
39
|
+
return v.pipe(v.record(StringSchema, v.nullable(paramable(payloadSchema))), v.readonly());
|
|
40
40
|
}
|
|
41
41
|
export function createWhenSerialisedSchema(payloadSchema) {
|
|
42
42
|
const paramablePayload = paramable(payloadSchema);
|
package/dist/errors/errors.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ export declare class BuilderErrorsScope {
|
|
|
28
28
|
location: BuilderErrorLocation;
|
|
29
29
|
root: unknown;
|
|
30
30
|
} & object;
|
|
31
|
+
entityEmptyId(): {
|
|
32
|
+
kind: "entity-empty-id";
|
|
33
|
+
location: BuilderErrorLocation;
|
|
34
|
+
root: unknown;
|
|
35
|
+
} & object;
|
|
31
36
|
entityInvalidCollectionBounds(): {
|
|
32
37
|
kind: "entity-invalid-collection-bounds";
|
|
33
38
|
location: BuilderErrorLocation;
|
|
@@ -145,6 +150,11 @@ export declare class BuilderErrorsScope {
|
|
|
145
150
|
location: BuilderErrorLocation;
|
|
146
151
|
root: unknown;
|
|
147
152
|
} & object;
|
|
153
|
+
referenceInvalid(): {
|
|
154
|
+
kind: "reference-invalid";
|
|
155
|
+
location: BuilderErrorLocation;
|
|
156
|
+
root: unknown;
|
|
157
|
+
} & object;
|
|
148
158
|
instanceInvalidOption(): {
|
|
149
159
|
kind: "instance-invalid-option";
|
|
150
160
|
location: BuilderErrorLocation;
|
package/dist/errors/errors.js
CHANGED
|
@@ -29,6 +29,9 @@ export class BuilderErrorsScope {
|
|
|
29
29
|
entityEmptyName() {
|
|
30
30
|
return this.#addError('entity-empty-name');
|
|
31
31
|
}
|
|
32
|
+
entityEmptyId() {
|
|
33
|
+
return this.#addError('entity-empty-id');
|
|
34
|
+
}
|
|
32
35
|
entityInvalidCollectionBounds() {
|
|
33
36
|
return this.#addError('entity-invalid-collection-bounds');
|
|
34
37
|
}
|
|
@@ -98,6 +101,9 @@ export class BuilderErrorsScope {
|
|
|
98
101
|
referenceUnboundParameter() {
|
|
99
102
|
return this.#addError('reference-unbound-parameter');
|
|
100
103
|
}
|
|
104
|
+
referenceInvalid() {
|
|
105
|
+
return this.#addError('reference-invalid');
|
|
106
|
+
}
|
|
101
107
|
instanceInvalidOption() {
|
|
102
108
|
return this.#addError('instance-invalid-option');
|
|
103
109
|
}
|
package/dist/instance.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export type BuilderInstances = v.InferOutput<typeof BuilderInstancesSchema>;
|
|
|
9
9
|
export type BuilderInstanceInput = Readonly<Record<string, unknown>>;
|
|
10
10
|
export declare const BuilderComponentVariantSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
11
11
|
readonly instance: v.GenericSchema<BuilderInstance>;
|
|
12
|
-
readonly details: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>, undefined>;
|
|
13
|
-
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
12
|
+
readonly details: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>, undefined>;
|
|
13
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
14
14
|
}, undefined>, v.ReadonlyAction<{
|
|
15
15
|
instance: BuilderInstance;
|
|
16
16
|
details?: {
|
|
@@ -21,8 +21,8 @@ export declare const BuilderComponentVariantSchema: v.SchemaWithPipe<readonly [v
|
|
|
21
21
|
export type BuilderComponentVariant = v.InferOutput<typeof BuilderComponentVariantSchema>;
|
|
22
22
|
export declare const BuilderComponentVariantsSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
23
23
|
readonly instance: v.GenericSchema<BuilderInstance>;
|
|
24
|
-
readonly details: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>, undefined>;
|
|
25
|
-
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
24
|
+
readonly details: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>, undefined>;
|
|
25
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
26
26
|
}, undefined>, v.ReadonlyAction<{
|
|
27
27
|
instance: BuilderInstance;
|
|
28
28
|
details?: {
|
|
@@ -37,10 +37,10 @@ export declare const BuilderComponentVariantsSchema: v.SchemaWithPipe<readonly [
|
|
|
37
37
|
tags?: readonly string[] | undefined;
|
|
38
38
|
}>[]>]>;
|
|
39
39
|
export type BuilderComponentVariants = v.InferOutput<typeof BuilderComponentVariantsSchema>;
|
|
40
|
-
export declare const BuilderVariantsSchema: v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
40
|
+
export declare const BuilderVariantsSchema: v.SchemaWithPipe<readonly [v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
41
41
|
readonly instance: v.GenericSchema<BuilderInstance>;
|
|
42
|
-
readonly details: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>, undefined>;
|
|
43
|
-
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
42
|
+
readonly details: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>, undefined>;
|
|
43
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
44
44
|
}, undefined>, v.ReadonlyAction<{
|
|
45
45
|
instance: BuilderInstance;
|
|
46
46
|
details?: {
|
package/dist/instance.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { BuilderTagsSchema } from './entities/index.js';
|
|
3
|
-
import { BuilderPrimitiveSchema } from './primitive.js';
|
|
4
|
-
export const BuilderInstanceSchema = v.pipe(v.record(
|
|
3
|
+
import { BuilderPrimitiveSchema, NameSchema } from './primitive.js';
|
|
4
|
+
export const BuilderInstanceSchema = v.pipe(v.record(NameSchema, v.union([BuilderPrimitiveSchema, v.lazy(() => BuilderInstancesSchema)])), v.readonly());
|
|
5
5
|
export const BuilderInstancesSchema = v.pipe(v.array(BuilderInstanceSchema), v.readonly());
|
|
6
6
|
export const BuilderComponentVariantSchema = v.pipe(v.object({
|
|
7
7
|
instance: BuilderInstanceSchema,
|
|
8
|
-
details: v.optional(v.record(
|
|
8
|
+
details: v.optional(v.record(NameSchema, BuilderPrimitiveSchema)),
|
|
9
9
|
tags: v.optional(BuilderTagsSchema)
|
|
10
10
|
}), v.readonly());
|
|
11
11
|
export const BuilderComponentVariantsSchema = v.pipe(v.array(BuilderComponentVariantSchema), v.readonly());
|
|
12
|
-
export const BuilderVariantsSchema = v.pipe(v.record(
|
|
12
|
+
export const BuilderVariantsSchema = v.pipe(v.record(NameSchema, BuilderComponentVariantsSchema), v.readonly());
|
package/dist/mappers/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { BuilderOrder } from './order';
|
|
2
|
-
export type { BuilderRenderMetadata, BuilderRenderOption, BuilderRenderOptions, BuilderRenderPage, BuilderRenderPages, BuilderRenderResult
|
|
2
|
+
export type { BuilderRenderCollection, BuilderRenderCollectionAddRemove, BuilderRenderCollections, BuilderRenderMetadata, BuilderRenderOption, BuilderRenderOptions, BuilderRenderOptionUpdate, BuilderRenderPage, BuilderRenderPages, BuilderRenderResult } from './render/index';
|
|
3
3
|
export type { BuilderOptionGraph } from './variants/index';
|
|
4
4
|
export { createInstance } from './instance.js';
|
|
5
5
|
export { order } from './order.js';
|