@builder-builder/builder 0.0.28 → 0.0.29

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.
Files changed (77) hide show
  1. package/dist/bb.js +5 -6
  2. package/dist/client/schema.d.ts +49 -29
  3. package/dist/components/BuilderOption.svelte.d.ts +12 -12
  4. package/dist/components/BuilderOptionValueBoolean.svelte.d.ts +20 -0
  5. package/dist/components/BuilderOptionValueNumber.svelte.d.ts +21 -0
  6. package/dist/components/BuilderOptionValueSelect.svelte.d.ts +21 -0
  7. package/dist/components/BuilderOptionValueString.svelte.d.ts +21 -0
  8. package/dist/components/index.d.ts +8 -8
  9. package/dist/components/index.js +2479 -2435
  10. package/dist/components/index.min.js +3 -3
  11. package/dist/entities/collection/collection.d.ts +162 -372
  12. package/dist/entities/collection/collection.js +7 -4
  13. package/dist/entities/collection/{when.d.ts → condition.d.ts} +3 -4
  14. package/dist/entities/collection/condition.js +2 -0
  15. package/dist/entities/collection/config.d.ts +52 -70
  16. package/dist/entities/collection/index.d.ts +4 -4
  17. package/dist/entities/collection/index.js +2 -2
  18. package/dist/entities/component/component.d.ts +11 -23
  19. package/dist/entities/component/component.js +4 -4
  20. package/dist/entities/component/{when.d.ts → condition.d.ts} +3 -4
  21. package/dist/entities/component/{when.js → condition.js} +3 -9
  22. package/dist/entities/component/index.d.ts +4 -4
  23. package/dist/entities/component/index.js +2 -2
  24. package/dist/entities/{when.d.ts → condition.d.ts} +21 -34
  25. package/dist/entities/{when.js → condition.js} +20 -25
  26. package/dist/entities/expectation.d.ts +135 -3
  27. package/dist/entities/expectation.js +6 -2
  28. package/dist/entities/index.d.ts +8 -8
  29. package/dist/entities/index.js +4 -4
  30. package/dist/entities/kind.d.ts +1 -1
  31. package/dist/entities/kind.js +4 -5
  32. package/dist/entities/model/bind.d.ts +5 -5
  33. package/dist/entities/model/methods.d.ts +18 -27
  34. package/dist/entities/model/methods.js +4 -22
  35. package/dist/entities/model/model.d.ts +3 -1
  36. package/dist/entities/model/model.js +25 -27
  37. package/dist/entities/option/condition.d.ts +9 -0
  38. package/dist/entities/option/condition.js +2 -0
  39. package/dist/entities/option/config.d.ts +44 -69
  40. package/dist/entities/option/config.js +6 -6
  41. package/dist/entities/option/expectation.d.ts +6 -1
  42. package/dist/entities/option/expectation.js +2 -2
  43. package/dist/entities/option/index.d.ts +8 -8
  44. package/dist/entities/option/index.js +4 -4
  45. package/dist/entities/option/option.d.ts +171 -202
  46. package/dist/entities/option/option.js +4 -4
  47. package/dist/entities/option/select.d.ts +16 -43
  48. package/dist/entities/option/select.js +8 -31
  49. package/dist/entities/option/value.d.ts +73 -0
  50. package/dist/entities/option/value.js +99 -0
  51. package/dist/entities/references.d.ts +104 -64
  52. package/dist/entities/serialise.d.ts +147 -80
  53. package/dist/entities/serialise.js +26 -21
  54. package/dist/entities/ui/input.d.ts +1 -1
  55. package/dist/entities/validated.d.ts +1 -1
  56. package/dist/errors/errors.d.ts +8 -3
  57. package/dist/errors/errors.js +5 -2
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/mappers/dependencies.js +4 -3
  61. package/dist/mappers/resolve.js +23 -22
  62. package/dist/mappers/variants/option-graph.js +1 -1
  63. package/dist/public.d.ts +17 -17
  64. package/dist/public.js +17 -9
  65. package/dist/validate/expectations.js +21 -3
  66. package/dist/validate/model.js +8 -11
  67. package/dist/validate/resolve.js +14 -18
  68. package/package.json +1 -1
  69. package/dist/components/BuilderOptionSelect.svelte.d.ts +0 -21
  70. package/dist/components/BuilderOptionToggleBoolean.svelte.d.ts +0 -20
  71. package/dist/components/BuilderOptionToggleNumber.svelte.d.ts +0 -21
  72. package/dist/components/BuilderOptionToggleString.svelte.d.ts +0 -21
  73. package/dist/entities/collection/when.js +0 -2
  74. package/dist/entities/option/toggle.d.ts +0 -45
  75. package/dist/entities/option/toggle.js +0 -71
  76. package/dist/entities/option/when.d.ts +0 -10
  77. package/dist/entities/option/when.js +0 -2
@@ -2,11 +2,11 @@ import type { Paramable, ParamableSerialised } from '../../references';
2
2
  import type { BuilderModelState } from '../model/index';
3
3
  import type { BuilderPaths } from '../paths';
4
4
  import type { BuilderTags } from '../tags';
5
- import type { BuilderWhenSerialised } from '../when';
5
+ import type { BuilderConditionSerialised } from '../condition';
6
6
  import type { BuilderCollectionConfig, BuilderCollectionConfigSerialised } from './config';
7
- import type { BuilderCollectionWhen } from './when';
7
+ import type { BuilderCollectionCondition } from './condition';
8
8
  import * as v from 'valibot';
9
- export type BuilderCollectionPayload = BuilderCollectionConfig | BuilderCollectionWhen;
9
+ export type BuilderCollectionPayload = BuilderCollectionConfig | BuilderCollectionCondition;
10
10
  export declare class BuilderCollection<const Name extends string = string, const Payload extends Paramable<BuilderCollectionPayload> = Paramable<BuilderCollectionPayload>, const Paths extends Paramable<BuilderPaths> = Paramable<BuilderPaths>> {
11
11
  readonly type: 'collection';
12
12
  readonly name: Name;
@@ -18,7 +18,7 @@ export declare class BuilderCollection<const Name extends string = string, const
18
18
  }
19
19
  export declare const BuilderCollectionSchema: v.InstanceSchema<typeof BuilderCollection, undefined>;
20
20
  export type BuilderCollections = ReadonlyArray<BuilderCollection>;
21
- export declare const BuilderCollectionWhenSerialisedSchema: v.GenericSchema<BuilderWhenSerialised<Readonly<{
21
+ export declare const BuilderCollectionConditionSerialisedSchema: v.GenericSchema<BuilderConditionSerialised<Readonly<{
22
22
  model: Readonly<{
23
23
  type: "parameter";
24
24
  id: string;
@@ -45,7 +45,7 @@ export declare const BuilderCollectionWhenSerialisedSchema: v.GenericSchema<Buil
45
45
  }>;
46
46
  tags?: readonly string[] | undefined;
47
47
  }>>>;
48
- export type BuilderCollectionWhenSerialised = BuilderWhenSerialised<BuilderCollectionConfigSerialised>;
48
+ export type BuilderCollectionConditionSerialised = BuilderConditionSerialised<BuilderCollectionConfigSerialised>;
49
49
  export declare const BuilderCollectionSelectMapSerialisedSchema: v.GenericSchema<import("..").BuilderMatchSelectMap<Readonly<{
50
50
  type: "parameter";
51
51
  id: string;
@@ -80,226 +80,54 @@ export declare const BuilderCollectionSelectMapSerialisedSchema: v.GenericSchema
80
80
  export type BuilderCollectionSerialised = {
81
81
  readonly name: string;
82
82
  readonly paths?: ParamableSerialised<BuilderPaths>;
83
- readonly payload: ParamableSerialised<BuilderCollectionConfigSerialised | BuilderCollectionWhenSerialised>;
83
+ readonly payload: ParamableSerialised<BuilderCollectionConfigSerialised | BuilderCollectionConditionSerialised>;
84
84
  readonly tags?: BuilderTags;
85
85
  };
86
86
  export declare const BuilderCollectionSerialisedSchema: v.GenericSchema<BuilderCollectionSerialised>;
87
87
  export declare const BuilderCollectionsSerialisedSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.GenericSchema<BuilderCollectionSerialised>, undefined>, v.ReadonlyAction<BuilderCollectionSerialised[]>]>;
88
88
  export type BuilderCollectionsSerialised = ReadonlyArray<BuilderCollectionSerialised>;
89
- export declare const validateCollectionWhen: (input: unknown, references?: import("..").BuilderReferences, issues?: import("../../errors").BuilderIssuesScope) => import("..").ValidationResult<{
90
- readonly type: "enable";
91
- readonly payload: {
92
- readonly model: {
93
- readonly models: readonly (/*elided*/ any & import("../../validate").BuilderValidatedBrand)[];
94
- readonly options: readonly {
95
- readonly name: string;
96
- readonly payload: {
97
- readonly type: "enable";
89
+ export declare const validateCollectionCondition: (input: unknown, references?: import("..").BuilderReferences, issues?: import("../../errors").BuilderIssuesScope) => import("..").ValidationResult<{
90
+ readonly type: "match";
91
+ readonly matchPath: readonly (string | number)[];
92
+ readonly selectMap: {
93
+ readonly [x: string]: {
94
+ readonly model: {
95
+ readonly models: readonly (/*elided*/ any & import("../../validate").BuilderValidatedBrand)[];
96
+ readonly options: readonly {
97
+ readonly name: string;
98
98
  readonly payload: {
99
- readonly type: "select";
100
- readonly options: readonly [string, ...string[]];
101
- readonly defaultValue: string | null;
102
- readonly isOptional: boolean;
103
- readonly optionLabels: {
104
- readonly [x: string]: string;
105
- } & import("../../validate").BuilderValidatedBrand;
106
- readonly tags?: readonly string[] | undefined;
107
- } | {
108
- readonly type: "toggle";
109
99
  readonly kind: "string" | "number" | "boolean";
100
+ readonly type: "value";
110
101
  readonly defaultValue: string | number | boolean | null;
111
102
  readonly isOptional: boolean;
112
103
  readonly tags?: readonly string[] | undefined;
113
- };
114
- } | {
115
- readonly type: "match";
116
- readonly matchPath: readonly (string | number)[];
117
- readonly selectMap: {
118
- readonly [x: string]: {
119
- readonly type: "select";
120
- readonly options: readonly [string, ...string[]];
121
- readonly defaultValue: string | null;
122
- readonly isOptional: boolean;
123
- readonly optionLabels: {
124
- readonly [x: string]: string;
125
- } & import("../../validate").BuilderValidatedBrand;
126
- readonly tags?: readonly string[] | undefined;
127
- } | {
128
- readonly type: "toggle";
129
- readonly kind: "string" | "number" | "boolean";
130
- readonly defaultValue: string | number | boolean | null;
131
- readonly isOptional: boolean;
132
- readonly tags?: readonly string[] | undefined;
133
- } | null;
134
- };
135
- } | {
136
- readonly type: "unless";
137
- readonly unlessPath: readonly (string | number)[];
138
- readonly disabledValues: readonly (string | number | boolean | null)[];
139
- readonly payload: {
140
- readonly type: "select";
104
+ } | {
105
+ readonly kind: "select";
141
106
  readonly options: readonly [string, ...string[]];
142
- readonly defaultValue: string | null;
143
- readonly isOptional: boolean;
144
- readonly optionLabels: {
107
+ readonly optionLabels?: ({
145
108
  readonly [x: string]: string;
146
- } & import("../../validate").BuilderValidatedBrand;
147
- readonly tags?: readonly string[] | undefined;
148
- } | {
149
- readonly type: "toggle";
150
- readonly kind: "string" | "number" | "boolean";
109
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
110
+ readonly type: "value";
151
111
  readonly defaultValue: string | number | boolean | null;
152
112
  readonly isOptional: boolean;
153
113
  readonly tags?: readonly string[] | undefined;
154
- };
155
- } | {
156
- readonly type: "select";
157
- readonly options: readonly [string, ...string[]];
158
- readonly defaultValue: string | null;
159
- readonly isOptional: boolean;
160
- readonly optionLabels: {
161
- readonly [x: string]: string;
162
- } & import("../../validate").BuilderValidatedBrand;
163
- readonly tags?: readonly string[] | undefined;
164
- } | {
165
- readonly type: "toggle";
166
- readonly kind: "string" | "number" | "boolean";
167
- readonly defaultValue: string | number | boolean | null;
168
- readonly isOptional: boolean;
169
- readonly tags?: readonly string[] | undefined;
170
- };
171
- readonly paths?: readonly (readonly (string | number)[])[] | undefined;
172
- readonly tags?: readonly string[] | undefined;
173
- }[];
174
- readonly components: readonly {
175
- readonly name: string;
176
- readonly payload: {
177
- readonly details: readonly {
178
- readonly type: "component-detail";
179
- readonly name: string;
180
- readonly kind: "string" | "number" | "boolean" | "price" | "image";
181
- readonly isOptional: boolean;
182
- readonly tags?: readonly string[] | undefined;
183
- }[];
184
- readonly tags?: readonly string[] | undefined;
185
- } | {
186
- readonly type: "enable";
187
- readonly payload: {
188
- readonly details: readonly {
189
- readonly type: "component-detail";
190
- readonly name: string;
191
- readonly kind: "string" | "number" | "boolean" | "price" | "image";
192
- readonly isOptional: boolean;
193
- readonly tags?: readonly string[] | undefined;
194
- }[];
195
- readonly tags?: readonly string[] | undefined;
196
- };
197
- } | {
198
- readonly type: "match";
199
- readonly matchPath: readonly (string | number)[];
200
- readonly selectMap: {
201
- readonly [x: string]: {
202
- readonly details: readonly {
203
- readonly type: "component-detail";
204
- readonly name: string;
205
- readonly kind: "string" | "number" | "boolean" | "price" | "image";
206
- readonly isOptional: boolean;
207
- readonly tags?: readonly string[] | undefined;
208
- }[];
209
- readonly tags?: readonly string[] | undefined;
210
- } | null;
211
- };
212
- } | {
213
- readonly type: "unless";
214
- readonly unlessPath: readonly (string | number)[];
215
- readonly disabledValues: readonly (string | number | boolean | null)[];
216
- readonly payload: {
217
- readonly details: readonly {
218
- readonly type: "component-detail";
219
- readonly name: string;
220
- readonly kind: "string" | "number" | "boolean" | "price" | "image";
221
- readonly isOptional: boolean;
222
- readonly tags?: readonly string[] | undefined;
223
- }[];
224
- readonly tags?: readonly string[] | undefined;
225
- };
226
- };
227
- readonly paths?: readonly (readonly (string | number)[])[] | undefined;
228
- readonly tags?: readonly string[] | undefined;
229
- }[];
230
- readonly collections: readonly {
231
- readonly name: string;
232
- readonly paths?: readonly (readonly (string | number)[])[] | undefined;
233
- readonly payload: /*elided*/ any | {
234
- readonly type: "enable";
235
- readonly payload: /*elided*/ any;
236
- } | {
237
- readonly type: "match";
238
- readonly matchPath: readonly (string | number)[];
239
- readonly selectMap: {
240
- readonly [x: string]: /*elided*/ any | null;
241
- };
242
- } | {
243
- readonly type: "unless";
244
- readonly unlessPath: readonly (string | number)[];
245
- readonly disabledValues: readonly (string | number | boolean | null)[];
246
- readonly payload: /*elided*/ any;
247
- };
248
- readonly tags?: readonly string[] | undefined;
249
- }[];
250
- readonly expectations: readonly ({
251
- readonly name: string;
252
- readonly kind: "option" | "component" | "collection";
253
- } & import("../../validate").BuilderValidatedBrand)[];
254
- readonly tags?: readonly string[] | undefined;
255
- } & import("../../validate").BuilderValidatedBrand;
256
- readonly min: number;
257
- readonly max: number;
258
- readonly tags?: readonly string[] | undefined;
259
- };
260
- } | {
261
- readonly type: "match";
262
- readonly matchPath: readonly (string | number)[];
263
- readonly selectMap: {
264
- readonly [x: string]: {
265
- readonly model: {
266
- readonly models: readonly (/*elided*/ any & import("../../validate").BuilderValidatedBrand)[];
267
- readonly options: readonly {
268
- readonly name: string;
269
- readonly payload: {
270
- readonly type: "enable";
271
- readonly payload: {
272
- readonly type: "select";
273
- readonly options: readonly [string, ...string[]];
274
- readonly defaultValue: string | null;
275
- readonly isOptional: boolean;
276
- readonly optionLabels: {
277
- readonly [x: string]: string;
278
- } & import("../../validate").BuilderValidatedBrand;
279
- readonly tags?: readonly string[] | undefined;
280
- } | {
281
- readonly type: "toggle";
282
- readonly kind: "string" | "number" | "boolean";
283
- readonly defaultValue: string | number | boolean | null;
284
- readonly isOptional: boolean;
285
- readonly tags?: readonly string[] | undefined;
286
- };
287
114
  } | {
288
115
  readonly type: "match";
289
116
  readonly matchPath: readonly (string | number)[];
290
117
  readonly selectMap: {
291
118
  readonly [x: string]: {
292
- readonly type: "select";
293
- readonly options: readonly [string, ...string[]];
294
- readonly defaultValue: string | null;
119
+ readonly kind: "string" | "number" | "boolean";
120
+ readonly type: "value";
121
+ readonly defaultValue: string | number | boolean | null;
295
122
  readonly isOptional: boolean;
296
- readonly optionLabels: {
297
- readonly [x: string]: string;
298
- } & import("../../validate").BuilderValidatedBrand;
299
123
  readonly tags?: readonly string[] | undefined;
300
124
  } | {
301
- readonly type: "toggle";
302
- readonly kind: "string" | "number" | "boolean";
125
+ readonly kind: "select";
126
+ readonly options: readonly [string, ...string[]];
127
+ readonly optionLabels?: ({
128
+ readonly [x: string]: string;
129
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
130
+ readonly type: "value";
303
131
  readonly defaultValue: string | number | boolean | null;
304
132
  readonly isOptional: boolean;
305
133
  readonly tags?: readonly string[] | undefined;
@@ -310,36 +138,22 @@ export declare const validateCollectionWhen: (input: unknown, references?: impor
310
138
  readonly unlessPath: readonly (string | number)[];
311
139
  readonly disabledValues: readonly (string | number | boolean | null)[];
312
140
  readonly payload: {
313
- readonly type: "select";
314
- readonly options: readonly [string, ...string[]];
315
- readonly defaultValue: string | null;
141
+ readonly kind: "string" | "number" | "boolean";
142
+ readonly type: "value";
143
+ readonly defaultValue: string | number | boolean | null;
316
144
  readonly isOptional: boolean;
317
- readonly optionLabels: {
318
- readonly [x: string]: string;
319
- } & import("../../validate").BuilderValidatedBrand;
320
145
  readonly tags?: readonly string[] | undefined;
321
146
  } | {
322
- readonly type: "toggle";
323
- readonly kind: "string" | "number" | "boolean";
147
+ readonly kind: "select";
148
+ readonly options: readonly [string, ...string[]];
149
+ readonly optionLabels?: ({
150
+ readonly [x: string]: string;
151
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
152
+ readonly type: "value";
324
153
  readonly defaultValue: string | number | boolean | null;
325
154
  readonly isOptional: boolean;
326
155
  readonly tags?: readonly string[] | undefined;
327
156
  };
328
- } | {
329
- readonly type: "select";
330
- readonly options: readonly [string, ...string[]];
331
- readonly defaultValue: string | null;
332
- readonly isOptional: boolean;
333
- readonly optionLabels: {
334
- readonly [x: string]: string;
335
- } & import("../../validate").BuilderValidatedBrand;
336
- readonly tags?: readonly string[] | undefined;
337
- } | {
338
- readonly type: "toggle";
339
- readonly kind: "string" | "number" | "boolean";
340
- readonly defaultValue: string | number | boolean | null;
341
- readonly isOptional: boolean;
342
- readonly tags?: readonly string[] | undefined;
343
157
  };
344
158
  readonly paths?: readonly (readonly (string | number)[])[] | undefined;
345
159
  readonly tags?: readonly string[] | undefined;
@@ -355,18 +169,6 @@ export declare const validateCollectionWhen: (input: unknown, references?: impor
355
169
  readonly tags?: readonly string[] | undefined;
356
170
  }[];
357
171
  readonly tags?: readonly string[] | undefined;
358
- } | {
359
- readonly type: "enable";
360
- readonly payload: {
361
- readonly details: readonly {
362
- readonly type: "component-detail";
363
- readonly name: string;
364
- readonly kind: "string" | "number" | "boolean" | "price" | "image";
365
- readonly isOptional: boolean;
366
- readonly tags?: readonly string[] | undefined;
367
- }[];
368
- readonly tags?: readonly string[] | undefined;
369
- };
370
172
  } | {
371
173
  readonly type: "match";
372
174
  readonly matchPath: readonly (string | number)[];
@@ -404,9 +206,6 @@ export declare const validateCollectionWhen: (input: unknown, references?: impor
404
206
  readonly name: string;
405
207
  readonly paths?: readonly (readonly (string | number)[])[] | undefined;
406
208
  readonly payload: /*elided*/ any | {
407
- readonly type: "enable";
408
- readonly payload: /*elided*/ any;
409
- } | {
410
209
  readonly type: "match";
411
210
  readonly matchPath: readonly (string | number)[];
412
211
  readonly selectMap: /*elided*/ any;
@@ -418,10 +217,27 @@ export declare const validateCollectionWhen: (input: unknown, references?: impor
418
217
  };
419
218
  readonly tags?: readonly string[] | undefined;
420
219
  }[];
421
- readonly expectations: readonly ({
220
+ readonly expectations: readonly {
422
221
  readonly name: string;
423
222
  readonly kind: "option" | "component" | "collection";
424
- } & import("../../validate").BuilderValidatedBrand)[];
223
+ readonly payload?: {
224
+ readonly kind: "string" | "number" | "boolean";
225
+ readonly type: "value";
226
+ readonly defaultValue: string | number | boolean | null;
227
+ readonly isOptional: boolean;
228
+ readonly tags?: readonly string[] | undefined;
229
+ } | {
230
+ readonly kind: "select";
231
+ readonly options: readonly [string, ...string[]];
232
+ readonly optionLabels?: ({
233
+ readonly [x: string]: string;
234
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
235
+ readonly type: "value";
236
+ readonly defaultValue: string | number | boolean | null;
237
+ readonly isOptional: boolean;
238
+ readonly tags?: readonly string[] | undefined;
239
+ } | undefined;
240
+ }[];
425
241
  readonly tags?: readonly string[] | undefined;
426
242
  } & import("../../validate").BuilderValidatedBrand;
427
243
  readonly min: number;
@@ -439,39 +255,38 @@ export declare const validateCollectionWhen: (input: unknown, references?: impor
439
255
  readonly options: readonly {
440
256
  readonly name: string;
441
257
  readonly payload: {
442
- readonly type: "enable";
443
- readonly payload: {
444
- readonly type: "select";
445
- readonly options: readonly [string, ...string[]];
446
- readonly defaultValue: string | null;
447
- readonly isOptional: boolean;
448
- readonly optionLabels: {
449
- readonly [x: string]: string;
450
- } & import("../../validate").BuilderValidatedBrand;
451
- readonly tags?: readonly string[] | undefined;
452
- } | {
453
- readonly type: "toggle";
454
- readonly kind: "string" | "number" | "boolean";
455
- readonly defaultValue: string | number | boolean | null;
456
- readonly isOptional: boolean;
457
- readonly tags?: readonly string[] | undefined;
458
- };
258
+ readonly kind: "string" | "number" | "boolean";
259
+ readonly type: "value";
260
+ readonly defaultValue: string | number | boolean | null;
261
+ readonly isOptional: boolean;
262
+ readonly tags?: readonly string[] | undefined;
263
+ } | {
264
+ readonly kind: "select";
265
+ readonly options: readonly [string, ...string[]];
266
+ readonly optionLabels?: ({
267
+ readonly [x: string]: string;
268
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
269
+ readonly type: "value";
270
+ readonly defaultValue: string | number | boolean | null;
271
+ readonly isOptional: boolean;
272
+ readonly tags?: readonly string[] | undefined;
459
273
  } | {
460
274
  readonly type: "match";
461
275
  readonly matchPath: readonly (string | number)[];
462
276
  readonly selectMap: {
463
277
  readonly [x: string]: {
464
- readonly type: "select";
465
- readonly options: readonly [string, ...string[]];
466
- readonly defaultValue: string | null;
278
+ readonly kind: "string" | "number" | "boolean";
279
+ readonly type: "value";
280
+ readonly defaultValue: string | number | boolean | null;
467
281
  readonly isOptional: boolean;
468
- readonly optionLabels: {
469
- readonly [x: string]: string;
470
- } & import("../../validate").BuilderValidatedBrand;
471
282
  readonly tags?: readonly string[] | undefined;
472
283
  } | {
473
- readonly type: "toggle";
474
- readonly kind: "string" | "number" | "boolean";
284
+ readonly kind: "select";
285
+ readonly options: readonly [string, ...string[]];
286
+ readonly optionLabels?: ({
287
+ readonly [x: string]: string;
288
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
289
+ readonly type: "value";
475
290
  readonly defaultValue: string | number | boolean | null;
476
291
  readonly isOptional: boolean;
477
292
  readonly tags?: readonly string[] | undefined;
@@ -482,36 +297,22 @@ export declare const validateCollectionWhen: (input: unknown, references?: impor
482
297
  readonly unlessPath: readonly (string | number)[];
483
298
  readonly disabledValues: readonly (string | number | boolean | null)[];
484
299
  readonly payload: {
485
- readonly type: "select";
486
- readonly options: readonly [string, ...string[]];
487
- readonly defaultValue: string | null;
300
+ readonly kind: "string" | "number" | "boolean";
301
+ readonly type: "value";
302
+ readonly defaultValue: string | number | boolean | null;
488
303
  readonly isOptional: boolean;
489
- readonly optionLabels: {
490
- readonly [x: string]: string;
491
- } & import("../../validate").BuilderValidatedBrand;
492
304
  readonly tags?: readonly string[] | undefined;
493
305
  } | {
494
- readonly type: "toggle";
495
- readonly kind: "string" | "number" | "boolean";
306
+ readonly kind: "select";
307
+ readonly options: readonly [string, ...string[]];
308
+ readonly optionLabels?: ({
309
+ readonly [x: string]: string;
310
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
311
+ readonly type: "value";
496
312
  readonly defaultValue: string | number | boolean | null;
497
313
  readonly isOptional: boolean;
498
314
  readonly tags?: readonly string[] | undefined;
499
315
  };
500
- } | {
501
- readonly type: "select";
502
- readonly options: readonly [string, ...string[]];
503
- readonly defaultValue: string | null;
504
- readonly isOptional: boolean;
505
- readonly optionLabels: {
506
- readonly [x: string]: string;
507
- } & import("../../validate").BuilderValidatedBrand;
508
- readonly tags?: readonly string[] | undefined;
509
- } | {
510
- readonly type: "toggle";
511
- readonly kind: "string" | "number" | "boolean";
512
- readonly defaultValue: string | number | boolean | null;
513
- readonly isOptional: boolean;
514
- readonly tags?: readonly string[] | undefined;
515
316
  };
516
317
  readonly paths?: readonly (readonly (string | number)[])[] | undefined;
517
318
  readonly tags?: readonly string[] | undefined;
@@ -527,18 +328,6 @@ export declare const validateCollectionWhen: (input: unknown, references?: impor
527
328
  readonly tags?: readonly string[] | undefined;
528
329
  }[];
529
330
  readonly tags?: readonly string[] | undefined;
530
- } | {
531
- readonly type: "enable";
532
- readonly payload: {
533
- readonly details: readonly {
534
- readonly type: "component-detail";
535
- readonly name: string;
536
- readonly kind: "string" | "number" | "boolean" | "price" | "image";
537
- readonly isOptional: boolean;
538
- readonly tags?: readonly string[] | undefined;
539
- }[];
540
- readonly tags?: readonly string[] | undefined;
541
- };
542
331
  } | {
543
332
  readonly type: "match";
544
333
  readonly matchPath: readonly (string | number)[];
@@ -576,9 +365,6 @@ export declare const validateCollectionWhen: (input: unknown, references?: impor
576
365
  readonly name: string;
577
366
  readonly paths?: readonly (readonly (string | number)[])[] | undefined;
578
367
  readonly payload: /*elided*/ any | {
579
- readonly type: "enable";
580
- readonly payload: /*elided*/ any;
581
- } | {
582
368
  readonly type: "match";
583
369
  readonly matchPath: readonly (string | number)[];
584
370
  readonly selectMap: {
@@ -592,10 +378,27 @@ export declare const validateCollectionWhen: (input: unknown, references?: impor
592
378
  };
593
379
  readonly tags?: readonly string[] | undefined;
594
380
  }[];
595
- readonly expectations: readonly ({
381
+ readonly expectations: readonly {
596
382
  readonly name: string;
597
383
  readonly kind: "option" | "component" | "collection";
598
- } & import("../../validate").BuilderValidatedBrand)[];
384
+ readonly payload?: {
385
+ readonly kind: "string" | "number" | "boolean";
386
+ readonly type: "value";
387
+ readonly defaultValue: string | number | boolean | null;
388
+ readonly isOptional: boolean;
389
+ readonly tags?: readonly string[] | undefined;
390
+ } | {
391
+ readonly kind: "select";
392
+ readonly options: readonly [string, ...string[]];
393
+ readonly optionLabels?: ({
394
+ readonly [x: string]: string;
395
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
396
+ readonly type: "value";
397
+ readonly defaultValue: string | number | boolean | null;
398
+ readonly isOptional: boolean;
399
+ readonly tags?: readonly string[] | undefined;
400
+ } | undefined;
401
+ }[];
599
402
  readonly tags?: readonly string[] | undefined;
600
403
  } & import("../../validate").BuilderValidatedBrand;
601
404
  readonly min: number;
@@ -610,39 +413,38 @@ export declare const validateCollectionSelectMap: (input: unknown, references?:
610
413
  readonly options: readonly {
611
414
  readonly name: string;
612
415
  readonly payload: {
613
- readonly type: "enable";
614
- readonly payload: {
615
- readonly type: "select";
616
- readonly options: readonly [string, ...string[]];
617
- readonly defaultValue: string | null;
618
- readonly isOptional: boolean;
619
- readonly optionLabels: {
620
- readonly [x: string]: string;
621
- } & import("../../validate").BuilderValidatedBrand;
622
- readonly tags?: readonly string[] | undefined;
623
- } | {
624
- readonly type: "toggle";
625
- readonly kind: "string" | "number" | "boolean";
626
- readonly defaultValue: string | number | boolean | null;
627
- readonly isOptional: boolean;
628
- readonly tags?: readonly string[] | undefined;
629
- };
416
+ readonly kind: "string" | "number" | "boolean";
417
+ readonly type: "value";
418
+ readonly defaultValue: string | number | boolean | null;
419
+ readonly isOptional: boolean;
420
+ readonly tags?: readonly string[] | undefined;
421
+ } | {
422
+ readonly kind: "select";
423
+ readonly options: readonly [string, ...string[]];
424
+ readonly optionLabels?: ({
425
+ readonly [x: string]: string;
426
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
427
+ readonly type: "value";
428
+ readonly defaultValue: string | number | boolean | null;
429
+ readonly isOptional: boolean;
430
+ readonly tags?: readonly string[] | undefined;
630
431
  } | {
631
432
  readonly type: "match";
632
433
  readonly matchPath: readonly (string | number)[];
633
434
  readonly selectMap: {
634
435
  readonly [x: string]: {
635
- readonly type: "select";
636
- readonly options: readonly [string, ...string[]];
637
- readonly defaultValue: string | null;
436
+ readonly kind: "string" | "number" | "boolean";
437
+ readonly type: "value";
438
+ readonly defaultValue: string | number | boolean | null;
638
439
  readonly isOptional: boolean;
639
- readonly optionLabels: {
640
- readonly [x: string]: string;
641
- } & import("../../validate").BuilderValidatedBrand;
642
440
  readonly tags?: readonly string[] | undefined;
643
441
  } | {
644
- readonly type: "toggle";
645
- readonly kind: "string" | "number" | "boolean";
442
+ readonly kind: "select";
443
+ readonly options: readonly [string, ...string[]];
444
+ readonly optionLabels?: ({
445
+ readonly [x: string]: string;
446
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
447
+ readonly type: "value";
646
448
  readonly defaultValue: string | number | boolean | null;
647
449
  readonly isOptional: boolean;
648
450
  readonly tags?: readonly string[] | undefined;
@@ -653,36 +455,22 @@ export declare const validateCollectionSelectMap: (input: unknown, references?:
653
455
  readonly unlessPath: readonly (string | number)[];
654
456
  readonly disabledValues: readonly (string | number | boolean | null)[];
655
457
  readonly payload: {
656
- readonly type: "select";
657
- readonly options: readonly [string, ...string[]];
658
- readonly defaultValue: string | null;
458
+ readonly kind: "string" | "number" | "boolean";
459
+ readonly type: "value";
460
+ readonly defaultValue: string | number | boolean | null;
659
461
  readonly isOptional: boolean;
660
- readonly optionLabels: {
661
- readonly [x: string]: string;
662
- } & import("../../validate").BuilderValidatedBrand;
663
462
  readonly tags?: readonly string[] | undefined;
664
463
  } | {
665
- readonly type: "toggle";
666
- readonly kind: "string" | "number" | "boolean";
464
+ readonly kind: "select";
465
+ readonly options: readonly [string, ...string[]];
466
+ readonly optionLabels?: ({
467
+ readonly [x: string]: string;
468
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
469
+ readonly type: "value";
667
470
  readonly defaultValue: string | number | boolean | null;
668
471
  readonly isOptional: boolean;
669
472
  readonly tags?: readonly string[] | undefined;
670
473
  };
671
- } | {
672
- readonly type: "select";
673
- readonly options: readonly [string, ...string[]];
674
- readonly defaultValue: string | null;
675
- readonly isOptional: boolean;
676
- readonly optionLabels: {
677
- readonly [x: string]: string;
678
- } & import("../../validate").BuilderValidatedBrand;
679
- readonly tags?: readonly string[] | undefined;
680
- } | {
681
- readonly type: "toggle";
682
- readonly kind: "string" | "number" | "boolean";
683
- readonly defaultValue: string | number | boolean | null;
684
- readonly isOptional: boolean;
685
- readonly tags?: readonly string[] | undefined;
686
474
  };
687
475
  readonly paths?: readonly (readonly (string | number)[])[] | undefined;
688
476
  readonly tags?: readonly string[] | undefined;
@@ -698,18 +486,6 @@ export declare const validateCollectionSelectMap: (input: unknown, references?:
698
486
  readonly tags?: readonly string[] | undefined;
699
487
  }[];
700
488
  readonly tags?: readonly string[] | undefined;
701
- } | {
702
- readonly type: "enable";
703
- readonly payload: {
704
- readonly details: readonly {
705
- readonly type: "component-detail";
706
- readonly name: string;
707
- readonly kind: "string" | "number" | "boolean" | "price" | "image";
708
- readonly isOptional: boolean;
709
- readonly tags?: readonly string[] | undefined;
710
- }[];
711
- readonly tags?: readonly string[] | undefined;
712
- };
713
489
  } | {
714
490
  readonly type: "match";
715
491
  readonly matchPath: readonly (string | number)[];
@@ -747,9 +523,6 @@ export declare const validateCollectionSelectMap: (input: unknown, references?:
747
523
  readonly name: string;
748
524
  readonly paths?: readonly (readonly (string | number)[])[] | undefined;
749
525
  readonly payload: /*elided*/ any | {
750
- readonly type: "enable";
751
- readonly payload: /*elided*/ any;
752
- } | {
753
526
  readonly type: "match";
754
527
  readonly matchPath: readonly (string | number)[];
755
528
  readonly selectMap: {
@@ -763,10 +536,27 @@ export declare const validateCollectionSelectMap: (input: unknown, references?:
763
536
  };
764
537
  readonly tags?: readonly string[] | undefined;
765
538
  }[];
766
- readonly expectations: readonly ({
539
+ readonly expectations: readonly {
767
540
  readonly name: string;
768
541
  readonly kind: "option" | "component" | "collection";
769
- } & import("../../validate").BuilderValidatedBrand)[];
542
+ readonly payload?: {
543
+ readonly kind: "string" | "number" | "boolean";
544
+ readonly type: "value";
545
+ readonly defaultValue: string | number | boolean | null;
546
+ readonly isOptional: boolean;
547
+ readonly tags?: readonly string[] | undefined;
548
+ } | {
549
+ readonly kind: "select";
550
+ readonly options: readonly [string, ...string[]];
551
+ readonly optionLabels?: ({
552
+ readonly [x: string]: string;
553
+ } & import("../../validate").BuilderValidatedBrand) | undefined;
554
+ readonly type: "value";
555
+ readonly defaultValue: string | number | boolean | null;
556
+ readonly isOptional: boolean;
557
+ readonly tags?: readonly string[] | undefined;
558
+ } | undefined;
559
+ }[];
770
560
  readonly tags?: readonly string[] | undefined;
771
561
  } & import("../../validate").BuilderValidatedBrand;
772
562
  readonly min: number;