@dloizides/design-tokens 1.10.0 → 1.11.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.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/motion.ts","../src/varNames.ts","../src/contrast.ts","../src/onBrand.ts","../src/emit/toCssVars.ts","../src/emit/toRnTheme.ts","../src/emit/toTailwindPreset.ts","../src/emit/toUiTheme.ts","../src/presets/aml.ts","../src/presets/digitalkin.ts","../src/presets/erevna.ts","../src/presets/katalogos.ts","../src/presets/nextgame.ts","../src/presets/index.ts","../src/finregModules.ts"],"names":[],"mappings":";;;AAaA,IAAM,gBAAA,GAAmB,CAAA;AACzB,IAAM,aAAA,GAAgB,GAAA;AACtB,IAAM,aAAA,GAAgB,GAAA;AACtB,IAAM,aAAA,GAAgB,GAAA;AAEf,IAAM,cAAA,GAAyB;AAAA,EACpC,SAAA,EAAW;AAAA,IACT,OAAA,EAAS,gBAAA;AAAA,IACT,IAAA,EAAM,aAAA;AAAA,IACN,IAAA,EAAM,aAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,OAAA,EAAS;AAAA;AAAA,IAEP,QAAA,EAAU;AAAA,MACR,GAAA,EAAK,yBAAA;AAAA,MACL,MAAA,EAAQ,CAAC,GAAA,EAAK,CAAA,EAAG,GAAG,CAAC;AAAA,KACvB;AAAA;AAAA,IAEA,UAAA,EAAY;AAAA,MACV,GAAA,EAAK,uBAAA;AAAA,MACL,MAAA,EAAQ,CAAC,CAAA,EAAG,CAAA,EAAG,GAAG,CAAC;AAAA,KACrB;AAAA;AAAA,IAEA,UAAA,EAAY;AAAA,MACV,GAAA,EAAK,yBAAA;AAAA,MACL,MAAA,EAAQ,CAAC,GAAA,EAAK,CAAA,EAAG,GAAG,CAAC;AAAA;AACvB;AAEJ;;;AC6DO,IAAM,qBAAA,GAAqC;AAAA,EAChD,OAAA,EAAS,WAAA;AAAA,EACT,SA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A,EACA,UAAA,EAAY;AAAA;AAAA,IAEV,IAAA,EAAM,SAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,GAAA,EAAK;AAAA;AAAA,IAEH,IAAA,EAAM,SAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb;AASO,IAAM,qBAAA,GAA6C;AAAA;AAAA,EAExD,OAAA,EAAS,SAAA;AAAA;AAAA,EAET,OAAA,EAAS;AACX","file":"index.js","sourcesContent":["/**\n * The default {@link Motion} token set — durations + easings shared by every app.\n *\n * Motion is app-agnostic: the same durations and Material-like curves fit every\n * portal, so unlike colour there is ONE shipped default rather than one per preset.\n * `@dloizides/ui-motion` reads this to build its RN `Easing.bezier(...)` map, and a\n * web/CSS consumer can read the `.css` timing-function strings directly.\n *\n * Values only. No RN/`Animated` imports — this package stays framework-agnostic.\n */\nimport type { Motion } from './types';\n\n/** Durations in ms. `instant` (0) is the reduced-motion collapse target. */\nconst DURATION_INSTANT = 0;\nconst DURATION_FAST = 140;\nconst DURATION_BASE = 200;\nconst DURATION_SLOW = 300;\n\nexport const DEFAULT_MOTION: Motion = {\n durations: {\n instant: DURATION_INSTANT,\n fast: DURATION_FAST,\n base: DURATION_BASE,\n slow: DURATION_SLOW,\n },\n easings: {\n // Symmetric ease for on-screen moves that stay on screen.\n standard: {\n css: 'cubic-bezier(0.2,0,0,1)',\n bezier: [0.2, 0, 0, 1],\n },\n // Fast-in / soft-stop for elements ENTERING the screen.\n decelerate: {\n css: 'cubic-bezier(0,0,0,1)',\n bezier: [0, 0, 0, 1],\n },\n // Soft-start / fast-out for elements LEAVING the screen.\n accelerate: {\n css: 'cubic-bezier(0.3,0,1,1)',\n bezier: [0.3, 0, 1, 1],\n },\n },\n};\n","/**\n * CSS custom-property NAME MAPS — the cross-stack naming contract.\n *\n * `toCssVars(tokens, names)` reads a {@link DesignTokens} and a {@link CssVarNames}\n * map that says which CSS variable each token field is emitted as. A field whose\n * name is `undefined` in the map is skipped, which lets a stack emit only the\n * variables it actually consumes.\n *\n * Two maps ship:\n * - {@link DEFAULT_CSS_VAR_NAMES} — canonical kebab names (`--primary`, `--bg`, …).\n * The dark-mode fields have names, so a dark-mode block is emitted.\n * - {@link AML_CSS_VAR_NAMES} — the vanilla-JS AML console's existing variable\n * names (`--brand`, `--shell`, `--ok`, `--r`, …), so `wwwroot/shared/ui.css`\n * keeps working byte-for-byte. Core fields that AML expresses via an extension\n * variable are mapped to `undefined` (skipped) to avoid emitting duplicates,\n * and the dark-mode fields are `undefined` (AML has no light/dark toggle — its\n * dark app-shell is captured in the `shell*` extension inside `:root`).\n */\n\n/** Maps each {@link DesignTokens} field to the CSS variable it is emitted as (or `undefined` to skip). */\nexport interface CssVarNames {\n // brand\n primary?: string;\n secondary?: string;\n accent?: string;\n onBrand?: string;\n // semantic\n success?: string;\n warning?: string;\n error?: string;\n info?: string;\n // semantic background tints\n successBg?: string;\n warningBg?: string;\n errorBg?: string;\n infoBg?: string;\n // light-mode colours (emitted in :root)\n lightBackground?: string;\n lightSurface?: string;\n lightSurfaceElevated?: string;\n lightSurfaceMuted?: string;\n lightText?: string;\n lightTextSecondary?: string;\n lightBorder?: string;\n lightDivider?: string;\n // dark-mode colours (emitted in the dark selector block; omit all to skip the block)\n darkBackground?: string;\n darkSurface?: string;\n darkSurfaceElevated?: string;\n darkSurfaceMuted?: string;\n darkText?: string;\n darkTextSecondary?: string;\n darkBorder?: string;\n darkDivider?: string;\n // radii\n radiusXs?: string;\n radiusSm?: string;\n radiusMd?: string;\n radiusLg?: string;\n radiusPill?: string;\n // shadows\n shadowSm?: string;\n shadowMd?: string;\n shadowPop?: string;\n // fonts\n fontFamily?: string;\n monoFamily?: string;\n // extensions — shell\n shellBackground?: string;\n shellBackgroundAlt?: string;\n shellLine?: string;\n shellOn?: string;\n shellOnDim?: string;\n // extensions — brand extras\n brandPress?: string;\n brandSoft?: string;\n brandRing?: string;\n // extensions — ink scale\n inkBase?: string;\n inkSoft?: string;\n inkFaint?: string;\n inkOverlay?: string;\n // extensions — workspace extras\n surfaceAlt?: string;\n lineStrong?: string;\n // extensions — verdict palette\n ok?: string;\n okSoft?: string;\n okInk?: string;\n warn?: string;\n warnSoft?: string;\n warnInk?: string;\n bad?: string;\n badSoft?: string;\n badSoft2?: string;\n badInk?: string;\n}\n\n/**\n * Canonical kebab-case variable names. A stack with no existing CSS-variable\n * convention (or a fresh consumer) should adopt these. Extension fields are\n * omitted because the RN/DOM presets carry no extensions.\n */\nexport const DEFAULT_CSS_VAR_NAMES: CssVarNames = {\n primary: '--primary',\n secondary: '--secondary',\n accent: '--accent',\n onBrand: '--on-brand',\n success: '--success',\n warning: '--warning',\n error: '--error',\n info: '--info',\n successBg: '--success-bg',\n warningBg: '--warning-bg',\n errorBg: '--error-bg',\n infoBg: '--info-bg',\n lightBackground: '--background',\n lightSurface: '--surface',\n lightSurfaceElevated: '--surface-elevated',\n lightSurfaceMuted: '--surface-muted',\n lightText: '--text',\n lightTextSecondary: '--text-secondary',\n lightBorder: '--border',\n lightDivider: '--divider',\n darkBackground: '--background',\n darkSurface: '--surface',\n darkSurfaceElevated: '--surface-elevated',\n darkSurfaceMuted: '--surface-muted',\n darkText: '--text',\n darkTextSecondary: '--text-secondary',\n darkBorder: '--border',\n darkDivider: '--divider',\n radiusXs: '--radius-xs',\n radiusSm: '--radius-sm',\n radiusMd: '--radius',\n radiusLg: '--radius-lg',\n radiusPill: '--radius-pill',\n shadowSm: '--shadow-sm',\n shadowMd: '--shadow',\n shadowPop: '--shadow-pop',\n fontFamily: '--font',\n monoFamily: '--font-mono',\n};\n\n/**\n * The AML console's existing `wwwroot/shared/ui.css` variable names. Emitting the\n * `aml` preset with this map reproduces AML's current `:root` byte-for-byte, so\n * ui.css keeps working with zero visual change.\n *\n * Core fields that AML already expresses through an extension variable are mapped\n * to `undefined` to avoid duplicate declarations:\n * - `secondary`/`accent` — AML has a single brand; ui.css never reads them.\n * - `success`/`warning`/`error`/`info` — emitted via the verdict extension\n * (`--ok`/`--warn`/`--bad`); `info` has no AML variable.\n * - `light.surfaceElevated` → via `workspace.surfaceAlt` (`--surface-2`).\n * - `light.text` → via `ink.base` (`--ink`); `light.textSecondary` → `ink.soft`.\n * - `light.divider` — AML reuses `--line`, so no separate variable.\n * - all `dark*` — AML has no dark-mode toggle (its shell lives in the extension).\n */\nexport const AML_CSS_VAR_NAMES: CssVarNames = {\n primary: '--brand',\n // secondary/accent intentionally omitted (single-brand console)\n // semantic emitted via verdict extension; info has no AML variable\n lightBackground: '--bg',\n lightSurface: '--surface',\n // lightSurfaceElevated via workspace.surfaceAlt (--surface-2)\n // lightText via ink.base (--ink); lightTextSecondary via ink.soft (--ink-soft)\n lightBorder: '--line',\n // lightDivider reuses --line\n // dark* omitted (no dark-mode toggle)\n radiusXs: '--r-xs',\n radiusSm: '--r-sm',\n radiusMd: '--r',\n radiusLg: '--r-lg',\n radiusPill: '--r-pill',\n shadowSm: '--sh-1',\n shadowMd: '--sh-2',\n shadowPop: '--sh-pop',\n fontFamily: '--font',\n monoFamily: '--mono',\n shellBackground: '--shell',\n shellBackgroundAlt: '--shell-2',\n shellLine: '--shell-line',\n shellOn: '--on-shell',\n shellOnDim: '--on-shell-dim',\n brandPress: '--brand-press',\n brandSoft: '--brand-soft',\n brandRing: '--brand-ring',\n inkBase: '--ink',\n inkSoft: '--ink-soft',\n inkFaint: '--ink-faint',\n inkOverlay: '--ink-2',\n surfaceAlt: '--surface-2',\n lineStrong: '--line-strong',\n ok: '--ok',\n okSoft: '--ok-soft',\n okInk: '--ok-ink',\n warn: '--warn',\n warnSoft: '--warn-soft',\n warnInk: '--warn-ink',\n bad: '--bad',\n badSoft: '--bad-soft',\n badSoft2: '--bad-soft2',\n badInk: '--bad-ink',\n};\n","/**\n * WCAG 2.1 contrast-ratio maths.\n *\n * Exists so every packaged preset can be *proved* accessible instead of\n * eyeballed. `presets/presets.contrast.test.ts` uses it as a permanent guard:\n * any future edit to a text-role colour that drops it under the AA floor fails\n * the build.\n *\n * This is a deliberate COPY of the same function in `@dloizides/theme-web`, not\n * an import. `@dloizides/design-tokens` ships zero dependencies and zero peers\n * by design — it is framework-agnostic values only — so taking a dependency on\n * a React theming package to borrow ~60 lines of pure arithmetic would invert\n * the layering (theme-web already depends on this package). The duplication is\n * bounded, pure, and pinned by `contrast.test.ts` against external reference\n * pairs, so the two copies cannot silently disagree.\n *\n * The relative-luminance formula is the real one from WCAG 2.1 §\"relative\n * luminance\" — sRGB channels are linearized through the gamma transfer function\n * before the ITU-R BT.709 weighting. A naive channel average (or an HSL\n * lightness comparison) is NOT equivalent and will silently pass colours that\n * fail in a browser, which is exactly how `#777777` shipped at 4.48:1.\n *\n * @see https://www.w3.org/TR/WCAG21/#dfn-relative-luminance\n * @see https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio\n */\n\n/** WCAG 1.4.3 Contrast (Minimum), AA, normal-size text. */\nexport const AA_NORMAL_TEXT_RATIO = 4.5;\n/** WCAG 1.4.3 AA for large text (>=18.66px bold, or >=24px). */\nexport const AA_LARGE_TEXT_RATIO = 3;\n/** WCAG 1.4.11 Non-text Contrast — UI-component boundaries and graphical objects. */\nexport const AA_NON_TEXT_RATIO = 3;\n\nconst SRGB_CHANNEL_MAX = 255;\nconst GAMMA_LINEAR_THRESHOLD = 0.03928;\nconst GAMMA_LINEAR_DIVISOR = 12.92;\nconst GAMMA_OFFSET = 0.055;\nconst GAMMA_DIVISOR = 1.055;\nconst GAMMA_EXPONENT = 2.4;\n\n// ITU-R BT.709 luma coefficients, per the WCAG relative-luminance definition.\nconst LUMA_COEFFICIENT_RED = 0.2126;\nconst LUMA_COEFFICIENT_GREEN = 0.7152;\nconst LUMA_COEFFICIENT_BLUE = 0.0722;\n\n/** The +0.05 flare constant in the WCAG contrast-ratio formula. */\nconst CONTRAST_FLARE = 0.05;\n\nconst HEX_RADIX = 16;\nconst HEX_PAIR_LENGTH = 2;\nconst HEX_SHORTHAND_LENGTH = 3;\nconst HEX_FULL_LENGTH = 6;\nconst CHANNEL_OFFSET_RED = 0;\nconst CHANNEL_OFFSET_GREEN = 2;\nconst CHANNEL_OFFSET_BLUE = 4;\n\n/** Strip `#` and expand `#abc` to `aabbcc`, so both notations parse identically. */\nfunction normalizeHexDigits(hex: string): string {\n const clean = hex.trim().replace('#', '').toLowerCase();\n if (clean.length === HEX_SHORTHAND_LENGTH) {\n return `${clean[0] ?? ''}${clean[0] ?? ''}${clean[1] ?? ''}${clean[1] ?? ''}${clean[2] ?? ''}${clean[2] ?? ''}`;\n }\n return clean;\n}\n\nfunction parseChannel(digits: string, offset: number): number {\n const pair = digits.slice(offset, offset + HEX_PAIR_LENGTH);\n return parseInt(pair, HEX_RADIX) / SRGB_CHANNEL_MAX;\n}\n\n/** Undo the sRGB gamma transfer function for one 0-1 channel. */\nfunction linearizeChannel(channel: number): number {\n if (channel <= GAMMA_LINEAR_THRESHOLD) {\n return channel / GAMMA_LINEAR_DIVISOR;\n }\n return Math.pow((channel + GAMMA_OFFSET) / GAMMA_DIVISOR, GAMMA_EXPONENT);\n}\n\n/**\n * True when `value` is an `#rgb` / `#rrggbb` colour this module can score.\n *\n * Tokens may legitimately hold `rgba()` (AML's dark border is a white overlay),\n * which has no fixed luminance without knowing the backdrop. The guard uses this\n * to EXCLUDE such values explicitly rather than let them throw or, worse, be\n * silently skipped.\n */\nexport function isHexColor(value: string): boolean {\n const digits = normalizeHexDigits(value);\n return digits.length === HEX_FULL_LENGTH && /^[0-9a-f]{6}$/.test(digits);\n}\n\n/**\n * WCAG relative luminance (0 = black, 1 = white) of an `#rgb` / `#rrggbb` colour.\n *\n * @throws if the value is not a parseable hex colour — a typo must be loud, not\n * silently scored as black (which would make every ratio look compliant).\n */\nexport function relativeLuminance(hex: string): number {\n if (!isHexColor(hex)) {\n throw new Error(`relativeLuminance: not a hex colour: ${hex}`);\n }\n const digits = normalizeHexDigits(hex);\n\n const red = linearizeChannel(parseChannel(digits, CHANNEL_OFFSET_RED));\n const green = linearizeChannel(parseChannel(digits, CHANNEL_OFFSET_GREEN));\n const blue = linearizeChannel(parseChannel(digits, CHANNEL_OFFSET_BLUE));\n\n return (\n LUMA_COEFFICIENT_RED * red +\n LUMA_COEFFICIENT_GREEN * green +\n LUMA_COEFFICIENT_BLUE * blue\n );\n}\n\n/**\n * WCAG contrast ratio between two colours, in the range 1 (identical) to 21\n * (black on white). Order-independent.\n */\nexport function contrastRatio(foreground: string, background: string): number {\n const first = relativeLuminance(foreground);\n const second = relativeLuminance(background);\n const lighter = Math.max(first, second);\n const darker = Math.min(first, second);\n return (lighter + CONTRAST_FLARE) / (darker + CONTRAST_FLARE);\n}\n\n/** True when `foreground` on `background` meets `requiredRatio`. */\nexport function meetsContrast(\n foreground: string,\n background: string,\n requiredRatio: number,\n): boolean {\n return contrastRatio(foreground, background) >= requiredRatio;\n}\n","/**\n * DERIVE the foreground that sits on a brand-filled surface, instead of\n * defaulting it to white.\n *\n * WHY THIS EXISTS\n * ---------------\n * This package already shipped the WCAG maths (`contrast.ts`) and an optional\n * `onBrand` slot, and it still shipped a live AA failure: white on `#38bdf8` at\n * **2.14:1** on a production primary button. The slot was optional *with a white\n * default*, so the safe path required opting in and the default was the failing\n * one. An optional safety feature with an unsafe default is not a safety\n * feature — it is a trap that reads as protection in review.\n *\n * The same pair was then hand-patched five separate times across the codebase\n * (three IdentityService controllers, one of them inside a verification EMAIL\n * where CSS cannot be patched after sending, plus `wwwroot/signin/`). One of\n * those patches carries the comment \"See AccountController for the same pair\" —\n * a code comment doing a shared token's job. That is the recurrence this module\n * ends: the correct value is now what you get by doing nothing.\n *\n * WHY DERIVATION AND NOT A REQUIRED FIELD\n * ---------------------------------------\n * Making `onBrand` required would be a compile-time break for every consumer and\n * every preset author on a published, adopted interface — and it would push the\n * decision back onto exactly the caller who already got it wrong five times.\n * Derivation is non-breaking, and it fixes the DEFAULT, which is where the\n * defect actually lives. The explicit slot is kept (see `explicit` below) so an\n * author who has a considered brand ink can still state it; it is honoured, and\n * the preset guard measures it rather than trusting it.\n *\n * THE TWO CANDIDATE INKS\n * ----------------------\n * A brand fill in this system is always either light enough to want dark ink or\n * dark enough to want light ink, so two candidates cover the space:\n * measured against `#38bdf8`, dark ink scores **8.83:1** where white scores\n * 2.14:1. Note that even the \"deep\" brand blue `#0284c7` fails with white\n * (4.10:1) — picking a darker brand is NOT a reliable fix, which is why the\n * FOREGROUND has to be the derived half of the pair.\n */\nimport { AA_NORMAL_TEXT_RATIO, contrastRatio, isHexColor } from './contrast';\n\n/**\n * Light ink for a dark/saturated brand fill. Also the last-resort value when the\n * brand colour is not a measurable hex (see {@link resolveOnBrand}).\n */\nexport const ON_BRAND_LIGHT_INK = '#ffffff';\n\n/**\n * Dark ink for a pale brand fill.\n *\n * Not pure black: a near-black navy carries the brand's own hue, so a pale-blue\n * button reads as designed rather than as a default. Measured 8.83:1 on\n * `#38bdf8` and 9.98:1 on `#FFAB00`.\n */\nexport const ON_BRAND_DARK_INK = '#03121f';\n\n/**\n * The best available foreground for content sitting ON `background`.\n *\n * Resolution order:\n * 1. `explicit` — an author's stated brand ink is honoured as given. It is NOT\n * silently replaced, because overriding a deliberate design decision behind\n * the author's back is its own class of bug; the preset contrast guard\n * measures it instead, so a bad explicit value fails CI rather than shipping.\n * 2. A non-hex `background` (e.g. `rgba()`) has no fixed luminance without\n * knowing what it composites over, so no ratio can be computed. Returns\n * {@link ON_BRAND_LIGHT_INK} as an unavoidable last resort — documented and\n * pinned by a test, rather than being the unexamined default for everything.\n * 3. Otherwise the higher-contrast of the two candidate inks, measured with the\n * WCAG 2.1 maths in `contrast.ts`.\n *\n * Exported from the package root so consumers that let USERS supply a brand\n * colour at runtime (per-tenant branding endpoints) can derive the matching\n * foreground with the same maths that guards the shipped presets — the runtime\n * path is how an AA failure re-enters a codebase whose static presets all pass.\n */\nexport function resolveOnBrand(background: string, explicit?: string): string {\n if (explicit !== undefined) {\n return explicit;\n }\n if (!isHexColor(background)) {\n return ON_BRAND_LIGHT_INK;\n }\n const lightRatio = contrastRatio(ON_BRAND_LIGHT_INK, background);\n const darkRatio = contrastRatio(ON_BRAND_DARK_INK, background);\n return darkRatio > lightRatio ? ON_BRAND_DARK_INK : ON_BRAND_LIGHT_INK;\n}\n\n/**\n * The contrast ratio the derived foreground achieves on `background`, or `null`\n * when `background` is not measurable.\n *\n * Exists so a consumer can ASSERT the pair rather than assume it. Some brand\n * colours cannot carry an AA foreground in either direction — `#008d5c` peaks at\n * 4.47:1 against its best ink — and the only honest answer there is the number,\n * not a boolean that rounds a near-miss up to \"compliant\".\n */\nexport function onBrandRatio(background: string, explicit?: string): number | null {\n if (!isHexColor(background)) {\n return null;\n }\n const foreground = resolveOnBrand(background, explicit);\n if (!isHexColor(foreground)) {\n return null;\n }\n return contrastRatio(foreground, background);\n}\n\n/**\n * True when `background` can carry an AA-passing foreground at all.\n *\n * A brand colour in the mid-luminance band fails against BOTH inks. Such a\n * colour is not fixable by choosing a better foreground — it needs the fill\n * itself to move — so this distinguishes \"we picked the wrong ink\" from \"no ink\n * works\", which are different bugs with different owners.\n */\nexport function canCarryAccessibleInk(background: string): boolean {\n const ratio = onBrandRatio(background);\n return ratio !== null && ratio >= AA_NORMAL_TEXT_RATIO;\n}\n","import { resolveOnBrand } from '../onBrand';\nimport type { DesignTokens } from '../types';\nimport type { CssVarNames } from '../varNames';\n\n/** Options for {@link toCssVars}. */\nexport interface ToCssVarsOptions {\n /**\n * Selector for the dark-mode block. Only used when the name map defines any\n * `dark*` variables. Defaults to `:root[data-theme=\"dark\"]`.\n */\n darkSelector?: string;\n}\n\nconst INDENT = ' ';\nconst DEFAULT_DARK_SELECTOR = ':root[data-theme=\"dark\"]';\n\n/** A single ` --name: value;` line, or `null` when the name or value is absent. */\nfunction declaration(name: string | undefined, value: string | undefined): string | null {\n if (name === undefined || value === undefined) {\n return null;\n }\n return `${INDENT}${name}: ${value};`;\n}\n\nfunction isLine(entry: string | null): entry is string {\n return entry !== null;\n}\n\nfunction block(selector: string, lines: readonly string[]): string {\n return `${selector} {\\n${lines.join('\\n')}\\n}`;\n}\n\n/**\n * Emit a {@link DesignTokens} as CSS custom properties. Base tokens (brand,\n * semantic, light-mode, radii, shadows, fonts and any extensions) go in a\n * `:root {}` block; dark-mode tokens go in a separate selector block, emitted\n * only when the name map defines at least one `dark*` variable.\n */\nexport function toCssVars(\n tokens: DesignTokens,\n names: CssVarNames,\n options?: ToCssVarsOptions,\n): string {\n const ext = tokens.extensions;\n const baseEntries: Array<string | null> = [\n declaration(names.primary, tokens.primary),\n declaration(names.secondary, tokens.secondary),\n declaration(names.accent, tokens.accent),\n // Always emitted (when the name map asks for it), never skipped: a missing\n // `--on-brand` sends the stylesheet to its own hardcoded fallback, which is\n // how white-on-pale-brand reached production in the first place.\n declaration(names.onBrand, resolveOnBrand(tokens.primary, tokens.onBrand)),\n declaration(names.success, tokens.semantic.success),\n declaration(names.warning, tokens.semantic.warning),\n declaration(names.error, tokens.semantic.error),\n declaration(names.info, tokens.semantic.info),\n declaration(names.successBg, tokens.semantic.successBg),\n declaration(names.warningBg, tokens.semantic.warningBg),\n declaration(names.errorBg, tokens.semantic.errorBg),\n declaration(names.infoBg, tokens.semantic.infoBg),\n declaration(names.lightBackground, tokens.light.background),\n declaration(names.lightSurface, tokens.light.surface),\n declaration(names.lightSurfaceElevated, tokens.light.surfaceElevated),\n declaration(names.lightSurfaceMuted, tokens.light.surfaceMuted),\n declaration(names.lightText, tokens.light.text),\n declaration(names.lightTextSecondary, tokens.light.textSecondary),\n declaration(names.lightBorder, tokens.light.border),\n declaration(names.lightDivider, tokens.light.divider),\n declaration(names.radiusXs, tokens.radii?.xs),\n declaration(names.radiusSm, tokens.radii?.sm),\n declaration(names.radiusMd, tokens.radii?.md),\n declaration(names.radiusLg, tokens.radii?.lg),\n declaration(names.radiusPill, tokens.radii?.pill),\n declaration(names.shadowSm, tokens.shadows?.sm),\n declaration(names.shadowMd, tokens.shadows?.md),\n declaration(names.shadowPop, tokens.shadows?.pop),\n declaration(names.fontFamily, tokens.typography?.fontFamily),\n declaration(names.monoFamily, tokens.typography?.monoFamily),\n declaration(names.shellBackground, ext?.shell?.background),\n declaration(names.shellBackgroundAlt, ext?.shell?.backgroundAlt),\n declaration(names.shellLine, ext?.shell?.line),\n declaration(names.shellOn, ext?.shell?.on),\n declaration(names.shellOnDim, ext?.shell?.onDim),\n declaration(names.brandPress, ext?.brand?.press),\n declaration(names.brandSoft, ext?.brand?.soft),\n declaration(names.brandRing, ext?.brand?.ring),\n declaration(names.inkBase, ext?.ink?.base),\n declaration(names.inkSoft, ext?.ink?.soft),\n declaration(names.inkFaint, ext?.ink?.faint),\n declaration(names.inkOverlay, ext?.ink?.overlay),\n declaration(names.surfaceAlt, ext?.workspace?.surfaceAlt),\n declaration(names.lineStrong, ext?.workspace?.lineStrong),\n declaration(names.ok, ext?.verdict?.ok),\n declaration(names.okSoft, ext?.verdict?.okSoft),\n declaration(names.okInk, ext?.verdict?.okInk),\n declaration(names.warn, ext?.verdict?.warn),\n declaration(names.warnSoft, ext?.verdict?.warnSoft),\n declaration(names.warnInk, ext?.verdict?.warnInk),\n declaration(names.bad, ext?.verdict?.bad),\n declaration(names.badSoft, ext?.verdict?.badSoft),\n declaration(names.badSoft2, ext?.verdict?.badSoft2),\n declaration(names.badInk, ext?.verdict?.badInk),\n ];\n const baseBlock = block(':root', baseEntries.filter(isLine));\n\n const darkEntries: Array<string | null> = [\n declaration(names.darkBackground, tokens.dark.background),\n declaration(names.darkSurface, tokens.dark.surface),\n declaration(names.darkSurfaceElevated, tokens.dark.surfaceElevated),\n declaration(names.darkSurfaceMuted, tokens.dark.surfaceMuted),\n declaration(names.darkText, tokens.dark.text),\n declaration(names.darkTextSecondary, tokens.dark.textSecondary),\n declaration(names.darkBorder, tokens.dark.border),\n declaration(names.darkDivider, tokens.dark.divider),\n ];\n const darkLines = darkEntries.filter(isLine);\n if (darkLines.length === 0) {\n return baseBlock;\n }\n\n const selector = options?.darkSelector ?? DEFAULT_DARK_SELECTOR;\n return `${baseBlock}\\n\\n${block(selector, darkLines)}`;\n}\n","import type { Branding, DesignTokens, ModeColors } from '../types';\n\n/**\n * The RN-web theme-config shape. Structurally compatible with\n * `@dloizides/tenant-theme-web`'s `TenantThemeConfig` (and each RN app's local\n * `TenantThemeConfig`), so a preset can be dropped in as the `defaultThemeConfig`\n * fallback without any mapping. Semantic and typography are optional (an RN app\n * may leave them unset, exactly as the current `default` preset does).\n */\nexport interface RnThemeConfig {\n primary: string;\n secondary: string;\n accent: string;\n semantic?: { success?: string; warning?: string; error?: string; info?: string };\n light: ModeColors;\n dark: ModeColors;\n typography?: { fontFamily?: string; headingScale?: number };\n branding: Branding;\n}\n\n/**\n * Emit a {@link DesignTokens} as an RN-web `TenantThemeConfig`-compatible object.\n * Only the core fields are projected; the `radii`/`shadows`/`extensions`\n * supersets are intentionally dropped (RN-web has no centralized token for them).\n * `typography` is included only when the preset defines it, so a preset with no\n * typography yields a config with no `typography` key — byte-identical to the RN\n * apps' current `DEFAULT_THEME_CONFIG`.\n */\nexport function toRnTheme(tokens: DesignTokens): RnThemeConfig {\n const config: RnThemeConfig = {\n primary: tokens.primary,\n secondary: tokens.secondary,\n accent: tokens.accent,\n semantic: { ...tokens.semantic },\n light: { ...tokens.light },\n dark: { ...tokens.dark },\n branding: { ...tokens.branding },\n };\n if (tokens.typography !== undefined) {\n config.typography = {\n fontFamily: tokens.typography.fontFamily,\n headingScale: tokens.typography.headingScale,\n };\n }\n return config;\n}\n","import { resolveOnBrand } from '../onBrand';\r\nimport type { DesignTokens } from '../types';\r\n\r\n/** Nested colour scale emitted under `theme.extend.colors`. */\r\nexport interface TailwindColors {\r\n primary: string;\r\n secondary: string;\r\n accent: string;\r\n /**\r\n * The primary's contrast partner. ALWAYS emitted — derived from `primary` when\r\n * the preset declares no `onBrand`, so a consumer's `text-on-brand` utility\r\n * cannot silently resolve to its own white fallback on a pale brand.\r\n */\r\n 'on-brand': string;\r\n success: string;\r\n warning: string;\r\n error: string;\r\n info: string;\r\n /** Status background tints. Emitted only when the preset declares them. */\r\n 'success-bg'?: string;\r\n 'warning-bg'?: string;\r\n 'error-bg'?: string;\r\n 'info-bg'?: string;\r\n background: string;\r\n surface: string;\r\n 'surface-elevated': string;\r\n /** Emitted only when the preset declares `light.surfaceMuted`. */\r\n 'surface-muted'?: string;\r\n text: string;\r\n 'text-secondary': string;\r\n border: string;\r\n divider: string;\r\n dark: {\r\n background: string;\r\n surface: string;\r\n 'surface-elevated': string;\r\n /** Emitted only when the preset declares `dark.surfaceMuted`. */\r\n 'surface-muted'?: string;\r\n text: string;\r\n 'text-secondary': string;\r\n border: string;\r\n divider: string;\r\n };\r\n}\r\n\r\n/** A Tailwind preset object: `{ theme: { extend: { … } } }`. Spread into a `tailwind.config`'s `presets`. */\r\nexport interface TailwindPreset {\r\n theme: {\r\n extend: {\r\n colors: TailwindColors;\r\n borderRadius?: Record<string, string>;\r\n boxShadow?: Record<string, string>;\r\n fontFamily?: Record<string, string[]>;\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Add the optional colour tokens, each only when the preset declares it — so a\r\n * preset that predates these slots emits a byte-identical colour object.\r\n */\r\nfunction addOptionalColors(colors: TailwindColors, tokens: DesignTokens): void {\r\n const { semantic } = tokens;\r\n if (semantic.successBg !== undefined) {\r\n colors['success-bg'] = semantic.successBg;\r\n }\r\n if (semantic.warningBg !== undefined) {\r\n colors['warning-bg'] = semantic.warningBg;\r\n }\r\n if (semantic.errorBg !== undefined) {\r\n colors['error-bg'] = semantic.errorBg;\r\n }\r\n if (semantic.infoBg !== undefined) {\r\n colors['info-bg'] = semantic.infoBg;\r\n }\r\n if (tokens.light.surfaceMuted !== undefined) {\r\n colors['surface-muted'] = tokens.light.surfaceMuted;\r\n }\r\n if (tokens.dark.surfaceMuted !== undefined) {\r\n colors.dark['surface-muted'] = tokens.dark.surfaceMuted;\r\n }\r\n}\r\n\r\n/**\r\n * Emit a {@link DesignTokens} as a Tailwind preset for the DOM-React ThemeStudio.\r\n * The core colours are always present; the optional colour slots,\r\n * `borderRadius`/`boxShadow`/`fontFamily` are emitted only when the preset\r\n * defines the corresponding token.\r\n */\r\nexport function toTailwindPreset(tokens: DesignTokens): TailwindPreset {\r\n const colors: TailwindColors = {\r\n primary: tokens.primary,\r\n secondary: tokens.secondary,\r\n accent: tokens.accent,\r\n 'on-brand': resolveOnBrand(tokens.primary, tokens.onBrand),\r\n success: tokens.semantic.success,\r\n warning: tokens.semantic.warning,\r\n error: tokens.semantic.error,\r\n info: tokens.semantic.info,\r\n background: tokens.light.background,\r\n surface: tokens.light.surface,\r\n 'surface-elevated': tokens.light.surfaceElevated,\r\n text: tokens.light.text,\r\n 'text-secondary': tokens.light.textSecondary,\r\n border: tokens.light.border,\r\n divider: tokens.light.divider,\r\n dark: {\r\n background: tokens.dark.background,\r\n surface: tokens.dark.surface,\r\n 'surface-elevated': tokens.dark.surfaceElevated,\r\n text: tokens.dark.text,\r\n 'text-secondary': tokens.dark.textSecondary,\r\n border: tokens.dark.border,\r\n divider: tokens.dark.divider,\r\n },\r\n };\r\n addOptionalColors(colors, tokens);\r\n\r\n const extend: TailwindPreset['theme']['extend'] = { colors };\r\n\r\n if (tokens.radii !== undefined) {\r\n extend.borderRadius = {\r\n xs: tokens.radii.xs,\r\n sm: tokens.radii.sm,\r\n DEFAULT: tokens.radii.md,\r\n lg: tokens.radii.lg,\r\n pill: tokens.radii.pill,\r\n };\r\n }\r\n if (tokens.shadows !== undefined) {\r\n extend.boxShadow = {\r\n sm: tokens.shadows.sm,\r\n DEFAULT: tokens.shadows.md,\r\n pop: tokens.shadows.pop,\r\n };\r\n }\r\n if (tokens.typography !== undefined) {\r\n const fontFamily: Record<string, string[]> = { sans: [tokens.typography.fontFamily] };\r\n if (tokens.typography.monoFamily !== undefined) {\r\n fontFamily.mono = [tokens.typography.monoFamily];\r\n }\r\n extend.fontFamily = fontFamily;\r\n }\r\n\r\n return { theme: { extend } };\r\n}\r\n","/**\n * Emit a {@link DesignTokens} as the shared RN UI kit's theme object — the value\n * `@dloizides/ui-feedback`'s `UiProvider` broadcasts and every kit component\n * (NavShell, DataTable, Filters, Pager, StatusBadge, ThemedTextInput, StatCard)\n * reads via `useUi()`.\n *\n * WHY THIS LIVES HERE\n * -------------------\n * Two apps (ichnos, kefi) independently wrote the same adapter, and both hit the\n * same wall: a naive projection assigns ONE value to every step of a scale, which\n * silently discards the deeper brand step and the status background tints. Each\n * then bolted a private overlay onto the result to smuggle the lost values into\n * free slots. That overlay is this function, done twice — so it belongs in the\n * token package, where the token shape that lost the values is defined.\n *\n * The emitted theme is a LOSSLESS carrier: every token the shape can express has\n * an addressable slot, so an app can round-trip its whole palette back out\n * (see the `*Colors` accessors in each app) instead of keeping a parallel static\n * copy that cannot follow a dark-mode toggle or a per-tenant brand.\n *\n * The type is declared structurally here rather than imported, exactly as\n * {@link RnThemeConfig} declares the `TenantThemeConfig` shape: this package\n * stays framework-agnostic and takes no dependency on the kit it feeds.\n */\nimport { resolveOnBrand } from '../onBrand';\nimport type { DesignTokens, ModeColors } from '../types';\n\n/** Flat colour fields the kit reads directly. Mirrors `ui-feedback`'s `FeedbackThemeColors`. */\nexport interface UiThemeColors {\n background: string;\n surface: string;\n surfaceElevated: string;\n text: string;\n textSecondary: string;\n border: string;\n}\n\n/** A colour scale. The `500` step is guaranteed; other steps are addressable. */\nexport interface UiColorScale {\n '500': string;\n [step: string]: string;\n}\n\n/** Brand scales. `primary` is guaranteed; other names are addressable. */\nexport interface UiThemePalette {\n primary: UiColorScale;\n [name: string]: UiColorScale;\n}\n\n/** Status scales. `error` is guaranteed; other names are addressable. */\nexport interface UiThemeSemantic {\n error: UiColorScale;\n [name: string]: UiColorScale;\n}\n\n/** The kit theme. Structurally identical to `@dloizides/ui-feedback`'s `UiTheme`. */\nexport interface UiThemeConfig {\n colors: UiThemeColors;\n palette: UiThemePalette;\n semantic: UiThemeSemantic;\n}\n\n/** Which mode block ({@link DesignTokens.light} / {@link DesignTokens.dark}) to project. */\nexport type UiThemeMode = 'light' | 'dark';\n\n/** The soft/tint step of a scale — status background tints, muted brand fills. */\nexport const UI_TINT_STEP = '100';\n/** The step every shipped kit component reads. */\nexport const UI_MAIN_STEP = '500';\n/** The deep/pressed step of a scale. */\nexport const UI_DEEP_STEP = '700';\n\n/** Palette scale carrying the on-brand foreground. */\nconst ON_BRAND_SCALE = 'onBrand';\n/** Palette scale carrying the muted inset surface. */\nconst SURFACE_MUTED_SCALE = 'surfaceMuted';\n\n/**\n * A colour with no distinct tint or deep variant, expressed as a full scale so\n * every step is addressable and no consumer reads `undefined`.\n */\nfunction flat(value: string): UiColorScale {\n return { [UI_TINT_STEP]: value, [UI_MAIN_STEP]: value, [UI_DEEP_STEP]: value };\n}\n\n/**\n * A status scale: the base at `500`/`700` and its background tint at `100`.\n * Falls back to a flat scale when the preset declares no tint, so behaviour is\n * unchanged for presets that predate the `*Bg` slots.\n */\nfunction tinted(base: string, tint: string | undefined): UiColorScale {\n return { [UI_TINT_STEP]: tint ?? base, [UI_MAIN_STEP]: base, [UI_DEEP_STEP]: base };\n}\n\n/**\n * Project a token set onto the shared kit's theme shape.\n *\n * Every value is carried into an addressable slot:\n * - `palette.primary` / `secondary` / `accent` — the brand scales.\n * - `palette.onBrand` — the primary's contrast partner. DERIVED from `primary`\n * via `resolveOnBrand` when the preset declares no {@link DesignTokens.onBrand},\n * so a pale brand gets dark ink instead of the white that used to be the\n * silent default (and which shipped a 2.14:1 button to production).\n * - `palette.surfaceMuted` — the mode's {@link ModeColors.surfaceMuted}.\n * - `semantic.*` — each status colour at `500`, its `*Bg` tint at `100`.\n *\n * @param tokens the app's token set\n * @param mode which mode block to project (default `'light'`)\n */\nexport function toUiTheme(tokens: DesignTokens, mode: UiThemeMode = 'light'): UiThemeConfig {\n const modeColors: ModeColors = mode === 'dark' ? tokens.dark : tokens.light;\n const { semantic } = tokens;\n return {\n colors: {\n background: modeColors.background,\n surface: modeColors.surface,\n surfaceElevated: modeColors.surfaceElevated,\n text: modeColors.text,\n textSecondary: modeColors.textSecondary,\n border: modeColors.border,\n },\n palette: {\n primary: flat(tokens.primary),\n secondary: flat(tokens.secondary),\n accent: flat(tokens.accent),\n [ON_BRAND_SCALE]: flat(resolveOnBrand(tokens.primary, tokens.onBrand)),\n [SURFACE_MUTED_SCALE]: flat(modeColors.surfaceMuted ?? modeColors.surface),\n },\n semantic: {\n error: tinted(semantic.error, semantic.errorBg),\n success: tinted(semantic.success, semantic.successBg),\n warning: tinted(semantic.warning, semantic.warningBg),\n info: tinted(semantic.info, semantic.infoBg),\n },\n };\n}\n","import type { DesignTokens } from '../types';\n\n/**\n * PROOViD AML console (Stack A — vanilla JS) tokens.\n *\n * Seeded byte-for-byte from `PROOViD/AMLService/AMLService/wwwroot/shared/ui.css`\n * `:root`. Emitting via `toCssVars(AML_TOKENS, AML_CSS_VAR_NAMES)` reproduces that\n * `:root` block exactly, so ui.css keeps working with zero visual change.\n *\n * Name-mapping notes (AML has no `TenantThemeConfig`-style secondary/accent or\n * light/dark toggle):\n * - `primary` = `--brand`. `secondary`/`accent` mirror it (ui.css reads neither);\n * they exist only so the core shape is complete.\n * - `semantic` mirrors the verdict palette (`--ok`/`--warn`/`--bad`); `info` has\n * no AML variable, so it mirrors `--brand`.\n * - `light` = the light workspace (`--bg`/`--surface`/…); `dark` = the dark app\n * SHELL (`--shell`/`--shell-2`/…) so the shape is complete. The AML name map\n * omits all `dark*` names, so no dark-mode block is emitted; the shell is\n * emitted from the `extensions.shell` group inside `:root`, matching ui.css.\n */\nexport const AML_TOKENS: DesignTokens = {\n primary: '#4f46e5',\n secondary: '#4f46e5',\n accent: '#4f46e5',\n\n semantic: {\n success: '#0c9d6c',\n warning: '#b9690a',\n error: '#d4302b',\n info: '#4f46e5',\n },\n\n light: {\n background: '#f4f6fa',\n surface: '#ffffff',\n surfaceElevated: '#f8fafc',\n text: '#0d1526',\n textSecondary: '#4a5567',\n border: '#e6e9f0',\n divider: '#e6e9f0',\n },\n\n dark: {\n background: '#0b1220',\n surface: '#111a2c',\n surfaceElevated: '#111a2c',\n text: '#e8edf6',\n textSecondary: '#95a3bb',\n border: 'rgba(255, 255, 255, .09)',\n divider: 'rgba(255, 255, 255, .09)',\n },\n\n typography: {\n fontFamily: '\"IBM Plex Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif',\n monoFamily: '\"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, monospace',\n headingScale: 1,\n },\n\n radii: {\n xs: '7px',\n sm: '9px',\n md: '12px',\n lg: '16px',\n pill: '999px',\n },\n\n shadows: {\n sm: '0 1px 2px rgba(13, 21, 38, .06)',\n md: '0 6px 20px -8px rgba(13, 21, 38, .14), 0 1px 2px rgba(13, 21, 38, .05)',\n pop: '0 24px 60px -16px rgba(13, 21, 38, .32)',\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'aml',\n },\n\n extensions: {\n shell: {\n background: '#0b1220',\n backgroundAlt: '#111a2c',\n line: 'rgba(255, 255, 255, .09)',\n on: '#e8edf6',\n onDim: '#95a3bb',\n },\n brand: {\n press: '#4035c9',\n soft: '#eef0fe',\n ring: 'rgba(79, 70, 229, .16)',\n },\n ink: {\n base: '#0d1526',\n soft: '#4a5567',\n faint: '#75839a',\n overlay: '#46506220',\n },\n workspace: {\n surfaceAlt: '#f8fafc',\n lineStrong: '#d7dce6',\n },\n verdict: {\n ok: '#0c9d6c',\n okSoft: '#e4f6ef',\n okInk: '#0a7a55',\n warn: '#b9690a',\n warnSoft: '#fcf1e3',\n warnInk: '#985608',\n bad: '#d4302b',\n badSoft: '#fcebea',\n badSoft2: '#fdecec',\n badInk: '#b21f1f',\n },\n },\n};\n","import type { DesignTokens } from '../types';\n\n/**\n * Digital Kin (Greek digital-literacy guide site) tokens.\n *\n * Seeded from the Figma `Typography & Colors Style Guide` (design spec §8): green\n * `#007E4A`, yellow `#FFAB00`, black, white. Unlike the aml/erevna/katalogos\n * presets — which were extracted byte-for-byte from an existing running app — this\n * preset is authored from the brand source, because the app does not exist yet.\n * That difference is not cosmetic: those presets must preserve their app's current\n * pixels, so their AA failures are frozen in `KNOWN_GAPS`. This one has no pixels\n * to preserve, so it is held to the floor the guard actually asks for wherever\n * that is arithmetically reachable (see `border` below).\n *\n * THE ACCENT IS A HIGHLIGHT, NOT A BUTTON COLOUR. `#FFAB00` is light: white text\n * on it measures 1.90:1, nowhere near the 4.5:1 AA floor. It carries stars,\n * focus rings, underlines and small ornaments, always with DARK ink on top\n * (`light.text` on it measures 9.81:1). `digitalkin.test.ts` asserts BOTH halves\n * of that, so \"just make the CTA yellow\" fails the build rather than shipping\n * unreadable.\n *\n * TYPOGRAPHY (spec D21): Geologica ONLY. It covers Greek, Latin, Cyrillic and\n * Vietnamese, and its `CRSV`/`SHRP` variable axes supply the display voice that\n * DynaPuff would otherwise have provided. DynaPuff has NO Greek glyphs at all, and\n * because browser font fallback is per-GLYPH rather than per-element, a heading\n * like \"Digital Kin — Ξεκινήστε εδώ\" would render the Latin half in DynaPuff and\n * the Greek half in an arbitrary system font, inside one element. It is therefore\n * deliberately absent from this file: it exists only inside `wordmark.svg`, whose\n * text is converted to vector paths and loads no font at all.\n *\n * Three deliberate divergences from the raw Figma palette, all for AA contrast on\n * an audience of older users who are frequently outdoors:\n * * `light.textSecondary` is `#5A5A5A` (6.41:1 on the `#F5F7F5` card, its worst\n * surface) rather than a mid grey. A muted grey that fails AA is the single\n * most common way a \"designed\" palette becomes unreadable, and this palette's\n * secondary text carries guide intros and difficulty labels.\n * * `border` is darker than a decorative hairline would be — `#7E8A80` (3.34:1\n * on white) and `#6B7D71` (3.40:1 on the raised dark surface) — so it clears\n * WCAG 1.4.11 as an INPUT OUTLINE. The other three presets have their light\n * borders registered as known gaps because darkening a live portal's hairlines\n * is a visual regression; this preset ships before any pixels exist, so it\n * takes the compliant value instead of inheriting the gap. `divider`, which\n * is decorative only and carries no contrast requirement, stays light.\n * * Dark-mode surfaces lift the green rather than reusing `#007E4A` as a\n * background, which would leave no room for readable text above it.\n *\n * ONE REGISTERED GAP — `dark.semantic.error`. `semantic.error` is a SINGLE token\n * rendered as text in BOTH modes, so one hex must clear 4.5:1 against white AND\n * against `#1E2A22`. Those requirements are mutually exclusive: AA on white caps\n * its relative luminance at 0.183, AA on the raised dark surface demands at least\n * 0.267. No colour satisfies both, so this is not a value that was chosen badly —\n * it needs a mode-aware split of the token, which is a shape change to\n * `SemanticColors` affecting all four presets. Registered in\n * `presets.contrast.test.ts` with its measured ratio, exactly like the identical\n * gap in erevna/katalogos/aml.\n */\nexport const DIGITALKIN_TOKENS: DesignTokens = {\n primary: '#007E4A',\n secondary: '#005532',\n accent: '#FFAB00',\n\n // White on the brand green measures 5.14:1 — AA for normal text, so filled\n // buttons carry white labels. Stated explicitly rather than leaning on the\n // consumer-side default, because a future primary tweak must re-prove it.\n onBrand: '#FFFFFF',\n\n semantic: {\n success: '#007E4A',\n warning: '#B26A00',\n error: '#B3261E',\n info: '#005532',\n },\n\n light: {\n background: '#FFFFFF',\n surface: '#F5F7F5',\n surfaceElevated: '#FFFFFF',\n text: '#101410',\n textSecondary: '#5A5A5A',\n border: '#7E8A80',\n divider: '#E5E9E5',\n surfaceMuted: '#EDF2ED',\n },\n\n dark: {\n background: '#0E1410',\n surface: '#16201A',\n surfaceElevated: '#1E2A22',\n text: '#F2F5F2',\n textSecondary: '#BFC7BF',\n border: '#6B7D71',\n divider: '#2C3A30',\n surfaceMuted: '#1A241D',\n },\n\n typography: {\n // Geologica Variable ships via @fontsource-variable/geologica on the public tier.\n fontFamily:\n \"'Geologica Variable', 'Geologica', system-ui, -apple-system, 'Segoe UI', sans-serif\",\n headingScale: 1,\n },\n\n radii: {\n xs: '4px',\n sm: '8px',\n md: '12px',\n lg: '20px',\n pill: '999px',\n },\n\n shadows: {\n sm: '0 1px 2px rgba(16, 20, 16, 0.06)',\n md: '0 2px 8px rgba(16, 20, 16, 0.08)',\n pop: '0 8px 24px rgba(16, 20, 16, 0.12)',\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'digitalkin',\n },\n};\n","import type { DesignTokens } from '../types';\n\n/**\n * Erevna (surveys/forms — realm `questioner`) tokens.\n *\n * Seeded byte-for-byte from `erevna-web/src/theme/presets/default.ts`\n * (`DEFAULT_THEME_CONFIG`) and `erevna-web/src/theme/utils/palette.ts`\n * (`basePalette`). No `typography`/`radii`/`shadows` — the RN theme has no\n * centralized tokens for those today, so they are omitted (nothing to emit →\n * zero visual change).\n *\n * ONE deliberate divergence from that seed (UX-11): `light.textSecondary` is\n * `#717171`, not the app's `#777777`. `#777777` measures 4.48:1 on `#ffffff` and\n * 4.18:1 on the `#f7f7f7` card surface — both under the WCAG AA 4.5:1 floor for\n * normal text, and form-field labels render in this colour. `#717171` measures\n * 4.88:1 and 4.56:1 against those same two surfaces. Do not \"restore\" it to\n * match the app; `presets.contrast.test.ts` will fail if you do. The app's own\n * local preset still carries `#777777` and needs the same fix separately.\n */\nexport const EREVNA_TOKENS: DesignTokens = {\n primary: '#005f73',\n secondary: '#94d2bd',\n accent: '#008d5c',\n\n semantic: {\n success: '#0a9396',\n warning: '#ee9b00',\n error: '#ae2012',\n info: '#005f73',\n },\n\n light: {\n background: '#ffffff',\n surface: '#f7f7f7',\n surfaceElevated: '#ffffff',\n text: '#001219',\n textSecondary: '#717171',\n border: '#e6e6e6',\n divider: '#e6e6e6',\n },\n\n dark: {\n background: '#001219',\n surface: '#052f33',\n surfaceElevated: '#073b40',\n text: '#e9d8a6',\n textSecondary: '#a8a090',\n border: '#053f40',\n divider: '#053f40',\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'default',\n },\n};\n","import type { DesignTokens } from '../types';\n\n/**\n * Katalogos (online menus — realm `onlinemenu`) tokens.\n *\n * Seeded byte-for-byte from `katalogos-web/src/theme/presets/default.ts`\n * (`DEFAULT_THEME_CONFIG`), which is currently identical to Erevna's default.\n * Kept as a separate preset so the two apps can diverge later without touching\n * the other.\n *\n * ONE deliberate divergence from that seed (UX-11): `light.textSecondary` is\n * `#717171`, not the app's `#777777`. `#777777` measures 4.48:1 on `#ffffff` and\n * 4.18:1 on the `#f7f7f7` card surface — both under the WCAG AA 4.5:1 floor for\n * normal text, and form-field labels render in this colour. `#717171` measures\n * 4.88:1 and 4.56:1 against those same two surfaces. Do not \"restore\" it to\n * match the app; `presets.contrast.test.ts` will fail if you do. The app's own\n * local preset still carries `#777777` and needs the same fix separately.\n */\nexport const KATALOGOS_TOKENS: DesignTokens = {\n primary: '#005f73',\n secondary: '#94d2bd',\n accent: '#008d5c',\n\n semantic: {\n success: '#0a9396',\n warning: '#ee9b00',\n error: '#ae2012',\n info: '#005f73',\n },\n\n light: {\n background: '#ffffff',\n surface: '#f7f7f7',\n surfaceElevated: '#ffffff',\n text: '#001219',\n textSecondary: '#717171',\n border: '#e6e6e6',\n divider: '#e6e6e6',\n },\n\n dark: {\n background: '#001219',\n surface: '#052f33',\n surfaceElevated: '#073b40',\n text: '#e9d8a6',\n textSecondary: '#a8a090',\n border: '#053f40',\n divider: '#053f40',\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'default',\n },\n};\n","import type { DesignTokens } from '../types';\n\n/**\n * NextGame (nextgame.dloizides.com) tokens — the consumer game-recommendation app.\n *\n * WHY THIS PALETTE, AND WHY NOT THE OBVIOUS ONE\n * ---------------------------------------------\n * NextGame renders game cards from PlayStation, Xbox, Nintendo and PC side by\n * side, so the app chrome has to be legible NEXT TO PlayStation blue (#0070D1),\n * Xbox green (#107C10) and Nintendo red (#E60012) without being read as an\n * endorsement of any of them. That rules out blue, green and red as the brand\n * primary — the three colours a games product reaches for first.\n *\n * What is left, and what this preset commits to, is the arcade marquee: a\n * SIGNAL AMBER primary (the \"this is the one to buy\" colour — the same amber a\n * trophy, a coin and a highlight reel use), a deep TEAL secondary as the calm\n * counterweight for structure and links, and an arcade MAGENTA accent for the\n * one thing per screen that must be looked at. None of the three sits within\n * 60 degrees of a console brand hue, so a platform badge never blends into the\n * chrome.\n *\n * The grounds are WARM: a paper-toned light mode (#FBF7F0) and a warm near-black\n * dark mode (#12100E) rather than the cold blue-grey every dashboard ships. It\n * is the cheapest single decision that stops a consumer product reading as an\n * internal tool.\n *\n * Explicitly NOT used: the violet/indigo ramp, which is both the estate's banned\n * AI default and, on a store page, indistinguishable from a dozen launcher UIs.\n *\n * ACCESSIBILITY. Both borders are authored to clear WCAG 1.4.11 (3:1) rather\n * than inheriting the older presets' registered gaps — a preset that ships\n * before the app has pixels has no regression to protect. `semantic.error` is\n * tuned for the LIGHT surfaces and registers the usual dark-mode gap: one hex\n * cannot serve error-as-text in both modes, and that is a token split, not a\n * colour nudge.\n */\nexport const NEXTGAME_TOKENS: DesignTokens = {\n /** Signal amber — the recommendation/buy colour. */\n primary: '#FF8C1A',\n /** Deep teal — structure, links, the calm counterweight. */\n secondary: '#0E7C86',\n /** Arcade magenta — one call-out per screen, never a surface fill. */\n accent: '#F5008B',\n\n semantic: {\n success: '#0E9E6E',\n warning: '#B26A00',\n error: '#C0281C',\n info: '#0E7C86',\n successBg: '#E3F6EE',\n warningBg: '#FBF0DE',\n errorBg: '#FBE9E6',\n infoBg: '#E2F1F3',\n },\n\n light: {\n background: '#FBF7F0',\n surface: '#FFFFFF',\n surfaceElevated: '#FFFDF8',\n surfaceMuted: '#F3EDE3',\n text: '#191410',\n textSecondary: '#5A5047',\n border: '#8A7F72',\n divider: '#E3D9CB',\n },\n\n dark: {\n background: '#12100E',\n surface: '#1B1815',\n surfaceElevated: '#241F1B',\n surfaceMuted: '#171412',\n text: '#F5EFE6',\n textSecondary: '#B3A79A',\n border: '#7A6F63',\n divider: '#332C26',\n },\n\n typography: {\n fontFamily: '\"Space Grotesk\", \"Segoe UI\", -apple-system, BlinkMacSystemFont, sans-serif',\n monoFamily: '\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, monospace',\n headingScale: 1.1,\n },\n\n radii: {\n xs: '6px',\n sm: '10px',\n md: '14px',\n lg: '22px',\n pill: '999px',\n },\n\n shadows: {\n sm: '0 1px 2px rgba(18, 16, 14, .08)',\n md: '0 8px 24px -10px rgba(18, 16, 14, .22), 0 1px 2px rgba(18, 16, 14, .06)',\n pop: '0 28px 64px -18px rgba(18, 16, 14, .42)',\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'nextgame',\n },\n};\n","import type { DesignTokens } from '../types';\r\n\r\nimport { AML_TOKENS } from './aml';\r\nimport { DIGITALKIN_TOKENS } from './digitalkin';\r\nimport { EREVNA_TOKENS } from './erevna';\r\nimport { KATALOGOS_TOKENS } from './katalogos';\r\nimport { NEXTGAME_TOKENS } from './nextgame';\r\n\r\nexport { AML_TOKENS } from './aml';\r\nexport { DIGITALKIN_TOKENS } from './digitalkin';\r\nexport { EREVNA_TOKENS } from './erevna';\r\nexport { KATALOGOS_TOKENS } from './katalogos';\r\nexport { NEXTGAME_TOKENS } from './nextgame';\r\n\r\n/** Every shipped app preset keyed by app slug. */\r\nexport const PRESETS: Readonly<Record<string, DesignTokens>> = {\r\n aml: AML_TOKENS,\r\n erevna: EREVNA_TOKENS,\r\n katalogos: KATALOGOS_TOKENS,\r\n digitalkin: DIGITALKIN_TOKENS,\r\n nextgame: NEXTGAME_TOKENS,\r\n};\r\n","/**\n * FINREG module colour tokens (task R-01; rebranded to the OFFICIAL palette).\n *\n * FINREG's logo binds a colour to each of the three product modules — Payments,\n * Accounting, CRM — so colour reads as module identity, not as one app's brand\n * primary. Those three base hexes are sampled VERBATIM from the FINAL brand logo\n * (`zygos/finalLogo/`, the three neon orbits): `#3fe0d0` teal (payments) /\n * `#f0489a` pink (accounting) / `#8a7bf5` indigo (crm). They are the\n * single-source-of-truth brand palette and are pinned by `finregModules.test.ts`.\n * (They replace the earlier `#52E2F2` / `#F266CD` / `#7997F2` trio, which was\n * close but not exactly the shipped logo — the palette now MATCHES the logo.)\n *\n * Each module also carries an `onWhite` companion. The base fills are light — a\n * cyan orbit at 1.55:1 on white cannot be read as text — so a badge, a table\n * cell, a nav label or any icon that paints a module colour on a white surface\n * needs a darkened variant that clears the WCAG AA 4.5:1 floor. The `onWhite`\n * hexes were DERIVED, not eyeballed: each is the lightest shade of the same hue\n * (HSL lightness reduced, hue+saturation held) that still measures at least\n * 4.5:1 on `#FFFFFF` under the WCAG 2.1 maths in `contrast.ts`, then carried a\n * little past the floor so sub-pixel rendering and rounding cannot drop it under.\n * The exact measured ratios are asserted in the test, so a future edit that\n * lightens one below AA fails the build rather than shipping an unreadable label.\n *\n * The navy surfaces (`FINREG_SURFACE_COLORS`) are the official dark grounds — the\n * hero band / logo field top (`#0C2240`) and the deepest closing/footer band /\n * logo field bottom (`#071526`). They are exported so consumers stop hardcoding\n * the dark-band literals.\n *\n * This is the SOURCE of these hexes. Consuming apps read `FINREG_MODULE_COLORS`\n * and `FINREG_SURFACE_COLORS`; they must not re-declare the literals, which is\n * the whole point of the `no-raw-color-literal` rule the consumers are bound by.\n */\nimport type { FinregModuleColors, FinregSurfaceColors } from './types';\n\nexport const FINREG_MODULE_COLORS: FinregModuleColors = {\n payments: {\n // teal — 1.64:1 on white (fill only); onWhite 4.74:1\n base: '#3fe0d0',\n onWhite: '#158176',\n },\n accounting: {\n // pink — 3.44:1 on white (fill only); onWhite 4.71:1\n base: '#f0489a',\n onWhite: '#de1276',\n },\n crm: {\n // indigo — 3.37:1 on white (fill only); onWhite 4.77:1\n base: '#8a7bf5',\n onWhite: '#6d5af3',\n },\n};\n\n/**\n * FINREG's official dark brand surfaces — the navy grounds the logo field and the\n * dark marketing bands are painted on. `surface` is the hero/dark-section band and\n * the logo field top; `deepest` is the footer/closing band, the darkest body ink,\n * and the logo field bottom. Bright module colours (esp. Payments cyan) are the\n * AA-safe accents ON these grounds — cyan `#52E2F2` on `#0C2240` measures ~9.6:1.\n */\nexport const FINREG_SURFACE_COLORS: FinregSurfaceColors = {\n // primary dark surface — hero band, dark sections, logo field top\n surface: '#0C2240',\n // darkest surface — footer/closing band, body-text ink, logo field bottom\n deepest: '#071526',\n};\n"]}
1
+ {"version":3,"sources":["../src/motion.ts","../src/varNames.ts","../src/contrast.ts","../src/onBrand.ts","../src/emit/toCssVars.ts","../src/emit/toRnTheme.ts","../src/emit/toTailwindPreset.ts","../src/emit/toUiTheme.ts","../src/presets/aml.ts","../src/presets/digitalkin.ts","../src/presets/erevna.ts","../src/presets/katalogos.ts","../src/presets/nextgame.ts","../src/presets/index.ts","../src/finregModules.ts"],"names":[],"mappings":";;;AAaA,IAAM,gBAAA,GAAmB,CAAA;AACzB,IAAM,aAAA,GAAgB,GAAA;AACtB,IAAM,aAAA,GAAgB,GAAA;AACtB,IAAM,aAAA,GAAgB,GAAA;AAEf,IAAM,cAAA,GAAyB;AAAA,EACpC,SAAA,EAAW;AAAA,IACT,OAAA,EAAS,gBAAA;AAAA,IACT,IAAA,EAAM,aAAA;AAAA,IACN,IAAA,EAAM,aAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,OAAA,EAAS;AAAA;AAAA,IAEP,QAAA,EAAU;AAAA,MACR,GAAA,EAAK,yBAAA;AAAA,MACL,MAAA,EAAQ,CAAC,GAAA,EAAK,CAAA,EAAG,GAAG,CAAC;AAAA,KACvB;AAAA;AAAA,IAEA,UAAA,EAAY;AAAA,MACV,GAAA,EAAK,uBAAA;AAAA,MACL,MAAA,EAAQ,CAAC,CAAA,EAAG,CAAA,EAAG,GAAG,CAAC;AAAA,KACrB;AAAA;AAAA,IAEA,UAAA,EAAY;AAAA,MACV,GAAA,EAAK,yBAAA;AAAA,MACL,MAAA,EAAQ,CAAC,GAAA,EAAK,CAAA,EAAG,GAAG,CAAC;AAAA;AACvB;AAEJ;;;AC6DO,IAAM,qBAAA,GAAqC;AAAA,EAChD,OAAA,EAAS,WAAA;AAAA,EACT,SAAA,EAAW,aAAA;AAAA,EACX,MAAA,EAAQ,UAAA;AAAA,EACR,OAAA,EAAS,YAAA;AAAA,EACT,OAAA,EAAS,WAAA;AAAA,EACT,OAAA,EAAS,WAAA;AAAA,EACT,KAAA,EAAO,SAAA;AAAA,E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AA,EAAS;AACX","file":"index.js","sourcesContent":["/**\n * The default {@link Motion} token set — durations + easings shared by every app.\n *\n * Motion is app-agnostic: the same durations and Material-like curves fit every\n * portal, so unlike colour there is ONE shipped default rather than one per preset.\n * `@dloizides/ui-motion` reads this to build its RN `Easing.bezier(...)` map, and a\n * web/CSS consumer can read the `.css` timing-function strings directly.\n *\n * Values only. No RN/`Animated` imports — this package stays framework-agnostic.\n */\nimport type { Motion } from './types';\n\n/** Durations in ms. `instant` (0) is the reduced-motion collapse target. */\nconst DURATION_INSTANT = 0;\nconst DURATION_FAST = 140;\nconst DURATION_BASE = 200;\nconst DURATION_SLOW = 300;\n\nexport const DEFAULT_MOTION: Motion = {\n durations: {\n instant: DURATION_INSTANT,\n fast: DURATION_FAST,\n base: DURATION_BASE,\n slow: DURATION_SLOW,\n },\n easings: {\n // Symmetric ease for on-screen moves that stay on screen.\n standard: {\n css: 'cubic-bezier(0.2,0,0,1)',\n bezier: [0.2, 0, 0, 1],\n },\n // Fast-in / soft-stop for elements ENTERING the screen.\n decelerate: {\n css: 'cubic-bezier(0,0,0,1)',\n bezier: [0, 0, 0, 1],\n },\n // Soft-start / fast-out for elements LEAVING the screen.\n accelerate: {\n css: 'cubic-bezier(0.3,0,1,1)',\n bezier: [0.3, 0, 1, 1],\n },\n },\n};\n","/**\n * CSS custom-property NAME MAPS — the cross-stack naming contract.\n *\n * `toCssVars(tokens, names)` reads a {@link DesignTokens} and a {@link CssVarNames}\n * map that says which CSS variable each token field is emitted as. A field whose\n * name is `undefined` in the map is skipped, which lets a stack emit only the\n * variables it actually consumes.\n *\n * Two maps ship:\n * - {@link DEFAULT_CSS_VAR_NAMES} — canonical kebab names (`--primary`, `--bg`, …).\n * The dark-mode fields have names, so a dark-mode block is emitted.\n * - {@link AML_CSS_VAR_NAMES} — the vanilla-JS AML console's existing variable\n * names (`--brand`, `--shell`, `--ok`, `--r`, …), so `wwwroot/shared/ui.css`\n * keeps working byte-for-byte. Core fields that AML expresses via an extension\n * variable are mapped to `undefined` (skipped) to avoid emitting duplicates,\n * and the dark-mode fields are `undefined` (AML has no light/dark toggle — its\n * dark app-shell is captured in the `shell*` extension inside `:root`).\n */\n\n/** Maps each {@link DesignTokens} field to the CSS variable it is emitted as (or `undefined` to skip). */\nexport interface CssVarNames {\n // brand\n primary?: string;\n secondary?: string;\n accent?: string;\n onBrand?: string;\n // semantic\n success?: string;\n warning?: string;\n error?: string;\n info?: string;\n // semantic background tints\n successBg?: string;\n warningBg?: string;\n errorBg?: string;\n infoBg?: string;\n // light-mode colours (emitted in :root)\n lightBackground?: string;\n lightSurface?: string;\n lightSurfaceElevated?: string;\n lightSurfaceMuted?: string;\n lightText?: string;\n lightTextSecondary?: string;\n lightBorder?: string;\n lightDivider?: string;\n // dark-mode colours (emitted in the dark selector block; omit all to skip the block)\n darkBackground?: string;\n darkSurface?: string;\n darkSurfaceElevated?: string;\n darkSurfaceMuted?: string;\n darkText?: string;\n darkTextSecondary?: string;\n darkBorder?: string;\n darkDivider?: string;\n // radii\n radiusXs?: string;\n radiusSm?: string;\n radiusMd?: string;\n radiusLg?: string;\n radiusPill?: string;\n // shadows\n shadowSm?: string;\n shadowMd?: string;\n shadowPop?: string;\n // fonts\n fontFamily?: string;\n monoFamily?: string;\n // extensions — shell\n shellBackground?: string;\n shellBackgroundAlt?: string;\n shellLine?: string;\n shellOn?: string;\n shellOnDim?: string;\n // extensions — brand extras\n brandPress?: string;\n brandSoft?: string;\n brandRing?: string;\n // extensions — ink scale\n inkBase?: string;\n inkSoft?: string;\n inkFaint?: string;\n inkOverlay?: string;\n // extensions — workspace extras\n surfaceAlt?: string;\n lineStrong?: string;\n // extensions — verdict palette\n ok?: string;\n okSoft?: string;\n okInk?: string;\n warn?: string;\n warnSoft?: string;\n warnInk?: string;\n bad?: string;\n badSoft?: string;\n badSoft2?: string;\n badInk?: string;\n}\n\n/**\n * Canonical kebab-case variable names. A stack with no existing CSS-variable\n * convention (or a fresh consumer) should adopt these. Extension fields are\n * omitted because the RN/DOM presets carry no extensions.\n */\nexport const DEFAULT_CSS_VAR_NAMES: CssVarNames = {\n primary: '--primary',\n secondary: '--secondary',\n accent: '--accent',\n onBrand: '--on-brand',\n success: '--success',\n warning: '--warning',\n error: '--error',\n info: '--info',\n successBg: '--success-bg',\n warningBg: '--warning-bg',\n errorBg: '--error-bg',\n infoBg: '--info-bg',\n lightBackground: '--background',\n lightSurface: '--surface',\n lightSurfaceElevated: '--surface-elevated',\n lightSurfaceMuted: '--surface-muted',\n lightText: '--text',\n lightTextSecondary: '--text-secondary',\n lightBorder: '--border',\n lightDivider: '--divider',\n darkBackground: '--background',\n darkSurface: '--surface',\n darkSurfaceElevated: '--surface-elevated',\n darkSurfaceMuted: '--surface-muted',\n darkText: '--text',\n darkTextSecondary: '--text-secondary',\n darkBorder: '--border',\n darkDivider: '--divider',\n radiusXs: '--radius-xs',\n radiusSm: '--radius-sm',\n radiusMd: '--radius',\n radiusLg: '--radius-lg',\n radiusPill: '--radius-pill',\n shadowSm: '--shadow-sm',\n shadowMd: '--shadow',\n shadowPop: '--shadow-pop',\n fontFamily: '--font',\n monoFamily: '--font-mono',\n};\n\n/**\n * The AML console's existing `wwwroot/shared/ui.css` variable names. Emitting the\n * `aml` preset with this map reproduces AML's current `:root` byte-for-byte, so\n * ui.css keeps working with zero visual change.\n *\n * Core fields that AML already expresses through an extension variable are mapped\n * to `undefined` to avoid duplicate declarations:\n * - `secondary`/`accent` — AML has a single brand; ui.css never reads them.\n * - `success`/`warning`/`error`/`info` — emitted via the verdict extension\n * (`--ok`/`--warn`/`--bad`); `info` has no AML variable.\n * - `light.surfaceElevated` → via `workspace.surfaceAlt` (`--surface-2`).\n * - `light.text` → via `ink.base` (`--ink`); `light.textSecondary` → `ink.soft`.\n * - `light.divider` — AML reuses `--line`, so no separate variable.\n * - all `dark*` — AML has no dark-mode toggle (its shell lives in the extension).\n */\nexport const AML_CSS_VAR_NAMES: CssVarNames = {\n primary: '--brand',\n // secondary/accent intentionally omitted (single-brand console)\n // semantic emitted via verdict extension; info has no AML variable\n lightBackground: '--bg',\n lightSurface: '--surface',\n // lightSurfaceElevated via workspace.surfaceAlt (--surface-2)\n // lightText via ink.base (--ink); lightTextSecondary via ink.soft (--ink-soft)\n lightBorder: '--line',\n // lightDivider reuses --line\n // dark* omitted (no dark-mode toggle)\n radiusXs: '--r-xs',\n radiusSm: '--r-sm',\n radiusMd: '--r',\n radiusLg: '--r-lg',\n radiusPill: '--r-pill',\n shadowSm: '--sh-1',\n shadowMd: '--sh-2',\n shadowPop: '--sh-pop',\n fontFamily: '--font',\n monoFamily: '--mono',\n shellBackground: '--shell',\n shellBackgroundAlt: '--shell-2',\n shellLine: '--shell-line',\n shellOn: '--on-shell',\n shellOnDim: '--on-shell-dim',\n brandPress: '--brand-press',\n brandSoft: '--brand-soft',\n brandRing: '--brand-ring',\n inkBase: '--ink',\n inkSoft: '--ink-soft',\n inkFaint: '--ink-faint',\n inkOverlay: '--ink-2',\n surfaceAlt: '--surface-2',\n lineStrong: '--line-strong',\n ok: '--ok',\n okSoft: '--ok-soft',\n okInk: '--ok-ink',\n warn: '--warn',\n warnSoft: '--warn-soft',\n warnInk: '--warn-ink',\n bad: '--bad',\n badSoft: '--bad-soft',\n badSoft2: '--bad-soft2',\n badInk: '--bad-ink',\n};\n","/**\n * WCAG 2.1 contrast-ratio maths.\n *\n * Exists so every packaged preset can be *proved* accessible instead of\n * eyeballed. `presets/presets.contrast.test.ts` uses it as a permanent guard:\n * any future edit to a text-role colour that drops it under the AA floor fails\n * the build.\n *\n * This is a deliberate COPY of the same function in `@dloizides/theme-web`, not\n * an import. `@dloizides/design-tokens` ships zero dependencies and zero peers\n * by design — it is framework-agnostic values only — so taking a dependency on\n * a React theming package to borrow ~60 lines of pure arithmetic would invert\n * the layering (theme-web already depends on this package). The duplication is\n * bounded, pure, and pinned by `contrast.test.ts` against external reference\n * pairs, so the two copies cannot silently disagree.\n *\n * The relative-luminance formula is the real one from WCAG 2.1 §\"relative\n * luminance\" — sRGB channels are linearized through the gamma transfer function\n * before the ITU-R BT.709 weighting. A naive channel average (or an HSL\n * lightness comparison) is NOT equivalent and will silently pass colours that\n * fail in a browser, which is exactly how `#777777` shipped at 4.48:1.\n *\n * @see https://www.w3.org/TR/WCAG21/#dfn-relative-luminance\n * @see https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio\n */\n\n/** WCAG 1.4.3 Contrast (Minimum), AA, normal-size text. */\nexport const AA_NORMAL_TEXT_RATIO = 4.5;\n/** WCAG 1.4.3 AA for large text (>=18.66px bold, or >=24px). */\nexport const AA_LARGE_TEXT_RATIO = 3;\n/** WCAG 1.4.11 Non-text Contrast — UI-component boundaries and graphical objects. */\nexport const AA_NON_TEXT_RATIO = 3;\n\nconst SRGB_CHANNEL_MAX = 255;\nconst GAMMA_LINEAR_THRESHOLD = 0.03928;\nconst GAMMA_LINEAR_DIVISOR = 12.92;\nconst GAMMA_OFFSET = 0.055;\nconst GAMMA_DIVISOR = 1.055;\nconst GAMMA_EXPONENT = 2.4;\n\n// ITU-R BT.709 luma coefficients, per the WCAG relative-luminance definition.\nconst LUMA_COEFFICIENT_RED = 0.2126;\nconst LUMA_COEFFICIENT_GREEN = 0.7152;\nconst LUMA_COEFFICIENT_BLUE = 0.0722;\n\n/** The +0.05 flare constant in the WCAG contrast-ratio formula. */\nconst CONTRAST_FLARE = 0.05;\n\nconst HEX_RADIX = 16;\nconst HEX_PAIR_LENGTH = 2;\nconst HEX_SHORTHAND_LENGTH = 3;\nconst HEX_FULL_LENGTH = 6;\nconst CHANNEL_OFFSET_RED = 0;\nconst CHANNEL_OFFSET_GREEN = 2;\nconst CHANNEL_OFFSET_BLUE = 4;\n\n/** Strip `#` and expand `#abc` to `aabbcc`, so both notations parse identically. */\nfunction normalizeHexDigits(hex: string): string {\n const clean = hex.trim().replace('#', '').toLowerCase();\n if (clean.length === HEX_SHORTHAND_LENGTH) {\n return `${clean[0] ?? ''}${clean[0] ?? ''}${clean[1] ?? ''}${clean[1] ?? ''}${clean[2] ?? ''}${clean[2] ?? ''}`;\n }\n return clean;\n}\n\nfunction parseChannel(digits: string, offset: number): number {\n const pair = digits.slice(offset, offset + HEX_PAIR_LENGTH);\n return parseInt(pair, HEX_RADIX) / SRGB_CHANNEL_MAX;\n}\n\n/** Undo the sRGB gamma transfer function for one 0-1 channel. */\nfunction linearizeChannel(channel: number): number {\n if (channel <= GAMMA_LINEAR_THRESHOLD) {\n return channel / GAMMA_LINEAR_DIVISOR;\n }\n return Math.pow((channel + GAMMA_OFFSET) / GAMMA_DIVISOR, GAMMA_EXPONENT);\n}\n\n/**\n * True when `value` is an `#rgb` / `#rrggbb` colour this module can score.\n *\n * Tokens may legitimately hold `rgba()` (AML's dark border is a white overlay),\n * which has no fixed luminance without knowing the backdrop. The guard uses this\n * to EXCLUDE such values explicitly rather than let them throw or, worse, be\n * silently skipped.\n */\nexport function isHexColor(value: string): boolean {\n const digits = normalizeHexDigits(value);\n return digits.length === HEX_FULL_LENGTH && /^[0-9a-f]{6}$/.test(digits);\n}\n\n/**\n * WCAG relative luminance (0 = black, 1 = white) of an `#rgb` / `#rrggbb` colour.\n *\n * @throws if the value is not a parseable hex colour — a typo must be loud, not\n * silently scored as black (which would make every ratio look compliant).\n */\nexport function relativeLuminance(hex: string): number {\n if (!isHexColor(hex)) {\n throw new Error(`relativeLuminance: not a hex colour: ${hex}`);\n }\n const digits = normalizeHexDigits(hex);\n\n const red = linearizeChannel(parseChannel(digits, CHANNEL_OFFSET_RED));\n const green = linearizeChannel(parseChannel(digits, CHANNEL_OFFSET_GREEN));\n const blue = linearizeChannel(parseChannel(digits, CHANNEL_OFFSET_BLUE));\n\n return (\n LUMA_COEFFICIENT_RED * red +\n LUMA_COEFFICIENT_GREEN * green +\n LUMA_COEFFICIENT_BLUE * blue\n );\n}\n\n/**\n * WCAG contrast ratio between two colours, in the range 1 (identical) to 21\n * (black on white). Order-independent.\n */\nexport function contrastRatio(foreground: string, background: string): number {\n const first = relativeLuminance(foreground);\n const second = relativeLuminance(background);\n const lighter = Math.max(first, second);\n const darker = Math.min(first, second);\n return (lighter + CONTRAST_FLARE) / (darker + CONTRAST_FLARE);\n}\n\n/** True when `foreground` on `background` meets `requiredRatio`. */\nexport function meetsContrast(\n foreground: string,\n background: string,\n requiredRatio: number,\n): boolean {\n return contrastRatio(foreground, background) >= requiredRatio;\n}\n","/**\n * DERIVE the foreground that sits on a brand-filled surface, instead of\n * defaulting it to white.\n *\n * WHY THIS EXISTS\n * ---------------\n * This package already shipped the WCAG maths (`contrast.ts`) and an optional\n * `onBrand` slot, and it still shipped a live AA failure: white on `#38bdf8` at\n * **2.14:1** on a production primary button. The slot was optional *with a white\n * default*, so the safe path required opting in and the default was the failing\n * one. An optional safety feature with an unsafe default is not a safety\n * feature — it is a trap that reads as protection in review.\n *\n * The same pair was then hand-patched five separate times across the codebase\n * (three IdentityService controllers, one of them inside a verification EMAIL\n * where CSS cannot be patched after sending, plus `wwwroot/signin/`). One of\n * those patches carries the comment \"See AccountController for the same pair\" —\n * a code comment doing a shared token's job. That is the recurrence this module\n * ends: the correct value is now what you get by doing nothing.\n *\n * WHY DERIVATION AND NOT A REQUIRED FIELD\n * ---------------------------------------\n * Making `onBrand` required would be a compile-time break for every consumer and\n * every preset author on a published, adopted interface — and it would push the\n * decision back onto exactly the caller who already got it wrong five times.\n * Derivation is non-breaking, and it fixes the DEFAULT, which is where the\n * defect actually lives. The explicit slot is kept (see `explicit` below) so an\n * author who has a considered brand ink can still state it; it is honoured, and\n * the preset guard measures it rather than trusting it.\n *\n * THE TWO CANDIDATE INKS\n * ----------------------\n * A brand fill in this system is always either light enough to want dark ink or\n * dark enough to want light ink, so two candidates cover the space:\n * measured against `#38bdf8`, dark ink scores **8.83:1** where white scores\n * 2.14:1. Note that even the \"deep\" brand blue `#0284c7` fails with white\n * (4.10:1) — picking a darker brand is NOT a reliable fix, which is why the\n * FOREGROUND has to be the derived half of the pair.\n */\nimport { AA_NORMAL_TEXT_RATIO, contrastRatio, isHexColor } from './contrast';\n\n/**\n * Light ink for a dark/saturated brand fill. Also the last-resort value when the\n * brand colour is not a measurable hex (see {@link resolveOnBrand}).\n */\nexport const ON_BRAND_LIGHT_INK = '#ffffff';\n\n/**\n * Dark ink for a pale brand fill.\n *\n * Not pure black: a near-black navy carries the brand's own hue, so a pale-blue\n * button reads as designed rather than as a default. Measured 8.83:1 on\n * `#38bdf8` and 9.98:1 on `#FFAB00`.\n */\nexport const ON_BRAND_DARK_INK = '#03121f';\n\n/**\n * The best available foreground for content sitting ON `background`.\n *\n * Resolution order:\n * 1. `explicit` — an author's stated brand ink is honoured as given. It is NOT\n * silently replaced, because overriding a deliberate design decision behind\n * the author's back is its own class of bug; the preset contrast guard\n * measures it instead, so a bad explicit value fails CI rather than shipping.\n * 2. A non-hex `background` (e.g. `rgba()`) has no fixed luminance without\n * knowing what it composites over, so no ratio can be computed. Returns\n * {@link ON_BRAND_LIGHT_INK} as an unavoidable last resort — documented and\n * pinned by a test, rather than being the unexamined default for everything.\n * 3. Otherwise the higher-contrast of the two candidate inks, measured with the\n * WCAG 2.1 maths in `contrast.ts`.\n *\n * Exported from the package root so consumers that let USERS supply a brand\n * colour at runtime (per-tenant branding endpoints) can derive the matching\n * foreground with the same maths that guards the shipped presets — the runtime\n * path is how an AA failure re-enters a codebase whose static presets all pass.\n */\nexport function resolveOnBrand(background: string, explicit?: string): string {\n if (explicit !== undefined) {\n return explicit;\n }\n if (!isHexColor(background)) {\n return ON_BRAND_LIGHT_INK;\n }\n const lightRatio = contrastRatio(ON_BRAND_LIGHT_INK, background);\n const darkRatio = contrastRatio(ON_BRAND_DARK_INK, background);\n return darkRatio > lightRatio ? ON_BRAND_DARK_INK : ON_BRAND_LIGHT_INK;\n}\n\n/**\n * The contrast ratio the derived foreground achieves on `background`, or `null`\n * when `background` is not measurable.\n *\n * Exists so a consumer can ASSERT the pair rather than assume it. Some brand\n * colours cannot carry an AA foreground in either direction — `#008d5c` peaks at\n * 4.47:1 against its best ink — and the only honest answer there is the number,\n * not a boolean that rounds a near-miss up to \"compliant\".\n */\nexport function onBrandRatio(background: string, explicit?: string): number | null {\n if (!isHexColor(background)) {\n return null;\n }\n const foreground = resolveOnBrand(background, explicit);\n if (!isHexColor(foreground)) {\n return null;\n }\n return contrastRatio(foreground, background);\n}\n\n/**\n * True when `background` can carry an AA-passing foreground at all.\n *\n * A brand colour in the mid-luminance band fails against BOTH inks. Such a\n * colour is not fixable by choosing a better foreground — it needs the fill\n * itself to move — so this distinguishes \"we picked the wrong ink\" from \"no ink\n * works\", which are different bugs with different owners.\n */\nexport function canCarryAccessibleInk(background: string): boolean {\n const ratio = onBrandRatio(background);\n return ratio !== null && ratio >= AA_NORMAL_TEXT_RATIO;\n}\n","import { resolveOnBrand } from '../onBrand';\nimport type { DesignTokens } from '../types';\nimport type { CssVarNames } from '../varNames';\n\n/** Options for {@link toCssVars}. */\nexport interface ToCssVarsOptions {\n /**\n * Selector for the dark-mode block. Only used when the name map defines any\n * `dark*` variables. Defaults to `:root[data-theme=\"dark\"]`.\n */\n darkSelector?: string;\n}\n\nconst INDENT = ' ';\nconst DEFAULT_DARK_SELECTOR = ':root[data-theme=\"dark\"]';\n\n/** A single ` --name: value;` line, or `null` when the name or value is absent. */\nfunction declaration(name: string | undefined, value: string | undefined): string | null {\n if (name === undefined || value === undefined) {\n return null;\n }\n return `${INDENT}${name}: ${value};`;\n}\n\nfunction isLine(entry: string | null): entry is string {\n return entry !== null;\n}\n\nfunction block(selector: string, lines: readonly string[]): string {\n return `${selector} {\\n${lines.join('\\n')}\\n}`;\n}\n\n/**\n * Emit a {@link DesignTokens} as CSS custom properties. Base tokens (brand,\n * semantic, light-mode, radii, shadows, fonts and any extensions) go in a\n * `:root {}` block; dark-mode tokens go in a separate selector block, emitted\n * only when the name map defines at least one `dark*` variable.\n */\nexport function toCssVars(\n tokens: DesignTokens,\n names: CssVarNames,\n options?: ToCssVarsOptions,\n): string {\n const ext = tokens.extensions;\n const baseEntries: Array<string | null> = [\n declaration(names.primary, tokens.primary),\n declaration(names.secondary, tokens.secondary),\n declaration(names.accent, tokens.accent),\n // Always emitted (when the name map asks for it), never skipped: a missing\n // `--on-brand` sends the stylesheet to its own hardcoded fallback, which is\n // how white-on-pale-brand reached production in the first place.\n declaration(names.onBrand, resolveOnBrand(tokens.primary, tokens.onBrand)),\n declaration(names.success, tokens.semantic.success),\n declaration(names.warning, tokens.semantic.warning),\n declaration(names.error, tokens.semantic.error),\n declaration(names.info, tokens.semantic.info),\n declaration(names.successBg, tokens.semantic.successBg),\n declaration(names.warningBg, tokens.semantic.warningBg),\n declaration(names.errorBg, tokens.semantic.errorBg),\n declaration(names.infoBg, tokens.semantic.infoBg),\n declaration(names.lightBackground, tokens.light.background),\n declaration(names.lightSurface, tokens.light.surface),\n declaration(names.lightSurfaceElevated, tokens.light.surfaceElevated),\n declaration(names.lightSurfaceMuted, tokens.light.surfaceMuted),\n declaration(names.lightText, tokens.light.text),\n declaration(names.lightTextSecondary, tokens.light.textSecondary),\n declaration(names.lightBorder, tokens.light.border),\n declaration(names.lightDivider, tokens.light.divider),\n declaration(names.radiusXs, tokens.radii?.xs),\n declaration(names.radiusSm, tokens.radii?.sm),\n declaration(names.radiusMd, tokens.radii?.md),\n declaration(names.radiusLg, tokens.radii?.lg),\n declaration(names.radiusPill, tokens.radii?.pill),\n declaration(names.shadowSm, tokens.shadows?.sm),\n declaration(names.shadowMd, tokens.shadows?.md),\n declaration(names.shadowPop, tokens.shadows?.pop),\n declaration(names.fontFamily, tokens.typography?.fontFamily),\n declaration(names.monoFamily, tokens.typography?.monoFamily),\n declaration(names.shellBackground, ext?.shell?.background),\n declaration(names.shellBackgroundAlt, ext?.shell?.backgroundAlt),\n declaration(names.shellLine, ext?.shell?.line),\n declaration(names.shellOn, ext?.shell?.on),\n declaration(names.shellOnDim, ext?.shell?.onDim),\n declaration(names.brandPress, ext?.brand?.press),\n declaration(names.brandSoft, ext?.brand?.soft),\n declaration(names.brandRing, ext?.brand?.ring),\n declaration(names.inkBase, ext?.ink?.base),\n declaration(names.inkSoft, ext?.ink?.soft),\n declaration(names.inkFaint, ext?.ink?.faint),\n declaration(names.inkOverlay, ext?.ink?.overlay),\n declaration(names.surfaceAlt, ext?.workspace?.surfaceAlt),\n declaration(names.lineStrong, ext?.workspace?.lineStrong),\n declaration(names.ok, ext?.verdict?.ok),\n declaration(names.okSoft, ext?.verdict?.okSoft),\n declaration(names.okInk, ext?.verdict?.okInk),\n declaration(names.warn, ext?.verdict?.warn),\n declaration(names.warnSoft, ext?.verdict?.warnSoft),\n declaration(names.warnInk, ext?.verdict?.warnInk),\n declaration(names.bad, ext?.verdict?.bad),\n declaration(names.badSoft, ext?.verdict?.badSoft),\n declaration(names.badSoft2, ext?.verdict?.badSoft2),\n declaration(names.badInk, ext?.verdict?.badInk),\n ];\n const baseBlock = block(':root', baseEntries.filter(isLine));\n\n const darkEntries: Array<string | null> = [\n declaration(names.darkBackground, tokens.dark.background),\n declaration(names.darkSurface, tokens.dark.surface),\n declaration(names.darkSurfaceElevated, tokens.dark.surfaceElevated),\n declaration(names.darkSurfaceMuted, tokens.dark.surfaceMuted),\n declaration(names.darkText, tokens.dark.text),\n declaration(names.darkTextSecondary, tokens.dark.textSecondary),\n declaration(names.darkBorder, tokens.dark.border),\n declaration(names.darkDivider, tokens.dark.divider),\n ];\n const darkLines = darkEntries.filter(isLine);\n if (darkLines.length === 0) {\n return baseBlock;\n }\n\n const selector = options?.darkSelector ?? DEFAULT_DARK_SELECTOR;\n return `${baseBlock}\\n\\n${block(selector, darkLines)}`;\n}\n","import type { Branding, DesignTokens, ModeColors } from '../types';\n\n/**\n * The RN-web theme-config shape. Structurally compatible with\n * `@dloizides/tenant-theme-web`'s `TenantThemeConfig` (and each RN app's local\n * `TenantThemeConfig`), so a preset can be dropped in as the `defaultThemeConfig`\n * fallback without any mapping. Semantic and typography are optional (an RN app\n * may leave them unset, exactly as the current `default` preset does).\n */\nexport interface RnThemeConfig {\n primary: string;\n secondary: string;\n accent: string;\n semantic?: { success?: string; warning?: string; error?: string; info?: string };\n light: ModeColors;\n dark: ModeColors;\n typography?: { fontFamily?: string; headingScale?: number };\n branding: Branding;\n}\n\n/**\n * Emit a {@link DesignTokens} as an RN-web `TenantThemeConfig`-compatible object.\n * Only the core fields are projected; the `radii`/`shadows`/`extensions`\n * supersets are intentionally dropped (RN-web has no centralized token for them).\n * `typography` is included only when the preset defines it, so a preset with no\n * typography yields a config with no `typography` key — byte-identical to the RN\n * apps' current `DEFAULT_THEME_CONFIG`.\n */\nexport function toRnTheme(tokens: DesignTokens): RnThemeConfig {\n const config: RnThemeConfig = {\n primary: tokens.primary,\n secondary: tokens.secondary,\n accent: tokens.accent,\n semantic: { ...tokens.semantic },\n light: { ...tokens.light },\n dark: { ...tokens.dark },\n branding: { ...tokens.branding },\n };\n if (tokens.typography !== undefined) {\n config.typography = {\n fontFamily: tokens.typography.fontFamily,\n headingScale: tokens.typography.headingScale,\n };\n }\n return config;\n}\n","import { resolveOnBrand } from '../onBrand';\r\nimport type { DesignTokens } from '../types';\r\n\r\n/** Nested colour scale emitted under `theme.extend.colors`. */\r\nexport interface TailwindColors {\r\n primary: string;\r\n secondary: string;\r\n accent: string;\r\n /**\r\n * The primary's contrast partner. ALWAYS emitted — derived from `primary` when\r\n * the preset declares no `onBrand`, so a consumer's `text-on-brand` utility\r\n * cannot silently resolve to its own white fallback on a pale brand.\r\n */\r\n 'on-brand': string;\r\n success: string;\r\n warning: string;\r\n error: string;\r\n info: string;\r\n /** Status background tints. Emitted only when the preset declares them. */\r\n 'success-bg'?: string;\r\n 'warning-bg'?: string;\r\n 'error-bg'?: string;\r\n 'info-bg'?: string;\r\n background: string;\r\n surface: string;\r\n 'surface-elevated': string;\r\n /** Emitted only when the preset declares `light.surfaceMuted`. */\r\n 'surface-muted'?: string;\r\n text: string;\r\n 'text-secondary': string;\r\n border: string;\r\n divider: string;\r\n dark: {\r\n background: string;\r\n surface: string;\r\n 'surface-elevated': string;\r\n /** Emitted only when the preset declares `dark.surfaceMuted`. */\r\n 'surface-muted'?: string;\r\n text: string;\r\n 'text-secondary': string;\r\n border: string;\r\n divider: string;\r\n };\r\n}\r\n\r\n/** A Tailwind preset object: `{ theme: { extend: { … } } }`. Spread into a `tailwind.config`'s `presets`. */\r\nexport interface TailwindPreset {\r\n theme: {\r\n extend: {\r\n colors: TailwindColors;\r\n borderRadius?: Record<string, string>;\r\n boxShadow?: Record<string, string>;\r\n fontFamily?: Record<string, string[]>;\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Add the optional colour tokens, each only when the preset declares it — so a\r\n * preset that predates these slots emits a byte-identical colour object.\r\n */\r\nfunction addOptionalColors(colors: TailwindColors, tokens: DesignTokens): void {\r\n const { semantic } = tokens;\r\n if (semantic.successBg !== undefined) {\r\n colors['success-bg'] = semantic.successBg;\r\n }\r\n if (semantic.warningBg !== undefined) {\r\n colors['warning-bg'] = semantic.warningBg;\r\n }\r\n if (semantic.errorBg !== undefined) {\r\n colors['error-bg'] = semantic.errorBg;\r\n }\r\n if (semantic.infoBg !== undefined) {\r\n colors['info-bg'] = semantic.infoBg;\r\n }\r\n if (tokens.light.surfaceMuted !== undefined) {\r\n colors['surface-muted'] = tokens.light.surfaceMuted;\r\n }\r\n if (tokens.dark.surfaceMuted !== undefined) {\r\n colors.dark['surface-muted'] = tokens.dark.surfaceMuted;\r\n }\r\n}\r\n\r\n/**\r\n * Emit a {@link DesignTokens} as a Tailwind preset for the DOM-React ThemeStudio.\r\n * The core colours are always present; the optional colour slots,\r\n * `borderRadius`/`boxShadow`/`fontFamily` are emitted only when the preset\r\n * defines the corresponding token.\r\n */\r\nexport function toTailwindPreset(tokens: DesignTokens): TailwindPreset {\r\n const colors: TailwindColors = {\r\n primary: tokens.primary,\r\n secondary: tokens.secondary,\r\n accent: tokens.accent,\r\n 'on-brand': resolveOnBrand(tokens.primary, tokens.onBrand),\r\n success: tokens.semantic.success,\r\n warning: tokens.semantic.warning,\r\n error: tokens.semantic.error,\r\n info: tokens.semantic.info,\r\n background: tokens.light.background,\r\n surface: tokens.light.surface,\r\n 'surface-elevated': tokens.light.surfaceElevated,\r\n text: tokens.light.text,\r\n 'text-secondary': tokens.light.textSecondary,\r\n border: tokens.light.border,\r\n divider: tokens.light.divider,\r\n dark: {\r\n background: tokens.dark.background,\r\n surface: tokens.dark.surface,\r\n 'surface-elevated': tokens.dark.surfaceElevated,\r\n text: tokens.dark.text,\r\n 'text-secondary': tokens.dark.textSecondary,\r\n border: tokens.dark.border,\r\n divider: tokens.dark.divider,\r\n },\r\n };\r\n addOptionalColors(colors, tokens);\r\n\r\n const extend: TailwindPreset['theme']['extend'] = { colors };\r\n\r\n if (tokens.radii !== undefined) {\r\n extend.borderRadius = {\r\n xs: tokens.radii.xs,\r\n sm: tokens.radii.sm,\r\n DEFAULT: tokens.radii.md,\r\n lg: tokens.radii.lg,\r\n pill: tokens.radii.pill,\r\n };\r\n }\r\n if (tokens.shadows !== undefined) {\r\n extend.boxShadow = {\r\n sm: tokens.shadows.sm,\r\n DEFAULT: tokens.shadows.md,\r\n pop: tokens.shadows.pop,\r\n };\r\n }\r\n if (tokens.typography !== undefined) {\r\n const fontFamily: Record<string, string[]> = { sans: [tokens.typography.fontFamily] };\r\n if (tokens.typography.monoFamily !== undefined) {\r\n fontFamily.mono = [tokens.typography.monoFamily];\r\n }\r\n extend.fontFamily = fontFamily;\r\n }\r\n\r\n return { theme: { extend } };\r\n}\r\n","/**\n * Emit a {@link DesignTokens} as the shared RN UI kit's theme object — the value\n * `@dloizides/ui-feedback`'s `UiProvider` broadcasts and every kit component\n * (NavShell, DataTable, Filters, Pager, StatusBadge, ThemedTextInput, StatCard)\n * reads via `useUi()`.\n *\n * WHY THIS LIVES HERE\n * -------------------\n * Two apps (ichnos, kefi) independently wrote the same adapter, and both hit the\n * same wall: a naive projection assigns ONE value to every step of a scale, which\n * silently discards the deeper brand step and the status background tints. Each\n * then bolted a private overlay onto the result to smuggle the lost values into\n * free slots. That overlay is this function, done twice — so it belongs in the\n * token package, where the token shape that lost the values is defined.\n *\n * The emitted theme is a LOSSLESS carrier: every token the shape can express has\n * an addressable slot, so an app can round-trip its whole palette back out\n * (see the `*Colors` accessors in each app) instead of keeping a parallel static\n * copy that cannot follow a dark-mode toggle or a per-tenant brand.\n *\n * The type is declared structurally here rather than imported, exactly as\n * {@link RnThemeConfig} declares the `TenantThemeConfig` shape: this package\n * stays framework-agnostic and takes no dependency on the kit it feeds.\n */\nimport { resolveOnBrand } from '../onBrand';\nimport type { DesignTokens, ModeColors } from '../types';\n\n/** Flat colour fields the kit reads directly. Mirrors `ui-feedback`'s `FeedbackThemeColors`. */\nexport interface UiThemeColors {\n background: string;\n surface: string;\n surfaceElevated: string;\n text: string;\n textSecondary: string;\n border: string;\n}\n\n/** A colour scale. The `500` step is guaranteed; other steps are addressable. */\nexport interface UiColorScale {\n '500': string;\n [step: string]: string;\n}\n\n/** Brand scales. `primary` is guaranteed; other names are addressable. */\nexport interface UiThemePalette {\n primary: UiColorScale;\n [name: string]: UiColorScale;\n}\n\n/** Status scales. `error` is guaranteed; other names are addressable. */\nexport interface UiThemeSemantic {\n error: UiColorScale;\n [name: string]: UiColorScale;\n}\n\n/** The kit theme. Structurally identical to `@dloizides/ui-feedback`'s `UiTheme`. */\nexport interface UiThemeConfig {\n colors: UiThemeColors;\n palette: UiThemePalette;\n semantic: UiThemeSemantic;\n}\n\n/** Which mode block ({@link DesignTokens.light} / {@link DesignTokens.dark}) to project. */\nexport type UiThemeMode = 'light' | 'dark';\n\n/** The soft/tint step of a scale — status background tints, muted brand fills. */\nexport const UI_TINT_STEP = '100';\n/** The step every shipped kit component reads. */\nexport const UI_MAIN_STEP = '500';\n/** The deep/pressed step of a scale. */\nexport const UI_DEEP_STEP = '700';\n\n/** Palette scale carrying the on-brand foreground. */\nconst ON_BRAND_SCALE = 'onBrand';\n/** Palette scale carrying the muted inset surface. */\nconst SURFACE_MUTED_SCALE = 'surfaceMuted';\n\n/**\n * A colour with no distinct tint or deep variant, expressed as a full scale so\n * every step is addressable and no consumer reads `undefined`.\n */\nfunction flat(value: string): UiColorScale {\n return { [UI_TINT_STEP]: value, [UI_MAIN_STEP]: value, [UI_DEEP_STEP]: value };\n}\n\n/**\n * A status scale: the base at `500`/`700` and its background tint at `100`.\n * Falls back to a flat scale when the preset declares no tint, so behaviour is\n * unchanged for presets that predate the `*Bg` slots.\n */\nfunction tinted(base: string, tint: string | undefined): UiColorScale {\n return { [UI_TINT_STEP]: tint ?? base, [UI_MAIN_STEP]: base, [UI_DEEP_STEP]: base };\n}\n\n/**\n * Project a token set onto the shared kit's theme shape.\n *\n * Every value is carried into an addressable slot:\n * - `palette.primary` / `secondary` / `accent` — the brand scales.\n * - `palette.onBrand` — the primary's contrast partner. DERIVED from `primary`\n * via `resolveOnBrand` when the preset declares no {@link DesignTokens.onBrand},\n * so a pale brand gets dark ink instead of the white that used to be the\n * silent default (and which shipped a 2.14:1 button to production).\n * - `palette.surfaceMuted` — the mode's {@link ModeColors.surfaceMuted}.\n * - `semantic.*` — each status colour at `500`, its `*Bg` tint at `100`.\n *\n * @param tokens the app's token set\n * @param mode which mode block to project (default `'light'`)\n */\nexport function toUiTheme(tokens: DesignTokens, mode: UiThemeMode = 'light'): UiThemeConfig {\n const modeColors: ModeColors = mode === 'dark' ? tokens.dark : tokens.light;\n const { semantic } = tokens;\n return {\n colors: {\n background: modeColors.background,\n surface: modeColors.surface,\n surfaceElevated: modeColors.surfaceElevated,\n text: modeColors.text,\n textSecondary: modeColors.textSecondary,\n border: modeColors.border,\n },\n palette: {\n primary: flat(tokens.primary),\n secondary: flat(tokens.secondary),\n accent: flat(tokens.accent),\n [ON_BRAND_SCALE]: flat(resolveOnBrand(tokens.primary, tokens.onBrand)),\n [SURFACE_MUTED_SCALE]: flat(modeColors.surfaceMuted ?? modeColors.surface),\n },\n semantic: {\n error: tinted(semantic.error, semantic.errorBg),\n success: tinted(semantic.success, semantic.successBg),\n warning: tinted(semantic.warning, semantic.warningBg),\n info: tinted(semantic.info, semantic.infoBg),\n },\n };\n}\n","import type { DesignTokens } from '../types';\n\n/**\n * PROOViD AML console (Stack A — vanilla JS) tokens.\n *\n * Seeded byte-for-byte from `PROOViD/AMLService/AMLService/wwwroot/shared/ui.css`\n * `:root`. Emitting via `toCssVars(AML_TOKENS, AML_CSS_VAR_NAMES)` reproduces that\n * `:root` block exactly, so ui.css keeps working with zero visual change.\n *\n * Name-mapping notes (AML has no `TenantThemeConfig`-style secondary/accent or\n * light/dark toggle):\n * - `primary` = `--brand`. `secondary`/`accent` mirror it (ui.css reads neither);\n * they exist only so the core shape is complete.\n * - `semantic` mirrors the verdict palette (`--ok`/`--warn`/`--bad`); `info` has\n * no AML variable, so it mirrors `--brand`.\n * - `light` = the light workspace (`--bg`/`--surface`/…); `dark` = the dark app\n * SHELL (`--shell`/`--shell-2`/…) so the shape is complete. The AML name map\n * omits all `dark*` names, so no dark-mode block is emitted; the shell is\n * emitted from the `extensions.shell` group inside `:root`, matching ui.css.\n */\nexport const AML_TOKENS: DesignTokens = {\n primary: '#4f46e5',\n secondary: '#4f46e5',\n accent: '#4f46e5',\n\n semantic: {\n success: '#0c9d6c',\n warning: '#b9690a',\n error: '#d4302b',\n info: '#4f46e5',\n },\n\n light: {\n background: '#f4f6fa',\n surface: '#ffffff',\n surfaceElevated: '#f8fafc',\n text: '#0d1526',\n textSecondary: '#4a5567',\n border: '#e6e9f0',\n divider: '#e6e9f0',\n },\n\n dark: {\n background: '#0b1220',\n surface: '#111a2c',\n surfaceElevated: '#111a2c',\n text: '#e8edf6',\n textSecondary: '#95a3bb',\n border: 'rgba(255, 255, 255, .09)',\n divider: 'rgba(255, 255, 255, .09)',\n },\n\n typography: {\n fontFamily: '\"IBM Plex Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif',\n monoFamily: '\"IBM Plex Mono\", ui-monospace, SFMono-Regular, Menlo, monospace',\n headingScale: 1,\n },\n\n radii: {\n xs: '7px',\n sm: '9px',\n md: '12px',\n lg: '16px',\n pill: '999px',\n },\n\n shadows: {\n sm: '0 1px 2px rgba(13, 21, 38, .06)',\n md: '0 6px 20px -8px rgba(13, 21, 38, .14), 0 1px 2px rgba(13, 21, 38, .05)',\n pop: '0 24px 60px -16px rgba(13, 21, 38, .32)',\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'aml',\n },\n\n extensions: {\n shell: {\n background: '#0b1220',\n backgroundAlt: '#111a2c',\n line: 'rgba(255, 255, 255, .09)',\n on: '#e8edf6',\n onDim: '#95a3bb',\n },\n brand: {\n press: '#4035c9',\n soft: '#eef0fe',\n ring: 'rgba(79, 70, 229, .16)',\n },\n ink: {\n base: '#0d1526',\n soft: '#4a5567',\n faint: '#75839a',\n overlay: '#46506220',\n },\n workspace: {\n surfaceAlt: '#f8fafc',\n lineStrong: '#d7dce6',\n },\n verdict: {\n ok: '#0c9d6c',\n okSoft: '#e4f6ef',\n okInk: '#0a7a55',\n warn: '#b9690a',\n warnSoft: '#fcf1e3',\n warnInk: '#985608',\n bad: '#d4302b',\n badSoft: '#fcebea',\n badSoft2: '#fdecec',\n badInk: '#b21f1f',\n },\n },\n};\n","import type { DesignTokens } from '../types';\n\n/**\n * Digital Kin (Greek digital-literacy guide site) tokens.\n *\n * Seeded from the Figma `Typography & Colors Style Guide` (design spec §8): green\n * `#007E4A`, yellow `#FFAB00`, black, white. Unlike the aml/erevna/katalogos\n * presets — which were extracted byte-for-byte from an existing running app — this\n * preset is authored from the brand source, because the app does not exist yet.\n * That difference is not cosmetic: those presets must preserve their app's current\n * pixels, so their AA failures are frozen in `KNOWN_GAPS`. This one has no pixels\n * to preserve, so it is held to the floor the guard actually asks for wherever\n * that is arithmetically reachable (see `border` below).\n *\n * THE ACCENT IS A HIGHLIGHT, NOT A BUTTON COLOUR. `#FFAB00` is light: white text\n * on it measures 1.90:1, nowhere near the 4.5:1 AA floor. It carries stars,\n * focus rings, underlines and small ornaments, always with DARK ink on top\n * (`light.text` on it measures 9.81:1). `digitalkin.test.ts` asserts BOTH halves\n * of that, so \"just make the CTA yellow\" fails the build rather than shipping\n * unreadable.\n *\n * TYPOGRAPHY (spec D21): Geologica ONLY. It covers Greek, Latin, Cyrillic and\n * Vietnamese, and its `CRSV`/`SHRP` variable axes supply the display voice that\n * DynaPuff would otherwise have provided. DynaPuff has NO Greek glyphs at all, and\n * because browser font fallback is per-GLYPH rather than per-element, a heading\n * like \"Digital Kin — Ξεκινήστε εδώ\" would render the Latin half in DynaPuff and\n * the Greek half in an arbitrary system font, inside one element. It is therefore\n * deliberately absent from this file: it exists only inside `wordmark.svg`, whose\n * text is converted to vector paths and loads no font at all.\n *\n * Three deliberate divergences from the raw Figma palette, all for AA contrast on\n * an audience of older users who are frequently outdoors:\n * * `light.textSecondary` is `#5A5A5A` (6.41:1 on the `#F5F7F5` card, its worst\n * surface) rather than a mid grey. A muted grey that fails AA is the single\n * most common way a \"designed\" palette becomes unreadable, and this palette's\n * secondary text carries guide intros and difficulty labels.\n * * `border` is darker than a decorative hairline would be — `#7E8A80` (3.34:1\n * on white) and `#6B7D71` (3.40:1 on the raised dark surface) — so it clears\n * WCAG 1.4.11 as an INPUT OUTLINE. The other three presets have their light\n * borders registered as known gaps because darkening a live portal's hairlines\n * is a visual regression; this preset ships before any pixels exist, so it\n * takes the compliant value instead of inheriting the gap. `divider`, which\n * is decorative only and carries no contrast requirement, stays light.\n * * Dark-mode surfaces lift the green rather than reusing `#007E4A` as a\n * background, which would leave no room for readable text above it.\n *\n * ONE REGISTERED GAP — `dark.semantic.error`. `semantic.error` is a SINGLE token\n * rendered as text in BOTH modes, so one hex must clear 4.5:1 against white AND\n * against `#1E2A22`. Those requirements are mutually exclusive: AA on white caps\n * its relative luminance at 0.183, AA on the raised dark surface demands at least\n * 0.267. No colour satisfies both, so this is not a value that was chosen badly —\n * it needs a mode-aware split of the token, which is a shape change to\n * `SemanticColors` affecting all four presets. Registered in\n * `presets.contrast.test.ts` with its measured ratio, exactly like the identical\n * gap in erevna/katalogos/aml.\n */\nexport const DIGITALKIN_TOKENS: DesignTokens = {\n primary: '#007E4A',\n secondary: '#005532',\n accent: '#FFAB00',\n\n // White on the brand green measures 5.14:1 — AA for normal text, so filled\n // buttons carry white labels. Stated explicitly rather than leaning on the\n // consumer-side default, because a future primary tweak must re-prove it.\n onBrand: '#FFFFFF',\n\n semantic: {\n success: '#007E4A',\n warning: '#B26A00',\n error: '#B3261E',\n info: '#005532',\n },\n\n light: {\n background: '#FFFFFF',\n surface: '#F5F7F5',\n surfaceElevated: '#FFFFFF',\n text: '#101410',\n textSecondary: '#5A5A5A',\n border: '#7E8A80',\n divider: '#E5E9E5',\n surfaceMuted: '#EDF2ED',\n },\n\n dark: {\n background: '#0E1410',\n surface: '#16201A',\n surfaceElevated: '#1E2A22',\n text: '#F2F5F2',\n textSecondary: '#BFC7BF',\n border: '#6B7D71',\n divider: '#2C3A30',\n surfaceMuted: '#1A241D',\n },\n\n typography: {\n // Geologica Variable ships via @fontsource-variable/geologica on the public tier.\n fontFamily:\n \"'Geologica Variable', 'Geologica', system-ui, -apple-system, 'Segoe UI', sans-serif\",\n headingScale: 1,\n },\n\n radii: {\n xs: '4px',\n sm: '8px',\n md: '12px',\n lg: '20px',\n pill: '999px',\n },\n\n shadows: {\n sm: '0 1px 2px rgba(16, 20, 16, 0.06)',\n md: '0 2px 8px rgba(16, 20, 16, 0.08)',\n pop: '0 8px 24px rgba(16, 20, 16, 0.12)',\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'digitalkin',\n },\n};\n","import type { DesignTokens } from '../types';\n\n/**\n * Erevna (surveys/forms — realm `questioner`) tokens.\n *\n * Seeded byte-for-byte from `erevna-web/src/theme/presets/default.ts`\n * (`DEFAULT_THEME_CONFIG`) and `erevna-web/src/theme/utils/palette.ts`\n * (`basePalette`). No `typography`/`radii`/`shadows` — the RN theme has no\n * centralized tokens for those today, so they are omitted (nothing to emit →\n * zero visual change).\n *\n * ONE deliberate divergence from that seed (UX-11): `light.textSecondary` is\n * `#717171`, not the app's `#777777`. `#777777` measures 4.48:1 on `#ffffff` and\n * 4.18:1 on the `#f7f7f7` card surface — both under the WCAG AA 4.5:1 floor for\n * normal text, and form-field labels render in this colour. `#717171` measures\n * 4.88:1 and 4.56:1 against those same two surfaces. Do not \"restore\" it to\n * match the app; `presets.contrast.test.ts` will fail if you do. The app's own\n * local preset still carries `#777777` and needs the same fix separately.\n */\nexport const EREVNA_TOKENS: DesignTokens = {\n primary: '#005f73',\n secondary: '#94d2bd',\n accent: '#008d5c',\n\n semantic: {\n success: '#0a9396',\n warning: '#ee9b00',\n error: '#ae2012',\n info: '#005f73',\n },\n\n light: {\n background: '#ffffff',\n surface: '#f7f7f7',\n surfaceElevated: '#ffffff',\n text: '#001219',\n textSecondary: '#717171',\n border: '#e6e6e6',\n divider: '#e6e6e6',\n },\n\n dark: {\n background: '#001219',\n surface: '#052f33',\n surfaceElevated: '#073b40',\n text: '#e9d8a6',\n textSecondary: '#a8a090',\n border: '#053f40',\n divider: '#053f40',\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'default',\n },\n};\n","import type { DesignTokens } from '../types';\n\n/**\n * Katalogos (online menus — realm `onlinemenu`) tokens.\n *\n * Seeded byte-for-byte from `katalogos-web/src/theme/presets/default.ts`\n * (`DEFAULT_THEME_CONFIG`), which is currently identical to Erevna's default.\n * Kept as a separate preset so the two apps can diverge later without touching\n * the other.\n *\n * ONE deliberate divergence from that seed (UX-11): `light.textSecondary` is\n * `#717171`, not the app's `#777777`. `#777777` measures 4.48:1 on `#ffffff` and\n * 4.18:1 on the `#f7f7f7` card surface — both under the WCAG AA 4.5:1 floor for\n * normal text, and form-field labels render in this colour. `#717171` measures\n * 4.88:1 and 4.56:1 against those same two surfaces. Do not \"restore\" it to\n * match the app; `presets.contrast.test.ts` will fail if you do. The app's own\n * local preset still carries `#777777` and needs the same fix separately.\n */\nexport const KATALOGOS_TOKENS: DesignTokens = {\n primary: '#005f73',\n secondary: '#94d2bd',\n accent: '#008d5c',\n\n semantic: {\n success: '#0a9396',\n warning: '#ee9b00',\n error: '#ae2012',\n info: '#005f73',\n },\n\n light: {\n background: '#ffffff',\n surface: '#f7f7f7',\n surfaceElevated: '#ffffff',\n text: '#001219',\n textSecondary: '#717171',\n border: '#e6e6e6',\n divider: '#e6e6e6',\n },\n\n dark: {\n background: '#001219',\n surface: '#052f33',\n surfaceElevated: '#073b40',\n text: '#e9d8a6',\n textSecondary: '#a8a090',\n border: '#053f40',\n divider: '#053f40',\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'default',\n },\n};\n","import type { DesignTokens, MotionEasing } from '../types';\n\n/** Spec §6 ease.out — entering and on-screen moves. */\nconst EASE_OUT: MotionEasing = { css: 'cubic-bezier(0.2,0.8,0.2,1)', bezier: [0.2, 0.8, 0.2, 1] };\n/** Spec §6 ease.in — elements leaving the screen. */\nconst EASE_IN: MotionEasing = { css: 'cubic-bezier(0.4,0,1,1)', bezier: [0.4, 0, 1, 1] };\n\n/**\n * NextGame (nextgame.dloizides.com) tokens — the consumer game-recommendation app.\n *\n * WHY THIS PALETTE, AND WHY NOT THE OBVIOUS ONE\n * ---------------------------------------------\n * NextGame renders game cards from PlayStation, Xbox, Nintendo and PC side by\n * side, so the app chrome has to be legible NEXT TO PlayStation blue (#0070D1),\n * Xbox green (#107C10) and Nintendo red (#E60012) without being read as an\n * endorsement of any of them. That rules out blue, green and red as the brand\n * primary — the three colours a games product reaches for first.\n *\n * D1 \"LIVING ROOM\". The app is a dark console dashboard read from a couch, so\n * the dark mode is the product and its grounds are GRAPHITE (#0A0D12 canvas,\n * #121720 cards, #1A212C raised): neutral enough that box art and platform\n * badges carry the colour. On those grounds the pick/selected colour is a warm\n * AMBER fill (`dark.brandFill` #FFD37A with `onBrandFill` #1A1204), lighter than\n * the top-level signal amber so a dark label clears AA on it. The top-level\n * amber/teal/magenta triad is retained for LIGHT surfaces only (OG images,\n * email); teal and magenta are not UI chrome in the dark app. Focus is a white\n * ring, and `contrastMore` lifts the secondary text tiers and hairlines for\n * `prefers-contrast: more`.\n *\n * Explicitly NOT used: the violet/indigo ramp, which is both the estate's banned\n * AI default and, on a store page, indistinguishable from a dozen launcher UIs.\n *\n * ACCESSIBILITY. Both borders are authored to clear WCAG 1.4.11 (3:1).\n * `semantic.error` is tuned for the LIGHT surfaces and registers the usual\n * dark-mode gap; the dark app reads error text from `dark.dangerText` on\n * `dark.dangerFill` instead — one hex cannot serve error-as-text in both modes.\n */\nexport const NEXTGAME_TOKENS: DesignTokens = {\n /** Signal amber — the recommendation/buy colour on light surfaces. */\n primary: '#FF8C1A',\n /** Deep teal — light-surface structure and links. */\n secondary: '#0E7C86',\n /** Arcade magenta — light-surface call-out only. */\n accent: '#F5008B',\n\n semantic: {\n success: '#0E9E6E',\n warning: '#B26A00',\n error: '#C0281C',\n info: '#0E7C86',\n successBg: '#E3F6EE',\n warningBg: '#FBF0DE',\n errorBg: '#FBE9E6',\n infoBg: '#E2F1F3',\n },\n\n light: {\n background: '#FBF7F0',\n surface: '#FFFFFF',\n surfaceElevated: '#FFFDF8',\n surfaceMuted: '#F3EDE3',\n text: '#191410',\n textSecondary: '#5A5047',\n border: '#8A7F72',\n divider: '#E3D9CB',\n },\n\n dark: {\n background: '#0A0D12',\n surface: '#121720',\n surfaceElevated: '#1A212C',\n surfaceMuted: '#070A0E',\n text: '#F2F4F7',\n textSecondary: '#A9B3C1',\n textTertiary: '#8C97A7',\n border: '#6B778A',\n divider: '#242C38',\n focusRing: '#FFFFFF',\n brandFill: '#FFD37A',\n onBrandFill: '#1A1204',\n successText: '#7FD6A4',\n dangerText: '#FF9E8F',\n dangerFill: '#3A1D1A',\n },\n\n contrastMore: {\n dark: { textSecondary: '#D5DBE3', textTertiary: '#C0C8D3', border: '#9AA5B4', divider: '#3A4452' },\n focusRingWidth: 4,\n },\n\n typography: {\n fontFamily: '\"Barlow\", \"Segoe UI\", -apple-system, BlinkMacSystemFont, sans-serif',\n headingScale: 1,\n },\n\n radii: {\n xs: '6px',\n sm: '12px',\n md: '14px',\n lg: '22px',\n pill: '999px',\n },\n\n shadows: {\n sm: '0 1px 2px rgba(0, 0, 0, .6)',\n md: '0 14px 30px -18px rgba(0, 0, 0, .8)',\n pop: '0 34px 60px -22px rgba(0, 0, 0, .9)',\n },\n\n /**\n * Spec §6 mapped onto the shared 4-slot shape, NOT `DEFAULT_MOTION`: D1 moves\n * are slower and softer than the portal defaults. The 90ms confirm and the\n * 400ms import-bar durations are product-event timings owned by the app\n * (nextgame-web `src/theme/d1.ts`), not tokens.\n */\n motion: {\n durations: { instant: 0, fast: 160, base: 240, slow: 320 },\n easings: { standard: EASE_OUT, decelerate: EASE_OUT, accelerate: EASE_IN },\n springs: {\n focus: { stiffness: 420, damping: 34 },\n settle: { stiffness: 260, damping: 30 },\n press: { stiffness: 500, damping: 28 },\n },\n },\n\n branding: {\n logoContentId: null,\n faviconContentId: null,\n presetId: 'nextgame',\n },\n};\n","import type { DesignTokens } from '../types';\r\n\r\nimport { AML_TOKENS } from './aml';\r\nimport { DIGITALKIN_TOKENS } from './digitalkin';\r\nimport { EREVNA_TOKENS } from './erevna';\r\nimport { KATALOGOS_TOKENS } from './katalogos';\r\nimport { NEXTGAME_TOKENS } from './nextgame';\r\n\r\nexport { AML_TOKENS } from './aml';\r\nexport { DIGITALKIN_TOKENS } from './digitalkin';\r\nexport { EREVNA_TOKENS } from './erevna';\r\nexport { KATALOGOS_TOKENS } from './katalogos';\r\nexport { NEXTGAME_TOKENS } from './nextgame';\r\n\r\n/** Every shipped app preset keyed by app slug. */\r\nexport const PRESETS: Readonly<Record<string, DesignTokens>> = {\r\n aml: AML_TOKENS,\r\n erevna: EREVNA_TOKENS,\r\n katalogos: KATALOGOS_TOKENS,\r\n digitalkin: DIGITALKIN_TOKENS,\r\n nextgame: NEXTGAME_TOKENS,\r\n};\r\n","/**\n * FINREG module colour tokens (task R-01; rebranded to the OFFICIAL palette).\n *\n * FINREG's logo binds a colour to each of the three product modules — Payments,\n * Accounting, CRM — so colour reads as module identity, not as one app's brand\n * primary. Those three base hexes are sampled VERBATIM from the FINAL brand logo\n * (`zygos/finalLogo/`, the three neon orbits): `#3fe0d0` teal (payments) /\n * `#f0489a` pink (accounting) / `#8a7bf5` indigo (crm). They are the\n * single-source-of-truth brand palette and are pinned by `finregModules.test.ts`.\n * (They replace the earlier `#52E2F2` / `#F266CD` / `#7997F2` trio, which was\n * close but not exactly the shipped logo — the palette now MATCHES the logo.)\n *\n * Each module also carries an `onWhite` companion. The base fills are light — a\n * cyan orbit at 1.55:1 on white cannot be read as text — so a badge, a table\n * cell, a nav label or any icon that paints a module colour on a white surface\n * needs a darkened variant that clears the WCAG AA 4.5:1 floor. The `onWhite`\n * hexes were DERIVED, not eyeballed: each is the lightest shade of the same hue\n * (HSL lightness reduced, hue+saturation held) that still measures at least\n * 4.5:1 on `#FFFFFF` under the WCAG 2.1 maths in `contrast.ts`, then carried a\n * little past the floor so sub-pixel rendering and rounding cannot drop it under.\n * The exact measured ratios are asserted in the test, so a future edit that\n * lightens one below AA fails the build rather than shipping an unreadable label.\n *\n * The navy surfaces (`FINREG_SURFACE_COLORS`) are the official dark grounds — the\n * hero band / logo field top (`#0C2240`) and the deepest closing/footer band /\n * logo field bottom (`#071526`). They are exported so consumers stop hardcoding\n * the dark-band literals.\n *\n * This is the SOURCE of these hexes. Consuming apps read `FINREG_MODULE_COLORS`\n * and `FINREG_SURFACE_COLORS`; they must not re-declare the literals, which is\n * the whole point of the `no-raw-color-literal` rule the consumers are bound by.\n */\nimport type { FinregModuleColors, FinregSurfaceColors } from './types';\n\nexport const FINREG_MODULE_COLORS: FinregModuleColors = {\n payments: {\n // teal — 1.64:1 on white (fill only); onWhite 4.74:1\n base: '#3fe0d0',\n onWhite: '#158176',\n },\n accounting: {\n // pink — 3.44:1 on white (fill only); onWhite 4.71:1\n base: '#f0489a',\n onWhite: '#de1276',\n },\n crm: {\n // indigo — 3.37:1 on white (fill only); onWhite 4.77:1\n base: '#8a7bf5',\n onWhite: '#6d5af3',\n },\n};\n\n/**\n * FINREG's official dark brand surfaces — the navy grounds the logo field and the\n * dark marketing bands are painted on. `surface` is the hero/dark-section band and\n * the logo field top; `deepest` is the footer/closing band, the darkest body ink,\n * and the logo field bottom. Bright module colours (esp. Payments cyan) are the\n * AA-safe accents ON these grounds — cyan `#52E2F2` on `#0C2240` measures ~9.6:1.\n */\nexport const FINREG_SURFACE_COLORS: FinregSurfaceColors = {\n // primary dark surface — hero band, dark sections, logo field top\n surface: '#0C2240',\n // darkest surface — footer/closing band, body-text ink, logo field bottom\n deepest: '#071526',\n};\n"]}
package/dist/index.mjs CHANGED
@@ -666,12 +666,14 @@ var KATALOGOS_TOKENS = {
666
666
  };
667
667
 
668
668
  // src/presets/nextgame.ts
669
+ var EASE_OUT = { css: "cubic-bezier(0.2,0.8,0.2,1)", bezier: [0.2, 0.8, 0.2, 1] };
670
+ var EASE_IN = { css: "cubic-bezier(0.4,0,1,1)", bezier: [0.4, 0, 1, 1] };
669
671
  var NEXTGAME_TOKENS = {
670
- /** Signal amber — the recommendation/buy colour. */
672
+ /** Signal amber — the recommendation/buy colour on light surfaces. */
671
673
  primary: "#FF8C1A",
672
- /** Deep teal — structure, links, the calm counterweight. */
674
+ /** Deep teal — light-surface structure and links. */
673
675
  secondary: "#0E7C86",
674
- /** Arcade magenta — one call-out per screen, never a surface fill. */
676
+ /** Arcade magenta — light-surface call-out only. */
675
677
  accent: "#F5008B",
676
678
  semantic: {
677
679
  success: "#0E9E6E",
@@ -694,31 +696,56 @@ var NEXTGAME_TOKENS = {
694
696
  divider: "#E3D9CB"
695
697
  },
696
698
  dark: {
697
- background: "#12100E",
698
- surface: "#1B1815",
699
- surfaceElevated: "#241F1B",
700
- surfaceMuted: "#171412",
701
- text: "#F5EFE6",
702
- textSecondary: "#B3A79A",
703
- border: "#7A6F63",
704
- divider: "#332C26"
699
+ background: "#0A0D12",
700
+ surface: "#121720",
701
+ surfaceElevated: "#1A212C",
702
+ surfaceMuted: "#070A0E",
703
+ text: "#F2F4F7",
704
+ textSecondary: "#A9B3C1",
705
+ textTertiary: "#8C97A7",
706
+ border: "#6B778A",
707
+ divider: "#242C38",
708
+ focusRing: "#FFFFFF",
709
+ brandFill: "#FFD37A",
710
+ onBrandFill: "#1A1204",
711
+ successText: "#7FD6A4",
712
+ dangerText: "#FF9E8F",
713
+ dangerFill: "#3A1D1A"
714
+ },
715
+ contrastMore: {
716
+ dark: { textSecondary: "#D5DBE3", textTertiary: "#C0C8D3", border: "#9AA5B4", divider: "#3A4452" },
717
+ focusRingWidth: 4
705
718
  },
706
719
  typography: {
707
- fontFamily: '"Space Grotesk", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif',
708
- monoFamily: '"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace',
709
- headingScale: 1.1
720
+ fontFamily: '"Barlow", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif',
721
+ headingScale: 1
710
722
  },
711
723
  radii: {
712
724
  xs: "6px",
713
- sm: "10px",
725
+ sm: "12px",
714
726
  md: "14px",
715
727
  lg: "22px",
716
728
  pill: "999px"
717
729
  },
718
730
  shadows: {
719
- sm: "0 1px 2px rgba(18, 16, 14, .08)",
720
- md: "0 8px 24px -10px rgba(18, 16, 14, .22), 0 1px 2px rgba(18, 16, 14, .06)",
721
- pop: "0 28px 64px -18px rgba(18, 16, 14, .42)"
731
+ sm: "0 1px 2px rgba(0, 0, 0, .6)",
732
+ md: "0 14px 30px -18px rgba(0, 0, 0, .8)",
733
+ pop: "0 34px 60px -22px rgba(0, 0, 0, .9)"
734
+ },
735
+ /**
736
+ * Spec §6 mapped onto the shared 4-slot shape, NOT `DEFAULT_MOTION`: D1 moves
737
+ * are slower and softer than the portal defaults. The 90ms confirm and the
738
+ * 400ms import-bar durations are product-event timings owned by the app
739
+ * (nextgame-web `src/theme/d1.ts`), not tokens.
740
+ */
741
+ motion: {
742
+ durations: { instant: 0, fast: 160, base: 240, slow: 320 },
743
+ easings: { standard: EASE_OUT, decelerate: EASE_OUT, accelerate: EASE_IN },
744
+ springs: {
745
+ focus: { stiffness: 420, damping: 34 },
746
+ settle: { stiffness: 260, damping: 30 },
747
+ press: { stiffness: 500, damping: 28 }
748
+ }
722
749
  },
723
750
  branding: {
724
751
  logoContentId: null,