@design-token-kit/core 0.1.1

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 (28) hide show
  1. package/LICENSE +159 -0
  2. package/README.md +57 -0
  3. package/lib/index.d.ts +608 -0
  4. package/lib/index.js +4737 -0
  5. package/lib/schemas/2025.10/format/group.json +55 -0
  6. package/lib/schemas/2025.10/format/groupOrToken.json +15 -0
  7. package/lib/schemas/2025.10/format/token.json +425 -0
  8. package/lib/schemas/2025.10/format/tokenType.json +23 -0
  9. package/lib/schemas/2025.10/format/values/border.json +45 -0
  10. package/lib/schemas/2025.10/format/values/color.json +515 -0
  11. package/lib/schemas/2025.10/format/values/cubicBezier.json +57 -0
  12. package/lib/schemas/2025.10/format/values/dimension.json +35 -0
  13. package/lib/schemas/2025.10/format/values/duration.json +35 -0
  14. package/lib/schemas/2025.10/format/values/fontFamily.json +34 -0
  15. package/lib/schemas/2025.10/format/values/fontWeight.json +39 -0
  16. package/lib/schemas/2025.10/format/values/gradient.json +53 -0
  17. package/lib/schemas/2025.10/format/values/number.json +8 -0
  18. package/lib/schemas/2025.10/format/values/shadow.json +103 -0
  19. package/lib/schemas/2025.10/format/values/strokeStyle.json +64 -0
  20. package/lib/schemas/2025.10/format/values/transition.json +45 -0
  21. package/lib/schemas/2025.10/format/values/typography.json +73 -0
  22. package/lib/schemas/2025.10/format.json +106 -0
  23. package/lib/schemas/2025.10/resolver/modifier.json +85 -0
  24. package/lib/schemas/2025.10/resolver/resolutionOrder.json +117 -0
  25. package/lib/schemas/2025.10/resolver/set.json +71 -0
  26. package/lib/schemas/2025.10/resolver.json +62 -0
  27. package/lib/schemas/hrdt-tokens.json +533 -0
  28. package/package.json +60 -0
package/lib/index.d.ts ADDED
@@ -0,0 +1,608 @@
1
+ export declare function createTokenCssConverter(): TokenCssConverter;
2
+
3
+ export declare function createTokenHtmlShowcase(): TokenHtmlShowcase;
4
+
5
+ /**
6
+ * Parses generated CSS variables into a structure for the HTML showcase.
7
+ *
8
+ * @remarks
9
+ * Finds `:root { ... }` blocks, extracts CSS custom properties from them
10
+ * and keeps the link to themes from `Set` and `Modifier` comments.
11
+ *
12
+ * Returns:
13
+ * - a full list of all found tokens;
14
+ * - a list of tokens grouped by themes.
15
+ */
16
+ declare class CssTokenParser {
17
+ parse(cssString: string): ParsedTokenCss;
18
+ private extractModifierThemeName;
19
+ private extractBlockEntries;
20
+ }
21
+
22
+ /**
23
+ * A single design token, identified by file name.
24
+ *
25
+ * @remarks
26
+ * The theme is extracted from the file name:
27
+ * - `tokens.dark.json` → theme `dark`
28
+ * - `base.json` → theme `base`
29
+ * The first token in the {@link DesignTokens} collection is marked as base.
30
+ */
31
+ export declare class DesignToken {
32
+ #private;
33
+ /** Theme name extracted from the file name. */
34
+ readonly themeName: string;
35
+ /**
36
+ * @param name - Path to the token file or its name.
37
+ * @param isBase - Whether the token is base.
38
+ */
39
+ constructor(name: string, isBase: boolean);
40
+ /** Whether the token is base. */
41
+ get isBase(): boolean;
42
+ /**
43
+ * Token theme name.
44
+ * @deprecated Use {@link DesignToken.themeName}.
45
+ */
46
+ get name(): string;
47
+ /**
48
+ * CSS selector for the token theme.
49
+ * @returns `:root` for base theme, `:root[data-theme="<theme>"]` for others.
50
+ */
51
+ get selector(): string;
52
+ }
53
+
54
+ /**
55
+ * Ordered collection of design tokens.
56
+ *
57
+ * @remarks
58
+ * The first token in the collection is always the base token.
59
+ * Use {@link DesignTokens.fromNames} to create from a list of file names
60
+ * or {@link DesignTokens.scan} to scan a directory.
61
+ */
62
+ export declare class DesignTokens {
63
+ readonly tokens: DesignToken[];
64
+ private constructor();
65
+ /**
66
+ * Scans a directory and creates a collection from found token files.
67
+ *
68
+ * @param directory - Path to the directory to scan.
69
+ * @returns Collection of tokens sorted by file name.
70
+ * @throws Error if directory is empty.
71
+ */
72
+ static scan(directory: string): Promise<DesignTokens>;
73
+ /**
74
+ * Creates a token collection from an array of file names.
75
+ *
76
+ * @param names - Array of token file paths or names.
77
+ * The first element is considered the base token.
78
+ * @returns Collection of tokens in the order of given names.
79
+ * @throws Error if the array is empty.
80
+ */
81
+ static fromNames(names: string[]): DesignTokens;
82
+ /** Whether the collection has a base token. */
83
+ get hasBaseToken(): boolean;
84
+ /** The base token of the collection (first token). */
85
+ get baseToken(): DesignToken;
86
+ /**
87
+ * Returns a token by theme name.
88
+ *
89
+ * @param themeName - Theme name (for example, `"dark"`, `"high-contrast"`).
90
+ * @returns Token with the given theme.
91
+ * @throws Error if the token with the given theme is not found.
92
+ */
93
+ getToken(themeName: string): DesignToken;
94
+ /**
95
+ * Returns a CSS selector for the given theme.
96
+ *
97
+ * @param themeName - Theme name.
98
+ * @param isBase - Whether the theme is base (`:root`).
99
+ * @returns CSS selector for the theme.
100
+ * @throws Error if the theme is not base and is not found in the collection.
101
+ */
102
+ getSelector(themeName: string, isBase: boolean): string;
103
+ }
104
+
105
+ /**
106
+ * The root of a DTCG token document, corresponding to a single `.json` file.
107
+ *
108
+ * @see https://tr.designtokens.org/format/#file-format
109
+ */
110
+ export declare class Dtcg {
111
+ #private;
112
+ constructor(root: TokenGroup);
113
+ /** Returns the top-level child token or group with the given name, or undefined. */
114
+ get(name: string): TokenGroup | TokenNode<unknown> | undefined;
115
+ /** Returns all top-level child names in insertion order. */
116
+ keys(): IterableIterator<string>;
117
+ /** Returns all top-level child entries as [name, node] pairs in insertion order. */
118
+ entries(): IterableIterator<[string, TokenGroup | TokenNode<unknown>]>;
119
+ get size(): number;
120
+ /**
121
+ * Validates the document and returns all found issues.
122
+ *
123
+ * @param base - Optional base document to use as fallback when resolving references.
124
+ * Pass the base document when validating a theme file, so that references to tokens
125
+ * defined in the base are resolved correctly.
126
+ */
127
+ validate(base?: Dtcg): DtcgValidationIssue[];
128
+ }
129
+
130
+ /**
131
+ * Parses a DTCG 2025.10 JSON document into a {@link Dtcg}.
132
+ *
133
+ * A child object is treated as a token when it contains `$value` or `$ref`,
134
+ * and as a group otherwise.
135
+ *
136
+ * @see https://tr.designtokens.org/format/
137
+ */
138
+ export declare class DtcgJsonReader {
139
+ #private;
140
+ parse(content: string): Dtcg;
141
+ }
142
+
143
+ /**
144
+ * Thrown when the input JSON does not conform to the expected DTCG structure.
145
+ */
146
+ export declare class DtcgJsonReaderError extends Error {
147
+ constructor(message: string);
148
+ }
149
+
150
+ /**
151
+ * Serializes a {@link Dtcg} document to a DTCG JSON string.
152
+ *
153
+ * @see https://tr.designtokens.org/format/
154
+ */
155
+ export declare class DtcgJsonWriter {
156
+ #private;
157
+ write(doc: Dtcg): string;
158
+ }
159
+
160
+ /**
161
+ * An ordered collection of DTCG documents representing a base token set and its theme overrides.
162
+ *
163
+ * The base document defines all tokens. Each theme document overrides a subset of them.
164
+ * When validating a theme, references are resolved against the theme first, then the base.
165
+ *
166
+ * @see https://tr.designtokens.org/format/#file-format
167
+ */
168
+ export declare class DtcgList {
169
+ readonly base: Dtcg;
170
+ readonly themes: ReadonlyMap<string, Dtcg>;
171
+ constructor(base: Dtcg, themes?: Map<string, Dtcg>);
172
+ validate(): DtcgValidationIssue[];
173
+ }
174
+
175
+ /**
176
+ * Validates DTCG JSON sources against the official DTCG JSON Schema.
177
+ * Accepts DTCG JSON sources only.
178
+ */
179
+ export declare class DtcgSchemaValidator implements TokenValidator {
180
+ #private;
181
+ readonly name = "dtcg";
182
+ validate(sources: string[]): Promise<ValidationIssue[]>;
183
+ }
184
+
185
+ export declare class DtcgTokenCssConverter implements TokenCssConverter {
186
+ convert(sources: string[]): Promise<string>;
187
+ convertDocument(doc: Dtcg): string;
188
+ convertList(list: DtcgList): string;
189
+ }
190
+
191
+ /**
192
+ * Validates DTCG JSON or HRDT token files using the internal model.
193
+ *
194
+ * Accepts one base file plus optional theme files. Validates references,
195
+ * cycles, type mismatches, and deprecated token usage.
196
+ */
197
+ export declare class DtcgTokenValidator implements TokenValidator {
198
+ #private;
199
+ validate(sources: string[]): Promise<ValidationIssue[]>;
200
+ }
201
+
202
+ export declare interface DtcgValidationIssue {
203
+ /** Dot-separated path to the token or group where the issue was found. */
204
+ tokenPath: string;
205
+ severity: DtcgValidationSeverity;
206
+ message: string;
207
+ }
208
+
209
+ export declare type DtcgValidationSeverity = "error" | "warning";
210
+
211
+ /**
212
+ * Reads an HRDT token file and parses it directly into a {@link Dtcg} model.
213
+ *
214
+ * The HRDT format uses YAML syntax and group path to infer token types
215
+ * (e.g. `primitive.color.*` -> color tokens). Non-primitive groups
216
+ * contain alias references to primitive tokens.
217
+ */
218
+ export declare class HrdtTokenReader {
219
+ #private;
220
+ parseRaw(hrdtContent: string): unknown;
221
+ parse(hrdtContent: string): Dtcg;
222
+ parseFile(filePath: string): Promise<Dtcg>;
223
+ }
224
+
225
+ /**
226
+ * Thrown when the YAML content does not conform to the HRDT token format.
227
+ */
228
+ export declare class HrdtTokenReaderError extends Error {
229
+ constructor(message: string);
230
+ }
231
+
232
+ /**
233
+ * Validator based on AJV and JSON Schema.
234
+ * Accepts HRDT sources only.
235
+ */
236
+ export declare class HrdtTokenValidator implements TokenValidator {
237
+ #private;
238
+ readonly name = "hrdt";
239
+ validate(sources: string[]): Promise<ValidationIssue[]>;
240
+ }
241
+
242
+ /**
243
+ * Serializes a {@link Dtcg} document to the HRDT token format.
244
+ *
245
+ * The HRDT format uses YAML syntax and mirrors what {@link HrdtTokenReader} accepts:
246
+ * primitive tokens are grouped by type under `primitive.<type>`,
247
+ * all other groups contain only alias references.
248
+ */
249
+ export declare class HrdtTokenWriter {
250
+ #private;
251
+ write(doc: Dtcg): string;
252
+ }
253
+
254
+ /**
255
+ * Severity level of a diagnostic.
256
+ */
257
+ export declare type IssueSeverity = "error" | "warning";
258
+
259
+ declare type ParsedTokenCss = {
260
+ entries: ScopedTokenEntry[];
261
+ themes: ThemeBucket[];
262
+ };
263
+
264
+ declare type ScopedTokenEntry = TokenEntry & {
265
+ scope: string;
266
+ themeName?: string;
267
+ };
268
+
269
+ /**
270
+ * Data source.
271
+ * Wraps URL, File or content.
272
+ *
273
+ * Allows returning any of these data sources as a file.
274
+ * Used in tool implementations to simplify the interface.
275
+ */
276
+ export declare class Source {
277
+ #private;
278
+ constructor(input: string);
279
+ getInput(): string;
280
+ getType(): SourceType;
281
+ getContent(): Promise<string>;
282
+ getFile(): Promise<string>;
283
+ }
284
+
285
+ declare enum SourceType {
286
+ URL = "url",
287
+ FILE = "file",
288
+ CONTENT = "content"
289
+ }
290
+
291
+ declare type ThemeBucket = {
292
+ name: string;
293
+ entries: ScopedTokenEntry[];
294
+ };
295
+
296
+ /**
297
+ * Converter for design tokens to CSS.
298
+ *
299
+ * @remarks
300
+ * Each converter implements its own engine for turning DTCG tokens
301
+ * into CSS custom properties. Input is an array of paths to JSON token files,
302
+ * output is a CSS string or error.
303
+ */
304
+ export declare interface TokenCssConverter {
305
+ /**
306
+ * Converts token files to CSS.
307
+ *
308
+ * @param sources - Array of paths to token files in DTCG JSON format
309
+ * @returns Generated CSS
310
+ * @throws Error if conversion failed
311
+ */
312
+ convert(sources: string[]): Promise<string>;
313
+ }
314
+
315
+ declare type TokenEntry = {
316
+ name: string;
317
+ value: string;
318
+ };
319
+
320
+ /**
321
+ * A named container for tokens and nested groups.
322
+ *
323
+ * Groups may declare a `$type` that is inherited by all descendant tokens
324
+ * unless overridden at a lower level. Groups may also extend another group
325
+ * via `$extends`.
326
+ *
327
+ * @see https://tr.designtokens.org/format/#groups
328
+ */
329
+ export declare class TokenGroup {
330
+ #private;
331
+ /** Inherited token type for descendant tokens that do not declare their own `$type`. */
332
+ readonly type: TokenType | undefined;
333
+ readonly description: string | undefined;
334
+ readonly deprecated: boolean | string | undefined;
335
+ readonly extensions: Record<string, unknown> | undefined;
336
+ /** Reference to the group this group extends, if any. */
337
+ readonly extends: TokenReference | string | undefined;
338
+ /**
339
+ * Optional root token for this group. Provides a base value while
340
+ * allowing for variants via nested tokens.
341
+ *
342
+ * @see https://tr.designtokens.org/format/#groups
343
+ */
344
+ readonly root: TokenNode<unknown> | undefined;
345
+ constructor(options?: {
346
+ type?: TokenType;
347
+ description?: string;
348
+ deprecated?: boolean | string;
349
+ extensions?: Record<string, unknown>;
350
+ extends?: TokenReference | string;
351
+ root?: TokenNode<unknown>;
352
+ children?: Map<string, TokenGroup | TokenNode<unknown>>;
353
+ });
354
+ /** Returns the child token or group with the given name, or undefined. */
355
+ get(name: string): TokenGroup | TokenNode<unknown> | undefined;
356
+ /** Returns all child names in insertion order. */
357
+ keys(): IterableIterator<string>;
358
+ /** Returns all child entries as [name, node] pairs in insertion order. */
359
+ entries(): IterableIterator<[string, TokenGroup | TokenNode<unknown>]>;
360
+ /** Returns true if this group contains a child with the given name. */
361
+ has(name: string): boolean;
362
+ get size(): number;
363
+ }
364
+
365
+ /**
366
+ * Groups tokens for display in the HTML showcase.
367
+ *
368
+ * @remarks
369
+ * Sorts tokens by scope: `primitive`, `semantic`, `component`,
370
+ * separates primitive themes and sorts groups in a stable order.
371
+ *
372
+ * For visual sections uses simple heuristics by name and value
373
+ * of CSS variable: colors, typography, spacing, shadows, motion and others.
374
+ */
375
+ declare class TokenGroupClassifier {
376
+ #private;
377
+ groupEntriesByScope(entries: ScopedTokenEntry[]): Map<string, TokenEntry[]>;
378
+ getPrimitiveThemes(themes: ThemeBucket[]): ThemeBucket[];
379
+ getOrderedScopes(scopes: Map<string, TokenEntry[]>): Array<[string, TokenEntry[]]>;
380
+ groupTokens(tokens: TokenEntry[]): Map<string, TokenEntry[]>;
381
+ private classifyTokenGroup;
382
+ }
383
+
384
+ /**
385
+ * HTML showcase for design tokens.
386
+ *
387
+ * @remarks
388
+ * Each implementation provides its own engine for building the HTML showcase:
389
+ * - from DTCG JSON tokens using validate -> convert -> render chain;
390
+ * - from ready CSS (for a single source) using direct render.
391
+ * Input is an array of source file paths, output is an HTML string or error.
392
+ */
393
+ export declare interface TokenHtmlShowcase {
394
+ /**
395
+ * Builds an HTML page from token files.
396
+ *
397
+ * @param sources - Array of paths to source files
398
+ * @returns HTML string of the showcase
399
+ * @throws Error if building the showcase failed
400
+ */
401
+ showcase(sources: string[]): Promise<string>;
402
+ }
403
+
404
+ /**
405
+ * Builds an HTML showcase from JSON tokens or ready CSS.
406
+ *
407
+ * @remarks
408
+ * Implements the common showcase pipeline and gives validation, conversion,
409
+ * CSS parsing and HTML rendering to separate classes.
410
+ */
411
+ export declare class TokenHtmlShowcaseBuilder implements TokenHtmlShowcase {
412
+ #private;
413
+ constructor(validator: TokenValidator, converter: TokenCssConverter, parser?: CssTokenParser, renderer?: TokenHtmlShowcaseRenderer);
414
+ showcase(sources: string[]): Promise<string>;
415
+ }
416
+
417
+ /**
418
+ * Renders an HTML page for the token showcase.
419
+ *
420
+ * @remarks
421
+ * Gets prepared token data and builds a complete HTML page:
422
+ * layout, sidebar, sections, cards, preview elements and navigation script.
423
+ */
424
+ declare class TokenHtmlShowcaseRenderer {
425
+ #private;
426
+ constructor(classifier?: TokenGroupClassifier);
427
+ renderPage(parsed: ParsedTokenCss): string;
428
+ private getVisibleScopes;
429
+ private getVisibleThemes;
430
+ private renderMenu;
431
+ private renderThemedMenu;
432
+ private renderScopeMenu;
433
+ private renderSemanticMenuLinks;
434
+ private renderSidebarToggle;
435
+ private renderFolderIcon;
436
+ private renderThemeSummary;
437
+ private renderTokens;
438
+ private renderThemedTokens;
439
+ private renderSemanticTokens;
440
+ private groupSemanticTokens;
441
+ private renderSemanticRole;
442
+ private renderSemanticPreview;
443
+ private renderSemanticReferences;
444
+ private renderSemanticParts;
445
+ private renderLinkedTokenValue;
446
+ private getCompositePartName;
447
+ private getSemanticWarnings;
448
+ private resolveTokenValue;
449
+ private resolveAggregateTokenValue;
450
+ private resolveAggregateGradientTokenValue;
451
+ private collectGradientStops;
452
+ private resolveAggregateTypographyTokenValue;
453
+ private collectIndexedValues;
454
+ private normalizeFontWeight;
455
+ private escapeRegExp;
456
+ private extractVarReferences;
457
+ private createTokenMap;
458
+ private dedupeTokens;
459
+ private cssVariableToTokenPath;
460
+ private getSemanticGroupKey;
461
+ private getSemanticRoleName;
462
+ private getSemanticRoleType;
463
+ private isRenderableColor;
464
+ private renderGroupedTokens;
465
+ private getDisplayGroups;
466
+ private renderMenuGroupLinks;
467
+ private sectionId;
468
+ private tokenId;
469
+ private renderGroupItems;
470
+ private renderBorderItems;
471
+ private renderTypographyItems;
472
+ private renderShadowItems;
473
+ private renderGradientItems;
474
+ private renderMotionItems;
475
+ private getFontCollectionEntryLabel;
476
+ private toFontVariantCard;
477
+ private getFontCollectionMetaLabel;
478
+ private getFontVariantPreviewStyle;
479
+ private renderFontVariantCard;
480
+ private renderBorderItem;
481
+ private renderShadowItem;
482
+ private renderGradientItem;
483
+ private renderGradientStops;
484
+ private renderTransitionItem;
485
+ private renderMotionTokenItem;
486
+ private renderMotionCard;
487
+ private renderMetaLine;
488
+ private formatGradientValue;
489
+ private formatGradientPosition;
490
+ private formatTransitionTiming;
491
+ private extractDurationValue;
492
+ private getMotionPreviewDuration;
493
+ private getMotionPreviewTiming;
494
+ private getMotionResolvedValue;
495
+ private normalizeMotionDuration;
496
+ private toMotionTitle;
497
+ private formatShadowLayer;
498
+ private formatShadowColor;
499
+ private renderBorderWidthItem;
500
+ private renderStrokeStyleItem;
501
+ private renderDimensionItem;
502
+ private renderRadiusItem;
503
+ private renderOpacityItem;
504
+ private parseOpacityValue;
505
+ private toDimensionTitle;
506
+ private getDimensionMarkerStyle;
507
+ private toTitleCase;
508
+ private renderTokenItem;
509
+ private renderGradientStopsFromValue;
510
+ private renderGroupBadge;
511
+ private getTypographyStyleParts;
512
+ private extractTypographyInfo;
513
+ private esc;
514
+ }
515
+
516
+ /**
517
+ * Base class for all DTCG token nodes.
518
+ *
519
+ * A token node holds either a direct value (`$value`) or an alias to another token (`$ref`).
520
+ * The `$type` field is inherited from the containing group when not explicitly set.
521
+ * Alias tokens without an explicit or inherited `$type` have `type = undefined`.
522
+ *
523
+ * @see https://tr.designtokens.org/format/#design-token
524
+ */
525
+ export declare abstract class TokenNode<T> {
526
+ #private;
527
+ readonly description: string | undefined;
528
+ readonly deprecated: boolean | string | undefined;
529
+ readonly extensions: Record<string, unknown> | undefined;
530
+ protected constructor(type: TokenType | undefined, value: T | TokenReference, description?: string, deprecated?: boolean | string, extensions?: Record<string, unknown>);
531
+ /**
532
+ * The token's DTCG type, or `undefined` for alias tokens without an explicit
533
+ * or inherited `$type`.
534
+ */
535
+ get type(): TokenType | undefined;
536
+ /**
537
+ * The token's value, or a {@link TokenReference} when this token is an alias.
538
+ *
539
+ * @see https://tr.designtokens.org/format/#aliases-references
540
+ */
541
+ get value(): T | TokenReference;
542
+ /** Returns true when this token is an alias to another token. */
543
+ isAlias(): boolean;
544
+ }
545
+
546
+ /**
547
+ * A reference to another token using curly-brace notation, e.g. `{color.base.red}`.
548
+ *
549
+ * References are not resolved at model level - resolution is the responsibility
550
+ * of the consumer (resolver, converter, etc.).
551
+ *
552
+ * @see https://tr.designtokens.org/format/#aliases-references
553
+ */
554
+ export declare class TokenReference {
555
+ #private;
556
+ /** @param value - token path without curly braces, e.g. `color.base.red` */
557
+ constructor(value: string);
558
+ /** Token path without curly braces, e.g. `color.base.red`. */
559
+ get value(): string;
560
+ /** Serializes to canonical curly-brace notation, e.g. `{color.base.red}`. */
561
+ toString(): string;
562
+ }
563
+
564
+ /**
565
+ * All token types defined in the DTCG 2025.10 specification.
566
+ *
567
+ * @see https://tr.designtokens.org/format/#types
568
+ */
569
+ export declare type TokenType = "color" | "dimension" | "fontFamily" | "fontWeight" | "number" | "duration" | "cubicBezier" | "strokeStyle" | "border" | "transition" | "shadow" | "gradient" | "typography";
570
+
571
+ /**
572
+ * Design tokens validator.
573
+ *
574
+ * @remarks
575
+ * Each validator puts its own check method for DTCG tokens.
576
+ * Input is an array of token file paths, output is a collection of diagnostics.
577
+ */
578
+ export declare interface TokenValidator {
579
+ /**
580
+ * Validates token files.
581
+ *
582
+ * @param sources - Array of paths to token files in DTCG JSON format
583
+ * @returns Collection of validation diagnostics
584
+ */
585
+ validate(sources: string[]): Promise<ValidationIssue[]>;
586
+ }
587
+
588
+ /**
589
+ * A single validation diagnostic from a validator.
590
+ */
591
+ export declare interface ValidationIssue {
592
+ /** Name of the validator that issued the diagnostic. */
593
+ name: string;
594
+ /** Path to the source file. */
595
+ sourcePath: string;
596
+ /** Message text. */
597
+ message: string;
598
+ /** Severity level. */
599
+ severity: IssueSeverity;
600
+ /** Line number (if available). */
601
+ line?: number;
602
+ /** Column number (if available). */
603
+ column?: number;
604
+ /** Raw data for debugging. */
605
+ raw?: unknown;
606
+ }
607
+
608
+ export { }