@builder-builder/builder 0.0.28 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bb.js +5 -6
- package/dist/client/schema.d.ts +49 -29
- package/dist/components/BuilderOption.svelte.d.ts +12 -12
- package/dist/components/BuilderOptionValueBoolean.svelte.d.ts +20 -0
- package/dist/components/BuilderOptionValueNumber.svelte.d.ts +21 -0
- package/dist/components/BuilderOptionValueSelect.svelte.d.ts +21 -0
- package/dist/components/BuilderOptionValueString.svelte.d.ts +21 -0
- package/dist/components/index.d.ts +8 -8
- package/dist/components/index.js +2479 -2435
- package/dist/components/index.min.js +3 -3
- package/dist/entities/collection/collection.d.ts +162 -372
- package/dist/entities/collection/collection.js +7 -4
- package/dist/entities/collection/{when.d.ts → condition.d.ts} +3 -4
- package/dist/entities/collection/condition.js +2 -0
- package/dist/entities/collection/config.d.ts +52 -70
- package/dist/entities/collection/index.d.ts +4 -4
- package/dist/entities/collection/index.js +2 -2
- package/dist/entities/component/component.d.ts +11 -23
- package/dist/entities/component/component.js +4 -4
- package/dist/entities/component/{when.d.ts → condition.d.ts} +3 -4
- package/dist/entities/component/{when.js → condition.js} +3 -9
- package/dist/entities/component/index.d.ts +4 -4
- package/dist/entities/component/index.js +2 -2
- package/dist/entities/{when.d.ts → condition.d.ts} +21 -34
- package/dist/entities/{when.js → condition.js} +20 -25
- package/dist/entities/expectation.d.ts +135 -3
- package/dist/entities/expectation.js +6 -2
- package/dist/entities/index.d.ts +8 -8
- package/dist/entities/index.js +4 -4
- package/dist/entities/kind.d.ts +1 -1
- package/dist/entities/kind.js +4 -5
- package/dist/entities/model/bind.d.ts +5 -5
- package/dist/entities/model/methods.d.ts +18 -27
- package/dist/entities/model/methods.js +4 -22
- package/dist/entities/model/model.d.ts +3 -1
- package/dist/entities/model/model.js +25 -27
- package/dist/entities/option/condition.d.ts +9 -0
- package/dist/entities/option/condition.js +2 -0
- package/dist/entities/option/config.d.ts +44 -69
- package/dist/entities/option/config.js +6 -6
- package/dist/entities/option/expectation.d.ts +6 -1
- package/dist/entities/option/expectation.js +2 -2
- package/dist/entities/option/index.d.ts +8 -8
- package/dist/entities/option/index.js +4 -4
- package/dist/entities/option/option.d.ts +171 -202
- package/dist/entities/option/option.js +4 -4
- package/dist/entities/option/select.d.ts +16 -43
- package/dist/entities/option/select.js +8 -31
- package/dist/entities/option/value.d.ts +73 -0
- package/dist/entities/option/value.js +99 -0
- package/dist/entities/references.d.ts +104 -64
- package/dist/entities/serialise.d.ts +147 -80
- package/dist/entities/serialise.js +26 -21
- package/dist/entities/ui/input.d.ts +1 -1
- package/dist/entities/validated.d.ts +1 -1
- package/dist/errors/errors.d.ts +8 -3
- package/dist/errors/errors.js +5 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mappers/dependencies.js +4 -3
- package/dist/mappers/resolve.js +23 -22
- package/dist/mappers/variants/option-graph.js +1 -1
- package/dist/public.d.ts +17 -17
- package/dist/public.js +17 -9
- package/dist/validate/expectations.js +21 -3
- package/dist/validate/model.js +8 -11
- package/dist/validate/resolve.js +14 -18
- package/package.json +1 -1
- package/dist/components/BuilderOptionSelect.svelte.d.ts +0 -21
- package/dist/components/BuilderOptionToggleBoolean.svelte.d.ts +0 -20
- package/dist/components/BuilderOptionToggleNumber.svelte.d.ts +0 -21
- package/dist/components/BuilderOptionToggleString.svelte.d.ts +0 -21
- package/dist/entities/collection/when.js +0 -2
- package/dist/entities/option/toggle.d.ts +0 -45
- package/dist/entities/option/toggle.js +0 -71
- package/dist/entities/option/when.d.ts +0 -10
- package/dist/entities/option/when.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
import { BuilderCollectionsSerialisedSchema } from '../collection/index.js';
|
|
3
|
-
import { BuilderComponentsSerialisedSchema } from '../component/index.js';
|
|
2
|
+
import { BuilderCollection, BuilderCollectionsSerialisedSchema } from '../collection/index.js';
|
|
3
|
+
import { BuilderComponent, BuilderComponentsSerialisedSchema, componentConfig } from '../component/index.js';
|
|
4
4
|
import { BuilderExpectationsSerialisedSchema } from '../expectation.js';
|
|
5
|
-
import { BuilderOptionsSerialisedSchema } from '../option/index.js';
|
|
5
|
+
import { BuilderOption, BuilderOptionsSerialisedSchema } from '../option/index.js';
|
|
6
6
|
import { serialisable } from '../serialisable.js';
|
|
7
7
|
import { BuilderTagsSchema } from '../tags.js';
|
|
8
8
|
import { builderCollectionMethod, builderComponentMethod, builderOptionMethod } from './methods.js';
|
|
@@ -27,37 +27,35 @@ export class BuilderModel {
|
|
|
27
27
|
}
|
|
28
28
|
get option() {
|
|
29
29
|
const method = builderOptionMethod();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
const when = (paths, name, config) => {
|
|
34
|
-
return this.#next({ options: [...this.options, method.when(paths, name, config)] });
|
|
35
|
-
};
|
|
36
|
-
return Object.assign(add, { when });
|
|
30
|
+
return ((name, payload) => this.#next({
|
|
31
|
+
options: [...this.options, method(name, payload)]
|
|
32
|
+
}));
|
|
37
33
|
}
|
|
38
34
|
get component() {
|
|
39
35
|
const method = builderComponentMethod();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
const when = (paths, name, config) => {
|
|
44
|
-
return this.#next({
|
|
45
|
-
components: [...this.components, method.when(paths, name, config)]
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
return Object.assign(add, { when });
|
|
36
|
+
return ((name, details) => this.#next({
|
|
37
|
+
components: [...this.components, method(name, details)]
|
|
38
|
+
}));
|
|
49
39
|
}
|
|
50
40
|
get collection() {
|
|
51
41
|
const method = builderCollectionMethod();
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
})
|
|
42
|
+
return ((name, payload) => this.#next({
|
|
43
|
+
collections: [...this.collections, method(name, payload)]
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
if(paths) {
|
|
47
|
+
return {
|
|
48
|
+
option: (name, payload) => this.#next({ options: [...this.options, new BuilderOption(name, payload, paths)] }),
|
|
49
|
+
collection: (name, payload) => this.#next({
|
|
50
|
+
collections: [...this.collections, new BuilderCollection(name, payload, paths)]
|
|
51
|
+
}),
|
|
52
|
+
component: (name, payload) => this.#next({
|
|
53
|
+
components: [
|
|
54
|
+
...this.components,
|
|
55
|
+
new BuilderComponent(name, payload ?? componentConfig(), paths)
|
|
56
|
+
]
|
|
57
|
+
})
|
|
59
58
|
};
|
|
60
|
-
return Object.assign(add, { when });
|
|
61
59
|
}
|
|
62
60
|
expect(...expectations) {
|
|
63
61
|
return this.#next({ expectations: [...this.expectations, ...expectations] });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Paramable } from '../../references';
|
|
2
|
+
import type { BuilderPath } from '../paths';
|
|
3
|
+
import type { BuilderCondition } from '../condition';
|
|
4
|
+
import type { BuilderOptionConfig } from './config';
|
|
5
|
+
export type BuilderOptionCondition = BuilderCondition<Paramable<BuilderOptionConfig>, Paramable<BuilderPath>, Paramable<Record<string, Paramable<BuilderOptionConfig> | null>>, Paramable<BuilderPath>>;
|
|
6
|
+
export declare const optionCondition: {
|
|
7
|
+
match: <const MatchPayload extends Paramable<import("./value").BuilderValueConfig<import("valibot").GenericSchema<string | number | boolean | null>> | import("./select").BuilderSelectConfig<readonly [string, ...string[]], import("valibot").GenericSchema<string | null>>>, const MatchPath extends Paramable<BuilderPath>, const SelectMap extends Paramable<import("..").BuilderMatchSelectMap<Paramable<import("./value").BuilderValueConfig<import("valibot").GenericSchema<string | number | boolean | null>> | import("./select").BuilderSelectConfig<readonly [string, ...string[]], import("valibot").GenericSchema<string | null>>>>>>(matchPath: MatchPath, selectMap: SelectMap) => import("..").BuilderMatchConfig<MatchPayload, MatchPath, SelectMap>;
|
|
8
|
+
unless: <const Values extends Paramable<import("./value").BuilderValueConfig<import("valibot").GenericSchema<string | number | boolean | null>> | import("./select").BuilderSelectConfig<readonly [string, ...string[]], import("valibot").GenericSchema<string | null>>>, const UnlessPath extends Paramable<BuilderPath>>(unlessPath: UnlessPath, disabledValues: import("../../primitive").BuilderPrimitivesNonEmpty, values: Values) => import("..").BuilderUnlessConfig<Values, UnlessPath>;
|
|
9
|
+
};
|
|
@@ -1,109 +1,84 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
export declare const BuilderOptionConfigSchema: v.UnionSchema<[v.InstanceSchema<typeof import("./select.js").BuilderSelectConfig, undefined>, v.InstanceSchema<typeof import("./
|
|
2
|
+
export declare const BuilderOptionConfigSchema: v.UnionSchema<[v.InstanceSchema<typeof import("./select.js").BuilderSelectConfig, undefined>, v.InstanceSchema<typeof import("./value.js").BuilderValueConfig, undefined>], undefined>;
|
|
3
3
|
export type BuilderOptionConfig = v.InferOutput<typeof BuilderOptionConfigSchema>;
|
|
4
|
-
export declare const BuilderOptionConfigSerialisedSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly defaultValue: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
4
|
+
export declare const BuilderOptionConfigSerialisedSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"kind", [v.StrictObjectSchema<{
|
|
5
|
+
readonly kind: v.PicklistSchema<["string", "boolean", "number"], undefined>;
|
|
6
|
+
readonly type: v.LiteralSchema<"value", undefined>;
|
|
7
|
+
readonly defaultValue: v.NullableSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
8
8
|
readonly isOptional: v.BooleanSchema<undefined>;
|
|
9
|
-
readonly optionLabels: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
10
9
|
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>;
|
|
11
|
-
}, undefined>, v.
|
|
12
|
-
|
|
13
|
-
readonly options: readonly [string, ...string[]]
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
optionLabels: {
|
|
17
|
-
[x: string]: string;
|
|
18
|
-
};
|
|
19
|
-
tags?: readonly string[] | undefined;
|
|
20
|
-
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
21
|
-
readonly type: v.LiteralSchema<"toggle", undefined>;
|
|
22
|
-
readonly kind: v.PicklistSchema<["string", "boolean", "number"], undefined>;
|
|
10
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
11
|
+
readonly kind: v.LiteralSchema<"select", undefined>;
|
|
12
|
+
readonly options: v.SchemaWithPipe<readonly [v.TupleWithRestSchema<[v.StringSchema<undefined>], v.StringSchema<undefined>, undefined>, v.ReadonlyAction<[string, ...string[]]>]>;
|
|
13
|
+
readonly optionLabels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
14
|
+
readonly type: v.LiteralSchema<"value", undefined>;
|
|
23
15
|
readonly defaultValue: v.NullableSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
24
16
|
readonly isOptional: v.BooleanSchema<undefined>;
|
|
25
17
|
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
26
|
-
}, undefined>, v.ReadonlyAction<{
|
|
27
|
-
type: "toggle";
|
|
18
|
+
}, undefined>], undefined>, v.ReadonlyAction<{
|
|
28
19
|
kind: "string" | "number" | "boolean";
|
|
20
|
+
type: "value";
|
|
29
21
|
defaultValue: string | number | boolean | null;
|
|
30
22
|
isOptional: boolean;
|
|
31
23
|
tags?: readonly string[] | undefined;
|
|
32
|
-
}
|
|
33
|
-
|
|
24
|
+
} | {
|
|
25
|
+
kind: "select";
|
|
34
26
|
readonly options: readonly [string, ...string[]];
|
|
35
|
-
|
|
36
|
-
isOptional: boolean;
|
|
37
|
-
optionLabels: {
|
|
27
|
+
optionLabels?: {
|
|
38
28
|
[x: string]: string;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
}> | Readonly<{
|
|
42
|
-
type: "toggle";
|
|
43
|
-
kind: "string" | "number" | "boolean";
|
|
29
|
+
} | undefined;
|
|
30
|
+
type: "value";
|
|
44
31
|
defaultValue: string | number | boolean | null;
|
|
45
32
|
isOptional: boolean;
|
|
46
33
|
tags?: readonly string[] | undefined;
|
|
47
|
-
}
|
|
34
|
+
}>]>;
|
|
48
35
|
export type BuilderOptionConfigSerialised = v.InferOutput<typeof BuilderOptionConfigSerialisedSchema>;
|
|
49
|
-
export declare const BuilderOptionConfigsSerialisedSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.VariantSchema<"
|
|
50
|
-
readonly
|
|
51
|
-
readonly
|
|
52
|
-
readonly defaultValue: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
36
|
+
export declare const BuilderOptionConfigsSerialisedSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.VariantSchema<"kind", [v.StrictObjectSchema<{
|
|
37
|
+
readonly kind: v.PicklistSchema<["string", "boolean", "number"], undefined>;
|
|
38
|
+
readonly type: v.LiteralSchema<"value", undefined>;
|
|
39
|
+
readonly defaultValue: v.NullableSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
53
40
|
readonly isOptional: v.BooleanSchema<undefined>;
|
|
54
|
-
readonly optionLabels: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
55
41
|
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>;
|
|
56
|
-
}, undefined>, v.
|
|
57
|
-
|
|
58
|
-
readonly options: readonly [string, ...string[]]
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
optionLabels: {
|
|
62
|
-
[x: string]: string;
|
|
63
|
-
};
|
|
64
|
-
tags?: readonly string[] | undefined;
|
|
65
|
-
}>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
66
|
-
readonly type: v.LiteralSchema<"toggle", undefined>;
|
|
67
|
-
readonly kind: v.PicklistSchema<["string", "boolean", "number"], undefined>;
|
|
42
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
43
|
+
readonly kind: v.LiteralSchema<"select", undefined>;
|
|
44
|
+
readonly options: v.SchemaWithPipe<readonly [v.TupleWithRestSchema<[v.StringSchema<undefined>], v.StringSchema<undefined>, undefined>, v.ReadonlyAction<[string, ...string[]]>]>;
|
|
45
|
+
readonly optionLabels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
46
|
+
readonly type: v.LiteralSchema<"value", undefined>;
|
|
68
47
|
readonly defaultValue: v.NullableSchema<v.UnionSchema<[v.BooleanSchema<undefined>, v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
69
48
|
readonly isOptional: v.BooleanSchema<undefined>;
|
|
70
49
|
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>;
|
|
71
|
-
}, undefined>, v.ReadonlyAction<{
|
|
72
|
-
type: "toggle";
|
|
50
|
+
}, undefined>], undefined>, v.ReadonlyAction<{
|
|
73
51
|
kind: "string" | "number" | "boolean";
|
|
52
|
+
type: "value";
|
|
74
53
|
defaultValue: string | number | boolean | null;
|
|
75
54
|
isOptional: boolean;
|
|
76
55
|
tags?: readonly string[] | undefined;
|
|
77
|
-
}
|
|
78
|
-
|
|
56
|
+
} | {
|
|
57
|
+
kind: "select";
|
|
79
58
|
readonly options: readonly [string, ...string[]];
|
|
80
|
-
|
|
81
|
-
isOptional: boolean;
|
|
82
|
-
optionLabels: {
|
|
59
|
+
optionLabels?: {
|
|
83
60
|
[x: string]: string;
|
|
84
|
-
};
|
|
61
|
+
} | undefined;
|
|
62
|
+
type: "value";
|
|
63
|
+
defaultValue: string | number | boolean | null;
|
|
64
|
+
isOptional: boolean;
|
|
85
65
|
tags?: readonly string[] | undefined;
|
|
86
|
-
}>
|
|
87
|
-
type: "toggle";
|
|
66
|
+
}>]>, undefined>, v.ReadonlyAction<(Readonly<{
|
|
88
67
|
kind: "string" | "number" | "boolean";
|
|
68
|
+
type: "value";
|
|
89
69
|
defaultValue: string | number | boolean | null;
|
|
90
70
|
isOptional: boolean;
|
|
91
71
|
tags?: readonly string[] | undefined;
|
|
92
|
-
}
|
|
93
|
-
|
|
72
|
+
}> | Readonly<{
|
|
73
|
+
kind: "select";
|
|
94
74
|
readonly options: readonly [string, ...string[]];
|
|
95
|
-
|
|
96
|
-
isOptional: boolean;
|
|
97
|
-
optionLabels: {
|
|
75
|
+
optionLabels?: {
|
|
98
76
|
[x: string]: string;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
}>> | Readonly<Readonly<{
|
|
102
|
-
type: "toggle";
|
|
103
|
-
kind: "string" | "number" | "boolean";
|
|
77
|
+
} | undefined;
|
|
78
|
+
type: "value";
|
|
104
79
|
defaultValue: string | number | boolean | null;
|
|
105
80
|
isOptional: boolean;
|
|
106
81
|
tags?: readonly string[] | undefined;
|
|
107
|
-
}
|
|
82
|
+
}>)[]>]>;
|
|
108
83
|
export type BuilderOptionConfigsSerialised = v.InferOutput<typeof BuilderOptionConfigsSerialisedSchema>;
|
|
109
84
|
export declare function optionValueSchema(payload: BuilderOptionConfigSerialised): v.GenericSchema;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
import { BuilderSelectConfigSchema,
|
|
3
|
-
import {
|
|
2
|
+
import { BuilderSelectConfigSchema, selectValueSchema } from './select.js';
|
|
3
|
+
import { BuilderValueConfigSchema, BuilderValueConfigSerialisedSchema, valueKindSchema } from './value.js';
|
|
4
4
|
export const BuilderOptionConfigSchema = v.union([
|
|
5
5
|
BuilderSelectConfigSchema,
|
|
6
|
-
|
|
6
|
+
BuilderValueConfigSchema
|
|
7
7
|
]);
|
|
8
|
-
export const BuilderOptionConfigSerialisedSchema =
|
|
8
|
+
export const BuilderOptionConfigSerialisedSchema = BuilderValueConfigSerialisedSchema;
|
|
9
9
|
export const BuilderOptionConfigsSerialisedSchema = v.pipe(v.array(BuilderOptionConfigSerialisedSchema), v.readonly());
|
|
10
10
|
export function optionValueSchema(payload) {
|
|
11
|
-
if (payload.
|
|
11
|
+
if (payload.kind === 'select') {
|
|
12
12
|
return selectValueSchema(payload.options, payload.isOptional);
|
|
13
13
|
}
|
|
14
|
-
return
|
|
14
|
+
return valueKindSchema(payload.kind, payload.isOptional);
|
|
15
15
|
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
import type { BuilderOptionConfig } from './config';
|
|
1
2
|
import { BuilderExpectation } from '../expectation.js';
|
|
2
|
-
export declare function optionExpectation<const Name extends string>(name: Name): BuilderExpectation<Name,
|
|
3
|
+
export declare function optionExpectation<const Name extends string, const Payload extends BuilderOptionConfig | null = null>(name: Name, payload?: Payload): BuilderExpectation<Name, OptionExpectationValue<Payload>, "option">;
|
|
4
|
+
type OptionExpectationValue<Payload> = Payload extends {
|
|
5
|
+
readonly value: infer Value;
|
|
6
|
+
} ? Value : unknown;
|
|
7
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BuilderExpectation } from '../expectation.js';
|
|
2
|
-
export function optionExpectation(name) {
|
|
3
|
-
return new BuilderExpectation(name, 'option');
|
|
2
|
+
export function optionExpectation(name, payload) {
|
|
3
|
+
return new BuilderExpectation(name, 'option', payload ?? null);
|
|
4
4
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type { BuilderOptionConfig, BuilderOptionConfigSerialised, BuilderOptionConfigsSerialised } from './config';
|
|
2
|
-
export type { BuilderOptionPayload, BuilderOptions, BuilderOptionSerialised, BuilderOptionsSerialised,
|
|
3
|
-
export type {
|
|
4
|
-
export type {
|
|
5
|
-
export type {
|
|
2
|
+
export type { BuilderOptionPayload, BuilderOptions, BuilderOptionSerialised, BuilderOptionsSerialised, BuilderOptionConditionSerialised } from './option';
|
|
3
|
+
export type { BuilderValueOptionLabels, BuilderValueOptions } from './select';
|
|
4
|
+
export type { BuilderValueConfigSerialised, BuilderValueKind } from './value';
|
|
5
|
+
export type { BuilderOptionCondition } from './condition';
|
|
6
6
|
export { BuilderOptionConfigSchema, BuilderOptionConfigSerialisedSchema, BuilderOptionConfigsSerialisedSchema, optionValueSchema } from './config.js';
|
|
7
7
|
export { optionExpectation } from './expectation.js';
|
|
8
|
-
export { BuilderOption, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema,
|
|
9
|
-
export { BuilderSelectConfig, BuilderSelectConfigSchema,
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
8
|
+
export { BuilderOption, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema, BuilderOptionConditionSerialisedSchema, validateOptionSelectMap, validateOptionCondition } from './option.js';
|
|
9
|
+
export { BuilderSelectConfig, BuilderSelectConfigSchema, valueSelect } from './select.js';
|
|
10
|
+
export { BuilderValueConfig, BuilderValueConfigSchema, BuilderValueConfigSerialisedSchema, valueBoolean, valueNumber, valueString, validateValue } from './value.js';
|
|
11
|
+
export { optionCondition } from './condition.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { BuilderOptionConfigSchema, BuilderOptionConfigSerialisedSchema, BuilderOptionConfigsSerialisedSchema, optionValueSchema } from './config.js';
|
|
2
2
|
export { optionExpectation } from './expectation.js';
|
|
3
|
-
export { BuilderOption, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema,
|
|
4
|
-
export { BuilderSelectConfig, BuilderSelectConfigSchema,
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
3
|
+
export { BuilderOption, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema, BuilderOptionConditionSerialisedSchema, validateOptionSelectMap, validateOptionCondition } from './option.js';
|
|
4
|
+
export { BuilderSelectConfig, BuilderSelectConfigSchema, valueSelect } from './select.js';
|
|
5
|
+
export { BuilderValueConfig, BuilderValueConfigSchema, BuilderValueConfigSerialisedSchema, valueBoolean, valueNumber, valueString, validateValue } from './value.js';
|
|
6
|
+
export { optionCondition } from './condition.js';
|