@formspec/build 0.1.0-alpha.58 → 0.1.0-alpha.59

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/build.d.ts CHANGED
@@ -162,6 +162,21 @@ declare interface BuiltinConstraintBroadeningRegistration_2 {
162
162
  readonly parseValue: (raw: string) => ExtensionPayloadValue;
163
163
  }
164
164
 
165
+ /**
166
+ * Registration for mapping a built-in TSDoc tag onto a custom constraint when
167
+ * it is used on a particular custom type.
168
+ *
169
+ * @public
170
+ */
171
+ declare interface BuiltinConstraintBroadeningRegistration_3 {
172
+ /** The built-in tag being broadened, without the `@` prefix. */
173
+ readonly tagName: BuiltinConstraintName_2;
174
+ /** The custom constraint to emit for this built-in tag. */
175
+ readonly constraintName: string;
176
+ /** Parser from raw TSDoc text to extension payload. */
177
+ readonly parseValue: (raw: string) => ExtensionPayloadValue_2;
178
+ }
179
+
165
180
  /**
166
181
  * Type of a built-in constraint name.
167
182
  *
@@ -169,6 +184,13 @@ declare interface BuiltinConstraintBroadeningRegistration_2 {
169
184
  */
170
185
  declare type BuiltinConstraintName = "minimum" | "maximum" | "exclusiveMinimum" | "exclusiveMaximum" | "multipleOf" | "minLength" | "maxLength" | "minItems" | "maxItems" | "uniqueItems" | "pattern" | "const" | "enumOptions";
171
186
 
187
+ /**
188
+ * Type of a built-in constraint name.
189
+ *
190
+ * @public
191
+ */
192
+ declare type BuiltinConstraintName_2 = "minimum" | "maximum" | "exclusiveMinimum" | "exclusiveMaximum" | "multipleOf" | "minLength" | "maxLength" | "minItems" | "maxItems" | "uniqueItems" | "pattern" | "const" | "enumOptions";
193
+
172
194
  /**
173
195
  * A Categorization element (tab-based layout).
174
196
  *
@@ -247,6 +269,24 @@ declare interface ConstraintSemanticRole {
247
269
  readonly inclusive: boolean;
248
270
  }
249
271
 
272
+ /**
273
+ * Semantic metadata for ordered custom constraints that should participate in
274
+ * the generic contradiction/broadening logic.
275
+ *
276
+ * @public
277
+ */
278
+ declare interface ConstraintSemanticRole_2 {
279
+ /**
280
+ * Logical family identifier shared by related constraints, for example
281
+ * `"decimal-bound"` or `"date-bound"`.
282
+ */
283
+ readonly family: string;
284
+ /** Whether this constraint acts as a lower or upper bound. */
285
+ readonly bound: "lower" | "upper" | "exact";
286
+ /** Whether equality is allowed when comparing against the bound. */
287
+ readonly inclusive: boolean;
288
+ }
289
+
250
290
  export { ConstraintTagRegistration }
251
291
 
252
292
  /**
@@ -269,6 +309,26 @@ declare interface ConstraintTagRegistration_2 {
269
309
  readonly isApplicableToType?: (type: ExtensionApplicableType) => boolean;
270
310
  }
271
311
 
312
+ /**
313
+ * Declarative authoring-side registration for a custom TSDoc constraint tag.
314
+ *
315
+ * @public
316
+ */
317
+ declare interface ConstraintTagRegistration_3 {
318
+ /** Tag name without the `@` prefix, e.g. `"maxSigFig"`. */
319
+ readonly tagName: string;
320
+ /** The custom constraint that this tag should produce. */
321
+ readonly constraintName: string;
322
+ /** Parser from raw TSDoc text to JSON-serializable payload. */
323
+ readonly parseValue: (raw: string) => ExtensionPayloadValue_2;
324
+ /**
325
+ * Optional precise applicability predicate for the field type being parsed.
326
+ * When omitted, the target custom constraint registration controls type
327
+ * applicability during validation.
328
+ */
329
+ readonly isApplicableToType?: (type: ExtensionApplicableType_2) => boolean;
330
+ }
331
+
272
332
  /**
273
333
  * A Control element that binds to a JSON Schema property.
274
334
  *
@@ -323,7 +383,7 @@ declare interface ControlOptionConstraints {
323
383
  *
324
384
  * @public
325
385
  */
326
- export declare function createExtensionRegistry(extensions: readonly ExtensionDefinition[]): MutableExtensionRegistry;
386
+ export declare function createExtensionRegistry(extensions: readonly ExtensionDefinition_2[]): MutableExtensionRegistry;
327
387
 
328
388
  /**
329
389
  * Creates a supported static build context for a source file.
@@ -366,6 +426,24 @@ declare interface CustomAnnotationRegistration_2 {
366
426
  readonly toJsonSchema?: (value: ExtensionPayloadValue, vendorPrefix: string) => Record<string, unknown>;
367
427
  }
368
428
 
429
+ /**
430
+ * Registration for a custom annotation that may produce JSON Schema keywords.
431
+ *
432
+ * Custom annotations are referenced by FormSpec's internal custom-annotation nodes.
433
+ * They describe or present a field but do not affect which values are valid.
434
+ *
435
+ * @public
436
+ */
437
+ declare interface CustomAnnotationRegistration_3 {
438
+ /** The annotation name, unique within the extension. */
439
+ readonly annotationName: string;
440
+ /**
441
+ * Optionally converts the annotation value into JSON Schema keywords.
442
+ * If omitted, the annotation has no JSON Schema representation (UI-only).
443
+ */
444
+ readonly toJsonSchema?: (value: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
445
+ }
446
+
369
447
  export { CustomConstraintRegistration }
370
448
 
371
449
  /**
@@ -426,6 +504,64 @@ declare interface CustomConstraintRegistration_2 {
426
504
  readonly emitsVocabularyKeywords?: boolean;
427
505
  }
428
506
 
507
+ /**
508
+ * Registration for a custom constraint that maps to JSON Schema keywords.
509
+ *
510
+ * Custom constraints are referenced by FormSpec's internal custom-constraint nodes.
511
+ *
512
+ * @public
513
+ */
514
+ declare interface CustomConstraintRegistration_3 {
515
+ /** The constraint name, unique within the extension. */
516
+ readonly constraintName: string;
517
+ /**
518
+ * How this constraint composes with other constraints of the same kind.
519
+ * - "intersect": combine with logical AND (both must hold)
520
+ * - "override": last writer wins
521
+ */
522
+ readonly compositionRule: "intersect" | "override";
523
+ /**
524
+ * TypeNode kinds this constraint is applicable to, or `null` for any type.
525
+ * Used by the validator to emit TYPE_MISMATCH diagnostics.
526
+ */
527
+ readonly applicableTypes: readonly ExtensionApplicableType_2["kind"][] | null;
528
+ /**
529
+ * Optional precise type predicate used when kind-level applicability is too
530
+ * broad (for example, constraints that apply to integer-like primitives but
531
+ * not strings).
532
+ */
533
+ readonly isApplicableToType?: (type: ExtensionApplicableType_2) => boolean;
534
+ /**
535
+ * Optional comparator for payloads belonging to the same custom constraint.
536
+ * Return values follow the `Array.prototype.sort()` contract.
537
+ */
538
+ readonly comparePayloads?: (left: ExtensionPayloadValue_2, right: ExtensionPayloadValue_2) => number;
539
+ /**
540
+ * Optional semantic family metadata for generic contradiction/broadening
541
+ * handling across ordered constraints.
542
+ */
543
+ readonly semanticRole?: ConstraintSemanticRole_2;
544
+ /**
545
+ * Converts the custom constraint's payload into JSON Schema keywords.
546
+ *
547
+ * @param payload - The opaque JSON payload stored on the custom constraint node.
548
+ * @param vendorPrefix - The vendor prefix for extension keywords.
549
+ * @returns A JSON Schema fragment with the constraint keywords.
550
+ */
551
+ readonly toJsonSchema: (payload: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
552
+ /**
553
+ * When true, `toJsonSchema` may emit vocabulary keywords that do not carry
554
+ * the vendor prefix. By default, all keys returned from `toJsonSchema` must
555
+ * start with `${vendorPrefix}-`; setting this flag relaxes that check so
556
+ * the constraint can produce standard or custom vocabulary keywords such as
557
+ * `decimalMinimum`.
558
+ *
559
+ * Use this for constraints that define their own JSON Schema vocabulary
560
+ * rather than namespacing under the vendor prefix.
561
+ */
562
+ readonly emitsVocabularyKeywords?: boolean;
563
+ }
564
+
429
565
  export { CustomTypeRegistration }
430
566
 
431
567
  /**
@@ -477,6 +613,7 @@ declare interface CustomTypeRegistration_2 {
477
613
  * @returns A JSON Schema fragment representing this type.
478
614
  */
479
615
  readonly toJsonSchema: (payload: ExtensionPayloadValue, vendorPrefix: string) => Record<string, unknown>;
616
+ /* Excluded from this release type: serializeDefault */
480
617
  /**
481
618
  * Optional broadening of built-in constraint tags so they can apply to this
482
619
  * custom type without modifying the core built-in constraint tables.
@@ -484,6 +621,63 @@ declare interface CustomTypeRegistration_2 {
484
621
  readonly builtinConstraintBroadenings?: readonly BuiltinConstraintBroadeningRegistration_2[];
485
622
  }
486
623
 
624
+ /**
625
+ * Registration for a custom type that maps to a JSON Schema representation.
626
+ *
627
+ * Custom types are referenced by FormSpec's internal custom-type IR nodes and
628
+ * resolved to JSON Schema via `toJsonSchema` during generation.
629
+ *
630
+ * @public
631
+ */
632
+ declare interface CustomTypeRegistration_3 {
633
+ /** The type name, unique within the extension. */
634
+ readonly typeName: string;
635
+ /**
636
+ * Optional TypeScript surface names that should resolve to this custom type
637
+ * during TSDoc/class analysis. Defaults to `typeName` when omitted.
638
+ * @deprecated Prefer `brand` for structural detection or type parameters
639
+ * on `defineCustomType<T>()` for symbol-based detection. String name
640
+ * matching will be removed in a future major version.
641
+ */
642
+ readonly tsTypeNames?: readonly string[];
643
+ /**
644
+ * Optional brand identifier for structural type detection.
645
+ *
646
+ * When provided, the type resolver checks `type.getProperties()` for a
647
+ * computed property whose name matches this identifier. This is more
648
+ * reliable than `tsTypeNames` for aliased branded types because it does not
649
+ * depend on the local type name.
650
+ *
651
+ * Brand detection is attempted after name-based resolution (`tsTypeNames`)
652
+ * as a structural fallback. If both match, name-based resolution wins.
653
+ *
654
+ * The value should match the identifier text of a `unique symbol` declaration
655
+ * used as a computed property key on the branded type. For example, if the
656
+ * type is `string & { readonly [__decimalBrand]: true }`, the brand is
657
+ * `"__decimalBrand"`.
658
+ *
659
+ * Brand identifiers are stored as plain strings in the extension registry, so
660
+ * they must be unique across the extensions loaded into the same build.
661
+ *
662
+ * Note: `"__integerBrand"` is reserved for the builtin Integer type.
663
+ */
664
+ readonly brand?: string;
665
+ /**
666
+ * Converts the custom type's payload into a JSON Schema fragment.
667
+ *
668
+ * @param payload - The opaque JSON payload stored on the custom type node.
669
+ * @param vendorPrefix - The vendor prefix for extension keywords (e.g., "x-stripe").
670
+ * @returns A JSON Schema fragment representing this type.
671
+ */
672
+ readonly toJsonSchema: (payload: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
673
+ /* Excluded from this release type: serializeDefault */
674
+ /**
675
+ * Optional broadening of built-in constraint tags so they can apply to this
676
+ * custom type without modifying the core built-in constraint tables.
677
+ */
678
+ readonly builtinConstraintBroadenings?: readonly BuiltinConstraintBroadeningRegistration_3[];
679
+ }
680
+
487
681
  /**
488
682
  * Per-declaration metadata policy input.
489
683
  *
@@ -616,7 +810,7 @@ declare interface EnumMemberDisplayNameRequireExplicitPolicyInput {
616
810
  */
617
811
  declare interface EnumMemberMetadataInferenceContext {
618
812
  /** Authoring surface the enum originated from. */
619
- readonly surface: MetadataAuthoringSurface;
813
+ readonly surface: MetadataAuthoringSurface_2;
620
814
  /** Logical member identifier used for policy inference. */
621
815
  readonly logicalName: string;
622
816
  /** Underlying enum value before stringification. */
@@ -672,6 +866,25 @@ declare type ExtensionApplicableType = {
672
866
  readonly kind: Exclude<ExtensionTypeKind, "primitive" | "custom">;
673
867
  };
674
868
 
869
+ /**
870
+ * A curated type shape exposed to extension applicability hooks.
871
+ *
872
+ * This intentionally exposes only the fields needed to determine tag/type
873
+ * applicability without committing the entire canonical IR as public API.
874
+ *
875
+ * @public
876
+ */
877
+ declare type ExtensionApplicableType_2 = {
878
+ readonly kind: "primitive";
879
+ readonly primitiveKind: "string" | "number" | "integer" | "bigint" | "boolean" | "null";
880
+ } | {
881
+ readonly kind: "custom";
882
+ readonly typeId: string;
883
+ readonly payload: ExtensionPayloadValue_2;
884
+ } | {
885
+ readonly kind: Exclude<ExtensionTypeKind_2, "primitive" | "custom">;
886
+ };
887
+
675
888
  export { ExtensionDefinition }
676
889
 
677
890
  /**
@@ -713,6 +926,45 @@ declare interface ExtensionDefinition_2 {
713
926
  readonly vocabularyKeywords?: readonly VocabularyKeywordRegistration[];
714
927
  }
715
928
 
929
+ /**
930
+ * A complete extension definition bundling types, constraints, annotations,
931
+ * and vocabulary keywords.
932
+ *
933
+ * @example
934
+ * ```typescript
935
+ * const monetaryExtension = defineExtension({
936
+ * extensionId: "x-stripe/monetary",
937
+ * types: [
938
+ * defineCustomType({
939
+ * typeName: "Decimal",
940
+ * toJsonSchema: (_payload, prefix) => ({
941
+ * type: "string",
942
+ * [`${prefix}-decimal`]: true,
943
+ * }),
944
+ * }),
945
+ * ],
946
+ * });
947
+ * ```
948
+ *
949
+ * @public
950
+ */
951
+ declare interface ExtensionDefinition_3 {
952
+ /** Globally unique extension identifier, e.g., "x-stripe/monetary". */
953
+ readonly extensionId: string;
954
+ /** Custom type registrations provided by this extension. */
955
+ readonly types?: readonly CustomTypeRegistration_3[];
956
+ /** Custom constraint registrations provided by this extension. */
957
+ readonly constraints?: readonly CustomConstraintRegistration_3[];
958
+ /** Authoring-side TSDoc tag registrations provided by this extension. */
959
+ readonly constraintTags?: readonly ConstraintTagRegistration_3[];
960
+ /** Metadata-slot registrations shared by build- and lint-time analysis. */
961
+ readonly metadataSlots?: readonly MetadataSlotRegistration_2[];
962
+ /** Custom annotation registrations provided by this extension. */
963
+ readonly annotations?: readonly CustomAnnotationRegistration_3[];
964
+ /** Vocabulary keyword registrations provided by this extension. */
965
+ readonly vocabularyKeywords?: readonly VocabularyKeywordRegistration_2[];
966
+ }
967
+
716
968
  /**
717
969
  * A JSON-serializable payload value used by extension registration hooks.
718
970
  *
@@ -722,6 +974,15 @@ declare type ExtensionPayloadValue = null | boolean | number | string | readonly
722
974
  readonly [key: string]: ExtensionPayloadValue;
723
975
  };
724
976
 
977
+ /**
978
+ * A JSON-serializable payload value used by extension registration hooks.
979
+ *
980
+ * @public
981
+ */
982
+ declare type ExtensionPayloadValue_2 = null | boolean | number | string | readonly ExtensionPayloadValue_2[] | {
983
+ readonly [key: string]: ExtensionPayloadValue_2;
984
+ };
985
+
725
986
  /**
726
987
  * A registry of extensions that provides lookup by fully-qualified ID.
727
988
  *
@@ -733,14 +994,15 @@ declare type ExtensionPayloadValue = null | boolean | number | string | readonly
733
994
  */
734
995
  export declare interface ExtensionRegistry {
735
996
  /** The extensions registered in this registry (in registration order). */
736
- readonly extensions: readonly ExtensionDefinition[];
997
+ readonly extensions: readonly ExtensionDefinition_2[];
998
+ /* Excluded from this release type: setupDiagnostics */
737
999
  /**
738
1000
  * Look up a custom type registration by its fully-qualified type ID.
739
1001
  *
740
1002
  * @param typeId - The fully-qualified type ID (e.g., "x-stripe/monetary/Decimal").
741
1003
  * @returns The registration if found, otherwise `undefined`.
742
1004
  */
743
- findType(typeId: string): CustomTypeRegistration | undefined;
1005
+ findType(typeId: string): CustomTypeRegistration_2 | undefined;
744
1006
  /**
745
1007
  * Look up a custom type registration by a TypeScript-facing type name.
746
1008
  *
@@ -779,20 +1041,20 @@ export declare interface ExtensionRegistry {
779
1041
  * @param constraintId - The fully-qualified constraint ID.
780
1042
  * @returns The registration if found, otherwise `undefined`.
781
1043
  */
782
- findConstraint(constraintId: string): CustomConstraintRegistration | undefined;
1044
+ findConstraint(constraintId: string): CustomConstraintRegistration_2 | undefined;
783
1045
  /**
784
1046
  * Look up a TSDoc custom constraint-tag registration by tag name.
785
1047
  */
786
1048
  findConstraintTag(tagName: string): {
787
1049
  readonly extensionId: string;
788
- readonly registration: ConstraintTagRegistration;
1050
+ readonly registration: ConstraintTagRegistration_2;
789
1051
  } | undefined;
790
1052
  /**
791
1053
  * Look up built-in tag broadening for a given custom type ID.
792
1054
  */
793
1055
  findBuiltinConstraintBroadening(typeId: string, tagName: string): {
794
1056
  readonly extensionId: string;
795
- readonly registration: BuiltinConstraintBroadeningRegistration;
1057
+ readonly registration: BuiltinConstraintBroadeningRegistration_2;
796
1058
  } | undefined;
797
1059
  /**
798
1060
  * Look up a custom annotation registration by its fully-qualified annotation ID.
@@ -800,7 +1062,7 @@ export declare interface ExtensionRegistry {
800
1062
  * @param annotationId - The fully-qualified annotation ID.
801
1063
  * @returns The registration if found, otherwise `undefined`.
802
1064
  */
803
- findAnnotation(annotationId: string): CustomAnnotationRegistration | undefined;
1065
+ findAnnotation(annotationId: string): CustomAnnotationRegistration_2 | undefined;
804
1066
  }
805
1067
 
806
1068
  /**
@@ -810,6 +1072,13 @@ export declare interface ExtensionRegistry {
810
1072
  */
811
1073
  declare type ExtensionTypeKind = "primitive" | "enum" | "array" | "object" | "record" | "union" | "reference" | "dynamic" | "custom";
812
1074
 
1075
+ /**
1076
+ * Top-level type kinds that extension applicability hooks may inspect.
1077
+ *
1078
+ * @public
1079
+ */
1080
+ declare type ExtensionTypeKind_2 = "primitive" | "enum" | "array" | "object" | "record" | "union" | "reference" | "dynamic" | "custom";
1081
+
813
1082
  /**
814
1083
  * The result of a successful extension type lookup.
815
1084
  *
@@ -823,7 +1092,7 @@ export declare interface ExtensionTypeLookupResult {
823
1092
  /** The fully-qualified extension ID (e.g., "x-stripe/monetary"). */
824
1093
  readonly extensionId: string;
825
1094
  /** The custom type registration matched by this lookup. */
826
- readonly registration: CustomTypeRegistration;
1095
+ readonly registration: CustomTypeRegistration_2;
827
1096
  }
828
1097
 
829
1098
  /**
@@ -888,7 +1157,7 @@ export declare interface FormSpecConfig {
888
1157
  * Extension definitions providing custom types, constraints,
889
1158
  * annotations, and vocabulary keywords.
890
1159
  */
891
- readonly extensions?: readonly ExtensionDefinition_2[];
1160
+ readonly extensions?: readonly ExtensionDefinition_3[];
892
1161
  /** Constraint surface configuration — controls which field types,
893
1162
  * layouts, UI features, and field/control options are allowed. */
894
1163
  readonly constraints?: ConstraintConfig;
@@ -1681,6 +1950,13 @@ declare interface LayoutTypeConstraints {
1681
1950
  */
1682
1951
  declare type MetadataAuthoringSurface = "tsdoc" | "chain-dsl";
1683
1952
 
1953
+ /**
1954
+ * Authoring surfaces that can contribute metadata.
1955
+ *
1956
+ * @public
1957
+ */
1958
+ declare type MetadataAuthoringSurface_2 = "tsdoc" | "chain-dsl";
1959
+
1684
1960
  /**
1685
1961
  * Declaration categories that metadata policy can target.
1686
1962
  *
@@ -1688,6 +1964,13 @@ declare type MetadataAuthoringSurface = "tsdoc" | "chain-dsl";
1688
1964
  */
1689
1965
  declare type MetadataDeclarationKind = "type" | "field" | "method";
1690
1966
 
1967
+ /**
1968
+ * Declaration categories that metadata policy can target.
1969
+ *
1970
+ * @public
1971
+ */
1972
+ declare type MetadataDeclarationKind_2 = "type" | "field" | "method";
1973
+
1691
1974
  /**
1692
1975
  * Build-facing context passed to metadata inference callbacks.
1693
1976
  *
@@ -1707,19 +1990,38 @@ declare interface MetadataInferenceContext {
1707
1990
  readonly buildContext?: unknown;
1708
1991
  }
1709
1992
 
1993
+ /**
1994
+ * Build-facing context passed to metadata inference callbacks.
1995
+ *
1996
+ * `buildContext` is intentionally opaque so browser/runtime packages do not
1997
+ * need to depend on TypeScript compiler types.
1998
+ *
1999
+ * @public
2000
+ */
2001
+ declare interface MetadataInferenceContext_2 {
2002
+ /** Authoring surface the metadata is being resolved for. */
2003
+ readonly surface: MetadataAuthoringSurface_2;
2004
+ /** Declaration kind currently being resolved. */
2005
+ readonly declarationKind: MetadataDeclarationKind_2;
2006
+ /** Logical identifier before any metadata policy is applied. */
2007
+ readonly logicalName: string;
2008
+ /** Optional build-only context supplied by the resolver. */
2009
+ readonly buildContext?: unknown;
2010
+ }
2011
+
1710
2012
  /**
1711
2013
  * Callback used to infer a scalar metadata value.
1712
2014
  *
1713
2015
  * @public
1714
2016
  */
1715
- declare type MetadataInferenceFn = (context: MetadataInferenceContext) => string;
2017
+ declare type MetadataInferenceFn = (context: MetadataInferenceContext_2) => string;
1716
2018
 
1717
2019
  /**
1718
2020
  * Context passed to pluralization callbacks.
1719
2021
  *
1720
2022
  * @public
1721
2023
  */
1722
- declare interface MetadataPluralizationContext extends MetadataInferenceContext {
2024
+ declare interface MetadataPluralizationContext extends MetadataInferenceContext_2 {
1723
2025
  /** Singular value that pluralization should derive from. */
1724
2026
  readonly singular: string;
1725
2027
  }
@@ -1803,6 +2105,23 @@ declare interface MetadataQualifierRegistration {
1803
2105
  readonly inferValue?: MetadataSlotInferenceFn | undefined;
1804
2106
  }
1805
2107
 
2108
+ /**
2109
+ * Supported qualifier registration for an extensible metadata slot.
2110
+ *
2111
+ * @public
2112
+ */
2113
+ declare interface MetadataQualifierRegistration_2 {
2114
+ /** Qualifier text without the leading colon. */
2115
+ readonly qualifier: string;
2116
+ /**
2117
+ * Optional source qualifier to use as the base input for this qualifier's
2118
+ * inference hook. Defaults to the slot's bare/default value when omitted.
2119
+ */
2120
+ readonly sourceQualifier?: string | undefined;
2121
+ /** Optional inference hook for this qualified value. */
2122
+ readonly inferValue?: MetadataSlotInferenceFn_2 | undefined;
2123
+ }
2124
+
1806
2125
  /**
1807
2126
  * Stable slot identifier for extensible metadata analysis.
1808
2127
  *
@@ -1810,6 +2129,13 @@ declare interface MetadataQualifierRegistration {
1810
2129
  */
1811
2130
  declare type MetadataSlotId = string;
1812
2131
 
2132
+ /**
2133
+ * Stable slot identifier for extensible metadata analysis.
2134
+ *
2135
+ * @public
2136
+ */
2137
+ declare type MetadataSlotId_2 = string;
2138
+
1813
2139
  /**
1814
2140
  * Context passed to extensible metadata inference hooks.
1815
2141
  *
@@ -1826,6 +2152,22 @@ declare interface MetadataSlotInferenceContext extends MetadataInferenceContext
1826
2152
  readonly baseValue?: string | undefined;
1827
2153
  }
1828
2154
 
2155
+ /**
2156
+ * Context passed to extensible metadata inference hooks.
2157
+ *
2158
+ * @public
2159
+ */
2160
+ declare interface MetadataSlotInferenceContext_2 extends MetadataInferenceContext_2 {
2161
+ /** Stable logical slot identifier. */
2162
+ readonly slotId: MetadataSlotId_2;
2163
+ /** Tag name associated with the slot, without the `@` prefix. */
2164
+ readonly tagName: string;
2165
+ /** Optional qualifier being inferred (for example `plural`). */
2166
+ readonly qualifier?: string | undefined;
2167
+ /** Resolved bare/default value used as the base input for derived qualifiers. */
2168
+ readonly baseValue?: string | undefined;
2169
+ }
2170
+
1829
2171
  /**
1830
2172
  * Callback used to infer an extensible metadata slot value.
1831
2173
  *
@@ -1833,6 +2175,13 @@ declare interface MetadataSlotInferenceContext extends MetadataInferenceContext
1833
2175
  */
1834
2176
  declare type MetadataSlotInferenceFn = (context: MetadataSlotInferenceContext) => string;
1835
2177
 
2178
+ /**
2179
+ * Callback used to infer an extensible metadata slot value.
2180
+ *
2181
+ * @public
2182
+ */
2183
+ declare type MetadataSlotInferenceFn_2 = (context: MetadataSlotInferenceContext_2) => string;
2184
+
1836
2185
  /**
1837
2186
  * Extensible metadata slot definition shared across build- and lint-time analysis.
1838
2187
  *
@@ -1858,6 +2207,31 @@ declare interface MetadataSlotRegistration {
1858
2207
  readonly isApplicable?: ((context: MetadataInferenceContext) => boolean) | undefined;
1859
2208
  }
1860
2209
 
2210
+ /**
2211
+ * Extensible metadata slot definition shared across build- and lint-time analysis.
2212
+ *
2213
+ * @public
2214
+ */
2215
+ declare interface MetadataSlotRegistration_2 {
2216
+ /** Stable logical slot identifier. */
2217
+ readonly slotId: MetadataSlotId_2;
2218
+ /** Tag name associated with this slot, without the `@` prefix. */
2219
+ readonly tagName: string;
2220
+ /** Declaration kinds where the slot is meaningful. */
2221
+ readonly declarationKinds: readonly MetadataDeclarationKind_2[];
2222
+ /** Whether a bare tag without a qualifier is supported. Defaults to true. */
2223
+ readonly allowBare?: boolean | undefined;
2224
+ /** Supported qualifiers for this slot. */
2225
+ readonly qualifiers?: readonly MetadataQualifierRegistration_2[] | undefined;
2226
+ /** Optional inference hook for the bare/default slot value. */
2227
+ readonly inferValue?: MetadataSlotInferenceFn_2 | undefined;
2228
+ /**
2229
+ * Optional applicability hook for declaration-specific rules beyond
2230
+ * declaration kind. `buildContext` may carry compiler objects.
2231
+ */
2232
+ readonly isApplicable?: ((context: MetadataInferenceContext_2) => boolean) | undefined;
2233
+ }
2234
+
1861
2235
  /**
1862
2236
  * Supported declaration kinds for standalone metadata resolution.
1863
2237
  *
@@ -2200,6 +2574,7 @@ export declare interface StaticSchemaGenerationOptions {
2200
2574
  readonly configPath?: string | undefined;
2201
2575
  }
2202
2576
 
2577
+ /* Excluded from this release type: SyntheticCompilerDiagnostic */
2203
2578
  export { TextField }
2204
2579
 
2205
2580
  /**
@@ -2363,6 +2738,18 @@ declare interface VocabularyKeywordRegistration {
2363
2738
  readonly schema: ExtensionPayloadValue;
2364
2739
  }
2365
2740
 
2741
+ /**
2742
+ * Registration for a vocabulary keyword to include in a JSON Schema `$vocabulary` declaration.
2743
+ *
2744
+ * @public
2745
+ */
2746
+ declare interface VocabularyKeywordRegistration_2 {
2747
+ /** The keyword name (without vendor prefix). */
2748
+ readonly keyword: string;
2749
+ /** JSON Schema that describes the valid values for this keyword. */
2750
+ readonly schema: ExtensionPayloadValue_2;
2751
+ }
2752
+
2366
2753
  /**
2367
2754
  * Builds and writes both JSON Schema and UI Schema files to disk.
2368
2755
  *