okchroma 0.6.1 → 0.7.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.
@@ -14,44 +14,7 @@ export declare const OFFSET_ALPHAS: {
14
14
  };
15
15
  export type OffsetRung = keyof typeof OFFSET_ALPHAS;
16
16
  export declare const ctaBorderRung: (prefix: string) => OffsetRung;
17
- export declare const offsetLeafName: (rung: OffsetRung) => string;
18
- export declare const offsetVarName: (rung: OffsetRung) => string;
19
- export declare const offsetTokenPath: (rung: OffsetRung) => string;
20
- export declare const OPACITY_RUNGS: {
21
- readonly 4: 0.04;
22
- readonly 8: 0.08;
23
- readonly 12: 0.12;
24
- readonly 16: 0.16;
25
- readonly 24: 0.24;
26
- readonly 32: 0.32;
27
- readonly 48: 0.48;
28
- readonly 64: 0.64;
29
- };
30
- export type OpacityRung = keyof typeof OPACITY_RUNGS;
31
- export declare const INTERACTION_RUNGS: readonly OpacityRung[];
32
- export declare const opacityLeafName: (rung: OpacityRung) => string;
33
- export declare const opacityVarName: (rung: OpacityRung) => string;
34
- export declare const opacityTokenPath: (rung: OpacityRung) => string;
35
- export declare const SHADOW_ALPHAS: {
36
- readonly 4: {
37
- readonly light: 0.04;
38
- readonly dark: 0.32;
39
- };
40
- readonly 8: {
41
- readonly light: 0.08;
42
- readonly dark: 0.48;
43
- };
44
- readonly 12: {
45
- readonly light: 0.12;
46
- readonly dark: 0.64;
47
- };
48
- };
49
- export type ShadowRung = keyof typeof SHADOW_ALPHAS;
50
- export declare const SCRIM_ALPHA: 0.64;
51
- export declare const DISABLED_OPACITY = 0.38;
52
- export declare const TRANSPARENT_VAR = "--alpha-transparent";
53
17
  export declare const offsetRgba: (rung: OffsetRung, mode: "light" | "dark") => string;
54
- export declare const alphaRootVars: (mode: "light" | "dark") => string[];
55
18
  export declare function ctaPageLc(s: GeneratedScale, mode: 'light' | 'dark', page: ColorStop): number;
56
19
  export declare function ctaNeedsBorder(s: GeneratedScale, mode: 'light' | 'dark', page: ColorStop | undefined): boolean;
57
20
  export declare function brandKindBody(prefix: string, s: GeneratedScale, mode: 'light' | 'dark', page: ColorStop | undefined, on?: 'soft' | 'solid'): string[];
@@ -0,0 +1,39 @@
1
+ import type { ThemeTokens } from './tokensRender';
2
+ import { type TokenPath } from './tokenNames';
3
+ export type DtcgColorValue = {
4
+ colorSpace: 'srgb';
5
+ components: [number, number, number];
6
+ alpha: number;
7
+ hex: string;
8
+ };
9
+ /** a color token, literal or an alias in the curly-brace form (`{brand.pencil-47}`) */
10
+ export type DtcgToken = {
11
+ $type: 'color';
12
+ $value: DtcgColorValue | string;
13
+ $description?: string;
14
+ };
15
+ export type DtcgGroup = {
16
+ [key: string]: DtcgToken | DtcgGroup;
17
+ };
18
+ export type DtcgDocument = DtcgGroup;
19
+ /**
20
+ * Every primitive's path, in document order: the neutral with its poles, the brand, the
21
+ * alt, the four signals by role, the link trios, the seed absolutes. This roster is the
22
+ * definition of what the engine emits; the emitters and the audit ride it.
23
+ */
24
+ export declare function tokenPaths(): TokenPath[];
25
+ /** the path of a structured-emit name (`brand-stamp-fill`), or undefined when it is not a primitive */
26
+ export declare function tokenPathOf(name: string): TokenPath | undefined;
27
+ /** the description key of a structured-emit name: its slash-joined path */
28
+ export declare function descriptionPathOf(name: string): string | undefined;
29
+ /** a resolved CSS value (hex, rgba(), transparent) as a DTCG color value */
30
+ export declare function dtcgColor(value: string): DtcgColorValue;
31
+ /**
32
+ * The two DTCG documents for a structured emit. Every primitive in the roster must be
33
+ * present in the emit and nothing else may be; a missing or foreign name throws, so the
34
+ * emit and the roster cannot drift apart silently.
35
+ */
36
+ export declare function tokensToDtcg(tokens: ThemeTokens): {
37
+ light: DtcgDocument;
38
+ dark: DtcgDocument;
39
+ };
@@ -9,11 +9,7 @@ export interface FigmaColorToken {
9
9
  hex: string;
10
10
  };
11
11
  }
12
- export interface FigmaNumberToken {
13
- $type: 'number';
14
- $value: number;
15
- }
16
- export type FigmaLeaf = FigmaColorToken | FigmaNumberToken;
12
+ export type FigmaLeaf = FigmaColorToken;
17
13
  export type FigmaGroup = {
18
14
  [key: string]: FigmaLeaf | FigmaGroup;
19
15
  };
@@ -1,3 +1,5 @@
1
+ export declare const AA_LARGE = "AA large text and UI elements";
2
+ export declare const AA_BODY = "AA standard body text";
1
3
  export declare const FAMILY: {
2
4
  readonly neutral: "neutral";
3
5
  readonly brandPrimary: "brand";
@@ -14,5 +16,23 @@ export declare const CSS_FAMILY: {
14
16
  readonly brandPrimary: "brand";
15
17
  readonly brandSecondary: "brand-alt";
16
18
  };
19
+ export declare const GUARANTEE_SCOPE: {
20
+ readonly highlighter: {
21
+ readonly level: "AA large text and UI elements";
22
+ readonly grounds: readonly ["paper"];
23
+ };
24
+ readonly pencil: {
25
+ readonly level: "AA standard body text";
26
+ readonly grounds: readonly ["paper"];
27
+ };
28
+ readonly pen: {
29
+ readonly level: "AA standard body text";
30
+ readonly grounds: readonly ["paper", "chalk"];
31
+ };
32
+ };
33
+ export type GuaranteeBand = keyof typeof GUARANTEE_SCOPE;
34
+ export type GuaranteeGround = (typeof GUARANTEE_SCOPE)[GuaranteeBand]['grounds'][number];
35
+ export declare const BAND_STOPS: Record<GuaranteeBand, readonly string[]>;
17
36
  export declare function canonicalize(path: string): string;
18
37
  export declare function describeToken(path: string): string;
38
+ export declare function describeDocument(path: string): string;
@@ -15,35 +15,18 @@ export declare const STAMP_LEAF: {
15
15
  readonly EDGE: string;
16
16
  readonly ON: string;
17
17
  };
18
- export declare const SYSTEM_LEAF: {
19
- readonly ABS_BLACK: "system/abs-black";
20
- readonly ABS_WHITE: "system/abs-white";
21
- readonly SURFACE: {
22
- readonly DIM: "system/surface/dim";
23
- readonly LOW: "system/surface/low";
24
- readonly MID: "system/surface/mid";
25
- readonly HIGH: "system/surface/high";
26
- };
27
- readonly ALPHA: {
28
- readonly TRANSPARENT: "system/alpha/transparent";
29
- readonly INK: "system/alpha/ink";
30
- readonly AWAY_FROM_BG_06: "system/alpha/away-from-bg/06";
31
- readonly AWAY_FROM_BG_08: "system/alpha/away-from-bg/08";
32
- readonly AWAY_FROM_BG_16: "system/alpha/away-from-bg/16";
33
- readonly TOWARD_BG_06: "system/alpha/toward-bg/06";
34
- readonly TOWARD_BG_08: "system/alpha/toward-bg/08";
35
- readonly TOWARD_BG_16: "system/alpha/toward-bg/16";
36
- readonly SHADOW_04: "system/alpha/shadow-04";
37
- readonly SHADOW_08: "system/alpha/shadow-08";
38
- readonly SHADOW_12: "system/alpha/shadow-12";
39
- };
40
- readonly OPACITY: Record<string, string>;
41
- };
42
- export declare const SURFACE_PLANE_LAW: Record<string, {
43
- light: string;
44
- dark: string;
45
- }>;
46
- export declare const CONTRACT_INVARIANT_ROWS: ReadonlySet<string>;
47
- export declare const EXT_NON_OVERRIDABLE: (p: string) => boolean;
18
+ export type TokenPath = readonly string[];
19
+ export declare const cssVarName: (path: TokenPath) => string;
20
+ export declare const figmaPathOf: (path: TokenPath) => string;
21
+ /** a family row: a scale stop, a pole, or a stamp token (nested under stamp/) */
22
+ export declare const familyPath: (family: string, leaf: string) => string[];
23
+ export declare const LINK_GROUP = "link";
24
+ export declare const LINK_POSTURES: readonly ["default", "inverse"];
25
+ export type LinkPosture = (typeof LINK_POSTURES)[number];
26
+ export declare const LINK_STATES: readonly ["enabled", "hover", "pressed"];
27
+ export type LinkState = (typeof LINK_STATES)[number];
28
+ export declare const linkPath: (posture: LinkPosture, state: LinkState) => string[];
29
+ export declare const ABSOLUTE_GROUP = "absolute";
30
+ export declare const absolutePath: (family: string) => string[];
48
31
  export declare const EXT_OVERRIDABLE_SYSTEM: (p: string) => boolean;
49
32
  export declare function tokenOrder(name: string): number;
@@ -8,7 +8,7 @@ export interface ThemeTokens {
8
8
  /** resolved literal values per mode; mode-invariant names appear in both */
9
9
  light: Record<string, string>;
10
10
  dark: Record<string, string>;
11
- /** names whose value does not depend on the mode */
11
+ /** names whose value does not depend on the mode (the seed absolutes) */
12
12
  invariant: string[];
13
13
  /** the declarations as emitted, var() references intact, per block */
14
14
  raw: {
@@ -43,9 +43,7 @@ export declare function readEmission(css: string): {
43
43
  };
44
44
  /** Resolves var() references against `own`, falling back to `shared` for names declared once. */
45
45
  export declare function resolveReferences(own: Map<string, string>, shared: Map<string, string>): Record<string, string>;
46
- /** The system rows tokens/semantic.css states as static aliases, as engine-table projections. */
47
- export declare function systemCss(): string;
48
46
  /** Builds a ThemeTokens object from an emission's declaration maps. */
49
47
  export declare function tokensFromEmission(slug: string, css: string): ThemeTokens;
50
- /** The whole page's token set for one brand: signals, system rows, and the brand block. */
48
+ /** The whole page's token set for one brand: the signal block and the brand block. */
51
49
  export declare function themeTokens(input: ThemeTokensInput): ThemeTokens;
@@ -1,13 +1,12 @@
1
1
  export { generateScale, generateNeutralScale, generateSubtleSecondary, neutralTintHue, type NeutralSource, type GeneratedScale, type ColorStop, type GenerateOptions, type NeutralLevel, type ContrastProfile, } from './engine/colorEngine';
2
2
  export { resolveBrand, resolveTheme, resolveLinkTrio, resolveLinkInverseTrio, DEFAULT_LINK_HEX, SIGNAL_SCALES, signalScalesFor, SECONDARY_DISTINCT_DELTA_E, SUBTLE_TINT_MULT, SUBTLE_PASTEL_K, OUTLINE_HOVER_ALPHA, type ResolvedBrand, type ResolvedTheme, type ResolvedSecondary, type SecondaryLevel, type SecondaryStyle, type SignalOverride, } from './engine/resolve';
3
- export { brandCss, neutralCss, signalsCss, stopsToVars, toHex, stopHex, OFFSET_ALPHAS, SHADOW_ALPHAS, SCRIM_ALPHA, OPACITY_RUNGS, INTERACTION_RUNGS, opacityLeafName, opacityVarName, opacityTokenPath, type OpacityRung, DISABLED_OPACITY, type ShadowRung, ctaNeedsBorder, ctaBorderRung, pageStopFor, } from './engine/cssRender';
4
- export { CSS_FAMILY } from './engine/tokenDescriptions';
5
- export { themeTokens, tokensFromEmission, readEmission, resolveReferences, systemCss, type ThemeTokens, type ThemeTokensInput, type TokenMode, } from './engine/tokensRender';
6
- export { interactionCss, interactionTokens, interactionRows, interactionVarName, interactionTintName, INTERACTION_FAMILIES, INTERACTION_POLE_FAMILY, INTERACTION_ROWS, INTERACTION_STATES, INTERACTION_LADDER, type InteractionRow, type InteractionState, type InteractionPoleFamily, } from './engine/interaction';
7
- export { themeToFigma, type FigmaGroup, type FigmaColorToken, type FigmaNumberToken, type FigmaLeaf, type ThemeInput, } from './engine/figmaRender';
8
- export { emitDtcgRamp, resolveDtcgRamp, parseToken, EXT_KEY, RESOLVER_ID, type DtcgRampGroup, type DtcgRequirementToken, type DtcgSeedToken, type DtcgColorValue, } from './engine/requirements/dtcg';
3
+ export { brandCss, neutralCss, signalsCss, stopsToVars, toHex, stopHex, OFFSET_ALPHAS, type OffsetRung, ctaNeedsBorder, ctaBorderRung, pageStopFor, } from './engine/cssRender';
4
+ export { CSS_FAMILY, describeToken, describeDocument, GUARANTEE_SCOPE, BAND_STOPS } from './engine/tokenDescriptions';
5
+ export { themeTokens, tokensFromEmission, readEmission, resolveReferences, type ThemeTokens, type ThemeTokensInput, type TokenMode, } from './engine/tokensRender';
6
+ export { themeToFigma, groupEntries, type FigmaGroup, type FigmaColorToken, type FigmaLeaf, type ThemeInput, } from './engine/figmaRender';
7
+ export { tokensToDtcg, tokenPathOf, descriptionPathOf, type DtcgDocument, type DtcgGroup, type DtcgToken, type DtcgColorValue, } from './engine/dtcgRender';
9
8
  export { MODE_SPECS, type ModeSpec } from './engine/requirements/spec';
10
- export { stopTokenName, tokenOrder, SCALE_STOP_COUNT, PAPER_0, PEN_100, STAMP_FILL, STAMP_FILL_HOVER, STAMP_FILL_PRESSED, STAMP_EDGE, STAMP_ON, STAMP_STATE_LEAVES, SYSTEM_LEAF, SURFACE_PLANE_LAW, } from './engine/tokenNames';
9
+ export { stopTokenName, tokenOrder, SCALE_STOP_COUNT, PAPER_0, PEN_100, STAMP_FILL, STAMP_FILL_HOVER, STAMP_FILL_PRESSED, STAMP_EDGE, STAMP_ON, STAMP_STATE_LEAVES, STAMP_LEAF, cssVarName, figmaPathOf, familyPath, linkPath, absolutePath, LINK_GROUP, LINK_POSTURES, LINK_STATES, ABSOLUTE_GROUP, type TokenPath, type LinkPosture, type LinkState, } from './engine/tokenNames';
11
10
  export { SIGNAL_EMIT_NAME } from './engine/signals';
12
11
  export { classifyArchetype, type Archetype } from './engine/archetypes';
13
12
  export { SIGNALS, type SignalDef } from './engine/signals';
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "okchroma",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "license": "MIT",
5
- "description": "Color token engine: one brand hex in, a full WCAG-enforced light+dark token system out (CSS variables, DTCG JSON, Figma variables)",
5
+ "description": "Color-system engine: one brand hex in, a light and dark set of color primitives out, with the contrast requirements solved during generation; emitted as CSS custom properties, DTCG documents, and Figma variables",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/egerrity/okchroma.git"
@@ -18,8 +18,7 @@
18
18
  }
19
19
  },
20
20
  "files": [
21
- "dist-lib",
22
- "tokens"
21
+ "dist-lib"
23
22
  ],
24
23
  "sideEffects": false,
25
24
  "scripts": {
@@ -55,7 +54,9 @@
55
54
  "typecheck": "tsc --noEmit",
56
55
  "typecheck:ext": "tsc --noEmit -p plugin-ext",
57
56
  "docs:lint": "esbuild scripts/docs-lint.ts --bundle --platform=node --outfile=dist/docs-lint.js && node dist/docs-lint.js",
58
- "audit:tokens": "esbuild scripts/tokens-audit.ts --bundle --platform=node --outfile=dist/tokens-audit.js && node dist/tokens-audit.js"
57
+ "audit:tokens": "esbuild scripts/tokens-audit.ts --bundle --platform=node --outfile=dist/tokens-audit.js && node dist/tokens-audit.js",
58
+ "audit:dtcg": "esbuild scripts/dtcg-audit.ts --bundle --platform=node --outfile=dist/dtcg-audit.js && node dist/dtcg-audit.js",
59
+ "tokens:emit": "esbuild scripts/dtcg-emit.ts --bundle --platform=node --outfile=dist/dtcg-emit.js && node dist/dtcg-emit.js"
59
60
  },
60
61
  "devDependencies": {
61
62
  "@types/node": "^25.9.2",
@@ -1,202 +0,0 @@
1
- /*
2
- Semantic token layer: maps role names to primitive tokens.
3
- This file never changes per brand. Only the primitives (--brand-*, --neutral-*) change.
4
- */
5
-
6
- /* ─── Global surface / fg / border ─────────────────────────────────────────── */
7
-
8
- [data-brand] {
9
- /* Elevation planes dim, low, mid, high: mid is the raised plane components sit on,
10
- the page behind it is low, and the two extremes are edge cases. Both themes use
11
- the SAME four stops in reversed order, so elevation always moves toward paper-0's
12
- side of the ramp. Light descends the ramp as elevation rises (dim paper-5 to high
13
- paper-0, white); dark ascends it (dim paper-0, the deep tinted ground, to high
14
- paper-5). paper-0 flips with the mode, so it is always the extreme pole: the high
15
- in light, the dim in dark. */
16
- --surface-dim: var(--neutral-paper-5);
17
- --surface-low: var(--neutral-paper-3);
18
- --surface-mid: var(--neutral-paper-1);
19
- --surface-high: var(--paper-0, #ffffff);
20
-
21
- --fg-default: var(--neutral-pen-70);
22
- --fg-subtle: var(--neutral-pencil-47);
23
-
24
- /* --border-default IS THE ACCESSIBILITY BORDER: a border that has to be there (inputs
25
- and other controls), so it rides highlighter-26, the stop that carries the 3:1 non-text
26
- contrast requirement. Decorative borders are --border-subtle (chalk-11) and
27
- the per-family --*-border-default (chalk-15). */
28
- --border-default: var(--neutral-highlighter-26);
29
- --border-subtle: var(--neutral-chalk-11);
30
-
31
- /* Shadow transparencies: pure black at a rung of the engine's opacity ladder (the
32
- --opacity-NNN numbers signalsCss writes at :root), the same rows the plugins write
33
- as shadow-04|08|12. Dark is heavier by necessity: near black a light-mode weight
34
- vanishes, so the dark block picks the heavier rungs for the same three roles.
35
- Elevation recipes compose these, so dark shadows fall out of the token swap with
36
- nothing bespoke per style. */
37
- --shadow-04: rgb(0 0 0 / var(--opacity-004));
38
- --shadow-08: rgb(0 0 0 / var(--opacity-008));
39
- --shadow-12: rgb(0 0 0 / var(--opacity-012));
40
-
41
- /* The scrim: the modal veil, the absolute black at the ladder's top rung in both
42
- modes. Composed here from the number; a Figma kit composes the same thing as a
43
- black alias at that opacity. There is no separate scrim color row. */
44
- --scrim: rgb(0 0 0 / var(--opacity-064));
45
-
46
- /* Disabled opacity: disabled is a COMPONENT-LEVEL opacity. Colors stay the enabled
47
- ones and never swap. Mode-invariant; mirrors the JS API's DISABLED_OPACITY
48
- constant 1:1. */
49
- --disabled-opacity: 0.38;
50
- }
51
-
52
- [data-brand][data-theme="dark"] {
53
- /* Dark runs the same four stops upward: dim paper-0 (the deep tinted ground), low
54
- paper-1, mid paper-3, high paper-5, the one-level highest background: every
55
- family's paper-5 shares one photometric level, so chips sit flush on the high
56
- plane by construction. Low needs its own override here because the shared
57
- block's low is paper-3, the light value. */
58
- --surface-dim: var(--paper-0, #000000);
59
- --surface-low: var(--neutral-paper-1);
60
- --surface-mid: var(--neutral-paper-3);
61
- --surface-high: var(--neutral-paper-5);
62
-
63
- --shadow-04: rgb(0 0 0 / var(--opacity-032));
64
- --shadow-08: rgb(0 0 0 / var(--opacity-048));
65
- --shadow-12: rgb(0 0 0 / var(--opacity-064));
66
- }
67
-
68
- /* ─── role.brand ────────────────────────────────────────────────────────────── */
69
-
70
- [data-brand] {
71
- --brand-fg: var(--brand-pen-70);
72
- --brand-fg-hover: var(--brand-pencil-47);
73
- --brand-fg-alt: var(--brand-pencil-47);
74
- --brand-fg-alt-hover: var(--brand-pen-70);
75
- --brand-fg-on-emphasis: var(--brand-stamp-on);
76
-
77
- --brand-bg-faint: var(--brand-paper-3);
78
- --brand-bg-subtle: var(--brand-chalk-11);
79
- --brand-bg-subtle-hover: var(--brand-chalk-15);
80
- --brand-bg-emphasis: var(--brand-stamp-fill);
81
- --brand-bg-emphasis-hover: var(--brand-stamp-fill-hover);
82
- --brand-bg-emphasis-pressed: var(--brand-stamp-fill-pressed);
83
-
84
- --brand-border-subtle: var(--brand-chalk-8);
85
- --brand-border-subtle-hover: var(--brand-chalk-11);
86
- --brand-border-default: var(--brand-chalk-15);
87
- --brand-border-default-hover: var(--brand-highlighter-26);
88
- --brand-border-emphasis: var(--brand-stamp-fill);
89
- --brand-border-emphasis-hover: var(--brand-stamp-fill-hover);
90
-
91
- /* the SYSTEM LINK (one trio per theme; aliases the primary's pen stops unless a custom
92
- link color de-conflicts it; --link/-hover/-pressed are emitted per brand) */
93
- --fg-link: var(--link);
94
- --fg-link-hover: var(--link-hover);
95
- --fg-link-pressed: var(--link-pressed);
96
-
97
- /* the INVERSE link trio: the same link seed re-solved for text on inverted surfaces
98
- (a pen-70 fill); always its own emitted values, since no stop is anchored against
99
- that ground and so there is no alias posture */
100
- --fg-link-inverse: var(--link-inverse);
101
- --fg-link-inverse-hover: var(--link-inverse-hover);
102
- --fg-link-inverse-pressed: var(--link-inverse-pressed);
103
- }
104
-
105
- /* ─── role.secondary (the brand's secondary ramp; mirrors brand when none) ──── */
106
-
107
- [data-brand] {
108
- --brand-alt-fg: var(--brand-alt-pen-70);
109
- --brand-alt-fg-hover: var(--brand-alt-pencil-47);
110
- --brand-alt-fg-alt: var(--brand-alt-pencil-47);
111
- --brand-alt-fg-alt-hover: var(--brand-alt-pen-70);
112
- --brand-alt-fg-on-emphasis: var(--brand-alt-stamp-on);
113
-
114
- --brand-alt-bg-faint: var(--brand-alt-paper-3);
115
- --brand-alt-bg-subtle: var(--brand-alt-chalk-11);
116
- --brand-alt-bg-subtle-hover: var(--brand-alt-chalk-15);
117
- --brand-alt-bg-emphasis: var(--brand-alt-stamp-fill);
118
- --brand-alt-bg-emphasis-hover: var(--brand-alt-stamp-fill-hover);
119
- --brand-alt-bg-emphasis-pressed: var(--brand-alt-stamp-fill-pressed);
120
-
121
- --brand-alt-border-subtle: var(--brand-alt-chalk-8);
122
- --brand-alt-border-subtle-hover: var(--brand-alt-chalk-11);
123
- --brand-alt-border-default: var(--brand-alt-chalk-15);
124
- --brand-alt-border-default-hover: var(--brand-alt-highlighter-26);
125
- --brand-alt-border-emphasis: var(--brand-alt-stamp-fill);
126
- --brand-alt-border-emphasis-hover: var(--brand-alt-stamp-fill-hover);
127
- }
128
-
129
- /* ─── Signal roles ──────────────────────────────────────────────────────────
130
- Aliases onto engine-generated signal primitives (dist/signals.css).
131
- Mode switching happens at the primitive layer, so one block covers both.
132
- Signal families emit by ROLE (critical/warning/positive/info, the re-pointable
133
- in-between tier; identity stays engine-internal), so the role tokens and the
134
- family ramp share a prefix: --critical-fg rides --critical-pen-70.
135
-
136
- -fg-on-emphasis rides --paper-0, NOT a solved on-color. paper-0 is the
137
- mode-flipping paper extreme (white in light, the deep tinted ground in dark) and
138
- it clears the 4.5:1 text bar against pencil-47 in every family and both modes;
139
- the band audit holds that floor over an agnostic sweep. -bg-emphasis and
140
- -border-emphasis ride pencil-47. */
141
-
142
- [data-brand] {
143
- --critical-fg: var(--critical-pen-70);
144
- --critical-fg-hover: var(--critical-pencil-47);
145
- --critical-fg-alt: var(--critical-pencil-47);
146
- --critical-fg-alt-hover: var(--critical-pen-70);
147
- --critical-fg-on-emphasis: var(--paper-0);
148
- --critical-bg-faint: var(--critical-paper-3);
149
- --critical-bg-subtle: var(--critical-chalk-11);
150
- --critical-bg-subtle-hover: var(--critical-chalk-15);
151
- --critical-bg-emphasis: var(--critical-pencil-47);
152
- --critical-border-subtle: var(--critical-chalk-8);
153
- --critical-border-subtle-hover: var(--critical-chalk-11);
154
- --critical-border-default: var(--critical-chalk-15);
155
- --critical-border-default-hover: var(--critical-highlighter-26);
156
- --critical-border-emphasis: var(--critical-pencil-47);
157
-
158
- --warning-fg: var(--warning-pen-70);
159
- --warning-fg-hover: var(--warning-pencil-47);
160
- --warning-fg-alt: var(--warning-pencil-47);
161
- --warning-fg-alt-hover: var(--warning-pen-70);
162
- --warning-fg-on-emphasis: var(--paper-0);
163
- --warning-bg-faint: var(--warning-paper-3);
164
- --warning-bg-subtle: var(--warning-chalk-11);
165
- --warning-bg-subtle-hover: var(--warning-chalk-15);
166
- --warning-bg-emphasis: var(--warning-pencil-47);
167
- --warning-border-subtle: var(--warning-chalk-8);
168
- --warning-border-subtle-hover: var(--warning-chalk-11);
169
- --warning-border-default: var(--warning-chalk-15);
170
- --warning-border-default-hover: var(--warning-highlighter-26);
171
- --warning-border-emphasis: var(--warning-pencil-47);
172
-
173
- --positive-fg: var(--positive-pen-70);
174
- --positive-fg-hover: var(--positive-pencil-47);
175
- --positive-fg-alt: var(--positive-pencil-47);
176
- --positive-fg-alt-hover: var(--positive-pen-70);
177
- --positive-fg-on-emphasis: var(--paper-0);
178
- --positive-bg-faint: var(--positive-paper-3);
179
- --positive-bg-subtle: var(--positive-chalk-11);
180
- --positive-bg-subtle-hover: var(--positive-chalk-15);
181
- --positive-bg-emphasis: var(--positive-pencil-47);
182
- --positive-border-subtle: var(--positive-chalk-8);
183
- --positive-border-subtle-hover: var(--positive-chalk-11);
184
- --positive-border-default: var(--positive-chalk-15);
185
- --positive-border-default-hover: var(--positive-highlighter-26);
186
- --positive-border-emphasis: var(--positive-pencil-47);
187
-
188
- --info-fg: var(--info-pen-70);
189
- --info-fg-hover: var(--info-pencil-47);
190
- --info-fg-alt: var(--info-pencil-47);
191
- --info-fg-alt-hover: var(--info-pen-70);
192
- --info-fg-on-emphasis: var(--paper-0);
193
- --info-bg-faint: var(--info-paper-3);
194
- --info-bg-subtle: var(--info-chalk-11);
195
- --info-bg-subtle-hover: var(--info-chalk-15);
196
- --info-bg-emphasis: var(--info-pencil-47);
197
- --info-border-subtle: var(--info-chalk-8);
198
- --info-border-subtle-hover: var(--info-chalk-11);
199
- --info-border-default: var(--info-chalk-15);
200
- --info-border-default-hover: var(--info-highlighter-26);
201
- --info-border-emphasis: var(--info-pencil-47);
202
- }