@builder-builder/builder 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/schema.d.ts +29 -4
- package/dist/client/schema.js +3 -1
- package/dist/components/Builder.svelte.d.ts +24 -0
- package/dist/components/BuilderCollectionButtons.svelte.d.ts +22 -0
- package/dist/components/BuilderCollections.svelte.d.ts +23 -0
- package/dist/components/BuilderDescription.svelte.d.ts +18 -0
- package/dist/components/BuilderLayout.svelte.d.ts +24 -0
- package/dist/components/BuilderOption.svelte.d.ts +31 -0
- package/dist/components/BuilderOptionSelect.svelte.d.ts +21 -0
- package/dist/components/BuilderOptionToggleBoolean.svelte.d.ts +20 -0
- package/dist/components/BuilderOptionToggleNumber.svelte.d.ts +21 -0
- package/dist/components/BuilderOptionToggleString.svelte.d.ts +21 -0
- package/dist/components/BuilderPrice.svelte.d.ts +21 -0
- package/dist/components/BuilderRender.svelte.d.ts +39 -0
- package/dist/components/config.d.ts +2 -0
- package/dist/components/config.js +1 -0
- package/dist/components/dispatch.d.ts +1 -0
- package/dist/components/dispatch.js +3 -0
- package/dist/components/id.d.ts +1 -0
- package/dist/components/id.js +3 -0
- package/dist/components/index.d.ts +25 -0
- package/dist/components/index.js +7441 -0
- package/dist/entities/builder/builder.js +2 -1
- package/dist/entities/collection/collection.js +2 -1
- package/dist/entities/collection/config.d.ts +20 -20
- package/dist/entities/collection/config.js +3 -2
- package/dist/entities/component/component.d.ts +30 -30
- package/dist/entities/component/component.js +2 -1
- package/dist/entities/component/config.d.ts +12 -12
- package/dist/entities/component/field.d.ts +4 -4
- package/dist/entities/component/field.js +4 -3
- package/dist/entities/expectation.d.ts +2 -2
- package/dist/entities/expectation.js +2 -1
- package/dist/entities/index.d.ts +1 -1
- package/dist/entities/kind.d.ts +1 -1
- package/dist/entities/kind.js +43 -3
- package/dist/entities/model/models.d.ts +3 -3
- package/dist/entities/option/config.d.ts +4 -4
- package/dist/entities/option/option.d.ts +22 -22
- package/dist/entities/option/option.js +2 -1
- package/dist/entities/option/select.d.ts +1 -1
- package/dist/entities/option/select.js +5 -4
- package/dist/entities/option/toggle.d.ts +1 -1
- package/dist/entities/option/toggle.js +4 -3
- package/dist/entities/paths.d.ts +2 -2
- package/dist/entities/paths.js +2 -1
- package/dist/entities/pricing/expression.js +5 -4
- package/dist/entities/pricing/rates.js +2 -1
- package/dist/entities/references.d.ts +50 -2
- package/dist/entities/references.js +2 -1
- package/dist/entities/serialise.d.ts +318 -113
- package/dist/entities/serialise.js +4 -3
- package/dist/entities/tags.d.ts +1 -1
- package/dist/entities/tags.js +2 -1
- package/dist/entities/ui/describe.d.ts +126 -34
- package/dist/entities/ui/describe.js +3 -2
- package/dist/entities/ui/input.d.ts +158 -49
- package/dist/entities/ui/input.js +13 -6
- package/dist/entities/ui/page.d.ts +124 -32
- package/dist/entities/ui/page.js +2 -1
- package/dist/entities/ui/pages.d.ts +11 -3
- package/dist/entities/ui/pages.js +3 -2
- package/dist/entities/validated.d.ts +1 -0
- package/dist/entities/when.d.ts +16 -16
- package/dist/entities/when.js +2 -2
- package/dist/errors/errors.d.ts +10 -0
- package/dist/errors/errors.js +6 -0
- package/dist/instance.d.ts +7 -7
- package/dist/instance.js +4 -4
- package/dist/mappers/index.d.ts +1 -1
- package/dist/mappers/order.js +4 -2
- package/dist/mappers/price.js +1 -2
- package/dist/mappers/render/collection.d.ts +9 -0
- package/dist/mappers/render/collection.js +27 -0
- package/dist/mappers/render/compose.d.ts +5 -0
- package/dist/mappers/render/compose.js +15 -0
- package/dist/mappers/render/description.d.ts +3 -0
- package/dist/mappers/render/description.js +17 -0
- package/dist/mappers/render/index.d.ts +3 -1
- package/dist/mappers/render/option.d.ts +21 -0
- package/dist/mappers/render/option.js +26 -0
- package/dist/mappers/render/page.d.ts +11 -0
- package/dist/mappers/render/page.js +11 -0
- package/dist/mappers/render/paths.d.ts +3 -0
- package/dist/mappers/render/paths.js +21 -0
- package/dist/mappers/render/render.d.ts +1 -1
- package/dist/mappers/render/render.js +33 -98
- package/dist/mappers/resolve.d.ts +2 -1
- package/dist/mappers/resolve.js +24 -23
- package/dist/primitive.d.ts +5 -0
- package/dist/primitive.js +6 -1
- package/dist/public.d.ts +1 -1
- package/dist/references.d.ts +6 -6
- package/dist/references.js +3 -2
- package/dist/validate/model.js +16 -5
- package/dist/validate/paths.js +3 -5
- package/dist/validate/pricing.js +5 -6
- package/dist/validate/resolve.d.ts +2 -1
- package/dist/validate/resolve.js +87 -73
- package/dist/validate/ui.js +14 -13
- package/package.json +7 -5
- package/dist/mappers/render/pages.d.ts +0 -24
- package/dist/mappers/render/pages.js +0 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { check } from '../errors/index.js';
|
|
3
|
+
import { BooleanSchema, NumberSchema, StringSchema } from '../primitive.js';
|
|
3
4
|
import { BuilderParameterSchema, BuilderRefSchema, isParamable } from '../references.js';
|
|
4
5
|
import { BuilderSchema, BuilderSerialisedSchema } from './builder/index.js';
|
|
5
6
|
import { BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionWhenSerialisedSchema } from './collection/index.js';
|
|
@@ -62,9 +63,9 @@ export const entitiesMap = {
|
|
|
62
63
|
},
|
|
63
64
|
paths: { runtime: BuilderPathsSchema, serialised: BuilderPathsSchema },
|
|
64
65
|
path: { runtime: BuilderPathSchema, serialised: BuilderPathSchema },
|
|
65
|
-
number: { runtime:
|
|
66
|
-
string: { runtime:
|
|
67
|
-
boolean: { runtime:
|
|
66
|
+
number: { runtime: NumberSchema, serialised: NumberSchema },
|
|
67
|
+
string: { runtime: StringSchema, serialised: StringSchema },
|
|
68
|
+
boolean: { runtime: BooleanSchema, serialised: BooleanSchema }
|
|
68
69
|
};
|
|
69
70
|
export const validateNumber = createEntityValidator('number', entitiesMap.number.serialised);
|
|
70
71
|
export const validateString = createEntityValidator('string', entitiesMap.string.serialised);
|
package/dist/entities/tags.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
export declare const BuilderTagsSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>;
|
|
2
|
+
export declare const BuilderTagsSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>;
|
|
3
3
|
export type BuilderTags = v.InferOutput<typeof BuilderTagsSchema>;
|
package/dist/entities/tags.js
CHANGED
|
@@ -2,9 +2,9 @@ import type { Paramable } from '../../references';
|
|
|
2
2
|
import type { BuilderTags } from '../tags';
|
|
3
3
|
import type { BuilderUIInputs } from './input';
|
|
4
4
|
import * as v from 'valibot';
|
|
5
|
-
export declare const BuilderDescriptionItemSchema: v.SchemaWithPipe<readonly [v.TupleSchema<[v.StringSchema<undefined>, v.StringSchema<undefined>], undefined>, v.ReadonlyAction<[string, string]>]>;
|
|
5
|
+
export declare const BuilderDescriptionItemSchema: v.SchemaWithPipe<readonly [v.TupleSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>, v.ReadonlyAction<[string, string]>]>;
|
|
6
6
|
export type BuilderDescriptionItem = v.InferOutput<typeof BuilderDescriptionItemSchema>;
|
|
7
|
-
export declare const BuilderDescriptionSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.TupleSchema<[v.StringSchema<undefined>, v.StringSchema<undefined>], undefined>, v.ReadonlyAction<[string, string]>]>, undefined>, v.ReadonlyAction<(readonly [string, string])[]>]>;
|
|
7
|
+
export declare const BuilderDescriptionSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.TupleSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>, v.ReadonlyAction<[string, string]>]>, undefined>, v.ReadonlyAction<(readonly [string, string])[]>]>;
|
|
8
8
|
export type BuilderDescription = v.InferOutput<typeof BuilderDescriptionSchema>;
|
|
9
9
|
export declare class BuilderUIDescribe<const Label extends Paramable<string> = Paramable<string>, const Inputs extends Paramable<BuilderUIInputs> = Paramable<BuilderUIInputs>> {
|
|
10
10
|
readonly type: "describe";
|
|
@@ -19,44 +19,44 @@ export declare const BuilderUIDescribeSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
19
19
|
readonly type: v.LiteralSchema<"describe", undefined>;
|
|
20
20
|
readonly label: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
21
21
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
22
|
-
readonly id: v.StringSchema<undefined>;
|
|
23
|
-
readonly name: v.StringSchema<undefined>;
|
|
22
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
23
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
24
24
|
}, undefined>, v.ReadonlyAction<{
|
|
25
25
|
type: "parameter";
|
|
26
26
|
id: string;
|
|
27
27
|
name: string;
|
|
28
28
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
29
29
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
30
|
-
readonly id: v.StringSchema<undefined>;
|
|
30
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
31
31
|
}, undefined>, v.ReadonlyAction<{
|
|
32
32
|
type: "ref";
|
|
33
33
|
id: string;
|
|
34
|
-
}>]>, v.StringSchema<undefined>], undefined>;
|
|
34
|
+
}>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>;
|
|
35
35
|
readonly inputs: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
36
36
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
37
|
-
readonly id: v.StringSchema<undefined>;
|
|
38
|
-
readonly name: v.StringSchema<undefined>;
|
|
37
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
38
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
39
39
|
}, undefined>, v.ReadonlyAction<{
|
|
40
40
|
type: "parameter";
|
|
41
41
|
id: string;
|
|
42
42
|
name: string;
|
|
43
43
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
44
44
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
45
|
-
readonly id: v.StringSchema<undefined>;
|
|
45
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
46
46
|
}, undefined>, v.ReadonlyAction<{
|
|
47
47
|
type: "ref";
|
|
48
48
|
id: string;
|
|
49
49
|
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
50
50
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
51
|
-
readonly id: v.StringSchema<undefined>;
|
|
52
|
-
readonly name: v.StringSchema<undefined>;
|
|
51
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
52
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
53
53
|
}, undefined>, v.ReadonlyAction<{
|
|
54
54
|
type: "parameter";
|
|
55
55
|
id: string;
|
|
56
56
|
name: string;
|
|
57
57
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
58
58
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
59
|
-
readonly id: v.StringSchema<undefined>;
|
|
59
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
60
60
|
}, undefined>, v.ReadonlyAction<{
|
|
61
61
|
type: "ref";
|
|
62
62
|
id: string;
|
|
@@ -64,81 +64,96 @@ export declare const BuilderUIDescribeSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
64
64
|
readonly type: v.LiteralSchema<"input", undefined>;
|
|
65
65
|
readonly path: v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
66
66
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
67
|
-
readonly id: v.StringSchema<undefined>;
|
|
68
|
-
readonly name: v.StringSchema<undefined>;
|
|
67
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
68
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
69
69
|
}, undefined>, v.ReadonlyAction<{
|
|
70
70
|
type: "parameter";
|
|
71
71
|
id: string;
|
|
72
72
|
name: string;
|
|
73
73
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
74
74
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
75
|
-
readonly id: v.StringSchema<undefined>;
|
|
75
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
76
76
|
}, undefined>, v.ReadonlyAction<{
|
|
77
77
|
type: "ref";
|
|
78
78
|
id: string;
|
|
79
|
-
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
79
|
+
}>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.NumberSchema<undefined>], undefined>, undefined>, v.ReadonlyAction<(string | number)[]>]>], undefined>;
|
|
80
80
|
readonly displayName: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
81
81
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
82
|
-
readonly id: v.StringSchema<undefined>;
|
|
83
|
-
readonly name: v.StringSchema<undefined>;
|
|
82
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
83
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
84
84
|
}, undefined>, v.ReadonlyAction<{
|
|
85
85
|
type: "parameter";
|
|
86
86
|
id: string;
|
|
87
87
|
name: string;
|
|
88
88
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
89
89
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
90
|
-
readonly id: v.StringSchema<undefined>;
|
|
90
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
91
91
|
}, undefined>, v.ReadonlyAction<{
|
|
92
92
|
type: "ref";
|
|
93
93
|
id: string;
|
|
94
|
-
}>]>, v.StringSchema<undefined>], undefined>, undefined>;
|
|
94
|
+
}>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>, undefined>;
|
|
95
95
|
readonly kind: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
96
96
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
97
|
-
readonly id: v.StringSchema<undefined>;
|
|
98
|
-
readonly name: v.StringSchema<undefined>;
|
|
97
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
98
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
99
99
|
}, undefined>, v.ReadonlyAction<{
|
|
100
100
|
type: "parameter";
|
|
101
101
|
id: string;
|
|
102
102
|
name: string;
|
|
103
103
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
104
104
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
105
|
-
readonly id: v.StringSchema<undefined>;
|
|
105
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
106
106
|
}, undefined>, v.ReadonlyAction<{
|
|
107
107
|
type: "ref";
|
|
108
108
|
id: string;
|
|
109
|
-
}>]>, v.StringSchema<undefined>], undefined>, undefined>;
|
|
109
|
+
}>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>, undefined>;
|
|
110
|
+
readonly placeholderLabel: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
111
|
+
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
112
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
113
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
114
|
+
}, undefined>, v.ReadonlyAction<{
|
|
115
|
+
type: "parameter";
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
119
|
+
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
120
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
121
|
+
}, undefined>, v.ReadonlyAction<{
|
|
122
|
+
type: "ref";
|
|
123
|
+
id: string;
|
|
124
|
+
}>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>], undefined>, undefined>;
|
|
110
125
|
readonly metadata: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
111
126
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
112
|
-
readonly id: v.StringSchema<undefined>;
|
|
113
|
-
readonly name: v.StringSchema<undefined>;
|
|
127
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
128
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
114
129
|
}, undefined>, v.ReadonlyAction<{
|
|
115
130
|
type: "parameter";
|
|
116
131
|
id: string;
|
|
117
132
|
name: string;
|
|
118
133
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
119
134
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
120
|
-
readonly id: v.StringSchema<undefined>;
|
|
135
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
121
136
|
}, undefined>, v.ReadonlyAction<{
|
|
122
137
|
type: "ref";
|
|
123
138
|
id: string;
|
|
124
|
-
}>]>, v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
139
|
+
}>]>, v.SchemaWithPipe<readonly [v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
125
140
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
126
|
-
readonly id: v.StringSchema<undefined>;
|
|
127
|
-
readonly name: v.StringSchema<undefined>;
|
|
141
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
142
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
128
143
|
}, undefined>, v.ReadonlyAction<{
|
|
129
144
|
type: "parameter";
|
|
130
145
|
id: string;
|
|
131
146
|
name: string;
|
|
132
147
|
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
133
148
|
readonly type: v.LiteralSchema<"ref", undefined>;
|
|
134
|
-
readonly id: v.StringSchema<undefined>;
|
|
149
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
135
150
|
}, undefined>, v.ReadonlyAction<{
|
|
136
151
|
type: "ref";
|
|
137
152
|
id: string;
|
|
138
153
|
}>]>, v.UnknownSchema], undefined>, undefined>, v.ReadonlyAction<{
|
|
139
154
|
[x: string]: unknown;
|
|
140
155
|
}>]>], undefined>, undefined>;
|
|
141
|
-
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
156
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
142
157
|
}, undefined>, v.ReadonlyAction<{
|
|
143
158
|
type: "input";
|
|
144
159
|
path: readonly (string | number)[] | Readonly<{
|
|
@@ -165,6 +180,14 @@ export declare const BuilderUIDescribeSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
165
180
|
type: "ref";
|
|
166
181
|
id: string;
|
|
167
182
|
}> | undefined;
|
|
183
|
+
placeholderLabel?: string | Readonly<{
|
|
184
|
+
type: "parameter";
|
|
185
|
+
id: string;
|
|
186
|
+
name: string;
|
|
187
|
+
}> | Readonly<{
|
|
188
|
+
type: "ref";
|
|
189
|
+
id: string;
|
|
190
|
+
}> | undefined;
|
|
168
191
|
metadata?: Readonly<{
|
|
169
192
|
type: "parameter";
|
|
170
193
|
id: string;
|
|
@@ -176,7 +199,7 @@ export declare const BuilderUIDescribeSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
176
199
|
[x: string]: unknown;
|
|
177
200
|
}> | undefined;
|
|
178
201
|
tags?: readonly string[] | undefined;
|
|
179
|
-
}>]>], undefined>, undefined>, v.
|
|
202
|
+
}>]>], undefined>, undefined>, v.MinLengthAction<(Readonly<{
|
|
180
203
|
type: "parameter";
|
|
181
204
|
id: string;
|
|
182
205
|
name: string;
|
|
@@ -209,6 +232,66 @@ export declare const BuilderUIDescribeSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
209
232
|
type: "ref";
|
|
210
233
|
id: string;
|
|
211
234
|
}> | undefined;
|
|
235
|
+
placeholderLabel?: string | Readonly<{
|
|
236
|
+
type: "parameter";
|
|
237
|
+
id: string;
|
|
238
|
+
name: string;
|
|
239
|
+
}> | Readonly<{
|
|
240
|
+
type: "ref";
|
|
241
|
+
id: string;
|
|
242
|
+
}> | undefined;
|
|
243
|
+
metadata?: Readonly<{
|
|
244
|
+
type: "parameter";
|
|
245
|
+
id: string;
|
|
246
|
+
name: string;
|
|
247
|
+
}> | Readonly<{
|
|
248
|
+
type: "ref";
|
|
249
|
+
id: string;
|
|
250
|
+
}> | Readonly<{
|
|
251
|
+
[x: string]: unknown;
|
|
252
|
+
}> | undefined;
|
|
253
|
+
tags?: readonly string[] | undefined;
|
|
254
|
+
}>)[], 1, undefined>, v.ReadonlyAction<(Readonly<{
|
|
255
|
+
type: "parameter";
|
|
256
|
+
id: string;
|
|
257
|
+
name: string;
|
|
258
|
+
}> | Readonly<{
|
|
259
|
+
type: "ref";
|
|
260
|
+
id: string;
|
|
261
|
+
}> | Readonly<{
|
|
262
|
+
type: "input";
|
|
263
|
+
path: readonly (string | number)[] | Readonly<{
|
|
264
|
+
type: "parameter";
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
}> | Readonly<{
|
|
268
|
+
type: "ref";
|
|
269
|
+
id: string;
|
|
270
|
+
}>;
|
|
271
|
+
displayName?: string | Readonly<{
|
|
272
|
+
type: "parameter";
|
|
273
|
+
id: string;
|
|
274
|
+
name: string;
|
|
275
|
+
}> | Readonly<{
|
|
276
|
+
type: "ref";
|
|
277
|
+
id: string;
|
|
278
|
+
}> | undefined;
|
|
279
|
+
kind?: string | Readonly<{
|
|
280
|
+
type: "parameter";
|
|
281
|
+
id: string;
|
|
282
|
+
name: string;
|
|
283
|
+
}> | Readonly<{
|
|
284
|
+
type: "ref";
|
|
285
|
+
id: string;
|
|
286
|
+
}> | undefined;
|
|
287
|
+
placeholderLabel?: string | Readonly<{
|
|
288
|
+
type: "parameter";
|
|
289
|
+
id: string;
|
|
290
|
+
name: string;
|
|
291
|
+
}> | Readonly<{
|
|
292
|
+
type: "ref";
|
|
293
|
+
id: string;
|
|
294
|
+
}> | undefined;
|
|
212
295
|
metadata?: Readonly<{
|
|
213
296
|
type: "parameter";
|
|
214
297
|
id: string;
|
|
@@ -221,7 +304,7 @@ export declare const BuilderUIDescribeSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
221
304
|
}> | undefined;
|
|
222
305
|
tags?: readonly string[] | undefined;
|
|
223
306
|
}>)[]>]>], undefined>;
|
|
224
|
-
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
307
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
225
308
|
}, undefined>, v.ReadonlyAction<{
|
|
226
309
|
type: "describe";
|
|
227
310
|
label: string | Readonly<{
|
|
@@ -272,6 +355,14 @@ export declare const BuilderUIDescribeSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
272
355
|
type: "ref";
|
|
273
356
|
id: string;
|
|
274
357
|
}> | undefined;
|
|
358
|
+
placeholderLabel?: string | Readonly<{
|
|
359
|
+
type: "parameter";
|
|
360
|
+
id: string;
|
|
361
|
+
name: string;
|
|
362
|
+
}> | Readonly<{
|
|
363
|
+
type: "ref";
|
|
364
|
+
id: string;
|
|
365
|
+
}> | undefined;
|
|
275
366
|
metadata?: Readonly<{
|
|
276
367
|
type: "parameter";
|
|
277
368
|
id: string;
|
|
@@ -295,6 +386,7 @@ export declare const validateUIDescribe: (input: unknown, references?: import(".
|
|
|
295
386
|
readonly path: readonly (string | number)[];
|
|
296
387
|
readonly displayName?: string | undefined;
|
|
297
388
|
readonly kind?: string | undefined;
|
|
389
|
+
readonly placeholderLabel?: string | undefined;
|
|
298
390
|
readonly metadata?: {
|
|
299
391
|
readonly [x: string]: unknown;
|
|
300
392
|
} | undefined;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
import { NameSchema } from '../../primitive.js';
|
|
2
3
|
import { isParamable, paramable } from '../../references.js';
|
|
3
4
|
import { createEntityValidator } from '../kind.js';
|
|
4
5
|
import { serialisable } from '../serialisable.js';
|
|
5
6
|
import { BuilderTagsSchema } from '../tags.js';
|
|
6
7
|
import { BuilderUIInputsSerialisedSchema } from './input.js';
|
|
7
|
-
export const BuilderDescriptionItemSchema = v.pipe(v.tuple([
|
|
8
|
+
export const BuilderDescriptionItemSchema = v.pipe(v.tuple([NameSchema, NameSchema]), v.readonly());
|
|
8
9
|
export const BuilderDescriptionSchema = v.pipe(v.array(BuilderDescriptionItemSchema), v.readonly());
|
|
9
10
|
export class BuilderUIDescribe {
|
|
10
11
|
type = 'describe';
|
|
@@ -23,7 +24,7 @@ export class BuilderUIDescribe {
|
|
|
23
24
|
export const BuilderUIDescribeSchema = v.instance(BuilderUIDescribe);
|
|
24
25
|
export const BuilderUIDescribeSerialisedSchema = serialisable(v.object({
|
|
25
26
|
type: v.literal('describe'),
|
|
26
|
-
label: paramable(
|
|
27
|
+
label: paramable(NameSchema),
|
|
27
28
|
inputs: paramable(BuilderUIInputsSerialisedSchema),
|
|
28
29
|
tags: v.optional(BuilderTagsSchema)
|
|
29
30
|
}));
|