foldkit-mixins 0.3.0 → 0.4.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 +244 -10
- package/dist/core-B86QnDhB.d.mts +40 -0
- package/dist/core-B86QnDhB.d.mts.map +1 -0
- package/dist/core-izIY2GSX.mjs +53 -0
- package/dist/core-izIY2GSX.mjs.map +1 -0
- package/dist/defaults.d.mts +27 -0
- package/dist/defaults.d.mts.map +1 -0
- package/dist/defaults.mjs +71 -0
- package/dist/defaults.mjs.map +1 -0
- package/dist/diagnostics-YJ7991-A.mjs +15 -0
- package/dist/diagnostics-YJ7991-A.mjs.map +1 -0
- package/dist/index.d.mts +232 -76
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +486 -229
- package/dist/index.mjs.map +1 -1
- package/dist/layers-CJS5d1i7.mjs +197 -0
- package/dist/layers-CJS5d1i7.mjs.map +1 -0
- package/dist/layers.d.mts +47 -0
- package/dist/layers.d.mts.map +1 -0
- package/dist/layers.mjs +2 -0
- package/dist/layout.d.mts +114 -0
- package/dist/layout.d.mts.map +1 -0
- package/dist/layout.mjs +154 -0
- package/dist/layout.mjs.map +1 -0
- package/dist/prose.d.mts +24 -0
- package/dist/prose.d.mts.map +1 -0
- package/dist/prose.mjs +57 -0
- package/dist/prose.mjs.map +1 -0
- package/dist/styleValue--iQMTcPn.mjs +242 -0
- package/dist/styleValue--iQMTcPn.mjs.map +1 -0
- package/dist/styleValue-C9vAKt7A.d.mts +77 -0
- package/dist/styleValue-C9vAKt7A.d.mts.map +1 -0
- package/dist/theme.d.mts +412 -0
- package/dist/theme.d.mts.map +1 -0
- package/dist/theme.mjs +278 -0
- package/dist/theme.mjs.map +1 -0
- package/package.json +32 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.mjs","names":["Core.Theme"],"sources":["../src/theme/oklch.ts","../src/theme/root.ts","../src/theme/tokens.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` tinted onto the base surface, the same in both schemes. */\nconst tint = (color: string, percent: number) =>\n `color-mix(in oklch, ${v('surface', 'base')} ${percent}%, ${color})`\n\n/** The default text color at `percent` over the base surface. */\nconst line = (percent: number) =>\n `color-mix(in oklch, ${v('text', 'default')} ${percent}%, ${v('surface', 'base')})`\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\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 text: contrast(color),\n }\n}\n\nconst feedback = (name: string, l: number, c: number) => {\n const color = v(name, 'default')\n return {\n default: `oklch(${l}% ${c} ${v('knob', `${name}-h`)})`,\n subtle: tint(color, 85),\n text: contrast(color),\n outline: shift(color, -0.05, 0),\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 muted: surfaceStep([-0.04, 0.8], [-0.03, 0.5]),\n subtle: surfaceStep([-0.025, 1.05], [-0.015, 0.7]),\n default: surfaceStep([-0.055, 1.2], [0.045, 1]),\n overt: surfaceStep([-0.31, 2.25], [0.125, 1.2]),\n bedrock: ld(\n `oklch(8% calc(${surfaceC} * 1.2) ${neutral})`,\n `oklch(98% calc(${surfaceCDark} * 0.7) ${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 'on-accent': contrast(accent),\n link: shift(accent, 0.1, 0.05),\n 'link-hover': shift(v('text', 'link'), -0.1, 0),\n },\n // Text mixed into the base: darker than the surface in a light scheme,\n // lighter in a dark one, so a line separates in both from one expression.\n outline: {\n subtle: line(10),\n default: line(18),\n overt: line(35),\n focus: shift(accent, -0.1, 0.1),\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 success: feedback('success', 55, 0.15),\n warning: feedback('warning', 70, 0.15),\n error: feedback('error', 60, 0.2),\n info: feedback('info', 65, 0.15),\n })\n}\n\nexport type OklchTheme = ReturnType<typeof oklch>\n","/**\n * A theme's tokens as `:root` custom properties, for the page stylesheet.\n * Unlayered: the page decides which layer with `Layers.in`.\n */\nimport { global, type StyleValue } from '../styleValue.js'\nimport { VAR_PREFIX, type ThemeTokens } from './core.js'\n\nexport interface RootOptions {\n /** Tokens present in this theme are left out, so a scale shipped in another layer goes out once. */\n readonly omit?: ThemeTokens\n /** Default `'light dark'`, so `lightDark` tokens resolve. */\n readonly colorScheme?: 'light dark' | 'light' | 'dark'\n}\n\n/**\n * Every token as `--fk-group-name:value`, in authored order. `omit` is\n * matched token by token, not group by group: two themes can both carry a\n * `knob` group (the scales' density beside a palette's hues) and only the\n * names `omit` has are skipped.\n */\nconst declarations = (theme: ThemeTokens, omit?: ThemeTokens): ReadonlyArray<string> =>\n Object.entries(theme).flatMap(([group, names]) =>\n Object.entries(names).flatMap(([name, value]) =>\n omit !== undefined && Object.hasOwn(omit[group] ?? {}, name)\n ? []\n : [`${VAR_PREFIX}-${group}-${name}:${value}`],\n ),\n )\n\nexport const root = (theme: ThemeTokens, options?: RootOptions): StyleValue =>\n global(\n `:root{${[...declarations(theme, options?.omit), `color-scheme:${options?.colorScheme ?? 'light dark'}`].join(';')}}`,\n )\n\n/** Some of a theme's tokens, by the theme's own group and token names. */\nexport type Overrides<T extends ThemeTokens> = {\n readonly [G in keyof T]?: { readonly [N in keyof T[G]]?: string }\n}\n\n/**\n * Token overrides under `selector`: a named theme the Model selects with a\n * root attribute (`:root[data-theme=\"ocean\"]`), a scheme the user chose\n * (`:root[data-color-scheme=\"dark\"]`), or a subtree (`.marketing`). Which\n * one is active is the Model's fact; this only says what it means.\n *\n * `theme` is the theme being overridden and is read only for its type, so a\n * group or token it lacks is a type error rather than a variable nothing reads.\n */\nexport const scoped = <T extends ThemeTokens>(\n _theme: T,\n selector: string,\n overrides: Overrides<T>,\n): StyleValue => {\n const tokens: Record<string, Record<string, string>> = {}\n for (const [group, names] of Object.entries(overrides)) {\n const defined: Record<string, string> = {}\n for (const [name, value] of Object.entries(names ?? {})) {\n if (typeof value === 'string') defined[name] = value\n }\n tokens[group] = defined\n }\n return global(`${selector}{${declarations(tokens).join(';')}}`)\n}\n","/**\n * The non-color scales a design system shares across themes. Space and\n * radius multiply by the `density` and `radius-factor` knobs, so a compact\n * or a rounder theme is one override. `breakpoint` is the record\n * `Style.responsive` takes; `breakpointWidths` gives the same names as pixel\n * thresholds for `foldkit-primitives/media` Breakpoints.\n */\nimport { DiagnosticError } from '../diagnostics.js'\nimport { define } from './core.js'\n\nconst space = (rem: number) => `calc(${rem}rem * var(--fk-knob-density))`\nconst radius = (px: number) => `calc(${px}px * var(--fk-knob-radius-factor))`\n\nexport const tokens = define({\n knob: { density: '1', 'radius-factor': '1' },\n space: {\n '3xs': space(0.125),\n '2xs': space(0.25),\n xs: space(0.5),\n sm: space(0.75),\n md: space(1),\n lg: space(1.5),\n xl: space(2),\n '2xl': space(3),\n '3xl': space(4),\n },\n radius: {\n xs: radius(2),\n sm: radius(3),\n md: radius(6),\n lg: radius(8),\n xl: radius(12),\n full: '9999px',\n },\n font: { body: 'system-ui, sans-serif', heading: 'inherit', mono: 'ui-monospace, monospace' },\n size: {\n xs: '0.75rem',\n sm: '0.875rem',\n md: '1rem',\n lg: '1.125rem',\n xl: '1.25rem',\n '2xl': '1.5rem',\n '3xl': '1.875rem',\n '4xl': '2.25rem',\n },\n leading: { tight: '1.2', snug: '1.375', normal: '1.5', relaxed: '1.6' },\n weight: { normal: '400', medium: '500', semibold: '600', bold: '700' },\n motion: { fast: '150ms', normal: '250ms', ease: 'ease-out' },\n border: { thin: '1px', thick: '2px', heavy: '3px' },\n breakpoint: {\n sm: '(min-width: 40rem)',\n md: '(min-width: 48rem)',\n lg: '(min-width: 64rem)',\n xl: '(min-width: 80rem)',\n },\n})\n\nexport type Tokens = typeof tokens\n\nconst MIN_WIDTH = /^\\(min-width:\\s*(\\d+(?:\\.\\d+)?)(rem|px)\\)$/\n\n/**\n * Each breakpoint query's `min-width` in pixels (rem at 16), so CSS and the\n * Model agree on what `md` means. A query that is not a plain `min-width`\n * is refused: it has no single threshold.\n */\nexport const breakpointWidths = (theme: {\n readonly breakpoint: { readonly [name: string]: string }\n}): Readonly<Record<string, number>> => {\n const widths: Record<string, number> = {}\n for (const [name, query] of Object.entries(theme.breakpoint)) {\n const match = MIN_WIDTH.exec(query)\n if (match === null) {\n throw new DiagnosticError({\n source: 'theme',\n code: 'theme:unparseable-breakpoint',\n severity: 'error',\n message: `Breakpoint \"${name}\" is \"${query}\", not a \"(min-width: <rem|px>)\" query`,\n details: { name, query },\n })\n }\n const amount = Number(match[1])\n widths[name] = match[2] === 'rem' ? amount * 16 : amount\n }\n return Object.freeze(widths)\n}\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, 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, 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 = { ...Core.Theme, root, scoped, tokens, breakpointWidths, oklch } as const\n"],"mappings":";;;;;;;;;;;;AAqCA,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,QAAQ,OAAe,YAC3B,uBAAuB,EAAE,WAAW,MAAM,EAAE,GAAG,QAAQ,KAAK,MAAM;;AAGpE,MAAM,QAAQ,YACZ,uBAAuB,EAAE,QAAQ,SAAS,EAAE,GAAG,QAAQ,KAAK,EAAE,WAAW,MAAM,EAAE;AAEnF,MAAM,UAAU,EAAE,OAAO,SAAS;AAClC,MAAM,OAAO,EAAE,WAAW,MAAM;AA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
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Typed slot contracts and inside-out Style/Behavior attachments for Foldkit.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"foldkit",
|
|
@@ -30,7 +30,28 @@
|
|
|
30
30
|
".": {
|
|
31
31
|
"types": "./dist/index.d.mts",
|
|
32
32
|
"import": "./dist/index.mjs"
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
|
+
"./layers": {
|
|
35
|
+
"types": "./dist/layers.d.mts",
|
|
36
|
+
"import": "./dist/layers.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./theme": {
|
|
39
|
+
"types": "./dist/theme.d.mts",
|
|
40
|
+
"import": "./dist/theme.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./layout": {
|
|
43
|
+
"types": "./dist/layout.d.mts",
|
|
44
|
+
"import": "./dist/layout.mjs"
|
|
45
|
+
},
|
|
46
|
+
"./defaults": {
|
|
47
|
+
"types": "./dist/defaults.d.mts",
|
|
48
|
+
"import": "./dist/defaults.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./prose": {
|
|
51
|
+
"types": "./dist/prose.d.mts",
|
|
52
|
+
"import": "./dist/prose.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./package.json": "./package.json"
|
|
34
55
|
},
|
|
35
56
|
"files": [
|
|
36
57
|
"dist",
|
|
@@ -38,14 +59,18 @@
|
|
|
38
59
|
"LICENSE"
|
|
39
60
|
],
|
|
40
61
|
"peerDependencies": {
|
|
41
|
-
"effect": "^4.0.0-rc.
|
|
42
|
-
"foldkit": "^0.
|
|
62
|
+
"effect": "^4.0.0-rc.116",
|
|
63
|
+
"foldkit": "^0.163.0"
|
|
43
64
|
},
|
|
44
65
|
"devDependencies": {
|
|
45
|
-
"effect": "4.0.0-rc.
|
|
46
|
-
"
|
|
66
|
+
"@effect/platform-browser": "4.0.0-rc.116",
|
|
67
|
+
"effect": "4.0.0-rc.116",
|
|
68
|
+
"foldkit": "0.163.0",
|
|
47
69
|
"tsdown": "^0.23.0",
|
|
48
|
-
"typescript": "
|
|
70
|
+
"typescript": "5.9.3"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"csstype": "^3.2.3"
|
|
49
74
|
},
|
|
50
75
|
"scripts": {
|
|
51
76
|
"build": "tsdown",
|