@builder-builder/builder 0.0.14 → 0.0.16
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 +9 -5
- package/dist/bb.js +12 -5
- package/dist/check.d.ts +2 -2
- package/dist/entities/builder/builder.d.ts +19 -5
- package/dist/entities/builder/builder.js +24 -5
- package/dist/entities/builder/index.d.ts +1 -2
- package/dist/entities/builder/index.js +1 -2
- package/dist/entities/collection/collection.d.ts +7 -1
- package/dist/entities/collection/collection.js +9 -2
- package/dist/entities/collection/config.d.ts +6 -1
- package/dist/entities/collection/config.js +9 -2
- package/dist/entities/component/component.d.ts +41 -1
- package/dist/entities/component/component.js +9 -2
- package/dist/entities/component/details.d.ts +11 -2
- package/dist/entities/component/details.js +9 -2
- package/dist/entities/component/field.d.ts +10 -1
- package/dist/entities/component/field.js +13 -3
- package/dist/entities/index.d.ts +5 -1
- package/dist/entities/index.js +2 -0
- package/dist/entities/kind.d.ts +1 -1
- package/dist/entities/model/methods.d.ts +3 -3
- package/dist/entities/model/model.d.ts +5 -1
- package/dist/entities/model/model.js +10 -3
- package/dist/entities/model/models.js +9 -5
- package/dist/entities/option/option.d.ts +41 -1
- package/dist/entities/option/option.js +9 -2
- package/dist/entities/option/select.d.ts +7 -1
- package/dist/entities/option/select.js +17 -6
- package/dist/entities/option/toggle.d.ts +7 -1
- package/dist/entities/option/toggle.js +16 -4
- package/dist/entities/option/values.d.ts +6 -0
- package/dist/entities/pricing/expression.d.ts +70 -0
- package/dist/entities/pricing/expression.js +43 -0
- package/dist/entities/pricing/index.d.ts +6 -0
- package/dist/entities/pricing/index.js +3 -0
- package/dist/entities/pricing/pricing.d.ts +17 -0
- package/dist/entities/pricing/pricing.js +21 -0
- package/dist/entities/pricing/rates.d.ts +3 -0
- package/dist/entities/pricing/rates.js +3 -0
- package/dist/entities/serialise.d.ts +549 -495
- package/dist/entities/serialise.js +65 -41
- package/dist/entities/tags.d.ts +3 -0
- package/dist/entities/tags.js +2 -0
- package/dist/entities/ui/describe.d.ts +10 -1
- package/dist/entities/ui/describe.js +9 -2
- package/dist/entities/ui/input.d.ts +10 -1
- package/dist/entities/ui/input.js +17 -5
- package/dist/entities/ui/page.d.ts +10 -1
- package/dist/entities/ui/page.js +9 -2
- package/dist/entities/ui/pages.d.ts +5 -1
- package/dist/entities/ui/pages.js +9 -2
- package/dist/entities/ui/ui.d.ts +6 -1
- package/dist/entities/ui/ui.js +27 -12
- package/dist/entities/validated.d.ts +3 -1
- package/dist/environment.d.ts +1 -1
- package/dist/exception.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/instance.d.ts +9 -0
- package/dist/instance.js +3 -1
- package/dist/mappers/index.d.ts +3 -2
- package/dist/mappers/index.js +2 -1
- package/dist/mappers/price.d.ts +3 -0
- package/dist/mappers/price.js +111 -0
- package/dist/validate/builder.js +16 -7
- package/dist/validate/errors.d.ts +19 -1
- package/dist/validate/errors.js +15 -0
- package/dist/validate/index.d.ts +3 -1
- package/dist/validate/index.js +1 -0
- package/dist/validate/model.js +5 -62
- package/dist/validate/paths.d.ts +5 -0
- package/dist/validate/paths.js +68 -0
- package/dist/validate/pricing.d.ts +8 -0
- package/dist/validate/pricing.js +127 -0
- package/dist/validate/ui.js +60 -1
- package/dist/validate/variants.js +4 -0
- package/package.json +1 -10
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -53
- package/dist/codegen/index.d.ts +0 -7
- package/dist/codegen/index.js +0 -212
- package/dist/codegen/template.d.ts +0 -5
- package/dist/codegen/template.js +0 -17
- package/dist/entities/builder/factory.d.ts +0 -7
- package/dist/entities/builder/factory.js +0 -4
package/dist/bb.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BuilderComponentVariantsValidated, BuilderInstanceValidated, BuilderModelValidated, BuilderRefEntities, BuilderUIValidated, BuilderValidated } from './entities/index';
|
|
1
|
+
import type { BuilderComponentVariantsValidated, BuilderInstanceValidated, BuilderModelValidated, BuilderPricingValidated, BuilderRefEntities, BuilderUIValidated, BuilderValidated } from './entities/index';
|
|
2
2
|
import type { BuilderEnvironment, BuilderEnvironmentResult } from './environment';
|
|
3
3
|
import type { BuilderOrder, BuilderRenderResult } from './mappers/index';
|
|
4
4
|
import type { BuilderComponentVariants, BuilderInstance, BuilderInstanceInput } from './instance';
|
|
@@ -9,6 +9,7 @@ export type BB<Env extends BuilderEnvironment = 'production'> = {
|
|
|
9
9
|
readonly validate: {
|
|
10
10
|
builder(input: unknown): BuilderEnvironmentResult<BuilderValidated, Env>;
|
|
11
11
|
model(input: unknown): BuilderEnvironmentResult<BuilderModelValidated, Env>;
|
|
12
|
+
pricing(input: unknown): BuilderEnvironmentResult<BuilderPricingValidated, Env>;
|
|
12
13
|
ui(input: unknown): BuilderEnvironmentResult<BuilderUIValidated, Env>;
|
|
13
14
|
instance(model: BuilderModelValidated, instance: BuilderInstance): BuilderEnvironmentResult<BuilderInstanceValidated, Env>;
|
|
14
15
|
variants(model: BuilderModelValidated, input: unknown, options?: {
|
|
@@ -18,11 +19,14 @@ export type BB<Env extends BuilderEnvironment = 'production'> = {
|
|
|
18
19
|
instance(entity: BuilderValidated | BuilderModelValidated, partial?: BuilderInstanceInput): BuilderInstance;
|
|
19
20
|
render(builder: BuilderValidated, instance: BuilderInstanceValidated): BuilderRenderResult;
|
|
20
21
|
order(model: BuilderModelValidated, instance: BuilderInstanceValidated, variants: BuilderComponentVariantsValidated): BuilderOrder;
|
|
22
|
+
price(pricing: BuilderPricingValidated, order: BuilderOrder): number | null;
|
|
21
23
|
variants(entity: BuilderValidated | BuilderModelValidated): BuilderComponentVariants;
|
|
22
24
|
};
|
|
23
|
-
export declare const bb: typeof
|
|
24
|
-
|
|
25
|
+
export declare const bb: typeof bbProduction & {
|
|
26
|
+
development: typeof bbDevelopment;
|
|
27
|
+
staging: typeof bbProduction;
|
|
28
|
+
production: typeof bbProduction;
|
|
25
29
|
};
|
|
26
|
-
declare function
|
|
27
|
-
declare function
|
|
30
|
+
declare function bbProduction(options?: BBOptions): BB<'production'>;
|
|
31
|
+
declare function bbDevelopment(options?: BBOptions): BB<'development'>;
|
|
28
32
|
export {};
|
package/dist/bb.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { BuilderException } from './exception.js';
|
|
2
|
-
import { assertValidated, createInstance, createVariants, order, render, validateBuilder, validateInstance, validateModel, validateUI, validateVariants } from './mappers/index.js';
|
|
3
|
-
export const bb = Object.assign(
|
|
4
|
-
|
|
2
|
+
import { assertValidated, createInstance, createVariants, order, price, render, validateBuilder, validateInstance, validateModel, validatePricing, validateUI, validateVariants } from './mappers/index.js';
|
|
3
|
+
export const bb = Object.assign(bbProduction, {
|
|
4
|
+
development: bbDevelopment,
|
|
5
|
+
staging: bbProduction,
|
|
6
|
+
production: bbProduction
|
|
5
7
|
});
|
|
6
|
-
function
|
|
8
|
+
function bbProduction(options = {}) {
|
|
7
9
|
return bbFactory('production', options.references);
|
|
8
10
|
}
|
|
9
|
-
function
|
|
11
|
+
function bbDevelopment(options = {}) {
|
|
10
12
|
return bbFactory('development', options.references);
|
|
11
13
|
}
|
|
12
14
|
function bbFactory(environment, references = []) {
|
|
@@ -14,6 +16,7 @@ function bbFactory(environment, references = []) {
|
|
|
14
16
|
validate: {
|
|
15
17
|
builder: (input) => throwInProd(validateBuilder(input, references)),
|
|
16
18
|
model: (input) => throwInProd(validateModel(input, references)),
|
|
19
|
+
pricing: (input) => throwInProd(validatePricing(input, references)),
|
|
17
20
|
ui: (input) => throwInProd(validateUI(input, references)),
|
|
18
21
|
instance: (model, instance) => throwInProd(validateInstance(model, instance)),
|
|
19
22
|
variants: (model, input, variantOptions) => throwInProd(validateVariants(model, input, variantOptions))
|
|
@@ -33,6 +36,10 @@ function bbFactory(environment, references = []) {
|
|
|
33
36
|
assertValidated(variants);
|
|
34
37
|
return order(model, instance, variants, references);
|
|
35
38
|
},
|
|
39
|
+
price: (pricing, order) => {
|
|
40
|
+
assertValidated(pricing);
|
|
41
|
+
return price(pricing, order);
|
|
42
|
+
},
|
|
36
43
|
variants: (entity) => {
|
|
37
44
|
assertValidated(entity);
|
|
38
45
|
return createVariants(entity);
|
package/dist/check.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as v from 'valibot';
|
|
|
2
2
|
declare class Check {
|
|
3
3
|
truthy<Input>(input: Input, message?: `${string}! ❌`): asserts input is Exclude<Input, null | undefined | '' | 0 | false>;
|
|
4
4
|
falsy(input: unknown, message?: `${string}! ❌`): void;
|
|
5
|
-
is<const Schema extends v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>>(schema: Schema, input: unknown): input is v.
|
|
6
|
-
assert<const Schema extends v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>>(schema: Schema, input: unknown, message?: `${string}! ❌`): asserts input is v.
|
|
5
|
+
is<const Schema extends v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>>(schema: Schema, input: unknown): input is v.InferOutput<Schema>;
|
|
6
|
+
assert<const Schema extends v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>>(schema: Schema, input: unknown, message?: `${string}! ❌`): asserts input is v.InferOutput<Schema>;
|
|
7
7
|
}
|
|
8
8
|
export declare const check: Check;
|
|
9
9
|
export {};
|
|
@@ -1,21 +1,35 @@
|
|
|
1
|
+
import type { BuilderModelSerialised } from '../model/model';
|
|
1
2
|
import type { BuilderModelBindings, BuilderModelBoundState } from '../model/bind';
|
|
2
3
|
import type { BuilderModelState } from '../model/state';
|
|
4
|
+
import type { BuilderPricingSerialised } from '../pricing/index';
|
|
5
|
+
import type { BuilderTags } from '../tags';
|
|
6
|
+
import type { BuilderUISerialised } from '../ui/ui';
|
|
3
7
|
import type { BuilderBindings, BuilderBindingsSerialised } from './bind';
|
|
4
8
|
import * as v from 'valibot';
|
|
5
|
-
import { BuilderModel
|
|
6
|
-
import {
|
|
9
|
+
import { BuilderModel } from '../model/index.js';
|
|
10
|
+
import { BuilderPricing } from '../pricing/index.js';
|
|
11
|
+
import { BuilderUI } from '../ui/index.js';
|
|
7
12
|
export declare class Builder<State extends BuilderModelState = BuilderModelState> {
|
|
13
|
+
#private;
|
|
8
14
|
readonly type: 'builder';
|
|
9
15
|
readonly model: BuilderModel<State>;
|
|
10
16
|
readonly ui: BuilderUI;
|
|
11
17
|
readonly bindings: BuilderBindings;
|
|
12
|
-
|
|
18
|
+
readonly tags?: BuilderTags;
|
|
19
|
+
readonly pricing: BuilderPricing;
|
|
20
|
+
constructor(model?: BuilderModel<State>, ui?: BuilderUI<import("..").BuilderModelGeneric>, pricing?: BuilderPricing, bindings?: BuilderBindings, tags?: BuilderTags);
|
|
13
21
|
bind<const Bindings extends BuilderBindings>(extra: Bindings): Bindings extends BuilderModelBindings<State> ? Builder<BuilderModelBoundState<State, Bindings>> : Builder<State>;
|
|
22
|
+
tag(...tags: Array<string>): Builder<State>;
|
|
23
|
+
priced(pricing: BuilderPricing): Builder<State>;
|
|
14
24
|
}
|
|
15
25
|
export declare const BuilderSchema: v.InstanceSchema<typeof Builder, undefined>;
|
|
26
|
+
export declare function builder(): Builder<BuilderModelState>;
|
|
27
|
+
export declare function builder<const State extends BuilderModelState>(model: BuilderModel<State>, ui?: BuilderUI, pricing?: BuilderPricing): Builder<State>;
|
|
16
28
|
export interface BuilderSerialised {
|
|
17
|
-
readonly model:
|
|
18
|
-
readonly ui:
|
|
29
|
+
readonly model: BuilderModelSerialised;
|
|
30
|
+
readonly ui: BuilderUISerialised;
|
|
19
31
|
readonly bindings: BuilderBindingsSerialised;
|
|
32
|
+
readonly tags?: BuilderTags;
|
|
33
|
+
readonly pricing: BuilderPricingSerialised;
|
|
20
34
|
}
|
|
21
35
|
export declare const BuilderSerialisedSchema: v.GenericSchema<BuilderSerialised>;
|
|
@@ -2,26 +2,45 @@ import * as v from 'valibot';
|
|
|
2
2
|
import { BuilderRefSerialisedSchema } from '../../references.js';
|
|
3
3
|
import { serialisable } from '../../serialisable.js';
|
|
4
4
|
import { BuilderModel, BuilderModelSerialisedSchema } from '../model/index.js';
|
|
5
|
+
import { BuilderPricing, BuilderPricingSerialisedSchema } from '../pricing/index.js';
|
|
6
|
+
import { BuilderTagsSchema } from '../tags.js';
|
|
5
7
|
import { BuilderUI, BuilderUISerialisedSchema } from '../ui/index.js';
|
|
6
8
|
export class Builder {
|
|
7
9
|
model;
|
|
8
10
|
ui;
|
|
9
11
|
bindings;
|
|
10
|
-
|
|
12
|
+
tags;
|
|
13
|
+
pricing;
|
|
14
|
+
constructor(model = new BuilderModel(), ui = new BuilderUI([], [], []), pricing = new BuilderPricing(), bindings = {}, tags) {
|
|
11
15
|
this.model = model;
|
|
12
16
|
this.ui = ui;
|
|
17
|
+
this.pricing = pricing;
|
|
13
18
|
this.bindings = bindings;
|
|
19
|
+
this.tags = tags;
|
|
20
|
+
}
|
|
21
|
+
#next(patch) {
|
|
22
|
+
return new Builder(this.model, this.ui, patch.pricing ?? this.pricing, patch.bindings ?? this.bindings, patch.tags ?? this.tags);
|
|
14
23
|
}
|
|
15
24
|
bind(extra) {
|
|
16
|
-
return
|
|
17
|
-
...this.bindings,
|
|
18
|
-
...extra
|
|
25
|
+
return this.#next({
|
|
26
|
+
bindings: { ...this.bindings, ...extra }
|
|
19
27
|
});
|
|
20
28
|
}
|
|
29
|
+
tag(...tags) {
|
|
30
|
+
return this.#next({ tags });
|
|
31
|
+
}
|
|
32
|
+
priced(pricing) {
|
|
33
|
+
return this.#next({ pricing });
|
|
34
|
+
}
|
|
21
35
|
}
|
|
22
36
|
export const BuilderSchema = v.instance(Builder);
|
|
37
|
+
export function builder(model, ui, pricing) {
|
|
38
|
+
return new Builder(model, ui, pricing);
|
|
39
|
+
}
|
|
23
40
|
export const BuilderSerialisedSchema = serialisable(v.object({
|
|
24
41
|
model: BuilderModelSerialisedSchema,
|
|
25
42
|
ui: BuilderUISerialisedSchema,
|
|
26
|
-
bindings: v.pipe(v.record(v.string(), v.union([BuilderRefSerialisedSchema, v.unknown()])), v.readonly())
|
|
43
|
+
bindings: v.pipe(v.record(v.string(), v.union([BuilderRefSerialisedSchema, v.unknown()])), v.readonly()),
|
|
44
|
+
tags: v.optional(BuilderTagsSchema),
|
|
45
|
+
pricing: BuilderPricingSerialisedSchema
|
|
27
46
|
}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export type { BuilderBindings, BuilderBindingsSerialised } from './bind';
|
|
2
2
|
export type { BuilderSerialised } from './builder';
|
|
3
|
-
export { Builder, BuilderSchema, BuilderSerialisedSchema } from './builder.js';
|
|
4
|
-
export { builder } from './factory.js';
|
|
3
|
+
export { Builder, builder, BuilderSchema, BuilderSerialisedSchema } from './builder.js';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { Builder, BuilderSchema, BuilderSerialisedSchema } from './builder.js';
|
|
2
|
-
export { builder } from './factory.js';
|
|
1
|
+
export { Builder, builder, BuilderSchema, BuilderSerialisedSchema } from './builder.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BuilderPaths } from '../../paths';
|
|
2
2
|
import type { Paramable, ParamableSerialised } from '../../references';
|
|
3
3
|
import type { BuilderModelState } from '../model/index';
|
|
4
|
+
import type { BuilderTags } from '../tags';
|
|
4
5
|
import type { BuilderWhenSerialised } from '../when';
|
|
5
6
|
import type { BuilderCollectionConfig, BuilderCollectionConfigSerialised } from './config';
|
|
6
7
|
import type { BuilderCollectionWhen } from './when';
|
|
@@ -11,7 +12,9 @@ export declare class BuilderCollection<const Name extends string = string, const
|
|
|
11
12
|
readonly name: Name;
|
|
12
13
|
readonly payload: Payload;
|
|
13
14
|
readonly paths?: Paths;
|
|
14
|
-
|
|
15
|
+
readonly tags?: BuilderTags;
|
|
16
|
+
constructor(name: Name, payload: Payload, paths?: Paths, tags?: BuilderTags);
|
|
17
|
+
tag(...tags: Array<string>): BuilderCollection<Name, Payload, Paths>;
|
|
15
18
|
}
|
|
16
19
|
export declare const BuilderCollectionSchema: v.InstanceSchema<typeof BuilderCollection, undefined>;
|
|
17
20
|
export type BuilderCollections = ReadonlyArray<BuilderCollection>;
|
|
@@ -40,6 +43,7 @@ export declare const BuilderCollectionWhenSerialisedSchema: v.GenericSchema<Buil
|
|
|
40
43
|
type: "ref";
|
|
41
44
|
id: string;
|
|
42
45
|
}>;
|
|
46
|
+
tags?: readonly string[] | undefined;
|
|
43
47
|
}>>>;
|
|
44
48
|
export type BuilderCollectionWhenSerialised = BuilderWhenSerialised<BuilderCollectionConfigSerialised>;
|
|
45
49
|
export declare const BuilderCollectionSelectMapSerialisedSchema: v.GenericSchema<import("..").BuilderMatchSelectMap<Readonly<{
|
|
@@ -71,11 +75,13 @@ export declare const BuilderCollectionSelectMapSerialisedSchema: v.GenericSchema
|
|
|
71
75
|
type: "ref";
|
|
72
76
|
id: string;
|
|
73
77
|
}>;
|
|
78
|
+
tags?: readonly string[] | undefined;
|
|
74
79
|
}>>>;
|
|
75
80
|
export type BuilderCollectionSerialised = {
|
|
76
81
|
readonly name: string;
|
|
77
82
|
readonly paths?: ParamableSerialised<BuilderPaths>;
|
|
78
83
|
readonly payload: ParamableSerialised<BuilderCollectionConfigSerialised | BuilderCollectionWhenSerialised>;
|
|
84
|
+
readonly tags?: BuilderTags;
|
|
79
85
|
};
|
|
80
86
|
export declare const BuilderCollectionSerialisedSchema: v.GenericSchema<BuilderCollectionSerialised>;
|
|
81
87
|
export declare const BuilderCollectionsSerialisedSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.GenericSchema<BuilderCollectionSerialised>, undefined>, v.ReadonlyAction<BuilderCollectionSerialised[]>]>;
|
|
@@ -2,16 +2,22 @@ import * as v from 'valibot';
|
|
|
2
2
|
import { BuilderPathsSchema } from '../../paths.js';
|
|
3
3
|
import { paramable } from '../../references.js';
|
|
4
4
|
import { serialisable } from '../../serialisable.js';
|
|
5
|
+
import { BuilderTagsSchema } from '../tags.js';
|
|
5
6
|
import { createSelectMapSerialisedSchema, createWhenSerialisedSchema } from '../when.js';
|
|
6
7
|
import { BuilderCollectionConfigSerialisedSchema } from './config.js';
|
|
7
8
|
export class BuilderCollection {
|
|
8
9
|
name;
|
|
9
10
|
payload;
|
|
10
11
|
paths;
|
|
11
|
-
|
|
12
|
+
tags;
|
|
13
|
+
constructor(name, payload, paths, tags) {
|
|
12
14
|
this.name = name;
|
|
13
15
|
this.payload = payload;
|
|
14
16
|
this.paths = paths;
|
|
17
|
+
this.tags = tags;
|
|
18
|
+
}
|
|
19
|
+
tag(...tags) {
|
|
20
|
+
return new BuilderCollection(this.name, this.payload, this.paths, tags);
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
export const BuilderCollectionSchema = v.instance(BuilderCollection);
|
|
@@ -20,6 +26,7 @@ export const BuilderCollectionSelectMapSerialisedSchema = createSelectMapSeriali
|
|
|
20
26
|
export const BuilderCollectionSerialisedSchema = serialisable(v.object({
|
|
21
27
|
name: v.string(),
|
|
22
28
|
payload: paramable(v.union([BuilderCollectionConfigSerialisedSchema, BuilderCollectionWhenSerialisedSchema])),
|
|
23
|
-
paths: v.optional(paramable(BuilderPathsSchema))
|
|
29
|
+
paths: v.optional(paramable(BuilderPathsSchema)),
|
|
30
|
+
tags: v.optional(BuilderTagsSchema)
|
|
24
31
|
}));
|
|
25
32
|
export const BuilderCollectionsSerialisedSchema = v.pipe(v.array(BuilderCollectionSerialisedSchema), v.readonly());
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { Paramable } from '../../references';
|
|
2
2
|
import type { BuilderModelGeneric } from '../model/index';
|
|
3
|
+
import type { BuilderTags } from '../tags';
|
|
3
4
|
import * as v from 'valibot';
|
|
4
5
|
export declare class BuilderCollectionConfig<Model extends Paramable<BuilderModelGeneric> = Paramable<BuilderModelGeneric>, Min extends Paramable<number> = Paramable<number>, Max extends Paramable<number> = Paramable<number>> {
|
|
5
6
|
readonly type: 'collection-config';
|
|
6
7
|
readonly model: Model;
|
|
7
8
|
readonly min: Min;
|
|
8
9
|
readonly max: Max;
|
|
9
|
-
|
|
10
|
+
readonly tags?: BuilderTags;
|
|
11
|
+
constructor(model: Model, min: Min, max: Max, tags?: BuilderTags);
|
|
12
|
+
tag(...tags: Array<string>): BuilderCollectionConfig<Model, Min, Max>;
|
|
10
13
|
}
|
|
11
14
|
export declare const BuilderCollectionConfigSchema: v.InstanceSchema<typeof BuilderCollectionConfig, undefined>;
|
|
12
15
|
export declare const BuilderCollectionConfigSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
@@ -55,6 +58,7 @@ export declare const BuilderCollectionConfigSerialisedSchema: v.SchemaWithPipe<r
|
|
|
55
58
|
type: "ref";
|
|
56
59
|
id: string;
|
|
57
60
|
}>]>, v.NumberSchema<undefined>], undefined>;
|
|
61
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
58
62
|
}, undefined>, v.ReadonlyAction<{
|
|
59
63
|
model: Readonly<{
|
|
60
64
|
type: "parameter";
|
|
@@ -80,6 +84,7 @@ export declare const BuilderCollectionConfigSerialisedSchema: v.SchemaWithPipe<r
|
|
|
80
84
|
type: "ref";
|
|
81
85
|
id: string;
|
|
82
86
|
}>;
|
|
87
|
+
tags?: readonly string[] | undefined;
|
|
83
88
|
}>]>;
|
|
84
89
|
export type BuilderCollectionConfigSerialised = v.InferOutput<typeof BuilderCollectionConfigSerialisedSchema>;
|
|
85
90
|
export declare function collectionConfig<Model extends Paramable<BuilderModelGeneric> = Paramable<BuilderModelGeneric>, Min extends Paramable<number> = Paramable<number>, Max extends Paramable<number> = Paramable<number>>(model: Model, min: Min, max: Max): BuilderCollectionConfig<Model, Min, Max>;
|
|
@@ -2,21 +2,28 @@ import * as v from 'valibot';
|
|
|
2
2
|
import { paramable } from '../../references.js';
|
|
3
3
|
import { serialisable } from '../../serialisable.js';
|
|
4
4
|
import { BuilderModelSerialisedSchema } from '../model/index.js';
|
|
5
|
+
import { BuilderTagsSchema } from '../tags.js';
|
|
5
6
|
export class BuilderCollectionConfig {
|
|
6
7
|
model;
|
|
7
8
|
min;
|
|
8
9
|
max;
|
|
9
|
-
|
|
10
|
+
tags;
|
|
11
|
+
constructor(model, min, max, tags) {
|
|
10
12
|
this.model = model;
|
|
11
13
|
this.min = min;
|
|
12
14
|
this.max = max;
|
|
15
|
+
this.tags = tags;
|
|
16
|
+
}
|
|
17
|
+
tag(...tags) {
|
|
18
|
+
return new BuilderCollectionConfig(this.model, this.min, this.max, tags);
|
|
13
19
|
}
|
|
14
20
|
}
|
|
15
21
|
export const BuilderCollectionConfigSchema = v.instance(BuilderCollectionConfig);
|
|
16
22
|
export const BuilderCollectionConfigSerialisedSchema = serialisable(v.object({
|
|
17
23
|
model: paramable(v.lazy(() => BuilderModelSerialisedSchema)),
|
|
18
24
|
min: paramable(v.number()),
|
|
19
|
-
max: paramable(v.number())
|
|
25
|
+
max: paramable(v.number()),
|
|
26
|
+
tags: v.optional(BuilderTagsSchema)
|
|
20
27
|
}));
|
|
21
28
|
export function collectionConfig(model, min, max) {
|
|
22
29
|
return new BuilderCollectionConfig(model, min, max);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BuilderPaths } from '../../paths';
|
|
2
2
|
import type { Paramable } from '../../references';
|
|
3
|
+
import type { BuilderTags } from '../tags';
|
|
3
4
|
import type { BuilderWhenSerialised } from '../when';
|
|
4
5
|
import type { BuilderComponentDetails, BuilderComponentDetailsSerialised } from './details';
|
|
5
6
|
import type { BuilderComponentWhen } from './when';
|
|
@@ -10,7 +11,9 @@ export declare class BuilderComponent<const Name extends string = string, const
|
|
|
10
11
|
readonly name: Name;
|
|
11
12
|
readonly payload: Payload;
|
|
12
13
|
readonly paths?: Paths;
|
|
13
|
-
|
|
14
|
+
readonly tags?: BuilderTags;
|
|
15
|
+
constructor(name: Name, payload: Payload, paths?: Paths, tags?: BuilderTags);
|
|
16
|
+
tag(...tags: Array<string>): BuilderComponent<Name, Payload, Paths>;
|
|
14
17
|
}
|
|
15
18
|
export declare const BuilderComponentSchema: v.InstanceSchema<typeof BuilderComponent, undefined>;
|
|
16
19
|
export type BuilderComponents = ReadonlyArray<BuilderComponent>;
|
|
@@ -27,7 +30,9 @@ export declare const BuilderComponentWhenSerialisedSchema: v.GenericSchema<Build
|
|
|
27
30
|
name: string;
|
|
28
31
|
valueType: "string" | "number" | "boolean";
|
|
29
32
|
isOptional: boolean;
|
|
33
|
+
tags?: readonly string[] | undefined;
|
|
30
34
|
}>[];
|
|
35
|
+
tags?: readonly string[] | undefined;
|
|
31
36
|
}>>>;
|
|
32
37
|
export type BuilderComponentWhenSerialised = BuilderWhenSerialised<BuilderComponentDetailsSerialised>;
|
|
33
38
|
export declare const BuilderComponentSelectMapSerialisedSchema: v.GenericSchema<import("..").BuilderMatchSelectMap<Readonly<{
|
|
@@ -47,7 +52,9 @@ export declare const BuilderComponentSelectMapSerialisedSchema: v.GenericSchema<
|
|
|
47
52
|
name: string;
|
|
48
53
|
valueType: "string" | "number" | "boolean";
|
|
49
54
|
isOptional: boolean;
|
|
55
|
+
tags?: readonly string[] | undefined;
|
|
50
56
|
}>[];
|
|
57
|
+
tags?: readonly string[] | undefined;
|
|
51
58
|
}>>>;
|
|
52
59
|
export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
53
60
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -85,17 +92,21 @@ export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly
|
|
|
85
92
|
readonly name: v.StringSchema<undefined>;
|
|
86
93
|
readonly valueType: v.PicklistSchema<["string", "boolean", "number"], undefined>;
|
|
87
94
|
readonly isOptional: v.BooleanSchema<undefined>;
|
|
95
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
88
96
|
}, undefined>, v.ReadonlyAction<{
|
|
89
97
|
type: "component-field";
|
|
90
98
|
name: string;
|
|
91
99
|
valueType: "string" | "number" | "boolean";
|
|
92
100
|
isOptional: boolean;
|
|
101
|
+
tags?: readonly string[] | undefined;
|
|
93
102
|
}>]>, undefined>, v.ReadonlyAction<Readonly<{
|
|
94
103
|
type: "component-field";
|
|
95
104
|
name: string;
|
|
96
105
|
valueType: "string" | "number" | "boolean";
|
|
97
106
|
isOptional: boolean;
|
|
107
|
+
tags?: readonly string[] | undefined;
|
|
98
108
|
}>[]>]>], undefined>;
|
|
109
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
99
110
|
}, undefined>, v.ReadonlyAction<{
|
|
100
111
|
fields: Readonly<{
|
|
101
112
|
type: "parameter";
|
|
@@ -109,7 +120,9 @@ export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly
|
|
|
109
120
|
name: string;
|
|
110
121
|
valueType: "string" | "number" | "boolean";
|
|
111
122
|
isOptional: boolean;
|
|
123
|
+
tags?: readonly string[] | undefined;
|
|
112
124
|
}>[];
|
|
125
|
+
tags?: readonly string[] | undefined;
|
|
113
126
|
}>]>, v.GenericSchema<BuilderWhenSerialised<Readonly<{
|
|
114
127
|
fields: Readonly<{
|
|
115
128
|
type: "parameter";
|
|
@@ -123,7 +136,9 @@ export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly
|
|
|
123
136
|
name: string;
|
|
124
137
|
valueType: "string" | "number" | "boolean";
|
|
125
138
|
isOptional: boolean;
|
|
139
|
+
tags?: readonly string[] | undefined;
|
|
126
140
|
}>[];
|
|
141
|
+
tags?: readonly string[] | undefined;
|
|
127
142
|
}>>>], undefined>], undefined>;
|
|
128
143
|
readonly paths: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
129
144
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
@@ -140,6 +155,7 @@ export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly
|
|
|
140
155
|
type: "ref";
|
|
141
156
|
id: string;
|
|
142
157
|
}>]>, 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>, undefined>;
|
|
158
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
143
159
|
}, undefined>, v.ReadonlyAction<{
|
|
144
160
|
name: string;
|
|
145
161
|
payload: Readonly<{
|
|
@@ -162,7 +178,9 @@ export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly
|
|
|
162
178
|
name: string;
|
|
163
179
|
valueType: "string" | "number" | "boolean";
|
|
164
180
|
isOptional: boolean;
|
|
181
|
+
tags?: readonly string[] | undefined;
|
|
165
182
|
}>[];
|
|
183
|
+
tags?: readonly string[] | undefined;
|
|
166
184
|
}> | BuilderWhenSerialised<Readonly<{
|
|
167
185
|
fields: Readonly<{
|
|
168
186
|
type: "parameter";
|
|
@@ -176,7 +194,9 @@ export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly
|
|
|
176
194
|
name: string;
|
|
177
195
|
valueType: "string" | "number" | "boolean";
|
|
178
196
|
isOptional: boolean;
|
|
197
|
+
tags?: readonly string[] | undefined;
|
|
179
198
|
}>[];
|
|
199
|
+
tags?: readonly string[] | undefined;
|
|
180
200
|
}>>;
|
|
181
201
|
paths?: readonly (readonly (string | number)[])[] | Readonly<{
|
|
182
202
|
type: "parameter";
|
|
@@ -186,6 +206,7 @@ export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly
|
|
|
186
206
|
type: "ref";
|
|
187
207
|
id: string;
|
|
188
208
|
}> | undefined;
|
|
209
|
+
tags?: readonly string[] | undefined;
|
|
189
210
|
}>]>;
|
|
190
211
|
export type BuilderComponentSerialised = v.InferOutput<typeof BuilderComponentSerialisedSchema>;
|
|
191
212
|
export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
@@ -224,17 +245,21 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
224
245
|
readonly name: v.StringSchema<undefined>;
|
|
225
246
|
readonly valueType: v.PicklistSchema<["string", "boolean", "number"], undefined>;
|
|
226
247
|
readonly isOptional: v.BooleanSchema<undefined>;
|
|
248
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
227
249
|
}, undefined>, v.ReadonlyAction<{
|
|
228
250
|
type: "component-field";
|
|
229
251
|
name: string;
|
|
230
252
|
valueType: "string" | "number" | "boolean";
|
|
231
253
|
isOptional: boolean;
|
|
254
|
+
tags?: readonly string[] | undefined;
|
|
232
255
|
}>]>, undefined>, v.ReadonlyAction<Readonly<{
|
|
233
256
|
type: "component-field";
|
|
234
257
|
name: string;
|
|
235
258
|
valueType: "string" | "number" | "boolean";
|
|
236
259
|
isOptional: boolean;
|
|
260
|
+
tags?: readonly string[] | undefined;
|
|
237
261
|
}>[]>]>], undefined>;
|
|
262
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
238
263
|
}, undefined>, v.ReadonlyAction<{
|
|
239
264
|
fields: Readonly<{
|
|
240
265
|
type: "parameter";
|
|
@@ -248,7 +273,9 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
248
273
|
name: string;
|
|
249
274
|
valueType: "string" | "number" | "boolean";
|
|
250
275
|
isOptional: boolean;
|
|
276
|
+
tags?: readonly string[] | undefined;
|
|
251
277
|
}>[];
|
|
278
|
+
tags?: readonly string[] | undefined;
|
|
252
279
|
}>]>, v.GenericSchema<BuilderWhenSerialised<Readonly<{
|
|
253
280
|
fields: Readonly<{
|
|
254
281
|
type: "parameter";
|
|
@@ -262,7 +289,9 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
262
289
|
name: string;
|
|
263
290
|
valueType: "string" | "number" | "boolean";
|
|
264
291
|
isOptional: boolean;
|
|
292
|
+
tags?: readonly string[] | undefined;
|
|
265
293
|
}>[];
|
|
294
|
+
tags?: readonly string[] | undefined;
|
|
266
295
|
}>>>], undefined>], undefined>;
|
|
267
296
|
readonly paths: v.OptionalSchema<v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
268
297
|
readonly type: v.LiteralSchema<"parameter", undefined>;
|
|
@@ -279,6 +308,7 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
279
308
|
type: "ref";
|
|
280
309
|
id: string;
|
|
281
310
|
}>]>, 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>, undefined>;
|
|
311
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
282
312
|
}, undefined>, v.ReadonlyAction<{
|
|
283
313
|
name: string;
|
|
284
314
|
payload: Readonly<{
|
|
@@ -301,7 +331,9 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
301
331
|
name: string;
|
|
302
332
|
valueType: "string" | "number" | "boolean";
|
|
303
333
|
isOptional: boolean;
|
|
334
|
+
tags?: readonly string[] | undefined;
|
|
304
335
|
}>[];
|
|
336
|
+
tags?: readonly string[] | undefined;
|
|
305
337
|
}> | BuilderWhenSerialised<Readonly<{
|
|
306
338
|
fields: Readonly<{
|
|
307
339
|
type: "parameter";
|
|
@@ -315,7 +347,9 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
315
347
|
name: string;
|
|
316
348
|
valueType: "string" | "number" | "boolean";
|
|
317
349
|
isOptional: boolean;
|
|
350
|
+
tags?: readonly string[] | undefined;
|
|
318
351
|
}>[];
|
|
352
|
+
tags?: readonly string[] | undefined;
|
|
319
353
|
}>>;
|
|
320
354
|
paths?: readonly (readonly (string | number)[])[] | Readonly<{
|
|
321
355
|
type: "parameter";
|
|
@@ -325,6 +359,7 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
325
359
|
type: "ref";
|
|
326
360
|
id: string;
|
|
327
361
|
}> | undefined;
|
|
362
|
+
tags?: readonly string[] | undefined;
|
|
328
363
|
}>]>, undefined>, v.ReadonlyAction<Readonly<{
|
|
329
364
|
name: string;
|
|
330
365
|
payload: Readonly<{
|
|
@@ -347,7 +382,9 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
347
382
|
name: string;
|
|
348
383
|
valueType: "string" | "number" | "boolean";
|
|
349
384
|
isOptional: boolean;
|
|
385
|
+
tags?: readonly string[] | undefined;
|
|
350
386
|
}>[];
|
|
387
|
+
tags?: readonly string[] | undefined;
|
|
351
388
|
}> | BuilderWhenSerialised<Readonly<{
|
|
352
389
|
fields: Readonly<{
|
|
353
390
|
type: "parameter";
|
|
@@ -361,7 +398,9 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
361
398
|
name: string;
|
|
362
399
|
valueType: "string" | "number" | "boolean";
|
|
363
400
|
isOptional: boolean;
|
|
401
|
+
tags?: readonly string[] | undefined;
|
|
364
402
|
}>[];
|
|
403
|
+
tags?: readonly string[] | undefined;
|
|
365
404
|
}>>;
|
|
366
405
|
paths?: readonly (readonly (string | number)[])[] | Readonly<{
|
|
367
406
|
type: "parameter";
|
|
@@ -371,5 +410,6 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
371
410
|
type: "ref";
|
|
372
411
|
id: string;
|
|
373
412
|
}> | undefined;
|
|
413
|
+
tags?: readonly string[] | undefined;
|
|
374
414
|
}>[]>]>;
|
|
375
415
|
export type BuilderComponentsSerialised = v.InferOutput<typeof BuilderComponentsSerialisedSchema>;
|
|
@@ -2,16 +2,22 @@ import * as v from 'valibot';
|
|
|
2
2
|
import { BuilderPathsSchema } from '../../paths.js';
|
|
3
3
|
import { paramable } from '../../references.js';
|
|
4
4
|
import { serialisable } from '../../serialisable.js';
|
|
5
|
+
import { BuilderTagsSchema } from '../tags.js';
|
|
5
6
|
import { createSelectMapSerialisedSchema, createWhenSerialisedSchema } from '../when.js';
|
|
6
7
|
import { BuilderComponentDetailsSerialisedSchema } from './details.js';
|
|
7
8
|
export class BuilderComponent {
|
|
8
9
|
name;
|
|
9
10
|
payload;
|
|
10
11
|
paths;
|
|
11
|
-
|
|
12
|
+
tags;
|
|
13
|
+
constructor(name, payload, paths, tags) {
|
|
12
14
|
this.name = name;
|
|
13
15
|
this.payload = payload;
|
|
14
16
|
this.paths = paths;
|
|
17
|
+
this.tags = tags;
|
|
18
|
+
}
|
|
19
|
+
tag(...tags) {
|
|
20
|
+
return new BuilderComponent(this.name, this.payload, this.paths, tags);
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
export const BuilderComponentSchema = v.instance(BuilderComponent);
|
|
@@ -20,6 +26,7 @@ export const BuilderComponentSelectMapSerialisedSchema = createSelectMapSerialis
|
|
|
20
26
|
export const BuilderComponentSerialisedSchema = serialisable(v.object({
|
|
21
27
|
name: v.string(),
|
|
22
28
|
payload: paramable(v.union([BuilderComponentDetailsSerialisedSchema, BuilderComponentWhenSerialisedSchema])),
|
|
23
|
-
paths: v.optional(paramable(BuilderPathsSchema))
|
|
29
|
+
paths: v.optional(paramable(BuilderPathsSchema)),
|
|
30
|
+
tags: v.optional(BuilderTagsSchema)
|
|
24
31
|
}));
|
|
25
32
|
export const BuilderComponentsSerialisedSchema = v.pipe(v.array(BuilderComponentSerialisedSchema), v.readonly());
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { Paramable } from '../../references';
|
|
2
|
+
import type { BuilderTags } from '../tags';
|
|
2
3
|
import type { BuilderComponentFields } from './field';
|
|
3
4
|
import * as v from 'valibot';
|
|
4
5
|
export declare class BuilderComponentDetails<const Fields extends Paramable<BuilderComponentFields> = Paramable<BuilderComponentFields>> {
|
|
5
6
|
readonly type: 'component-details';
|
|
6
|
-
fields: Fields;
|
|
7
|
-
|
|
7
|
+
readonly fields: Fields;
|
|
8
|
+
readonly tags?: BuilderTags;
|
|
9
|
+
constructor(fields: Fields, tags?: BuilderTags);
|
|
10
|
+
tag(...tags: Array<string>): BuilderComponentDetails<Fields>;
|
|
8
11
|
}
|
|
9
12
|
export declare const BuilderComponentDetailsSchema: v.InstanceSchema<typeof BuilderComponentDetails, undefined>;
|
|
10
13
|
export declare const BuilderComponentDetailsSerialisedSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
@@ -27,17 +30,21 @@ export declare const BuilderComponentDetailsSerialisedSchema: v.SchemaWithPipe<r
|
|
|
27
30
|
readonly name: v.StringSchema<undefined>;
|
|
28
31
|
readonly valueType: v.PicklistSchema<["string", "boolean", "number"], undefined>;
|
|
29
32
|
readonly isOptional: v.BooleanSchema<undefined>;
|
|
33
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
30
34
|
}, undefined>, v.ReadonlyAction<{
|
|
31
35
|
type: "component-field";
|
|
32
36
|
name: string;
|
|
33
37
|
valueType: "string" | "number" | "boolean";
|
|
34
38
|
isOptional: boolean;
|
|
39
|
+
tags?: readonly string[] | undefined;
|
|
35
40
|
}>]>, undefined>, v.ReadonlyAction<Readonly<{
|
|
36
41
|
type: "component-field";
|
|
37
42
|
name: string;
|
|
38
43
|
valueType: "string" | "number" | "boolean";
|
|
39
44
|
isOptional: boolean;
|
|
45
|
+
tags?: readonly string[] | undefined;
|
|
40
46
|
}>[]>]>], undefined>;
|
|
47
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
41
48
|
}, undefined>, v.ReadonlyAction<{
|
|
42
49
|
fields: Readonly<{
|
|
43
50
|
type: "parameter";
|
|
@@ -51,7 +58,9 @@ export declare const BuilderComponentDetailsSerialisedSchema: v.SchemaWithPipe<r
|
|
|
51
58
|
name: string;
|
|
52
59
|
valueType: "string" | "number" | "boolean";
|
|
53
60
|
isOptional: boolean;
|
|
61
|
+
tags?: readonly string[] | undefined;
|
|
54
62
|
}>[];
|
|
63
|
+
tags?: readonly string[] | undefined;
|
|
55
64
|
}>]>;
|
|
56
65
|
export type BuilderComponentDetailsSerialised = v.InferOutput<typeof BuilderComponentDetailsSerialisedSchema>;
|
|
57
66
|
export declare function componentDetails<const Fields extends BuilderComponentFields>(...fields: Fields): BuilderComponentDetails<Fields>;
|