@formspec/build 0.1.0-alpha.22 → 0.1.0-alpha.23

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 (153) hide show
  1. package/README.md +9 -4
  2. package/dist/analyzer/class-analyzer.d.ts +1 -1
  3. package/dist/analyzer/class-analyzer.d.ts.map +1 -1
  4. package/dist/analyzer/jsdoc-constraints.d.ts +1 -1
  5. package/dist/analyzer/jsdoc-constraints.d.ts.map +1 -1
  6. package/dist/analyzer/tsdoc-parser.d.ts +1 -1
  7. package/dist/analyzer/tsdoc-parser.d.ts.map +1 -1
  8. package/dist/browser.cjs +5 -4
  9. package/dist/browser.cjs.map +1 -1
  10. package/dist/browser.js +4 -3
  11. package/dist/browser.js.map +1 -1
  12. package/dist/build-alpha.d.ts +836 -0
  13. package/dist/build-beta.d.ts +836 -0
  14. package/dist/build-internal.d.ts +836 -0
  15. package/dist/build.d.ts +157 -538
  16. package/dist/canonicalize/chain-dsl-canonicalizer.d.ts +2 -1
  17. package/dist/canonicalize/chain-dsl-canonicalizer.d.ts.map +1 -1
  18. package/dist/canonicalize/tsdoc-canonicalizer.d.ts +1 -1
  19. package/dist/canonicalize/tsdoc-canonicalizer.d.ts.map +1 -1
  20. package/dist/cli.cjs +82 -126
  21. package/dist/cli.cjs.map +1 -1
  22. package/dist/cli.js +72 -116
  23. package/dist/cli.js.map +1 -1
  24. package/dist/generators/class-schema.d.ts +20 -3
  25. package/dist/generators/class-schema.d.ts.map +1 -1
  26. package/dist/generators/mixed-authoring.d.ts +3 -2
  27. package/dist/generators/mixed-authoring.d.ts.map +1 -1
  28. package/dist/index.cjs +79 -127
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.ts +4 -12
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +72 -101
  33. package/dist/index.js.map +1 -1
  34. package/dist/internals.cjs +77 -15
  35. package/dist/internals.cjs.map +1 -1
  36. package/dist/internals.d.ts +2 -1
  37. package/dist/internals.d.ts.map +1 -1
  38. package/dist/internals.js +69 -7
  39. package/dist/internals.js.map +1 -1
  40. package/dist/json-schema/generator.d.ts +8 -4
  41. package/dist/json-schema/generator.d.ts.map +1 -1
  42. package/dist/json-schema/ir-generator.d.ts +4 -4
  43. package/dist/json-schema/ir-generator.d.ts.map +1 -1
  44. package/dist/json-schema/schema.d.ts +2 -2
  45. package/dist/json-schema/types.d.ts +6 -6
  46. package/dist/ui-schema/ir-generator.d.ts +1 -1
  47. package/dist/ui-schema/ir-generator.d.ts.map +1 -1
  48. package/dist/ui-schema/schema.d.ts +28 -28
  49. package/dist/ui-schema/types.d.ts +152 -3
  50. package/dist/ui-schema/types.d.ts.map +1 -1
  51. package/dist/validate/constraint-validator.d.ts +1 -1
  52. package/dist/validate/constraint-validator.d.ts.map +1 -1
  53. package/package.json +8 -8
  54. package/dist/__tests__/alias-chain-propagation.test.d.ts +0 -9
  55. package/dist/__tests__/alias-chain-propagation.test.d.ts.map +0 -1
  56. package/dist/__tests__/chain-dsl-canonicalizer.test.d.ts +0 -2
  57. package/dist/__tests__/chain-dsl-canonicalizer.test.d.ts.map +0 -1
  58. package/dist/__tests__/class-schema.test.d.ts +0 -2
  59. package/dist/__tests__/class-schema.test.d.ts.map +0 -1
  60. package/dist/__tests__/cli.test.d.ts +0 -2
  61. package/dist/__tests__/cli.test.d.ts.map +0 -1
  62. package/dist/__tests__/constraint-validator.test.d.ts +0 -2
  63. package/dist/__tests__/constraint-validator.test.d.ts.map +0 -1
  64. package/dist/__tests__/date-extension.integration.test.d.ts +0 -2
  65. package/dist/__tests__/date-extension.integration.test.d.ts.map +0 -1
  66. package/dist/__tests__/edge-cases.test.d.ts +0 -7
  67. package/dist/__tests__/edge-cases.test.d.ts.map +0 -1
  68. package/dist/__tests__/extension-api.test.d.ts +0 -2
  69. package/dist/__tests__/extension-api.test.d.ts.map +0 -1
  70. package/dist/__tests__/extension-runtime.integration.test.d.ts +0 -2
  71. package/dist/__tests__/extension-runtime.integration.test.d.ts.map +0 -1
  72. package/dist/__tests__/fixtures/alias-chains.d.ts +0 -37
  73. package/dist/__tests__/fixtures/alias-chains.d.ts.map +0 -1
  74. package/dist/__tests__/fixtures/class-schema-regressions.d.ts +0 -86
  75. package/dist/__tests__/fixtures/class-schema-regressions.d.ts.map +0 -1
  76. package/dist/__tests__/fixtures/edge-cases.d.ts +0 -132
  77. package/dist/__tests__/fixtures/edge-cases.d.ts.map +0 -1
  78. package/dist/__tests__/fixtures/example-a-builtins.d.ts +0 -31
  79. package/dist/__tests__/fixtures/example-a-builtins.d.ts.map +0 -1
  80. package/dist/__tests__/fixtures/example-date-extension.d.ts +0 -12
  81. package/dist/__tests__/fixtures/example-date-extension.d.ts.map +0 -1
  82. package/dist/__tests__/fixtures/example-interface-types.d.ts +0 -107
  83. package/dist/__tests__/fixtures/example-interface-types.d.ts.map +0 -1
  84. package/dist/__tests__/fixtures/example-numeric-extension.d.ts +0 -20
  85. package/dist/__tests__/fixtures/example-numeric-extension.d.ts.map +0 -1
  86. package/dist/__tests__/fixtures/extension-forms.d.ts +0 -7
  87. package/dist/__tests__/fixtures/extension-forms.d.ts.map +0 -1
  88. package/dist/__tests__/fixtures/mixed-authoring-shipping-address.d.ts +0 -31
  89. package/dist/__tests__/fixtures/mixed-authoring-shipping-address.d.ts.map +0 -1
  90. package/dist/__tests__/fixtures/named-primitive-aliases.d.ts +0 -15
  91. package/dist/__tests__/fixtures/named-primitive-aliases.d.ts.map +0 -1
  92. package/dist/__tests__/fixtures/nested-array-path-constraints.d.ts +0 -14
  93. package/dist/__tests__/fixtures/nested-array-path-constraints.d.ts.map +0 -1
  94. package/dist/__tests__/fixtures/sample-forms.d.ts +0 -65
  95. package/dist/__tests__/fixtures/sample-forms.d.ts.map +0 -1
  96. package/dist/__tests__/generate-schemas.test.d.ts +0 -2
  97. package/dist/__tests__/generate-schemas.test.d.ts.map +0 -1
  98. package/dist/__tests__/generator.test.d.ts +0 -2
  99. package/dist/__tests__/generator.test.d.ts.map +0 -1
  100. package/dist/__tests__/guards.test.d.ts +0 -2
  101. package/dist/__tests__/guards.test.d.ts.map +0 -1
  102. package/dist/__tests__/integration.test.d.ts +0 -8
  103. package/dist/__tests__/integration.test.d.ts.map +0 -1
  104. package/dist/__tests__/ir-analyzer.test.d.ts +0 -11
  105. package/dist/__tests__/ir-analyzer.test.d.ts.map +0 -1
  106. package/dist/__tests__/ir-jsdoc-constraints.test.d.ts +0 -12
  107. package/dist/__tests__/ir-jsdoc-constraints.test.d.ts.map +0 -1
  108. package/dist/__tests__/ir-json-schema-generator.test.d.ts +0 -11
  109. package/dist/__tests__/ir-json-schema-generator.test.d.ts.map +0 -1
  110. package/dist/__tests__/ir-ui-schema-generator.test.d.ts +0 -2
  111. package/dist/__tests__/ir-ui-schema-generator.test.d.ts.map +0 -1
  112. package/dist/__tests__/mixed-authoring.test.d.ts +0 -2
  113. package/dist/__tests__/mixed-authoring.test.d.ts.map +0 -1
  114. package/dist/__tests__/numeric-extension.integration.test.d.ts +0 -2
  115. package/dist/__tests__/numeric-extension.integration.test.d.ts.map +0 -1
  116. package/dist/__tests__/parity/fixtures/address/chain-dsl.d.ts +0 -9
  117. package/dist/__tests__/parity/fixtures/address/chain-dsl.d.ts.map +0 -1
  118. package/dist/__tests__/parity/fixtures/address/expected-ir.d.ts +0 -9
  119. package/dist/__tests__/parity/fixtures/address/expected-ir.d.ts.map +0 -1
  120. package/dist/__tests__/parity/fixtures/address/tsdoc.d.ts +0 -19
  121. package/dist/__tests__/parity/fixtures/address/tsdoc.d.ts.map +0 -1
  122. package/dist/__tests__/parity/fixtures/plan-status/chain-dsl.d.ts +0 -19
  123. package/dist/__tests__/parity/fixtures/plan-status/chain-dsl.d.ts.map +0 -1
  124. package/dist/__tests__/parity/fixtures/plan-status/expected-ir.d.ts +0 -6
  125. package/dist/__tests__/parity/fixtures/plan-status/expected-ir.d.ts.map +0 -1
  126. package/dist/__tests__/parity/fixtures/plan-status/tsdoc.d.ts +0 -17
  127. package/dist/__tests__/parity/fixtures/plan-status/tsdoc.d.ts.map +0 -1
  128. package/dist/__tests__/parity/fixtures/product-config/chain-dsl.d.ts +0 -13
  129. package/dist/__tests__/parity/fixtures/product-config/chain-dsl.d.ts.map +0 -1
  130. package/dist/__tests__/parity/fixtures/product-config/expected-ir.d.ts +0 -9
  131. package/dist/__tests__/parity/fixtures/product-config/expected-ir.d.ts.map +0 -1
  132. package/dist/__tests__/parity/fixtures/product-config/tsdoc.d.ts +0 -28
  133. package/dist/__tests__/parity/fixtures/product-config/tsdoc.d.ts.map +0 -1
  134. package/dist/__tests__/parity/fixtures/usd-cents/chain-dsl.d.ts +0 -9
  135. package/dist/__tests__/parity/fixtures/usd-cents/chain-dsl.d.ts.map +0 -1
  136. package/dist/__tests__/parity/fixtures/usd-cents/expected-ir.d.ts +0 -6
  137. package/dist/__tests__/parity/fixtures/usd-cents/expected-ir.d.ts.map +0 -1
  138. package/dist/__tests__/parity/fixtures/usd-cents/tsdoc.d.ts +0 -19
  139. package/dist/__tests__/parity/fixtures/usd-cents/tsdoc.d.ts.map +0 -1
  140. package/dist/__tests__/parity/fixtures/user-registration/chain-dsl.d.ts +0 -12
  141. package/dist/__tests__/parity/fixtures/user-registration/chain-dsl.d.ts.map +0 -1
  142. package/dist/__tests__/parity/fixtures/user-registration/expected-ir.d.ts +0 -9
  143. package/dist/__tests__/parity/fixtures/user-registration/expected-ir.d.ts.map +0 -1
  144. package/dist/__tests__/parity/fixtures/user-registration/tsdoc.d.ts +0 -19
  145. package/dist/__tests__/parity/fixtures/user-registration/tsdoc.d.ts.map +0 -1
  146. package/dist/__tests__/parity/parity.test.d.ts +0 -18
  147. package/dist/__tests__/parity/parity.test.d.ts.map +0 -1
  148. package/dist/__tests__/parity/utils.d.ts +0 -152
  149. package/dist/__tests__/parity/utils.d.ts.map +0 -1
  150. package/dist/__tests__/path-target-parser.test.d.ts +0 -9
  151. package/dist/__tests__/path-target-parser.test.d.ts.map +0 -1
  152. package/dist/__tests__/write-schemas.test.d.ts +0 -2
  153. package/dist/__tests__/write-schemas.test.d.ts.map +0 -1
@@ -4,15 +4,19 @@
4
4
  * Routes through the canonical IR pipeline: Chain DSL → FormIR → JSON Schema 2020-12.
5
5
  */
6
6
  import type { FormElement, FormSpec } from "@formspec/core";
7
- import { type GenerateJsonSchemaFromIROptions, type JsonSchema2020 } from "./ir-generator.js";
7
+ import { type JsonSchema2020 } from "./ir-generator.js";
8
8
  /**
9
9
  * Options for generating JSON Schema from a Chain DSL form.
10
10
  *
11
- * These options are forwarded to the IR-based JSON Schema generator.
12
- *
13
11
  * @public
14
12
  */
15
- export type GenerateJsonSchemaOptions = GenerateJsonSchemaFromIROptions;
13
+ export interface GenerateJsonSchemaOptions {
14
+ /**
15
+ * Vendor prefix for emitted extension keywords.
16
+ * @defaultValue "x-formspec"
17
+ */
18
+ readonly vendorPrefix?: string | undefined;
19
+ }
16
20
  /**
17
21
  * Generates a JSON Schema 2020-12 from a FormSpec.
18
22
  *
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/json-schema/generator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GAAG,+BAA+B,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,SAAS,WAAW,EAAE,EACjE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EACjB,OAAO,CAAC,EAAE,yBAAyB,GAClC,cAAc,CAGhB"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/json-schema/generator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,SAAS,WAAW,EAAE,EACjE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EACjB,OAAO,CAAC,EAAE,yBAAyB,GAClC,cAAc,CAKhB"}
@@ -7,7 +7,7 @@
7
7
  * @see https://json-schema.org/draft/2020-12/schema
8
8
  * @see https://json-schema.org/draft/2020-12/schema
9
9
  */
10
- import type { FormIR, JsonValue } from "@formspec/core";
10
+ import type { FormIR } from "@formspec/core/internals";
11
11
  import type { ExtensionRegistry } from "../extensions/index.js";
12
12
  /**
13
13
  * A JSON Schema 2020-12 document, sub-schema, or keyword collection.
@@ -27,7 +27,7 @@ export interface JsonSchema2020 {
27
27
  items?: JsonSchema2020;
28
28
  additionalProperties?: boolean | JsonSchema2020;
29
29
  enum?: readonly (string | number)[];
30
- const?: JsonValue;
30
+ const?: unknown;
31
31
  allOf?: readonly JsonSchema2020[];
32
32
  oneOf?: readonly JsonSchema2020[];
33
33
  anyOf?: readonly JsonSchema2020[];
@@ -52,7 +52,7 @@ export interface JsonSchema2020 {
52
52
  /**
53
53
  * Options for generating JSON Schema from a canonical FormIR.
54
54
  *
55
- * @public
55
+ * @internal
56
56
  */
57
57
  export interface GenerateJsonSchemaFromIROptions {
58
58
  /**
@@ -108,7 +108,7 @@ export interface GenerateJsonSchemaFromIROptions {
108
108
  * @param ir - The canonical FormIR produced by a canonicalizer
109
109
  * @returns A plain JSON-serializable JSON Schema 2020-12 object
110
110
  *
111
- * @public
111
+ * @internal
112
112
  */
113
113
  export declare function generateJsonSchemaFromIR(ir: FormIR, options?: GenerateJsonSchemaFromIROptions): JsonSchema2020;
114
114
  //# sourceMappingURL=ir-generator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ir-generator.d.ts","sourceRoot":"","sources":["../../src/json-schema/ir-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,MAAM,EAgBN,SAAS,EACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAMhE;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC;IAChD,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAElC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAA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AAG,SAAS,CAAC;IAC3D;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,wBAAwB,CACtC,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,+BAA+B,GACxC,cAAc,CAwChB"}
@@ -11,13 +11,13 @@ import type { JSONSchema7 } from "./types.js";
11
11
  /**
12
12
  * Zod schema for JSON Schema primitive type strings.
13
13
  *
14
- * @public
14
+ * @internal
15
15
  */
16
16
  export declare const jsonSchemaTypeSchema: z.ZodEnum<["string", "number", "integer", "boolean", "object", "array", "null"]>;
17
17
  /**
18
18
  * Zod schema for the legacy JSON Schema 7 subset used by `@formspec/build`.
19
19
  *
20
- * @public
20
+ * @internal
21
21
  */
22
22
  export declare const jsonSchema7Schema: z.ZodType<JSONSchema7>;
23
23
  //# sourceMappingURL=schema.d.ts.map
@@ -6,13 +6,13 @@
6
6
  /**
7
7
  * JSON Schema primitive types.
8
8
  *
9
- * @public
9
+ * @beta
10
10
  */
11
11
  export type JSONSchemaType = "string" | "number" | "integer" | "boolean" | "object" | "array" | "null";
12
12
  /**
13
13
  * A JSON Schema definition (legacy subset used by Zod validator and types.ts).
14
14
  *
15
- * @public
15
+ * @beta
16
16
  */
17
17
  export interface JSONSchema7 {
18
18
  $schema?: string;
@@ -65,13 +65,13 @@ export interface JSONSchema7 {
65
65
  /**
66
66
  * Extension properties for custom FormSpec constraint tags.
67
67
  *
68
- * @public
68
+ * @beta
69
69
  */
70
70
  export type FormSpecSchemaExtensions = Record<`x-formspec-${string}`, unknown>;
71
71
  /**
72
72
  * JSON Schema with FormSpec extension properties for arbitrary `x-formspec-*` keys.
73
73
  *
74
- * @public
74
+ * @beta
75
75
  */
76
76
  export type ExtendedJSONSchema7 = JSONSchema7 & FormSpecSchemaExtensions;
77
77
  /**
@@ -85,7 +85,7 @@ export type ExtendedJSONSchema7 = JSONSchema7 & FormSpecSchemaExtensions;
85
85
  * @param key - Extension key (must start with `x-formspec-`)
86
86
  * @param value - Extension value
87
87
  *
88
- * @public
88
+ * @internal
89
89
  */
90
90
  export declare function setSchemaExtension(schema: object, key: `x-formspec-${string}`, value: unknown): void;
91
91
  /**
@@ -97,7 +97,7 @@ export declare function setSchemaExtension(schema: object, key: `x-formspec-${st
97
97
  * @param key - Extension key (must start with `x-formspec-`)
98
98
  * @returns The extension value, or `undefined` if not present
99
99
  *
100
- * @public
100
+ * @internal
101
101
  */
102
102
  export declare function getSchemaExtension(schema: object, key: `x-formspec-${string}`): unknown;
103
103
  //# sourceMappingURL=types.d.ts.map
@@ -5,7 +5,7 @@
5
5
  * produces a JSON Forms UI Schema. All downstream UI Schema generation
6
6
  * should use this module for UI Schema generation.
7
7
  */
8
- import type { FormIR } from "@formspec/core";
8
+ import type { FormIR } from "@formspec/core/internals";
9
9
  import type { UISchema } from "./types.js";
10
10
  /**
11
11
  * Generates a JSON Forms UI Schema from a canonical `FormIR`.
@@ -1 +1 @@
1
- {"version":3,"file":"ir-generator.d.ts","sourceRoot":"","sources":["../../src/ui-schema/ir-generator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAA6C,MAAM,gBAAgB,CAAC;AACxF,OAAO,KAAK,EACV,QAAQ,EAMT,MAAM,YAAY,CAAC;AAuLpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,CAO3D"}
1
+ {"version":3,"file":"ir-generator.d.ts","sourceRoot":"","sources":["../../src/ui-schema/ir-generator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAA6C,MAAM,0BAA0B,CAAC;AAClG,OAAO,KAAK,EACV,QAAQ,EAMT,MAAM,YAAY,CAAC;AAuLpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,CAO3D"}
@@ -10,31 +10,31 @@ import { z } from "zod";
10
10
  /**
11
11
  * Zod schema for rule effect values.
12
12
  *
13
- * @public
13
+ * @internal
14
14
  */
15
15
  export declare const ruleEffectSchema: z.ZodEnum<["SHOW", "HIDE", "ENABLE", "DISABLE"]>;
16
16
  /**
17
17
  * Rule effect types for conditional visibility.
18
18
  *
19
- * @public
19
+ * @internal
20
20
  */
21
21
  export type RuleEffect = z.infer<typeof ruleEffectSchema>;
22
22
  /**
23
23
  * Zod schema for UI Schema element type strings.
24
24
  *
25
- * @public
25
+ * @internal
26
26
  */
27
27
  export declare const uiSchemaElementTypeSchema: z.ZodEnum<["Control", "VerticalLayout", "HorizontalLayout", "Group", "Categorization", "Category", "Label"]>;
28
28
  /**
29
29
  * UI Schema element types.
30
30
  *
31
- * @public
31
+ * @internal
32
32
  */
33
33
  export type UISchemaElementType = z.infer<typeof uiSchemaElementTypeSchema>;
34
34
  /**
35
35
  * JSON Schema subset used in rule conditions.
36
36
  *
37
- * @public
37
+ * @internal
38
38
  */
39
39
  export interface RuleConditionSchema {
40
40
  const?: unknown;
@@ -53,13 +53,13 @@ export interface RuleConditionSchema {
53
53
  /**
54
54
  * Zod schema for the rule-condition JSON Schema subset.
55
55
  *
56
- * @public
56
+ * @internal
57
57
  */
58
58
  export declare const ruleConditionSchema: z.ZodType<RuleConditionSchema>;
59
59
  /**
60
60
  * Zod schema for a schema-based rule condition.
61
61
  *
62
- * @public
62
+ * @internal
63
63
  */
64
64
  export declare const schemaBasedConditionSchema: z.ZodObject<{
65
65
  scope: z.ZodString;
@@ -74,13 +74,13 @@ export declare const schemaBasedConditionSchema: z.ZodObject<{
74
74
  /**
75
75
  * Condition for a rule.
76
76
  *
77
- * @public
77
+ * @internal
78
78
  */
79
79
  export type SchemaBasedCondition = z.infer<typeof schemaBasedConditionSchema>;
80
80
  /**
81
81
  * Zod schema for a UI Schema rule.
82
82
  *
83
- * @public
83
+ * @internal
84
84
  */
85
85
  export declare const ruleSchema: z.ZodObject<{
86
86
  effect: z.ZodEnum<["SHOW", "HIDE", "ENABLE", "DISABLE"]>;
@@ -110,25 +110,25 @@ export declare const ruleSchema: z.ZodObject<{
110
110
  /**
111
111
  * Rule for conditional element visibility/enablement.
112
112
  *
113
- * @public
113
+ * @internal
114
114
  */
115
115
  export type Rule = z.infer<typeof ruleSchema>;
116
116
  /**
117
117
  * Union of all UI Schema element types.
118
118
  *
119
- * @public
119
+ * @internal
120
120
  */
121
121
  export type UISchemaElement = ControlElement | VerticalLayout | HorizontalLayout | GroupLayout | Categorization | Category | LabelElement;
122
122
  /**
123
123
  * Zod schema for any UI Schema element.
124
124
  *
125
- * @public
125
+ * @internal
126
126
  */
127
127
  export declare const uiSchemaElementSchema: z.ZodType<UISchemaElement>;
128
128
  /**
129
129
  * Zod schema for a Control element.
130
130
  *
131
- * @public
131
+ * @internal
132
132
  */
133
133
  export declare const controlSchema: z.ZodObject<{
134
134
  type: z.ZodLiteral<"Control">;
@@ -224,13 +224,13 @@ export declare const controlSchema: z.ZodObject<{
224
224
  /**
225
225
  * A Control element that binds to a JSON Schema property.
226
226
  *
227
- * @public
227
+ * @internal
228
228
  */
229
229
  export type ControlElement = z.infer<typeof controlSchema>;
230
230
  /**
231
231
  * A vertical layout element.
232
232
  *
233
- * @public
233
+ * @internal
234
234
  */
235
235
  export interface VerticalLayout {
236
236
  type: "VerticalLayout";
@@ -242,13 +242,13 @@ export interface VerticalLayout {
242
242
  /**
243
243
  * Zod schema for a vertical layout element.
244
244
  *
245
- * @public
245
+ * @internal
246
246
  */
247
247
  export declare const verticalLayoutSchema: z.ZodType<VerticalLayout>;
248
248
  /**
249
249
  * A horizontal layout element.
250
250
  *
251
- * @public
251
+ * @internal
252
252
  */
253
253
  export interface HorizontalLayout {
254
254
  type: "HorizontalLayout";
@@ -260,13 +260,13 @@ export interface HorizontalLayout {
260
260
  /**
261
261
  * Zod schema for a horizontal layout element.
262
262
  *
263
- * @public
263
+ * @internal
264
264
  */
265
265
  export declare const horizontalLayoutSchema: z.ZodType<HorizontalLayout>;
266
266
  /**
267
267
  * A group element with a label.
268
268
  *
269
- * @public
269
+ * @internal
270
270
  */
271
271
  export interface GroupLayout {
272
272
  type: "Group";
@@ -279,13 +279,13 @@ export interface GroupLayout {
279
279
  /**
280
280
  * Zod schema for a group layout element.
281
281
  *
282
- * @public
282
+ * @internal
283
283
  */
284
284
  export declare const groupLayoutSchema: z.ZodType<GroupLayout>;
285
285
  /**
286
286
  * A Category element, used inside a Categorization layout.
287
287
  *
288
- * @public
288
+ * @internal
289
289
  */
290
290
  export interface Category {
291
291
  type: "Category";
@@ -298,13 +298,13 @@ export interface Category {
298
298
  /**
299
299
  * Zod schema for a category element.
300
300
  *
301
- * @public
301
+ * @internal
302
302
  */
303
303
  export declare const categorySchema: z.ZodType<Category>;
304
304
  /**
305
305
  * A Categorization element (tab-based layout).
306
306
  *
307
- * @public
307
+ * @internal
308
308
  */
309
309
  export interface Categorization {
310
310
  type: "Categorization";
@@ -317,13 +317,13 @@ export interface Categorization {
317
317
  /**
318
318
  * Zod schema for a categorization element.
319
319
  *
320
- * @public
320
+ * @internal
321
321
  */
322
322
  export declare const categorizationSchema: z.ZodType<Categorization>;
323
323
  /**
324
324
  * Zod schema for a Label element.
325
325
  *
326
- * @public
326
+ * @internal
327
327
  */
328
328
  export declare const labelElementSchema: z.ZodObject<{
329
329
  type: z.ZodLiteral<"Label">;
@@ -416,19 +416,19 @@ export declare const labelElementSchema: z.ZodObject<{
416
416
  /**
417
417
  * A Label element for displaying static text.
418
418
  *
419
- * @public
419
+ * @internal
420
420
  */
421
421
  export type LabelElement = z.infer<typeof labelElementSchema>;
422
422
  /**
423
423
  * Root UI Schema (always a layout — not a Control, Category, or Label).
424
424
  *
425
- * @public
425
+ * @internal
426
426
  */
427
427
  export type UISchema = VerticalLayout | HorizontalLayout | GroupLayout | Categorization;
428
428
  /**
429
429
  * Zod schema for the root UI Schema (layout types only).
430
430
  *
431
- * @public
431
+ * @internal
432
432
  */
433
433
  export declare const uiSchema: z.ZodType<UISchema>;
434
434
  //# sourceMappingURL=schema.d.ts.map
@@ -1,11 +1,160 @@
1
1
  /**
2
2
  * JSON Forms UI Schema type definitions.
3
3
  *
4
- * Types are derived from Zod schemas in ./schema.ts.
4
+ * These are the consumer-facing TypeScript shapes. Runtime validation remains
5
+ * defined separately in `./schema.ts`.
6
+ *
5
7
  * See: https://jsonforms.io/docs/uischema/
6
8
  */
7
- export type { RuleConditionSchema, SchemaBasedCondition, Rule, RuleEffect, ControlElement, VerticalLayout, HorizontalLayout, GroupLayout, Categorization, Category, LabelElement, UISchemaElement, UISchemaElementType, UISchema, } from "./schema.js";
8
- import type { Rule, UISchemaElementType } from "./schema.js";
9
+ /**
10
+ * Rule effect types for conditional visibility.
11
+ *
12
+ * @public
13
+ */
14
+ export type RuleEffect = "SHOW" | "HIDE" | "ENABLE" | "DISABLE";
15
+ /**
16
+ * UI Schema element types.
17
+ *
18
+ * @public
19
+ */
20
+ export type UISchemaElementType = "Control" | "VerticalLayout" | "HorizontalLayout" | "Group" | "Categorization" | "Category" | "Label";
21
+ /**
22
+ * JSON Schema subset used in rule conditions.
23
+ *
24
+ * @public
25
+ */
26
+ export interface RuleConditionSchema {
27
+ const?: unknown;
28
+ enum?: readonly unknown[];
29
+ type?: string;
30
+ not?: RuleConditionSchema;
31
+ minimum?: number;
32
+ maximum?: number;
33
+ exclusiveMinimum?: number;
34
+ exclusiveMaximum?: number;
35
+ minLength?: number;
36
+ properties?: Record<string, RuleConditionSchema>;
37
+ required?: string[];
38
+ allOf?: RuleConditionSchema[];
39
+ }
40
+ /**
41
+ * Condition for a rule.
42
+ *
43
+ * @public
44
+ */
45
+ export interface SchemaBasedCondition {
46
+ readonly scope: string;
47
+ readonly schema: RuleConditionSchema;
48
+ }
49
+ /**
50
+ * Rule for conditional element visibility/enablement.
51
+ *
52
+ * @public
53
+ */
54
+ export interface Rule {
55
+ readonly effect: RuleEffect;
56
+ readonly condition: SchemaBasedCondition;
57
+ }
58
+ /**
59
+ * A Control element that binds to a JSON Schema property.
60
+ *
61
+ * @public
62
+ */
63
+ export interface ControlElement {
64
+ readonly type: "Control";
65
+ readonly scope: string;
66
+ readonly label?: string | false | undefined;
67
+ readonly rule?: Rule | undefined;
68
+ readonly options?: Record<string, unknown> | undefined;
69
+ readonly [k: string]: unknown;
70
+ }
71
+ /**
72
+ * A vertical layout element.
73
+ *
74
+ * @public
75
+ */
76
+ export interface VerticalLayout {
77
+ readonly type: "VerticalLayout";
78
+ readonly elements: UISchemaElement[];
79
+ readonly rule?: Rule | undefined;
80
+ readonly options?: Record<string, unknown> | undefined;
81
+ readonly [k: string]: unknown;
82
+ }
83
+ /**
84
+ * A horizontal layout element.
85
+ *
86
+ * @public
87
+ */
88
+ export interface HorizontalLayout {
89
+ readonly type: "HorizontalLayout";
90
+ readonly elements: UISchemaElement[];
91
+ readonly rule?: Rule | undefined;
92
+ readonly options?: Record<string, unknown> | undefined;
93
+ readonly [k: string]: unknown;
94
+ }
95
+ /**
96
+ * A group element with a label.
97
+ *
98
+ * @public
99
+ */
100
+ export interface GroupLayout {
101
+ readonly type: "Group";
102
+ readonly label: string;
103
+ readonly elements: UISchemaElement[];
104
+ readonly rule?: Rule | undefined;
105
+ readonly options?: Record<string, unknown> | undefined;
106
+ readonly [k: string]: unknown;
107
+ }
108
+ /**
109
+ * A Category element, used inside a Categorization layout.
110
+ *
111
+ * @public
112
+ */
113
+ export interface Category {
114
+ readonly type: "Category";
115
+ readonly label: string;
116
+ readonly elements: UISchemaElement[];
117
+ readonly rule?: Rule | undefined;
118
+ readonly options?: Record<string, unknown> | undefined;
119
+ readonly [k: string]: unknown;
120
+ }
121
+ /**
122
+ * A Categorization element (tab-based layout).
123
+ *
124
+ * @public
125
+ */
126
+ export interface Categorization {
127
+ readonly type: "Categorization";
128
+ readonly elements: Category[];
129
+ readonly label?: string | undefined;
130
+ readonly rule?: Rule | undefined;
131
+ readonly options?: Record<string, unknown> | undefined;
132
+ readonly [k: string]: unknown;
133
+ }
134
+ /**
135
+ * A Label element for displaying static text.
136
+ *
137
+ * @public
138
+ */
139
+ export interface LabelElement {
140
+ readonly type: "Label";
141
+ readonly text: string;
142
+ readonly rule?: Rule | undefined;
143
+ readonly options?: Record<string, unknown> | undefined;
144
+ readonly [k: string]: unknown;
145
+ }
146
+ /**
147
+ * Union of all UI Schema element types.
148
+ *
149
+ * @public
150
+ */
151
+ export type UISchemaElement = ControlElement | VerticalLayout | HorizontalLayout | GroupLayout | Categorization | Category | LabelElement;
152
+ /**
153
+ * Root UI Schema (always a layout — not a Control, Category, or Label).
154
+ *
155
+ * @public
156
+ */
157
+ export type UISchema = VerticalLayout | HorizontalLayout | GroupLayout | Categorization;
9
158
  /**
10
159
  * Base interface for all UI Schema elements.
11
160
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ui-schema/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,IAAI,EACJ,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,QAAQ,GACT,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE7D;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ui-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QAAQ,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,WAAW,GACX,cAAc,GACd,QAAQ,GACR,YAAY,CAAC;AAEjB;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,cAAc,GAAG,gBAAgB,GAAG,WAAW,GAAG,cAAc,CAAC;AAExF;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC"}
@@ -8,7 +8,7 @@
8
8
  * @packageDocumentation
9
9
  */
10
10
  import { type ConstraintSemanticDiagnostic } from "@formspec/analysis/internal";
11
- import type { FormIR } from "@formspec/core";
11
+ import type { FormIR } from "@formspec/core/internals";
12
12
  import type { ExtensionRegistry } from "../extensions/index.js";
13
13
  export type ValidationDiagnostic = ConstraintSemanticDiagnostic;
14
14
  export interface ValidationResult {
@@ -1 +1 @@
1
- {"version":3,"file":"constraint-validator.d.ts","sourceRoot":"","sources":["../../src/validate/constraint-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAA4C,MAAM,gBAAgB,CAAC;AACvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,oBAAoB,GAAG,4BAA4B,CAAC;AAEhE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,WAAW,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACtD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CAChD;AA6ED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,gBAAgB,CAepF"}
1
+ {"version":3,"file":"constraint-validator.d.ts","sourceRoot":"","sources":["../../src/validate/constraint-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAA4C,MAAM,0BAA0B,CAAC;AACjG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,oBAAoB,GAAG,4BAA4B,CAAC;AAEhE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,WAAW,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACtD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CAChD;AA6ED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,gBAAgB,CAepF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formspec/build",
3
- "version": "0.1.0-alpha.22",
3
+ "version": "0.1.0-alpha.23",
4
4
  "description": "Build tools to compile FormSpec forms to JSON Schema and UI Schema",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -34,15 +34,15 @@
34
34
  "@microsoft/tsdoc": "^0.16.0",
35
35
  "@microsoft/tsdoc-config": "^0.18.1",
36
36
  "zod": "^3.25.0",
37
- "@formspec/analysis": "0.1.0-alpha.22",
38
- "@formspec/core": "0.1.0-alpha.21"
37
+ "@formspec/analysis": "0.1.0-alpha.23",
38
+ "@formspec/core": "0.1.0-alpha.23"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "typescript": "^5.0.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "vitest": "^3.0.0",
45
- "@formspec/dsl": "0.1.0-alpha.21"
45
+ "@formspec/dsl": "0.1.0-alpha.23"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
@@ -50,12 +50,12 @@
50
50
  "keywords": [],
51
51
  "license": "UNLICENSED",
52
52
  "scripts": {
53
- "build": "tsup && tsc --emitDeclarationOnly && api-extractor run --local",
53
+ "build": "tsup && tsc --emitDeclarationOnly && pnpm run api-extractor:local",
54
54
  "clean": "rm -rf dist temp",
55
55
  "typecheck": "tsc --noEmit",
56
56
  "test": "pnpm run build && vitest run",
57
- "api-extractor": "api-extractor run",
58
- "api-extractor:local": "api-extractor run --local",
59
- "api-documenter": "api-documenter markdown -i temp -o docs"
57
+ "api-extractor": "api-extractor run && node ../../scripts/normalize-generated-markdown.mjs api-report",
58
+ "api-extractor:local": "api-extractor run --local && node ../../scripts/normalize-generated-markdown.mjs api-report",
59
+ "api-documenter": "api-documenter markdown -i temp -o docs && node ../../scripts/normalize-generated-markdown.mjs docs"
60
60
  }
61
61
  }
@@ -1,9 +0,0 @@
1
- /**
2
- * Tests for transitive type alias constraint propagation.
3
- *
4
- * Verifies that constraints declared on type aliases propagate transitively
5
- * through alias chains (e.g., Integer → Percentage → field), and that
6
- * excessively deep chains throw a clear error.
7
- */
8
- export {};
9
- //# sourceMappingURL=alias-chain-propagation.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alias-chain-propagation.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/alias-chain-propagation.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=chain-dsl-canonicalizer.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chain-dsl-canonicalizer.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/chain-dsl-canonicalizer.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=class-schema.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-schema.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/class-schema.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cli.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/cli.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=constraint-validator.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constraint-validator.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/constraint-validator.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=date-extension.integration.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-extension.integration.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/date-extension.integration.test.ts"],"names":[],"mappings":""}