@stripe/extensibility-jsonschema-tools 1.0.0 → 1.0.2

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/index.d.ts CHANGED
@@ -1,16 +1,18 @@
1
+ import { FormSpecConfig } from '@stripe/formspec-config';
2
+ export { FormSpecConfig } from '@stripe/formspec-config';
1
3
  import * as ts from 'typescript';
2
- export { ExtendedJSONSchema7, getSchemaExtension, jsonSchema7Schema, setSchemaExtension, uiSchemaSchema } from '@formspec/build/browser';
4
+ export { ExtendedJSONSchema7, getSchemaExtension, jsonSchema7Schema, setSchemaExtension, uiSchemaSchema } from '@stripe/formspec-build/browser';
3
5
 
4
6
  /**
5
7
  * Per-declaration metadata policy input.
6
8
  *
7
9
  * @public
8
10
  */
9
- declare interface DeclarationMetadataPolicyInput$2 {
11
+ declare interface DeclarationMetadataPolicyInput$1 {
10
12
  /** Policy for JSON-facing serialized names. */
11
- readonly apiName?: MetadataValuePolicyInput$2 | undefined;
13
+ readonly apiName?: MetadataValuePolicyInput$1 | undefined;
12
14
  /** Policy for human-facing labels and titles. */
13
- readonly displayName?: MetadataValuePolicyInput$2 | undefined;
15
+ readonly displayName?: MetadataValuePolicyInput$1 | undefined;
14
16
  }
15
17
 
16
18
  /* Excluded from this release type: DynamicTypeNode */
@@ -24,7 +26,7 @@ declare interface DeclarationMetadataPolicyInput$2 {
24
26
  *
25
27
  * @public
26
28
  */
27
- declare interface EnumMemberDisplayNameDisabledPolicyInput$2 {
29
+ declare interface EnumMemberDisplayNameDisabledPolicyInput$1 {
28
30
  /** Leaves missing enum-member display names unresolved. */
29
31
  readonly mode: "disabled";
30
32
  }
@@ -34,11 +36,11 @@ declare interface EnumMemberDisplayNameDisabledPolicyInput$2 {
34
36
  *
35
37
  * @public
36
38
  */
37
- declare interface EnumMemberDisplayNameInferIfMissingPolicyInput$2 {
39
+ declare interface EnumMemberDisplayNameInferIfMissingPolicyInput$1 {
38
40
  /** Infers an enum-member display name when it is not authored explicitly. */
39
41
  readonly mode: "infer-if-missing";
40
42
  /** Callback used to infer the missing display name. */
41
- readonly infer: EnumMemberMetadataInferenceFn$2;
43
+ readonly infer: EnumMemberMetadataInferenceFn$1;
42
44
  }
43
45
 
44
46
  /**
@@ -46,14 +48,14 @@ declare interface EnumMemberDisplayNameInferIfMissingPolicyInput$2 {
46
48
  *
47
49
  * @public
48
50
  */
49
- declare type EnumMemberDisplayNamePolicyInput$2 = EnumMemberDisplayNameDisabledPolicyInput$2 | EnumMemberDisplayNameRequireExplicitPolicyInput$2 | EnumMemberDisplayNameInferIfMissingPolicyInput$2;
51
+ declare type EnumMemberDisplayNamePolicyInput$1 = EnumMemberDisplayNameDisabledPolicyInput$1 | EnumMemberDisplayNameRequireExplicitPolicyInput$1 | EnumMemberDisplayNameInferIfMissingPolicyInput$1;
50
52
 
51
53
  /**
52
54
  * Enum members must declare display names explicitly.
53
55
  *
54
56
  * @public
55
57
  */
56
- declare interface EnumMemberDisplayNameRequireExplicitPolicyInput$2 {
58
+ declare interface EnumMemberDisplayNameRequireExplicitPolicyInput$1 {
57
59
  /** Fails when an enum member has no authored display name. */
58
60
  readonly mode: "require-explicit";
59
61
  }
@@ -67,7 +69,7 @@ declare interface EnumMemberDisplayNameRequireExplicitPolicyInput$2 {
67
69
  *
68
70
  * @public
69
71
  */
70
- declare interface EnumMemberMetadataInferenceContext$2 {
72
+ declare interface EnumMemberMetadataInferenceContext$1 {
71
73
  /** Authoring surface the enum originated from. */
72
74
  readonly surface: MetadataAuthoringSurface$2;
73
75
  /** Logical member identifier used for policy inference. */
@@ -83,16 +85,16 @@ declare interface EnumMemberMetadataInferenceContext$2 {
83
85
  *
84
86
  * @public
85
87
  */
86
- declare type EnumMemberMetadataInferenceFn$2 = (context: EnumMemberMetadataInferenceContext$2) => string;
88
+ declare type EnumMemberMetadataInferenceFn$1 = (context: EnumMemberMetadataInferenceContext$1) => string;
87
89
 
88
90
  /**
89
91
  * User-facing enum-member metadata policy input.
90
92
  *
91
93
  * @public
92
94
  */
93
- declare interface EnumMemberMetadataPolicyInput$2 {
95
+ declare interface EnumMemberMetadataPolicyInput$1 {
94
96
  /** Policy for human-facing enum-member labels. */
95
- readonly displayName?: EnumMemberDisplayNamePolicyInput$2 | undefined;
97
+ readonly displayName?: EnumMemberDisplayNamePolicyInput$1 | undefined;
96
98
  }
97
99
 
98
100
  /**
@@ -133,14 +135,14 @@ declare interface MetadataInferenceContext$2 {
133
135
  *
134
136
  * @public
135
137
  */
136
- declare type MetadataInferenceFn$2 = (context: MetadataInferenceContext$2) => string;
138
+ declare type MetadataInferenceFn$1 = (context: MetadataInferenceContext$2) => string;
137
139
 
138
140
  /**
139
141
  * Context passed to pluralization callbacks.
140
142
  *
141
143
  * @public
142
144
  */
143
- declare interface MetadataPluralizationContext$2 extends MetadataInferenceContext$2 {
145
+ declare interface MetadataPluralizationContext$1 extends MetadataInferenceContext$2 {
144
146
  /** Singular value that pluralization should derive from. */
145
147
  readonly singular: string;
146
148
  }
@@ -150,7 +152,7 @@ declare interface MetadataPluralizationContext$2 extends MetadataInferenceContex
150
152
  *
151
153
  * @public
152
154
  */
153
- declare interface MetadataPluralizationDisabledPolicyInput$2 {
155
+ declare interface MetadataPluralizationDisabledPolicyInput$1 {
154
156
  /** Disables automatic plural-value generation. */
155
157
  readonly mode?: "disabled" | undefined;
156
158
  }
@@ -160,18 +162,18 @@ declare interface MetadataPluralizationDisabledPolicyInput$2 {
160
162
  *
161
163
  * @public
162
164
  */
163
- declare type MetadataPluralizationFn$2 = (context: MetadataPluralizationContext$2) => string;
165
+ declare type MetadataPluralizationFn$1 = (context: MetadataPluralizationContext$1) => string;
164
166
 
165
167
  /**
166
168
  * Pluralization may be inferred when absent.
167
169
  *
168
170
  * @public
169
171
  */
170
- declare interface MetadataPluralizationInferIfMissingPolicyInput$2 {
172
+ declare interface MetadataPluralizationInferIfMissingPolicyInput$1 {
171
173
  /** Infers plural values whenever no explicit plural is present. */
172
174
  readonly mode: "infer-if-missing";
173
175
  /** Callback that derives a plural form from the resolved singular value. */
174
- readonly inflect: MetadataPluralizationFn$2;
176
+ readonly inflect: MetadataPluralizationFn$1;
175
177
  }
176
178
 
177
179
  /**
@@ -179,14 +181,14 @@ declare interface MetadataPluralizationInferIfMissingPolicyInput$2 {
179
181
  *
180
182
  * @public
181
183
  */
182
- declare type MetadataPluralizationPolicyInput$2 = MetadataPluralizationDisabledPolicyInput$2 | MetadataPluralizationRequireExplicitPolicyInput$2 | MetadataPluralizationInferIfMissingPolicyInput$2;
184
+ declare type MetadataPluralizationPolicyInput$1 = MetadataPluralizationDisabledPolicyInput$1 | MetadataPluralizationRequireExplicitPolicyInput$1 | MetadataPluralizationInferIfMissingPolicyInput$1;
183
185
 
184
186
  /**
185
187
  * Pluralization must be authored explicitly.
186
188
  *
187
189
  * @public
188
190
  */
189
- declare interface MetadataPluralizationRequireExplicitPolicyInput$2 {
191
+ declare interface MetadataPluralizationRequireExplicitPolicyInput$1 {
190
192
  /** Requires plural values to be authored directly. */
191
193
  readonly mode: "require-explicit";
192
194
  }
@@ -198,13 +200,13 @@ declare interface MetadataPluralizationRequireExplicitPolicyInput$2 {
198
200
  */
199
201
  declare interface MetadataPolicyInput$1 {
200
202
  /** Policy applied to named types and the analyzed root declaration. */
201
- readonly type?: DeclarationMetadataPolicyInput$2 | undefined;
203
+ readonly type?: DeclarationMetadataPolicyInput$1 | undefined;
202
204
  /** Policy applied to fields and object properties. */
203
- readonly field?: DeclarationMetadataPolicyInput$2 | undefined;
205
+ readonly field?: DeclarationMetadataPolicyInput$1 | undefined;
204
206
  /** Policy applied to callable/method declarations. */
205
- readonly method?: DeclarationMetadataPolicyInput$2 | undefined;
207
+ readonly method?: DeclarationMetadataPolicyInput$1 | undefined;
206
208
  /** Policy applied to enum-member display names during build-time IR resolution. */
207
- readonly enumMember?: EnumMemberMetadataPolicyInput$2 | undefined;
209
+ readonly enumMember?: EnumMemberMetadataPolicyInput$1 | undefined;
208
210
  }
209
211
 
210
212
  /**
@@ -212,11 +214,11 @@ declare interface MetadataPolicyInput$1 {
212
214
  *
213
215
  * @public
214
216
  */
215
- declare interface MetadataValueDisabledPolicyInput$2 {
217
+ declare interface MetadataValueDisabledPolicyInput$1 {
216
218
  /** Disables inference for this scalar metadata value. */
217
219
  readonly mode?: "disabled" | undefined;
218
220
  /** Optional policy controlling plural forms of this scalar value. */
219
- readonly pluralization?: MetadataPluralizationPolicyInput$2 | undefined;
221
+ readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
220
222
  }
221
223
 
222
224
  /**
@@ -224,13 +226,13 @@ declare interface MetadataValueDisabledPolicyInput$2 {
224
226
  *
225
227
  * @public
226
228
  */
227
- declare interface MetadataValueInferIfMissingPolicyInput$2 {
229
+ declare interface MetadataValueInferIfMissingPolicyInput$1 {
228
230
  /** Infers this scalar metadata value when it is not authored explicitly. */
229
231
  readonly mode: "infer-if-missing";
230
232
  /** Callback used to infer the missing singular value. */
231
- readonly infer: MetadataInferenceFn$2;
233
+ readonly infer: MetadataInferenceFn$1;
232
234
  /** Optional policy controlling plural forms of this scalar value. */
233
- readonly pluralization?: MetadataPluralizationPolicyInput$2 | undefined;
235
+ readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
234
236
  }
235
237
 
236
238
  /**
@@ -238,22 +240,22 @@ declare interface MetadataValueInferIfMissingPolicyInput$2 {
238
240
  *
239
241
  * @public
240
242
  */
241
- declare type MetadataValuePolicyInput$2 = MetadataValueDisabledPolicyInput$2 | MetadataValueRequireExplicitPolicyInput$2 | MetadataValueInferIfMissingPolicyInput$2;
243
+ declare type MetadataValuePolicyInput$1 = MetadataValueDisabledPolicyInput$1 | MetadataValueRequireExplicitPolicyInput$1 | MetadataValueInferIfMissingPolicyInput$1;
242
244
 
243
245
  /**
244
246
  * Scalar metadata must be authored explicitly.
245
247
  *
246
248
  * @public
247
249
  */
248
- declare interface MetadataValueRequireExplicitPolicyInput$2 {
250
+ declare interface MetadataValueRequireExplicitPolicyInput$1 {
249
251
  /** Requires this scalar metadata value to be authored directly. */
250
252
  readonly mode: "require-explicit";
251
253
  /** Optional policy controlling plural forms of this scalar value. */
252
- readonly pluralization?: MetadataPluralizationPolicyInput$2 | undefined;
254
+ readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
253
255
  }
254
256
 
255
257
  /**
256
- * `@formspec/build` - Build tools for FormSpec
258
+ * `@stripe/formspec-build` - Build tools for FormSpec
257
259
  *
258
260
  * This package provides generators to compile FormSpec forms into:
259
261
  * - JSON Schema 2020-12 (for validation)
@@ -261,8 +263,8 @@ declare interface MetadataValueRequireExplicitPolicyInput$2 {
261
263
  *
262
264
  * @example
263
265
  * ```typescript
264
- * import { buildFormSchemas } from "@formspec/build";
265
- * import { formspec, field, group } from "@formspec/dsl";
266
+ * import { buildFormSchemas } from "@stripe/formspec-build";
267
+ * import { formspec, field, group } from "@stripe/formspec-dsl";
266
268
  *
267
269
  * const form = formspec(
268
270
  * group("Customer",
@@ -280,19 +282,13 @@ declare interface MetadataValueRequireExplicitPolicyInput$2 {
280
282
 
281
283
 
282
284
  /**
283
- * Registration for mapping a built-in TSDoc tag onto a custom constraint when
284
- * it is used on a particular custom type.
285
+ * Controls whether a type-level annotation can flow from a base declaration to
286
+ * a derived declaration during semantic analysis.
285
287
  *
286
288
  * @public
287
289
  */
288
- declare interface BuiltinConstraintBroadeningRegistration_2 {
289
- /** The built-in tag being broadened, without the `@` prefix. */
290
- readonly tagName: BuiltinConstraintName$1;
291
- /** The custom constraint to emit for this built-in tag. */
292
- readonly constraintName: string;
293
- /** Parser from raw TSDoc text to extension payload. */
294
- readonly parseValue: (raw: string) => ExtensionPayloadValue$1;
295
- }
290
+ declare type AnnotationInheritancePolicy$1 = "local-wins" | "never";
291
+
296
292
 
297
293
  /**
298
294
  * Registration for mapping a built-in TSDoc tag onto a custom constraint when
@@ -300,13 +296,13 @@ declare interface BuiltinConstraintBroadeningRegistration_2 {
300
296
  *
301
297
  * @public
302
298
  */
303
- declare interface BuiltinConstraintBroadeningRegistration_3 {
299
+ declare interface BuiltinConstraintBroadeningRegistration_2 {
304
300
  /** The built-in tag being broadened, without the `@` prefix. */
305
- readonly tagName: BuiltinConstraintName_2;
301
+ readonly tagName: BuiltinConstraintName$1;
306
302
  /** The custom constraint to emit for this built-in tag. */
307
303
  readonly constraintName: string;
308
304
  /** Parser from raw TSDoc text to extension payload. */
309
- readonly parseValue: (raw: string) => ExtensionPayloadValue_2;
305
+ readonly parseValue: (raw: string) => ExtensionPayloadValue$1;
310
306
  }
311
307
 
312
308
  /**
@@ -316,13 +312,6 @@ declare interface BuiltinConstraintBroadeningRegistration_3 {
316
312
  */
317
313
  declare type BuiltinConstraintName$1 = "minimum" | "maximum" | "exclusiveMinimum" | "exclusiveMaximum" | "multipleOf" | "minLength" | "maxLength" | "minItems" | "maxItems" | "uniqueItems" | "pattern" | "const" | "enumOptions";
318
314
 
319
- /**
320
- * Type of a built-in constraint name.
321
- *
322
- * @public
323
- */
324
- declare type BuiltinConstraintName_2 = "minimum" | "maximum" | "exclusiveMinimum" | "exclusiveMaximum" | "multipleOf" | "minLength" | "maxLength" | "minItems" | "maxItems" | "uniqueItems" | "pattern" | "const" | "enumOptions";
325
-
326
315
  /**
327
316
  * A Categorization element (tab-based layout).
328
317
  *
@@ -364,24 +353,6 @@ declare interface Category {
364
353
  }
365
354
 
366
355
 
367
- /**
368
- * Complete constraint configuration for a FormSpec project.
369
- *
370
- * @public
371
- */
372
- declare interface ConstraintConfig {
373
- /** Field type constraints */
374
- fieldTypes?: FieldTypeConstraints;
375
- /** Layout and structure constraints */
376
- layout?: LayoutConstraints;
377
- /** UI Schema feature constraints */
378
- uiSchema?: UISchemaConstraints;
379
- /** Field configuration option constraints */
380
- fieldOptions?: FieldOptionConstraints;
381
- /** Control options constraints */
382
- controlOptions?: ControlOptionConstraints;
383
- }
384
-
385
356
  /**
386
357
  * Semantic metadata for ordered custom constraints that should participate in
387
358
  * the generic contradiction/broadening logic.
@@ -400,24 +371,6 @@ declare interface ConstraintSemanticRole$1 {
400
371
  readonly inclusive: boolean;
401
372
  }
402
373
 
403
- /**
404
- * Semantic metadata for ordered custom constraints that should participate in
405
- * the generic contradiction/broadening logic.
406
- *
407
- * @public
408
- */
409
- declare interface ConstraintSemanticRole_2 {
410
- /**
411
- * Logical family identifier shared by related constraints, for example
412
- * `"decimal-bound"` or `"date-bound"`.
413
- */
414
- readonly family: string;
415
- /** Whether this constraint acts as a lower or upper bound. */
416
- readonly bound: "lower" | "upper" | "exact";
417
- /** Whether equality is allowed when comparing against the bound. */
418
- readonly inclusive: boolean;
419
- }
420
-
421
374
 
422
375
  /**
423
376
  * Declarative authoring-side registration for a custom TSDoc constraint tag.
@@ -439,26 +392,6 @@ declare interface ConstraintTagRegistration_2 {
439
392
  readonly isApplicableToType?: (type: ExtensionApplicableType$1) => boolean;
440
393
  }
441
394
 
442
- /**
443
- * Declarative authoring-side registration for a custom TSDoc constraint tag.
444
- *
445
- * @public
446
- */
447
- declare interface ConstraintTagRegistration_3 {
448
- /** Tag name without the `@` prefix, e.g. `"maxSigFig"`. */
449
- readonly tagName: string;
450
- /** The custom constraint that this tag should produce. */
451
- readonly constraintName: string;
452
- /** Parser from raw TSDoc text to JSON-serializable payload. */
453
- readonly parseValue: (raw: string) => ExtensionPayloadValue_2;
454
- /**
455
- * Optional precise applicability predicate for the field type being parsed.
456
- * When omitted, the target custom constraint registration controls type
457
- * applicability during validation.
458
- */
459
- readonly isApplicableToType?: (type: ExtensionApplicableType_2) => boolean;
460
- }
461
-
462
395
  /**
463
396
  * A Control element that binds to a JSON Schema property.
464
397
  *
@@ -479,27 +412,6 @@ declare interface ControlElement {
479
412
  readonly [k: string]: unknown;
480
413
  }
481
414
 
482
- /**
483
- * Control options constraints - control which JSONForms Control.options are allowed.
484
- * These are renderer-specific options that may not be universally supported.
485
- *
486
- * @public
487
- */
488
- declare interface ControlOptionConstraints {
489
- /** format - renderer format hint (e.g., "radio", "textarea") */
490
- format?: Severity;
491
- /** readonly - read-only mode */
492
- readonly?: Severity;
493
- /** multi - multi-select for enums */
494
- multi?: Severity;
495
- /** showUnfocusedDescription - show description when unfocused */
496
- showUnfocusedDescription?: Severity;
497
- /** hideRequiredAsterisk - hide required indicator */
498
- hideRequiredAsterisk?: Severity;
499
- /** Custom control options (extensible dictionary) */
500
- custom?: Record<string, Severity>;
501
- }
502
-
503
415
  /**
504
416
  * Registration for a custom annotation that may produce JSON Schema keywords.
505
417
  *
@@ -511,6 +423,19 @@ declare interface ControlOptionConstraints {
511
423
  declare interface CustomAnnotationRegistration_2 {
512
424
  /** The annotation name, unique within the extension. */
513
425
  readonly annotationName: string;
426
+ /**
427
+ * Optional type-level inheritance behavior for semantic consumers.
428
+ *
429
+ * `"local-wins"` means a derived declaration inherits this annotation from
430
+ * its base declaration only when the derived declaration does not provide the
431
+ * same extension annotation identity locally. Omitted registrations behave as
432
+ * `"never"`.
433
+ */
434
+ readonly inheritFromBase?: AnnotationInheritancePolicy$1;
435
+ /**
436
+ * Optional editor documentation for the annotation's TSDoc authoring tag.
437
+ */
438
+ readonly tagDocumentation?: CustomAnnotationTagDocumentation$1;
514
439
  /**
515
440
  * Optionally converts the annotation value into JSON Schema keywords.
516
441
  * If omitted, the annotation has no JSON Schema representation (UI-only).
@@ -519,21 +444,28 @@ declare interface CustomAnnotationRegistration_2 {
519
444
  }
520
445
 
521
446
  /**
522
- * Registration for a custom annotation that may produce JSON Schema keywords.
447
+ * Documentation text for an extension annotation's TSDoc authoring tag.
523
448
  *
524
- * Custom annotations are referenced by FormSpec's internal custom-annotation nodes.
525
- * They describe or present a field but do not affect which values are valid.
449
+ * These strings are consumed by editor integrations for completion details and
450
+ * hover text. They do not affect annotation parsing, inheritance, or schema
451
+ * emission.
526
452
  *
527
453
  * @public
528
454
  */
529
- declare interface CustomAnnotationRegistration_3 {
530
- /** The annotation name, unique within the extension. */
531
- readonly annotationName: string;
455
+ declare interface CustomAnnotationTagDocumentation$1 {
456
+ /** Completion detail shown beside the annotation tag. */
457
+ readonly completionDetail?: string;
532
458
  /**
533
- * Optionally converts the annotation value into JSON Schema keywords.
534
- * If omitted, the annotation has no JSON Schema representation (UI-only).
459
+ * Label for the payload portion of the annotation tag signature.
460
+ *
461
+ * The payload remains the full authored text after the tag name, so this can
462
+ * describe single-argument or multi-argument annotation syntaxes.
535
463
  */
536
- readonly toJsonSchema?: (value: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
464
+ readonly payloadLabel?: string;
465
+ /** Short hover summary shown for the annotation tag. */
466
+ readonly hoverSummary?: string;
467
+ /** Full markdown hover body for the annotation tag. */
468
+ readonly hoverMarkdown?: string;
537
469
  }
538
470
 
539
471
 
@@ -595,64 +527,6 @@ declare interface CustomConstraintRegistration_2 {
595
527
  readonly emitsVocabularyKeywords?: boolean;
596
528
  }
597
529
 
598
- /**
599
- * Registration for a custom constraint that maps to JSON Schema keywords.
600
- *
601
- * Custom constraints are referenced by FormSpec's internal custom-constraint nodes.
602
- *
603
- * @public
604
- */
605
- declare interface CustomConstraintRegistration_3 {
606
- /** The constraint name, unique within the extension. */
607
- readonly constraintName: string;
608
- /**
609
- * How this constraint composes with other constraints of the same kind.
610
- * - "intersect": combine with logical AND (both must hold)
611
- * - "override": last writer wins
612
- */
613
- readonly compositionRule: "intersect" | "override";
614
- /**
615
- * TypeNode kinds this constraint is applicable to, or `null` for any type.
616
- * Used by the validator to emit TYPE_MISMATCH diagnostics.
617
- */
618
- readonly applicableTypes: readonly ExtensionApplicableType_2["kind"][] | null;
619
- /**
620
- * Optional precise type predicate used when kind-level applicability is too
621
- * broad (for example, constraints that apply to integer-like primitives but
622
- * not strings).
623
- */
624
- readonly isApplicableToType?: (type: ExtensionApplicableType_2) => boolean;
625
- /**
626
- * Optional comparator for payloads belonging to the same custom constraint.
627
- * Return values follow the `Array.prototype.sort()` contract.
628
- */
629
- readonly comparePayloads?: (left: ExtensionPayloadValue_2, right: ExtensionPayloadValue_2) => number;
630
- /**
631
- * Optional semantic family metadata for generic contradiction/broadening
632
- * handling across ordered constraints.
633
- */
634
- readonly semanticRole?: ConstraintSemanticRole_2;
635
- /**
636
- * Converts the custom constraint's payload into JSON Schema keywords.
637
- *
638
- * @param payload - The opaque JSON payload stored on the custom constraint node.
639
- * @param vendorPrefix - The vendor prefix for extension keywords.
640
- * @returns A JSON Schema fragment with the constraint keywords.
641
- */
642
- readonly toJsonSchema: (payload: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
643
- /**
644
- * When true, `toJsonSchema` may emit vocabulary keywords that do not carry
645
- * the vendor prefix. By default, all keys returned from `toJsonSchema` must
646
- * start with `${vendorPrefix}-`; setting this flag relaxes that check so
647
- * the constraint can produce standard or custom vocabulary keywords such as
648
- * `decimalMinimum`.
649
- *
650
- * Use this for constraints that define their own JSON Schema vocabulary
651
- * rather than namespacing under the vendor prefix.
652
- */
653
- readonly emitsVocabularyKeywords?: boolean;
654
- }
655
-
656
530
 
657
531
  /**
658
532
  * Registration for a custom type that maps to a JSON Schema representation.
@@ -711,75 +585,6 @@ declare interface CustomTypeRegistration_2 {
711
585
  readonly builtinConstraintBroadenings?: readonly BuiltinConstraintBroadeningRegistration_2[];
712
586
  }
713
587
 
714
- /**
715
- * Registration for a custom type that maps to a JSON Schema representation.
716
- *
717
- * Custom types are referenced by FormSpec's internal custom-type IR nodes and
718
- * resolved to JSON Schema via `toJsonSchema` during generation.
719
- *
720
- * @public
721
- */
722
- declare interface CustomTypeRegistration_3 {
723
- /** The type name, unique within the extension. */
724
- readonly typeName: string;
725
- /**
726
- * Optional TypeScript surface names that should resolve to this custom type
727
- * during TSDoc/class analysis. Defaults to `typeName` when omitted.
728
- * @deprecated Prefer `brand` for structural detection or type parameters
729
- * on `defineCustomType<T>()` for symbol-based detection. String name
730
- * matching will be removed in a future major version.
731
- */
732
- readonly tsTypeNames?: readonly string[];
733
- /**
734
- * Optional brand identifier for structural type detection.
735
- *
736
- * When provided, the type resolver checks `type.getProperties()` for a
737
- * computed property whose name matches this identifier. This is more
738
- * reliable than `tsTypeNames` for aliased branded types because it does not
739
- * depend on the local type name.
740
- *
741
- * Brand detection is attempted after name-based resolution (`tsTypeNames`)
742
- * as a structural fallback. If both match, name-based resolution wins.
743
- *
744
- * The value should match the identifier text of a `unique symbol` declaration
745
- * used as a computed property key on the branded type. For example, if the
746
- * type is `string & { readonly [__decimalBrand]: true }`, the brand is
747
- * `"__decimalBrand"`.
748
- *
749
- * Brand identifiers are stored as plain strings in the extension registry, so
750
- * they must be unique across the extensions loaded into the same build.
751
- *
752
- * Note: `"__integerBrand"` is reserved for the builtin Integer type.
753
- */
754
- readonly brand?: string;
755
- /**
756
- * Converts the custom type's payload into a JSON Schema fragment.
757
- *
758
- * @param payload - The opaque JSON payload stored on the custom type node.
759
- * @param vendorPrefix - The vendor prefix for extension keywords (e.g., "x-stripe").
760
- * @returns A JSON Schema fragment representing this type.
761
- */
762
- readonly toJsonSchema: (payload: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
763
- /* Excluded from this release type: serializeDefault */
764
- /**
765
- * Optional broadening of built-in constraint tags so they can apply to this
766
- * custom type without modifying the core built-in constraint tables.
767
- */
768
- readonly builtinConstraintBroadenings?: readonly BuiltinConstraintBroadeningRegistration_3[];
769
- }
770
-
771
- /**
772
- * Per-declaration metadata policy input.
773
- *
774
- * @public
775
- */
776
- declare interface DeclarationMetadataPolicyInput$1 {
777
- /** Policy for JSON-facing serialized names. */
778
- readonly apiName?: MetadataValuePolicyInput$1 | undefined;
779
- /** Policy for human-facing labels and titles. */
780
- readonly displayName?: MetadataValuePolicyInput$1 | undefined;
781
- }
782
-
783
588
  /**
784
589
  * Discriminator-specific schema generation options.
785
590
  *
@@ -797,124 +602,28 @@ declare interface DiscriminatorResolutionOptions {
797
602
 
798
603
 
799
604
  /**
800
- * Enum-member display names remain unset unless authored explicitly.
605
+ * A curated type shape exposed to extension applicability hooks.
606
+ *
607
+ * This intentionally exposes only the fields needed to determine tag/type
608
+ * applicability without committing the entire canonical IR as public API.
801
609
  *
802
610
  * @public
803
611
  */
804
- declare interface EnumMemberDisplayNameDisabledPolicyInput$1 {
805
- /** Leaves missing enum-member display names unresolved. */
806
- readonly mode: "disabled";
807
- }
612
+ declare type ExtensionApplicableType$1 = {
613
+ readonly kind: "primitive";
614
+ readonly primitiveKind: "string" | "number" | "integer" | "bigint" | "boolean" | "null";
615
+ } | {
616
+ readonly kind: "custom";
617
+ readonly typeId: string;
618
+ readonly payload: ExtensionPayloadValue$1;
619
+ } | {
620
+ readonly kind: Exclude<ExtensionTypeKind$1, "primitive" | "custom">;
621
+ };
622
+
808
623
 
809
624
  /**
810
- * Missing enum-member display names may be inferred.
811
- *
812
- * @public
813
- */
814
- declare interface EnumMemberDisplayNameInferIfMissingPolicyInput$1 {
815
- /** Infers an enum-member display name when it is not authored explicitly. */
816
- readonly mode: "infer-if-missing";
817
- /** Callback used to infer the missing display name. */
818
- readonly infer: EnumMemberMetadataInferenceFn$1;
819
- }
820
-
821
- /**
822
- * Enum-member display-name policy input.
823
- *
824
- * @public
825
- */
826
- declare type EnumMemberDisplayNamePolicyInput$1 = EnumMemberDisplayNameDisabledPolicyInput$1 | EnumMemberDisplayNameRequireExplicitPolicyInput$1 | EnumMemberDisplayNameInferIfMissingPolicyInput$1;
827
-
828
- /**
829
- * Enum members must declare display names explicitly.
830
- *
831
- * @public
832
- */
833
- declare interface EnumMemberDisplayNameRequireExplicitPolicyInput$1 {
834
- /** Fails when an enum member has no authored display name. */
835
- readonly mode: "require-explicit";
836
- }
837
-
838
- /**
839
- * Build-facing context passed to enum-member metadata inference callbacks.
840
- *
841
- * Enum members are resolved separately from declaration-level metadata so they
842
- * do not participate in the shared declaration-kind model used by TSDoc and
843
- * extension metadata slots.
844
- *
845
- * @public
846
- */
847
- declare interface EnumMemberMetadataInferenceContext$1 {
848
- /** Authoring surface the enum originated from. */
849
- readonly surface: MetadataAuthoringSurface_2;
850
- /** Logical member identifier used for policy inference. */
851
- readonly logicalName: string;
852
- /** Underlying enum value before stringification. */
853
- readonly memberValue: string | number;
854
- /** Optional build-only context supplied by the resolver. */
855
- readonly buildContext?: unknown;
856
- }
857
-
858
- /**
859
- * Callback used to infer enum-member display names.
860
- *
861
- * @public
862
- */
863
- declare type EnumMemberMetadataInferenceFn$1 = (context: EnumMemberMetadataInferenceContext$1) => string;
864
-
865
- /**
866
- * User-facing enum-member metadata policy input.
867
- *
868
- * @public
869
- */
870
- declare interface EnumMemberMetadataPolicyInput$1 {
871
- /** Policy for human-facing enum-member labels. */
872
- readonly displayName?: EnumMemberDisplayNamePolicyInput$1 | undefined;
873
- }
874
-
875
-
876
- /**
877
- * A curated type shape exposed to extension applicability hooks.
878
- *
879
- * This intentionally exposes only the fields needed to determine tag/type
880
- * applicability without committing the entire canonical IR as public API.
881
- *
882
- * @public
883
- */
884
- declare type ExtensionApplicableType$1 = {
885
- readonly kind: "primitive";
886
- readonly primitiveKind: "string" | "number" | "integer" | "bigint" | "boolean" | "null";
887
- } | {
888
- readonly kind: "custom";
889
- readonly typeId: string;
890
- readonly payload: ExtensionPayloadValue$1;
891
- } | {
892
- readonly kind: Exclude<ExtensionTypeKind$1, "primitive" | "custom">;
893
- };
894
-
895
- /**
896
- * A curated type shape exposed to extension applicability hooks.
897
- *
898
- * This intentionally exposes only the fields needed to determine tag/type
899
- * applicability without committing the entire canonical IR as public API.
900
- *
901
- * @public
902
- */
903
- declare type ExtensionApplicableType_2 = {
904
- readonly kind: "primitive";
905
- readonly primitiveKind: "string" | "number" | "integer" | "bigint" | "boolean" | "null";
906
- } | {
907
- readonly kind: "custom";
908
- readonly typeId: string;
909
- readonly payload: ExtensionPayloadValue_2;
910
- } | {
911
- readonly kind: Exclude<ExtensionTypeKind_2, "primitive" | "custom">;
912
- };
913
-
914
-
915
- /**
916
- * A complete extension definition bundling types, constraints, annotations,
917
- * and vocabulary keywords.
625
+ * A complete extension definition bundling types, constraints, annotations,
626
+ * and vocabulary keywords.
918
627
  *
919
628
  * @example
920
629
  * ```typescript
@@ -951,45 +660,6 @@ declare interface ExtensionDefinition_2 {
951
660
  readonly vocabularyKeywords?: readonly VocabularyKeywordRegistration$1[];
952
661
  }
953
662
 
954
- /**
955
- * A complete extension definition bundling types, constraints, annotations,
956
- * and vocabulary keywords.
957
- *
958
- * @example
959
- * ```typescript
960
- * const monetaryExtension = defineExtension({
961
- * extensionId: "x-stripe/monetary",
962
- * types: [
963
- * defineCustomType({
964
- * typeName: "Decimal",
965
- * toJsonSchema: (_payload, prefix) => ({
966
- * type: "string",
967
- * [`${prefix}-decimal`]: true,
968
- * }),
969
- * }),
970
- * ],
971
- * });
972
- * ```
973
- *
974
- * @public
975
- */
976
- declare interface ExtensionDefinition_3 {
977
- /** Globally unique extension identifier, e.g., "x-stripe/monetary". */
978
- readonly extensionId: string;
979
- /** Custom type registrations provided by this extension. */
980
- readonly types?: readonly CustomTypeRegistration_3[];
981
- /** Custom constraint registrations provided by this extension. */
982
- readonly constraints?: readonly CustomConstraintRegistration_3[];
983
- /** Authoring-side TSDoc tag registrations provided by this extension. */
984
- readonly constraintTags?: readonly ConstraintTagRegistration_3[];
985
- /** Metadata-slot registrations shared by build- and lint-time analysis. */
986
- readonly metadataSlots?: readonly MetadataSlotRegistration_2[];
987
- /** Custom annotation registrations provided by this extension. */
988
- readonly annotations?: readonly CustomAnnotationRegistration_3[];
989
- /** Vocabulary keyword registrations provided by this extension. */
990
- readonly vocabularyKeywords?: readonly VocabularyKeywordRegistration_2[];
991
- }
992
-
993
663
  /**
994
664
  * A JSON-serializable payload value used by extension registration hooks.
995
665
  *
@@ -999,15 +669,6 @@ declare type ExtensionPayloadValue$1 = null | boolean | number | string | readon
999
669
  readonly [key: string]: ExtensionPayloadValue$1;
1000
670
  };
1001
671
 
1002
- /**
1003
- * A JSON-serializable payload value used by extension registration hooks.
1004
- *
1005
- * @public
1006
- */
1007
- declare type ExtensionPayloadValue_2 = null | boolean | number | string | readonly ExtensionPayloadValue_2[] | {
1008
- readonly [key: string]: ExtensionPayloadValue_2;
1009
- };
1010
-
1011
672
  /**
1012
673
  * A registry of extensions that provides lookup by fully-qualified ID.
1013
674
  *
@@ -1097,13 +758,6 @@ declare interface ExtensionRegistry {
1097
758
  */
1098
759
  declare type ExtensionTypeKind$1 = "primitive" | "enum" | "array" | "object" | "record" | "union" | "reference" | "dynamic" | "custom";
1099
760
 
1100
- /**
1101
- * Top-level type kinds that extension applicability hooks may inspect.
1102
- *
1103
- * @public
1104
- */
1105
- declare type ExtensionTypeKind_2 = "primitive" | "enum" | "array" | "object" | "record" | "union" | "reference" | "dynamic" | "custom";
1106
-
1107
761
  /**
1108
762
  * The result of a successful extension type lookup.
1109
763
  *
@@ -1120,110 +774,6 @@ declare interface ExtensionTypeLookupResult {
1120
774
  readonly registration: CustomTypeRegistration_2;
1121
775
  }
1122
776
 
1123
- /**
1124
- * Field configuration option constraints - control which field options are allowed.
1125
- *
1126
- * @public
1127
- */
1128
- declare interface FieldOptionConstraints {
1129
- /** label - field label text */
1130
- label?: Severity;
1131
- /** placeholder - input placeholder text */
1132
- placeholder?: Severity;
1133
- /** required - whether field is required */
1134
- required?: Severity;
1135
- /** minValue - minimum value for numbers */
1136
- minValue?: Severity;
1137
- /** maxValue - maximum value for numbers */
1138
- maxValue?: Severity;
1139
- /** minItems - minimum array length */
1140
- minItems?: Severity;
1141
- /** maxItems - maximum array length */
1142
- maxItems?: Severity;
1143
- }
1144
-
1145
- /**
1146
- * Field type constraints - control which field types are allowed.
1147
- * Fine-grained control over each DSL field builder.
1148
- *
1149
- * @public
1150
- */
1151
- declare interface FieldTypeConstraints {
1152
- /** field.text() - basic text input */
1153
- text?: Severity;
1154
- /** field.number() - numeric input */
1155
- number?: Severity;
1156
- /** field.boolean() - checkbox/toggle */
1157
- boolean?: Severity;
1158
- /** field.enum() with literal options */
1159
- staticEnum?: Severity;
1160
- /** field.dynamicEnum() - runtime-fetched options */
1161
- dynamicEnum?: Severity;
1162
- /** field.dynamicSchema() - runtime-fetched schema */
1163
- dynamicSchema?: Severity;
1164
- /** field.array() / field.arrayWithConfig() */
1165
- array?: Severity;
1166
- /** field.object() / field.objectWithConfig() */
1167
- object?: Severity;
1168
- }
1169
-
1170
-
1171
- /**
1172
- * Top-level FormSpec configuration file structure.
1173
- * The .formspec.yml file uses this structure.
1174
- *
1175
- * @public
1176
- */
1177
- declare interface FormSpecConfig {
1178
- /**
1179
- * Extension definitions providing custom types, constraints,
1180
- * annotations, and vocabulary keywords.
1181
- */
1182
- readonly extensions?: readonly ExtensionDefinition_3[];
1183
- /** Constraint surface configuration — controls which field types,
1184
- * layouts, UI features, and field/control options are allowed. */
1185
- readonly constraints?: ConstraintConfig;
1186
- /**
1187
- * Metadata inference and naming policy. Controls how apiName,
1188
- * displayName, and plural forms are derived when not authored.
1189
- */
1190
- readonly metadata?: MetadataPolicyInput_2;
1191
- /**
1192
- * Vendor prefix for extension-emitted JSON Schema keywords.
1193
- * Must start with "x-".
1194
- * @defaultValue "x-formspec"
1195
- */
1196
- readonly vendorPrefix?: string;
1197
- /**
1198
- * JSON Schema representation for static enums.
1199
- * - "enum": compact `enum` output, plus a display-name extension when labels exist
1200
- * - "oneOf": per-member `const` output, with `title` only for distinct labels
1201
- * - "smart-size": uses `enum` unless a distinct display label would be lost
1202
- * @defaultValue "enum"
1203
- */
1204
- readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
1205
- /**
1206
- * Per-package configuration overrides for monorepos.
1207
- * Keys are glob patterns matched against file paths relative to
1208
- * the config file's directory. Values merge with root settings.
1209
- */
1210
- readonly packages?: Readonly<Record<string, FormSpecPackageOverride>>;
1211
- }
1212
-
1213
- /**
1214
- * Per-package overrides that merge with the root config.
1215
- * Only settings that genuinely vary per package are overridable.
1216
- *
1217
- * @public
1218
- */
1219
- declare interface FormSpecPackageOverride {
1220
- /** Override constraint surface for this package. */
1221
- readonly constraints?: ConstraintConfig;
1222
- /** Override enum serialization for this package. */
1223
- readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
1224
- /** Override metadata policy for this package. */
1225
- readonly metadata?: MetadataPolicyInput_2;
1226
- }
1227
777
 
1228
778
  /**
1229
779
  * Options for generating schemas from a decorated class.
@@ -1391,6 +941,8 @@ declare interface JsonSchema2020 {
1391
941
  description?: string;
1392
942
  /** Default value suggested for the schema node. */
1393
943
  default?: unknown;
944
+ /** Documentation example values (from one or more `@example` tags). */
945
+ examples?: unknown[];
1394
946
  /** Whether the schema node is deprecated. */
1395
947
  deprecated?: boolean;
1396
948
  /** Additional vendor-prefixed extension keywords. */
@@ -1415,38 +967,6 @@ declare interface LabelElement {
1415
967
  readonly [k: string]: unknown;
1416
968
  }
1417
969
 
1418
- /**
1419
- * Layout and structure constraints - control grouping, conditionals, nesting.
1420
- *
1421
- * @public
1422
- */
1423
- declare interface LayoutConstraints {
1424
- /** group() - visual grouping of fields */
1425
- group?: Severity;
1426
- /** when() - conditional field visibility */
1427
- conditionals?: Severity;
1428
- /** Maximum nesting depth for objects/arrays (0 = flat only) */
1429
- maxNestingDepth?: number;
1430
- }
1431
-
1432
- /**
1433
- * JSONForms layout type constraints.
1434
- *
1435
- * @public
1436
- */
1437
- declare interface LayoutTypeConstraints {
1438
- /** VerticalLayout - stack elements vertically */
1439
- VerticalLayout?: Severity;
1440
- /** HorizontalLayout - arrange elements horizontally */
1441
- HorizontalLayout?: Severity;
1442
- /** Group - visual grouping with label */
1443
- Group?: Severity;
1444
- /** Categorization - tabbed/wizard interface */
1445
- Categorization?: Severity;
1446
- /** Category - individual tab/step in Categorization */
1447
- Category?: Severity;
1448
- }
1449
-
1450
970
  /**
1451
971
  * Authoring surfaces that can contribute metadata.
1452
972
  *
@@ -1454,13 +974,6 @@ declare interface LayoutTypeConstraints {
1454
974
  */
1455
975
  declare type MetadataAuthoringSurface$1 = "tsdoc" | "chain-dsl";
1456
976
 
1457
- /**
1458
- * Authoring surfaces that can contribute metadata.
1459
- *
1460
- * @public
1461
- */
1462
- declare type MetadataAuthoringSurface_2 = "tsdoc" | "chain-dsl";
1463
-
1464
977
  /**
1465
978
  * Declaration categories that metadata policy can target.
1466
979
  *
@@ -1468,13 +981,6 @@ declare type MetadataAuthoringSurface_2 = "tsdoc" | "chain-dsl";
1468
981
  */
1469
982
  declare type MetadataDeclarationKind$1 = "type" | "field" | "method";
1470
983
 
1471
- /**
1472
- * Declaration categories that metadata policy can target.
1473
- *
1474
- * @public
1475
- */
1476
- declare type MetadataDeclarationKind_2 = "type" | "field" | "method";
1477
-
1478
984
  /**
1479
985
  * Build-facing context passed to metadata inference callbacks.
1480
986
  *
@@ -1494,104 +1000,6 @@ declare interface MetadataInferenceContext$1 {
1494
1000
  readonly buildContext?: unknown;
1495
1001
  }
1496
1002
 
1497
- /**
1498
- * Build-facing context passed to metadata inference callbacks.
1499
- *
1500
- * `buildContext` is intentionally opaque so browser/runtime packages do not
1501
- * need to depend on TypeScript compiler types.
1502
- *
1503
- * @public
1504
- */
1505
- declare interface MetadataInferenceContext_2 {
1506
- /** Authoring surface the metadata is being resolved for. */
1507
- readonly surface: MetadataAuthoringSurface_2;
1508
- /** Declaration kind currently being resolved. */
1509
- readonly declarationKind: MetadataDeclarationKind_2;
1510
- /** Logical identifier before any metadata policy is applied. */
1511
- readonly logicalName: string;
1512
- /** Optional build-only context supplied by the resolver. */
1513
- readonly buildContext?: unknown;
1514
- }
1515
-
1516
- /**
1517
- * Callback used to infer a scalar metadata value.
1518
- *
1519
- * @public
1520
- */
1521
- declare type MetadataInferenceFn$1 = (context: MetadataInferenceContext_2) => string;
1522
-
1523
- /**
1524
- * Context passed to pluralization callbacks.
1525
- *
1526
- * @public
1527
- */
1528
- declare interface MetadataPluralizationContext$1 extends MetadataInferenceContext_2 {
1529
- /** Singular value that pluralization should derive from. */
1530
- readonly singular: string;
1531
- }
1532
-
1533
- /**
1534
- * Pluralization disabled.
1535
- *
1536
- * @public
1537
- */
1538
- declare interface MetadataPluralizationDisabledPolicyInput$1 {
1539
- /** Disables automatic plural-value generation. */
1540
- readonly mode?: "disabled" | undefined;
1541
- }
1542
-
1543
- /**
1544
- * Callback used to derive plural metadata from a singular value.
1545
- *
1546
- * @public
1547
- */
1548
- declare type MetadataPluralizationFn$1 = (context: MetadataPluralizationContext$1) => string;
1549
-
1550
- /**
1551
- * Pluralization may be inferred when absent.
1552
- *
1553
- * @public
1554
- */
1555
- declare interface MetadataPluralizationInferIfMissingPolicyInput$1 {
1556
- /** Infers plural values whenever no explicit plural is present. */
1557
- readonly mode: "infer-if-missing";
1558
- /** Callback that derives a plural form from the resolved singular value. */
1559
- readonly inflect: MetadataPluralizationFn$1;
1560
- }
1561
-
1562
- /**
1563
- * Pluralization policy input.
1564
- *
1565
- * @public
1566
- */
1567
- declare type MetadataPluralizationPolicyInput$1 = MetadataPluralizationDisabledPolicyInput$1 | MetadataPluralizationRequireExplicitPolicyInput$1 | MetadataPluralizationInferIfMissingPolicyInput$1;
1568
-
1569
- /**
1570
- * Pluralization must be authored explicitly.
1571
- *
1572
- * @public
1573
- */
1574
- declare interface MetadataPluralizationRequireExplicitPolicyInput$1 {
1575
- /** Requires plural values to be authored directly. */
1576
- readonly mode: "require-explicit";
1577
- }
1578
-
1579
- /**
1580
- * User-facing metadata policy configuration.
1581
- *
1582
- * @public
1583
- */
1584
- declare interface MetadataPolicyInput_2 {
1585
- /** Policy applied to named types and the analyzed root declaration. */
1586
- readonly type?: DeclarationMetadataPolicyInput$1 | undefined;
1587
- /** Policy applied to fields and object properties. */
1588
- readonly field?: DeclarationMetadataPolicyInput$1 | undefined;
1589
- /** Policy applied to callable/method declarations. */
1590
- readonly method?: DeclarationMetadataPolicyInput$1 | undefined;
1591
- /** Policy applied to enum-member display names during build-time IR resolution. */
1592
- readonly enumMember?: EnumMemberMetadataPolicyInput$1 | undefined;
1593
- }
1594
-
1595
1003
  /**
1596
1004
  * Supported qualifier registration for an extensible metadata slot.
1597
1005
  *
@@ -1609,23 +1017,6 @@ declare interface MetadataQualifierRegistration$1 {
1609
1017
  readonly inferValue?: MetadataSlotInferenceFn$1 | undefined;
1610
1018
  }
1611
1019
 
1612
- /**
1613
- * Supported qualifier registration for an extensible metadata slot.
1614
- *
1615
- * @public
1616
- */
1617
- declare interface MetadataQualifierRegistration_2 {
1618
- /** Qualifier text without the leading colon. */
1619
- readonly qualifier: string;
1620
- /**
1621
- * Optional source qualifier to use as the base input for this qualifier's
1622
- * inference hook. Defaults to the slot's bare/default value when omitted.
1623
- */
1624
- readonly sourceQualifier?: string | undefined;
1625
- /** Optional inference hook for this qualified value. */
1626
- readonly inferValue?: MetadataSlotInferenceFn_2 | undefined;
1627
- }
1628
-
1629
1020
  /**
1630
1021
  * Stable slot identifier for extensible metadata analysis.
1631
1022
  *
@@ -1633,13 +1024,6 @@ declare interface MetadataQualifierRegistration_2 {
1633
1024
  */
1634
1025
  declare type MetadataSlotId$1 = string;
1635
1026
 
1636
- /**
1637
- * Stable slot identifier for extensible metadata analysis.
1638
- *
1639
- * @public
1640
- */
1641
- declare type MetadataSlotId_2 = string;
1642
-
1643
1027
  /**
1644
1028
  * Context passed to extensible metadata inference hooks.
1645
1029
  *
@@ -1656,22 +1040,6 @@ declare interface MetadataSlotInferenceContext$1 extends MetadataInferenceContex
1656
1040
  readonly baseValue?: string | undefined;
1657
1041
  }
1658
1042
 
1659
- /**
1660
- * Context passed to extensible metadata inference hooks.
1661
- *
1662
- * @public
1663
- */
1664
- declare interface MetadataSlotInferenceContext_2 extends MetadataInferenceContext_2 {
1665
- /** Stable logical slot identifier. */
1666
- readonly slotId: MetadataSlotId_2;
1667
- /** Tag name associated with the slot, without the `@` prefix. */
1668
- readonly tagName: string;
1669
- /** Optional qualifier being inferred (for example `plural`). */
1670
- readonly qualifier?: string | undefined;
1671
- /** Resolved bare/default value used as the base input for derived qualifiers. */
1672
- readonly baseValue?: string | undefined;
1673
- }
1674
-
1675
1043
  /**
1676
1044
  * Callback used to infer an extensible metadata slot value.
1677
1045
  *
@@ -1679,13 +1047,6 @@ declare interface MetadataSlotInferenceContext_2 extends MetadataInferenceContex
1679
1047
  */
1680
1048
  declare type MetadataSlotInferenceFn$1 = (context: MetadataSlotInferenceContext$1) => string;
1681
1049
 
1682
- /**
1683
- * Callback used to infer an extensible metadata slot value.
1684
- *
1685
- * @public
1686
- */
1687
- declare type MetadataSlotInferenceFn_2 = (context: MetadataSlotInferenceContext_2) => string;
1688
-
1689
1050
  /**
1690
1051
  * Extensible metadata slot definition shared across build- and lint-time analysis.
1691
1052
  *
@@ -1711,76 +1072,6 @@ declare interface MetadataSlotRegistration$1 {
1711
1072
  readonly isApplicable?: ((context: MetadataInferenceContext$1) => boolean) | undefined;
1712
1073
  }
1713
1074
 
1714
- /**
1715
- * Extensible metadata slot definition shared across build- and lint-time analysis.
1716
- *
1717
- * @public
1718
- */
1719
- declare interface MetadataSlotRegistration_2 {
1720
- /** Stable logical slot identifier. */
1721
- readonly slotId: MetadataSlotId_2;
1722
- /** Tag name associated with this slot, without the `@` prefix. */
1723
- readonly tagName: string;
1724
- /** Declaration kinds where the slot is meaningful. */
1725
- readonly declarationKinds: readonly MetadataDeclarationKind_2[];
1726
- /** Whether a bare tag without a qualifier is supported. Defaults to true. */
1727
- readonly allowBare?: boolean | undefined;
1728
- /** Supported qualifiers for this slot. */
1729
- readonly qualifiers?: readonly MetadataQualifierRegistration_2[] | undefined;
1730
- /** Optional inference hook for the bare/default slot value. */
1731
- readonly inferValue?: MetadataSlotInferenceFn_2 | undefined;
1732
- /**
1733
- * Optional applicability hook for declaration-specific rules beyond
1734
- * declaration kind. `buildContext` may carry compiler objects.
1735
- */
1736
- readonly isApplicable?: ((context: MetadataInferenceContext_2) => boolean) | undefined;
1737
- }
1738
-
1739
- /**
1740
- * Scalar metadata disabled unless provided explicitly elsewhere.
1741
- *
1742
- * @public
1743
- */
1744
- declare interface MetadataValueDisabledPolicyInput$1 {
1745
- /** Disables inference for this scalar metadata value. */
1746
- readonly mode?: "disabled" | undefined;
1747
- /** Optional policy controlling plural forms of this scalar value. */
1748
- readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
1749
- }
1750
-
1751
- /**
1752
- * Scalar metadata may be inferred when missing.
1753
- *
1754
- * @public
1755
- */
1756
- declare interface MetadataValueInferIfMissingPolicyInput$1 {
1757
- /** Infers this scalar metadata value when it is not authored explicitly. */
1758
- readonly mode: "infer-if-missing";
1759
- /** Callback used to infer the missing singular value. */
1760
- readonly infer: MetadataInferenceFn$1;
1761
- /** Optional policy controlling plural forms of this scalar value. */
1762
- readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
1763
- }
1764
-
1765
- /**
1766
- * Scalar metadata policy input.
1767
- *
1768
- * @public
1769
- */
1770
- declare type MetadataValuePolicyInput$1 = MetadataValueDisabledPolicyInput$1 | MetadataValueRequireExplicitPolicyInput$1 | MetadataValueInferIfMissingPolicyInput$1;
1771
-
1772
- /**
1773
- * Scalar metadata must be authored explicitly.
1774
- *
1775
- * @public
1776
- */
1777
- declare interface MetadataValueRequireExplicitPolicyInput$1 {
1778
- /** Requires this scalar metadata value to be authored directly. */
1779
- readonly mode: "require-explicit";
1780
- /** Optional policy controlling plural forms of this scalar value. */
1781
- readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
1782
- }
1783
-
1784
1075
  /**
1785
1076
  * Rule for conditional element visibility/enablement.
1786
1077
  *
@@ -1825,18 +1116,6 @@ declare interface RuleConditionSchema {
1825
1116
  allOf?: RuleConditionSchema[];
1826
1117
  }
1827
1118
 
1828
- /**
1829
- * JSONForms rule constraints.
1830
- *
1831
- * @public
1832
- */
1833
- declare interface RuleConstraints {
1834
- /** Whether rules are enabled at all */
1835
- enabled?: Severity;
1836
- /** Fine-grained control over rule effects */
1837
- effects?: RuleEffectConstraints;
1838
- }
1839
-
1840
1119
  /**
1841
1120
  * JSON Forms UI Schema type definitions.
1842
1121
  *
@@ -1852,22 +1131,6 @@ declare interface RuleConstraints {
1852
1131
  */
1853
1132
  declare type RuleEffect = "SHOW" | "HIDE" | "ENABLE" | "DISABLE";
1854
1133
 
1855
- /**
1856
- * JSONForms rule effect constraints.
1857
- *
1858
- * @public
1859
- */
1860
- declare interface RuleEffectConstraints {
1861
- /** SHOW - show element when condition is true */
1862
- SHOW?: Severity;
1863
- /** HIDE - hide element when condition is true */
1864
- HIDE?: Severity;
1865
- /** ENABLE - enable element when condition is true */
1866
- ENABLE?: Severity;
1867
- /** DISABLE - disable element when condition is true */
1868
- DISABLE?: Severity;
1869
- }
1870
-
1871
1134
  /**
1872
1135
  * Condition for a rule.
1873
1136
  *
@@ -1880,16 +1143,6 @@ declare interface SchemaBasedCondition {
1880
1143
  readonly schema: RuleConditionSchema;
1881
1144
  }
1882
1145
 
1883
- /**
1884
- * Severity level for constraint violations.
1885
- * - "error": Violation fails validation
1886
- * - "warn": Violation emits warning but passes
1887
- * - "off": Feature is allowed (no violation)
1888
- *
1889
- * @public
1890
- */
1891
- declare type Severity = "error" | "warn" | "off";
1892
-
1893
1146
  /**
1894
1147
  * Shared options for schema generation flows that support custom extensions.
1895
1148
  *
@@ -1952,18 +1205,6 @@ declare interface StaticSchemaGenerationOptions {
1952
1205
  */
1953
1206
  declare type UISchema = VerticalLayout | HorizontalLayout | GroupLayout | Categorization;
1954
1207
 
1955
- /**
1956
- * UI Schema feature constraints - control JSONForms-specific features.
1957
- *
1958
- * @public
1959
- */
1960
- declare interface UISchemaConstraints {
1961
- /** Layout type constraints */
1962
- layouts?: LayoutTypeConstraints;
1963
- /** Rule (conditional) constraints */
1964
- rules?: RuleConstraints;
1965
- }
1966
-
1967
1208
  /**
1968
1209
  * Union of all UI Schema element types.
1969
1210
  *
@@ -1999,18 +1240,6 @@ declare interface VocabularyKeywordRegistration$1 {
1999
1240
  readonly keyword: string;
2000
1241
  /** JSON Schema that describes the valid values for this keyword. */
2001
1242
  readonly schema: ExtensionPayloadValue$1;
2002
- }
2003
-
2004
- /**
2005
- * Registration for a vocabulary keyword to include in a JSON Schema `$vocabulary` declaration.
2006
- *
2007
- * @public
2008
- */
2009
- declare interface VocabularyKeywordRegistration_2 {
2010
- /** The keyword name (without vendor prefix). */
2011
- readonly keyword: string;
2012
- /** JSON Schema that describes the valid values for this keyword. */
2013
- readonly schema: ExtensionPayloadValue_2;
2014
1243
  }
2015
1244
 
2016
1245
  /**
@@ -2036,6 +1265,14 @@ declare function _generateSchemas(options: Omit<GenerateSchemasOptions, 'errorRe
2036
1265
  */
2037
1266
  declare function _fixupDecimalPathConstraints(schema: JsonSchema2020): JsonSchema2020;
2038
1267
 
1268
+ /**
1269
+ * Controls whether a type-level annotation can flow from a base declaration to
1270
+ * a derived declaration during semantic analysis.
1271
+ *
1272
+ * @public
1273
+ */
1274
+ declare type AnnotationInheritancePolicy = "local-wins" | "never";
1275
+
2039
1276
  /**
2040
1277
  * Registration for mapping a built-in TSDoc tag onto a custom constraint when
2041
1278
  * it is used on a particular custom type.
@@ -2115,6 +1352,19 @@ declare interface ConstraintTagRegistration {
2115
1352
  declare interface CustomAnnotationRegistration {
2116
1353
  /** The annotation name, unique within the extension. */
2117
1354
  readonly annotationName: string;
1355
+ /**
1356
+ * Optional type-level inheritance behavior for semantic consumers.
1357
+ *
1358
+ * `"local-wins"` means a derived declaration inherits this annotation from
1359
+ * its base declaration only when the derived declaration does not provide the
1360
+ * same extension annotation identity locally. Omitted registrations behave as
1361
+ * `"never"`.
1362
+ */
1363
+ readonly inheritFromBase?: AnnotationInheritancePolicy;
1364
+ /**
1365
+ * Optional editor documentation for the annotation's TSDoc authoring tag.
1366
+ */
1367
+ readonly tagDocumentation?: CustomAnnotationTagDocumentation;
2118
1368
  /**
2119
1369
  * Optionally converts the annotation value into JSON Schema keywords.
2120
1370
  * If omitted, the annotation has no JSON Schema representation (UI-only).
@@ -2122,6 +1372,31 @@ declare interface CustomAnnotationRegistration {
2122
1372
  readonly toJsonSchema?: (value: ExtensionPayloadValue, vendorPrefix: string) => Record<string, unknown>;
2123
1373
  }
2124
1374
 
1375
+ /**
1376
+ * Documentation text for an extension annotation's TSDoc authoring tag.
1377
+ *
1378
+ * These strings are consumed by editor integrations for completion details and
1379
+ * hover text. They do not affect annotation parsing, inheritance, or schema
1380
+ * emission.
1381
+ *
1382
+ * @public
1383
+ */
1384
+ declare interface CustomAnnotationTagDocumentation {
1385
+ /** Completion detail shown beside the annotation tag. */
1386
+ readonly completionDetail?: string;
1387
+ /**
1388
+ * Label for the payload portion of the annotation tag signature.
1389
+ *
1390
+ * The payload remains the full authored text after the tag name, so this can
1391
+ * describe single-argument or multi-argument annotation syntaxes.
1392
+ */
1393
+ readonly payloadLabel?: string;
1394
+ /** Short hover summary shown for the annotation tag. */
1395
+ readonly hoverSummary?: string;
1396
+ /** Full markdown hover body for the annotation tag. */
1397
+ readonly hoverMarkdown?: string;
1398
+ }
1399
+
2125
1400
  /* Excluded from this release type: CustomConstraintNode */
2126
1401
 
2127
1402
  /**
@@ -2836,4 +2111,4 @@ declare const _stripeSchemaDefaults: StaticSchemaGenerationOptions;
2836
2111
  */
2837
2112
  declare const _stripeFormSpecConfig: FormSpecConfig;
2838
2113
 
2839
- export { type BuiltinConstraintBroadeningRegistration, type BuiltinConstraintName, type Categorization, type Category, type ConstraintSemanticRole, type ConstraintTagRegistration, type ControlElement, type CustomAnnotationRegistration, type CustomConstraintRegistration, type CustomTypeRegistration, type DeclarationMetadataPolicyInput, type DiscriminatorResolutionOptions, type EnumMemberMetadataPolicyInput, type ExtensionApplicableType, type ExtensionDefinition, type ExtensionPayloadValue, type ExtensionRegistry, type ExtensionTypeKind, type ExtensionTypeLookupResult, type FormSpecConfig, type GenerateFromClassOptions, type GenerateFromClassResult, type GenerateSchemasOptions, type GroupLayout, type HorizontalLayout, type JsonSchema2020, type LabelElement, type MetadataAuthoringSurface, type MetadataDeclarationKind, type MetadataInferenceContext, type MetadataInferenceFn, type MetadataPluralizationDisabledPolicyInput, type MetadataPluralizationFn, type MetadataPluralizationInferIfMissingPolicyInput, type MetadataPluralizationPolicyInput, type MetadataPluralizationRequireExplicitPolicyInput, type MetadataPolicyInput, type MetadataQualifierRegistration, type MetadataSlotId, type MetadataSlotInferenceContext, type MetadataSlotInferenceFn, type MetadataSlotRegistration, type MetadataValueDisabledPolicyInput, type MetadataValueInferIfMissingPolicyInput, type MetadataValuePolicyInput, type MetadataValueRequireExplicitPolicyInput, type Rule, type RuleConditionSchema, type RuleEffect, type SchemaBasedCondition, type StaticSchemaGenerationOptions, type UISchema, type UISchemaElement, type VerticalLayout, type VocabularyKeywordRegistration, type _ConfigSchemaResult, type _ConfigTypeRef, type _ConfigUiSchema, type _ExtractConfigSchemasOptions, type _ExtractConfigSchemasResult, _extractConfigSchemas, _fixupDecimalPathConstraints, _generateSchemas, _resolveConfigTypeArgs, _stripeExtensionRegistry, _stripeFormSpecConfig, _stripeSchemaDefaults, _stripeStdlibExtension, generateSchemasFromClass };
2114
+ export { type BuiltinConstraintBroadeningRegistration, type BuiltinConstraintName, type Categorization, type Category, type ConstraintSemanticRole, type ConstraintTagRegistration, type ControlElement, type CustomAnnotationRegistration, type CustomConstraintRegistration, type CustomTypeRegistration, type DeclarationMetadataPolicyInput, type DiscriminatorResolutionOptions, type EnumMemberMetadataPolicyInput, type ExtensionApplicableType, type ExtensionDefinition, type ExtensionPayloadValue, type ExtensionRegistry, type ExtensionTypeKind, type ExtensionTypeLookupResult, type GenerateFromClassOptions, type GenerateFromClassResult, type GenerateSchemasOptions, type GroupLayout, type HorizontalLayout, type JsonSchema2020, type LabelElement, type MetadataAuthoringSurface, type MetadataDeclarationKind, type MetadataInferenceContext, type MetadataInferenceFn, type MetadataPluralizationDisabledPolicyInput, type MetadataPluralizationFn, type MetadataPluralizationInferIfMissingPolicyInput, type MetadataPluralizationPolicyInput, type MetadataPluralizationRequireExplicitPolicyInput, type MetadataPolicyInput, type MetadataQualifierRegistration, type MetadataSlotId, type MetadataSlotInferenceContext, type MetadataSlotInferenceFn, type MetadataSlotRegistration, type MetadataValueDisabledPolicyInput, type MetadataValueInferIfMissingPolicyInput, type MetadataValuePolicyInput, type MetadataValueRequireExplicitPolicyInput, type Rule, type RuleConditionSchema, type RuleEffect, type SchemaBasedCondition, type StaticSchemaGenerationOptions, type UISchema, type UISchemaElement, type VerticalLayout, type VocabularyKeywordRegistration, type _ConfigSchemaResult, type _ConfigTypeRef, type _ConfigUiSchema, type _ExtractConfigSchemasOptions, type _ExtractConfigSchemasResult, _extractConfigSchemas, _fixupDecimalPathConstraints, _generateSchemas, _resolveConfigTypeArgs, _stripeExtensionRegistry, _stripeFormSpecConfig, _stripeSchemaDefaults, _stripeStdlibExtension, generateSchemasFromClass };