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