{"version":3,"file":"chart-DP3QHdJT.cjs","names":[],"sources":["../src/tokens/chart.ts"],"sourcesContent":["/**\n * Data-visualisation colour tokens.\n *\n * Dark and light are independently *selected*, not flipped: a light palette is\n * not a dark palette inverted, because contrast against the surface runs the\n * opposite direction. Every value here is verified by `chart.validate.test.ts`.\n *\n * The categorical ramp keeps the hue identity of `tokens.colors.inventory` for\n * six of seven slots. The seventh replaces the pale sage `#C3D7A4`, which reads\n * grey (chroma 0.072) and collapses into the green once brought into the\n * lightness band.\n */\n\nexport type ChartMode = 'dark' | 'light';\nexport type ChartMedia = 'screen' | 'export';\n\n/** Slots are assigned in fixed order and never cycled. */\nexport const SERIES_SLOT_COUNT = 7;\n\n/**\n * All-pairs separation is a strictly harder test than adjacent, and it binds a\n * series cap rather than a palette change — no ordering of seven hues can clear\n * it. Chart forms where any two marks can be neighbours (scatter, bubble, small\n * multiples) must not exceed this many series.\n */\nexport const ALL_PAIRS_SERIES_CAP = 3;\n\nexport interface ChartInk {\n  /** Plot gridlines. Recessive. */\n  grid: string;\n  /** Axis lines and ticks. */\n  axis: string;\n  /** Axis and legend text. */\n  label: string;\n  tooltipBg: string;\n  tooltipBorder: string;\n  tooltipText: string;\n  /** Fill opacity for area marks. */\n  areaOpacity: number;\n}\n\nexport interface ChartDiverging {\n  negative: readonly string[];\n  midpoint: string;\n  positive: readonly string[];\n}\n\nexport interface ChartTokenSet {\n  surface: string;\n  series: readonly string[];\n  sequential: readonly string[];\n  diverging: ChartDiverging;\n  ink: ChartInk;\n}\n\nexport const chartTokens: Record<ChartMode, ChartTokenSet> = {\n  dark: {\n    /**\n     * KNOWN STALE. This is the pre-ladder `widget` value, and no surface in the\n     * system is this colour any more — charts now draw on `widget` (#262626).\n     *\n     * It is pinned here rather than tracking the ladder because all three dark\n     * palettes below are tuned against it and none survives the move: the\n     * categorical adjacent-pair check fails, the sequential ramp's darkest step\n     * `#00596a` drops to 1.90:1, and the diverging ramp's `#8d1d00` to 1.66:1,\n     * against a 2:1 floor. Retuning three ramps is its own design exercise, so\n     * it is tracked separately rather than bundled into the ladder change.\n     *\n     * The consequence while this stands: the dark chart palettes are certified\n     * against a background they are not drawn on, and the darkest steps of the\n     * sequential and diverging ramps are in practice below the mark floor.\n     */\n    surface: '#141414',\n    // violet, orange, teal, red-orange, green, blue, yellow\n    series: ['#6737fe', '#cd7a00', '#009ed2', '#fc4400', '#3a9c00', '#0058fb', '#9b9501'],\n    // single-hue teal ramp, dark to light\n    sequential: ['#00596a', '#00819c', '#00a9cf', '#22c9f2', '#7ce0fa'],\n    diverging: {\n      negative: ['#8d1d00', '#ab2600', '#ca3000'],\n      midpoint: '#5e5e5e',\n      positive: ['#00596a', '#00819c', '#00acd0'],\n    },\n    ink: {\n      grid: 'rgba(255, 255, 255, 0.06)',\n      axis: 'rgba(174, 174, 174, 0.55)',\n      label: '#AEAEAE',\n      tooltipBg: '#242424',\n      tooltipBorder: '#2B2B33',\n      tooltipText: '#FFFFFF',\n      areaOpacity: 0.22,\n    },\n  },\n  light: {\n    surface: '#FFFFFF',\n    series: ['#6107fe', '#ac6500', '#0084b0', '#d43800', '#2e8100', '#005cff', '#827d00'],\n    // Pale to saturated: on white the low end must be the light one, and the\n    // palest step still has to clear 2:1 against the surface to read as a mark.\n    sequential: ['#00c4f0', '#00aed5', '#0098bb', '#0083a1', '#006e88'],\n    diverging: {\n      negative: ['#7a1c00', '#b32c00', '#ef4b12'],\n      midpoint: '#888888',\n      positive: ['#003d49', '#00728a', '#00acd0'],\n    },\n    ink: {\n      grid: 'rgba(0, 0, 0, 0.08)',\n      axis: 'rgba(92, 92, 92, 0.55)',\n      label: '#5C5C5C',\n      tooltipBg: '#FFFFFF',\n      tooltipBorder: '#DDDDDD',\n      tooltipText: '#1A1A1A',\n      areaOpacity: 0.18,\n    },\n  },\n};\n"],"mappings":"AAiBA,IAAa,EAAoB,EAQpB,EAAuB,EA8BvB,EAAgD,CAC3D,KAAM,CAgBJ,QAAS,UAET,OAAQ,CAAC,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,SAAS,EAEpF,WAAY,CAAC,UAAW,UAAW,UAAW,UAAW,SAAS,EAClE,UAAW,CACT,SAAU,CAAC,UAAW,UAAW,SAAS,EAC1C,SAAU,UACV,SAAU,CAAC,UAAW,UAAW,SAAS,CAC5C,EACA,IAAK,CACH,KAAM,4BACN,KAAM,4BACN,MAAO,UACP,UAAW,UACX,cAAe,UACf,YAAa,UACb,YAAa,GACf,CACF,EACA,MAAO,CACL,QAAS,UACT,OAAQ,CAAC,UAAW,UAAW,UAAW,UAAW,UAAW,UAAW,SAAS,EAGpF,WAAY,CAAC,UAAW,UAAW,UAAW,UAAW,SAAS,EAClE,UAAW,CACT,SAAU,CAAC,UAAW,UAAW,SAAS,EAC1C,SAAU,UACV,SAAU,CAAC,UAAW,UAAW,SAAS,CAC5C,EACA,IAAK,CACH,KAAM,sBACN,KAAM,yBACN,MAAO,UACP,UAAW,UACX,cAAe,UACf,YAAa,UACb,YAAa,GACf,CACF,CACF"}