@weasel-js/theme 1.9.3 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/themeSheet.ts","../src/applyTheme.ts","../src/currentColor.ts","../src/colorMode.ts","../src/colorListItems.ts","../src/colorSource.ts","../src/colorList.ts"],"names":["colorLiteralToCss"],"mappings":";;;;;;AAaA,IAAM,QAAA,GAAW,YAAA;AAiBjB,IAAI,MAAA,uBAAa,OAAA,EAA8B;AAQxC,SAAS,YAAY,EAAA,EAAwB;AAClD,EAAA,MAAM,IAAA,GAAO,GAAG,WAAA,EAAY;AAC5B,EAAA,OAAO,iBAAiB,EAAA,CAAG,aAAA,CAAc,aAAa,UAAA,IAAc,UAAA,CAAA,GAAe,OAAsB,EAAA,CAAG,aAAA;AAC9G;AAEA,IAAM,aAAa,CAAC,IAAA,KAA+B,MAAA,IAAU,IAAA,GAAO,KAAK,aAAA,GAAgB,IAAA;AAGzF,IAAM,OAAO,CAAC,EAAA,KAAwB,OAAO,CAAA,GAAI,EAAA,GAAK,6BAA6B,EAAE,CAAA,GAAA,CAAA;AAErF,SAAS,KAAA,CAAM,MAAiB,IAAA,EAAuB;AACrD,EAAA,MAAM,GAAA,GAAM,CAAC,GAAG,IAAA,CAAK,KAAK,EACvB,OAAA,CAAQ,CAAC,CAAC,QAAA,EAAU,QAAQ,CAAA;AAAA;AAAA,IAE3B,CAAC,GAAG,QAAQ,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,EAAG,CAAA,KAAM,CAAA,CAAE,EAAA,GAAK,CAAA,CAAE,EAAE,CAAA,CAAE,IAAI,CAAC,CAAA,KAAM,CAAA,EAAG,QAAQ,CAAA,EAAG,IAAA,CAAK,CAAA,CAAE,EAAE,CAAC,CAAA,GAAA,EAAM,CAAA,CAAE,IAAI,CAAA,EAAA,CAAI;AAAA,GAAC,CAAA,CAC/F,KAAK,IAAI,CAAA;A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W,GAAA,GAA0B,gBAAe,EAAW;AACtG,EAAA,IAAI,MAAA,CAAO,IAAI,CAAA,EAAG,OAAO,GAAA,CAAI,QAAA,CAAS,YAAA,CAAa,IAAA,EAAM,CAAA,EAAG,GAAA,CAAI,KAAK,CAAwB,CAAA;AAC7F,EAAA,MAAM,IAAA,GAAO,WAAA,CAAY,IAAA,EAAM,CAAC,CAAA;AAChC,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,EAAU,OAAO,IAAA;AACrC,EAAA,MAAM,OAAA,GAAU,kBAAA,CAAmB,IAAA,EAAM,GAAG,CAAA;AAC5C,EAAA,OAAO,QAAA,CAAS,OAAA,IAAWA,iBAAAA,CAAkB,OAAO,GAAG,CAAC,CAAA;AAC1D;AAOO,SAAS,UAAA,CAAW,IAAA,EAAiB,CAAA,EAAW,GAAA,GAA0B,gBAAe,EAAW;AACzG,EAAA,IAAI,MAAA,CAAO,IAAI,CAAA,EAAG,OAAO,CAAA,IAAA,EAAO,aAAa,IAAA,EAAM,CAAA,EAAG,GAAA,CAAI,KAAK,CAAC,CAAA,CAAA,CAAA;AAChE,EAAA,MAAM,IAAA,GAAO,WAAA,CAAY,IAAA,EAAM,CAAC,CAAA;AAChC,EAAA,OAAO,OAAO,SAAS,QAAA,GAAW,IAAA,GAAO,SAAS,cAAA,CAAe,IAAA,EAAM,GAAG,CAAA,EAAG,CAAC,CAAA;AAChF","file":"chunk-3NIEJ77B.js","sourcesContent":["/**\n * The stylesheet a document or a shadow root holds its themes' rules in, and\n * the count of what still uses each one.\n *\n * A rule lives where its elements do: a popout window's document and a shadow\n * root each get a sheet of their own, since a rule in the opener's document\n * styles nothing in either. A rule nobody holds any more leaves its sheet, so\n * a page that mints a theme per instance holds only the live ones.\n */\n\n/** Where an element's styles come from. */\nexport type StyleRoot = Document | ShadowRoot;\n\nconst STYLE_ID = 'wzl-themes';\n\ninterface Variant {\n /** 0 is the definition that has the bare selector; a second, different\n * definition held at once under the same name and selection gets its own. */\n id: number;\n body: string;\n holds: number;\n}\n\ninterface RootSheet {\n /** `selector` → the definitions held under it. */\n rules: Map<string, Variant[]>;\n sheet: CSSStyleSheet | null;\n styleEl: HTMLStyleElement | null;\n}\n\nlet sheets = new WeakMap<StyleRoot, RootSheet>();\n\n/** Test seam: forgets every sheet, so each case starts clean. */\nexport function __resetThemeSheet(): void {\n sheets = new WeakMap();\n}\n\n/** The root `el`'s styles come from: its shadow root, else its document. */\nexport function styleRootOf(el: Element): StyleRoot {\n const root = el.getRootNode();\n return root instanceof (el.ownerDocument.defaultView?.ShadowRoot ?? ShadowRoot) ? (root as ShadowRoot) : el.ownerDocument;\n}\n\nconst documentOf = (root: StyleRoot): Document => ('host' in root ? root.ownerDocument : root);\n\n/** The selector suffix that keeps a variant's rule off the other definitions' elements, at no cost in specificity. */\nconst only = (id: number): string => (id === 0 ? '' : `:where([data-wzl-variant='${id}'])`);\n\nfunction write(root: StyleRoot, held: RootSheet): void {\n const css = [...held.rules]\n .flatMap(([selector, variants]) =>\n // The bare rule first: it matches a variant's elements too, and the variant's has to win the tie.\n [...variants].sort((a, b) => a.id - b.id).map((v) => `${selector}${only(v.id)} { ${v.body} }`))\n .join('\\n');\n const win = documentOf(root).defaultView;\n const Sheet = win?.CSSStyleSheet;\n if (Sheet && 'replaceSync' in Sheet.prototype && Array.isArray(root.adoptedStyleSheets)) {\n if (!held.sheet) {\n // From the root's own window: a constructed sheet cannot be adopted across documents.\n held.sheet = new Sheet();\n root.adoptedStyleSheets = [...root.adoptedStyleSheets, held.sheet];\n }\n held.sheet.replaceSync(css);\n return;\n }\n if (!held.styleEl) {\n held.styleEl = documentOf(root).createElement('style');\n held.styleEl.id = STYLE_ID;\n ('host' in root ? root : root.head).appendChild(held.styleEl);\n }\n held.styleEl.textContent = css;\n}\n\n/**\n * Hold the rule `selector { body }` in `root`'s sheet. Returns the variant id\n * the holder's element is to carry (0 for none) and the release, which takes\n * the rule out of the sheet once nothing else holds it.\n */\nexport function holdRule(root: StyleRoot, selector: string, body: string): { variant: number; release: () => void } {\n let held = sheets.get(root);\n if (!held) sheets.set(root, (held = { rules: new Map(), sheet: null, styleEl: null }));\n const variants = held.rules.get(selector) ?? [];\n let variant = variants.find((v) => v.body === body);\n if (variant) {\n variant.holds++;\n } else {\n let id = 0;\n while (variants.some((v) => v.id === id)) id++;\n variant = { id, body, holds: 1 };\n held.rules.set(selector, [...variants, variant]);\n write(root, held);\n }\n const mine = variant;\n const sheet = held;\n let released = false;\n return {\n variant: mine.id,\n release: () => {\n if (released) return;\n released = true;\n if (--mine.holds > 0) return;\n const left = (sheet.rules.get(selector) ?? []).filter((v) => v !== mine);\n if (left.length > 0) sheet.rules.set(selector, left);\n else sheet.rules.delete(selector);\n write(root, sheet);\n },\n };\n}\n","import { fullSelection, type Selection } from './axes';\nimport { resolveTheme, themeAxes } from './resolveTheme';\nimport type { Theme } from './theme';\nimport { holdRule, styleRootOf } from './themeSheet';\n\nexport { __resetThemeSheet } from './themeSheet';\n\n/** What an element holds from its last `applyTheme`, so the next one, or its release, can let go of it. */\nconst holds = new WeakMap<HTMLElement, () => void>();\n\n/**\n * Apply `theme` at `selection` to `el`'s subtree, and return the release.\n *\n * Stamps `data-wzl-theme` and one `data-wzl-<axis>` per axis, and holds a\n * matching rule block in the stylesheet of the document or shadow root `el`\n * lives in. Deliberately not inline properties: the cascade then does the\n * work, per-subtree overrides are just a different theme name, and no\n * `!important` is ever needed. No-op outside a DOM.\n *\n * An element holds one application: applying again replaces what it held, so\n * a caller restyling one root never has to release. The release is for a\n * subtree that goes away. It takes the attributes back off and lets go of the\n * rule, which leaves the sheet once no element holds it; a release whose\n * element has since been given something else does nothing.\n *\n * Two different themes may share a name. The second held at once has its rule\n * kept to its own elements by a `data-wzl-variant` attribute, matched inside\n * `:where()` so the rule's specificity is the first's.\n */\nexport function applyTheme(el: HTMLElement, theme: Theme, selection: Selection = {}): () => void {\n if (typeof document === 'undefined') return () => {};\n\n const axes = themeAxes(theme);\n const sel = fullSelection(axes, selection);\n const body = Object.entries(resolveTheme(theme, sel))\n .map(([name, value]) => `${name}: ${value};`)\n .join(' ');\n const names = Object.keys(axes);\n const selector = `[data-wzl-theme='${theme.name}']${names.map((a) => `[data-wzl-${a}='${sel[a]}']`).join('')}`;\n // Held before the last one is let go, so re-applying the same rule rewrites nothing.\n const { variant, release: releaseRule } = holdRule(styleRootOf(el), selector, body);\n holds.get(el)?.();\n\n el.setAttribute('data-wzl-theme', theme.name);\n for (const a of names) el.setAttribute(`data-wzl-${a}`, sel[a]);\n if (variant === 0) el.removeAttribute('data-wzl-variant');\n else el.setAttribute('data-wzl-variant', String(variant));\n\n // The attributes go only through `release`: a hold replaced by the next application leaves them to it.\n const letGo = (): void => {\n holds.delete(el);\n releaseRule();\n };\n holds.set(el, letGo);\n return () => {\n if (holds.get(el) !== letGo) return;\n letGo();\n for (const a of ['theme', 'variant', ...names]) el.removeAttribute(`data-wzl-${a}`);\n };\n}\n","import { atAlpha, withAlpha } from './dtcg/color.ts';\n\nconst NUMBER = String.raw`(\\d*\\.?\\d+)(%?)`;\nconst RELATIVE = new RegExp(String.raw`^rgb\\(\\s*from\\s+currentcolor\\s+r\\s+g\\s+b\\s*/\\s*${NUMBER}\\s*\\)$`, 'i');\nconst MIX = new RegExp(String.raw`^color-mix\\(\\s*in\\s+[\\w-]+\\s*,\\s*currentcolor\\s+${NUMBER}\\s*,\\s*transparent\\s*\\)$`, 'i');\n\nconst fraction = (n: string, pct: string) => Number(n) / (pct ? 100 : 1);\n\n/**\n * A resolved token value with `currentColor` taken to be `current`, for a surface drawn without the\n * cascade — a canvas reading a resolved theme — where `currentColor` has nothing to resolve against.\n * Pass the color of the text the value is drawn beside, usually `--wzl-fg`. A value that never\n * mentions `currentColor` comes back unchanged.\n *\n * Flattens the forms the kit's themes write: bare `currentColor`, `rgb(from currentColor r g b / a)`\n * and `color-mix(in <space>, currentColor p%, transparent)`. Throws on any other use of it.\n */\nexport function resolveCurrentColor(value: string, current: string): string {\n const v = value.trim();\n if (!/currentcolor/i.test(v)) return value;\n if (/^currentcolor$/i.test(v)) return current;\n const rel = RELATIVE.exec(v);\n if (rel) return atAlpha(current, fraction(rel[1], rel[2]));\n const mix = MIX.exec(v);\n if (mix && mix[2] === '%') return withAlpha(current, fraction(mix[1], mix[2]));\n throw new Error(`resolveCurrentColor: cannot flatten \"${value}\"`);\n}\n","/** A color mode the theme's `mode` axis resolves. */\nexport type ColorMode = 'light' | 'dark';\n\n/**\n * What a user chose: a mode, or `'auto'` — follow the OS, live. `'auto'` is\n * not a mode; resolve it with `useResolvedColorMode` before handing it to a\n * `ThemeProvider` selection.\n */\nexport type ColorModePreference = 'auto' | ColorMode;\n\n/** Whether a value — say, one read back from storage — is a preference. */\nexport function isColorModePreference(v: unknown): v is ColorModePreference {\n return v === 'auto' || v === 'light' || v === 'dark';\n}\n","import type { ColorLiteral, ColorRef, ColorSource, Palette } from '@weasel-js/paint';\nimport type { CategoricalRampDef } from './definition.ts';\nimport { DEFAULT_CONSTRAINTS, generate, type Constraints } from './engine/color/generate.ts';\nimport { resolveTheme, themeChain, type ResolvedTheme } from './resolveTheme.ts';\nimport { weaselTheme, type Theme } from './theme.ts';\n\n/** The categorical generator the swatch ramp uses, asked for `count` colors. */\nexport interface GeneratedColors {\n readonly generate: { readonly count: number; readonly gates?: CategoricalRampDef['gates'] };\n}\n\n/** A ramp of the active theme, by name — `{ ramp: 'swatch' }` walks its steps in order. */\nexport interface RampColors {\n readonly ramp: string;\n}\n\n/** One color of a list: a CSS color string, or a `ColorSource` resolved when it is read. */\nexport type ColorListItem = string | ColorSource;\n\n/** The forms a theme definition can hold: everything but a function. */\nexport type SerializableColorList = readonly (string | ColorLiteral | ColorRef)[] | GeneratedColors | RampColors;\n\n/**\n * Several colors, read by index with `colorAt`, wrapping. Items, each a CSS\n * string or a `ColorSource`; the swatch ramp's generator; a ramp of the active\n * theme, which follows the mode; or a function of the index.\n */\nexport type ColorList = readonly ColorListItem[] | GeneratedColors | RampColors | ((i: number) => ColorListItem);\n\n/** What a `ColorList` resolves against. `useTheme()`'s value is one. */\nexport interface ColorContext {\n readonly theme: Theme;\n readonly resolved: ResolvedTheme;\n}\n\n/** What a `ColorSource` resolves against under a theme. `useTones()`'s value is one. */\nexport interface ColorSourceContext extends ColorContext {\n /** The list `{ ref: 'tone' }` indexes. Absent: the theme's own. */\n readonly tones?: ColorList;\n /** Names answered before the theme's. */\n readonly palette?: Palette;\n}\n\nconst wrap = (i: number, n: number) => ((Math.trunc(i) % n) + n) % n;\n\nconst generated = new Map<string, readonly string[]>();\n\nfunction generatedColors({ generate: g }: GeneratedColors): readonly string[] {\n const key = JSON.stringify([g.count, g.gates ?? {}]);\n let colors = generated.get(key);\n if (!colors) {\n const palette = generate({ ...DEFAULT_CONSTRAINTS, ...(g.gates as Partial<Constraints>), count: g.count, anchors: [] });\n colors = palette.swatches.map((s) => s.hex.toLowerCase());\n generated.set(key, colors);\n }\n return colors;\n}\n\n/** `rampSteps`, answering `undefined` for a ramp the chain lacks. */\nexport function findRampSteps(theme: Theme, ramp: string): readonly string[] | undefined {\n for (const t of themeChain(theme).reverse()) {\n const steps = t.ramps?.[ramp];\n if (steps) return steps;\n }\n return undefined;\n}\n\n/** A ramp's step names, from the nearest theme in the chain that declares it. */\nexport function rampSteps(theme: Theme, ramp: string): readonly string[] {\n const steps = findRampSteps(theme, ramp);\n if (!steps) throw new Error(`Theme \"${theme.name}\" has no ramp \"${ramp}\"`);\n return steps;\n}\n\n/** The tone list a theme declares, from the nearest theme in its chain that has one. */\nexport function themeTones(theme: Theme): ColorList {\n for (const t of themeChain(theme).reverse()) if (t.tones) return t.tones;\n return { ramp: 'swatch' };\n}\n\nlet fallback: ColorContext | undefined;\nexport const defaultContext = () => (fallback ??= { theme: weaselTheme, resolved: resolveTheme(weaselTheme) });\n\nconst pickStep = (list: RampColors, i: number, theme: Theme): string => {\n const steps = rampSteps(theme, list.ramp);\n return steps[wrap(i, steps.length)];\n};\n\n/** The custom property behind the `i`th step of a ramp list, wrapping. */\nexport const rampProperty = (list: RampColors, i: number, theme: Theme): string =>\n `--wzl-${list.ramp}-${pickStep(list, i, theme)}`;\n\nexport const isRamp = (list: ColorList): list is RampColors => typeof list !== 'function' && 'ramp' in list;\n\n/** The `i`th item of a list that is not a ramp, wrapping, as it was written. */\nexport function colorItemAt(list: Exclude<ColorList, RampColors>, i: number): ColorListItem {\n if (typeof list === 'function') return list(i);\n const colors = 'generate' in list ? generatedColors(list) : list;\n if (colors.length === 0) throw new Error('colorAt: empty color list');\n return colors[wrap(i, colors.length)];\n}\n\n/** How many distinct colors `list` holds before it wraps; `undefined` for a function, which never does. */\nexport function colorCount(list: ColorList, ctx: ColorContext = defaultContext()): number | undefined {\n if (typeof list === 'function') return undefined;\n if ('ramp' in list) return rampSteps(ctx.theme, list.ramp).length;\n return 'generate' in list ? list.generate.count : list.length;\n}\n","import {\n colorLiteralToCss,\n cssColorLiteral,\n resolvePaletteColor,\n type ColorLiteral,\n type ColorRef,\n type ColorSource,\n type Palette,\n} from '@weasel-js/paint';\nimport {\n colorItemAt,\n defaultContext,\n findRampSteps,\n isRamp,\n rampProperty,\n themeTones,\n type ColorList,\n type ColorSourceContext,\n} from './colorListItems.ts';\nimport { resolveCurrentColor } from './currentColor.ts';\n\n/** The name the tone list answers to: `{ ref: 'tone', index: 2 }` is the third tone, wrapping. */\nexport const TONE_REF = 'tone';\n\nexport type { ColorSourceContext };\n\nconst NO_PALETTE: Palette = { entries: [] };\n\nconst tonesOf = (ctx: ColorSourceContext): ColorList => ctx.tones ?? themeTones(ctx.theme);\n\nfunction parsed(css: string): ColorLiteral | null {\n try {\n return cssColorLiteral(css);\n } catch {\n return null;\n }\n}\n\n/** The custom property a theme ref names: itself when spelled as one, a token by name, or a ramp step by index. */\nfunction propertyOf(ref: ColorRef, ctx: ColorSourceContext): string | null {\n if (ref.ref.startsWith('--')) return ref.index === undefined ? ref.ref : null;\n if (ref.index === undefined) return `--wzl-${ref.ref}`;\n const step = findRampSteps(ctx.theme, ref.ref)?.[ref.index];\n return step === undefined ? null : `--wzl-${ref.ref}-${step}`;\n}\n\nfunction tokenLiteral(property: string, ctx: ColorSourceContext): ColorLiteral | null {\n const value = (ctx.resolved as Readonly<Record<string, string>>)[property];\n if (value === undefined) return null;\n try {\n return parsed(resolveCurrentColor(value, ctx.resolved['--wzl-fg']));\n } catch {\n return null;\n }\n}\n\nconst isRef = (source: ColorSource): source is ColorRef => typeof source !== 'function' && 'ref' in source;\n\nfunction toneSource(index: number, ctx: ColorSourceContext): ColorSource | null {\n const tones = tonesOf(ctx);\n if (isRamp(tones)) return tokenLiteral(rampProperty(tones, index, ctx.theme), ctx);\n const item = colorItemAt(tones, index);\n return typeof item === 'string' ? parsed(item) : item;\n}\n\nfunction themeSource(ref: ColorRef, ctx: ColorSourceContext): ColorSource | null {\n if (ref.ref === TONE_REF) return toneSource(ref.index ?? 0, ctx);\n const property = propertyOf(ref, ctx);\n return property === null ? null : tokenLiteral(property, ctx);\n}\n\n/**\n * Resolve `source` to a literal, for a surface drawn without the cascade. A ref\n * names an entry of the context's palette first, then the theme: `tone` with an\n * index into the tone list, a token by its name without the `--wzl-` prefix, a\n * ramp by its name with the index of a step, or a custom property spelled out.\n * `null` for a name nothing answers, a token that is not a color, and a custom\n * property the theme does not define.\n */\nexport function colorSourceLiteral(source: ColorSource, ctx: ColorSourceContext = defaultContext()): ColorLiteral | null {\n return resolvePaletteColor(ctx.palette ?? NO_PALETTE, source, (ref) => themeSource(ref, ctx));\n}\n\nfunction literalCss(source: ColorSource, ctx: ColorSourceContext): string | null {\n const literal = colorSourceLiteral(source, ctx);\n return literal && colorLiteralToCss(literal);\n}\n\nfunction toneCss(source: ColorRef, ctx: ColorSourceContext): string | null {\n const tones = tonesOf(ctx);\n const index = source.index ?? 0;\n if (isRamp(tones)) return `var(${rampProperty(tones, index, ctx.theme)})`;\n const item = colorItemAt(tones, index);\n if (typeof item === 'string') return item;\n return isRef(item) && item.ref !== TONE_REF ? colorSourceCss(item, ctx) : literalCss(source, ctx);\n}\n\n/**\n * `source` as a CSS color, naming what `colorSourceLiteral` resolves. A ref the\n * theme answers is written as its custom property, so it follows the cascade\n * with no re-render and a property spelled out need not be the theme's;\n * everything else is written as the literal it resolves to.\n */\nexport function colorSourceCss(source: ColorSource, ctx: ColorSourceContext = defaultContext()): string | null {\n if (isRef(source) && !ctx.palette?.entries.some((e) => e.name === source.ref)) {\n if (source.ref === TONE_REF) return toneCss(source, ctx);\n const property = propertyOf(source, ctx);\n if (property === null) return null;\n return source.ref.startsWith('--') || tokenLiteral(property, ctx) ? `var(${property})` : null;\n }\n return literalCss(source, ctx);\n}\n","import { colorLiteralToCss } from '@weasel-js/paint';\nimport { colorItemAt, defaultContext, isRamp, rampProperty, type ColorList, type ColorSourceContext } from './colorListItems.ts';\nimport { colorSourceCss, colorSourceLiteral } from './colorSource.ts';\nimport type { ResolvedTheme } from './resolveTheme.ts';\n\nexport {\n colorCount,\n findRampSteps,\n rampSteps,\n themeTones,\n type ColorContext,\n type ColorList,\n type ColorListItem,\n type GeneratedColors,\n type RampColors,\n type SerializableColorList,\n} from './colorListItems.ts';\n\nfunction answered(css: string | null, i: number): string {\n if (css === null) throw new Error(`colorAt: nothing answers item ${i} of the color list`);\n return css;\n}\n\n/**\n * The `i`th color of `list`, wrapping. A ramp list reads the resolved theme, so\n * the answer follows its mode; a `ColorSource` item resolves against the\n * context's palette, then its theme. Throws on an item nothing answers.\n */\nexport function colorAt(list: ColorList, i: number, ctx: ColorSourceContext = defaultContext()): string {\n if (isRamp(list)) return ctx.resolved[rampProperty(list, i, ctx.theme) as keyof ResolvedTheme];\n const item = colorItemAt(list, i);\n if (typeof item === 'string') return item;\n const literal = colorSourceLiteral(item, ctx);\n return answered(literal && colorLiteralToCss(literal), i);\n}\n\n/**\n * As `colorAt`, but a ramp list, and an item that names the theme, answers\n * with its custom property (`var(--wzl-swatch-sky)`), so a color written into\n * CSS follows a mode change without re-rendering, provider or not.\n */\nexport function colorCssAt(list: ColorList, i: number, ctx: ColorSourceContext = defaultContext()): string {\n if (isRamp(list)) return `var(${rampProperty(list, i, ctx.theme)})`;\n const item = colorItemAt(list, i);\n return typeof item === 'string' ? item : answered(colorSourceCss(item, ctx), i);\n}\n"]}