foldkit-mixins 0.9.0 → 0.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.
package/README.md CHANGED
@@ -346,7 +346,12 @@ text on that fill (near white on a mid accent), and `ink` is text in the family'
346
346
  base surface, dark enough to read in a light scheme and light enough in a dark one. Colored text
347
347
  is `ink`, never `default`. The surfaces are the base at a few lightnesses with its chroma, so a
348
348
  panel and a sidebar read as the page's own color; `bedrock` is the deepest of them in both
349
- schemes, and the focus ring, `outline.focus`, is the accent. `Theme.tokens` is the
349
+ schemes, and the focus ring, `outline.focus`, is the accent. The `syntax` group colors code by
350
+ the kinds a tokenizer names (`syntax-keyword` is `--fk-syntax-keyword`, as
351
+ `foldkit-richtext-code` and its Shiki adapter name them): `keyword`, `function` and `type` in
352
+ the accent, secondary and tertiary hues, `string`, `number` and `property` in the success,
353
+ warning and info hues, all at one lightness per scheme and the `syntaxChroma` knob's chroma, and
354
+ `operator`, `punctuation` and `comment` in the text's own grey. `Theme.tokens` is the
350
355
  non-color scales, with `space` and `radius` multiplied by the `density` and `radius-factor` knobs.
351
356
 
352
357
  A theme reaches the page as pieces, and the page chooses the layers:
@@ -20,6 +20,8 @@ interface OklchKnobs {
20
20
  readonly surfaceContrast?: string;
21
21
  /** Multiplies text chroma. */
22
22
  readonly contrastFactor?: number;
23
+ /** Chroma of the code colors (`syntax-*`), 0–0.4; default `0.14`. */
24
+ readonly syntaxChroma?: number;
23
25
  /** Hues of the feedback families. */
24
26
  readonly feedback?: {
25
27
  readonly success?: number;
@@ -47,6 +49,7 @@ declare const oklch: (knobs: OklchKnobs) => Readonly<{
47
49
  'warning-h': string;
48
50
  'error-h': string;
49
51
  'info-h': string;
52
+ 'syntax-c': string;
50
53
  };
51
54
  hue: {
52
55
  accent: string;
@@ -142,8 +145,19 @@ declare const oklch: (knobs: OklchKnobs) => Readonly<{
142
145
  'on-fill': string;
143
146
  ink: string;
144
147
  };
148
+ syntax: {
149
+ keyword: string;
150
+ function: string;
151
+ type: string;
152
+ string: string;
153
+ number: string;
154
+ property: string;
155
+ operator: string;
156
+ punctuation: string;
157
+ comment: string;
158
+ };
145
159
  }>;
146
160
  type OklchTheme = ReturnType<typeof oklch>;
147
161
  //#endregion
148
162
  export { OklchTheme as n, oklch as r, OklchKnobs as t };
149
- //# sourceMappingURL=oklch-CLKxbFpD.d.mts.map
163
+ //# sourceMappingURL=oklch-CDSDQNWl.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oklch-CDSDQNWl.d.mts","names":[],"sources":["../src/theme/oklch.ts"],"mappings":";UAUiB;;WAEN;aACE;aACA;aACA;;aAEA;eAAkB;eAAqB;;;;WAGzC;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;aACE;aACA;aACA;aACA;;;cAwFA,QAAS,OAAO,eAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4G3B,aAAa,kBAAkB"}
package/dist/theme.d.mts CHANGED
@@ -2,7 +2,7 @@ import { o as StyleValue } from "./styleValue-BavTe9MZ.mjs";
2
2
  import { a as compose, c as lightDark, i as VAR_PREFIX, l as ref, n as Theme$1, o as core_d_exports, r as ThemeTokens, s as define, t as Refs, u as variables } from "./core-CUw_n1Nd.mjs";
3
3
  import { i as scoped, n as RootOptions, r as root, t as Overrides } from "./root-xyWS6geK.mjs";
4
4
  import { i as tokens, n as breakpointWidths, r as inContainer, t as Tokens } from "./tokens-BaLmrfbp.mjs";
5
- import { n as OklchTheme, r as oklch, t as OklchKnobs } from "./oklch-CLKxbFpD.mjs";
5
+ import { n as OklchTheme, r as oklch, t as OklchKnobs } from "./oklch-CDSDQNWl.mjs";
6
6
  //#region src/theme.d.ts
7
7
  export declare const Theme: {
8
8
  readonly root: (theme: ThemeTokens, options?: RootOptions) => StyleValue;
@@ -111,6 +111,7 @@ export declare const Theme: {
111
111
  'warning-h': string;
112
112
  'error-h': string;
113
113
  'info-h': string;
114
+ 'syntax-c': string;
114
115
  };
115
116
  hue: {
116
117
  accent: string;
@@ -206,6 +207,17 @@ export declare const Theme: {
206
207
  'on-fill': string;
207
208
  ink: string;
208
209
  };
210
+ syntax: {
211
+ keyword: string;
212
+ function: string;
213
+ type: string;
214
+ string: string;
215
+ number: string;
216
+ property: string;
217
+ operator: string;
218
+ punctuation: string;
219
+ comment: string;
220
+ };
209
221
  }>;
210
222
  readonly define: <T extends ThemeTokens>(tokens: T) => Readonly<T>;
211
223
  readonly ref: <T extends ThemeTokens>(theme: T) => Refs<T>;
package/dist/theme.mjs CHANGED
@@ -62,6 +62,11 @@ const family = (name, defaultValue) => {
62
62
  ink: ink(color)
63
63
  };
64
64
  };
65
+ /**
66
+ * A code color in `hue`: the same lightness for every kind, so no kind shouts,
67
+ * dark enough to read on a light surface and light enough on a dark one.
68
+ */
69
+ const syntaxInk = (hue) => ld(`oklch(48% ${v("knob", "syntax-c")} ${hue})`, `oklch(80% ${v("knob", "syntax-c")} ${hue})`);
65
70
  /** A feedback family, lighter in a dark scheme so its fill reads on a dark page. */
66
71
  const feedback = (name, l, c, dark) => family(name, ld(`oklch(${l}% ${c} ${v("knob", `${name}-h`)})`, `oklch(${dark}% ${c} ${v("knob", `${name}-h`)})`));
67
72
  const oklch = (knobs) => {
@@ -85,7 +90,8 @@ const oklch = (knobs) => {
85
90
  "success-h": String(knobs.feedback?.success ?? 145),
86
91
  "warning-h": String(knobs.feedback?.warning ?? 75),
87
92
  "error-h": String(knobs.feedback?.error ?? 25),
88
- "info-h": String(knobs.feedback?.info ?? 245)
93
+ "info-h": String(knobs.feedback?.info ?? 245),
94
+ "syntax-c": num(knobs.syntaxChroma ?? .14)
89
95
  },
90
96
  hue: {
91
97
  accent: v("knob", "accent-h"),
@@ -122,7 +128,18 @@ const oklch = (knobs) => {
122
128
  success: feedback("success", 55, .15, 64),
123
129
  warning: feedback("warning", 70, .15, 76),
124
130
  error: feedback("error", 60, .2, 64),
125
- info: feedback("info", 65, .15, 70)
131
+ info: feedback("info", 65, .15, 70),
132
+ syntax: {
133
+ keyword: syntaxInk(v("hue", "accent")),
134
+ function: syntaxInk(v("hue", "secondary")),
135
+ type: syntaxInk(v("hue", "tertiary")),
136
+ string: syntaxInk(v("knob", "success-h")),
137
+ number: syntaxInk(v("knob", "warning-h")),
138
+ property: syntaxInk(v("knob", "info-h")),
139
+ operator: v("text", "default"),
140
+ punctuation: v("text", "muted"),
141
+ comment: text([52, 1], [62, 1])
142
+ }
126
143
  });
127
144
  };
128
145
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"theme.mjs","names":["Core.Theme"],"sources":["../src/theme/oklch.ts","../src/theme.ts"],"sourcesContent":["/**\n * A whole palette from a few knobs, as css-tags derives it: every value\n * except the knobs is a CSS expression over other tokens, so overriding a\n * knob anywhere (a scoped theme, a subtree, an inline style) re-derives the\n * rest in the browser. Where light and dark schemes need different numbers\n * the value is a `light-dark()` pair, so one theme serves both and a user's\n * choice is a `color-scheme` override.\n */\nimport { define } from './core.js'\n\nexport interface OklchKnobs {\n /** The brand color: hue in degrees, chroma 0–0.4, lightness as a percentage. */\n readonly accent: {\n readonly h: number\n readonly c: number\n readonly l: string\n /** Lighter and stronger on dark surfaces; defaults `70%` and `c + 0.03`. */\n readonly dark?: { readonly l?: string; readonly c?: number }\n }\n /** Degrees added to the accent hue for the secondary and tertiary families. */\n readonly secondaryHueShift?: number\n readonly tertiaryHueShift?: number\n /** Chroma of neutral surfaces; 0 is gray. */\n readonly surfaceSaturation?: number\n /** How far apart the surface steps are, 0–100%. */\n readonly surfaceContrast?: string\n /** Multiplies text chroma. */\n readonly contrastFactor?: number\n /** Hues of the feedback families. */\n readonly feedback?: {\n readonly success?: number\n readonly warning?: number\n readonly error?: number\n readonly info?: number\n }\n}\n\nconst v = (group: string, name: string) => `var(--fk-${group}-${name})`\n/** A computed knob without float noise: `0.02`, not `0.019999999999999997`. */\nconst num = (value: number) => String(Number(value.toFixed(4)))\nconst ld = (light: string, dark: string) => `light-dark(${light}, ${dark})`\nconst offset = (amount: number) => `${amount < 0 ? '-' : '+'} ${Math.abs(amount)}`\n/** `oklch(from <color> …)` with the hue kept. */\nconst from = (color: string, l: string, c: string) => `oklch(from ${color} ${l} ${c} h)`\nconst shift = (color: string, dl: number, dc: number) =>\n from(color, `calc(l ${offset(dl)})`, `calc(c ${offset(dc)})`)\nconst scale = (color: string, dl: number, cx: number) =>\n from(color, `calc(l ${offset(dl)})`, `calc(c * ${cx})`)\n/** The same lightness and chroma as `color` on another hue. */\nconst rehue = (color: string, hue: string) => `oklch(from ${color} l c ${hue})`\n/** Near-black or near-white text over `color`. */\nconst contrast = (color: string) =>\n `oklch(from ${color} clamp(0.1, (0.65 / l - 1) * 999, 0.98) min(c, 0.08) h)`\n/** `color` as text on the base surface: dark in a light scheme, light in a dark one. */\nconst ink = (color: string) => ld(from(color, '0.5', 'c'), from(color, '0.8', 'c'))\n/**\n * `color` tinted onto the base surface, the same in both schemes. Mixed in\n * OKLab, not OKLCH: OKLCH interpolates hue, so a mix mostly of the base keeps\n * the base's hue, and a green tinted onto a blue-grey base came out blue.\n */\nconst tint = (color: string, percent: number) =>\n `color-mix(in oklab, ${v('surface', 'base')} ${percent}%, ${color})`\n\nconst neutral = v('hue', 'neutral')\nconst base = v('surface', 'base')\nconst surfaceC = v('knob', 'surface-c')\nconst surfaceCDark = v('knob', 'surface-c-dark')\nconst contrastFactor = v('knob', 'contrast-factor')\n\ntype Step = readonly [lightness: number, chroma: number]\n\n/** A surface step: the base mixed toward a target by `surface-contrast`. */\nconst surfaceStep = (light: Step, dark: Step) => {\n const amount = v('knob', 'surface-contrast')\n const target = ld(scale(base, light[0], light[1]), scale(base, dark[0], dark[1]))\n return `color-mix(in oklch, ${base} calc(100% - ${amount}), ${target} ${amount})`\n}\n\n/** A text color: fixed lightness, chroma scaled by surface saturation and the contrast factor. */\nconst text = (light: Step, dark: Step) =>\n ld(\n `oklch(${light[0]}% calc(${surfaceC} * ${light[1]} * ${contrastFactor}) ${neutral})`,\n `oklch(${dark[0]}% calc(${surfaceCDark} * ${dark[1]} * ${contrastFactor}) ${neutral})`,\n )\n\n/**\n * A color family, every one the same shape: its fill, the fill hovered and\n * pressed, a tint of it on the base, a line in it that stands off the base\n * (darker in a light scheme, lighter in a dark one), and text on the fill\n * and in the family's color.\n */\nconst family = (name: string, defaultValue: string) => {\n const color = v(name, 'default')\n return {\n default: defaultValue,\n hover: shift(color, -0.06, 0),\n active: shift(color, -0.1, 0.05),\n subtle: tint(color, 85),\n outline: ld(shift(color, -0.05, 0), shift(color, 0.05, 0)),\n 'on-fill': contrast(color),\n ink: ink(color),\n }\n}\n\n/** A feedback family, lighter in a dark scheme so its fill reads on a dark page. */\nconst feedback = (name: string, l: number, c: number, dark: number) =>\n family(\n name,\n ld(\n `oklch(${l}% ${c} ${v('knob', `${name}-h`)})`,\n `oklch(${dark}% ${c} ${v('knob', `${name}-h`)})`,\n ),\n )\n\nexport const oklch = (knobs: OklchKnobs) => {\n const accent = v('accent', 'default')\n const surfaceSaturation = knobs.surfaceSaturation ?? 0.015\n return define({\n knob: {\n 'accent-h': String(knobs.accent.h),\n 'accent-c': String(knobs.accent.c),\n 'accent-l': knobs.accent.l,\n 'accent-c-dark': num(knobs.accent.dark?.c ?? Math.min(0.4, knobs.accent.c + 0.03)),\n 'accent-l-dark': knobs.accent.dark?.l ?? '70%',\n 'secondary-shift': String(knobs.secondaryHueShift ?? 60),\n 'tertiary-shift': String(knobs.tertiaryHueShift ?? -90),\n 'surface-c': String(surfaceSaturation),\n 'surface-c-dark': num(surfaceSaturation * (4 / 3)),\n 'surface-contrast': knobs.surfaceContrast ?? '65%',\n 'contrast-factor': String(knobs.contrastFactor ?? 1),\n 'base-l': '97.5%',\n 'base-l-dark': '22%',\n 'success-h': String(knobs.feedback?.success ?? 145),\n 'warning-h': String(knobs.feedback?.warning ?? 75),\n 'error-h': String(knobs.feedback?.error ?? 25),\n 'info-h': String(knobs.feedback?.info ?? 245),\n },\n hue: {\n accent: v('knob', 'accent-h'),\n secondary: `calc(${v('knob', 'accent-h')} + ${v('knob', 'secondary-shift')})`,\n tertiary: `calc(${v('knob', 'accent-h')} + ${v('knob', 'tertiary-shift')})`,\n neutral: v('hue', 'accent'),\n },\n surface: {\n base: ld(\n `oklch(${v('knob', 'base-l')} calc(${surfaceC} * 0.9) ${neutral})`,\n `oklch(${v('knob', 'base-l-dark')} calc(${surfaceCDark} * 0.9) ${neutral})`,\n ),\n // Each step keeps about the base's chroma, so a sidebar, a panel and\n // the page read as one color at a few lightnesses: one with less reads\n // grey on the page, one with more reads as another, bluer color.\n muted: surfaceStep([-0.04, 1.2], [-0.03, 1.05]),\n subtle: surfaceStep([-0.025, 1.15], [-0.015, 1.05]),\n default: surfaceStep([-0.055, 1.25], [0.045, 1.1]),\n overt: surfaceStep([-0.31, 2.25], [0.125, 1.2]),\n // The deepest of the page's color in both schemes: under a dialog's\n // backdrop, a veil of it darkens the page; it was near-white in a dark one.\n bedrock: ld(\n `oklch(8% calc(${surfaceC} * 1.2) ${neutral})`,\n `oklch(6% calc(${surfaceCDark} * 1.2) ${neutral})`,\n ),\n },\n text: {\n default: text([20, 2], [88, 0.8]),\n muted: text([45, 1.5], [65, 1.2]),\n subtle: text([35, 1.8], [75, 1]),\n overt: text([10, 2.2], [95, 0.6]),\n link: shift(accent, 0.1, 0.05),\n 'link-hover': shift(v('text', 'link'), -0.1, 0),\n },\n // Steps from the base, as the surfaces are: darker in a light scheme,\n // lighter in a dark one, and in the base's own hue with a little more of\n // its chroma, which a thin line needs to read as the page's color. Text mixed into the base, as they were, came out grey on a\n // tinted page: the text is near-neutral, so the mix lost the tint.\n outline: {\n subtle: ld(scale(base, -0.07, 1.3), scale(base, 0.065, 1.25)),\n default: ld(scale(base, -0.13, 1.4), scale(base, 0.12, 1.35)),\n overt: ld(scale(base, -0.27, 1.6), scale(base, 0.23, 1.5)),\n // The accent as it is: darker and more saturated, the ring was the\n // harshest color on the page.\n focus: accent,\n },\n accent: family(\n 'accent',\n ld(\n `oklch(${v('knob', 'accent-l')} ${v('knob', 'accent-c')} ${v('hue', 'accent')})`,\n `oklch(${v('knob', 'accent-l-dark')} ${v('knob', 'accent-c-dark')} ${v('hue', 'accent')})`,\n ),\n ),\n secondary: family('secondary', rehue(accent, v('hue', 'secondary'))),\n tertiary: family('tertiary', rehue(accent, v('hue', 'tertiary'))),\n // A near-black of the neutral hue: faint on a light surface, and denser\n // on a dark one, where a light shadow would read as a glow.\n shadow: {\n color: ld(\n `oklch(25% calc(${surfaceC} * 2) ${neutral} / 0.14)`,\n `oklch(5% calc(${surfaceCDark} * 2) ${neutral} / 0.6)`,\n ),\n },\n success: feedback('success', 55, 0.15, 64),\n warning: feedback('warning', 70, 0.15, 76),\n // Under 65% in the dark, where the text on a fill turns dark: on red that reads muddy.\n error: feedback('error', 60, 0.2, 64),\n info: feedback('info', 65, 0.15, 70),\n })\n}\n\nexport type OklchTheme = ReturnType<typeof oklch>\n","/**\n * `foldkit-mixins/theme`: the root export's `Theme` plus the page-level\n * pieces. `root` and `scoped` turn tokens into unlayered `:root` and\n * selector rules for `Style.stylesheet`; `tokens` is the shipped set of\n * non-color scales; `oklch` derives a whole palette from a few knobs.\n */\nimport * as Core from './theme/core.js'\nimport { oklch } from './theme/oklch.js'\nimport { root, scoped } from './theme/root.js'\nimport { breakpointWidths, inContainer, tokens } from './theme/tokens.js'\n\nexport { compose, define, lightDark, ref, variables, VAR_PREFIX } from './theme/core.js'\nexport type { Refs, Theme as ThemeValue, ThemeTokens } from './theme/core.js'\nexport { root, scoped } from './theme/root.js'\nexport type { Overrides, RootOptions } from './theme/root.js'\nexport { breakpointWidths, inContainer, tokens } from './theme/tokens.js'\nexport type { Tokens } from './theme/tokens.js'\nexport { oklch } from './theme/oklch.js'\nexport type { OklchKnobs, OklchTheme } from './theme/okl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AAS,QAAQ,IAAI,KAAM,EAAE;CACrC,CAAC;AACH;;;;;;;;;ACzLA,MAAa,QAAQ;CACnB,GAAGA;CACH;CACA;CACA;CACA;CACA;CACA;AACF"}
1
+ {"version":3,"file":"theme.mjs","names":["Core.Theme"],"sources":["../src/theme/oklch.ts","../src/theme.ts"],"sourcesContent":["/**\n * A whole palette from a few knobs, as css-tags derives it: every value\n * except the knobs is a CSS expression over other tokens, so overriding a\n * knob anywhere (a scoped theme, a subtree, an inline style) re-derives the\n * rest in the browser. Where light and dark schemes need different numbers\n * the value is a `light-dark()` pair, so one theme serves both and a user's\n * choice is a `color-scheme` override.\n */\nimport { define } from './core.js'\n\nexport interface OklchKnobs {\n /** The brand color: hue in degrees, chroma 0–0.4, lightness as a percentage. */\n readonly accent: {\n readonly h: number\n readonly c: number\n readonly l: string\n /** Lighter and stronger on dark surfaces; defaults `70%` and `c + 0.03`. */\n readonly dark?: { readonly l?: string; readonly c?: number }\n }\n /** Degrees added to the accent hue for the secondary and tertiary families. */\n readonly secondaryHueShift?: number\n readonly tertiaryHueShift?: number\n /** Chroma of neutral surfaces; 0 is gray. */\n readonly surfaceSaturation?: number\n /** How far apart the surface steps are, 0–100%. */\n readonly surfaceContrast?: string\n /** Multiplies text chroma. */\n readonly contrastFactor?: number\n /** Chroma of the code colors (`syntax-*`), 0–0.4; default `0.14`. */\n readonly syntaxChroma?: number\n /** Hues of the feedback families. */\n readonly feedback?: {\n readonly success?: number\n readonly warning?: number\n readonly error?: number\n readonly info?: number\n }\n}\n\nconst v = (group: string, name: string) => `var(--fk-${group}-${name})`\n/** A computed knob without float noise: `0.02`, not `0.019999999999999997`. */\nconst num = (value: number) => String(Number(value.toFixed(4)))\nconst ld = (light: string, dark: string) => `light-dark(${light}, ${dark})`\nconst offset = (amount: number) => `${amount < 0 ? '-' : '+'} ${Math.abs(amount)}`\n/** `oklch(from <color> …)` with the hue kept. */\nconst from = (color: string, l: string, c: string) => `oklch(from ${color} ${l} ${c} h)`\nconst shift = (color: string, dl: number, dc: number) =>\n from(color, `calc(l ${offset(dl)})`, `calc(c ${offset(dc)})`)\nconst scale = (color: string, dl: number, cx: number) =>\n from(color, `calc(l ${offset(dl)})`, `calc(c * ${cx})`)\n/** The same lightness and chroma as `color` on another hue. */\nconst rehue = (color: string, hue: string) => `oklch(from ${color} l c ${hue})`\n/** Near-black or near-white text over `color`. */\nconst contrast = (color: string) =>\n `oklch(from ${color} clamp(0.1, (0.65 / l - 1) * 999, 0.98) min(c, 0.08) h)`\n/** `color` as text on the base surface: dark in a light scheme, light in a dark one. */\nconst ink = (color: string) => ld(from(color, '0.5', 'c'), from(color, '0.8', 'c'))\n/**\n * `color` tinted onto the base surface, the same in both schemes. Mixed in\n * OKLab, not OKLCH: OKLCH interpolates hue, so a mix mostly of the base keeps\n * the base's hue, and a green tinted onto a blue-grey base came out blue.\n */\nconst tint = (color: string, percent: number) =>\n `color-mix(in oklab, ${v('surface', 'base')} ${percent}%, ${color})`\n\nconst neutral = v('hue', 'neutral')\nconst base = v('surface', 'base')\nconst surfaceC = v('knob', 'surface-c')\nconst surfaceCDark = v('knob', 'surface-c-dark')\nconst contrastFactor = v('knob', 'contrast-factor')\n\ntype Step = readonly [lightness: number, chroma: number]\n\n/** A surface step: the base mixed toward a target by `surface-contrast`. */\nconst surfaceStep = (light: Step, dark: Step) => {\n const amount = v('knob', 'surface-contrast')\n const target = ld(scale(base, light[0], light[1]), scale(base, dark[0], dark[1]))\n return `color-mix(in oklch, ${base} calc(100% - ${amount}), ${target} ${amount})`\n}\n\n/** A text color: fixed lightness, chroma scaled by surface saturation and the contrast factor. */\nconst text = (light: Step, dark: Step) =>\n ld(\n `oklch(${light[0]}% calc(${surfaceC} * ${light[1]} * ${contrastFactor}) ${neutral})`,\n `oklch(${dark[0]}% calc(${surfaceCDark} * ${dark[1]} * ${contrastFactor}) ${neutral})`,\n )\n\n/**\n * A color family, every one the same shape: its fill, the fill hovered and\n * pressed, a tint of it on the base, a line in it that stands off the base\n * (darker in a light scheme, lighter in a dark one), and text on the fill\n * and in the family's color.\n */\nconst family = (name: string, defaultValue: string) => {\n const color = v(name, 'default')\n return {\n default: defaultValue,\n hover: shift(color, -0.06, 0),\n active: shift(color, -0.1, 0.05),\n subtle: tint(color, 85),\n outline: ld(shift(color, -0.05, 0), shift(color, 0.05, 0)),\n 'on-fill': contrast(color),\n ink: ink(color),\n }\n}\n\n/**\n * A code color in `hue`: the same lightness for every kind, so no kind shouts,\n * dark enough to read on a light surface and light enough on a dark one.\n */\nconst syntaxInk = (hue: string) =>\n ld(`oklch(48% ${v('knob', 'syntax-c')} ${hue})`, `oklch(80% ${v('knob', 'syntax-c')} ${hue})`)\n\n/** A feedback family, lighter in a dark scheme so its fill reads on a dark page. */\nconst feedback = (name: string, l: number, c: number, dark: number) =>\n family(\n name,\n ld(\n `oklch(${l}% ${c} ${v('knob', `${name}-h`)})`,\n `oklch(${dark}% ${c} ${v('knob', `${name}-h`)})`,\n ),\n )\n\nexport const oklch = (knobs: OklchKnobs) => {\n const accent = v('accent', 'default')\n const surfaceSaturation = knobs.surfaceSaturation ?? 0.015\n return define({\n knob: {\n 'accent-h': String(knobs.accent.h),\n 'accent-c': String(knobs.accent.c),\n 'accent-l': knobs.accent.l,\n 'accent-c-dark': num(knobs.accent.dark?.c ?? Math.min(0.4, knobs.accent.c + 0.03)),\n 'accent-l-dark': knobs.accent.dark?.l ?? '70%',\n 'secondary-shift': String(knobs.secondaryHueShift ?? 60),\n 'tertiary-shift': String(knobs.tertiaryHueShift ?? -90),\n 'surface-c': String(surfaceSaturation),\n 'surface-c-dark': num(surfaceSaturation * (4 / 3)),\n 'surface-contrast': knobs.surfaceContrast ?? '65%',\n 'contrast-factor': String(knobs.contrastFactor ?? 1),\n 'base-l': '97.5%',\n 'base-l-dark': '22%',\n 'success-h': String(knobs.feedback?.success ?? 145),\n 'warning-h': String(knobs.feedback?.warning ?? 75),\n 'error-h': String(knobs.feedback?.error ?? 25),\n 'info-h': String(knobs.feedback?.info ?? 245),\n 'syntax-c': num(knobs.syntaxChroma ?? 0.14),\n },\n hue: {\n accent: v('knob', 'accent-h'),\n secondary: `calc(${v('knob', 'accent-h')} + ${v('knob', 'secondary-shift')})`,\n tertiary: `calc(${v('knob', 'accent-h')} + ${v('knob', 'tertiary-shift')})`,\n neutral: v('hue', 'accent'),\n },\n surface: {\n base: ld(\n `oklch(${v('knob', 'base-l')} calc(${surfaceC} * 0.9) ${neutral})`,\n `oklch(${v('knob', 'base-l-dark')} calc(${surfaceCDark} * 0.9) ${neutral})`,\n ),\n // Each step keeps about the base's chroma, so a sidebar, a panel and\n // the page read as one color at a few lightnesses: one with less reads\n // grey on the page, one with more reads as another, bluer color.\n muted: surfaceStep([-0.04, 1.2], [-0.03, 1.05]),\n subtle: surfaceStep([-0.025, 1.15], [-0.015, 1.05]),\n default: surfaceStep([-0.055, 1.25], [0.045, 1.1]),\n overt: surfaceStep([-0.31, 2.25], [0.125, 1.2]),\n // The deepest of the page's color in both schemes: under a dialog's\n // backdrop, a veil of it darkens the page; it was near-white in a dark one.\n bedrock: ld(\n `oklch(8% calc(${surfaceC} * 1.2) ${neutral})`,\n `oklch(6% calc(${surfaceCDark} * 1.2) ${neutral})`,\n ),\n },\n text: {\n default: text([20, 2], [88, 0.8]),\n muted: text([45, 1.5], [65, 1.2]),\n subtle: text([35, 1.8], [75, 1]),\n overt: text([10, 2.2], [95, 0.6]),\n link: shift(accent, 0.1, 0.05),\n 'link-hover': shift(v('text', 'link'), -0.1, 0),\n },\n // Steps from the base, as the surfaces are: darker in a light scheme,\n // lighter in a dark one, and in the base's own hue with a little more of\n // its chroma, which a thin line needs to read as the page's color. Text mixed into the base, as they were, came out grey on a\n // tinted page: the text is near-neutral, so the mix lost the tint.\n outline: {\n subtle: ld(scale(base, -0.07, 1.3), scale(base, 0.065, 1.25)),\n default: ld(scale(base, -0.13, 1.4), scale(base, 0.12, 1.35)),\n overt: ld(scale(base, -0.27, 1.6), scale(base, 0.23, 1.5)),\n // The accent as it is: darker and more saturated, the ring was the\n // harshest color on the page.\n focus: accent,\n },\n accent: family(\n 'accent',\n ld(\n `oklch(${v('knob', 'accent-l')} ${v('knob', 'accent-c')} ${v('hue', 'accent')})`,\n `oklch(${v('knob', 'accent-l-dark')} ${v('knob', 'accent-c-dark')} ${v('hue', 'accent')})`,\n ),\n ),\n secondary: family('secondary', rehue(accent, v('hue', 'secondary'))),\n tertiary: family('tertiary', rehue(accent, v('hue', 'tertiary'))),\n // A near-black of the neutral hue: faint on a light surface, and denser\n // on a dark one, where a light shadow would read as a glow.\n shadow: {\n color: ld(\n `oklch(25% calc(${surfaceC} * 2) ${neutral} / 0.14)`,\n `oklch(5% calc(${surfaceCDark} * 2) ${neutral} / 0.6)`,\n ),\n },\n success: feedback('success', 55, 0.15, 64),\n warning: feedback('warning', 70, 0.15, 76),\n // Under 65% in the dark, where the text on a fill turns dark: on red that reads muddy.\n error: feedback('error', 60, 0.2, 64),\n info: feedback('info', 65, 0.15, 70),\n // Code, by the kinds a tokenizer names (`syntax-keyword` is\n // `--fk-syntax-keyword`): each kind in a hue the palette already has, so\n // code follows the brand, and the quiet kinds in the text's own grey.\n syntax: {\n keyword: syntaxInk(v('hue', 'accent')),\n function: syntaxInk(v('hue', 'secondary')),\n type: syntaxInk(v('hue', 'tertiary')),\n string: syntaxInk(v('knob', 'success-h')),\n number: syntaxInk(v('knob', 'warning-h')),\n property: syntaxInk(v('knob', 'info-h')),\n operator: v('text', 'default'),\n punctuation: v('text', 'muted'),\n comment: text([52, 1], [62, 1]),\n },\n })\n}\n\nexport type OklchTheme = ReturnType<typeof oklch>\n","/**\n * `foldkit-mixins/theme`: the root export's `Theme` plus the page-level\n * pieces. `root` and `scoped` turn tokens into unlayered `:root` and\n * selector rules for `Style.stylesheet`; `tokens` is the shipped set of\n * non-color scales; `oklch` derives a whole palette from a few knobs.\n */\nimport * as Core from './theme/core.js'\nimport { oklch } from './theme/oklch.js'\nimport { root, scoped } from './theme/root.js'\nimport { breakpointWidths, inContainer, tokens } from './theme/tokens.js'\n\nexport { compose, define, lightDark, ref, variables, VAR_PREFIX } from './theme/core.js'\nexport type { Refs, Theme as ThemeValue, ThemeTokens } from './theme/core.js'\nexport { root, scoped } from './theme/root.js'\nexport type { Overrides, RootOptions } from './theme/root.js'\nexport { breakpointWidths, inContainer, tokens } from './theme/tokens.js'\nexport type { Tokens } from './theme/tokens.js'\nexport { oklch } from './theme/oklch.js'\nexport type { OklchKnobs, OklchTheme } from './theme/oklch.js'\n\nexport const Theme = {\n ...Core.Theme,\n root,\n scoped,\n tokens,\n breakpointWidths,\n inContainer,\n oklch,\n} as const\n"],"mappings":";;;;;;;;;;;;AAuCA,MAAM,KAAK,OAAe,SAAiB,YAAY,MAAM,GAAG,KAAK;;AAErE,MAAM,OAAO,UAAkB,OAAO,OAAO,MAAM,QAAQ,CAAC,CAAC,CAAC;AAC9D,MAAM,MAAM,OAAe,SAAiB,cAAc,MAAM,IAAI,KAAK;AACzE,MAAM,UAAU,WAAmB,GAAG,SAAS,IAAI,MAAM,IAAI,GAAG,KAAK,IAAI,MAAM;;AAE/E,MAAM,QAAQ,OAAe,GAAW,MAAc,cAAc,MAAM,GAAG,EAAE,GAAG,EAAE;AACpF,MAAM,SAAS,OAAe,IAAY,OACxC,KAAK,OAAO,UAAU,OAAO,EAAE,EAAE,IAAI,UAAU,OAAO,EAAE,EAAE,EAAE;AAC9D,MAAM,SAAS,OAAe,IAAY,OACxC,KAAK,OAAO,UAAU,OAAO,EAAE,EAAE,IAAI,YAAY,GAAG,EAAE;;AAExD,MAAM,SAAS,OAAe,QAAgB,cAAc,MAAM,OAAO,IAAI;;AAE7E,MAAM,YAAY,UAChB,cAAc,MAAM;;AAEtB,MAAM,OAAO,UAAkB,GAAG,KAAK,OAAO,OAAO,GAAG,GAAG,KAAK,OAAO,OAAO,GAAG,CAAC;;;;;;AAMlF,MAAM,QAAQ,OAAe,YAC3B,uBAAuB,EAAE,WAAW,MAAM,EAAE,GAAG,Q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AAS,EAAE,QAAQ,eAAe,EAAE,GAAG,EAAE,QAAQ,eAAe,EAAE,GAAG,EAAE,OAAO,QAAQ,EAAE,EAC1F,CACF;EACA,WAAW,OAAO,aAAa,MAAM,QAAQ,EAAE,OAAO,WAAW,CAAC,CAAC;EACnE,UAAU,OAAO,YAAY,MAAM,QAAQ,EAAE,OAAO,UAAU,CAAC,CAAC;EAGhE,QAAQ,EACN,OAAO,GACL,kBAAkB,SAAS,QAAQ,QAAQ,WAC3C,iBAAiB,aAAa,QAAQ,QAAQ,QAChD,EACF;EACA,SAAS,SAAS,WAAW,IAAI,KAAM,EAAE;EACzC,SAAS,SAAS,WAAW,IAAI,KAAM,EAAE;EAEzC,OAAO,SAAS,SAAS,IAAI,IAAK,EAAE;EACpC,MAAM,SAAS,QAAQ,IAAI,KAAM,EAAE;EAInC,QAAQ;GACN,SAAS,UAAU,EAAE,OAAO,QAAQ,CAAC;GACrC,UAAU,UAAU,EAAE,OAAO,WAAW,CAAC;GACzC,MAAM,UAAU,EAAE,OAAO,UAAU,CAAC;GACpC,QAAQ,UAAU,EAAE,QAAQ,WAAW,CAAC;GACxC,QAAQ,UAAU,EAAE,QAAQ,WAAW,CAAC;GACxC,UAAU,UAAU,EAAE,QAAQ,QAAQ,CAAC;GACvC,UAAU,EAAE,QAAQ,SAAS;GAC7B,aAAa,EAAE,QAAQ,OAAO;GAC9B,SAAS,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;EAChC;CACF,CAAC;AACH;;;;;;;;;ACjNA,MAAa,QAAQ;CACnB,GAAGA;CACH;CACA;CACA;CACA;CACA;CACA;AACF"}
@@ -1,6 +1,6 @@
1
1
  import { o as StyleValue } from "./styleValue-BavTe9MZ.mjs";
2
2
  import { t as Tokens } from "./tokens-BaLmrfbp.mjs";
3
- import { n as OklchTheme } from "./oklch-CLKxbFpD.mjs";
3
+ import { n as OklchTheme } from "./oklch-CDSDQNWl.mjs";
4
4
  //#region src/utilities.d.ts
5
5
  /** A space step, or none. */
6
6
  export type Space = (keyof Tokens['space'] & string) | '0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foldkit-mixins",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Typed slot contracts and inside-out Style/Behavior attachments for Foldkit.",
5
5
  "keywords": [
6
6
  "foldkit",
@@ -1 +0,0 @@
1
- {"version":3,"file":"oklch-CLKxbFpD.d.mts","names":[],"sources":["../src/theme/oklch.ts"],"mappings":";UAUiB;;WAEN;aACE;aACA;aACA;;aAEA;eAAkB;eAAqB;;;;WAGzC;WACA;;WAEA;;WAEA;;WAEA;;WAEA;aACE;aACA;aACA;aACA;;;cAiFA,QAAS,OAAO,eAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6F3B,aAAa,kBAAkB"}