okchroma 0.1.5 → 0.1.7
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-lib/index.cjs
CHANGED
|
@@ -405,7 +405,7 @@ var NEUTRAL_TINT_POINTS = {
|
|
|
405
405
|
[0.801, 0.653],
|
|
406
406
|
// wash-7 │
|
|
407
407
|
[0.738, 0.505],
|
|
408
|
-
//
|
|
408
|
+
// wax-74
|
|
409
409
|
[0.6, 0.4],
|
|
410
410
|
// knee (ex-scaffold) the drop-off: hue fades as you climb
|
|
411
411
|
[0.56, 0.347],
|
|
@@ -431,7 +431,7 @@ var NEUTRAL_TINT_POINTS = {
|
|
|
431
431
|
[0.42, 0.653],
|
|
432
432
|
// wash-7
|
|
433
433
|
[0.55, 0.505],
|
|
434
|
-
//
|
|
434
|
+
// wax-74
|
|
435
435
|
[0.6, 0.4],
|
|
436
436
|
// knee (ex-scaffold)
|
|
437
437
|
[0.64, 0.347],
|
|
@@ -800,10 +800,119 @@ function perceptualDarkC(L, H2, nativeC, keep = KEEP_DARK, gamut = MASTER_GAMUT)
|
|
|
800
800
|
return solveCForApparent(L, H2, grayApparentL(L, gamut) + keep * meanBoost(L, nativeC, gamut), gamut);
|
|
801
801
|
}
|
|
802
802
|
|
|
803
|
+
// src/engine/tokenNames.ts
|
|
804
|
+
var SHARED_NAMES = {
|
|
805
|
+
1: "paper-99",
|
|
806
|
+
2: "paper-97",
|
|
807
|
+
// stop 3 renamed wash-3 → paper-3 (owner 2026-07-24, elevation round): it is a
|
|
808
|
+
// PLANE in both themes (light sink / dark pop), so it belongs to the surface band.
|
|
809
|
+
// NAME ONLY — generation is index-keyed and unchanged; the wash-collision machinery
|
|
810
|
+
// (collision.ts WASH_STOPS) deliberately still spans stops 3–7. (The requirement
|
|
811
|
+
// spec's `group` label followed the band to 'paper' on 2026-08-31 — labels only,
|
|
812
|
+
// the spans never moved; see spec.ts groupOf.)
|
|
813
|
+
// Stage B (owner 2026-08-07, names only): relabeled to the ROOT_L-derived digit,
|
|
814
|
+
// paper-95 — same band, same index.
|
|
815
|
+
3: "paper-95",
|
|
816
|
+
4: "wash-92",
|
|
817
|
+
5: "wash-89",
|
|
818
|
+
6: "wash-85",
|
|
819
|
+
7: "wash-80",
|
|
820
|
+
8: "wax-74",
|
|
821
|
+
// THE INK BAND (C49, owner 2026-08-05): the first text stop + emphasis fill (the
|
|
822
|
+
// 2026-07-29 highlight collapse — the old highlight-9 and on-highlight are
|
|
823
|
+
// deleted; this stop carries both jobs, its on-color a paper token), the between
|
|
824
|
+
// text stop (a value the retired text-cta hover state used to generate bespokely,
|
|
825
|
+
// promoted to a normal stop), and the strong text stop. The three read as states
|
|
826
|
+
// ARE the text-style cta (owner 2026-08-12). C49 restored the top
|
|
827
|
+
// two pre-collapse stop INDICES (11, and the off-scale anchor's 12 — emitted as a
|
|
828
|
+
// literal in cssRender, not through this table) with the between stop taking the
|
|
829
|
+
// vacated index 10; the indices (9/10/11) are unchanged since.
|
|
830
|
+
9: "lead-53",
|
|
831
|
+
10: "ink-42",
|
|
832
|
+
11: "ink-30"
|
|
833
|
+
};
|
|
834
|
+
var SCALE_STOP_COUNT = Object.keys(SHARED_NAMES).length;
|
|
835
|
+
function stopTokenName(stop) {
|
|
836
|
+
const name = SHARED_NAMES[stop];
|
|
837
|
+
if (!name) throw new Error(`stopTokenName: unexpected stop ${stop}`);
|
|
838
|
+
return name;
|
|
839
|
+
}
|
|
840
|
+
var PAPER_100 = "paper-100";
|
|
841
|
+
var INK_0 = "ink-0";
|
|
842
|
+
var STAMP_FILL = "stamp-fill";
|
|
843
|
+
var STAMP_FILL_HOVER = "stamp-fill-hover";
|
|
844
|
+
var STAMP_FILL_PRESSED = "stamp-fill-pressed";
|
|
845
|
+
var STAMP_EDGE = "stamp-edge";
|
|
846
|
+
var STAMP_ON = "stamp-on";
|
|
847
|
+
var STAMP_STATE_LEAVES = {
|
|
848
|
+
[STAMP_FILL]: "stamp/fill",
|
|
849
|
+
[STAMP_FILL_HOVER]: "stamp/fill-hover",
|
|
850
|
+
[STAMP_FILL_PRESSED]: "stamp/fill-pressed",
|
|
851
|
+
[STAMP_EDGE]: "stamp/edge",
|
|
852
|
+
[STAMP_ON]: "stamp/on"
|
|
853
|
+
};
|
|
854
|
+
var STAMP_LEAF = {
|
|
855
|
+
FILL: STAMP_STATE_LEAVES[STAMP_FILL],
|
|
856
|
+
FILL_HOVER: STAMP_STATE_LEAVES[STAMP_FILL_HOVER],
|
|
857
|
+
FILL_PRESSED: STAMP_STATE_LEAVES[STAMP_FILL_PRESSED],
|
|
858
|
+
EDGE: STAMP_STATE_LEAVES[STAMP_EDGE],
|
|
859
|
+
ON: STAMP_STATE_LEAVES[STAMP_ON]
|
|
860
|
+
};
|
|
861
|
+
var SYSTEM_LEAF = {
|
|
862
|
+
ABS_BLACK: "system/abs-black",
|
|
863
|
+
ABS_WHITE: "system/abs-white",
|
|
864
|
+
SURFACE: {
|
|
865
|
+
DIM: "system/surface/dim",
|
|
866
|
+
LOW: "system/surface/low",
|
|
867
|
+
MID: "system/surface/mid",
|
|
868
|
+
HIGH: "system/surface/high"
|
|
869
|
+
},
|
|
870
|
+
ALPHA: {
|
|
871
|
+
TRANSPARENT: "system/alpha/transparent",
|
|
872
|
+
SCRIM: "system/alpha/abs-black-060",
|
|
873
|
+
INK: "system/alpha/ink",
|
|
874
|
+
// the DIRECTIONAL ladders (owner 2026-08-31, renaming the 2026-08-18 bare rungs
|
|
875
|
+
// and the 2026-08-29 inverse ladder): away-from-bg is the page-polarity pole
|
|
876
|
+
// (black in light, white in dark), toward-bg the flipped pole — STATE LAYERS for
|
|
877
|
+
// INVERTED grounds, whose polarity is opposite the page's. (Never call toward-bg
|
|
878
|
+
// a "wash": that word belongs to the tinted band stops.) The reversal lives in
|
|
879
|
+
// the engine: a consumer on an inverted ground names one token and never picks a
|
|
880
|
+
// pole. Colored fills never ride these; their states stay engine-solved stops.
|
|
881
|
+
// Rungs are two-digit percent, harmonizing with shadow-04/08/12.
|
|
882
|
+
AWAY_FROM_BG_06: "system/alpha/away-from-bg/06",
|
|
883
|
+
AWAY_FROM_BG_08: "system/alpha/away-from-bg/08",
|
|
884
|
+
AWAY_FROM_BG_16: "system/alpha/away-from-bg/16",
|
|
885
|
+
TOWARD_BG_06: "system/alpha/toward-bg/06",
|
|
886
|
+
TOWARD_BG_08: "system/alpha/toward-bg/08",
|
|
887
|
+
TOWARD_BG_16: "system/alpha/toward-bg/16",
|
|
888
|
+
SHADOW_04: "system/alpha/shadow-04",
|
|
889
|
+
SHADOW_08: "system/alpha/shadow-08",
|
|
890
|
+
SHADOW_12: "system/alpha/shadow-12"
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
var SURFACE_PLANE_LAW = {
|
|
894
|
+
[SYSTEM_LEAF.SURFACE.DIM]: { light: SHARED_NAMES[3], dark: PAPER_100 },
|
|
895
|
+
[SYSTEM_LEAF.SURFACE.LOW]: { light: SHARED_NAMES[2], dark: SHARED_NAMES[1] },
|
|
896
|
+
[SYSTEM_LEAF.SURFACE.MID]: { light: SHARED_NAMES[1], dark: SHARED_NAMES[2] },
|
|
897
|
+
[SYSTEM_LEAF.SURFACE.HIGH]: { light: PAPER_100, dark: SHARED_NAMES[3] }
|
|
898
|
+
};
|
|
899
|
+
var TOKEN_ORDER = [
|
|
900
|
+
...Object.values(SHARED_NAMES),
|
|
901
|
+
STAMP_FILL,
|
|
902
|
+
STAMP_FILL_HOVER,
|
|
903
|
+
STAMP_FILL_PRESSED,
|
|
904
|
+
STAMP_ON,
|
|
905
|
+
"identity"
|
|
906
|
+
];
|
|
907
|
+
function tokenOrder(name) {
|
|
908
|
+
const i = TOKEN_ORDER.indexOf(name);
|
|
909
|
+
return i === -1 ? TOKEN_ORDER.length : i;
|
|
910
|
+
}
|
|
911
|
+
|
|
803
912
|
// src/engine/requirements/spec.ts
|
|
804
|
-
var
|
|
913
|
+
var inkLane = (g2) => g2 === "lead" || g2 === "ink";
|
|
914
|
+
var groupOf = (stop) => (stop === 0 ? PAPER_100 : stopTokenName(stop)).split("-")[0];
|
|
805
915
|
var PAPER0_DARK_ROOT_L = 0.16;
|
|
806
|
-
var INK0_SEAM_OVERSHOOT = (ROOT_L_DARK[1] - PAPER0_DARK_ROOT_L) / (ROOT_L_DARK[2] - ROOT_L_DARK[1]);
|
|
807
916
|
var PL_LADDER = { hue: "warm-drift", L: "perceptual", chroma: "ladder" };
|
|
808
917
|
var PL_TEXT = { hue: "warm-drift", L: "perceptual", chroma: "brand" };
|
|
809
918
|
var P_LIFT = { hue: "warm-torsion", L: "perceptual-lift", chroma: "ladder" };
|
|
@@ -817,7 +926,7 @@ var ONS = { onFill: { metric: "apca-pole", enforce: true, ratioFloor: 4.5, coEnf
|
|
|
817
926
|
var LIGHT = {
|
|
818
927
|
stops: [
|
|
819
928
|
// paper-100 (paper-0 pre-Stage-B): the resolved ladder extreme — in light it genuinely is white (rootL 1.0, zero chroma)
|
|
820
|
-
{ stop: 0, rootL: 1, group:
|
|
929
|
+
{ stop: 0, rootL: 1, group: groupOf(0), produce: { hue: "warm-drift", L: "fixed", chroma: "ladder" }, satFraction: SCALE_C_LIGHT[0].sat, baseC: SCALE_C_LIGHT[0].base },
|
|
821
930
|
// paper/wash/wax-74: perceptual ladder/envelope blend on the geometric ROOT_L_LIGHT scaffold. Separation
|
|
822
931
|
// falls out of the shape (see above) — no min-separation require. Only stop 8 carries a require: the WCAG
|
|
823
932
|
// 3:1 vs the resolved paper-97 (paper-2) (re-solves automatically since it references paper-97 (paper-2)).
|
|
@@ -833,9 +942,9 @@ var LIGHT = {
|
|
|
833
942
|
// ink text: perceptual + contrast-required. lead-53 (ink-9) is ALSO the emphasis fill (the
|
|
834
943
|
// highlight-9 collapse, owner 2026-07-29). ink-42 (ink-10) is the between text stop (C49) —
|
|
835
944
|
// a normal stop like its neighbors; the three together are the text-register cta.
|
|
836
|
-
{ stop: 9, rootL: ROOT_L_LIGHT[9], group:
|
|
837
|
-
{ stop: 10, rootL: ROOT_L_LIGHT[10], group:
|
|
838
|
-
{ stop: 11, rootL: ROOT_L_LIGHT[11], group:
|
|
945
|
+
{ stop: 9, rootL: ROOT_L_LIGHT[9], group: groupOf(9), produce: PL_TEXT, chromaMult: SCALE_C_LIGHT[9].inkMult, inkMaxC: SCALE_C_LIGHT[9].inkMaxC, chromaFloor: SCALE_C_LIGHT[9].chromaFloor, require: T9 },
|
|
946
|
+
{ stop: 10, rootL: ROOT_L_LIGHT[10], group: groupOf(10), produce: PL_TEXT, chromaMult: SCALE_C_LIGHT[10].inkMult, inkMaxC: SCALE_C_LIGHT[10].inkMaxC, chromaFloor: SCALE_C_LIGHT[10].chromaFloor, require: T10 },
|
|
947
|
+
{ stop: 11, rootL: ROOT_L_LIGHT[11], group: groupOf(11), produce: PL_TEXT, chromaMult: SCALE_C_LIGHT[11].inkMult, inkMaxC: SCALE_C_LIGHT[11].inkMaxC, chromaFloor: SCALE_C_LIGHT[11].chromaFloor, require: T11 }
|
|
839
948
|
],
|
|
840
949
|
roles: [
|
|
841
950
|
{ role: "cta", produce: { hue: "constant", L: "anchor", chroma: "brand" }, floorL: 0, chromaMult: 1 },
|
|
@@ -848,7 +957,7 @@ var DARK = {
|
|
|
848
957
|
stops: [
|
|
849
958
|
// paper-100 (paper-0 pre-Stage-B): the resolved ladder extreme — one seam BELOW paper-99 (paper-1), deep and brand-tinted, never the
|
|
850
959
|
// absolute void (the old hard-coded #000000 was "too much"). Lift applies like the rest of the scale.
|
|
851
|
-
{ stop: 0, rootL: PAPER0_DARK_ROOT_L, group:
|
|
960
|
+
{ stop: 0, rootL: PAPER0_DARK_ROOT_L, group: groupOf(0), produce: P_LIFT, satFraction: SCALE_C_DARK[0].sat },
|
|
852
961
|
// paper/wash 1–7: perceptual on the dark scaffold. stop 8: FIXED at the hand-placed scaffold BUT with the
|
|
853
962
|
// 3:1 non-text require DECLARED (the Stage-5 flip, owner-approved) — the blue-recede failure is prevented
|
|
854
963
|
// BY RULE, not by patch. The require now genuinely PLACES the stop rather than catching a few low-luminance
|
|
@@ -865,9 +974,9 @@ var DARK = {
|
|
|
865
974
|
})),
|
|
866
975
|
// ink text: perceptual + the contrast requires DECLARED in dark too (Stage-5 flip): the scaffold already
|
|
867
976
|
// clears them for every hue (the gate proves it), so values don't move — but the guarantee is now a rule.
|
|
868
|
-
{ stop: 9, rootL: ROOT_L_DARK[9], group:
|
|
869
|
-
{ stop: 10, rootL: ROOT_L_DARK[10], group:
|
|
870
|
-
{ stop: 11, rootL: ROOT_L_DARK[11], group:
|
|
977
|
+
{ stop: 9, rootL: ROOT_L_DARK[9], group: groupOf(9), produce: P_TEXT, chromaMult: SCALE_C_DARK[9].inkMult, inkMaxC: SCALE_C_DARK[9].inkMaxC, chromaFloor: SCALE_C_DARK[9].chromaFloor, require: T9 },
|
|
978
|
+
{ stop: 10, rootL: ROOT_L_DARK[10], group: groupOf(10), produce: P_TEXT, chromaMult: SCALE_C_DARK[10].inkMult, inkMaxC: SCALE_C_DARK[10].inkMaxC, chromaFloor: SCALE_C_DARK[10].chromaFloor, require: T10 },
|
|
979
|
+
{ stop: 11, rootL: ROOT_L_DARK[11], group: groupOf(11), produce: P_TEXT, chromaMult: SCALE_C_DARK[11].inkMult, inkMaxC: SCALE_C_DARK[11].inkMaxC, chromaFloor: SCALE_C_DARK[11].chromaFloor, require: T11 }
|
|
871
980
|
],
|
|
872
981
|
roles: [
|
|
873
982
|
{ role: "cta", produce: { hue: "constant", L: "anchor", chroma: "brand" }, floorL: DARK_CTA_MIN_L, chromaMult: 1 },
|
|
@@ -2304,7 +2413,7 @@ function resolveRamp(hex, mode, spec, opts) {
|
|
|
2304
2413
|
let placed;
|
|
2305
2414
|
let clamped = false, unresolvable;
|
|
2306
2415
|
if (mode === "light") {
|
|
2307
|
-
if (sp.group
|
|
2416
|
+
if (inkLane(sp.group)) {
|
|
2308
2417
|
if (!sp.require) throw new Error(`light ink stop ${sp.stop} must declare a contrast require`);
|
|
2309
2418
|
placed = placeLightText(ctx, sp.rootL, sp.chromaMult ?? 1, maxLForOf(sp.require, sp.stop, false), INK_DEEPEN, sp.inkMaxC);
|
|
2310
2419
|
clamped = true;
|
|
@@ -2328,8 +2437,8 @@ function resolveRamp(hex, mode, spec, opts) {
|
|
|
2328
2437
|
}
|
|
2329
2438
|
} else {
|
|
2330
2439
|
const d = dctx;
|
|
2331
|
-
const inkTwin = sp.group
|
|
2332
|
-
const chromaAt = sp.group
|
|
2440
|
+
const inkTwin = inkLane(sp.group) && ctx.opts?.deltaCarry && ctx.opts?.chromaCurve ? ctx.opts.deltaLightStops?.find((s) => s.stop === sp.stop) : void 0;
|
|
2441
|
+
const chromaAt = inkLane(sp.group) ? inkTwin ? ((_L) => inkTwin.C) : darkInkChromaAt(ctx, d, sp.chromaFloor ?? chromaFloorBase(sp.stop), sp.chromaMult ?? 1, sp.inkMaxC) : darkScaleChromaAt(ctx, d, Math.max(0, sp.stop - 1), sp.satFraction ?? 1);
|
|
2333
2442
|
let spineH = null;
|
|
2334
2443
|
const dl = ctx.opts?.deltaLightStops;
|
|
2335
2444
|
const ls = dl && sp.stop >= 1 && sp.stop <= 8 ? dl.find((s) => s.stop === sp.stop) : void 0;
|
|
@@ -2349,7 +2458,7 @@ function resolveRamp(hex, mode, spec, opts) {
|
|
|
2349
2458
|
}
|
|
2350
2459
|
if (ctx.opts.deltaHKPlace) L = perceptualRungL(sp.rootL, ls.C, ls.H);
|
|
2351
2460
|
if (ctx.opts.deltaLiftFloor) L = Math.max(L, sp.rootL);
|
|
2352
|
-
if (ctx.opts.deltaChromaEq && sp.group
|
|
2461
|
+
if (ctx.opts.deltaChromaEq && !inkLane(sp.group)) C2 = ctx.cAt("dark", L, perceptualDarkC(L, ls.H, ctx.brandC));
|
|
2353
2462
|
placed = { L, C: C2, H: spineH ?? ls.H };
|
|
2354
2463
|
} else if (sp.produce.L === "fixed") {
|
|
2355
2464
|
placed = ls ? placeDarkDelta(d, sp.rootL, chromaAt, ls) : { L: sp.rootL, C: chromaAt(sp.rootL), H: d.darkHueAtL(sp.rootL) };
|
|
@@ -2569,10 +2678,7 @@ function generateScale(hex, scaleName, forcedArchetype, opts) {
|
|
|
2569
2678
|
const dark = darkRamp.stops.filter((s) => s.stop >= 1).map(toStop).sort((a, b) => a.stop - b.stop);
|
|
2570
2679
|
const p0Light = lightRamp.stops.find((s) => s.stop === 0);
|
|
2571
2680
|
const p0Dark = darkRamp.stops.find((s) => s.stop === 0);
|
|
2572
|
-
const
|
|
2573
|
-
const a = arr.find((s) => s.stop === 10), b = arr.find((s) => s.stop === 11);
|
|
2574
|
-
return a && b ? makeStop(12, b.L + (b.L - a.L) * INK0_SEAM_OVERSHOOT, b.C, b.H) : void 0;
|
|
2575
|
-
};
|
|
2681
|
+
const inkPole = (arr, L) => arr.find((s) => s.stop === 11) ? makeStop(12, L, 0, arr.find((s) => s.stop === 11).H) : void 0;
|
|
2576
2682
|
const cta = makeStop(9, lightRamp.roles.cta.L, lightRamp.roles.cta.C, lightRamp.roles.cta.H);
|
|
2577
2683
|
const ctaDark = makeStop(9, darkRamp.roles.cta.L, darkRamp.roles.cta.C, darkRamp.roles.cta.H);
|
|
2578
2684
|
const roleStop = (r, stop) => makeStop(stop, r.L, r.C, r.H);
|
|
@@ -2596,8 +2702,8 @@ function generateScale(hex, scaleName, forcedArchetype, opts) {
|
|
|
2596
2702
|
identityHex: hex.toUpperCase(),
|
|
2597
2703
|
paper0: p0Light ? makeStop(0, p0Light.L, p0Light.C, p0Light.H) : void 0,
|
|
2598
2704
|
paper0Dark: p0Dark ? makeStop(0, p0Dark.L, p0Dark.C, p0Dark.H) : void 0,
|
|
2599
|
-
ink0:
|
|
2600
|
-
ink0Dark:
|
|
2705
|
+
ink0: inkPole(light, 0),
|
|
2706
|
+
ink0Dark: inkPole(dark, 1)
|
|
2601
2707
|
};
|
|
2602
2708
|
}
|
|
2603
2709
|
function generateNeutralScale(brandH, level = "default", contrastProfile) {
|
|
@@ -2773,15 +2879,15 @@ var SYSTEM = {
|
|
|
2773
2879
|
// ("fills" reworded 2026-08-18: fill became a label word and is foreign here;
|
|
2774
2880
|
// "on-color" reworded 2026-08-28: the bare on fed the "on" flood)
|
|
2775
2881
|
"system/alpha/ink": { req: "soft text pole for quiet CTAs" },
|
|
2776
|
-
"system/alpha/
|
|
2777
|
-
"system/alpha/
|
|
2778
|
-
"system/alpha/
|
|
2882
|
+
"system/alpha/away-from-bg/06": OFFSET,
|
|
2883
|
+
"system/alpha/away-from-bg/08": OFFSET,
|
|
2884
|
+
"system/alpha/away-from-bg/16": OFFSET,
|
|
2779
2885
|
// the inverse ladder: the offset rungs with the pole flipped per mode, for
|
|
2780
2886
|
// washes and edges over inverted backgrounds ("interaction" avoided in the
|
|
2781
2887
|
// bodies: acti-ON would feed the "on" flood)
|
|
2782
|
-
"system/alpha/
|
|
2783
|
-
"system/alpha/
|
|
2784
|
-
"system/alpha/
|
|
2888
|
+
"system/alpha/toward-bg/06": OFFSET_INVERSE,
|
|
2889
|
+
"system/alpha/toward-bg/08": OFFSET_INVERSE,
|
|
2890
|
+
"system/alpha/toward-bg/16": OFFSET_INVERSE,
|
|
2785
2891
|
"system/alpha/shadow-04": SHADOW,
|
|
2786
2892
|
"system/alpha/shadow-08": SHADOW,
|
|
2787
2893
|
"system/alpha/shadow-12": SHADOW,
|
|
@@ -2792,12 +2898,12 @@ var SYSTEM = {
|
|
|
2792
2898
|
"system/surface/mid": PLANE("raised plane \u2014 cards, menus"),
|
|
2793
2899
|
// ("overlays" reworded 2026-08-13: paper-overlay took the word as a label — the C50 law)
|
|
2794
2900
|
"system/surface/high": PLANE("topmost plane \u2014 modals, dialogs"),
|
|
2795
|
-
"system/link/default": LINK("", AA_BODY),
|
|
2796
|
-
"system/link/hover": LINK(" pointer-over", AA_BODY),
|
|
2797
|
-
"system/link/pressed": LINK(" pressed", AAA_BODY),
|
|
2798
|
-
"system/link/inverse": LINK_INVERSE("", AA_BODY),
|
|
2799
|
-
"system/link/inverse
|
|
2800
|
-
"system/link/inverse
|
|
2901
|
+
"system/link/default/enabled": LINK("", AA_BODY),
|
|
2902
|
+
"system/link/default/hover": LINK(" pointer-over", AA_BODY),
|
|
2903
|
+
"system/link/default/pressed": LINK(" pressed", AAA_BODY),
|
|
2904
|
+
"system/link/inverse/enabled": LINK_INVERSE("", AA_BODY),
|
|
2905
|
+
"system/link/inverse/hover": LINK_INVERSE(" pointer-over", AA_BODY),
|
|
2906
|
+
"system/link/inverse/pressed": LINK_INVERSE(" pressed", AAA_BODY)
|
|
2801
2907
|
};
|
|
2802
2908
|
var PREFIXES = [
|
|
2803
2909
|
// community spellings FIRST: the 2026-08-21 family rename made the ext word a
|
|
@@ -3362,112 +3468,6 @@ function resolveTheme(input) {
|
|
|
3362
3468
|
};
|
|
3363
3469
|
}
|
|
3364
3470
|
|
|
3365
|
-
// src/engine/tokenNames.ts
|
|
3366
|
-
var SHARED_NAMES = {
|
|
3367
|
-
1: "paper-99",
|
|
3368
|
-
2: "paper-97",
|
|
3369
|
-
// stop 3 renamed wash-3 → paper-3 (owner 2026-07-24, elevation round): it is a
|
|
3370
|
-
// PLANE in both themes (light sink / dark pop), so it belongs to the surface band.
|
|
3371
|
-
// NAME ONLY — generation is index-keyed and unchanged; the internal wash machinery
|
|
3372
|
-
// (reqtoken groupOf, collision WASH_STOPS) deliberately still spans stops 3–7.
|
|
3373
|
-
// Stage B (owner 2026-08-07, names only): relabeled to the ROOT_L-derived digit,
|
|
3374
|
-
// paper-95 — same band, same index.
|
|
3375
|
-
3: "paper-95",
|
|
3376
|
-
4: "wash-92",
|
|
3377
|
-
5: "wash-89",
|
|
3378
|
-
6: "wash-85",
|
|
3379
|
-
7: "wash-80",
|
|
3380
|
-
8: "wax-74",
|
|
3381
|
-
// THE INK BAND (C49, owner 2026-08-05): the first text stop + emphasis fill (the
|
|
3382
|
-
// 2026-07-29 highlight collapse — the old highlight-9 and on-highlight are
|
|
3383
|
-
// deleted; this stop carries both jobs, its on-color a paper token), the between
|
|
3384
|
-
// text stop (a value the retired text-cta hover state used to generate bespokely,
|
|
3385
|
-
// promoted to a normal stop), and the strong text stop. The three read as states
|
|
3386
|
-
// ARE the text-style cta (owner 2026-08-12). C49 restored the top
|
|
3387
|
-
// two pre-collapse stop INDICES (11, and the off-scale anchor's 12 — emitted as a
|
|
3388
|
-
// literal in cssRender, not through this table) with the between stop taking the
|
|
3389
|
-
// vacated index 10; the indices (9/10/11) are unchanged since.
|
|
3390
|
-
9: "lead-53",
|
|
3391
|
-
10: "ink-42",
|
|
3392
|
-
11: "ink-30"
|
|
3393
|
-
};
|
|
3394
|
-
var SCALE_STOP_COUNT = Object.keys(SHARED_NAMES).length;
|
|
3395
|
-
function stopTokenName(stop) {
|
|
3396
|
-
const name = SHARED_NAMES[stop];
|
|
3397
|
-
if (!name) throw new Error(`stopTokenName: unexpected stop ${stop}`);
|
|
3398
|
-
return name;
|
|
3399
|
-
}
|
|
3400
|
-
var PAPER_100 = "paper-100";
|
|
3401
|
-
var INK_0 = "ink-0";
|
|
3402
|
-
var STAMP_FILL = "stamp-fill";
|
|
3403
|
-
var STAMP_FILL_HOVER = "stamp-fill-hover";
|
|
3404
|
-
var STAMP_FILL_PRESSED = "stamp-fill-pressed";
|
|
3405
|
-
var STAMP_EDGE = "stamp-edge";
|
|
3406
|
-
var STAMP_ON = "stamp-on";
|
|
3407
|
-
var STAMP_STATE_LEAVES = {
|
|
3408
|
-
[STAMP_FILL]: "stamp/fill",
|
|
3409
|
-
[STAMP_FILL_HOVER]: "stamp/fill-hover",
|
|
3410
|
-
[STAMP_FILL_PRESSED]: "stamp/fill-pressed",
|
|
3411
|
-
[STAMP_EDGE]: "stamp/edge",
|
|
3412
|
-
[STAMP_ON]: "stamp/on"
|
|
3413
|
-
};
|
|
3414
|
-
var STAMP_LEAF = {
|
|
3415
|
-
FILL: STAMP_STATE_LEAVES[STAMP_FILL],
|
|
3416
|
-
FILL_HOVER: STAMP_STATE_LEAVES[STAMP_FILL_HOVER],
|
|
3417
|
-
FILL_PRESSED: STAMP_STATE_LEAVES[STAMP_FILL_PRESSED],
|
|
3418
|
-
EDGE: STAMP_STATE_LEAVES[STAMP_EDGE],
|
|
3419
|
-
ON: STAMP_STATE_LEAVES[STAMP_ON]
|
|
3420
|
-
};
|
|
3421
|
-
var SYSTEM_LEAF = {
|
|
3422
|
-
ABS_BLACK: "system/abs-black",
|
|
3423
|
-
ABS_WHITE: "system/abs-white",
|
|
3424
|
-
SURFACE: {
|
|
3425
|
-
DIM: "system/surface/dim",
|
|
3426
|
-
LOW: "system/surface/low",
|
|
3427
|
-
MID: "system/surface/mid",
|
|
3428
|
-
HIGH: "system/surface/high"
|
|
3429
|
-
},
|
|
3430
|
-
ALPHA: {
|
|
3431
|
-
TRANSPARENT: "system/alpha/transparent",
|
|
3432
|
-
SCRIM: "system/alpha/abs-black-060",
|
|
3433
|
-
INK: "system/alpha/ink",
|
|
3434
|
-
OFFSET_006: "system/alpha/006",
|
|
3435
|
-
OFFSET_008: "system/alpha/008",
|
|
3436
|
-
OFFSET_016: "system/alpha/016",
|
|
3437
|
-
// the INVERSE offset ladder (owner 2026-08-29, the interaction round): the
|
|
3438
|
-
// same rungs with the pole flipped per mode — white in light, black in dark
|
|
3439
|
-
// — STATE LAYERS for INVERTED grounds, whose polarity is opposite the
|
|
3440
|
-
// page's. (Never call these a "wash": that word belongs to the tinted band
|
|
3441
|
-
// stops.) The reversal lives in the engine (the system/surface posture): a
|
|
3442
|
-
// consumer on an inverted ground names one token and never picks a pole.
|
|
3443
|
-
// Colored fills never ride these; their states stay engine-solved stops.
|
|
3444
|
-
INVERSE_006: "system/alpha/inverse-006",
|
|
3445
|
-
INVERSE_008: "system/alpha/inverse-008",
|
|
3446
|
-
INVERSE_016: "system/alpha/inverse-016",
|
|
3447
|
-
SHADOW_04: "system/alpha/shadow-04",
|
|
3448
|
-
SHADOW_08: "system/alpha/shadow-08",
|
|
3449
|
-
SHADOW_12: "system/alpha/shadow-12"
|
|
3450
|
-
}
|
|
3451
|
-
};
|
|
3452
|
-
var SURFACE_PLANE_LAW = {
|
|
3453
|
-
[SYSTEM_LEAF.SURFACE.DIM]: { light: SHARED_NAMES[3], dark: PAPER_100 },
|
|
3454
|
-
[SYSTEM_LEAF.SURFACE.LOW]: { light: SHARED_NAMES[2], dark: SHARED_NAMES[1] },
|
|
3455
|
-
[SYSTEM_LEAF.SURFACE.MID]: { light: SHARED_NAMES[1], dark: SHARED_NAMES[2] },
|
|
3456
|
-
[SYSTEM_LEAF.SURFACE.HIGH]: { light: PAPER_100, dark: SHARED_NAMES[3] }
|
|
3457
|
-
};
|
|
3458
|
-
var TOKEN_ORDER = [
|
|
3459
|
-
...Object.values(SHARED_NAMES),
|
|
3460
|
-
STAMP_FILL,
|
|
3461
|
-
STAMP_FILL_HOVER,
|
|
3462
|
-
STAMP_FILL_PRESSED,
|
|
3463
|
-
STAMP_ON,
|
|
3464
|
-
"identity"
|
|
3465
|
-
];
|
|
3466
|
-
function tokenOrder(name) {
|
|
3467
|
-
const i = TOKEN_ORDER.indexOf(name);
|
|
3468
|
-
return i === -1 ? TOKEN_ORDER.length : i;
|
|
3469
|
-
}
|
|
3470
|
-
|
|
3471
3471
|
// src/engine/cssRender.ts
|
|
3472
3472
|
var { brandPrimary: CSS_BRAND, brandSecondary: CSS_SECONDARY, neutral: CSS_NEUTRAL } = CSS_FAMILY;
|
|
3473
3473
|
function toHex2(r, g2, b) {
|
|
@@ -3498,8 +3498,8 @@ function pageStopFor(neutral, mode) {
|
|
|
3498
3498
|
}
|
|
3499
3499
|
var OFFSET_ALPHAS = { 6: 0.06, 8: 0.08, 16: 0.16 };
|
|
3500
3500
|
var ctaBorderRung = (prefix) => prefix === CSS_NEUTRAL ? 8 : prefix === CSS_SECONDARY ? 6 : 16;
|
|
3501
|
-
var offsetLeafName = (rung) => String(rung).padStart(
|
|
3502
|
-
var offsetVarName = (rung) => `--alpha-${offsetLeafName(rung)}`;
|
|
3501
|
+
var offsetLeafName = (rung) => String(rung).padStart(2, "0");
|
|
3502
|
+
var offsetVarName = (rung) => `--alpha-away-from-bg-${offsetLeafName(rung)}`;
|
|
3503
3503
|
var SHADOW_ALPHAS = {
|
|
3504
3504
|
4: { light: 0.04, dark: 0.32 },
|
|
3505
3505
|
8: { light: 0.08, dark: 0.48 },
|
|
@@ -3512,11 +3512,11 @@ var offsetRgba = (rung, mode) => mode === "light" ? `rgba(0, 0, 0, ${OFFSET_ALPH
|
|
|
3512
3512
|
var alphaRootVars = (mode) => [
|
|
3513
3513
|
` ${TRANSPARENT_VAR}: transparent;`,
|
|
3514
3514
|
...Object.keys(OFFSET_ALPHAS).map(Number).sort((a, b) => a - b).map((r) => ` ${offsetVarName(r)}: ${offsetRgba(r, mode)};`),
|
|
3515
|
-
// the
|
|
3516
|
-
//
|
|
3517
|
-
// is the tinted band's). One spelling with the Figma
|
|
3518
|
-
// --alpha-
|
|
3519
|
-
...Object.keys(OFFSET_ALPHAS).map(Number).sort((a, b) => a - b).map((r) => ` --alpha-
|
|
3515
|
+
// the toward-bg ladder (the 2026-08-29 inverse ladder, renamed 2026-08-31): the
|
|
3516
|
+
// same rungs, pole flipped per mode — state layers for INVERTED grounds (never
|
|
3517
|
+
// called a "wash" — that word is the tinted band's). One spelling with the Figma
|
|
3518
|
+
// row: --alpha-toward-bg-06 ↔ system/alpha/toward-bg/06.
|
|
3519
|
+
...Object.keys(OFFSET_ALPHAS).map(Number).sort((a, b) => a - b).map((r) => ` --alpha-toward-bg-${offsetLeafName(r)}: ${offsetRgba(r, mode === "light" ? "dark" : "light")};`)
|
|
3520
3520
|
];
|
|
3521
3521
|
function ctaPageLc(s, mode, page) {
|
|
3522
3522
|
const cta = mode === "light" ? s.cta : s.ctaDark;
|
|
@@ -3945,13 +3945,13 @@ function themeToFigma(r, input) {
|
|
|
3945
3945
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.TRANSPARENT, pole(true, 0));
|
|
3946
3946
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.SCRIM, pole(false, SCRIM_ALPHA));
|
|
3947
3947
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.INK, pole(mode === "dark", SOFT_ON_CTA_ALPHA[mode]));
|
|
3948
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3949
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3950
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3948
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.AWAY_FROM_BG_06, OFFSET_TOKEN(6, mode));
|
|
3949
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.AWAY_FROM_BG_08, OFFSET_TOKEN(8, mode));
|
|
3950
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.AWAY_FROM_BG_16, OFFSET_TOKEN(16, mode));
|
|
3951
3951
|
const inv = mode === "light" ? "dark" : "light";
|
|
3952
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3953
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3954
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3952
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.TOWARD_BG_06, OFFSET_TOKEN(6, inv));
|
|
3953
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.TOWARD_BG_08, OFFSET_TOKEN(8, inv));
|
|
3954
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.TOWARD_BG_16, OFFSET_TOKEN(16, inv));
|
|
3955
3955
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.SHADOW_04, pole(false, SHADOW_ALPHAS[4][mode]));
|
|
3956
3956
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.SHADOW_08, pole(false, SHADOW_ALPHAS[8][mode]));
|
|
3957
3957
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.SHADOW_12, pole(false, SHADOW_ALPHAS[12][mode]));
|
package/dist-lib/index.mjs
CHANGED
|
@@ -326,7 +326,7 @@ var NEUTRAL_TINT_POINTS = {
|
|
|
326
326
|
[0.801, 0.653],
|
|
327
327
|
// wash-7 │
|
|
328
328
|
[0.738, 0.505],
|
|
329
|
-
//
|
|
329
|
+
// wax-74
|
|
330
330
|
[0.6, 0.4],
|
|
331
331
|
// knee (ex-scaffold) the drop-off: hue fades as you climb
|
|
332
332
|
[0.56, 0.347],
|
|
@@ -352,7 +352,7 @@ var NEUTRAL_TINT_POINTS = {
|
|
|
352
352
|
[0.42, 0.653],
|
|
353
353
|
// wash-7
|
|
354
354
|
[0.55, 0.505],
|
|
355
|
-
//
|
|
355
|
+
// wax-74
|
|
356
356
|
[0.6, 0.4],
|
|
357
357
|
// knee (ex-scaffold)
|
|
358
358
|
[0.64, 0.347],
|
|
@@ -721,10 +721,119 @@ function perceptualDarkC(L, H2, nativeC, keep = KEEP_DARK, gamut = MASTER_GAMUT)
|
|
|
721
721
|
return solveCForApparent(L, H2, grayApparentL(L, gamut) + keep * meanBoost(L, nativeC, gamut), gamut);
|
|
722
722
|
}
|
|
723
723
|
|
|
724
|
+
// src/engine/tokenNames.ts
|
|
725
|
+
var SHARED_NAMES = {
|
|
726
|
+
1: "paper-99",
|
|
727
|
+
2: "paper-97",
|
|
728
|
+
// stop 3 renamed wash-3 → paper-3 (owner 2026-07-24, elevation round): it is a
|
|
729
|
+
// PLANE in both themes (light sink / dark pop), so it belongs to the surface band.
|
|
730
|
+
// NAME ONLY — generation is index-keyed and unchanged; the wash-collision machinery
|
|
731
|
+
// (collision.ts WASH_STOPS) deliberately still spans stops 3–7. (The requirement
|
|
732
|
+
// spec's `group` label followed the band to 'paper' on 2026-08-31 — labels only,
|
|
733
|
+
// the spans never moved; see spec.ts groupOf.)
|
|
734
|
+
// Stage B (owner 2026-08-07, names only): relabeled to the ROOT_L-derived digit,
|
|
735
|
+
// paper-95 — same band, same index.
|
|
736
|
+
3: "paper-95",
|
|
737
|
+
4: "wash-92",
|
|
738
|
+
5: "wash-89",
|
|
739
|
+
6: "wash-85",
|
|
740
|
+
7: "wash-80",
|
|
741
|
+
8: "wax-74",
|
|
742
|
+
// THE INK BAND (C49, owner 2026-08-05): the first text stop + emphasis fill (the
|
|
743
|
+
// 2026-07-29 highlight collapse — the old highlight-9 and on-highlight are
|
|
744
|
+
// deleted; this stop carries both jobs, its on-color a paper token), the between
|
|
745
|
+
// text stop (a value the retired text-cta hover state used to generate bespokely,
|
|
746
|
+
// promoted to a normal stop), and the strong text stop. The three read as states
|
|
747
|
+
// ARE the text-style cta (owner 2026-08-12). C49 restored the top
|
|
748
|
+
// two pre-collapse stop INDICES (11, and the off-scale anchor's 12 — emitted as a
|
|
749
|
+
// literal in cssRender, not through this table) with the between stop taking the
|
|
750
|
+
// vacated index 10; the indices (9/10/11) are unchanged since.
|
|
751
|
+
9: "lead-53",
|
|
752
|
+
10: "ink-42",
|
|
753
|
+
11: "ink-30"
|
|
754
|
+
};
|
|
755
|
+
var SCALE_STOP_COUNT = Object.keys(SHARED_NAMES).length;
|
|
756
|
+
function stopTokenName(stop) {
|
|
757
|
+
const name = SHARED_NAMES[stop];
|
|
758
|
+
if (!name) throw new Error(`stopTokenName: unexpected stop ${stop}`);
|
|
759
|
+
return name;
|
|
760
|
+
}
|
|
761
|
+
var PAPER_100 = "paper-100";
|
|
762
|
+
var INK_0 = "ink-0";
|
|
763
|
+
var STAMP_FILL = "stamp-fill";
|
|
764
|
+
var STAMP_FILL_HOVER = "stamp-fill-hover";
|
|
765
|
+
var STAMP_FILL_PRESSED = "stamp-fill-pressed";
|
|
766
|
+
var STAMP_EDGE = "stamp-edge";
|
|
767
|
+
var STAMP_ON = "stamp-on";
|
|
768
|
+
var STAMP_STATE_LEAVES = {
|
|
769
|
+
[STAMP_FILL]: "stamp/fill",
|
|
770
|
+
[STAMP_FILL_HOVER]: "stamp/fill-hover",
|
|
771
|
+
[STAMP_FILL_PRESSED]: "stamp/fill-pressed",
|
|
772
|
+
[STAMP_EDGE]: "stamp/edge",
|
|
773
|
+
[STAMP_ON]: "stamp/on"
|
|
774
|
+
};
|
|
775
|
+
var STAMP_LEAF = {
|
|
776
|
+
FILL: STAMP_STATE_LEAVES[STAMP_FILL],
|
|
777
|
+
FILL_HOVER: STAMP_STATE_LEAVES[STAMP_FILL_HOVER],
|
|
778
|
+
FILL_PRESSED: STAMP_STATE_LEAVES[STAMP_FILL_PRESSED],
|
|
779
|
+
EDGE: STAMP_STATE_LEAVES[STAMP_EDGE],
|
|
780
|
+
ON: STAMP_STATE_LEAVES[STAMP_ON]
|
|
781
|
+
};
|
|
782
|
+
var SYSTEM_LEAF = {
|
|
783
|
+
ABS_BLACK: "system/abs-black",
|
|
784
|
+
ABS_WHITE: "system/abs-white",
|
|
785
|
+
SURFACE: {
|
|
786
|
+
DIM: "system/surface/dim",
|
|
787
|
+
LOW: "system/surface/low",
|
|
788
|
+
MID: "system/surface/mid",
|
|
789
|
+
HIGH: "system/surface/high"
|
|
790
|
+
},
|
|
791
|
+
ALPHA: {
|
|
792
|
+
TRANSPARENT: "system/alpha/transparent",
|
|
793
|
+
SCRIM: "system/alpha/abs-black-060",
|
|
794
|
+
INK: "system/alpha/ink",
|
|
795
|
+
// the DIRECTIONAL ladders (owner 2026-08-31, renaming the 2026-08-18 bare rungs
|
|
796
|
+
// and the 2026-08-29 inverse ladder): away-from-bg is the page-polarity pole
|
|
797
|
+
// (black in light, white in dark), toward-bg the flipped pole — STATE LAYERS for
|
|
798
|
+
// INVERTED grounds, whose polarity is opposite the page's. (Never call toward-bg
|
|
799
|
+
// a "wash": that word belongs to the tinted band stops.) The reversal lives in
|
|
800
|
+
// the engine: a consumer on an inverted ground names one token and never picks a
|
|
801
|
+
// pole. Colored fills never ride these; their states stay engine-solved stops.
|
|
802
|
+
// Rungs are two-digit percent, harmonizing with shadow-04/08/12.
|
|
803
|
+
AWAY_FROM_BG_06: "system/alpha/away-from-bg/06",
|
|
804
|
+
AWAY_FROM_BG_08: "system/alpha/away-from-bg/08",
|
|
805
|
+
AWAY_FROM_BG_16: "system/alpha/away-from-bg/16",
|
|
806
|
+
TOWARD_BG_06: "system/alpha/toward-bg/06",
|
|
807
|
+
TOWARD_BG_08: "system/alpha/toward-bg/08",
|
|
808
|
+
TOWARD_BG_16: "system/alpha/toward-bg/16",
|
|
809
|
+
SHADOW_04: "system/alpha/shadow-04",
|
|
810
|
+
SHADOW_08: "system/alpha/shadow-08",
|
|
811
|
+
SHADOW_12: "system/alpha/shadow-12"
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
var SURFACE_PLANE_LAW = {
|
|
815
|
+
[SYSTEM_LEAF.SURFACE.DIM]: { light: SHARED_NAMES[3], dark: PAPER_100 },
|
|
816
|
+
[SYSTEM_LEAF.SURFACE.LOW]: { light: SHARED_NAMES[2], dark: SHARED_NAMES[1] },
|
|
817
|
+
[SYSTEM_LEAF.SURFACE.MID]: { light: SHARED_NAMES[1], dark: SHARED_NAMES[2] },
|
|
818
|
+
[SYSTEM_LEAF.SURFACE.HIGH]: { light: PAPER_100, dark: SHARED_NAMES[3] }
|
|
819
|
+
};
|
|
820
|
+
var TOKEN_ORDER = [
|
|
821
|
+
...Object.values(SHARED_NAMES),
|
|
822
|
+
STAMP_FILL,
|
|
823
|
+
STAMP_FILL_HOVER,
|
|
824
|
+
STAMP_FILL_PRESSED,
|
|
825
|
+
STAMP_ON,
|
|
826
|
+
"identity"
|
|
827
|
+
];
|
|
828
|
+
function tokenOrder(name) {
|
|
829
|
+
const i = TOKEN_ORDER.indexOf(name);
|
|
830
|
+
return i === -1 ? TOKEN_ORDER.length : i;
|
|
831
|
+
}
|
|
832
|
+
|
|
724
833
|
// src/engine/requirements/spec.ts
|
|
725
|
-
var
|
|
834
|
+
var inkLane = (g2) => g2 === "lead" || g2 === "ink";
|
|
835
|
+
var groupOf = (stop) => (stop === 0 ? PAPER_100 : stopTokenName(stop)).split("-")[0];
|
|
726
836
|
var PAPER0_DARK_ROOT_L = 0.16;
|
|
727
|
-
var INK0_SEAM_OVERSHOOT = (ROOT_L_DARK[1] - PAPER0_DARK_ROOT_L) / (ROOT_L_DARK[2] - ROOT_L_DARK[1]);
|
|
728
837
|
var PL_LADDER = { hue: "warm-drift", L: "perceptual", chroma: "ladder" };
|
|
729
838
|
var PL_TEXT = { hue: "warm-drift", L: "perceptual", chroma: "brand" };
|
|
730
839
|
var P_LIFT = { hue: "warm-torsion", L: "perceptual-lift", chroma: "ladder" };
|
|
@@ -738,7 +847,7 @@ var ONS = { onFill: { metric: "apca-pole", enforce: true, ratioFloor: 4.5, coEnf
|
|
|
738
847
|
var LIGHT = {
|
|
739
848
|
stops: [
|
|
740
849
|
// paper-100 (paper-0 pre-Stage-B): the resolved ladder extreme — in light it genuinely is white (rootL 1.0, zero chroma)
|
|
741
|
-
{ stop: 0, rootL: 1, group:
|
|
850
|
+
{ stop: 0, rootL: 1, group: groupOf(0), produce: { hue: "warm-drift", L: "fixed", chroma: "ladder" }, satFraction: SCALE_C_LIGHT[0].sat, baseC: SCALE_C_LIGHT[0].base },
|
|
742
851
|
// paper/wash/wax-74: perceptual ladder/envelope blend on the geometric ROOT_L_LIGHT scaffold. Separation
|
|
743
852
|
// falls out of the shape (see above) — no min-separation require. Only stop 8 carries a require: the WCAG
|
|
744
853
|
// 3:1 vs the resolved paper-97 (paper-2) (re-solves automatically since it references paper-97 (paper-2)).
|
|
@@ -754,9 +863,9 @@ var LIGHT = {
|
|
|
754
863
|
// ink text: perceptual + contrast-required. lead-53 (ink-9) is ALSO the emphasis fill (the
|
|
755
864
|
// highlight-9 collapse, owner 2026-07-29). ink-42 (ink-10) is the between text stop (C49) —
|
|
756
865
|
// a normal stop like its neighbors; the three together are the text-register cta.
|
|
757
|
-
{ stop: 9, rootL: ROOT_L_LIGHT[9], group:
|
|
758
|
-
{ stop: 10, rootL: ROOT_L_LIGHT[10], group:
|
|
759
|
-
{ stop: 11, rootL: ROOT_L_LIGHT[11], group:
|
|
866
|
+
{ stop: 9, rootL: ROOT_L_LIGHT[9], group: groupOf(9), produce: PL_TEXT, chromaMult: SCALE_C_LIGHT[9].inkMult, inkMaxC: SCALE_C_LIGHT[9].inkMaxC, chromaFloor: SCALE_C_LIGHT[9].chromaFloor, require: T9 },
|
|
867
|
+
{ stop: 10, rootL: ROOT_L_LIGHT[10], group: groupOf(10), produce: PL_TEXT, chromaMult: SCALE_C_LIGHT[10].inkMult, inkMaxC: SCALE_C_LIGHT[10].inkMaxC, chromaFloor: SCALE_C_LIGHT[10].chromaFloor, require: T10 },
|
|
868
|
+
{ stop: 11, rootL: ROOT_L_LIGHT[11], group: groupOf(11), produce: PL_TEXT, chromaMult: SCALE_C_LIGHT[11].inkMult, inkMaxC: SCALE_C_LIGHT[11].inkMaxC, chromaFloor: SCALE_C_LIGHT[11].chromaFloor, require: T11 }
|
|
760
869
|
],
|
|
761
870
|
roles: [
|
|
762
871
|
{ role: "cta", produce: { hue: "constant", L: "anchor", chroma: "brand" }, floorL: 0, chromaMult: 1 },
|
|
@@ -769,7 +878,7 @@ var DARK = {
|
|
|
769
878
|
stops: [
|
|
770
879
|
// paper-100 (paper-0 pre-Stage-B): the resolved ladder extreme — one seam BELOW paper-99 (paper-1), deep and brand-tinted, never the
|
|
771
880
|
// absolute void (the old hard-coded #000000 was "too much"). Lift applies like the rest of the scale.
|
|
772
|
-
{ stop: 0, rootL: PAPER0_DARK_ROOT_L, group:
|
|
881
|
+
{ stop: 0, rootL: PAPER0_DARK_ROOT_L, group: groupOf(0), produce: P_LIFT, satFraction: SCALE_C_DARK[0].sat },
|
|
773
882
|
// paper/wash 1–7: perceptual on the dark scaffold. stop 8: FIXED at the hand-placed scaffold BUT with the
|
|
774
883
|
// 3:1 non-text require DECLARED (the Stage-5 flip, owner-approved) — the blue-recede failure is prevented
|
|
775
884
|
// BY RULE, not by patch. The require now genuinely PLACES the stop rather than catching a few low-luminance
|
|
@@ -786,9 +895,9 @@ var DARK = {
|
|
|
786
895
|
})),
|
|
787
896
|
// ink text: perceptual + the contrast requires DECLARED in dark too (Stage-5 flip): the scaffold already
|
|
788
897
|
// clears them for every hue (the gate proves it), so values don't move — but the guarantee is now a rule.
|
|
789
|
-
{ stop: 9, rootL: ROOT_L_DARK[9], group:
|
|
790
|
-
{ stop: 10, rootL: ROOT_L_DARK[10], group:
|
|
791
|
-
{ stop: 11, rootL: ROOT_L_DARK[11], group:
|
|
898
|
+
{ stop: 9, rootL: ROOT_L_DARK[9], group: groupOf(9), produce: P_TEXT, chromaMult: SCALE_C_DARK[9].inkMult, inkMaxC: SCALE_C_DARK[9].inkMaxC, chromaFloor: SCALE_C_DARK[9].chromaFloor, require: T9 },
|
|
899
|
+
{ stop: 10, rootL: ROOT_L_DARK[10], group: groupOf(10), produce: P_TEXT, chromaMult: SCALE_C_DARK[10].inkMult, inkMaxC: SCALE_C_DARK[10].inkMaxC, chromaFloor: SCALE_C_DARK[10].chromaFloor, require: T10 },
|
|
900
|
+
{ stop: 11, rootL: ROOT_L_DARK[11], group: groupOf(11), produce: P_TEXT, chromaMult: SCALE_C_DARK[11].inkMult, inkMaxC: SCALE_C_DARK[11].inkMaxC, chromaFloor: SCALE_C_DARK[11].chromaFloor, require: T11 }
|
|
792
901
|
],
|
|
793
902
|
roles: [
|
|
794
903
|
{ role: "cta", produce: { hue: "constant", L: "anchor", chroma: "brand" }, floorL: DARK_CTA_MIN_L, chromaMult: 1 },
|
|
@@ -2225,7 +2334,7 @@ function resolveRamp(hex, mode, spec, opts) {
|
|
|
2225
2334
|
let placed;
|
|
2226
2335
|
let clamped = false, unresolvable;
|
|
2227
2336
|
if (mode === "light") {
|
|
2228
|
-
if (sp.group
|
|
2337
|
+
if (inkLane(sp.group)) {
|
|
2229
2338
|
if (!sp.require) throw new Error(`light ink stop ${sp.stop} must declare a contrast require`);
|
|
2230
2339
|
placed = placeLightText(ctx, sp.rootL, sp.chromaMult ?? 1, maxLForOf(sp.require, sp.stop, false), INK_DEEPEN, sp.inkMaxC);
|
|
2231
2340
|
clamped = true;
|
|
@@ -2249,8 +2358,8 @@ function resolveRamp(hex, mode, spec, opts) {
|
|
|
2249
2358
|
}
|
|
2250
2359
|
} else {
|
|
2251
2360
|
const d = dctx;
|
|
2252
|
-
const inkTwin = sp.group
|
|
2253
|
-
const chromaAt = sp.group
|
|
2361
|
+
const inkTwin = inkLane(sp.group) && ctx.opts?.deltaCarry && ctx.opts?.chromaCurve ? ctx.opts.deltaLightStops?.find((s) => s.stop === sp.stop) : void 0;
|
|
2362
|
+
const chromaAt = inkLane(sp.group) ? inkTwin ? ((_L) => inkTwin.C) : darkInkChromaAt(ctx, d, sp.chromaFloor ?? chromaFloorBase(sp.stop), sp.chromaMult ?? 1, sp.inkMaxC) : darkScaleChromaAt(ctx, d, Math.max(0, sp.stop - 1), sp.satFraction ?? 1);
|
|
2254
2363
|
let spineH = null;
|
|
2255
2364
|
const dl = ctx.opts?.deltaLightStops;
|
|
2256
2365
|
const ls = dl && sp.stop >= 1 && sp.stop <= 8 ? dl.find((s) => s.stop === sp.stop) : void 0;
|
|
@@ -2270,7 +2379,7 @@ function resolveRamp(hex, mode, spec, opts) {
|
|
|
2270
2379
|
}
|
|
2271
2380
|
if (ctx.opts.deltaHKPlace) L = perceptualRungL(sp.rootL, ls.C, ls.H);
|
|
2272
2381
|
if (ctx.opts.deltaLiftFloor) L = Math.max(L, sp.rootL);
|
|
2273
|
-
if (ctx.opts.deltaChromaEq && sp.group
|
|
2382
|
+
if (ctx.opts.deltaChromaEq && !inkLane(sp.group)) C2 = ctx.cAt("dark", L, perceptualDarkC(L, ls.H, ctx.brandC));
|
|
2274
2383
|
placed = { L, C: C2, H: spineH ?? ls.H };
|
|
2275
2384
|
} else if (sp.produce.L === "fixed") {
|
|
2276
2385
|
placed = ls ? placeDarkDelta(d, sp.rootL, chromaAt, ls) : { L: sp.rootL, C: chromaAt(sp.rootL), H: d.darkHueAtL(sp.rootL) };
|
|
@@ -2490,10 +2599,7 @@ function generateScale(hex, scaleName, forcedArchetype, opts) {
|
|
|
2490
2599
|
const dark = darkRamp.stops.filter((s) => s.stop >= 1).map(toStop).sort((a, b) => a.stop - b.stop);
|
|
2491
2600
|
const p0Light = lightRamp.stops.find((s) => s.stop === 0);
|
|
2492
2601
|
const p0Dark = darkRamp.stops.find((s) => s.stop === 0);
|
|
2493
|
-
const
|
|
2494
|
-
const a = arr.find((s) => s.stop === 10), b = arr.find((s) => s.stop === 11);
|
|
2495
|
-
return a && b ? makeStop(12, b.L + (b.L - a.L) * INK0_SEAM_OVERSHOOT, b.C, b.H) : void 0;
|
|
2496
|
-
};
|
|
2602
|
+
const inkPole = (arr, L) => arr.find((s) => s.stop === 11) ? makeStop(12, L, 0, arr.find((s) => s.stop === 11).H) : void 0;
|
|
2497
2603
|
const cta = makeStop(9, lightRamp.roles.cta.L, lightRamp.roles.cta.C, lightRamp.roles.cta.H);
|
|
2498
2604
|
const ctaDark = makeStop(9, darkRamp.roles.cta.L, darkRamp.roles.cta.C, darkRamp.roles.cta.H);
|
|
2499
2605
|
const roleStop = (r, stop) => makeStop(stop, r.L, r.C, r.H);
|
|
@@ -2517,8 +2623,8 @@ function generateScale(hex, scaleName, forcedArchetype, opts) {
|
|
|
2517
2623
|
identityHex: hex.toUpperCase(),
|
|
2518
2624
|
paper0: p0Light ? makeStop(0, p0Light.L, p0Light.C, p0Light.H) : void 0,
|
|
2519
2625
|
paper0Dark: p0Dark ? makeStop(0, p0Dark.L, p0Dark.C, p0Dark.H) : void 0,
|
|
2520
|
-
ink0:
|
|
2521
|
-
ink0Dark:
|
|
2626
|
+
ink0: inkPole(light, 0),
|
|
2627
|
+
ink0Dark: inkPole(dark, 1)
|
|
2522
2628
|
};
|
|
2523
2629
|
}
|
|
2524
2630
|
function generateNeutralScale(brandH, level = "default", contrastProfile) {
|
|
@@ -2694,15 +2800,15 @@ var SYSTEM = {
|
|
|
2694
2800
|
// ("fills" reworded 2026-08-18: fill became a label word and is foreign here;
|
|
2695
2801
|
// "on-color" reworded 2026-08-28: the bare on fed the "on" flood)
|
|
2696
2802
|
"system/alpha/ink": { req: "soft text pole for quiet CTAs" },
|
|
2697
|
-
"system/alpha/
|
|
2698
|
-
"system/alpha/
|
|
2699
|
-
"system/alpha/
|
|
2803
|
+
"system/alpha/away-from-bg/06": OFFSET,
|
|
2804
|
+
"system/alpha/away-from-bg/08": OFFSET,
|
|
2805
|
+
"system/alpha/away-from-bg/16": OFFSET,
|
|
2700
2806
|
// the inverse ladder: the offset rungs with the pole flipped per mode, for
|
|
2701
2807
|
// washes and edges over inverted backgrounds ("interaction" avoided in the
|
|
2702
2808
|
// bodies: acti-ON would feed the "on" flood)
|
|
2703
|
-
"system/alpha/
|
|
2704
|
-
"system/alpha/
|
|
2705
|
-
"system/alpha/
|
|
2809
|
+
"system/alpha/toward-bg/06": OFFSET_INVERSE,
|
|
2810
|
+
"system/alpha/toward-bg/08": OFFSET_INVERSE,
|
|
2811
|
+
"system/alpha/toward-bg/16": OFFSET_INVERSE,
|
|
2706
2812
|
"system/alpha/shadow-04": SHADOW,
|
|
2707
2813
|
"system/alpha/shadow-08": SHADOW,
|
|
2708
2814
|
"system/alpha/shadow-12": SHADOW,
|
|
@@ -2713,12 +2819,12 @@ var SYSTEM = {
|
|
|
2713
2819
|
"system/surface/mid": PLANE("raised plane \u2014 cards, menus"),
|
|
2714
2820
|
// ("overlays" reworded 2026-08-13: paper-overlay took the word as a label — the C50 law)
|
|
2715
2821
|
"system/surface/high": PLANE("topmost plane \u2014 modals, dialogs"),
|
|
2716
|
-
"system/link/default": LINK("", AA_BODY),
|
|
2717
|
-
"system/link/hover": LINK(" pointer-over", AA_BODY),
|
|
2718
|
-
"system/link/pressed": LINK(" pressed", AAA_BODY),
|
|
2719
|
-
"system/link/inverse": LINK_INVERSE("", AA_BODY),
|
|
2720
|
-
"system/link/inverse
|
|
2721
|
-
"system/link/inverse
|
|
2822
|
+
"system/link/default/enabled": LINK("", AA_BODY),
|
|
2823
|
+
"system/link/default/hover": LINK(" pointer-over", AA_BODY),
|
|
2824
|
+
"system/link/default/pressed": LINK(" pressed", AAA_BODY),
|
|
2825
|
+
"system/link/inverse/enabled": LINK_INVERSE("", AA_BODY),
|
|
2826
|
+
"system/link/inverse/hover": LINK_INVERSE(" pointer-over", AA_BODY),
|
|
2827
|
+
"system/link/inverse/pressed": LINK_INVERSE(" pressed", AAA_BODY)
|
|
2722
2828
|
};
|
|
2723
2829
|
var PREFIXES = [
|
|
2724
2830
|
// community spellings FIRST: the 2026-08-21 family rename made the ext word a
|
|
@@ -3283,112 +3389,6 @@ function resolveTheme(input) {
|
|
|
3283
3389
|
};
|
|
3284
3390
|
}
|
|
3285
3391
|
|
|
3286
|
-
// src/engine/tokenNames.ts
|
|
3287
|
-
var SHARED_NAMES = {
|
|
3288
|
-
1: "paper-99",
|
|
3289
|
-
2: "paper-97",
|
|
3290
|
-
// stop 3 renamed wash-3 → paper-3 (owner 2026-07-24, elevation round): it is a
|
|
3291
|
-
// PLANE in both themes (light sink / dark pop), so it belongs to the surface band.
|
|
3292
|
-
// NAME ONLY — generation is index-keyed and unchanged; the internal wash machinery
|
|
3293
|
-
// (reqtoken groupOf, collision WASH_STOPS) deliberately still spans stops 3–7.
|
|
3294
|
-
// Stage B (owner 2026-08-07, names only): relabeled to the ROOT_L-derived digit,
|
|
3295
|
-
// paper-95 — same band, same index.
|
|
3296
|
-
3: "paper-95",
|
|
3297
|
-
4: "wash-92",
|
|
3298
|
-
5: "wash-89",
|
|
3299
|
-
6: "wash-85",
|
|
3300
|
-
7: "wash-80",
|
|
3301
|
-
8: "wax-74",
|
|
3302
|
-
// THE INK BAND (C49, owner 2026-08-05): the first text stop + emphasis fill (the
|
|
3303
|
-
// 2026-07-29 highlight collapse — the old highlight-9 and on-highlight are
|
|
3304
|
-
// deleted; this stop carries both jobs, its on-color a paper token), the between
|
|
3305
|
-
// text stop (a value the retired text-cta hover state used to generate bespokely,
|
|
3306
|
-
// promoted to a normal stop), and the strong text stop. The three read as states
|
|
3307
|
-
// ARE the text-style cta (owner 2026-08-12). C49 restored the top
|
|
3308
|
-
// two pre-collapse stop INDICES (11, and the off-scale anchor's 12 — emitted as a
|
|
3309
|
-
// literal in cssRender, not through this table) with the between stop taking the
|
|
3310
|
-
// vacated index 10; the indices (9/10/11) are unchanged since.
|
|
3311
|
-
9: "lead-53",
|
|
3312
|
-
10: "ink-42",
|
|
3313
|
-
11: "ink-30"
|
|
3314
|
-
};
|
|
3315
|
-
var SCALE_STOP_COUNT = Object.keys(SHARED_NAMES).length;
|
|
3316
|
-
function stopTokenName(stop) {
|
|
3317
|
-
const name = SHARED_NAMES[stop];
|
|
3318
|
-
if (!name) throw new Error(`stopTokenName: unexpected stop ${stop}`);
|
|
3319
|
-
return name;
|
|
3320
|
-
}
|
|
3321
|
-
var PAPER_100 = "paper-100";
|
|
3322
|
-
var INK_0 = "ink-0";
|
|
3323
|
-
var STAMP_FILL = "stamp-fill";
|
|
3324
|
-
var STAMP_FILL_HOVER = "stamp-fill-hover";
|
|
3325
|
-
var STAMP_FILL_PRESSED = "stamp-fill-pressed";
|
|
3326
|
-
var STAMP_EDGE = "stamp-edge";
|
|
3327
|
-
var STAMP_ON = "stamp-on";
|
|
3328
|
-
var STAMP_STATE_LEAVES = {
|
|
3329
|
-
[STAMP_FILL]: "stamp/fill",
|
|
3330
|
-
[STAMP_FILL_HOVER]: "stamp/fill-hover",
|
|
3331
|
-
[STAMP_FILL_PRESSED]: "stamp/fill-pressed",
|
|
3332
|
-
[STAMP_EDGE]: "stamp/edge",
|
|
3333
|
-
[STAMP_ON]: "stamp/on"
|
|
3334
|
-
};
|
|
3335
|
-
var STAMP_LEAF = {
|
|
3336
|
-
FILL: STAMP_STATE_LEAVES[STAMP_FILL],
|
|
3337
|
-
FILL_HOVER: STAMP_STATE_LEAVES[STAMP_FILL_HOVER],
|
|
3338
|
-
FILL_PRESSED: STAMP_STATE_LEAVES[STAMP_FILL_PRESSED],
|
|
3339
|
-
EDGE: STAMP_STATE_LEAVES[STAMP_EDGE],
|
|
3340
|
-
ON: STAMP_STATE_LEAVES[STAMP_ON]
|
|
3341
|
-
};
|
|
3342
|
-
var SYSTEM_LEAF = {
|
|
3343
|
-
ABS_BLACK: "system/abs-black",
|
|
3344
|
-
ABS_WHITE: "system/abs-white",
|
|
3345
|
-
SURFACE: {
|
|
3346
|
-
DIM: "system/surface/dim",
|
|
3347
|
-
LOW: "system/surface/low",
|
|
3348
|
-
MID: "system/surface/mid",
|
|
3349
|
-
HIGH: "system/surface/high"
|
|
3350
|
-
},
|
|
3351
|
-
ALPHA: {
|
|
3352
|
-
TRANSPARENT: "system/alpha/transparent",
|
|
3353
|
-
SCRIM: "system/alpha/abs-black-060",
|
|
3354
|
-
INK: "system/alpha/ink",
|
|
3355
|
-
OFFSET_006: "system/alpha/006",
|
|
3356
|
-
OFFSET_008: "system/alpha/008",
|
|
3357
|
-
OFFSET_016: "system/alpha/016",
|
|
3358
|
-
// the INVERSE offset ladder (owner 2026-08-29, the interaction round): the
|
|
3359
|
-
// same rungs with the pole flipped per mode — white in light, black in dark
|
|
3360
|
-
// — STATE LAYERS for INVERTED grounds, whose polarity is opposite the
|
|
3361
|
-
// page's. (Never call these a "wash": that word belongs to the tinted band
|
|
3362
|
-
// stops.) The reversal lives in the engine (the system/surface posture): a
|
|
3363
|
-
// consumer on an inverted ground names one token and never picks a pole.
|
|
3364
|
-
// Colored fills never ride these; their states stay engine-solved stops.
|
|
3365
|
-
INVERSE_006: "system/alpha/inverse-006",
|
|
3366
|
-
INVERSE_008: "system/alpha/inverse-008",
|
|
3367
|
-
INVERSE_016: "system/alpha/inverse-016",
|
|
3368
|
-
SHADOW_04: "system/alpha/shadow-04",
|
|
3369
|
-
SHADOW_08: "system/alpha/shadow-08",
|
|
3370
|
-
SHADOW_12: "system/alpha/shadow-12"
|
|
3371
|
-
}
|
|
3372
|
-
};
|
|
3373
|
-
var SURFACE_PLANE_LAW = {
|
|
3374
|
-
[SYSTEM_LEAF.SURFACE.DIM]: { light: SHARED_NAMES[3], dark: PAPER_100 },
|
|
3375
|
-
[SYSTEM_LEAF.SURFACE.LOW]: { light: SHARED_NAMES[2], dark: SHARED_NAMES[1] },
|
|
3376
|
-
[SYSTEM_LEAF.SURFACE.MID]: { light: SHARED_NAMES[1], dark: SHARED_NAMES[2] },
|
|
3377
|
-
[SYSTEM_LEAF.SURFACE.HIGH]: { light: PAPER_100, dark: SHARED_NAMES[3] }
|
|
3378
|
-
};
|
|
3379
|
-
var TOKEN_ORDER = [
|
|
3380
|
-
...Object.values(SHARED_NAMES),
|
|
3381
|
-
STAMP_FILL,
|
|
3382
|
-
STAMP_FILL_HOVER,
|
|
3383
|
-
STAMP_FILL_PRESSED,
|
|
3384
|
-
STAMP_ON,
|
|
3385
|
-
"identity"
|
|
3386
|
-
];
|
|
3387
|
-
function tokenOrder(name) {
|
|
3388
|
-
const i = TOKEN_ORDER.indexOf(name);
|
|
3389
|
-
return i === -1 ? TOKEN_ORDER.length : i;
|
|
3390
|
-
}
|
|
3391
|
-
|
|
3392
3392
|
// src/engine/cssRender.ts
|
|
3393
3393
|
var { brandPrimary: CSS_BRAND, brandSecondary: CSS_SECONDARY, neutral: CSS_NEUTRAL } = CSS_FAMILY;
|
|
3394
3394
|
function toHex2(r, g2, b) {
|
|
@@ -3419,8 +3419,8 @@ function pageStopFor(neutral, mode) {
|
|
|
3419
3419
|
}
|
|
3420
3420
|
var OFFSET_ALPHAS = { 6: 0.06, 8: 0.08, 16: 0.16 };
|
|
3421
3421
|
var ctaBorderRung = (prefix) => prefix === CSS_NEUTRAL ? 8 : prefix === CSS_SECONDARY ? 6 : 16;
|
|
3422
|
-
var offsetLeafName = (rung) => String(rung).padStart(
|
|
3423
|
-
var offsetVarName = (rung) => `--alpha-${offsetLeafName(rung)}`;
|
|
3422
|
+
var offsetLeafName = (rung) => String(rung).padStart(2, "0");
|
|
3423
|
+
var offsetVarName = (rung) => `--alpha-away-from-bg-${offsetLeafName(rung)}`;
|
|
3424
3424
|
var SHADOW_ALPHAS = {
|
|
3425
3425
|
4: { light: 0.04, dark: 0.32 },
|
|
3426
3426
|
8: { light: 0.08, dark: 0.48 },
|
|
@@ -3433,11 +3433,11 @@ var offsetRgba = (rung, mode) => mode === "light" ? `rgba(0, 0, 0, ${OFFSET_ALPH
|
|
|
3433
3433
|
var alphaRootVars = (mode) => [
|
|
3434
3434
|
` ${TRANSPARENT_VAR}: transparent;`,
|
|
3435
3435
|
...Object.keys(OFFSET_ALPHAS).map(Number).sort((a, b) => a - b).map((r) => ` ${offsetVarName(r)}: ${offsetRgba(r, mode)};`),
|
|
3436
|
-
// the
|
|
3437
|
-
//
|
|
3438
|
-
// is the tinted band's). One spelling with the Figma
|
|
3439
|
-
// --alpha-
|
|
3440
|
-
...Object.keys(OFFSET_ALPHAS).map(Number).sort((a, b) => a - b).map((r) => ` --alpha-
|
|
3436
|
+
// the toward-bg ladder (the 2026-08-29 inverse ladder, renamed 2026-08-31): the
|
|
3437
|
+
// same rungs, pole flipped per mode — state layers for INVERTED grounds (never
|
|
3438
|
+
// called a "wash" — that word is the tinted band's). One spelling with the Figma
|
|
3439
|
+
// row: --alpha-toward-bg-06 ↔ system/alpha/toward-bg/06.
|
|
3440
|
+
...Object.keys(OFFSET_ALPHAS).map(Number).sort((a, b) => a - b).map((r) => ` --alpha-toward-bg-${offsetLeafName(r)}: ${offsetRgba(r, mode === "light" ? "dark" : "light")};`)
|
|
3441
3441
|
];
|
|
3442
3442
|
function ctaPageLc(s, mode, page) {
|
|
3443
3443
|
const cta = mode === "light" ? s.cta : s.ctaDark;
|
|
@@ -3866,13 +3866,13 @@ function themeToFigma(r, input) {
|
|
|
3866
3866
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.TRANSPARENT, pole(true, 0));
|
|
3867
3867
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.SCRIM, pole(false, SCRIM_ALPHA));
|
|
3868
3868
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.INK, pole(mode === "dark", SOFT_ON_CTA_ALPHA[mode]));
|
|
3869
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3870
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3871
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3869
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.AWAY_FROM_BG_06, OFFSET_TOKEN(6, mode));
|
|
3870
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.AWAY_FROM_BG_08, OFFSET_TOKEN(8, mode));
|
|
3871
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.AWAY_FROM_BG_16, OFFSET_TOKEN(16, mode));
|
|
3872
3872
|
const inv = mode === "light" ? "dark" : "light";
|
|
3873
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3874
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3875
|
-
putLeaf(g2, SYSTEM_LEAF.ALPHA.
|
|
3873
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.TOWARD_BG_06, OFFSET_TOKEN(6, inv));
|
|
3874
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.TOWARD_BG_08, OFFSET_TOKEN(8, inv));
|
|
3875
|
+
putLeaf(g2, SYSTEM_LEAF.ALPHA.TOWARD_BG_16, OFFSET_TOKEN(16, inv));
|
|
3876
3876
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.SHADOW_04, pole(false, SHADOW_ALPHAS[4][mode]));
|
|
3877
3877
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.SHADOW_08, pole(false, SHADOW_ALPHAS[8][mode]));
|
|
3878
3878
|
putLeaf(g2, SYSTEM_LEAF.ALPHA.SHADOW_12, pole(false, SHADOW_ALPHAS[12][mode]));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type Group = 'paper' | 'wash' | '
|
|
1
|
+
export type Group = 'paper' | 'wash' | 'wax' | 'lead' | 'ink';
|
|
2
|
+
export declare const inkLane: (g: string) => boolean;
|
|
2
3
|
export type Producer = {
|
|
3
4
|
hue: 'warm-drift' | 'warm-torsion' | 'constant';
|
|
4
5
|
L: 'perceptual' | 'perceptual-lift' | 'fixed';
|
|
@@ -56,7 +57,6 @@ export type ModeSpec = {
|
|
|
56
57
|
};
|
|
57
58
|
};
|
|
58
59
|
export declare const PAPER0_DARK_ROOT_L = 0.16;
|
|
59
|
-
export declare const INK0_SEAM_OVERSHOOT: number;
|
|
60
60
|
export declare const LIGHT: ModeSpec;
|
|
61
61
|
export declare const DARK: ModeSpec;
|
|
62
62
|
export declare const MODE_SPECS: {
|
|
@@ -28,12 +28,12 @@ export declare const SYSTEM_LEAF: {
|
|
|
28
28
|
readonly TRANSPARENT: "system/alpha/transparent";
|
|
29
29
|
readonly SCRIM: "system/alpha/abs-black-060";
|
|
30
30
|
readonly INK: "system/alpha/ink";
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
31
|
+
readonly AWAY_FROM_BG_06: "system/alpha/away-from-bg/06";
|
|
32
|
+
readonly AWAY_FROM_BG_08: "system/alpha/away-from-bg/08";
|
|
33
|
+
readonly AWAY_FROM_BG_16: "system/alpha/away-from-bg/16";
|
|
34
|
+
readonly TOWARD_BG_06: "system/alpha/toward-bg/06";
|
|
35
|
+
readonly TOWARD_BG_08: "system/alpha/toward-bg/08";
|
|
36
|
+
readonly TOWARD_BG_16: "system/alpha/toward-bg/16";
|
|
37
37
|
readonly SHADOW_04: "system/alpha/shadow-04";
|
|
38
38
|
readonly SHADOW_08: "system/alpha/shadow-08";
|
|
39
39
|
readonly SHADOW_12: "system/alpha/shadow-12";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "okchroma",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Color token engine: one brand hex in, a full WCAG-enforced light+dark token system out (CSS variables, DTCG JSON, Figma variables)",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"audit:alpha": "esbuild scripts/alpha-audit.ts --bundle --platform=node --outfile=dist/alpha-audit.js && node dist/alpha-audit.js",
|
|
34
34
|
"audit:alpha:bless": "esbuild scripts/alpha-audit.ts --bundle --platform=node --outfile=dist/alpha-audit.js && node dist/alpha-audit.js --bless",
|
|
35
35
|
"audit:bless": "esbuild scripts/dark-audit.ts --bundle --platform=node --outfile=dist/dark-audit.js && node dist/dark-audit.js --bless",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
36
|
+
"band-audit": "esbuild scripts/band-audit.ts --bundle --platform=node --outfile=dist/band-audit.js && node dist/band-audit.js",
|
|
37
|
+
"band-audit:bless": "esbuild scripts/band-audit.ts --bundle --platform=node --outfile=dist/band-audit.js && node dist/band-audit.js --bless",
|
|
38
38
|
"audit:divergence": "esbuild scripts/divergence-audit.ts --bundle --platform=node --outfile=dist/divergence-audit.js && node dist/divergence-audit.js",
|
|
39
39
|
"audit:divergence:bless": "esbuild scripts/divergence-audit.ts --bundle --platform=node --outfile=dist/divergence-audit.js && node dist/divergence-audit.js --bless",
|
|
40
40
|
"smooth": "esbuild scripts/smoothness-audit.ts --bundle --platform=node --outfile=dist/smoothness-audit.js && node dist/smoothness-audit.js",
|