@pontive/pontkit-core 1.37.0 → 1.38.0

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.
@@ -0,0 +1,27 @@
1
+ import { ThemeIssue, TokenManifest } from './types';
2
+ /** Values `checkValue` must refuse, by token type: each one is an injection or a malformed value. */
3
+ export declare const BAD_VALUES: [type: string, value: string][];
4
+ /** Values `checkValue` must accept, by token type. */
5
+ export declare const GOOD_VALUES: [type: string, value: string][];
6
+ export interface GoldenCase {
7
+ name: string;
8
+ /** The theme layer compiled into (`compileTheme`'s `layer`); absent means "brand". */
9
+ layer?: "preset";
10
+ /** The input, as stored (unknown on purpose: invalid cases are not valid themes). */
11
+ theme: unknown;
12
+ /** The exact compiled CSS, when the theme is valid. */
13
+ css?: string;
14
+ /** The exact issues, in order, when it isn't (`compileTheme` throws, listing these). */
15
+ issues?: ThemeIssue[];
16
+ }
17
+ export interface GoldenCorpus {
18
+ /** Bumped when the file's shape changes. */
19
+ format: 1;
20
+ /** The token-API fingerprint (`tokens.json`) the corpus was built against. */
21
+ fingerprint: string;
22
+ cases: GoldenCase[];
23
+ }
24
+ /** Builds the corpus: every case with what pont2's compiler answers. */
25
+ export declare function buildGoldenCorpus(manifest?: TokenManifest): GoldenCorpus;
26
+ /** For tests: the issues validateTheme gives directly (the corpus's issues must equal them). */
27
+ export declare const issuesOf: (theme: unknown, manifest?: TokenManifest) => ThemeIssue[];