@builder-builder/builder 0.0.4 → 0.0.6

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 (69) hide show
  1. package/dist/core/builder.d.ts +27 -20
  2. package/dist/core/builder.js +43 -15
  3. package/dist/core/collection/collection.d.ts +11 -12
  4. package/dist/core/collection/collection.js +5 -23
  5. package/dist/core/collection/index.d.ts +1 -1
  6. package/dist/core/collection/method.d.ts +22 -43
  7. package/dist/core/component/component.d.ts +1 -6
  8. package/dist/core/component/component.js +0 -7
  9. package/dist/core/component/graph.d.ts +0 -1
  10. package/dist/core/component/graph.js +8 -7
  11. package/dist/core/component/index.d.ts +1 -1
  12. package/dist/core/component/method.d.ts +7 -9
  13. package/dist/core/expectation.d.ts +45 -0
  14. package/dist/{assert → core}/expectation.js +6 -5
  15. package/dist/core/graph.d.ts +2 -1
  16. package/dist/core/graph.js +3 -1
  17. package/dist/core/index.d.ts +9 -6
  18. package/dist/core/index.js +3 -2
  19. package/dist/core/option/graph.d.ts +1 -2
  20. package/dist/core/option/graph.js +6 -7
  21. package/dist/core/option/method.d.ts +34 -61
  22. package/dist/core/option/method.js +4 -14
  23. package/dist/core/option/option.d.ts +5 -4
  24. package/dist/core/option/option.js +17 -36
  25. package/dist/core/parameter.d.ts +25 -12
  26. package/dist/core/parameter.js +18 -12
  27. package/dist/core/when/config.d.ts +20 -0
  28. package/dist/core/when/config.js +4 -0
  29. package/dist/core/when/constrain.d.ts +14 -0
  30. package/dist/core/when/index.d.ts +5 -0
  31. package/dist/core/when/index.js +2 -0
  32. package/dist/core/when/nullability.d.ts +18 -0
  33. package/dist/core/when/nullability.js +1 -0
  34. package/dist/core/when/resolve.d.ts +18 -0
  35. package/dist/core/when/resolve.js +22 -0
  36. package/dist/index.d.ts +6 -9
  37. package/dist/index.js +1 -2
  38. package/dist/{config.d.ts → model.d.ts} +1 -1
  39. package/dist/model.js +1 -0
  40. package/dist/paths.d.ts +5 -2
  41. package/dist/resolve/index.d.ts +2 -2
  42. package/dist/resolve/instance.d.ts +2 -2
  43. package/dist/resolve/models.d.ts +1 -1
  44. package/dist/resolve/order.d.ts +5 -4
  45. package/dist/resolve/order.js +8 -8
  46. package/dist/resolve/render.d.ts +4 -4
  47. package/dist/resolve/render.js +49 -60
  48. package/dist/resolve/validate.d.ts +6 -5
  49. package/dist/resolve/validate.js +5 -4
  50. package/dist/schemas/index.d.ts +0 -4
  51. package/dist/schemas/index.js +0 -2
  52. package/dist/serialise/deserialise.js +6 -6
  53. package/dist/serialise/index.d.ts +2 -2
  54. package/dist/serialise/index.js +1 -1
  55. package/dist/{schemas/serialise.d.ts → serialise/schemas.d.ts} +184 -162
  56. package/dist/{schemas/serialise.js → serialise/schemas.js} +24 -25
  57. package/dist/serialise/serialise.d.ts +1 -1
  58. package/dist/serialise/serialise.js +9 -3
  59. package/dist/ui.d.ts +10 -8
  60. package/dist/ui.js +37 -19
  61. package/package.json +2 -1
  62. package/dist/assert/assert.d.ts +0 -28
  63. package/dist/assert/assert.js +0 -28
  64. package/dist/assert/expectation.d.ts +0 -20
  65. package/dist/assert/index.d.ts +0 -3
  66. package/dist/assert/index.js +0 -2
  67. package/dist/schemas/layout.d.ts +0 -52
  68. package/dist/schemas/layout.js +0 -6
  69. /package/dist/{config.js → core/when/constrain.js} +0 -0
@@ -1,13 +1,62 @@
1
+ import type { BuilderOptionValues, BuilderOptionValuesMap } from '../core/option/option';
1
2
  import * as v from 'valibot';
2
- import { BuilderParameter } from '../core/parameter.js';
3
- import { BuilderSelectType } from '../core/option/select.js';
4
- import { BuilderToggleType } from '../core/option/toggle.js';
5
- import { BuilderPathSchema, BuilderPathsSchema } from './primitives.js';
6
- export declare const BuilderParameterSchema: v.InstanceSchema<typeof BuilderParameter, undefined>;
7
- export declare const BuilderOptionValuesSchema: v.UnionSchema<[v.InstanceSchema<typeof BuilderSelectType, undefined>, v.InstanceSchema<typeof BuilderToggleType, undefined>], undefined>;
8
- export type BuilderOptionValues = v.InferOutput<typeof BuilderOptionValuesSchema>;
9
- export declare const BuilderOptionValuesMapSchema: v.RecordSchema<v.StringSchema<undefined>, v.NullableSchema<v.UnionSchema<[v.InstanceSchema<typeof BuilderSelectType, undefined>, v.InstanceSchema<typeof BuilderToggleType, undefined>], undefined>, undefined>, undefined>;
10
- export type BuilderOptionValuesMap = v.InferOutput<typeof BuilderOptionValuesMapSchema>;
3
+ import { BuilderParameterSchema } from '../core/parameter.js';
4
+ import { BuilderOptionValuesMapSchema, BuilderOptionValuesSchema } from '../core/option/option.js';
5
+ import { BuilderPathSchema, BuilderPathsSchema } from '../schemas/primitives.js';
6
+ export type { BuilderOptionValues, BuilderOptionValuesMap };
7
+ export { BuilderOptionValuesMapSchema, BuilderOptionValuesSchema, BuilderParameterSchema };
8
+ export type BuilderCollectionConfigSerialised = {
9
+ readonly builder: BuilderSerialised;
10
+ readonly min: number;
11
+ readonly max: number;
12
+ };
13
+ export type BuilderCollectionEnableConfigSerialised = {
14
+ readonly type: 'enable';
15
+ readonly builder: BuilderSerialised;
16
+ readonly min: number;
17
+ readonly max: number;
18
+ };
19
+ export type BuilderCollectionMatchConfigSerialised = {
20
+ readonly type: 'match';
21
+ readonly matchPath: v.InferOutput<typeof BuilderPathSchema>;
22
+ readonly selectMap: Record<string, BuilderCollectionConfigSerialised | null>;
23
+ };
24
+ export type BuilderCollectionUnlessConfigSerialised = {
25
+ readonly type: 'unless';
26
+ readonly unlessPath: v.InferOutput<typeof BuilderPathSchema>;
27
+ readonly disabledValues: ReadonlyArray<string | boolean | number | null>;
28
+ readonly builder: BuilderSerialised;
29
+ readonly min: number;
30
+ readonly max: number;
31
+ };
32
+ export type BuilderCollectionWhenConfigSerialised = BuilderCollectionEnableConfigSerialised | BuilderCollectionMatchConfigSerialised | BuilderCollectionUnlessConfigSerialised;
33
+ export type BuilderCollectionSerialised = {
34
+ readonly name: string;
35
+ readonly builder: BuilderSerialised;
36
+ readonly min: number;
37
+ readonly max: number;
38
+ readonly gatePaths: v.InferOutput<typeof BuilderPathsSchema>;
39
+ readonly config: BuilderCollectionWhenConfigSerialised | null;
40
+ };
41
+ export type BuilderExpectationSerialised = {
42
+ readonly name: string;
43
+ readonly kind: 'option' | 'component' | 'collection';
44
+ };
45
+ export type BuilderSerialised = {
46
+ readonly options: ReadonlyArray<BuilderOptionSerialised>;
47
+ readonly components: ReadonlyArray<BuilderComponentSerialised>;
48
+ readonly collections: ReadonlyArray<BuilderCollectionSerialised>;
49
+ readonly expectations: ReadonlyArray<BuilderExpectationSerialised>;
50
+ };
51
+ export type BuilderUICollectionSerialised = {
52
+ readonly type: 'collection';
53
+ readonly name: string;
54
+ readonly label: string;
55
+ readonly items: BuilderUIItemsSerialised;
56
+ };
57
+ export type BuilderUIItemSerialised = BuilderUIPageSerialised | BuilderUIDescribeSerialised | BuilderUICollectionSerialised;
58
+ export type BuilderUIItemsSerialised = ReadonlyArray<BuilderUIItemSerialised>;
59
+ export type BuilderUISerialised = BuilderUIItemsSerialised;
11
60
  export declare const BuilderSelectTypeSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
12
61
  readonly type: v.LiteralSchema<"select", undefined>;
13
62
  readonly options: v.SchemaWithPipe<readonly [v.TupleWithRestSchema<[v.StringSchema<undefined>], v.StringSchema<undefined>, undefined>, v.ReadonlyAction<[string, ...string[]]>]>;
@@ -127,9 +176,7 @@ export declare const BuilderOptionEnableConfigSerialisedSchema: v.SchemaWithPipe
127
176
  }>]>], undefined>;
128
177
  }, undefined>, v.ReadonlyAction<{
129
178
  type: "enable";
130
- values: Readonly<{
131
- type: "parameter";
132
- }> | Readonly<Readonly<{
179
+ values: Readonly<Readonly<{
133
180
  type: "select";
134
181
  readonly options: readonly [string, ...string[]];
135
182
  defaultValue: string | null;
@@ -142,7 +189,9 @@ export declare const BuilderOptionEnableConfigSerialisedSchema: v.SchemaWithPipe
142
189
  valueType: string;
143
190
  defaultValue: string | number | boolean | null;
144
191
  optional: boolean;
145
- }>>;
192
+ }>> | Readonly<{
193
+ type: "parameter";
194
+ }>;
146
195
  }>]>;
147
196
  export type BuilderOptionEnableConfigSerialised = v.InferOutput<typeof BuilderOptionEnableConfigSerialisedSchema>;
148
197
  export declare const BuilderOptionMatchConfigSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -263,9 +312,7 @@ export declare const BuilderOptionUnlessConfigSerialisedSchema: v.SchemaWithPipe
263
312
  type: "unless";
264
313
  readonly unlessPath: readonly (string | number)[];
265
314
  readonly disabledValues: readonly (string | number | boolean | null)[];
266
- values: Readonly<{
267
- type: "parameter";
268
- }> | Readonly<Readonly<{
315
+ values: Readonly<Readonly<{
269
316
  type: "select";
270
317
  readonly options: readonly [string, ...string[]];
271
318
  defaultValue: string | null;
@@ -278,7 +325,9 @@ export declare const BuilderOptionUnlessConfigSerialisedSchema: v.SchemaWithPipe
278
325
  valueType: string;
279
326
  defaultValue: string | number | boolean | null;
280
327
  optional: boolean;
281
- }>>;
328
+ }>> | Readonly<{
329
+ type: "parameter";
330
+ }>;
282
331
  }>]>;
283
332
  export type BuilderOptionUnlessConfigSerialised = v.InferOutput<typeof BuilderOptionUnlessConfigSerialisedSchema>;
284
333
  export declare const BuilderOptionWhenConfigSerialisedSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -327,9 +376,7 @@ export declare const BuilderOptionWhenConfigSerialisedSchema: v.SchemaWithPipe<r
327
376
  }>]>], undefined>;
328
377
  }, undefined>, v.ReadonlyAction<{
329
378
  type: "enable";
330
- values: Readonly<{
331
- type: "parameter";
332
- }> | Readonly<Readonly<{
379
+ values: Readonly<Readonly<{
333
380
  type: "select";
334
381
  readonly options: readonly [string, ...string[]];
335
382
  defaultValue: string | null;
@@ -342,7 +389,9 @@ export declare const BuilderOptionWhenConfigSerialisedSchema: v.SchemaWithPipe<r
342
389
  valueType: string;
343
390
  defaultValue: string | number | boolean | null;
344
391
  optional: boolean;
345
- }>>;
392
+ }>> | Readonly<{
393
+ type: "parameter";
394
+ }>;
346
395
  }>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
347
396
  readonly type: v.LiteralSchema<"match", undefined>;
348
397
  readonly matchPath: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>;
@@ -459,9 +508,7 @@ export declare const BuilderOptionWhenConfigSerialisedSchema: v.SchemaWithPipe<r
459
508
  type: "unless";
460
509
  readonly unlessPath: readonly (string | number)[];
461
510
  readonly disabledValues: readonly (string | number | boolean | null)[];
462
- values: Readonly<{
463
- type: "parameter";
464
- }> | Readonly<Readonly<{
511
+ values: Readonly<Readonly<{
465
512
  type: "select";
466
513
  readonly options: readonly [string, ...string[]];
467
514
  defaultValue: string | null;
@@ -474,12 +521,12 @@ export declare const BuilderOptionWhenConfigSerialisedSchema: v.SchemaWithPipe<r
474
521
  valueType: string;
475
522
  defaultValue: string | number | boolean | null;
476
523
  optional: boolean;
477
- }>>;
524
+ }>> | Readonly<{
525
+ type: "parameter";
526
+ }>;
478
527
  }>]>], undefined>, v.ReadonlyAction<Readonly<{
479
528
  type: "enable";
480
- values: Readonly<{
481
- type: "parameter";
482
- }> | Readonly<Readonly<{
529
+ values: Readonly<Readonly<{
483
530
  type: "select";
484
531
  readonly options: readonly [string, ...string[]];
485
532
  defaultValue: string | null;
@@ -492,7 +539,9 @@ export declare const BuilderOptionWhenConfigSerialisedSchema: v.SchemaWithPipe<r
492
539
  valueType: string;
493
540
  defaultValue: string | number | boolean | null;
494
541
  optional: boolean;
495
- }>>;
542
+ }>> | Readonly<{
543
+ type: "parameter";
544
+ }>;
496
545
  }> | Readonly<{
497
546
  type: "match";
498
547
  readonly matchPath: readonly (string | number)[];
@@ -518,9 +567,7 @@ export declare const BuilderOptionWhenConfigSerialisedSchema: v.SchemaWithPipe<r
518
567
  type: "unless";
519
568
  readonly unlessPath: readonly (string | number)[];
520
569
  readonly disabledValues: readonly (string | number | boolean | null)[];
521
- values: Readonly<{
522
- type: "parameter";
523
- }> | Readonly<Readonly<{
570
+ values: Readonly<Readonly<{
524
571
  type: "select";
525
572
  readonly options: readonly [string, ...string[]];
526
573
  defaultValue: string | null;
@@ -533,7 +580,9 @@ export declare const BuilderOptionWhenConfigSerialisedSchema: v.SchemaWithPipe<r
533
580
  valueType: string;
534
581
  defaultValue: string | number | boolean | null;
535
582
  optional: boolean;
536
- }>>;
583
+ }>> | Readonly<{
584
+ type: "parameter";
585
+ }>;
537
586
  }>>]>;
538
587
  export type BuilderOptionWhenConfigSerialised = v.InferOutput<typeof BuilderOptionWhenConfigSerialisedSchema>;
539
588
  export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -627,9 +676,7 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
627
676
  }>]>], undefined>;
628
677
  }, undefined>, v.ReadonlyAction<{
629
678
  type: "enable";
630
- values: Readonly<{
631
- type: "parameter";
632
- }> | Readonly<Readonly<{
679
+ values: Readonly<Readonly<{
633
680
  type: "select";
634
681
  readonly options: readonly [string, ...string[]];
635
682
  defaultValue: string | null;
@@ -642,7 +689,9 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
642
689
  valueType: string;
643
690
  defaultValue: string | number | boolean | null;
644
691
  optional: boolean;
645
- }>>;
692
+ }>> | Readonly<{
693
+ type: "parameter";
694
+ }>;
646
695
  }>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
647
696
  readonly type: v.LiteralSchema<"match", undefined>;
648
697
  readonly matchPath: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>;
@@ -759,9 +808,7 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
759
808
  type: "unless";
760
809
  readonly unlessPath: readonly (string | number)[];
761
810
  readonly disabledValues: readonly (string | number | boolean | null)[];
762
- values: Readonly<{
763
- type: "parameter";
764
- }> | Readonly<Readonly<{
811
+ values: Readonly<Readonly<{
765
812
  type: "select";
766
813
  readonly options: readonly [string, ...string[]];
767
814
  defaultValue: string | null;
@@ -774,12 +821,12 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
774
821
  valueType: string;
775
822
  defaultValue: string | number | boolean | null;
776
823
  optional: boolean;
777
- }>>;
824
+ }>> | Readonly<{
825
+ type: "parameter";
826
+ }>;
778
827
  }>]>], undefined>, v.ReadonlyAction<Readonly<{
779
828
  type: "enable";
780
- values: Readonly<{
781
- type: "parameter";
782
- }> | Readonly<Readonly<{
829
+ values: Readonly<Readonly<{
783
830
  type: "select";
784
831
  readonly options: readonly [string, ...string[]];
785
832
  defaultValue: string | null;
@@ -792,7 +839,9 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
792
839
  valueType: string;
793
840
  defaultValue: string | number | boolean | null;
794
841
  optional: boolean;
795
- }>>;
842
+ }>> | Readonly<{
843
+ type: "parameter";
844
+ }>;
796
845
  }> | Readonly<{
797
846
  type: "match";
798
847
  readonly matchPath: readonly (string | number)[];
@@ -818,9 +867,7 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
818
867
  type: "unless";
819
868
  readonly unlessPath: readonly (string | number)[];
820
869
  readonly disabledValues: readonly (string | number | boolean | null)[];
821
- values: Readonly<{
822
- type: "parameter";
823
- }> | Readonly<Readonly<{
870
+ values: Readonly<Readonly<{
824
871
  type: "select";
825
872
  readonly options: readonly [string, ...string[]];
826
873
  defaultValue: string | null;
@@ -833,13 +880,13 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
833
880
  valueType: string;
834
881
  defaultValue: string | number | boolean | null;
835
882
  optional: boolean;
836
- }>>;
883
+ }>> | Readonly<{
884
+ type: "parameter";
885
+ }>;
837
886
  }>>]>, undefined>;
838
887
  }, undefined>, v.ReadonlyAction<{
839
888
  name: string;
840
- values: Readonly<{
841
- type: "parameter";
842
- }> | Readonly<Readonly<{
889
+ values: Readonly<Readonly<{
843
890
  type: "select";
844
891
  readonly options: readonly [string, ...string[]];
845
892
  defaultValue: string | null;
@@ -852,13 +899,13 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
852
899
  valueType: string;
853
900
  defaultValue: string | number | boolean | null;
854
901
  optional: boolean;
855
- }>>;
902
+ }>> | Readonly<{
903
+ type: "parameter";
904
+ }>;
856
905
  readonly gatePaths: readonly (readonly (string | number)[])[];
857
906
  config: Readonly<Readonly<{
858
907
  type: "enable";
859
- values: Readonly<{
860
- type: "parameter";
861
- }> | Readonly<Readonly<{
908
+ values: Readonly<Readonly<{
862
909
  type: "select";
863
910
  readonly options: readonly [string, ...string[]];
864
911
  defaultValue: string | null;
@@ -871,7 +918,9 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
871
918
  valueType: string;
872
919
  defaultValue: string | number | boolean | null;
873
920
  optional: boolean;
874
- }>>;
921
+ }>> | Readonly<{
922
+ type: "parameter";
923
+ }>;
875
924
  }>> | Readonly<Readonly<{
876
925
  type: "match";
877
926
  readonly matchPath: readonly (string | number)[];
@@ -897,9 +946,7 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
897
946
  type: "unless";
898
947
  readonly unlessPath: readonly (string | number)[];
899
948
  readonly disabledValues: readonly (string | number | boolean | null)[];
900
- values: Readonly<{
901
- type: "parameter";
902
- }> | Readonly<Readonly<{
949
+ values: Readonly<Readonly<{
903
950
  type: "select";
904
951
  readonly options: readonly [string, ...string[]];
905
952
  defaultValue: string | null;
@@ -912,7 +959,9 @@ export declare const BuilderOptionSerialisedSchema: v.SchemaWithPipe<readonly [v
912
959
  valueType: string;
913
960
  defaultValue: string | number | boolean | null;
914
961
  optional: boolean;
915
- }>>;
962
+ }>> | Readonly<{
963
+ type: "parameter";
964
+ }>;
916
965
  }>> | null;
917
966
  }>]>;
918
967
  export type BuilderOptionSerialised = v.InferOutput<typeof BuilderOptionSerialisedSchema>;
@@ -926,45 +975,8 @@ export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly
926
975
  readonly dependencies: readonly string[];
927
976
  }>]>;
928
977
  export type BuilderComponentSerialised = v.InferOutput<typeof BuilderComponentSerialisedSchema>;
929
- export type BuilderCollectionConfigSerialised = {
930
- readonly builder: BuilderSerialised;
931
- readonly min: number;
932
- readonly max: number;
933
- };
934
- export type BuilderCollectionEnableConfigSerialised = {
935
- readonly type: 'enable';
936
- readonly builder: BuilderSerialised;
937
- readonly min: number;
938
- readonly max: number;
939
- };
940
- export type BuilderCollectionMatchConfigSerialised = {
941
- readonly type: 'match';
942
- readonly matchPath: v.InferOutput<typeof BuilderPathSchema>;
943
- readonly selectMap: Record<string, BuilderCollectionConfigSerialised | null>;
944
- };
945
- export type BuilderCollectionUnlessConfigSerialised = {
946
- readonly type: 'unless';
947
- readonly unlessPath: v.InferOutput<typeof BuilderPathSchema>;
948
- readonly disabledValues: ReadonlyArray<string | boolean | number | null>;
949
- readonly builder: BuilderSerialised;
950
- readonly min: number;
951
- readonly max: number;
952
- };
953
- export type BuilderCollectionWhenConfigSerialised = BuilderCollectionEnableConfigSerialised | BuilderCollectionMatchConfigSerialised | BuilderCollectionUnlessConfigSerialised;
954
- export type BuilderCollectionSerialised = {
955
- readonly name: string;
956
- readonly builder: BuilderSerialised;
957
- readonly min: number;
958
- readonly max: number;
959
- readonly gatePaths: v.InferOutput<typeof BuilderPathsSchema>;
960
- readonly config: BuilderCollectionWhenConfigSerialised | null;
961
- };
962
- export type BuilderSerialised = {
963
- readonly options: ReadonlyArray<BuilderOptionSerialised>;
964
- readonly components: ReadonlyArray<BuilderComponentSerialised>;
965
- readonly collections: ReadonlyArray<BuilderCollectionSerialised>;
966
- };
967
978
  type SerialisedSchemaType = v.GenericSchema<BuilderSerialised, BuilderSerialised>;
979
+ type UIItemsSerialisedSchemaType = v.GenericSchema<BuilderUIItemsSerialised, BuilderUIItemsSerialised>;
968
980
  export declare const BuilderCollectionConfigSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
969
981
  readonly builder: v.LazySchema<SerialisedSchemaType>;
970
982
  readonly min: v.NumberSchema<undefined>;
@@ -1119,6 +1131,13 @@ export declare const BuilderCollectionSerialisedSchema: v.SchemaWithPipe<readonl
1119
1131
  max: number;
1120
1132
  } | null;
1121
1133
  }>]>;
1134
+ export declare const BuilderExpectationSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1135
+ readonly name: v.StringSchema<undefined>;
1136
+ readonly kind: v.PicklistSchema<["option", "component", "collection"], undefined>;
1137
+ }, undefined>, v.ReadonlyAction<{
1138
+ name: string;
1139
+ kind: "collection" | "option" | "component";
1140
+ }>]>;
1122
1141
  export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1123
1142
  readonly options: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
1124
1143
  readonly name: v.StringSchema<undefined>;
@@ -1211,9 +1230,7 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1211
1230
  }>]>], undefined>;
1212
1231
  }, undefined>, v.ReadonlyAction<{
1213
1232
  type: "enable";
1214
- values: Readonly<{
1215
- type: "parameter";
1216
- }> | Readonly<Readonly<{
1233
+ values: Readonly<Readonly<{
1217
1234
  type: "select";
1218
1235
  readonly options: readonly [string, ...string[]];
1219
1236
  defaultValue: string | null;
@@ -1226,7 +1243,9 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1226
1243
  valueType: string;
1227
1244
  defaultValue: string | number | boolean | null;
1228
1245
  optional: boolean;
1229
- }>>;
1246
+ }>> | Readonly<{
1247
+ type: "parameter";
1248
+ }>;
1230
1249
  }>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1231
1250
  readonly type: v.LiteralSchema<"match", undefined>;
1232
1251
  readonly matchPath: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>;
@@ -1343,9 +1362,7 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1343
1362
  type: "unless";
1344
1363
  readonly unlessPath: readonly (string | number)[];
1345
1364
  readonly disabledValues: readonly (string | number | boolean | null)[];
1346
- values: Readonly<{
1347
- type: "parameter";
1348
- }> | Readonly<Readonly<{
1365
+ values: Readonly<Readonly<{
1349
1366
  type: "select";
1350
1367
  readonly options: readonly [string, ...string[]];
1351
1368
  defaultValue: string | null;
@@ -1358,12 +1375,12 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1358
1375
  valueType: string;
1359
1376
  defaultValue: string | number | boolean | null;
1360
1377
  optional: boolean;
1361
- }>>;
1378
+ }>> | Readonly<{
1379
+ type: "parameter";
1380
+ }>;
1362
1381
  }>]>], undefined>, v.ReadonlyAction<Readonly<{
1363
1382
  type: "enable";
1364
- values: Readonly<{
1365
- type: "parameter";
1366
- }> | Readonly<Readonly<{
1383
+ values: Readonly<Readonly<{
1367
1384
  type: "select";
1368
1385
  readonly options: readonly [string, ...string[]];
1369
1386
  defaultValue: string | null;
@@ -1376,7 +1393,9 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1376
1393
  valueType: string;
1377
1394
  defaultValue: string | number | boolean | null;
1378
1395
  optional: boolean;
1379
- }>>;
1396
+ }>> | Readonly<{
1397
+ type: "parameter";
1398
+ }>;
1380
1399
  }> | Readonly<{
1381
1400
  type: "match";
1382
1401
  readonly matchPath: readonly (string | number)[];
@@ -1402,9 +1421,7 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1402
1421
  type: "unless";
1403
1422
  readonly unlessPath: readonly (string | number)[];
1404
1423
  readonly disabledValues: readonly (string | number | boolean | null)[];
1405
- values: Readonly<{
1406
- type: "parameter";
1407
- }> | Readonly<Readonly<{
1424
+ values: Readonly<Readonly<{
1408
1425
  type: "select";
1409
1426
  readonly options: readonly [string, ...string[]];
1410
1427
  defaultValue: string | null;
@@ -1417,13 +1434,13 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1417
1434
  valueType: string;
1418
1435
  defaultValue: string | number | boolean | null;
1419
1436
  optional: boolean;
1420
- }>>;
1437
+ }>> | Readonly<{
1438
+ type: "parameter";
1439
+ }>;
1421
1440
  }>>]>, undefined>;
1422
1441
  }, undefined>, v.ReadonlyAction<{
1423
1442
  name: string;
1424
- values: Readonly<{
1425
- type: "parameter";
1426
- }> | Readonly<Readonly<{
1443
+ values: Readonly<Readonly<{
1427
1444
  type: "select";
1428
1445
  readonly options: readonly [string, ...string[]];
1429
1446
  defaultValue: string | null;
@@ -1436,13 +1453,13 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1436
1453
  valueType: string;
1437
1454
  defaultValue: string | number | boolean | null;
1438
1455
  optional: boolean;
1439
- }>>;
1456
+ }>> | Readonly<{
1457
+ type: "parameter";
1458
+ }>;
1440
1459
  readonly gatePaths: readonly (readonly (string | number)[])[];
1441
1460
  config: Readonly<Readonly<{
1442
1461
  type: "enable";
1443
- values: Readonly<{
1444
- type: "parameter";
1445
- }> | Readonly<Readonly<{
1462
+ values: Readonly<Readonly<{
1446
1463
  type: "select";
1447
1464
  readonly options: readonly [string, ...string[]];
1448
1465
  defaultValue: string | null;
@@ -1455,7 +1472,9 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1455
1472
  valueType: string;
1456
1473
  defaultValue: string | number | boolean | null;
1457
1474
  optional: boolean;
1458
- }>>;
1475
+ }>> | Readonly<{
1476
+ type: "parameter";
1477
+ }>;
1459
1478
  }>> | Readonly<Readonly<{
1460
1479
  type: "match";
1461
1480
  readonly matchPath: readonly (string | number)[];
@@ -1481,9 +1500,7 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1481
1500
  type: "unless";
1482
1501
  readonly unlessPath: readonly (string | number)[];
1483
1502
  readonly disabledValues: readonly (string | number | boolean | null)[];
1484
- values: Readonly<{
1485
- type: "parameter";
1486
- }> | Readonly<Readonly<{
1503
+ values: Readonly<Readonly<{
1487
1504
  type: "select";
1488
1505
  readonly options: readonly [string, ...string[]];
1489
1506
  defaultValue: string | null;
@@ -1496,13 +1513,13 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1496
1513
  valueType: string;
1497
1514
  defaultValue: string | number | boolean | null;
1498
1515
  optional: boolean;
1499
- }>>;
1516
+ }>> | Readonly<{
1517
+ type: "parameter";
1518
+ }>;
1500
1519
  }>> | null;
1501
1520
  }>]>, undefined>, v.ReadonlyAction<Readonly<{
1502
1521
  name: string;
1503
- values: Readonly<{
1504
- type: "parameter";
1505
- }> | Readonly<Readonly<{
1522
+ values: Readonly<Readonly<{
1506
1523
  type: "select";
1507
1524
  readonly options: readonly [string, ...string[]];
1508
1525
  defaultValue: string | null;
@@ -1515,13 +1532,13 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1515
1532
  valueType: string;
1516
1533
  defaultValue: string | number | boolean | null;
1517
1534
  optional: boolean;
1518
- }>>;
1535
+ }>> | Readonly<{
1536
+ type: "parameter";
1537
+ }>;
1519
1538
  readonly gatePaths: readonly (readonly (string | number)[])[];
1520
1539
  config: Readonly<Readonly<{
1521
1540
  type: "enable";
1522
- values: Readonly<{
1523
- type: "parameter";
1524
- }> | Readonly<Readonly<{
1541
+ values: Readonly<Readonly<{
1525
1542
  type: "select";
1526
1543
  readonly options: readonly [string, ...string[]];
1527
1544
  defaultValue: string | null;
@@ -1534,7 +1551,9 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1534
1551
  valueType: string;
1535
1552
  defaultValue: string | number | boolean | null;
1536
1553
  optional: boolean;
1537
- }>>;
1554
+ }>> | Readonly<{
1555
+ type: "parameter";
1556
+ }>;
1538
1557
  }>> | Readonly<Readonly<{
1539
1558
  type: "match";
1540
1559
  readonly matchPath: readonly (string | number)[];
@@ -1560,9 +1579,7 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1560
1579
  type: "unless";
1561
1580
  readonly unlessPath: readonly (string | number)[];
1562
1581
  readonly disabledValues: readonly (string | number | boolean | null)[];
1563
- values: Readonly<{
1564
- type: "parameter";
1565
- }> | Readonly<Readonly<{
1582
+ values: Readonly<Readonly<{
1566
1583
  type: "select";
1567
1584
  readonly options: readonly [string, ...string[]];
1568
1585
  defaultValue: string | null;
@@ -1575,7 +1592,9 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1575
1592
  valueType: string;
1576
1593
  defaultValue: string | number | boolean | null;
1577
1594
  optional: boolean;
1578
- }>>;
1595
+ }>> | Readonly<{
1596
+ type: "parameter";
1597
+ }>;
1579
1598
  }>> | null;
1580
1599
  }>[]>]>;
1581
1600
  readonly components: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -1648,12 +1667,20 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1648
1667
  max: number;
1649
1668
  } | null;
1650
1669
  }[]>]>;
1670
+ readonly expectations: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
1671
+ readonly name: v.StringSchema<undefined>;
1672
+ readonly kind: v.PicklistSchema<["option", "component", "collection"], undefined>;
1673
+ }, undefined>, v.ReadonlyAction<{
1674
+ name: string;
1675
+ kind: "collection" | "option" | "component";
1676
+ }>]>, undefined>, v.ReadonlyAction<Readonly<{
1677
+ name: string;
1678
+ kind: "collection" | "option" | "component";
1679
+ }>[]>]>;
1651
1680
  }, undefined>, v.ReadonlyAction<{
1652
1681
  readonly options: readonly Readonly<{
1653
1682
  name: string;
1654
- values: Readonly<{
1655
- type: "parameter";
1656
- }> | Readonly<Readonly<{
1683
+ values: Readonly<Readonly<{
1657
1684
  type: "select";
1658
1685
  readonly options: readonly [string, ...string[]];
1659
1686
  defaultValue: string | null;
@@ -1666,13 +1693,13 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1666
1693
  valueType: string;
1667
1694
  defaultValue: string | number | boolean | null;
1668
1695
  optional: boolean;
1669
- }>>;
1696
+ }>> | Readonly<{
1697
+ type: "parameter";
1698
+ }>;
1670
1699
  readonly gatePaths: readonly (readonly (string | number)[])[];
1671
1700
  config: Readonly<Readonly<{
1672
1701
  type: "enable";
1673
- values: Readonly<{
1674
- type: "parameter";
1675
- }> | Readonly<Readonly<{
1702
+ values: Readonly<Readonly<{
1676
1703
  type: "select";
1677
1704
  readonly options: readonly [string, ...string[]];
1678
1705
  defaultValue: string | null;
@@ -1685,7 +1712,9 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1685
1712
  valueType: string;
1686
1713
  defaultValue: string | number | boolean | null;
1687
1714
  optional: boolean;
1688
- }>>;
1715
+ }>> | Readonly<{
1716
+ type: "parameter";
1717
+ }>;
1689
1718
  }>> | Readonly<Readonly<{
1690
1719
  type: "match";
1691
1720
  readonly matchPath: readonly (string | number)[];
@@ -1711,9 +1740,7 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1711
1740
  type: "unless";
1712
1741
  readonly unlessPath: readonly (string | number)[];
1713
1742
  readonly disabledValues: readonly (string | number | boolean | null)[];
1714
- values: Readonly<{
1715
- type: "parameter";
1716
- }> | Readonly<Readonly<{
1743
+ values: Readonly<Readonly<{
1717
1744
  type: "select";
1718
1745
  readonly options: readonly [string, ...string[]];
1719
1746
  defaultValue: string | null;
@@ -1726,7 +1753,9 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1726
1753
  valueType: string;
1727
1754
  defaultValue: string | number | boolean | null;
1728
1755
  optional: boolean;
1729
- }>>;
1756
+ }>> | Readonly<{
1757
+ type: "parameter";
1758
+ }>;
1730
1759
  }>> | null;
1731
1760
  }>[];
1732
1761
  readonly components: readonly Readonly<{
@@ -1764,17 +1793,11 @@ export declare const BuilderSerialisedSchema: v.SchemaWithPipe<readonly [v.Objec
1764
1793
  max: number;
1765
1794
  } | null;
1766
1795
  }[];
1796
+ readonly expectations: readonly Readonly<{
1797
+ name: string;
1798
+ kind: "collection" | "option" | "component";
1799
+ }>[];
1767
1800
  }>]>;
1768
- export type BuilderUICollectionSerialised = {
1769
- readonly type: 'collection';
1770
- readonly name: string;
1771
- readonly label: string;
1772
- readonly items: BuilderUIItemsSerialised;
1773
- };
1774
- export type BuilderUIItemSerialised = BuilderUIPageSerialised | BuilderUIDescribeSerialised | BuilderUICollectionSerialised;
1775
- export type BuilderUIItemsSerialised = ReadonlyArray<BuilderUIItemSerialised>;
1776
- export type BuilderUISerialised = BuilderUIItemsSerialised;
1777
- type UIItemsSerialisedSchemaType = v.GenericSchema<BuilderUIItemsSerialised, BuilderUIItemsSerialised>;
1778
1801
  export declare const BuilderUIPageSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1779
1802
  readonly type: v.LiteralSchema<"page", undefined>;
1780
1803
  readonly label: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -1860,4 +1883,3 @@ export declare const BuilderUIItemsSerialisedSchema: v.SchemaWithPipe<readonly [
1860
1883
  label: string;
1861
1884
  items: BuilderUIItemsSerialised;
1862
1885
  })[]>]>;
1863
- export {};