@builder-builder/builder 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/cli.d.ts +2 -0
  2. package/dist/cli.js +53 -0
  3. package/dist/codegen/index.d.ts +7 -0
  4. package/dist/codegen/index.js +212 -0
  5. package/dist/codegen/template.d.ts +5 -0
  6. package/dist/codegen/template.js +17 -0
  7. package/dist/entities/index.d.ts +3 -3
  8. package/dist/entities/index.js +1 -1
  9. package/dist/entities/kind.d.ts +1 -1
  10. package/dist/entities/serialise.d.ts +554 -8
  11. package/dist/entities/serialise.js +5 -3
  12. package/dist/entities/ui/describe.d.ts +222 -8
  13. package/dist/entities/ui/describe.js +5 -5
  14. package/dist/entities/ui/index.d.ts +2 -0
  15. package/dist/entities/ui/index.js +1 -0
  16. package/dist/entities/ui/input.d.ts +334 -0
  17. package/dist/entities/ui/input.js +39 -0
  18. package/dist/entities/ui/page.d.ts +222 -8
  19. package/dist/entities/ui/page.js +5 -5
  20. package/dist/entities/ui/ui.d.ts +3 -3
  21. package/dist/entities/ui/ui.js +7 -4
  22. package/dist/entities/validated.d.ts +23 -21
  23. package/dist/entities/when.d.ts +2 -2
  24. package/dist/index.d.ts +3 -3
  25. package/dist/index.js +1 -1
  26. package/dist/mappers/index.d.ts +3 -2
  27. package/dist/mappers/index.js +1 -1
  28. package/dist/mappers/instance.js +10 -6
  29. package/dist/mappers/order.js +5 -2
  30. package/dist/mappers/render/index.d.ts +1 -1
  31. package/dist/mappers/render/pages.d.ts +8 -0
  32. package/dist/mappers/render/pages.js +2 -1
  33. package/dist/mappers/render/render.js +31 -54
  34. package/dist/mappers/resolve.d.ts +13 -4
  35. package/dist/mappers/resolve.js +73 -16
  36. package/dist/mappers/variants/index.d.ts +2 -1
  37. package/dist/mappers/variants/index.js +2 -1
  38. package/dist/mappers/variants/option-graph.d.ts +2 -2
  39. package/dist/mappers/variants/option-graph.js +6 -3
  40. package/dist/mappers/variants/variants.d.ts +5 -2
  41. package/dist/mappers/variants/variants.js +11 -7
  42. package/dist/paths.d.ts +0 -1
  43. package/dist/paths.js +0 -8
  44. package/dist/validate/brand.d.ts +0 -7
  45. package/dist/validate/brand.js +12 -6
  46. package/dist/validate/builder.d.ts +2 -1
  47. package/dist/validate/builder.js +14 -12
  48. package/dist/validate/errors.d.ts +130 -0
  49. package/dist/validate/errors.js +141 -0
  50. package/dist/validate/expectations.d.ts +3 -10
  51. package/dist/validate/expectations.js +8 -10
  52. package/dist/validate/index.d.ts +8 -14
  53. package/dist/validate/index.js +4 -7
  54. package/dist/validate/instance.d.ts +2 -15
  55. package/dist/validate/instance.js +42 -40
  56. package/dist/validate/model.d.ts +4 -31
  57. package/dist/validate/model.js +157 -173
  58. package/dist/validate/resolve.d.ts +3 -15
  59. package/dist/validate/resolve.js +66 -71
  60. package/dist/validate/result.d.ts +1 -7
  61. package/dist/validate/result.js +1 -4
  62. package/dist/validate/ui.d.ts +4 -4
  63. package/dist/validate/ui.js +80 -62
  64. package/dist/validate/variants.d.ts +2 -53
  65. package/dist/validate/variants.js +83 -86
  66. package/package.json +14 -3
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+ import { writeFileSync } from 'node:fs';
3
+ import { parseArgs } from 'node:util';
4
+ import { generateOrderType } from './codegen/index.js';
5
+ const DEFAULT_API_URL = 'https://builder-builder.com';
6
+ run().catch((caught) => {
7
+ const message = caught instanceof Error ? caught.message : String(caught);
8
+ process.stderr.write(`bb: ${message}\n`);
9
+ process.exit(1);
10
+ });
11
+ async function run() {
12
+ const { values } = parseArgs({
13
+ options: {
14
+ id: { type: 'string' },
15
+ out: { type: 'string' },
16
+ api: { type: 'string', default: DEFAULT_API_URL },
17
+ key: { type: 'string' }
18
+ },
19
+ strict: true
20
+ });
21
+ const id = values.id;
22
+ const out = values.out;
23
+ if (id == null || out == null) {
24
+ process.stderr.write('Usage: bb --id <entity-id> --out <file> [--api <url>] [--key <api-key>]\n');
25
+ process.exit(1);
26
+ return;
27
+ }
28
+ const apiUrl = values.api ?? DEFAULT_API_URL;
29
+ const apiKey = values.key ?? process.env.BB_API_KEY;
30
+ if (apiKey == null || apiKey.length === 0) {
31
+ throw new Error('missing API key — pass --key or set BB_API_KEY');
32
+ }
33
+ const entity = await fetchEntity({ apiUrl, id, apiKey });
34
+ const generated = generateOrderType({ name: entity.name, builder: entity.builder });
35
+ const fetchedAt = new Date().toISOString();
36
+ const header = `// AUTO-GENERATED — DO NOT EDIT\n` +
37
+ `// Source: ${id} (${entity.name}) — fetched ${fetchedAt}\n` +
38
+ `// Regenerate: bb --id ${id} --out ${out}\n\n`;
39
+ writeFileSync(out, header + generated);
40
+ process.stdout.write(`bb: wrote ${out}\n`);
41
+ }
42
+ async function fetchEntity(options) {
43
+ const url = `${options.apiUrl.replace(/\/$/, '')}/api/builder/${options.id}`;
44
+ const response = await fetch(url, {
45
+ headers: { 'X-Builder-Builder-Key': options.apiKey }
46
+ });
47
+ if (!response.ok) {
48
+ const body = await response.text();
49
+ throw new Error(`fetch ${url} failed: ${response.status} ${response.statusText} — ${body}`);
50
+ }
51
+ const payload = (await response.json());
52
+ return payload;
53
+ }
@@ -0,0 +1,7 @@
1
+ import type { BuilderRefEntities, BuilderSerialised } from '../entities/index.js';
2
+ export type GenerateOrderTypeInput = {
3
+ readonly name: string;
4
+ readonly builder: BuilderSerialised;
5
+ readonly references?: BuilderRefEntities;
6
+ };
7
+ export declare function generateOrderType(input: GenerateOrderTypeInput): string;
@@ -0,0 +1,212 @@
1
+ import ts from 'typescript';
2
+ import * as v from 'valibot';
3
+ import { check } from '../check.js';
4
+ import { BuilderException } from '../exception.js';
5
+ import { optionGraph, variantsFor } from '../mappers/index.js';
6
+ import { validateBuilder } from '../validate/index.js';
7
+ import { tsmember, tstype } from './template.js';
8
+ export function generateOrderType(input) {
9
+ const [validated, errors] = validateBuilder(input.builder, input.references ?? []);
10
+ if (errors.length > 0) {
11
+ throw new BuilderException(errors);
12
+ }
13
+ const typeName = `${pascalCase(input.name)}Order`;
14
+ const typeNode = renderModelOrder(validated.model);
15
+ const declaration = ts.factory.createTypeAliasDeclaration([ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], typeName, undefined, typeNode);
16
+ const sourceFile = ts.createSourceFile('generated.ts', '', ts.ScriptTarget.Latest, false, ts.ScriptKind.TS);
17
+ const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
18
+ return `${printer.printNode(ts.EmitHint.Unspecified, declaration, sourceFile)}\n`;
19
+ }
20
+ function renderModelOrder(model) {
21
+ const graph = optionGraph(model);
22
+ const componentMembers = model.components.map((component) => {
23
+ return renderComponentMember(component, model, graph);
24
+ });
25
+ const collectionMembers = model.collections.map((collection) => {
26
+ return renderCollectionMember(collection);
27
+ });
28
+ return ts.factory.createTypeLiteralNode([...componentMembers, ...collectionMembers]);
29
+ }
30
+ function renderComponentMember(component, model, graph) {
31
+ const variant = renderComponentVariant(component, model, graph);
32
+ return tsmember('readonly <%= name %>: <%= variant %> | null;', {
33
+ name: propertyName(component.name),
34
+ variant
35
+ });
36
+ }
37
+ function renderComponentVariant(component, model, graph) {
38
+ const instance = renderComponentInstance(component, model, graph);
39
+ const detailFields = extractDetailFields(component.payload);
40
+ if (detailFields.length === 0) {
41
+ return tstype('{ readonly instance: <%= i %> }', { i: instance });
42
+ }
43
+ const details = renderDetailFields(detailFields);
44
+ return tstype('{ readonly instance: <%= i %>; readonly details: <%= d %> }', {
45
+ i: instance,
46
+ d: details
47
+ });
48
+ }
49
+ function renderComponentInstance(component, model, graph) {
50
+ rejectUnsupportedDependencyPaths(component);
51
+ const observedValues = perKeyValueSets(variantsFor(component, graph));
52
+ const members = [];
53
+ observedValues.forEach((values, key) => {
54
+ members.push(tsmember('readonly <%= name %>: <%= type %>;', {
55
+ name: propertyName(key),
56
+ type: renderOptionValueType(key, values, model)
57
+ }));
58
+ });
59
+ return ts.factory.createTypeLiteralNode(members);
60
+ }
61
+ function rejectUnsupportedDependencyPaths(component) {
62
+ const paths = component.paths ?? [];
63
+ paths.forEach((path) => {
64
+ if (path.length !== 1) {
65
+ throw new Error(`codegen: multi-segment dependency paths are not yet supported (component '${component.name}', path ${JSON.stringify(path)})`);
66
+ }
67
+ const [head] = path;
68
+ check.assert(v.string(), head, `codegen invariant: component dependency path head must be a string (component '${component.name}', path ${JSON.stringify(path)})! ❌`);
69
+ });
70
+ }
71
+ function perKeyValueSets(variants) {
72
+ const result = new Map();
73
+ variants.forEach((instance) => {
74
+ Object.entries(instance).forEach(([key, value]) => {
75
+ const existing = result.get(key) ?? new Set();
76
+ existing.add(value);
77
+ result.set(key, existing);
78
+ });
79
+ });
80
+ return result;
81
+ }
82
+ function renderOptionValueType(name, observedValues, model) {
83
+ const option = model.options.find((candidate) => candidate.name === name);
84
+ check.truthy(option, `codegen invariant: option '${name}' referenced by a component must be defined in the model! ❌`);
85
+ return renderOptionValueShape(option.payload, observedValues);
86
+ }
87
+ function renderOptionValueShape(payload, observedValues) {
88
+ if (payload.type === 'toggle') {
89
+ return maybeNullable(primitiveTypeNode(payload.valueType), payload.isOptional);
90
+ }
91
+ if (payload.type === 'select') {
92
+ const literals = Array.from(observedValues)
93
+ .filter((value) => typeof value === 'string')
94
+ .map((value) => {
95
+ return ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(value));
96
+ });
97
+ return maybeNullable(unionOf(literals), payload.isOptional);
98
+ }
99
+ if (payload.type === 'enable' || payload.type === 'unless') {
100
+ return renderOptionValueShape(payload.payload, observedValues);
101
+ }
102
+ const branches = Object.values(payload.selectMap).filter((branch) => branch != null);
103
+ const [first] = branches;
104
+ if (first == null) {
105
+ return ts.factory.createKeywordTypeNode(ts.SyntaxKind.NeverKeyword);
106
+ }
107
+ return renderOptionValueShape(first, observedValues);
108
+ }
109
+ function extractDetailFields(payload) {
110
+ if (!('type' in payload)) {
111
+ return payload.fields;
112
+ }
113
+ if (payload.type === 'enable' || payload.type === 'unless') {
114
+ return extractDetailFields(payload.payload);
115
+ }
116
+ const branches = Object.values(payload.selectMap).filter((branch) => branch != null);
117
+ const [first] = branches;
118
+ if (first == null) {
119
+ return [];
120
+ }
121
+ return extractDetailFields(first);
122
+ }
123
+ function renderDetailFields(fields) {
124
+ const members = fields.map((field) => {
125
+ return tsmember('readonly <%= name %>: <%= type %>;', {
126
+ name: propertyName(field.name),
127
+ type: maybeNullable(primitiveTypeNode(field.valueType), field.isOptional)
128
+ });
129
+ });
130
+ return ts.factory.createTypeLiteralNode(members);
131
+ }
132
+ function renderCollectionMember(collection) {
133
+ const config = extractCollectionConfig(collection.payload);
134
+ const itemNode = renderModelOrder(config.model);
135
+ const tupleSize = fixedTupleSize(config.min, config.max);
136
+ const value = tupleSize == null
137
+ ? tstype('ReadonlyArray<<%= i %>>', { i: itemNode })
138
+ : tstype('readonly [%= items %]', {
139
+ items: Array.from({ length: tupleSize }, () => itemNode)
140
+ });
141
+ return tsmember('readonly <%= name %>: <%= value %>;', {
142
+ name: propertyName(collection.name),
143
+ value
144
+ });
145
+ }
146
+ function extractCollectionConfig(payload) {
147
+ if (!('type' in payload)) {
148
+ return payload;
149
+ }
150
+ if (payload.type === 'enable' || payload.type === 'unless') {
151
+ return extractCollectionConfig(payload.payload);
152
+ }
153
+ const branches = Object.values(payload.selectMap).filter((branch) => branch != null);
154
+ const [first] = branches;
155
+ if (first == null) {
156
+ throw new Error(`codegen: collection 'match' has no non-null branch`);
157
+ }
158
+ return extractCollectionConfig(first);
159
+ }
160
+ function fixedTupleSize(min, max) {
161
+ if (min !== max) {
162
+ return null;
163
+ }
164
+ if (!Number.isInteger(min) || min < 0) {
165
+ return null;
166
+ }
167
+ return min;
168
+ }
169
+ function propertyName(name) {
170
+ if (/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(name)) {
171
+ return ts.factory.createIdentifier(name);
172
+ }
173
+ return ts.factory.createStringLiteral(name);
174
+ }
175
+ function primitiveTypeNode(valueType) {
176
+ if (valueType === 'string') {
177
+ return ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword);
178
+ }
179
+ if (valueType === 'number') {
180
+ return ts.factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword);
181
+ }
182
+ return ts.factory.createKeywordTypeNode(ts.SyntaxKind.BooleanKeyword);
183
+ }
184
+ function unionOf(members) {
185
+ const [first, ...rest] = members;
186
+ if (first == null) {
187
+ return ts.factory.createKeywordTypeNode(ts.SyntaxKind.NeverKeyword);
188
+ }
189
+ if (rest.length === 0) {
190
+ return first;
191
+ }
192
+ return ts.factory.createUnionTypeNode([first, ...rest]);
193
+ }
194
+ function maybeNullable(node, isNullable) {
195
+ if (!isNullable) {
196
+ return node;
197
+ }
198
+ return ts.factory.createUnionTypeNode([
199
+ node,
200
+ ts.factory.createLiteralTypeNode(ts.factory.createNull())
201
+ ]);
202
+ }
203
+ function pascalCase(name) {
204
+ const words = name.split(/[\s\-_]+/).filter((word) => word.length > 0);
205
+ if (words.length === 0) {
206
+ throw new Error(`codegen: name '${name}' produces an empty type name`);
207
+ }
208
+ return words
209
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
210
+ .join('')
211
+ .replace(/[^A-Za-z0-9]/g, '');
212
+ }
@@ -0,0 +1,5 @@
1
+ import type ts from 'typescript';
2
+ type TemplateData = Readonly<Record<string, string | ts.Node | ReadonlyArray<ts.Node>>>;
3
+ export declare function tstype(template: string, data?: TemplateData): ts.TypeNode;
4
+ export declare function tsmember(template: string, data?: TemplateData): ts.TypeElement;
5
+ export {};
@@ -0,0 +1,17 @@
1
+ import { tsquery } from '@phenomnomnominal/tsquery';
2
+ import { tstemplate } from '@phenomnomnominal/tstemplate';
3
+ import { check } from '../check.js';
4
+ export function tstype(template, data = {}) {
5
+ const sourceFile = tstemplate(`type __ = ${template};`, data);
6
+ const [declaration] = tsquery(sourceFile, 'TypeAliasDeclaration');
7
+ check.truthy(declaration, `tstype invariant: template produced no TypeAliasDeclaration! ❌`);
8
+ return declaration.type;
9
+ }
10
+ export function tsmember(template, data = {}) {
11
+ const sourceFile = tstemplate(`type __ = { ${template} };`, data);
12
+ const [literal] = tsquery(sourceFile, 'TypeLiteral');
13
+ check.truthy(literal, `tsmember invariant: template produced no TypeLiteral! ❌`);
14
+ const [member] = literal.members;
15
+ check.truthy(member, `tsmember invariant: template produced an empty TypeLiteral! ❌`);
16
+ return member;
17
+ }
@@ -8,8 +8,8 @@ export type { BuilderInstanceOf, BuilderModelGeneric, BuilderModels, BuilderMode
8
8
  export { BuilderModel, BuilderModelSchema, BuilderModelSerialisedSchema, model, modelsMerge } from './model/index.js';
9
9
  export type { BuilderOptionPayload, BuilderOptions, BuilderOptionSerialised, BuilderOptionsSerialised, BuilderOptionValues, BuilderOptionValuesSerialised, BuilderOptionWhen, BuilderOptionWhenSerialised, BuilderSelectTypeLabels, BuilderSelectTypeSerialised, BuilderSelectTypeValues, BuilderToggleTypeSerialised, BuilderToggleValueType } from './option/index';
10
10
  export type { BuilderRefEntities, BuilderRefEntity } from './refs.js';
11
- export type { BuilderDescription, BuilderDescriptionItem, BuilderUIDescribeSerialised, BuilderUIItem, BuilderUIItems, BuilderUIItemSerialised, BuilderUIItemsSerialised, BuilderUIPageSerialised, BuilderUIPagesSerialised, BuilderUIs, BuilderUIsSerialised, BuilderUISerialised } from './ui/index';
12
- export type { BuilderCollectionConfigValidated, BuilderCollectionsValidated, BuilderCollectionValidated, BuilderComponentsValidated, BuilderComponentValidated, BuilderComponentVariantsValidated, BuilderInstancesValidated, BuilderInstanceValidated, BuilderModelValidated, BuilderOptionsValidated, BuilderOptionValidated, BuilderUIDescribeValidated, BuilderUIItemsValidated, BuilderUIPageValidated, BuilderUIValidated, BuilderValidated } from './validated';
11
+ export type { BuilderDescription, BuilderDescriptionItem, BuilderUIDescribeSerialised, BuilderUIInputMetadata, BuilderUIInputMetadataSerialised, BuilderUIInputs, BuilderUIInputsSerialised, BuilderUIInputSerialised, BuilderUIItem, BuilderUIItems, BuilderUIItemSerialised, BuilderUIItemsSerialised, BuilderUIPageSerialised, BuilderUIPagesSerialised, BuilderUIs, BuilderUIsSerialised, BuilderUISerialised } from './ui/index';
12
+ export type { BuilderCollectionConfigValidated, BuilderCollectionsValidated, BuilderCollectionValidated, BuilderComponentDetailsValidated, BuilderComponentsValidated, BuilderComponentValidated, BuilderComponentVariantsValidated, BuilderInstancesValidated, BuilderInstanceValidated, BuilderModelValidated, BuilderOptionsValidated, BuilderOptionValidated, BuilderOptionValuesValidated, BuilderUIDescribeValidated, BuilderUIItemsValidated, BuilderUIPageValidated, BuilderUIValidated, BuilderValidated } from './validated';
13
13
  export type { BuilderEnableConfig, BuilderMatchConfig, BuilderMatchSelectMap, BuilderUnlessConfig, BuilderWhen, BuilderWhenConfig, BuilderWhenSerialised } from './when';
14
14
  export { Builder, builder, BuilderSchema, BuilderSerialisedSchema } from './builder/index.js';
15
15
  export { BuilderCollection, BuilderCollectionConfig, BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionSerialisedSchema, BuilderCollectionsSerialisedSchema, BuilderCollectionWhenSerialisedSchema, collectionConfig, collectionExpectation, collectionWhen } from './collection/index.js';
@@ -19,5 +19,5 @@ export { BuilderExpectation, BuilderExpectationKindSchema, BuilderExpectationSch
19
19
  export { BuilderEntityKindSchema, BuilderEntitySerialisedSchema } from './kind.js';
20
20
  export { BuilderOption, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema, BuilderOptionValuesSchema, BuilderOptionValuesSerialisedSchema, BuilderOptionWhenSerialisedSchema, BuilderSelectType, BuilderSelectTypeSchema, BuilderSelectTypeSerialisedSchema, BuilderToggleType, BuilderToggleTypeSchema, BuilderToggleTypeSerialisedSchema, optionExpectation, optionValueSchema, optionWhen, select, toggleBoolean, toggleNumber, toggleString } from './option/index.js';
21
21
  export { serialise } from './serialise.js';
22
- export { BuilderDescriptionItemSchema, BuilderDescriptionSchema, BuilderUI, BuilderUIDescribe, BuilderUIDescribeSchema, BuilderUIDescribeSerialisedSchema, BuilderUIItemSerialisedSchema, BuilderUIItemsSerialisedSchema, BuilderUIPage, BuilderUIPages, BuilderUIPageSchema, BuilderUIPageSerialisedSchema, BuilderUIPagesSchema, BuilderUIPagesSerialisedSchema, BuilderUISchema, BuilderUISerialisedSchema, uis } from './ui/index.js';
22
+ export { BuilderDescriptionItemSchema, BuilderDescriptionSchema, BuilderUI, BuilderUIDescribe, BuilderUIDescribeSchema, BuilderUIDescribeSerialisedSchema, BuilderUIInput, BuilderUIInputMetadataSchema, BuilderUIInputSchema, BuilderUIInputSerialisedSchema, BuilderUIInputsSerialisedSchema, BuilderUIItemSerialisedSchema, BuilderUIItemsSerialisedSchema, BuilderUIPage, BuilderUIPages, BuilderUIPageSchema, BuilderUIPageSerialisedSchema, BuilderUIPagesSchema, BuilderUIPagesSerialisedSchema, BuilderUISchema, BuilderUISerialisedSchema, input, uis } from './ui/index.js';
23
23
  export { BuilderWhenConfigSchema, BuilderWhenEnableSchema, BuilderWhenMatchSchema, BuilderWhenSerialisedSchema, BuilderWhenUnlessSchema, createWhenFactories, createWhenSerialisedSchema } from './when.js';
@@ -7,5 +7,5 @@ export { BuilderExpectation, BuilderExpectationKindSchema, BuilderExpectationSch
7
7
  export { BuilderEntityKindSchema, BuilderEntitySerialisedSchema } from './kind.js';
8
8
  export { BuilderOption, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema, BuilderOptionValuesSchema, BuilderOptionValuesSerialisedSchema, BuilderOptionWhenSerialisedSchema, BuilderSelectType, BuilderSelectTypeSchema, BuilderSelectTypeSerialisedSchema, BuilderToggleType, BuilderToggleTypeSchema, BuilderToggleTypeSerialisedSchema, optionExpectation, optionValueSchema, optionWhen, select, toggleBoolean, toggleNumber, toggleString } from './option/index.js';
9
9
  export { serialise } from './serialise.js';
10
- export { BuilderDescriptionItemSchema, BuilderDescriptionSchema, BuilderUI, BuilderUIDescribe, BuilderUIDescribeSchema, BuilderUIDescribeSerialisedSchema, BuilderUIItemSerialisedSchema, BuilderUIItemsSerialisedSchema, BuilderUIPage, BuilderUIPages, BuilderUIPageSchema, BuilderUIPageSerialisedSchema, BuilderUIPagesSchema, BuilderUIPagesSerialisedSchema, BuilderUISchema, BuilderUISerialisedSchema, uis } from './ui/index.js';
10
+ export { BuilderDescriptionItemSchema, BuilderDescriptionSchema, BuilderUI, BuilderUIDescribe, BuilderUIDescribeSchema, BuilderUIDescribeSerialisedSchema, BuilderUIInput, BuilderUIInputMetadataSchema, BuilderUIInputSchema, BuilderUIInputSerialisedSchema, BuilderUIInputsSerialisedSchema, BuilderUIItemSerialisedSchema, BuilderUIItemsSerialisedSchema, BuilderUIPage, BuilderUIPages, BuilderUIPageSchema, BuilderUIPageSerialisedSchema, BuilderUIPagesSchema, BuilderUIPagesSerialisedSchema, BuilderUISchema, BuilderUISerialisedSchema, input, uis } from './ui/index.js';
11
11
  export { BuilderWhenConfigSchema, BuilderWhenEnableSchema, BuilderWhenMatchSchema, BuilderWhenSerialisedSchema, BuilderWhenUnlessSchema, createWhenFactories, createWhenSerialisedSchema } from './when.js';
@@ -2,7 +2,7 @@ import type { EntitiesMap } from './serialise';
2
2
  import * as v from 'valibot';
3
3
  import { entitiesMap } from './serialise.js';
4
4
  export type BuilderEntityKind = keyof typeof entitiesMap;
5
- export declare const BuilderEntityKindSchema: v.PicklistSchema<readonly ("string" | "number" | "boolean" | "builder" | "model" | "ui" | "select" | "toggle" | "paths" | "expectations" | "uiPage" | "uiDescribe" | "uiPages" | "componentDetails" | "collectionConfig" | "uiItems" | "optionWhen" | "componentWhen" | "collectionWhen" | "optionSelectMap" | "componentSelectMap" | "collectionSelectMap" | "path")[], undefined>;
5
+ export declare const BuilderEntityKindSchema: v.PicklistSchema<readonly ("string" | "number" | "boolean" | "builder" | "model" | "ui" | "select" | "toggle" | "path" | "uiPage" | "uiDescribe" | "uiPages" | "uiInput" | "componentDetails" | "collectionConfig" | "expectations" | "uiItems" | "optionWhen" | "componentWhen" | "collectionWhen" | "optionSelectMap" | "componentSelectMap" | "collectionSelectMap" | "paths")[], undefined>;
6
6
  export type BuilderEntitySerialised = {
7
7
  [Kind in keyof EntitiesMap]: v.InferOutput<EntitiesMap[Kind]['serialised']>;
8
8
  }[keyof EntitiesMap];