@wistia/kaleidoscope 0.0.5 → 0.0.6

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/color-BY2NrNVz.js +148 -0
  3. package/dist/color-BY2NrNVz.js.map +1 -0
  4. package/dist/{color-BD12TVX4.d.ts → color-CwLKMi6Y.d.ts} +4 -25
  5. package/dist/color-CwLKMi6Y.d.ts.map +1 -0
  6. package/dist/engine-B00ZVZ0d.d.ts +85 -0
  7. package/dist/engine-B00ZVZ0d.d.ts.map +1 -0
  8. package/dist/engine-DeOUPRa0.js +661 -0
  9. package/dist/engine-DeOUPRa0.js.map +1 -0
  10. package/dist/entries/color.d.ts +1 -1
  11. package/dist/entries/color.js +3 -2
  12. package/dist/entries/engine.d.ts +3 -0
  13. package/dist/entries/engine.js +10 -0
  14. package/dist/entries/styleRegistry.d.ts +2 -2
  15. package/dist/entries/styleRegistry.js +2 -3
  16. package/dist/entries/validate.d.ts +1 -1
  17. package/dist/entries/validate.js +2 -3
  18. package/dist/entries/vocabulary.d.ts +1 -1
  19. package/dist/entries/vocabulary.js +3 -2
  20. package/dist/{color-C99gJSgH.js → getColorLightnessClassification--FSkjXEx.js} +29 -178
  21. package/dist/getColorLightnessClassification--FSkjXEx.js.map +1 -0
  22. package/dist/guards-t_cf_IOV.js +24 -0
  23. package/dist/guards-t_cf_IOV.js.map +1 -0
  24. package/dist/{index-CG6dL9XZ.d.ts → index-BOJCY_MU.d.ts} +4 -32
  25. package/dist/index-BOJCY_MU.d.ts.map +1 -0
  26. package/dist/index.d.ts +6 -5
  27. package/dist/index.js +9 -6
  28. package/dist/styleRegistry-A0nrsHk-.d.ts +15 -0
  29. package/dist/styleRegistry-A0nrsHk-.d.ts.map +1 -0
  30. package/dist/{styleRegistry-BoviV8Ue.js → styleRegistry-CT4jvu4h.js} +41 -42
  31. package/dist/styleRegistry-CT4jvu4h.js.map +1 -0
  32. package/dist/{styleVocabulary-Kl8p6TDk.js → styleVocabulary-DcxbkEvK.js} +19 -80
  33. package/dist/styleVocabulary-DcxbkEvK.js.map +1 -0
  34. package/dist/typography-BA9Pz8Im.js +65 -0
  35. package/dist/typography-BA9Pz8Im.js.map +1 -0
  36. package/dist/{validate-V28YRNxt.d.ts → validate-Bqx__f3d.d.ts} +2 -6
  37. package/dist/validate-Bqx__f3d.d.ts.map +1 -0
  38. package/dist/{validate-C_h6gEXp.js → validate-D-OR7_3g.js} +20 -46
  39. package/dist/validate-D-OR7_3g.js.map +1 -0
  40. package/package.json +19 -14
  41. package/schema/style-v1.json +7 -2
  42. package/styles/aurora-dark.json +3 -2
  43. package/styles/aurora-light.json +3 -2
  44. package/styles/glass-dark.json +3 -2
  45. package/styles/glass-light.json +3 -2
  46. package/styles/opaque-bright.json +3 -2
  47. package/styles/opaque-heavy.json +3 -2
  48. package/styles/opaque-light.json +3 -2
  49. package/styles/opaque-medium.json +3 -2
  50. package/styles/opaque-minimal.json +3 -2
  51. package/dist/color-BD12TVX4.d.ts.map +0 -1
  52. package/dist/color-C99gJSgH.js.map +0 -1
  53. package/dist/index-CG6dL9XZ.d.ts.map +0 -1
  54. package/dist/styleRegistry-BoviV8Ue.js.map +0 -1
  55. package/dist/styleRegistry-DNVNmafi.d.ts +0 -35
  56. package/dist/styleRegistry-DNVNmafi.d.ts.map +0 -1
  57. package/dist/styleVocabulary-Kl8p6TDk.js.map +0 -1
  58. package/dist/validate-C_h6gEXp.js.map +0 -1
  59. package/dist/validate-V28YRNxt.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getColorLightnessClassification--FSkjXEx.js","names":["HEX_RADIX","WHITE","BLACK","ACHROMATIC_CHROMA","WHITE","BLACK","ALMOST_BLACK","ALMOST_WHITE","FLARE"],"sources":["../src/private/clamp.ts","../src/private/colorSpace.ts","../src/private/parseColor.ts","../src/Color.ts","../src/colorContrastRatiosByShape.ts","../src/private/preciseContrast.ts","../src/adjustColorForProperContrast.ts","../src/ColorScale.ts","../src/getBestColorForText.ts","../src/getBrandDarkBackgroundColor.ts","../src/getBrandLightBackgroundColor.ts","../src/private/maxChroma.ts","../src/private/perceivedLightness.ts","../src/private/buildBrandedColorScale.ts","../src/getColorLightnessClassification.ts"],"sourcesContent":["/** Restrict `value` to the inclusive range between `min` and `max`. */\nexport const clamp = (value: number, min: number, max: number): number =>\n Math.min(Math.max(value, min), max);\n","// oxlint-disable id-length -- single-letter names mirror the color-space formulas\nimport type { Hsl, Lab, RgbTuple } from '../types';\nimport { clamp } from './clamp';\n\nconst D65_WHITE_POINT = { x: 0.95047, y: 1, z: 1.08883 };\n\nconst DEGREES_PER_RADIAN = 180 / Math.PI;\n\n/** Slack allowed on a linear channel before a color counts as out of gamut. */\nconst GAMUT_EPSILON = 1e-6;\n\n/** Enough halvings to place the gamut boundary well inside a single 0–255 step. */\nconst GAMUT_SEARCH_ITERATIONS = 25;\n\n// CIE standard constants: 216/24389 and 24389/27. Their product, 8, is the L* below\n// which the Lab transfer function stays linear.\nconst LAB_EPSILON = 216 / 24389;\nconst LAB_KAPPA = 24389 / 27;\nconst LAB_LINEAR_LIGHTNESS_THRESHOLD = 8;\n\n/** Gamma-decode a 0–255 sRGB channel into linear light. */\nconst linearize = (channel: number): number => {\n const normalized = channel / 255;\n return normalized <= 0.04045 ? normalized / 12.92 : ((normalized + 0.055) / 1.055) ** 2.4;\n};\n\n/**\n * Gamma-encode linear light back into a 0–255 sRGB channel. The sign is carried through\n * the exponent so that out-of-gamut Lab values produce a negative channel rather than NaN.\n * Inverse of linearize.\n */\nconst compand = (linear: number): number => {\n const magnitude = Math.abs(linear);\n const encoded =\n magnitude <= 0.0031308 ? magnitude * 12.92 : 1.055 * magnitude ** (1 / 2.4) - 0.055;\n return encoded * Math.sign(linear) * 255;\n};\n\nconst pivot = (value: number): number =>\n value > LAB_EPSILON ? Math.cbrt(value) : (LAB_KAPPA * value + 16) / 116;\n\nconst hueToChannel = (start: number, end: number, givenHue: number): number => {\n let hue = givenHue;\n if (hue < 0) {\n hue += 1;\n }\n if (hue > 1) {\n hue -= 1;\n }\n if (hue < 1 / 6) {\n return start + (end - start) * 6 * hue;\n }\n if (hue < 1 / 2) {\n return end;\n }\n if (hue < 2 / 3) {\n return start + (end - start) * (2 / 3 - hue) * 6;\n }\n return start;\n};\n\n/**\n * WCAG relative luminance (0–1).\n *\n * @see https://www.w3.org/WAI/GL/wiki/Relative_luminance\n */\nexport const relativeLuminance = (red: number, green: number, blue: number): number =>\n 0.2126 * linearize(red) + 0.7152 * linearize(green) + 0.0722 * linearize(blue);\n\nexport const rgbToHsl = (red: number, green: number, blue: number): Hsl => {\n const r = red / 255;\n const g = green / 255;\n const b = blue / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const lightness = (max + min) / 2;\n const delta = max - min;\n\n if (delta === 0) {\n return { hue: 0, lightness: lightness * 100, saturation: 0 };\n }\n\n const saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n\n let hue: number;\n if (max === r) {\n hue = (g - b) / delta + (g < b ? 6 : 0);\n } else if (max === g) {\n hue = (b - r) / delta + 2;\n } else {\n hue = (r - g) / delta + 4;\n }\n\n return { hue: (hue / 6) * 360, lightness: lightness * 100, saturation: saturation * 100 };\n};\n\nexport const hslToRgb = ({ hue, lightness, saturation }: Hsl): RgbTuple => {\n const h = hue / 360;\n const s = saturation / 100;\n const l = lightness / 100;\n const end = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const start = 2 * l - end;\n\n return [\n hueToChannel(start, end, h + 1 / 3) * 255,\n hueToChannel(start, end, h) * 255,\n hueToChannel(start, end, h - 1 / 3) * 255,\n ];\n};\n\nexport const rgbToLab = (red: number, green: number, blue: number): Lab => {\n const r = linearize(red);\n const g = linearize(green);\n const b = linearize(blue);\n\n const x = (0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / D65_WHITE_POINT.x;\n const y = (0.2126729 * r + 0.7151522 * g + 0.072175 * b) / D65_WHITE_POINT.y;\n const z = (0.0193339 * r + 0.119192 * g + 0.9503041 * b) / D65_WHITE_POINT.z;\n\n const fx = pivot(x);\n const fy = pivot(y);\n const fz = pivot(z);\n\n return { a: 500 * (fx - fy), b: 200 * (fy - fz), lightness: 116 * fy - 16 };\n};\n\n/**\n * OKLab in polar form: perceptual lightness (0–1), chroma (0 at gray, ~0.4 at the most\n * saturated sRGB colors) and hue in degrees. Unlike CIELAB, a fixed `hue` here reads as\n * one hue at every lightness — CIELAB's hue lines bend, which is why lightening a blue\n * along them walks it towards purple.\n *\n * @see https://bottosson.github.io/posts/oklab/\n */\nexport type Oklch = {\n readonly chroma: number;\n readonly hue: number;\n readonly lightness: number;\n};\n\nexport const rgbToOklch = (red: number, green: number, blue: number): Oklch => {\n const r = linearize(red);\n const g = linearize(green);\n const b = linearize(blue);\n\n const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);\n const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);\n const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);\n\n const aAxis = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;\n const bAxis = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;\n\n return {\n chroma: Math.hypot(aAxis, bAxis),\n hue: (Math.atan2(bAxis, aAxis) * DEGREES_PER_RADIAN + 360) % 360,\n lightness: 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,\n };\n};\n\n/** Linear-light sRGB, which runs 0–1 and goes outside that range when out of gamut. */\nconst oklchToLinearRgb = ({ chroma, hue, lightness }: Oklch): RgbTuple => {\n const radians = hue / DEGREES_PER_RADIAN;\n const aAxis = Math.cos(radians) * chroma;\n const bAxis = Math.sin(radians) * chroma;\n\n const l = (lightness + 0.3963377774 * aAxis + 0.2158037573 * bAxis) ** 3;\n const m = (lightness - 0.1055613458 * aAxis - 0.0638541728 * bAxis) ** 3;\n const s = (lightness - 0.0894841775 * aAxis - 1.291485548 * bAxis) ** 3;\n\n return [\n 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,\n -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,\n -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s,\n ];\n};\n\nconst fitsGamut = (oklch: Oklch): boolean =>\n oklchToLinearRgb(oklch).every(\n (channel) => channel >= -GAMUT_EPSILON && channel <= 1 + GAMUT_EPSILON,\n );\n\n/**\n * The most chroma this lightness and hue can hold inside sRGB, found by bisection. A hue\n * only gets so colorful before the gamut runs out, and that ceiling drops away sharply as\n * a color approaches white or black.\n */\nconst maximumChroma = (oklch: Oklch): number => {\n let low = 0;\n let high = oklch.chroma;\n\n for (let iteration = 0; iteration < GAMUT_SEARCH_ITERATIONS; iteration += 1) {\n const mid = (low + high) / 2;\n if (fitsGamut({ ...oklch, chroma: mid })) {\n low = mid;\n } else {\n high = mid;\n }\n }\n\n return low;\n};\n\n/**\n * Convert to sRGB, pulling chroma in until the color fits rather than clamping each\n * channel independently. Clamping is what bends the hue of an out-of-gamut color — a\n * lightened red whose red channel pins at 255 while green keeps climbing arrives at\n * yellow. Trading colorfulness for an exact hue and lightness keeps the family intact.\n */\nexport const oklchToRgb = (oklch: Oklch): RgbTuple => {\n const inGamut = fitsGamut(oklch) ? oklch : { ...oklch, chroma: maximumChroma(oklch) };\n const [red, green, blue] = oklchToLinearRgb(inGamut);\n\n return [compand(clamp(red, 0, 1)), compand(clamp(green, 0, 1)), compand(clamp(blue, 0, 1))];\n};\n\nexport const labToRgb = ({ a, b, lightness }: Lab): RgbTuple => {\n const fy = (lightness + 16) / 116;\n const fx = fy + a / 500;\n const fz = fy - b / 200;\n\n const x = (fx ** 3 > LAB_EPSILON ? fx ** 3 : (116 * fx - 16) / LAB_KAPPA) * D65_WHITE_POINT.x;\n const y =\n (lightness > LAB_LINEAR_LIGHTNESS_THRESHOLD ? fy ** 3 : lightness / LAB_KAPPA) *\n D65_WHITE_POINT.y;\n const z = (fz ** 3 > LAB_EPSILON ? fz ** 3 : (116 * fz - 16) / LAB_KAPPA) * D65_WHITE_POINT.z;\n\n return [\n compand(3.2404542 * x - 1.5371385 * y - 0.4985314 * z),\n compand(-0.969266 * x + 1.8760108 * y + 0.041556 * z),\n compand(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n ];\n};\n","// oxlint-disable id-length -- r/g/b/a are the canonical names for color channels\nimport type { ColorInput, RgbaTuple } from '../types';\nimport { clamp } from './clamp';\n\nconst HEX_PATTERN = /^#?([\\da-f]{3,4}|[\\da-f]{6}|[\\da-f]{8})$/i;\nconst RGB_FUNCTION_PATTERN = /^rgba?\\(([^)]*)\\)$/i;\nconst NUMBER_PATTERN = /^[+-]?(?:\\d+\\.?\\d*|\\.\\d+)$/;\nconst PERCENTAGE_PATTERN = /^[+-]?(?:\\d+\\.?\\d*|\\.\\d+)%$/;\nconst SEPARATOR_PATTERN = /[\\s,]+/;\n\nconst MAX_CHANNEL = 255;\nconst HEX_RADIX = 16;\n\nconst toChannel = (value: number): number => clamp(value, 0, MAX_CHANNEL);\nconst toAlpha = (value: number): number => clamp(value, 0, 1);\n\n/**\n * Read a numeric token, where a percentage is taken as a fraction of `percentageOf`. A\n * channel is `128` or `50%` (of 255); an alpha is `0.5` or `50%` (of 1).\n */\nconst parseNumericToken = (token: string | undefined, percentageOf: number): number | null => {\n if (token === undefined) {\n return null;\n }\n if (PERCENTAGE_PATTERN.test(token)) {\n return (Number(token.slice(0, -1)) / 100) * percentageOf;\n }\n if (NUMBER_PATTERN.test(token)) {\n return Number(token);\n }\n return null;\n};\n\nconst parseChannelToken = (token: string | undefined): number | null => {\n const value = parseNumericToken(token, MAX_CHANNEL);\n return value === null ? null : toChannel(value);\n};\n\nconst parseAlphaToken = (token: string | undefined): number | null => {\n const value = parseNumericToken(token, 1);\n return value === null ? null : toAlpha(value);\n};\n\nconst parseHex = (value: string): RgbaTuple | null => {\n const match = HEX_PATTERN.exec(value);\n const digits = match?.[1];\n if (digits === undefined) {\n return null;\n }\n\n // #rgb and #rgba are shorthand for each digit repeated: #1a2 -> #11aa22\n const expanded = digits.length <= 4 ? digits.replaceAll(/./g, '$&$&') : digits;\n\n return [\n Number.parseInt(expanded.slice(0, 2), HEX_RADIX),\n Number.parseInt(expanded.slice(2, 4), HEX_RADIX),\n Number.parseInt(expanded.slice(4, 6), HEX_RADIX),\n expanded.length === 8 ? Number.parseInt(expanded.slice(6, 8), HEX_RADIX) / MAX_CHANNEL : 1,\n ];\n};\n\nconst parseRgbFunction = (value: string): RgbaTuple | null => {\n const match = RGB_FUNCTION_PATTERN.exec(value);\n const body = match?.[1];\n if (body === undefined) {\n return null;\n }\n\n // Modern syntax puts alpha behind a slash: rgb(41 73 229 / 50%)\n const [channelSource, alphaSource, ...extraSources] = body.split('/');\n if (channelSource === undefined || extraSources.length > 0) {\n return null;\n }\n\n const tokens = channelSource.trim().split(SEPARATOR_PATTERN).filter(Boolean);\n const alphaTokens = (alphaSource ?? '').trim().split(SEPARATOR_PATTERN).filter(Boolean);\n if (alphaTokens.length > 1) {\n return null;\n }\n\n const [redToken, greenToken, blueToken, legacyAlphaToken, ...extraTokens] = tokens;\n if (extraTokens.length > 0) {\n return null;\n }\n if (alphaSource !== undefined && legacyAlphaToken !== undefined) {\n return null;\n }\n\n const red = parseChannelToken(redToken);\n const green = parseChannelToken(greenToken);\n const blue = parseChannelToken(blueToken);\n if (red === null || green === null || blue === null) {\n return null;\n }\n\n const alphaToken = alphaTokens[0] ?? legacyAlphaToken;\n if (alphaToken === undefined) {\n return [red, green, blue, 1];\n }\n\n const alpha = parseAlphaToken(alphaToken);\n return alpha === null ? null : [red, green, blue, alpha];\n};\n\n/**\n * Read any supported color representation into RGBA channels, or `null` when the input\n * is not a color this package understands.\n */\nexport const parseColor = (input: ColorInput): RgbaTuple | null => {\n if (typeof input === 'string') {\n const trimmed = input.trim();\n return parseHex(trimmed) ?? parseRgbFunction(trimmed);\n }\n\n if (Array.isArray(input)) {\n const [red, green, blue, alpha = 1] = input;\n if (![red, green, blue, alpha].every((value) => Number.isFinite(value))) {\n return null;\n }\n return [toChannel(red), toChannel(green), toChannel(blue), toAlpha(alpha)];\n }\n\n const { r, g, b, a = 1 } = input;\n if (![r, g, b, a].every((value) => Number.isFinite(value))) {\n return null;\n }\n return [toChannel(r), toChannel(g), toChannel(b), toAlpha(a)];\n};\n","import type { Oklch } from './private/colorSpace';\nimport type { ColorInput, Hsl, InterpolationMode, Lab, RgbaTuple } from './types';\n// oxlint-disable id-length -- r/g/b/a are the canonical names for color channels\nimport { clamp } from './private/clamp';\nimport {\n hslToRgb,\n labToRgb,\n oklchToRgb,\n relativeLuminance,\n rgbToHsl,\n rgbToLab,\n rgbToOklch,\n} from './private/colorSpace';\nimport { parseColor } from './private/parseColor';\n\nconst HEX_RADIX = 16;\n\n/** The ends of the OKLab lightness axis: white and black. */\nconst MAX_LIGHTNESS = 1;\nconst MIN_LIGHTNESS = 0;\n\nconst DEFAULT_INTERPOLATION_MODE: InterpolationMode = 'oklch';\n\nconst WHITE = '#ffffff';\nconst BLACK = '#000000';\n\n/** Wistia brand blue (`#2949e5`) — what an unreadable input resolves to. */\nconst FALLBACK_CHANNELS: RgbaTuple = [41, 73, 229, 1];\n\nconst toHexPair = (channel: number): string =>\n Math.round(channel).toString(HEX_RADIX).padStart(2, '0');\n\n/**\n * Truncated rather than rounded, so a ratio can never climb across a WCAG threshold on\n * its way to one decimal — 4.4501 reports as 4.4, not as a passing 4.5.\n */\nconst truncateToTenth = (ratio: number): number => Math.floor(ratio * 10) / 10;\n\nconst interpolate = (from: number, to: number, ratio: number): number => from + (to - from) * ratio;\n\n/**\n * Interpolate through linear light rather than gamma-encoded sRGB, which keeps blends\n * between saturated colors from sagging through a muddy midpoint.\n */\nconst interpolateLinear = (from: number, to: number, ratio: number): number =>\n Math.sqrt(from ** 2 * (1 - ratio) + to ** 2 * ratio);\n\n/** Below this much chroma a color reads as gray, and its hue stops meaning anything. */\nconst ACHROMATIC_CHROMA = 1e-4;\n\nconst HALF_TURN = 180;\nconst FULL_TURN = 360;\n\n/**\n * Interpolate hue the short way round the wheel — blue to yellow crosses green or magenta,\n * never both. A gray has no hue of its own to offer, so it borrows the other end's rather\n * than dragging the blend through unrelated hues on the way to white or black.\n */\nconst interpolateHue = (from: Oklch, to: Oklch, ratio: number): number => {\n if (from.chroma < ACHROMATIC_CHROMA) {\n return to.hue;\n }\n if (to.chroma < ACHROMATIC_CHROMA) {\n return from.hue;\n }\n\n const difference = ((to.hue - from.hue + HALF_TURN + FULL_TURN) % FULL_TURN) - HALF_TURN;\n return from.hue + difference * ratio;\n};\n\n/**\n * An immutable sRGB color with transformation methods like lighten, darken, tint, shade.\n * Also includes methods to calculate contrast ratio against another color, relative luminance, etc.\n *\n * @example\n * ```ts\n * new Color('#2949e5').lighten(0.5).toHex(); // '#89aaff'\n * new Color('#2949e5').withAlpha(0.5).toRgba(); // 'rgba(41, 73, 229, 0.5)'\n * new Color('#2949e5').contrast('#ffffff'); // 6.6\n * ```\n */\nexport class Color {\n /**\n * Read `input` into a color, returning `null` when it cannot be parsed.\n */\n static parse(input: ColorInput): Color | null {\n const channels = parseColor(input);\n return channels === null ? null : new Color(channels);\n }\n\n static fromHsl(hsl: Hsl, alpha = 1): Color {\n const [red, green, blue] = hslToRgb(hsl);\n return new Color([red, green, blue, alpha]);\n }\n\n static fromLab(lab: Lab, alpha = 1): Color {\n const [red, green, blue] = labToRgb(lab);\n return new Color([red, green, blue, alpha]);\n }\n\n /** Red channel, 0–255. Kept unrounded so that chained operations don't accumulate error. */\n readonly r: number;\n\n /** Green channel, 0–255. Kept unrounded so that chained operations don't accumulate error. */\n readonly g: number;\n\n /** Blue channel, 0–255. Kept unrounded so that chained operations don't accumulate error. */\n readonly b: number;\n\n /** Alpha channel, 0–1. */\n readonly a: number;\n\n /**\n * @param input - any supported color representation. Input that cannot be read as a\n * color resolves to brand blue rather than failing, so a malformed value degrades to\n * a usable color instead of interrupting a render.\n */\n constructor(input: ColorInput) {\n const [red, green, blue, alpha] = parseColor(input) ?? FALLBACK_CHANNELS;\n this.r = red;\n this.g = green;\n this.b = blue;\n this.a = alpha;\n }\n\n /** `#rrggbb`. Alpha is dropped — use {@link Color.toHexWithAlpha} to keep it. */\n toHex(): string {\n return `#${toHexPair(this.r)}${toHexPair(this.g)}${toHexPair(this.b)}`;\n }\n\n /** `#rrggbbaa`. */\n toHexWithAlpha(): string {\n return `${this.toHex()}${toHexPair(this.a * 255)}`;\n }\n\n /** `rgb(41, 73, 229)`. */\n toRgb(): string {\n return `rgb(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(this.b)})`;\n }\n\n /** `rgba(41, 73, 229, 0.5)`. */\n toRgba(): string {\n return `rgba(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(this.b)}, ${this.a})`;\n }\n\n /** Rounded channels, ready to hand to another color library. */\n toRgbaTuple(): RgbaTuple {\n return [Math.round(this.r), Math.round(this.g), Math.round(this.b), this.a];\n }\n\n toHsl(): Hsl {\n return rgbToHsl(this.r, this.g, this.b);\n }\n\n toLab(): Lab {\n return rgbToLab(this.r, this.g, this.b);\n }\n\n /** Hex when fully opaque, `rgba()` otherwise, so the alpha is never silently lost. */\n toString(): string {\n return this.a === 1 ? this.toHex() : this.toRgba();\n }\n\n /**\n * WCAG relative luminance, from 0 (black) to 1 (white). Alpha is ignored — luminance\n * is only meaningful once a color has been composited onto a background.\n */\n luminance(): number {\n return relativeLuminance(this.r, this.g, this.b);\n }\n\n /**\n * WCAG contrast ratio against `other`, from 1 (identical) to 21 (black on white),\n * reported to one decimal place.\n *\n * @see {@link colorContrastRatiosByShape} for the ratio each kind of content needs\n */\n contrast(other: ColorInput): number {\n const ownLuminance = this.luminance();\n const otherLuminance = new Color(other).luminance();\n const lighter = Math.max(ownLuminance, otherLuminance);\n const darker = Math.min(ownLuminance, otherLuminance);\n return truncateToTenth((lighter + 0.05) / (darker + 0.05));\n }\n\n /**\n * Raise perceptual lightness `ratio` (0–1) of the way to white, holding the hue steady.\n *\n * The hue is held in OKLCh, so a lightened color stays recognizably itself: a blue\n * lightens to a paler blue instead of drifting purple, and a red that runs out of sRGB\n * gives up colorfulness rather than sliding towards orange. That is the difference from\n * {@link Color.tint}, which stirs white into the channels and lets the hue land where it\n * may.\n */\n lighten(ratio: number): Color {\n return this.#towardsLightness(MAX_LIGHTNESS, ratio);\n }\n\n /** Lower perceptual lightness `ratio` (0–1) of the way to black, holding the hue steady. */\n darken(ratio: number): Color {\n return this.#towardsLightness(MIN_LIGHTNESS, ratio);\n }\n\n /** Mix `ratio` (0–1) of white in. */\n tint(ratio: number, mode: InterpolationMode = DEFAULT_INTERPOLATION_MODE): Color {\n return this.blend(WHITE, ratio, mode);\n }\n\n /** Mix `ratio` (0–1) of black in. */\n shade(ratio: number, mode: InterpolationMode = DEFAULT_INTERPOLATION_MODE): Color {\n return this.blend(BLACK, ratio, mode);\n }\n\n /**\n * Mix towards `other`, where `ratio` 0 keeps this color and 1 returns `other`. Alpha is\n * always interpolated linearly, whichever `mode` the channels travel through.\n */\n blend(\n other: ColorInput,\n ratio = 0.5,\n mode: InterpolationMode = DEFAULT_INTERPOLATION_MODE,\n ): Color {\n const target = new Color(other);\n const amount = clamp(ratio, 0, 1);\n const alpha = interpolate(this.a, target.a, amount);\n\n if (mode === 'oklch') {\n const from = rgbToOklch(this.r, this.g, this.b);\n const to = rgbToOklch(target.r, target.g, target.b);\n const [red, green, blue] = oklchToRgb({\n chroma: interpolate(from.chroma, to.chroma, amount),\n hue: interpolateHue(from, to, amount),\n lightness: interpolate(from.lightness, to.lightness, amount),\n });\n\n return new Color([red, green, blue, alpha]);\n }\n\n if (mode === 'lab') {\n const from = this.toLab();\n const to = target.toLab();\n return Color.fromLab(\n {\n a: interpolate(from.a, to.a, amount),\n b: interpolate(from.b, to.b, amount),\n lightness: interpolate(from.lightness, to.lightness, amount),\n },\n alpha,\n );\n }\n\n const blendChannel = mode === 'lrgb' ? interpolateLinear : interpolate;\n return new Color([\n blendChannel(this.r, target.r, amount),\n blendChannel(this.g, target.g, amount),\n blendChannel(this.b, target.b, amount),\n alpha,\n ]);\n }\n\n /** Replace the alpha channel with `alpha` (0–1). */\n withAlpha(alpha: number): Color {\n return new Color([this.r, this.g, this.b, alpha]);\n }\n\n /**\n * Replace HSL lightness with `lightness` (0–100), leaving hue and saturation alone.\n * Use this to hit an absolute lightness; use {@link Color.lighten} to step relative to\n * where the color already is.\n */\n withLightness(lightness: number): Color {\n const { hue, saturation } = this.toHsl();\n return Color.fromHsl({ hue, lightness: clamp(lightness, 0, 100), saturation }, this.a);\n }\n\n /**\n * Travel `ratio` of the way to `target` along the OKLab lightness axis, keeping hue and\n * as much colorfulness as the sRGB gamut has room for at the lightness we arrive at.\n */\n #towardsLightness(target: number, ratio: number): Color {\n const { chroma, hue, lightness } = rgbToOklch(this.r, this.g, this.b);\n const [red, green, blue] = oklchToRgb({\n chroma,\n hue,\n lightness: interpolate(lightness, target, clamp(ratio, 0, 1)),\n });\n\n return new Color([red, green, blue, this.a]);\n }\n}\n","export const colorContrastRatiosByShape = {\n nonText: 3.0, // 3.0:1 - https://www.w3.org/TR/WCAG21/#non-text-contrast\n largeText: 3.0, // 3.0:1 - https://www.w3.org/TR/WCAG21/#contrast-minimum\n paragraphText: 4.5, // 4.5:1 - https://www.w3.org/TR/WCAG21/#contrast-minimum\n smallText: 5.5, // We're making this up, but it should be more than the paragraph text\n} as const;\n\n/** The kind of content a color has to be legible as, which sets the ratio it has to clear. */\nexport type ColorShape = keyof typeof colorContrastRatiosByShape;\n","import type { Color } from '../Color';\n\n/**\n * The WCAG contrast ratio between two colors at full precision, unlike\n * {@link Color.contrast}, which truncates to one decimal.\n *\n * Use this to compare two ratios against each other; use `Color.contrast` to decide\n * whether one clears a required ratio. Truncation is fine for the second and ruinous for\n * the first: near-identical ratios collapse to the same tenth and tie, which sends a\n * direction probe the long way round or ranks two candidates arbitrarily.\n */\nexport const preciseContrast = (color: Color, other: Color): number => {\n const ownLuminance = color.luminance();\n const otherLuminance = other.luminance();\n return (\n (Math.max(ownLuminance, otherLuminance) + 0.05) /\n (Math.min(ownLuminance, otherLuminance) + 0.05)\n );\n};\n","import type { ColorShape } from './colorContrastRatiosByShape';\nimport type { ColorInput } from './types';\nimport { Color } from './Color';\nimport { colorContrastRatiosByShape } from './colorContrastRatiosByShape';\nimport { clamp } from './private/clamp';\nimport { preciseContrast } from './private/preciseContrast';\n\nconst WHITE = '#ffffff';\nconst BLACK = '#000000';\n\n/** One HSL lightness percentage point — the step the search walks the foreground by. */\nconst LIGHTNESS_STEP = 1;\n\n/** How far to probe each way when deciding which direction gains contrast faster. */\nconst PROBE_RATIO = 0.1;\n\n/** HSL lightness bands where a color is close enough to an extreme to have nowhere to go. */\nconst NEARLY_BLACK_LIGHTNESS = 10;\nconst NEARLY_WHITE_LIGHTNESS = 80;\n\n/** Contrast of a color against itself, and the floor of the WCAG ratio. */\nconst MIN_CONTRAST = 1.0;\n\n/** The ends of the luminance range: the search has run out of room once it lands on one. */\nconst MAX_LUMINANCE = 1;\nconst MIN_LUMINANCE = 0;\n\n/**\n * Backstop on the search. Flipping direction at the extremes should always converge well\n * before this, so reaching it means something is wrong, not that the budget was tight.\n */\nconst MAX_ITERATIONS = 1000;\n\nexport type AdjustColorForProperContrastOptions = {\n /** What the foreground sits on. Never adjusted. */\n readonly backgroundColor: ColorInput;\n\n /** The color to nudge until it is legible. Returned untouched if it already is. */\n readonly foregroundColor: ColorInput;\n\n /** What the foreground is. Defaults to `paragraphText` (4.5:1). */\n readonly shape?: ColorShape;\n};\n\n/**\n * Walk `foregroundColor` towards white or black until it clears the contrast ratio\n * `shape` requires against `backgroundColor`.\n *\n * Hue is pinned for the whole walk, so the result still reads as the color you passed in\n * — a washed-out brand blue stays blue rather than drifting towards its neighbors. The\n * direction is whichever gains contrast faster, reversing if it hits an extreme with the\n * ratio still unmet. Text-grade ratios that can't be met either way settle on plain white\n * or black, since at that point nothing else beats them.\n *\n * @example\n * ```ts\n * // Already legible, so nothing moves.\n * adjustColorForProperContrast({\n * foregroundColor: '#2949e5',\n * backgroundColor: '#ffffff',\n * }).toHex(); // '#2949e5'\n *\n * // A brand blue on itself, darkened until it separates.\n * adjustColorForProperContrast({\n * foregroundColor: '#2949e5',\n * backgroundColor: '#2949e5',\n * shape: 'nonText',\n * }).toHex();\n * ```\n */\nexport const adjustColorForProperContrast = ({\n backgroundColor,\n foregroundColor,\n shape = 'paragraphText',\n}: AdjustColorForProperContrastOptions): Color => {\n const background = new Color(backgroundColor);\n const foreground = new Color(foregroundColor);\n const requiredContrast = colorContrastRatiosByShape[shape];\n\n const initialContrast = foreground.contrast(background);\n if (initialContrast >= requiredContrast) {\n return foreground;\n }\n\n const { hue, lightness: initialLightness } = foreground.toHsl();\n\n let shouldBeLighter =\n initialLightness < NEARLY_BLACK_LIGHTNESS ||\n preciseContrast(foreground.tint(PROBE_RATIO, 'rgb'), background) >\n preciseContrast(foreground.shade(PROBE_RATIO, 'rgb'), background);\n\n // A nearly-white foreground gains a sliver of contrast by lightening, but can never gain\n // enough — the only way out is down.\n if (initialLightness > NEARLY_WHITE_LIGHTNESS && initialContrast === MIN_CONTRAST) {\n shouldBeLighter = false;\n }\n\n let adjusted = foreground;\n\n for (let iteration = 0; iteration < MAX_ITERATIONS; iteration += 1) {\n if (adjusted.contrast(background) >= requiredContrast) {\n return adjusted;\n }\n\n const luminance = adjusted.luminance();\n // Out of room at white or black with the ratio still unmet. Nothing beats an extreme\n // at the stricter text ratios, so take it; the looser ones get a second pass back the\n // other way, which may land on a color truer to the original than an extreme would be.\n if (iteration > 0 && (luminance === MAX_LUMINANCE || luminance === MIN_LUMINANCE)) {\n if (requiredContrast > colorContrastRatiosByShape.nonText) {\n const white = new Color(WHITE);\n const black = new Color(BLACK);\n return white.contrast(background) > black.contrast(background) ? white : black;\n }\n\n shouldBeLighter = !shouldBeLighter;\n adjusted = foreground;\n }\n\n const { lightness, saturation } = adjusted.toHsl();\n const stepped = Color.fromHsl(\n {\n hue,\n lightness: clamp(lightness + (shouldBeLighter ? LIGHTNESS_STEP : -LIGHTNESS_STEP), 0, 100),\n saturation,\n },\n adjusted.a,\n );\n\n // Snap to the 8-bit color the caller will actually render. Color keeps channels\n // unrounded, so measuring contrast on them can clear the ratio by a hair that\n // rounding to hex then gives back, handing back a color that doesn't actually pass the required contrast.\n adjusted = new Color(stepped.toRgbaTuple());\n }\n\n // Never converged. Hand back the closest we got rather than interrupting a render.\n return adjusted;\n};\n","import type { ColorInput, InterpolationMode } from './types';\nimport { Color } from './Color';\nimport { clamp } from './private/clamp';\n\ntype Stop = {\n readonly color: Color;\n readonly position: number;\n};\n\nconst DEFAULT_DOMAIN: [number, number] = [0, 1];\nconst DEFAULT_MODE: InterpolationMode = 'lrgb';\nconst DEFAULT_PADDING: [number, number] = [0, 0];\n\n/** Ceiling on the binary search in `correctLightness` */\nconst MAX_LIGHTNESS_ITERATIONS = 20;\nconst LIGHTNESS_TOLERANCE = 0.01;\n\nexport type ColorScaleOptions = {\n /**\n * Quantize the scale into bands instead of leaving it continuous: a count of equally sized\n * classes across the domain, or explicit class breaks.\n */\n readonly classes?: number | number[];\n\n /**\n * Redistribute stops so that perceived lightness moves evenly from end to end. Worth\n * turning on for any scale a reader is meant to rank by eye.\n */\n readonly correctLightness?: boolean;\n\n /**\n * The input range, `[0, 1]` by default. Two values set the ends; supply one value per\n * color to pin each color to a position, or more than two to warp the scale.\n */\n readonly domain?: number[];\n\n /** Bias the scale towards one end. Above 1 favors the start, below 1 the end. */\n readonly gamma?: number;\n\n /** The color space blends travel through. */\n readonly mode?: InterpolationMode;\n\n /** Trim `[start, end]` fractions off the scale, dropping its most extreme colors. */\n readonly padding?: [number, number] | number;\n};\n\nconst toPaddingPair = (padding: ColorScaleOptions['padding']): [number, number] => {\n const pair: [number, number] =\n typeof padding === 'number' ? [padding, padding] : (padding ?? DEFAULT_PADDING);\n return [clamp(pair[0], 0, 1), clamp(pair[1], 0, 1)];\n};\n\nconst toClassBreaks = (\n classes: ColorScaleOptions['classes'],\n min: number,\n max: number,\n): number[] | null => {\n if (classes === undefined) {\n return null;\n }\n if (Array.isArray(classes)) {\n return classes.length === 0 ? null : classes;\n }\n if (classes < 1) {\n return [min, max];\n }\n return Array.from({ length: classes + 1 }, (_, index) => min + (index / classes) * (max - min));\n};\n\n/** The index of the class `value` falls into, or -1 when it sits below the first break. */\nconst toClassIndex = (value: number, breaks: number[]): number => {\n let index = 0;\n while (index < breaks.length - 1 && value >= (breaks[index] ?? Number.POSITIVE_INFINITY)) {\n index += 1;\n }\n return index - 1;\n};\n\n/**\n * A continuous scale between two or more colors — the chroma.js `scale` model, as an\n * immutable class. Every configuration method returns a new scale, so a configured scale\n * is safe to hold onto and share.\n *\n * @example\n * ```ts\n * const scale = new ColorScale(['#2949e5', '#ffffff']);\n * scale.at(0.5).toHex(); // the midpoint color\n * scale.colors(5).map((color) => color.toHex()); // five evenly spaced colors\n * scale.correctLightness().domain([0, 100]).at(72); // perceptually even, read in %\n * ```\n */\nexport class ColorScale {\n readonly #classBreaks: number[] | null;\n readonly #colors: [Color, ...Color[]];\n readonly #correctLightness: boolean;\n readonly #domainBreaks: number[] | null;\n readonly #domainOutputs: number[] | null;\n readonly #gamma: number;\n readonly #max: number;\n readonly #min: number;\n readonly #mode: InterpolationMode;\n readonly #options: ColorScaleOptions;\n readonly #padding: [number, number];\n readonly #sampleRange: [number, number];\n readonly #stops: [Stop, ...Stop[]];\n\n /**\n * @param colors - the colors the scale runs through; a single color makes a flat scale\n * @throws {TypeError} when `colors` is empty or `domain` has fewer than two values\n */\n constructor(colors: readonly ColorInput[], options: ColorScaleOptions = {}) {\n const [firstColor, ...remainingColors] = colors.map((color) => new Color(color));\n if (firstColor === undefined) {\n throw new TypeError('A color scale needs at least one color.');\n }\n\n // A lone color still has to interpolate against something, so it becomes both ends.\n this.#colors =\n remainingColors.length === 0 ? [firstColor, firstColor] : [firstColor, ...remainingColors];\n this.#options = options;\n this.#mode = options.mode ?? DEFAULT_MODE;\n this.#gamma = options.gamma ?? 1;\n this.#padding = toPaddingPair(options.padding);\n this.#correctLightness = options.correctLightness ?? false;\n\n const domain = options.domain ?? DEFAULT_DOMAIN;\n const min = domain[0];\n const max = domain.at(-1);\n if (min === undefined || max === undefined || domain.length < 2) {\n throw new TypeError('A color scale domain needs at least two values.');\n }\n this.#min = min;\n this.#max = max;\n\n const count = this.#colors.length;\n let positions: number[];\n let domainBreaks: number[] | null = null;\n let domainOutputs: number[] | null = null;\n\n if (domain.length === count && min !== max) {\n // One domain value per color pins each color to its own position.\n positions = domain.map((value) => (value - min) / (max - min));\n } else {\n positions = this.#colors.map((_, index) => index / (count - 1));\n\n if (domain.length > 2 && min !== max) {\n const breaks = domain.map((value) => (value - min) / (max - min));\n const outputs = domain.map((_, index) => index / (domain.length - 1));\n // Only warp the scale when the intermediate values aren't already evenly spaced.\n if (!breaks.every((value, index) => outputs[index] === value)) {\n domainBreaks = breaks;\n domainOutputs = outputs;\n }\n }\n }\n\n this.#domainBreaks = domainBreaks;\n this.#domainOutputs = domainOutputs;\n\n const [firstStopColor, ...remainingStopColors] = this.#colors;\n this.#stops = [\n { color: firstStopColor, position: positions[0] ?? 0 },\n ...remainingStopColors.map((color, index) => ({\n color,\n position: positions[index + 1] ?? 1,\n })),\n ];\n\n this.#classBreaks = toClassBreaks(options.classes, min, max);\n const firstBreak = this.#classBreaks?.[0];\n const lastBreak = this.#classBreaks?.at(-1);\n this.#sampleRange =\n firstBreak === undefined || lastBreak === undefined ? [min, max] : [firstBreak, lastBreak];\n }\n\n /** The color at `value`, read through the scale's domain, classes, gamma and padding. */\n at(value: number): Color {\n if (!Number.isFinite(value)) {\n throw new TypeError(`A color scale cannot be sampled at ${String(value)}.`);\n }\n return this.#colorAt(value, false);\n }\n\n /** `count` colors spread evenly across the domain. */\n colors(count: number): Color[] {\n if (!Number.isInteger(count) || count < 0) {\n throw new TypeError(`A color scale cannot produce ${String(count)} colors.`);\n }\n if (count === 0) {\n return [];\n }\n\n const [start, end] = this.#sampleRange;\n if (count === 1) {\n return [this.at(start + (end - start) / 2)];\n }\n\n const span = end - start;\n return Array.from({ length: count }, (_, index) =>\n this.at(start + (index / (count - 1)) * span),\n );\n }\n\n mode(mode: InterpolationMode): ColorScale {\n return this.#withOptions({ mode });\n }\n\n domain(domain: number[]): ColorScale {\n return this.#withOptions({ domain });\n }\n\n gamma(gamma: number): ColorScale {\n return this.#withOptions({ gamma });\n }\n\n padding(padding: [number, number] | number): ColorScale {\n return this.#withOptions({ padding });\n }\n\n correctLightness(correctLightness = true): ColorScale {\n return this.#withOptions({ correctLightness });\n }\n\n classes(classes: number | number[]): ColorScale {\n return this.#withOptions({ classes });\n }\n\n #withOptions(overrides: ColorScaleOptions): ColorScale {\n return new ColorScale(this.#colors, { ...this.#options, ...overrides });\n }\n\n #colorAt(value: number, bypassValueMapping: boolean): Color {\n let position = clamp(\n this.#mapDomain(bypassValueMapping ? value : this.#toPosition(value)),\n 0,\n 1,\n );\n\n if (!bypassValueMapping && this.#correctLightness) {\n position = this.#correctPosition(position);\n }\n\n if (this.#gamma !== 1) {\n position **= this.#gamma;\n }\n\n const [paddingStart, paddingEnd] = this.#padding;\n position = paddingStart + position * (1 - paddingStart - paddingEnd);\n\n return this.#interpolateAt(clamp(position, 0, 1));\n }\n\n /** Map a domain value onto the scale's unpadded 0–1 range. */\n #toPosition(value: number): number {\n const breaks = this.#classBreaks;\n if (breaks !== null && breaks.length > 2) {\n return toClassIndex(value, breaks) / (breaks.length - 2);\n }\n if (this.#max === this.#min) {\n return 1;\n }\n return (value - this.#min) / (this.#max - this.#min);\n }\n\n /** Warp the scale so that intermediate domain values land where the caller placed them. */\n #mapDomain(position: number): number {\n const breaks = this.#domainBreaks;\n const outputs = this.#domainOutputs;\n if (breaks === null || outputs === null || position <= 0 || position >= 1) {\n return position;\n }\n\n let index = 0;\n while (index < breaks.length - 2 && position >= (breaks[index + 1] ?? 1)) {\n index += 1;\n }\n\n const start = breaks[index] ?? 0;\n const end = breaks[index + 1] ?? 1;\n const outputStart = outputs[index] ?? 0;\n const outputEnd = outputs[index + 1] ?? 1;\n if (end === start) {\n return outputStart;\n }\n return outputStart + ((position - start) / (end - start)) * (outputEnd - outputStart);\n }\n\n /**\n * Nudge `position` until the color there carries the Lab lightness an evenly lit scale\n * would have, by bisecting between the ends.\n */\n #correctPosition(position: number): number {\n const startLightness = this.#colorAt(0, true).toLab().lightness;\n const endLightness = this.#colorAt(1, true).toLab().lightness;\n const isDescending = startLightness > endLightness;\n const idealLightness = startLightness + (endLightness - startLightness) * position;\n\n let low = 0;\n let high = 1;\n let corrected = position;\n let difference = this.#colorAt(corrected, true).toLab().lightness - idealLightness;\n\n for (\n let iteration = 0;\n iteration < MAX_LIGHTNESS_ITERATIONS && Math.abs(difference) > LIGHTNESS_TOLERANCE;\n iteration += 1\n ) {\n // Already lighter than ideal: search the darker half, and vice versa.\n if (isDescending === difference < 0) {\n high = corrected;\n corrected += (low - corrected) / 2;\n } else {\n low = corrected;\n corrected += (high - corrected) / 2;\n }\n difference = this.#colorAt(corrected, true).toLab().lightness - idealLightness;\n }\n\n return corrected;\n }\n\n #interpolateAt(position: number): Color {\n const stops = this.#stops;\n\n for (const [index, stop] of stops.entries()) {\n if (position <= stop.position) {\n return stop.color;\n }\n\n const next = stops[index + 1];\n if (next === undefined) {\n return stop.color;\n }\n\n if (position < next.position) {\n const ratio = (position - stop.position) / (next.position - stop.position);\n return stop.color.blend(next.color, ratio, this.#mode);\n }\n }\n\n return stops[0].color;\n }\n}\n","import type { ColorShape } from './colorContrastRatiosByShape';\nimport type { ColorInput } from './types';\nimport { Color } from './Color';\nimport { colorContrastRatiosByShape } from './colorContrastRatiosByShape';\nimport { preciseContrast } from './private/preciseContrast';\n\nconst WHITE = '#ffffff';\nconst BLACK = '#000000';\n\nexport type BestColorForTextOptions = {\n /** Always excluded from the result.*/\n readonly backgroundColor: ColorInput;\n\n /**\n * Colors that are part of the palette but should not be considered as candidates.\n * Useful in scenarios like the webinar pages color derivation logic, where we might include derived colors\n * in the palette used by some fields, like `lowEmphasisTextColor`, but we want to exclude the derived colors\n * from other fields, like `mainTextColor`.\n */\n readonly exclude?: readonly ColorInput[];\n\n /**\n * The colors to choose from. Black and white are included automatically, so an empty/absent palette\n * still yields whichever of the two has best contrast against `backgroundColor`.\n */\n readonly palette?: readonly ColorInput[];\n\n /** The type of text/shape that will use the resulting color. Defaults to `paragraphText` (4.5:1). */\n readonly shape?: ColorShape;\n};\n\n/**\n * Picks a color most suitable for a given text (or non-text) shape against the given background color.\n * Accepts an optional color palette, but white and black are always included as options in addition to the palette.\n * Also accepts a set of colors from the palette that should be excluded from consideration.\n *\n * @example\n * ```ts\n * getBestColorForText({ backgroundColor: '#2949e5' }).toHex(); // '#ffffff'\n * ```\n */\nexport const getBestColorForText = ({\n backgroundColor,\n exclude = [],\n palette = [],\n shape = 'paragraphText',\n}: BestColorForTextOptions): Color => {\n const background = new Color(backgroundColor);\n const requiredContrast = colorContrastRatiosByShape[shape];\n\n const excluded = new Set(\n // Always exclude the background color in addition to the colorsToExclude\n [...exclude, background]\n .map((color) => new Color(color).toHex())\n // If one of the excluded colors is black or white, don't exclude it.\n // We always need black and white as potential text color options.\n .filter((hex) => hex !== WHITE && hex !== BLACK),\n );\n\n const candidates = [\n ...new Map(\n [WHITE, BLACK, ...palette].map((color) => {\n const candidate = new Color(color);\n return [candidate.toHex(), candidate];\n }),\n ).values(),\n ].filter((color) => !excluded.has(color.toHex()));\n\n const white = new Color(WHITE);\n const black = new Color(BLACK);\n\n // Rank candidates in order of least contrast first, otherwise we would always return either black or white.\n const ranked = candidates\n .map((color) => ({ color, ratio: preciseContrast(color, background) }))\n .toSorted((one, two) => one.ratio - two.ratio);\n\n // Which side of the background text belongs on: light text on a dark background, dark\n // text on a light one. Settled by measuring both extremes rather than by a lightness\n // threshold, so the crossover falls where contrast actually flips, near luminance 0.18.\n //\n // Worth preferring because the WCAG ratio is symmetric and cannot say that dark-on-dark\n // and light-on-dark read differently at the same number. Without this, a background\n // around luminance 0.12 takes black at 3.3:1 — enough to clear largeText, and murky to\n // read — over a light candidate that costs nothing.\n\n // Optically, should the text be lighter or darker than the background?\n const prefersLighterText =\n preciseContrast(white, background) > preciseContrast(black, background);\n const backgroundLuminance = background.luminance();\n const isPreferredSide = (color: Color): boolean =>\n prefersLighterText\n ? color.luminance() >= backgroundLuminance\n : color.luminance() <= backgroundLuminance;\n\n const passing = ranked.filter(({ color }) => color.contrast(background) >= requiredContrast);\n\n // The least-contrasting passing candidate on the preferred side. There is always one\n // when anything passes at all: the preferred side is the one whose extreme contrasts\n // more, and both extremes are always in the pool. So falling through means nothing\n // cleared the ratio, and the most contrast on offer is that same extreme.\n return (\n passing.find(({ color }) => isPreferredSide(color))?.color ??\n (prefersLighterText ? white : black)\n );\n};\n","import type { ColorInput } from './types';\nimport { Color } from './Color';\n\nconst MAX_PAGE_SATURATION = 50;\n\nconst ALMOST_BLACK = 5;\nconst ALMOST_WHITE = 95;\nconst DESIRED_BACKGROUND_LIGHTNESS = 18;\nconst MINIMUM_CONTRAST_BETWEEN_PRIMARY_AND_BACKGROUND = 1.5;\nconst SEARCH_INCREMENT = 0.5;\n\nconst constructColorWithNewSaturationAndLightness = (\n primaryColor: Color,\n saturation: number,\n lightness: number,\n): Color => Color.fromHsl({ hue: primaryColor.toHsl().hue, lightness, saturation }, primaryColor.a);\n\n/**\n * Generates a dark background color from a given primary color, preserving the hue of the primary color.\n *\n * @example\n * ```ts\n * getBrandDarkBackgroundColor('#2949e5').toHex(); // '#242942'\n * ```\n *\n * @see {@link getBrandLightBackgroundColor} for the light counterpart\n */\nexport const getBrandDarkBackgroundColor = (_primaryColor: ColorInput): Color => {\n const primaryColor = new Color(_primaryColor);\n const { lightness: brandLightness, saturation } = primaryColor.toHsl();\n\n // If the color is close to black or white, zero out the saturation so\n // we end up with gray instead of red\n const hasNoUsableHue = brandLightness < ALMOST_BLACK || brandLightness > ALMOST_WHITE;\n const pageSaturation = hasNoUsableHue ? 0 : Math.min(MAX_PAGE_SATURATION, saturation);\n\n const initialBackgroundColorOption = constructColorWithNewSaturationAndLightness(\n primaryColor,\n pageSaturation,\n DESIRED_BACKGROUND_LIGHTNESS,\n );\n\n // If the initial background color option meets our desired contrast, just use it.\n if (\n initialBackgroundColorOption.contrast(primaryColor) >=\n MINIMUM_CONTRAST_BETWEEN_PRIMARY_AND_BACKGROUND\n ) {\n return initialBackgroundColorOption;\n }\n\n // Otherwise if the initial background color option did not have the desired contrast,\n // tweak the lightness until we get a color that does meet the desired contrast.\n // Return black if we run out of options.\n let backgroundColorWithIncreasedContrast = initialBackgroundColorOption;\n for (\n let pageLightness = DESIRED_BACKGROUND_LIGHTNESS;\n pageLightness >= 0;\n pageLightness -= SEARCH_INCREMENT\n ) {\n const candidate = constructColorWithNewSaturationAndLightness(\n primaryColor,\n pageSaturation,\n pageLightness,\n );\n if (\n candidate.contrast(primaryColor) > backgroundColorWithIncreasedContrast.contrast(primaryColor)\n ) {\n backgroundColorWithIncreasedContrast = candidate;\n }\n if (\n backgroundColorWithIncreasedContrast.contrast(primaryColor) >=\n MINIMUM_CONTRAST_BETWEEN_PRIMARY_AND_BACKGROUND\n ) {\n break;\n }\n }\n\n return backgroundColorWithIncreasedContrast;\n};\n","import type { ColorInput } from './types';\nimport { Color } from './Color';\n\n/** Enough saturation for the brand hue to register, for a primary that has barely any. */\nconst MIN_SATURATION = 5;\n\n/** HSL lightness bands where a primary is close enough to an extreme to have no usable hue. */\nconst ALMOST_BLACK = 5;\nconst ALMOST_WHITE = 95;\n\n/**\n *\n * Generates a light background color from a given primary color, preserving the hue of the primary color.\n *\n * @example\n * ```ts\n * getBrandLightBackgroundColor('#2949e5').toHex(); // '#ebeefd'\n * ```\n *\n * @see {@link getBrandDarkBackgroundColor} for the dark counterpart\n */\nexport const getBrandLightBackgroundColor = (_primaryColor: ColorInput): Color => {\n const primaryColor = new Color(_primaryColor);\n const { lightness, saturation } = primaryColor.toHsl();\n\n // If the new color is close to black or white, zero out the saturation so\n // we end up with gray instead of pink\n const hasNoHue = saturation === 0 || lightness < ALMOST_BLACK || lightness > ALMOST_WHITE;\n const targetSaturation = hasNoHue ? 0 : Math.max(MIN_SATURATION, saturation);\n\n // Make the current color *almost* white and then darken it just a bit\n // to get a nice looking light background color based on the primary color\n const derived = primaryColor.tint(0.95, 'rgb').shade(0.02, 'rgb');\n\n return Color.fromHsl({ ...derived.toHsl(), saturation: targetSaturation }, derived.a);\n};\n","import { oklchToRgb, rgbToOklch } from './colorSpace';\n\n/**\n * Below this a color has no perceptible hue.\n */\nexport const ACHROMATIC_CHROMA = 1e-4;\n\n/**\n * More chroma than sRGB holds anywhere. The widest point is magenta at 0.32\n */\nconst UNREACHABLE_CHROMA = 0.5;\n\n/**\n * The most chroma sRGB can hold at the given lightness and hue.\n *\n * Read from {@link oklchToRgb}, which already clamps by max chroma so that we don't have to\n * re-implement searching for max possible chroma.\n */\nexport const maxChroma = (lightness: number, hue: number): number => {\n const [red, green, blue] = oklchToRgb({ chroma: UNREACHABLE_CHROMA, hue, lightness });\n\n return rgbToOklch(red, green, blue).chroma;\n};\n","import type { Color } from '../Color';\n\n/**\n * Flare is the ambient light reflecting off a screen, as defined by WCAG guidelines.\n * See https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum\n */\nconst FLARE = 0.05;\nconst FLOOR = Math.cbrt(FLARE);\nconst SPAN = Math.cbrt(1 + FLARE) - FLOOR;\n\n/**\n * Get the perceived lightness of a color, with ambient lighting factored in according\n * to WCAG guidelines.\n */\nexport const perceivedLightness = (color: Color): number =>\n (Math.cbrt(color.luminance() + FLARE) - FLOOR) / SPAN;\n","import { Color } from '../Color';\nimport { ColorScale } from '../ColorScale';\nimport { getBrandDarkBackgroundColor } from '../getBrandDarkBackgroundColor';\nimport { getBrandLightBackgroundColor } from '../getBrandLightBackgroundColor';\nimport { clamp } from './clamp';\nimport { oklchToRgb, rgbToOklch } from './colorSpace';\nimport { ACHROMATIC_CHROMA, maxChroma } from './maxChroma';\nimport { perceivedLightness } from './perceivedLightness';\n\nexport const DEFAULT_COLOR_SCALE_STEPS = 12;\n\n/**\n * Using the primary color, derive the light/dark variants of the background color,\n * and use these three colors as all the fixed stops on the scale.\n * Including the primary color in addition to the two background extremes allows the scale\n * to maintain the vibrancy of the primary color.\n * Sort stops by luminance, just in case.\n */\nconst brandScaleStops = (primary: Color): Color[] => {\n const stops = [\n getBrandLightBackgroundColor(primary),\n primary,\n getBrandDarkBackgroundColor(primary),\n ];\n\n return stops.toSorted((one, two) => two.luminance() - one.luminance());\n};\n\nconst ARC_SAMPLES = 128;\n\nconst DEGREES_TO_RADIANS = Math.PI / 180;\n\n/**\n * How far apart two colors look: perceived lightness versus OKLab's chroma.\n *\n * We use perceptual distance rather than a lightness calculation because the color scale\n * can cover a lot of ground without changing lightness significantly. Between an almost white color\n * and a light yellow there is not much lightness difference, but there is actually enough\n * \"distance\" between the colors to perceive more than one step between them.\n *\n * Contrast ratio does not matter significantly here because these are background colors.\n */\nconst perceptualDistance = (one: Color, two: Color): number => {\n const from = rgbToOklch(one.r, one.g, one.b);\n const to = rgbToOklch(two.r, two.g, two.b);\n\n return Math.hypot(\n perceivedLightness(one) - perceivedLightness(two),\n from.chroma * Math.cos(from.hue * DEGREES_TO_RADIANS) -\n to.chroma * Math.cos(to.hue * DEGREES_TO_RADIANS),\n from.chroma * Math.sin(from.hue * DEGREES_TO_RADIANS) -\n to.chroma * Math.sin(to.hue * DEGREES_TO_RADIANS),\n );\n};\n\n/**\n * Maps between a position on the scale and how far along its length that position sits.\n */\nconst arcLength = (colorAt: (position: number) => Color) => {\n const points = Array.from({ length: ARC_SAMPLES + 1 }, (_, index) =>\n colorAt(index / ARC_SAMPLES),\n );\n const travelled = [0];\n for (let index = 1; index <= ARC_SAMPLES; index += 1) {\n const from = points[index - 1];\n const to = points[index];\n const step = from === undefined || to === undefined ? 0 : perceptualDistance(from, to);\n\n travelled.push((travelled[index - 1] ?? 0) + step);\n }\n const total = travelled.at(-1) ?? 0;\n\n return {\n distanceOf: (position: number): number => {\n if (total === 0) {\n return position;\n }\n const scaled = clamp(position, 0, 1) * ARC_SAMPLES;\n const lower = Math.min(Math.floor(scaled), ARC_SAMPLES - 1);\n const within = scaled - lower;\n const from = travelled[lower] ?? 0;\n const to = travelled[lower + 1] ?? total;\n\n return (from + (to - from) * within) / total;\n },\n positionAt: (distance: number): number => {\n if (total === 0) {\n return distance;\n }\n const target = clamp(distance, 0, 1) * total;\n for (let index = 1; index <= ARC_SAMPLES; index += 1) {\n const to = travelled[index] ?? total;\n if (to >= target) {\n const from = travelled[index - 1] ?? 0;\n const span = to - from;\n\n return (index - 1 + (span === 0 ? 0 : (target - from) / span)) / ARC_SAMPLES;\n }\n }\n\n return 1;\n },\n };\n};\n\nexport type BrandScaleOptions = {\n /** How many steps the scale is divided into. */\n readonly steps?: number;\n};\n\n// Where `color` falls on the color scale, as a position from 0–1.\nconst positionOnScale = (scale: ColorScale, color: Color): number => {\n const target = color.luminance();\n let low = 0;\n let high = 1;\n\n for (let iteration = 0; iteration < 30; iteration += 1) {\n const middle = (low + high) / 2;\n if (scale.at(middle).luminance() > target) {\n low = middle;\n } else {\n high = middle;\n }\n }\n\n return (low + high) / 2;\n};\n\n/**\n * How colorful a color is as a share of the most sRGB allows at its lightness and hue.\n * 0 for a gray, 1 for a color that maxes out lightness/saturation.\n */\nconst gamutFraction = (color: Color): number => {\n const { chroma, hue, lightness } = rgbToOklch(color.r, color.g, color.b);\n const available = maxChroma(lightness, hue);\n\n return chroma < ACHROMATIC_CHROMA || available < ACHROMATIC_CHROMA\n ? 0\n : Math.min(1, chroma / available);\n};\n\ntype Anchor = {\n readonly fraction: number;\n readonly position: number;\n};\n\n/**\n * What fraction of the color gamut is represented by a given position\n */\nconst fractionAt = (anchors: readonly Anchor[], position: number): number => {\n const first = anchors.at(0);\n const last = anchors.at(-1);\n if (first === undefined || last === undefined) {\n return 0;\n }\n if (position <= first.position) {\n return first.fraction;\n }\n\n for (let index = 1; index < anchors.length; index += 1) {\n const previous = anchors[index - 1];\n const next = anchors[index];\n if (previous === undefined || next === undefined) {\n break;\n }\n if (position <= next.position) {\n const span = next.position - previous.position;\n const ratio = span === 0 ? 0 : (position - previous.position) / span;\n\n return previous.fraction + (next.fraction - previous.fraction) * ratio;\n }\n }\n\n return last.fraction;\n};\n\nexport type BrandedColorScale = {\n /** The color at a given position (0 - 1), from the scale. */\n readonly at: (position: number) => Color;\n /** The color at step `index` */\n readonly atStep: (index: number) => Color;\n readonly positionOf: (color: Color) => number;\n /** The step where the primary color falls. */\n readonly primaryStep: number;\n /** Where a given color falls, as a step index — fractional when it sits between two. */\n readonly stepOf: (color: Color) => number;\n readonly steps: number;\n};\n\n/**\n * Builds a color scale using the derived light/dark background colors based on the given primary color,\n * with the primary color slotted into the scale wherever it fits based on lightness.\n *\n * It's important to include the primary color in the scale because the light/dark derived background colors\n * do not have the same saturation as the primary color, and we want the scale to reflect the vibrancy\n * of the primary color.\n */\nexport const buildBrandedColorScale = (\n primary: Color,\n options: BrandScaleOptions = {},\n): BrandedColorScale => {\n const { steps = DEFAULT_COLOR_SCALE_STEPS } = options;\n const scale = new ColorScale(brandScaleStops(primary), { mode: 'oklch' });\n const stops = brandScaleStops(primary);\n const anchors = stops\n .map((stop) => ({ fraction: gamutFraction(stop), position: positionOnScale(scale, stop) }))\n .toSorted((one, two) => one.position - two.position);\n\n const colorAt = (position: number): Color => {\n const base = scale.at(position);\n const { hue, lightness } = rgbToOklch(base.r, base.g, base.b);\n const [red, green, blue] = oklchToRgb({\n chroma: fractionAt(anchors, position) * maxChroma(lightness, hue),\n hue,\n lightness,\n });\n\n return new Color([red, green, blue, base.a]);\n };\n\n const measured = arcLength(colorAt);\n\n const at = (distance: number): Color => colorAt(measured.positionAt(distance));\n const distanceOf = (color: Color): number => measured.distanceOf(positionOnScale(scale, color));\n\n const last = Math.max(0, steps - 1);\n const primaryDistance = distanceOf(primary);\n\n // The primary step should almost never be placed into either end of the scale.\n // This will only occur for primary colors that are truly extreme, like black or white.\n const ownsFirst = stops.at(0)?.toHex() === primary.toHex();\n const ownsLast = stops.at(-1)?.toHex() === primary.toHex();\n const lowest = ownsFirst ? 0 : Math.min(1, last);\n const highest = ownsLast ? last : Math.max(lowest, last - 1);\n const primaryStep = clamp(Math.round(primaryDistance * last), lowest, highest);\n\n const distanceOfStep = (index: number): number => {\n if (index === primaryStep) {\n return primaryDistance;\n }\n if (index < primaryStep) {\n return (index / primaryStep) * primaryDistance;\n }\n\n return primaryDistance + ((index - primaryStep) / (last - primaryStep)) * (1 - primaryDistance);\n };\n\n return {\n at,\n atStep: (index) => (index === primaryStep ? primary : at(distanceOfStep(index))),\n positionOf: distanceOf,\n primaryStep,\n stepOf: (color) => {\n const found = distanceOf(color);\n if (found <= primaryDistance) {\n return primaryDistance === 0 ? 0 : (found / primaryDistance) * primaryStep;\n }\n\n return (\n primaryStep + ((found - primaryDistance) / (1 - primaryDistance)) * (last - primaryStep)\n );\n },\n steps,\n };\n};\n","import type { ColorInput } from './types';\nimport { Color } from './Color';\n\nexport type ColorLightnessClassification = 'dark' | 'light' | 'midtone' | 'veryDark';\n\n/**\n * The WCAG value for typical ambient light causing flare on a screen\n * https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum\n */\nconst FLARE = 0.05;\n\n/**\n * Below this a background is close enough to black that there is no more visual\n * room to darken the color without reading as black.\n */\nconst VERY_DARK_MAX = 0.05;\n\n/**\n * This number represents the crossover where white stops having more contrast than black,\n * so any values with luminance greater than this value are no longer considered \"dark\".\n *\n * Don't round this number, otherwise we'll potentially classify some backgrounds as \"midtone\"\n * even though light content reads better on them, and we should always have light content on dark backgrounds.\n */\nconst DARK_MAX = Math.sqrt(FLARE * (1 + FLARE)) - FLARE;\n\n/** Above this a background is close enough to white that it needs no lightening at all. */\nconst LIGHT_MIN = 0.8;\n\n/**\n * Classify a color's lightness based on relative luminance.\n *\n * @example\n * ```ts\n * getColorLightnessClassification('#000000'); // 'veryDark'\n * getColorLightnessClassification('#2949e5'); // 'dark'\n * getColorLightnessClassification('#7f7f7f'); // 'midtone'\n * getColorLightnessClassification('#ffffff'); // 'light'\n * ```\n */\nexport const getColorLightnessClassification = (\n color: ColorInput,\n): ColorLightnessClassification => {\n const parsed = new Color(color);\n const luminance = parsed.luminance();\n\n if (luminance < VERY_DARK_MAX) {\n return 'veryDark';\n }\n if (luminance < DARK_MAX) {\n return 'dark';\n }\n\n return luminance < LIGHT_MIN ? 'midtone' : 'light';\n};\n"],"mappings":";;;;;;;;;;;AACA,MAAa,SAAS,OAAe,KAAa,QAChD,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;;ACEpC,MAAM,kBAAkB;CAAE,GAAG;CAAS,GAAG;CAAG,GAAG;AAAQ;AAEvD,MAAM,qBAAqB,MAAM,KAAK;;AAMtC,MAAM,0BAA0B;AAIhC,MAAM,cAAc,MAAM;AAC1B,MAAM,YAAY,QAAQ;AAC1B,MAAM,iCAAiC;;AAGvC,MAAM,aAAa,YAA4B;CAC7C,MAAM,aAAa,UAAU;CAC7B,OAAO,cAAc,SAAU,aAAa,UAAU,aAAa,QAAS,UAAU;AACxF;;;;;;AAOA,MAAM,WAAW,WAA2B;CAC1C,MAAM,YAAY,KAAK,IAAI,MAAM;CAGjC,QADE,aAAa,WAAY,YAAY,QAAQ,QAAQ,cAAc,IAAI,OAAO,QAC/D,KAAK,KAAK,MAAM,IAAI;AACvC;AAEA,MAAM,SAAS,UACb,QAAQ,cAAc,KAAK,KAAK,KAAK,KAAK,YAAY,QAAQ,MAAM;AAEtE,MAAM,gBAAgB,OAAe,KAAa,aAA6B;CAC7E,IAAI,MAAM;CACV,IAAI,MAAM,GACR,OAAO;CAET,IAAI,MAAM,GACR,OAAO;CAET,IAAI,MAAM,IAAI,GACZ,OAAO,SAAS,MAAM,SAAS,IAAI;CAErC,IAAI,MAAM,IAAI,GACZ,OAAO;CAET,IAAI,MAAM,IAA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,GAAG,QAAQ,OAAO;CAE7E,MAAM,kBAAkB,UAA0B;EAChD,IAAI,UAAU,aACZ,OAAO;EAET,IAAI,QAAQ,aACV,OAAQ,QAAQ,cAAe;EAGjC,OAAO,mBAAoB,QAAQ,gBAAgB,OAAO,gBAAiB,IAAI;CACjF;CAEA,OAAO;EACL;EACA,SAAS,UAAW,UAAU,cAAc,UAAU,GAAG,eAAe,KAAK,CAAC;EAC9E,YAAY;EACZ;EACA,SAAS,UAAU;GACjB,MAAM,QAAQ,WAAW,KAAK;GAC9B,IAAI,SAAS,iBACX,OAAO,oBAAoB,IAAI,IAAK,QAAQ,kBAAmB;GAGjE,OACE,eAAgB,QAAQ,oBAAoB,IAAI,oBAAqB,OAAO;EAEhF;EACA;CACF;AACF;;;;;;AC/PA,MAAM,QAAQ;;;;;AAMd,MAAM,gBAAgB;;;;;;;;AAStB,MAAM,WAAW,KAAK,KAAK,QAAS,IAAU,IAAI;;AAGlD,MAAM,YAAY;;;;;;;;;;;;AAalB,MAAa,mCACX,UACiC;CAEjC,MAAM,YAAY,IADC,MAAM,KACF,CAAC,CAAC,UAAU;CAEnC,IAAI,YAAY,eACd,OAAO;CAET,IAAI,YAAY,UACd,OAAO;CAGT,OAAO,YAAY,YAAY,YAAY;AAC7C"}
@@ -0,0 +1,24 @@
1
+
2
+ /*
3
+ * @license @wistia/kaleidoscope v0.0.6
4
+ *
5
+ * Copyright (c) 2026, Wistia, Inc. and its affiliates.
6
+ *
7
+ * This source code is unlicensed, all rights reserved.
8
+ */
9
+
10
+ // src/private/guards.ts
11
+ /** Narrow to a plain object without asserting a shape onto it. */
12
+ const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
13
+ const isString = (value) => typeof value === "string";
14
+ /**
15
+ * Read a key off a record whose shape is not yet known.
16
+ *
17
+ * The `noPropertyAccessFromIndexSignature` lint rule requires bracket access on an index signature
18
+ */
19
+ const at = (record, key) => record[key];
20
+ /** Whether `value` is one of `allowed`, narrowed to that tuple's member type. */
21
+ const isOneOf = (allowed, value) => isString(value) && allowed.includes(value);
22
+ export { isString as i, isOneOf as n, isRecord as r, at as t };
23
+
24
+ //# sourceMappingURL=guards-t_cf_IOV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guards-t_cf_IOV.js","names":[],"sources":["../src/private/guards.ts"],"sourcesContent":["/** Narrow to a plain object without asserting a shape onto it. */\nexport const isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nexport const isString = (value: unknown): value is string => typeof value === 'string';\n\n/**\n * Read a key off a record whose shape is not yet known.\n *\n * The `noPropertyAccessFromIndexSignature` lint rule requires bracket access on an index signature\n */\nexport const at = (record: Record<string, unknown>, key: string): unknown => record[key];\n\n/** Whether `value` is one of `allowed`, narrowed to that tuple's member type. */\nexport const isOneOf = <T extends string>(allowed: readonly T[], value: unknown): value is T =>\n isString(value) && allowed.includes(value as T);\n"],"mappings":";;;;;;;;;;;AACA,MAAa,YAAY,UACvB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAErE,MAAa,YAAY,UAAoC,OAAO,UAAU;;;;;;AAO9E,MAAa,MAAM,QAAiC,QAAyB,OAAO;;AAGpF,MAAa,WAA6B,SAAuB,UAC/D,SAAS,KAAK,KAAK,QAAQ,SAAS,KAAU"}
@@ -1,5 +1,4 @@
1
1
 
2
- //#region src/styleVocabulary/anchorValues.d.ts
3
2
  type BrandKitTokenRef = `$${string}`;
4
3
  type LiteralColor = `#${string}` | `rgb(${string})` | `rgba(${string})`;
5
4
  declare const COLOR_RELATIONSHIPS: readonly ["same", "complementary", "analogous", "triad"];
@@ -27,8 +26,6 @@ type FontStack = `${string}${GenericFontFamily}`;
27
26
  type Dimension = BrandKitTokenRef | number;
28
27
  declare const MAX_COLOR_SCALE_OFFSET = 11;
29
28
  type ColorScaleOffset = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
30
- //#endregion
31
- //#region src/styleVocabulary/gradientShape.d.ts
32
29
  declare const MIN_GRADIENT_STOPS = 2;
33
30
  declare const MAX_GRADIENT_STOPS = 6;
34
31
  type GradientStops = readonly SingleColor[];
@@ -62,8 +59,6 @@ type GradientShape = {
62
59
  readonly kind: "radial";
63
60
  readonly position: GradientPosition;
64
61
  };
65
- //#endregion
66
- //#region src/styleVocabulary/treatment.d.ts
67
62
  /**
68
63
  * What visual treatment is applied to a surface?
69
64
  * `gradient` renders `colors.gradientStops` based on the values provided in `gradientShape`
@@ -73,8 +68,6 @@ type GradientShape = {
73
68
  */
74
69
  declare const TREATMENTS: readonly ["none", "flat", "glassy", "gradient"];
75
70
  type Treatment = (typeof TREATMENTS)[number];
76
- //#endregion
77
- //#region src/styleVocabulary/anchors.d.ts
78
71
  declare const ANCHOR_GROUPS: readonly ["dimensions", "colors", "fonts"];
79
72
  type AnchorGroup = (typeof ANCHOR_GROUPS)[number];
80
73
  /**
@@ -103,7 +96,7 @@ type OptionalColorAnchor = (typeof OPTIONAL_COLOR_ANCHORS)[number];
103
96
  /**
104
97
  * Like the required color anchors, the required font anchors map up to the options defined by Brand Kits.
105
98
  */
106
- declare const REQUIRED_FONT_ANCHORS: readonly ["heading", "body"];
99
+ declare const REQUIRED_FONT_ANCHORS: readonly ["heading", "body", "button"];
107
100
  type RequiredFontAnchor = (typeof REQUIRED_FONT_ANCHORS)[number];
108
101
  /**
109
102
  * The color anchors that hold one color. `gradientStops` holds a list, so only a gradient can read
@@ -130,14 +123,12 @@ type Anchors = {
130
123
  };
131
124
  /** Which colors a treatment cannot resolve without. Checked by `validateStyleDocument`. */
132
125
  declare const ANCHORS_REQUIRED_BY_TREATMENT: Readonly<Record<Treatment, readonly ColorAnchorName[]>>;
133
- //#endregion
134
- //#region src/styleVocabulary/backgroundColor.d.ts
135
126
  /**
136
127
  * Where a background's `offset` starts counting from.
137
128
  *
138
129
  * - `source` — at the source color itself: `colors.primary · 2` is two steps off the primary color.
139
- * - `parent` — on the source's scale, at the step nearest in lightness to the fill of the surface
140
- * this one sits on, stepping away from it based on whether the parent is light or dark.
130
+ * - `parent` — on the source's scale, at the step nearest the fill of the surface this one sits
131
+ * on, stepping lighter if the parent is dark, and darker if it is light or midtone.
141
132
  *
142
133
  * The page sits on nothing, so it cannot count from `parent`.
143
134
  * A surface that sits on several
@@ -176,8 +167,6 @@ type BackgroundColor = {
176
167
  readonly offset: ColorScaleOffset;
177
168
  readonly source: BackgroundSource;
178
169
  };
179
- //#endregion
180
- //#region src/styleVocabulary/border.d.ts
181
170
  declare const BORDER_STYLES: readonly ["solid", "dashed", "dotted", "double", "scalloped", "lace"];
182
171
  type BorderStyle = (typeof BORDER_STYLES)[number];
183
172
  /** The border styles drawn as ornaments outside the edge, rather than as a CSS line. */
@@ -196,8 +185,6 @@ type Border = {
196
185
  readonly style: BorderStyle;
197
186
  readonly width: number;
198
187
  };
199
- //#endregion
200
- //#region src/styleVocabulary/elevation.d.ts
201
188
  declare const ELEVATION_DEPTHS: readonly ["none", "low", "medium", "high"];
202
189
  type ElevationDepth = (typeof ELEVATION_DEPTHS)[number];
203
190
  declare const ELEVATION_HARDNESSES: readonly ["soft", "hard", "glow"];
@@ -215,8 +202,6 @@ type Elevation = {
215
202
  readonly hardness: ElevationHardness;
216
203
  readonly source: ElevationColorSource;
217
204
  };
218
- //#endregion
219
- //#region src/styleVocabulary/motion.d.ts
220
205
  declare const AMBIENT_MOTIONS: readonly ["none", "drift", "pulse"];
221
206
  type AmbientMotion = (typeof AMBIENT_MOTIONS)[number];
222
207
  /** Rate of ambient motion. Exact durations are owned by the engine. */
@@ -239,15 +224,11 @@ type Motion = {
239
224
  readonly speed: MotionSpeed;
240
225
  readonly transition: Transition;
241
226
  };
242
- //#endregion
243
- //#region src/styleVocabulary/radius.d.ts
244
227
  type RadiusSource = "anchors.dimensions.borderRadius" | Dimension;
245
228
  /** A surface's corner rounding. */
246
229
  type Radius = {
247
230
  readonly source: RadiusSource;
248
231
  };
249
- //#endregion
250
- //#region src/styleVocabulary/textColor.d.ts
251
232
  /**
252
233
  * Sometimes we may want to try using a particular color for the text rather than deriving it from the background.
253
234
  * The `source` is the color anchor we're referencing, and the `offset` is the starting index on the scale.
@@ -266,8 +247,6 @@ type TextColorPreference = {
266
247
  * Hard-coded values like anchors or single colors have no accessibility guarantee.
267
248
  */
268
249
  type TextColor = "derive" | SingleColorAnchorRef | SingleColor | TextColorPreference;
269
- //#endregion
270
- //#region src/styleVocabulary/texture.d.ts
271
250
  /**
272
251
  * - `grain` — fine, even film noise
273
252
  * - `static` — sharp, high-contrast speckles, like screen noise
@@ -289,8 +268,6 @@ type Texture = {
289
268
  readonly intensity: TextureIntensity;
290
269
  readonly kind: TextureKind;
291
270
  };
292
- //#endregion
293
- //#region src/styleVocabulary/surfaces.d.ts
294
271
  /** Surfaces every Style must define. A Style cannot add or opt out of any. */
295
272
  declare const SURFACE_NAMES: readonly ["page", "panel", "card", "buttonPrimary", "buttonSecondary"];
296
273
  type SurfaceName = (typeof SURFACE_NAMES)[number];
@@ -334,8 +311,6 @@ type PageSettings = RequiredSettings & {
334
311
  type Surfaces = Readonly<{
335
312
  page: PageSettings;
336
313
  }> & Readonly<Record<Exclude<SurfaceName, "page">, SurfaceSettings>>;
337
- //#endregion
338
- //#region src/styleVocabulary/typography.d.ts
339
314
  declare const TYPE_CASES: readonly ["as-typed", "upper"];
340
315
  type TypeCase = (typeof TYPE_CASES)[number];
341
316
  declare const TYPE_ROLES: readonly ["heading", "body", "button"];
@@ -355,8 +330,6 @@ type TypeRole = {
355
330
  * have a mechanism to load that font into the DOM.
356
331
  */
357
332
  type Typography = Readonly<Record<TypeRoleName, TypeRole>>;
358
- //#endregion
359
- //#region src/styleVocabulary/index.d.ts
360
333
  /** The top-level keys in a Style document */
361
334
  declare const DOCUMENT_KEYS: readonly ["id", "name", "schemaVersion", "typography", "anchors", "surfaces"];
362
335
  type StyleDocument = {
@@ -367,6 +340,5 @@ type StyleDocument = {
367
340
  readonly surfaces: Surfaces;
368
341
  readonly typography: Typography;
369
342
  };
370
- //#endregion
371
343
  export { OffsetOrigin as $, MOTION_SPEEDS as A, GradientDirection as At, ElevationColorSourceKeyword as B, COLOR_TONES as Bt, TextureKind as C, SingleColorAnchorRef as Ct, RadiusSource as D, GRADIENT_EXTENTS as Dt, Radius as E, GRADIENT_DIRECTIONS as Et, ELEVATION_COLOR_SOURCE_KEYWORDS as F, GradientStops as Ft, BorderSource as G, FontStack as Gt, ElevationHardness as H, ColorScaleOffset as Ht, ELEVATION_DEPTHS as I, MAX_GRADIENT_STOPS as It, BackgroundColor as J, LiteralColor as Jt, BorderStyle as K, GENERIC_FONT_FAMILIES as Kt, ELEVATION_HARDNESSES as L, MIN_GRADIENT_STOPS as Lt, MotionSpeed as M, GradientPosition as Mt, TRANSITIONS as N, GradientShape as Nt, AMBIENT_MOTIONS as O, GRADIENT_POSITIONS as Ot, Transition as P, GradientShapeOption as Pt, OFFSET_ORIGINS as Q, Elevation as R, BrandKitTokenRef as Rt, TextureIntensity as S, SingleColorAnchorName as St, TextColorPreference as T, Treatment as Tt, BORDER_STYLES as U, ColorTone as Ut, ElevationDepth as V, ColorRelationship as Vt, Border as W, Dimension as Wt, INVERT_RULES as X, RelatedColor as Xt, BackgroundSource as Y, MAX_COLOR_SCALE_OFFSET as Yt, InvertRule as Z, SingleColor as Zt, SurfaceSettings as _, REQUIRED_FONT_ANCHORS as _t, TypeCase as a, COLOR_ANCHOR_NAMES as at, TEXTURE_KINDS as b, RequiredFontAnchor as bt, Typography as c, ColorAnchors as ct, OptionalSettingName as d, FontAnchorRef as dt, ANCHORS_REQUIRED_BY_TREATMENT as et, REQUIRED_SETTING_NAMES as f, FontAnchors as ft, SurfaceName as g, REQUIRED_DIMENSION_ANCHORS as gt, SURFACE_NAMES as h, REQUIRED_COLOR_ANCHORS as ht, TYPE_ROLES as i, Anchors as it, Motion as j, GradientExtent as jt, AmbientMotion as k, GRADIENT_SHAPE_OPTIONS as kt, ALL_SETTING_NAMES as l, DimensionAnchorRef as lt, STACKABLE_ON as m, OptionalColorAnchor as mt, StyleDocument as n, ANCHOR_REF_PREFIX as nt, TypeRole as o, ColorAnchorName as ot, RequiredSettingName as p, OPTIONAL_COLOR_ANCHORS as pt, ORNAMENTAL_BORDER_STYLES as q, GenericFontFamily as qt, TYPE_CASES as r, AnchorGroup as rt, TypeRoleName as s, ColorAnchorRef as st, DOCUMENT_KEYS as t, ANCHOR_GROUPS as tt, OPTIONAL_SETTING_NAMES as u, DimensionAnchors as ut, Surfaces as v, RequiredColorAnchor as vt, TextColor as w, TREATMENTS as wt, Texture as x, SINGLE_COLOR_ANCHOR_NAMES as xt, TEXTURE_INTENSITIES as y, RequiredDimensionAnchor as yt, ElevationColorSource as z, COLOR_RELATIONSHIPS as zt };
372
- //# sourceMappingURL=index-CG6dL9XZ.d.ts.map
344
+ //# sourceMappingURL=index-BOJCY_MU.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BOJCY_MU.d.ts","names":[],"sources":["../src/styleVocabulary/anchorValues.ts","../src/styleVocabulary/gradientShape.ts","../src/styleVocabulary/treatment.ts","../src/styleVocabulary/anchors.ts","../src/styleVocabulary/backgroundColor.ts","../src/styleVocabulary/border.ts","../src/styleVocabulary/elevation.ts","../src/styleVocabulary/motion.ts","../src/styleVocabulary/radius.ts","../src/styleVocabulary/textColor.ts","../src/styleVocabulary/texture.ts","../src/styleVocabulary/surfaces.ts","../src/styleVocabulary/typography.ts","../src/styleVocabulary/index.ts"],"mappings":";A,KAAY;KAEA;cAEC;KACD,4BAA4B;cAE3B;KACD,oBAAoB;;;;;KAMpB;WACD,MAAM;WACN,WAAW;WACX,OAAO;;KAGN,cAAc,eAAe,eAAe;;;;;cAM3C;KAaD,4BAA4B;KAE5B,wBAAwB;;KAGxB,YAAY;cAEX;KACD;cC7CC;cACA;KAED,yBAAyB;cAExB;KACD,8BAA8B;cAE7B;KAUD,4BAA4B;cAE3B;KAWD,2BAA2B;;;;;cA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uBAAuB,uBAAuB,cAAc;;;;;;cChB3D;KACD,sBAAsB;cAErB;KACD,2BAA2B;;;;;;;;;KAU3B;WACD,WAAW;WACX,MAAM;;;cCVJ;KACD,sBAAsB;cAErB,cAAc,SAAS,OAAO,sBAAsB;cAQpD;KASD,8BAA8B;cAE7B;KACD,8BAA8B;cAE7B,6BAA6B,sBAAsB;KAKpD;WACD,iBAAiB;WACjB,WAAW;WACX,QAAQ;WACR,QAAQ;WACR,WAAW;WACX,SAAS;;;;;KAMR;WACG,eAAe;WAAwB;;WACvC;WAAgC,WAAW,QAAQ;;;KAGtD,kBAAkB;WAA8B,QAAQ;IAAW;;;;KAKnE,eAAe;WAA8B;IAAmB;;;;KAKhE,WAAW;EAAW,MAAM;KACtC,SAAS,OAAO,QAAQ,sBAAsB;cCnEnC;KACD,mBAAmB;cAElB;KACD,uBAAuB;KAEvB;WACD,MAAM;WACN,MAAM;WACN;WACA;;;;;;;;;;KAWC,aAAa,SAAS,OAAO,cAAc;;cCT1C;KASD;WACD,SAAS;WACT;WACA;WACA;WACA,UAAU;WACV,YAAY"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
- import { C as RgbaObject, D as colorContrastRatiosByShape, E as ColorShape, S as RgbTuple, T as Color, _ as ColorInput, a as ColorLightnessClassification, b as InterpolationMode, c as getBrandedColorScale, d as BestColorForTextOptions, f as getBestColorForText, g as adjustColorForProperContrast, h as AdjustColorForProperContrastOptions, i as getHeavyAccentedBackgroundColor, l as getBrandLightBackgroundColor, m as ColorScaleOptions, n as getSlightAccentedBackgroundColor, o as getColorLightnessClassification, p as ColorScale, r as HeavyAccentedBackgroundColorOptions, s as BrandColorScaleOptions, t as SlightAccentedBackgroundColorOptions, u as getBrandDarkBackgroundColor, v as ColorTuple, w as RgbaTuple, x as Lab, y as Hsl } from "./color-BD12TVX4.js";
3
- import { $ as OffsetOrigin, A as MOTION_SPEEDS, At as GradientDirection, B as ElevationColorSourceKeyword, Bt as COLOR_TONES, C as TextureKind, Ct as SingleColorAnchorRef, D as RadiusSource, Dt as GRADIENT_EXTENTS, E as Radius, Et as GRADIENT_DIRECTIONS, F as ELEVATION_COLOR_SOURCE_KEYWORDS, Ft as GradientStops, G as BorderSource, Gt as FontStack, H as ElevationHardness, Ht as ColorScaleOffset, I as ELEVATION_DEPTHS, It as MAX_GRADIENT_STOPS, J as BackgroundColor, Jt as LiteralColor, K as BorderStyle, Kt as GENERIC_FONT_FAMILIES, L as ELEVATION_HARDNESSES, Lt as MIN_GRADIENT_STOPS, M as MotionSpeed, Mt as GradientPosition, N as TRANSITIONS, Nt as GradientShape, O as AMBIENT_MOTIONS, Ot as GRADIENT_POSITIONS, P as Transition, Pt as GradientShapeOption, Q as OFFSET_ORIGINS, R as Elevation, Rt as BrandKitTokenRef, S as TextureIntensity, St as SingleColorAnchorName, T as TextColorPreference, Tt as Treatment, U as BORDER_STYLES, Ut as ColorTone, V as ElevationDepth, Vt as ColorRelationship, W as Border, Wt as Dimension, X as INVERT_RULES, Xt as RelatedColor, Y as BackgroundSource, Yt as MAX_COLOR_SCALE_OFFSET, Z as InvertRule, Zt as SingleColor, _ as SurfaceSettings, _t as REQUIRED_FONT_ANCHORS, a as TypeCase, at as COLOR_ANCHOR_NAMES, b as TEXTURE_KINDS, bt as RequiredFontAnchor, c as Typography, ct as ColorAnchors, d as OptionalSettingName, dt as FontAnchorRef, et as ANCHORS_REQUIRED_BY_TREATMENT, f as REQUIRED_SETTING_NAMES, ft as FontAnchors, g as SurfaceName, gt as REQUIRED_DIMENSION_ANCHORS, h as SURFACE_NAMES, ht as REQUIRED_COLOR_ANCHORS, i as TYPE_ROLES, it as Anchors, j as Motion, jt as GradientExtent, k as AmbientMotion, kt as GRADIENT_SHAPE_OPTIONS, l as ALL_SETTING_NAMES, lt as DimensionAnchorRef, m as STACKABLE_ON, mt as OptionalColorAnchor, n as StyleDocument, nt as ANCHOR_REF_PREFIX, o as TypeRole, ot as ColorAnchorName, p as RequiredSettingName, pt as OPTIONAL_COLOR_ANCHORS, q as ORNAMENTAL_BORDER_STYLES, qt as GenericFontFamily, r as TYPE_CASES, rt as AnchorGroup, s as TypeRoleName, st as ColorAnchorRef, t as DOCUMENT_KEYS, tt as ANCHOR_GROUPS, u as OPTIONAL_SETTING_NAMES, ut as DimensionAnchors, v as Surfaces, vt as RequiredColorAnchor, w as TextColor, wt as TREATMENTS, x as Texture, xt as SINGLE_COLOR_ANCHOR_NAMES, y as TEXTURE_INTENSITIES, yt as RequiredDimensionAnchor, z as ElevationColorSource, zt as COLOR_RELATIONSHIPS } from "./index-CG6dL9XZ.js";
4
- import { a as OPAQUE_BRIGHT, c as BUILT_IN_STYLES, i as OPAQUE_HEAVY, l as AURORA_LIGHT, n as OPAQUE_MEDIUM, o as GLASS_LIGHT, r as OPAQUE_LIGHT, s as GLASS_DARK, t as OPAQUE_MINIMAL, u as AURORA_DARK } from "./styleRegistry-DNVNmafi.js";
5
- import { a as StyleDocumentReport, i as StyleDocumentIssue, n as isStyleDocument, r as validateStyleDocument, t as checkStyleDocument } from "./validate-V28YRNxt.js";
6
- export { ALL_SETTING_NAMES, AMBIENT_MOTIONS, ANCHORS_REQUIRED_BY_TREATMENT, ANCHOR_GROUPS, ANCHOR_REF_PREFIX, AURORA_DARK, AURORA_LIGHT, type AdjustColorForProperContrastOptions, type AmbientMotion, type AnchorGroup, type Anchors, BORDER_STYLES, BUILT_IN_STYLES, type BackgroundColor, type BackgroundSource, type BestColorForTextOptions, type Border, type BorderSource, type BorderStyle, type BrandColorScaleOptions, type BrandKitTokenRef, COLOR_ANCHOR_NAMES, COLOR_RELATIONSHIPS, COLOR_TONES, Color, type ColorAnchorName, type ColorAnchorRef, type ColorAnchors, type ColorInput, type ColorLightnessClassification, type ColorRelationship, ColorScale, type ColorScaleOffset, type ColorScaleOptions, type ColorShape, type ColorTone, type ColorTuple, DOCUMENT_KEYS, type Dimension, type DimensionAnchorRef, type DimensionAnchors, ELEVATION_COLOR_SOURCE_KEYWORDS, ELEVATION_DEPTHS, ELEVATION_HARDNESSES, type Elevation, type ElevationColorSource, type ElevationColorSourceKeyword, type ElevationDepth, type ElevationHardness, type FontAnchorRef, type FontAnchors, type FontStack, GENERIC_FONT_FAMILIES, GLASS_DARK, GLASS_LIGHT, GRADIENT_DIRECTIONS, GRADIENT_EXTENTS, GRADIENT_POSITIONS, GRADIENT_SHAPE_OPTIONS, type GenericFontFamily, type GradientDirection, type GradientExtent, type GradientPosition, type GradientShape, type GradientShapeOption, type GradientStops, type HeavyAccentedBackgroundColorOptions, type Hsl, INVERT_RULES, type InterpolationMode, type InvertRule, type Lab, type LiteralColor, MAX_COLOR_SCALE_OFFSET, MAX_GRADIENT_STOPS, MIN_GRADIENT_STOPS, MOTION_SPEEDS, type Motion, type MotionSpeed, OFFSET_ORIGINS, OPAQUE_BRIGHT, OPAQUE_HEAVY, OPAQUE_LIGHT, OPAQUE_MEDIUM, OPAQUE_MINIMAL, OPTIONAL_COLOR_ANCHORS, OPTIONAL_SETTING_NAMES, ORNAMENTAL_BORDER_STYLES, type OffsetOrigin, type OptionalColorAnchor, type OptionalSettingName, REQUIRED_COLOR_ANCHORS, REQUIRED_DIMENSION_ANCHORS, REQUIRED_FONT_ANCHORS, REQUIRED_SETTING_NAMES, type Radius, type RadiusSource, type RelatedColor, type RequiredColorAnchor, type RequiredDimensionAnchor, type RequiredFontAnchor, type RequiredSettingName, type RgbTuple, type RgbaObject, type RgbaTuple, SINGLE_COLOR_ANCHOR_NAMES, STACKABLE_ON, SURFACE_NAMES, type SingleColor, type SingleColorAnchorName, type SingleColorAnchorRef, type SlightAccentedBackgroundColorOptions, type StyleDocument, type StyleDocumentIssue, type StyleDocumentReport, type SurfaceName, type SurfaceSettings, type Surfaces, TEXTURE_INTENSITIES, TEXTURE_KINDS, TRANSITIONS, TREATMENTS, TYPE_CASES, TYPE_ROLES, type TextColor, type TextColorPreference, type Texture, type TextureIntensity, type TextureKind, type Transition, type Treatment, type TypeCase, type TypeRole, type TypeRoleName, type Typography, adjustColorForProperContrast, checkStyleDocument, colorContrastRatiosByShape, getBestColorForText, getBrandDarkBackgroundColor, getBrandLightBackgroundColor, getBrandedColorScale, getColorLightnessClassification, getHeavyAccentedBackgroundColor, getSlightAccentedBackgroundColor, isStyleDocument, validateStyleDocument };
2
+ import { C as RgbaObject, D as colorContrastRatiosByShape, E as ColorShape, S as RgbTuple, T as Color, _ as ColorInput, a as ColorLightnessClassification, b as InterpolationMode, c as getBrandedColorScale, d as BestColorForTextOptions, f as getBestColorForText, g as adjustColorForProperContrast, h as AdjustColorForProperContrastOptions, i as getHeavyAccentedBackgroundColor, l as getBrandLightBackgroundColor, m as ColorScaleOptions, n as getSlightAccentedBackgroundColor, o as getColorLightnessClassification, p as ColorScale, r as HeavyAccentedBackgroundColorOptions, s as BrandColorScaleOptions, t as SlightAccentedBackgroundColorOptions, u as getBrandDarkBackgroundColor, v as ColorTuple, w as RgbaTuple, x as Lab, y as Hsl } from "./color-CwLKMi6Y.js";
3
+ import { a as KaleidoscopeVariables, c as BrandTokenName, i as KaleidoscopeVariableName, l as BrandTokens, n as getKaleidoscopeStyles, o as VARIABLE_PREFIX, r as KALEIDOSCOPE_CONTRACT, s as BRAND_TOKEN_NAMES, t as serializeKaleidoscopeStyles, u as DEFAULT_BRAND_TOKENS } from "./engine-B00ZVZ0d.js";
4
+ import { $ as OffsetOrigin, A as MOTION_SPEEDS, At as GradientDirection, B as ElevationColorSourceKeyword, Bt as COLOR_TONES, C as TextureKind, Ct as SingleColorAnchorRef, D as RadiusSource, Dt as GRADIENT_EXTENTS, E as Radius, Et as GRADIENT_DIRECTIONS, F as ELEVATION_COLOR_SOURCE_KEYWORDS, Ft as GradientStops, G as BorderSource, Gt as FontStack, H as ElevationHardness, Ht as ColorScaleOffset, I as ELEVATION_DEPTHS, It as MAX_GRADIENT_STOPS, J as BackgroundColor, Jt as LiteralColor, K as BorderStyle, Kt as GENERIC_FONT_FAMILIES, L as ELEVATION_HARDNESSES, Lt as MIN_GRADIENT_STOPS, M as MotionSpeed, Mt as GradientPosition, N as TRANSITIONS, Nt as GradientShape, O as AMBIENT_MOTIONS, Ot as GRADIENT_POSITIONS, P as Transition, Pt as GradientShapeOption, Q as OFFSET_ORIGINS, R as Elevation, Rt as BrandKitTokenRef, S as TextureIntensity, St as SingleColorAnchorName, T as TextColorPreference, Tt as Treatment, U as BORDER_STYLES, Ut as ColorTone, V as ElevationDepth, Vt as ColorRelationship, W as Border, Wt as Dimension, X as INVERT_RULES, Xt as RelatedColor, Y as BackgroundSource, Yt as MAX_COLOR_SCALE_OFFSET, Z as InvertRule, Zt as SingleColor, _ as SurfaceSettings, _t as REQUIRED_FONT_ANCHORS, a as TypeCase, at as COLOR_ANCHOR_NAMES, b as TEXTURE_KINDS, bt as RequiredFontAnchor, c as Typography, ct as ColorAnchors, d as OptionalSettingName, dt as FontAnchorRef, et as ANCHORS_REQUIRED_BY_TREATMENT, f as REQUIRED_SETTING_NAMES, ft as FontAnchors, g as SurfaceName, gt as REQUIRED_DIMENSION_ANCHORS, h as SURFACE_NAMES, ht as REQUIRED_COLOR_ANCHORS, i as TYPE_ROLES, it as Anchors, j as Motion, jt as GradientExtent, k as AmbientMotion, kt as GRADIENT_SHAPE_OPTIONS, l as ALL_SETTING_NAMES, lt as DimensionAnchorRef, m as STACKABLE_ON, mt as OptionalColorAnchor, n as StyleDocument, nt as ANCHOR_REF_PREFIX, o as TypeRole, ot as ColorAnchorName, p as RequiredSettingName, pt as OPTIONAL_COLOR_ANCHORS, q as ORNAMENTAL_BORDER_STYLES, qt as GenericFontFamily, r as TYPE_CASES, rt as AnchorGroup, s as TypeRoleName, st as ColorAnchorRef, t as DOCUMENT_KEYS, tt as ANCHOR_GROUPS, u as OPTIONAL_SETTING_NAMES, ut as DimensionAnchors, v as Surfaces, vt as RequiredColorAnchor, w as TextColor, wt as TREATMENTS, x as Texture, xt as SINGLE_COLOR_ANCHOR_NAMES, y as TEXTURE_INTENSITIES, yt as RequiredDimensionAnchor, z as ElevationColorSource, zt as COLOR_RELATIONSHIPS } from "./index-BOJCY_MU.js";
5
+ import { a as OPAQUE_BRIGHT, c as PRE_DEFINED_STYLES, i as OPAQUE_HEAVY, l as AURORA_LIGHT, n as OPAQUE_MEDIUM, o as GLASS_LIGHT, r as OPAQUE_LIGHT, s as GLASS_DARK, t as OPAQUE_MINIMAL, u as AURORA_DARK } from "./styleRegistry-A0nrsHk-.js";
6
+ import { a as StyleDocumentReport, i as StyleDocumentIssue, n as isStyleDocument, r as validateStyleDocument, t as checkStyleDocument } from "./validate-Bqx__f3d.js";
7
+ export { ALL_SETTING_NAMES, AMBIENT_MOTIONS, ANCHORS_REQUIRED_BY_TREATMENT, ANCHOR_GROUPS, ANCHOR_REF_PREFIX, AURORA_DARK, AURORA_LIGHT, type AdjustColorForProperContrastOptions, type AmbientMotion, type AnchorGroup, type Anchors, BORDER_STYLES, BRAND_TOKEN_NAMES, PRE_DEFINED_STYLES as BUILT_IN_STYLES, type BackgroundColor, type BackgroundSource, type BestColorForTextOptions, type Border, type BorderSource, type BorderStyle, type BrandColorScaleOptions, type BrandKitTokenRef, type BrandTokenName, type BrandTokens, COLOR_ANCHOR_NAMES, COLOR_RELATIONSHIPS, COLOR_TONES, Color, type ColorAnchorName, type ColorAnchorRef, type ColorAnchors, type ColorInput, type ColorLightnessClassification, type ColorRelationship, ColorScale, type ColorScaleOffset, type ColorScaleOptions, type ColorShape, type ColorTone, type ColorTuple, DEFAULT_BRAND_TOKENS, DOCUMENT_KEYS, type Dimension, type DimensionAnchorRef, type DimensionAnchors, ELEVATION_COLOR_SOURCE_KEYWORDS, ELEVATION_DEPTHS, ELEVATION_HARDNESSES, type Elevation, type ElevationColorSource, type ElevationColorSourceKeyword, type ElevationDepth, type ElevationHardness, type FontAnchorRef, type FontAnchors, type FontStack, GENERIC_FONT_FAMILIES, GLASS_DARK, GLASS_LIGHT, GRADIENT_DIRECTIONS, GRADIENT_EXTENTS, GRADIENT_POSITIONS, GRADIENT_SHAPE_OPTIONS, type GenericFontFamily, type GradientDirection, type GradientExtent, type GradientPosition, type GradientShape, type GradientShapeOption, type GradientStops, type HeavyAccentedBackgroundColorOptions, type Hsl, INVERT_RULES, type InterpolationMode, type InvertRule, KALEIDOSCOPE_CONTRACT, VARIABLE_PREFIX as KALEIDOSCOPE_VARIABLE_PREFIX, type KaleidoscopeVariableName, type KaleidoscopeVariables, type Lab, type LiteralColor, MAX_COLOR_SCALE_OFFSET, MAX_GRADIENT_STOPS, MIN_GRADIENT_STOPS, MOTION_SPEEDS, type Motion, type MotionSpeed, OFFSET_ORIGINS, OPAQUE_BRIGHT, OPAQUE_HEAVY, OPAQUE_LIGHT, OPAQUE_MEDIUM, OPAQUE_MINIMAL, OPTIONAL_COLOR_ANCHORS, OPTIONAL_SETTING_NAMES, ORNAMENTAL_BORDER_STYLES, type OffsetOrigin, type OptionalColorAnchor, type OptionalSettingName, REQUIRED_COLOR_ANCHORS, REQUIRED_DIMENSION_ANCHORS, REQUIRED_FONT_ANCHORS, REQUIRED_SETTING_NAMES, type Radius, type RadiusSource, type RelatedColor, type RequiredColorAnchor, type RequiredDimensionAnchor, type RequiredFontAnchor, type RequiredSettingName, type RgbTuple, type RgbaObject, type RgbaTuple, SINGLE_COLOR_ANCHOR_NAMES, STACKABLE_ON, SURFACE_NAMES, type SingleColor, type SingleColorAnchorName, type SingleColorAnchorRef, type SlightAccentedBackgroundColorOptions, type StyleDocument, type StyleDocumentIssue, type StyleDocumentReport, type SurfaceName, type SurfaceSettings, type Surfaces, TEXTURE_INTENSITIES, TEXTURE_KINDS, TRANSITIONS, TREATMENTS, TYPE_CASES, TYPE_ROLES, type TextColor, type TextColorPreference, type Texture, type TextureIntensity, type TextureKind, type Transition, type Treatment, type TypeCase, type TypeRole, type TypeRoleName, type Typography, adjustColorForProperContrast, checkStyleDocument, colorContrastRatiosByShape, getBestColorForText, getBrandDarkBackgroundColor, getBrandLightBackgroundColor, getBrandedColorScale, getColorLightnessClassification, getHeavyAccentedBackgroundColor, getKaleidoscopeStyles, getSlightAccentedBackgroundColor, isStyleDocument, serializeKaleidoscopeStyles, validateStyleDocument };
package/dist/index.js CHANGED
@@ -1,15 +1,18 @@
1
1
 
2
2
  /*
3
- * @license @wistia/kaleidoscope v0.0.5
3
+ * @license @wistia/kaleidoscope v0.0.6
4
4
  *
5
5
  * Copyright (c) 2026, Wistia, Inc. and its affiliates.
6
6
  *
7
7
  * This source code is unlicensed, all rights reserved.
8
8
  */
9
9
 
10
- import { a as getBrandLightBackgroundColor, c as ColorScale, d as Color, i as getBrandedColorScale, l as adjustColorForProperContrast, n as getHeavyAccentedBackgroundColor, o as getBrandDarkBackgroundColor, r as getColorLightnessClassification, s as getBestColorForText, t as getSlightAccentedBackgroundColor, u as colorContrastRatiosByShape } from "./color-C99gJSgH.js";
11
- import { A as GENERIC_FONT_FAMILIES, B as SINGLE_COLOR_ANCHOR_NAMES, C as ELEVATION_HARDNESSES, D as OFFSET_ORIGINS, E as INVERT_RULES, F as COLOR_ANCHOR_NAMES, I as OPTIONAL_COLOR_ANCHORS, L as REQUIRED_COLOR_ANCHORS, M as ANCHORS_REQUIRED_BY_TREATMENT, N as ANCHOR_GROUPS, O as COLOR_RELATIONSHIPS, P as ANCHOR_REF_PREFIX, R as REQUIRED_DIMENSION_ANCHORS, S as ELEVATION_DEPTHS, T as ORNAMENTAL_BORDER_STYLES, _ as GRADIENT_POSITIONS, a as TEXTURE_INTENSITIES, b as MIN_GRADIENT_STOPS, c as OPTIONAL_SETTING_NAMES, d as SURFACE_NAMES, f as AMBIENT_MOTIONS, g as GRADIENT_EXTENTS, h as GRADIENT_DIRECTIONS, i as TREATMENTS, j as MAX_COLOR_SCALE_OFFSET, k as COLOR_TONES, l as REQUIRED_SETTING_NAMES, m as TRANSITIONS, n as TYPE_CASES, o as TEXTURE_KINDS, p as MOTION_SPEEDS, r as TYPE_ROLES, s as ALL_SETTING_NAMES, t as DOCUMENT_KEYS, u as STACKABLE_ON, v as GRADIENT_SHAPE_OPTIONS, w as BORDER_STYLES, x as ELEVATION_COLOR_SOURCE_KEYWORDS, y as MAX_GRADIENT_STOPS, z as REQUIRED_FONT_ANCHORS } from "./styleVocabulary-Kl8p6TDk.js";
10
+ import { c as getBestColorForText, d as colorContrastRatiosByShape, f as Color, l as ColorScale, o as getBrandLightBackgroundColor, s as getBrandDarkBackgroundColor, t as getColorLightnessClassification, u as adjustColorForProperContrast } from "./getColorLightnessClassification--FSkjXEx.js";
11
+ import { n as getHeavyAccentedBackgroundColor, r as getBrandedColorScale, t as getSlightAccentedBackgroundColor } from "./color-BY2NrNVz.js";
12
+ import { A as REQUIRED_FONT_ANCHORS, C as ANCHORS_REQUIRED_BY_TREATMENT, D as OPTIONAL_COLOR_ANCHORS, E as COLOR_ANCHOR_NAMES, O as REQUIRED_COLOR_ANCHORS, S as MAX_COLOR_SCALE_OFFSET, T as ANCHOR_REF_PREFIX, _ as INVERT_RULES, a as AMBIENT_MOTIONS, b as COLOR_TONES, c as GRADIENT_DIRECTIONS, d as GRADIENT_SHAPE_OPTIONS, f as MAX_GRADIENT_STOPS, g as ELEVATION_HARDNESSES, h as ELEVATION_DEPTHS, i as TEXTURE_KINDS, j as SINGLE_COLOR_ANCHOR_NAMES, k as REQUIRED_DIMENSION_ANCHORS, l as GRADIENT_EXTENTS, m as ELEVATION_COLOR_SOURCE_KEYWORDS, n as TREATMENTS, o as MOTION_SPEEDS, p as MIN_GRADIENT_STOPS, r as TEXTURE_INTENSITIES, s as TRANSITIONS, t as DOCUMENT_KEYS, u as GRADIENT_POSITIONS, v as OFFSET_ORIGINS, w as ANCHOR_GROUPS, x as GENERIC_FONT_FAMILIES, y as COLOR_RELATIONSHIPS } from "./styleVocabulary-DcxbkEvK.js";
13
+ import { a as REQUIRED_SETTING_NAMES, c as BORDER_STYLES, i as OPTIONAL_SETTING_NAMES, l as ORNAMENTAL_BORDER_STYLES, n as TYPE_ROLES, o as STACKABLE_ON, r as ALL_SETTING_NAMES, s as SURFACE_NAMES, t as TYPE_CASES } from "./typography-BA9Pz8Im.js";
12
14
  import "./entries/vocabulary.js";
13
- import { a as OPAQUE_HEAVY, c as GLASS_DARK, i as OPAQUE_LIGHT, l as AURORA_LIGHT, n as OPAQUE_MINIMAL, o as OPAQUE_BRIGHT, r as OPAQUE_MEDIUM, s as GLASS_LIGHT, t as BUILT_IN_STYLES, u as AURORA_DARK } from "./styleRegistry-BoviV8Ue.js";
14
- import { n as isStyleDocument, r as validateStyleDocument, t as checkStyleDocument } from "./validate-C_h6gEXp.js";
15
- export { ALL_SETTING_NAMES, AMBIENT_MOTIONS, ANCHORS_REQUIRED_BY_TREATMENT, ANCHOR_GROUPS, ANCHOR_REF_PREFIX, AURORA_DARK, AURORA_LIGHT, BORDER_STYLES, BUILT_IN_STYLES, COLOR_ANCHOR_NAMES, COLOR_RELATIONSHIPS, COLOR_TONES, Color, ColorScale, DOCUMENT_KEYS, ELEVATION_COLOR_SOURCE_KEYWORDS, ELEVATION_DEPTHS, ELEVATION_HARDNESSES, GENERIC_FONT_FAMILIES, GLASS_DARK, GLASS_LIGHT, GRADIENT_DIRECTIONS, GRADIENT_EXTENTS, GRADIENT_POSITIONS, GRADIENT_SHAPE_OPTIONS, INVERT_RULES, MAX_COLOR_SCALE_OFFSET, MAX_GRADIENT_STOPS, MIN_GRADIENT_STOPS, MOTION_SPEEDS, OFFSET_ORIGINS, OPAQUE_BRIGHT, OPAQUE_HEAVY, OPAQUE_LIGHT, OPAQUE_MEDIUM, OPAQUE_MINIMAL, OPTIONAL_COLOR_ANCHORS, OPTIONAL_SETTING_NAMES, ORNAMENTAL_BORDER_STYLES, REQUIRED_COLOR_ANCHORS, REQUIRED_DIMENSION_ANCHORS, REQUIRED_FONT_ANCHORS, REQUIRED_SETTING_NAMES, SINGLE_COLOR_ANCHOR_NAMES, STACKABLE_ON, SURFACE_NAMES, TEXTURE_INTENSITIES, TEXTURE_KINDS, TRANSITIONS, TREATMENTS, TYPE_CASES, TYPE_ROLES, adjustColorForProperContrast, checkStyleDocument, colorContrastRatiosByShape, getBestColorForText, getBrandDarkBackgroundColor, getBrandLightBackgroundColor, getBrandedColorScale, getColorLightnessClassification, getHeavyAccentedBackgroundColor, getSlightAccentedBackgroundColor, isStyleDocument, validateStyleDocument };
15
+ import { a as OPAQUE_HEAVY, c as GLASS_DARK, i as OPAQUE_LIGHT, l as AURORA_LIGHT, n as OPAQUE_MINIMAL, o as OPAQUE_BRIGHT, r as OPAQUE_MEDIUM, s as GLASS_LIGHT, t as PRE_DEFINED_STYLES, u as AURORA_DARK } from "./styleRegistry-CT4jvu4h.js";
16
+ import { n as isStyleDocument, r as validateStyleDocument, t as checkStyleDocument } from "./validate-D-OR7_3g.js";
17
+ import { a as BRAND_TOKEN_NAMES, i as VARIABLE_PREFIX, n as getKaleidoscopeStyles, o as DEFAULT_BRAND_TOKENS, r as KALEIDOSCOPE_CONTRACT, t as serializeKaleidoscopeStyles } from "./engine-DeOUPRa0.js";
18
+ export { ALL_SETTING_NAMES, AMBIENT_MOTIONS, ANCHORS_REQUIRED_BY_TREATMENT, ANCHOR_GROUPS, ANCHOR_REF_PREFIX, AURORA_DARK, AURORA_LIGHT, BORDER_STYLES, BRAND_TOKEN_NAMES, PRE_DEFINED_STYLES as BUILT_IN_STYLES, COLOR_ANCHOR_NAMES, COLOR_RELATIONSHIPS, COLOR_TONES, Color, ColorScale, DEFAULT_BRAND_TOKENS, DOCUMENT_KEYS, ELEVATION_COLOR_SOURCE_KEYWORDS, ELEVATION_DEPTHS, ELEVATION_HARDNESSES, GENERIC_FONT_FAMILIES, GLASS_DARK, GLASS_LIGHT, GRADIENT_DIRECTIONS, GRADIENT_EXTENTS, GRADIENT_POSITIONS, GRADIENT_SHAPE_OPTIONS, INVERT_RULES, KALEIDOSCOPE_CONTRACT, VARIABLE_PREFIX as KALEIDOSCOPE_VARIABLE_PREFIX, MAX_COLOR_SCALE_OFFSET, MAX_GRADIENT_STOPS, MIN_GRADIENT_STOPS, MOTION_SPEEDS, OFFSET_ORIGINS, OPAQUE_BRIGHT, OPAQUE_HEAVY, OPAQUE_LIGHT, OPAQUE_MEDIUM, OPAQUE_MINIMAL, OPTIONAL_COLOR_ANCHORS, OPTIONAL_SETTING_NAMES, ORNAMENTAL_BORDER_STYLES, REQUIRED_COLOR_ANCHORS, REQUIRED_DIMENSION_ANCHORS, REQUIRED_FONT_ANCHORS, REQUIRED_SETTING_NAMES, SINGLE_COLOR_ANCHOR_NAMES, STACKABLE_ON, SURFACE_NAMES, TEXTURE_INTENSITIES, TEXTURE_KINDS, TRANSITIONS, TREATMENTS, TYPE_CASES, TYPE_ROLES, adjustColorForProperContrast, checkStyleDocument, colorContrastRatiosByShape, getBestColorForText, getBrandDarkBackgroundColor, getBrandLightBackgroundColor, getBrandedColorScale, getColorLightnessClassification, getHeavyAccentedBackgroundColor, getKaleidoscopeStyles, getSlightAccentedBackgroundColor, isStyleDocument, serializeKaleidoscopeStyles, validateStyleDocument };
@@ -0,0 +1,15 @@
1
+
2
+ import { n as StyleDocument } from "./index-BOJCY_MU.js";
3
+ declare const AURORA_DARK: StyleDocument;
4
+ declare const AURORA_LIGHT: StyleDocument;
5
+ /** Every Style that ships with the package. */
6
+ declare const PRE_DEFINED_STYLES: readonly StyleDocument[];
7
+ declare const GLASS_DARK: StyleDocument;
8
+ declare const GLASS_LIGHT: StyleDocument;
9
+ declare const OPAQUE_BRIGHT: StyleDocument;
10
+ declare const OPAQUE_HEAVY: StyleDocument;
11
+ declare const OPAQUE_LIGHT: StyleDocument;
12
+ declare const OPAQUE_MEDIUM: StyleDocument;
13
+ declare const OPAQUE_MINIMAL: StyleDocument;
14
+ export { OPAQUE_BRIGHT as a, PRE_DEFINED_STYLES as c, OPAQUE_HEAVY as i, AURORA_LIGHT as l, OPAQUE_MEDIUM as n, GLASS_LIGHT as o, OPAQUE_LIGHT as r, GLASS_DARK as s, OPAQUE_MINIMAL as t, AURORA_DARK as u };
15
+ //# sourceMappingURL=styleRegistry-A0nrsHk-.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleRegistry-A0nrsHk-.d.ts","names":[],"sources":["../src/styles/auroraDark.ts","../src/styles/auroraLight.ts","../src/styles/preDefinedStyles.ts","../src/styles/glassDark.ts","../src/styles/glassLight.ts","../src/styles/opaqueBright.ts","../src/styles/opaqueHeavy.ts","../src/styles/opaqueLight.ts","../src/styles/opaqueMedium.ts","../src/styles/opaqueMinimal.ts"],"mappings":";;cAEa,aAAa;cCAb,cAAc;;cCUd,6BAA6B;cCV7B,YAAY;cCAZ,aAAa;cCAb,eAAe;cCAf,cAAc;cCAd,cAAc;cCAd,eAAe;cCAf,gBAAgB"}