@weasel-js/theme 0.7.2 → 1.0.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/NOTICE +18 -0
- package/README.md +61 -6
- package/dist/chunk-RATE4LL3.js +786 -0
- package/dist/chunk-RATE4LL3.js.map +1 -0
- package/dist/fonts.css +19 -0
- package/dist/index.d.ts +32 -83
- package/dist/index.js +144 -90
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +38 -0
- package/dist/react.js +45 -0
- package/dist/react.js.map +1 -0
- package/dist/resolveTheme-Bl6riwGu.d.ts +234 -0
- package/dist/tokens.css +104 -172
- package/fonts/OFL-Inter.txt +92 -0
- package/fonts/OFL-Oswald.txt +93 -0
- package/fonts/README.md +70 -0
- package/fonts/inter-latin.woff2 +0 -0
- package/fonts/oswald-latin-variable.woff2 +0 -0
- package/package.json +21 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tokens.ts"],"names":[],"mappings":";AAUO,IAAM,cAAA,GAAiB;AAAA;AAAA,EAE5B,eAAA,EAAkB,SAAA;AAAA,EAClB,gBAAA,EAAkB,SAAA;AAAA,EAClB,gBAAA,EAAkB,SAAA;AAAA,EAClB,gBAAA,EAAkB,SAAA;AAAA,EAClB,gBAAA,EAAkB,SAAA;AAAA,EAClB,gBAAA,EAAkB,SAAA;AAAA,EAClB,gBAAA,EAAkB,SAAA;AAAA,EAClB,gBAAA,EAAkB,SAAA;AAAA,EAClB,gBAAA,EAAkB,SAAA;AAAA,EAClB,gBAAA,EAAkB,SAAA;AAAA;AAAA,EAGlB,mBAAA,EAAuB,SAAA;AAAA,EACvB,mBAAA,EAAuB,SAAA;AAAA,EACvB,qBAAA,EAAuB,SAAA;AAAA,EACvB,mBAAA,EAAuB,SAAA;AAAA,EACvB,oBAAA,EAAuB,SAAA;AAAA,EACvB,oBAAA,EAAuB,SAAA;AAAA;AAAA,EAGvB,iBAAA,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AAAA,EACtB,eAAA,EAAsB,SAAA;AAAA,EACtB,eAAA,EAAsB,SAAA;AAAA,EACtB,kBAAA,EAAsB,SAAA;AAAA;AAAA,EAGtB,kBAAA,EAAoB,SAAA;AAAA;AAAA,EAGpB,YAAA,EAA6B,SAAA;AAAA,EAC7B,kBAAA,EAA6B,SAAA;AAAA,EAC7B,UAAA,EAA6B,SAAA;AAAA,EAC7B,aAAA,EAA6B,SAAA;AAAA,EAC7B,gBAAA,EAA6B,SAAA;AAAA,EAC7B,oBAAA,EAA6B,SAAA;AAAA,EAC7B,gBAAA,EAA6B,SAAA;AAAA,EAC7B,gBAAA,EAA6B,SAAA;AAAA,EAC7B,oBAAA,EAA6B,SAAA;AAAA,EAC7B,kBAAA,EAA6B,SAAA;AAAA,EAC7B,oBAAA,EAA6B,SAAA;AAAA,EAC7B,kBAAA,EAA6B,SAAA;AAAA,EAC7B,mBAAA,EAA6B,SAAA;AAAA,EAC7B,yBAAA,EAA6B,SAAA;AAAA,EAC7B,2BAAA,EAA6B,SAAA;AAAA,EAC7B,mBAAA,EAA6B;AAC/B","file":"index.js","sourcesContent":["/**\n * Source of truth for token default values. Mirrors tokens.css exactly,\n * with var(--*) references resolved to their literal target value (TS\n * exports can't reference each other syntactically the way CSS can with\n * var()). The parity test in tokens.test.ts catches drift.\n *\n * color-mix() expressions are resolved to plausible hex approximations\n * — consumers that need exact mixed values should read getComputedStyle\n * from the live DOM rather than relying on these defaults.\n */\nexport const DEFAULT_TOKENS = {\n // Primitive — grays\n '--wzl-gray-50': '#f5f5f6',\n '--wzl-gray-100': '#e6e7e9',\n '--wzl-gray-200': '#c9cbcf',\n '--wzl-gray-300': '#9ea1a8',\n '--wzl-gray-400': '#6f737b',\n '--wzl-gray-500': '#4d5058',\n '--wzl-gray-600': '#383b42',\n '--wzl-gray-700': '#25272c',\n '--wzl-gray-800': '#181a1e',\n '--wzl-gray-900': '#0e0f12',\n\n // Primitive — accent + status\n '--wzl-accent-soft': '#1d1454',\n '--wzl-accent-base': '#2e1f7a',\n '--wzl-accent-strong': '#5841b8',\n '--wzl-danger-base': '#d94a3f',\n '--wzl-warning-base': '#d99a3f',\n '--wzl-success-base': '#2ec27e',\n\n // Geometry\n '--wzl-radius-sm': '3px',\n '--wzl-radius-md': '5px',\n '--wzl-border-w': '1px',\n '--wzl-line-width': '2px',\n '--wzl-curve-width': '3px',\n '--wzl-tb-height': '28px',\n\n // Motion — durations + CSS equivalents of the JS easing library\n '--wzl-motion-fast': '120ms',\n '--wzl-motion-medium': '240ms',\n '--wzl-ease-in-cubic': 'cubic-bezier(0.32, 0, 0.67, 0)',\n '--wzl-ease-out-cubic': 'cubic-bezier(0.33, 1, 0.68, 1)',\n '--wzl-ease-in-out-cubic': 'cubic-bezier(0.65, 0, 0.35, 1)',\n '--wzl-ease-out-back': 'cubic-bezier(0.34, 1.56, 0.64, 1)',\n\n // Structural lines — three opacity levels of fg. color-mix at runtime;\n // hex approximations here resolve against the dark default fg.\n '--wzl-line-subtle': 'rgba(230, 231, 233, 0.10)',\n '--wzl-line': 'rgba(230, 231, 233, 0.20)',\n '--wzl-line-strong': 'rgba(230, 231, 233, 0.40)',\n\n // Curve color — semantic alias for the accent.\n '--wzl-curve-color': '#5841b8',\n\n // Typography\n '--wzl-font-ui': \"'Oswald', 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\",\n '--wzl-font-display': \"'Oswald', 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\",\n '--wzl-font-body': \"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif\",\n '--wzl-font-mono': 'ui-monospace, SFMono-Regular, Menlo, Consolas, monospace',\n '--wzl-font-weight-light': '200',\n '--wzl-font-weight-normal': '300',\n '--wzl-font-weight-bold': '400',\n\n // Semantic — surfaces\n '--wzl-surface': '#181a1e',\n '--wzl-surface-raised': '#25272c',\n '--wzl-surface-sunken': '#0e0f12',\n\n // Semantic — text\n '--wzl-fg': '#e6e7e9',\n '--wzl-fg-muted': '#9ea1a8',\n '--wzl-fg-subtle': '#6f737b',\n '--wzl-fg-on-accent': '#f5f5f6',\n\n // Semantic — borders\n '--wzl-border': '#25272c',\n '--wzl-border-strong': '#383b42',\n\n // Semantic — interactive\n '--wzl-accent': '#2e1f7a',\n '--wzl-accent-fg': '#5841b8',\n '--wzl-accent-hover': '#5841b8',\n '--wzl-danger': '#d94a3f',\n '--wzl-warning': '#d99a3f',\n '--wzl-success': '#2ec27e',\n '--wzl-focus-ring': '#5841b8',\n\n // Semantic — glass\n '--wzl-glass-tint': '#2e1f7a',\n\n // Deprecated aliases (kept for older consumers)\n '--wzl-text': '#e6e7e9',\n '--wzl-text-muted': '#9ea1a8',\n '--wzl-bg': '#181a1e',\n '--wzl-muted': '#9ea1a8',\n '--wzl-panel-bg': '#181a1e',\n '--wzl-panel-border': '#25272c',\n '--wzl-input-bg': '#0e0f12',\n '--wzl-track-bg': '#0e0f12',\n '--wzl-track-border': '#25272c',\n '--wzl-thumb-fill': '#9ea1a8',\n '--wzl-thumb-border': '#383b42',\n '--wzl-thumb-text': '#0e0f12',\n '--wzl-button-fill': '#25272c',\n '--wzl-button-fill-hover': '#2f3138',\n '--wzl-button-fill-pressed': '#363941',\n '--wzl-button-text': '#e6e7e9',\n} as const;\n\nexport type TokenName = keyof typeof DEFAULT_TOKENS;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/generated/manifest.ts","../src/dtcg/types.ts","../src/dtcg/flatten.ts","../src/loadDTCG.ts"],"names":[],"mappings":";;;;AAUO,IAAM,cAAA,GAAgD;AAAA,EAC3D,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,OAAA,EAAS,OAAO,MAAA,EAAQ,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,EAChG,EAAE,IAAA,EAAM,gBAAA,EAAkB,IAAA,EAAM,OAAA,EAAS,OAAO,MAAA,EAAQ,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;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,KAAa,QAAA,GAAW,QAAA,GAAW,MAAA;AAAA,QACjD,aAAa,IAAA,CAAK;AAAA,OACpB;AACA,MAAA,GAAA,CAAI,IAAI,CAAA,GAAI,KAAA;AAAA,IACd;AAAA,EACF;AAEA,EAAA,OAAO,GAAA;AACT;;;ACtCO,SAAS,SAAS,GAAA,EAA0B;AACjD,EAAA,IAAI,OAAO,GAAA,CAAI,IAAA,KAAS,QAAA,IAAY,GAAA,CAAI,SAAS,EAAA,EAAI;AACnD,IAAA,MAAM,IAAI,MAAM,qCAAqC,CAAA;AAAA,EACvD;AACA,EAAA,MAAM,QAAoC,EAAC;AAC3C,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,IAAI,CAAA,IAAK,MAAA,CAAO,QAAQ,GAAA,CAAI,KAAA,IAAS,EAAE,CAAA,EAAG;AAC1D,IAAA,KAAA,CAAM,IAAI,CAAA,GAAI,aAAA,CAAc,IAAI,CAAA;AAAA,EAClC;AACA,EAAA,MAAM,IAAA,GAAO,GAAA,CAAI,OAAA,KAAY,MAAA,GAAY,cAAc,GAAA,CAAI,OAAA;AAC3D,EAAA,OAAO;AAAA,IACL,MAAM,GAAA,CAAI,IAAA;AAAA,IACV,OAAA,EAAS,IAAA;AAAA,IACT,WAAA,EACE,OAAO,GAAA,CAAI,WAAA,KAAgB,WAAW,GAAA,CAAI,WAAA,GAAe,MAAM,WAAA,IAAe,MAAA;AAAA,IAChF,MAAA,EAAQ,aAAA,CAAc,GAAA,CAAI,UAAA,IAAc,EAAE,CAAA;AAAA,IAC1C;AAAA,GACF;AACF","file":"index.js","sourcesContent":["// GENERATED by packages/theme/scripts/build-tokens.ts — do not edit.\n\nexport interface TokenManifestEntry {\n readonly name: string;\n readonly type: string;\n readonly group: string;\n readonly defaultValue: string;\n readonly description: string;\n}\n\nexport const TOKEN_MANIFEST: readonly TokenManifestEntry[] = [\n { name: '--wzl-gray-50', type: \"color\", group: \"gray\", defaultValue: \"#f5f5f6\", description: \"\" },\n { name: '--wzl-gray-100', type: \"color\", group: \"gray\", defaultValue: \"#e6e7e9\", description: \"\" },\n { name: '--wzl-gray-200', type: \"color\", group: \"gray\", defaultValue: \"#c9cbcf\", description: \"\" },\n { name: '--wzl-gray-300', type: \"color\", group: \"gray\", defaultValue: \"#9ea1a8\", description: \"\" },\n { name: '--wzl-gray-400', type: \"color\", group: \"gray\", defaultValue: \"#6f737b\", description: \"\" },\n { name: '--wzl-gray-500', type: \"color\", group: \"gray\", defaultValue: \"#4d5058\", description: \"\" },\n { name: '--wzl-gray-600', type: \"color\", group: \"gray\", defaultValue: \"#383b42\", description: \"\" },\n { name: '--wzl-gray-700', type: \"color\", group: \"gray\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-gray-800', type: \"color\", group: \"gray\", defaultValue: \"#181a1e\", description: \"\" },\n { name: '--wzl-gray-900', type: \"color\", group: \"gray\", defaultValue: \"#0e0f12\", description: \"\" },\n { name: '--wzl-accent-soft', type: \"color\", group: \"accent\", defaultValue: \"#1d1454\", description: \"\" },\n { name: '--wzl-accent-base', type: \"color\", group: \"accent\", defaultValue: \"#2e1f7a\", description: \"Midnight blue-violet. Deep and saturated; anchors primary actions on light and dark surfaces alike.\" },\n { name: '--wzl-accent-strong', type: \"color\", group: \"accent\", defaultValue: \"#5841b8\", description: \"\" },\n { name: '--wzl-danger-base', type: \"color\", group: \"danger\", defaultValue: \"#d94a3f\", description: \"\" },\n { name: '--wzl-warning-base', type: \"color\", group: \"warning\", defaultValue: \"#d99a3f\", description: \"\" },\n { name: '--wzl-success-base', type: \"color\", group: \"success\", defaultValue: \"#2ec27e\", description: \"\" },\n { name: '--wzl-fg-on-accent', type: \"color\", group: \"fg\", defaultValue: \"#f5f5f6\", description: \"\" },\n { name: '--wzl-line-subtle', type: \"color\", group: \"line\", defaultValue: \"rgba(230, 231, 233, 0.1)\", description: \"Barely-there separators (table rows).\" },\n { name: '--wzl-line', type: \"color\", group: \"line\", defaultValue: \"rgba(230, 231, 233, 0.2)\", description: \"Primary gridlines on sunken surfaces.\" },\n { name: '--wzl-line-strong', type: \"color\", group: \"line\", defaultValue: \"rgba(230, 231, 233, 0.4)\", description: \"Axes and emphasized dividers.\" },\n { name: '--wzl-curve-color', type: \"color\", group: \"curve\", defaultValue: \"#5841b8\", description: \"Drawn data curves. Routes through the bright accent because accent-base is too dim on sunken surfaces.\" },\n { name: '--wzl-accent', type: \"color\", group: \"accent\", defaultValue: \"#2e1f7a\", description: \"\" },\n { name: '--wzl-accent-hover', type: \"color\", group: \"accent\", defaultValue: \"#5841b8\", description: \"\" },\n { name: '--wzl-danger', type: \"color\", group: \"danger\", defaultValue: \"#d94a3f\", description: \"\" },\n { name: '--wzl-warning', type: \"color\", group: \"warning\", defaultValue: \"#d99a3f\", description: \"\" },\n { name: '--wzl-success', type: \"color\", group: \"success\", defaultValue: \"#2ec27e\", description: \"\" },\n { name: '--wzl-focus-ring', type: \"color\", group: \"focus\", defaultValue: \"#5841b8\", description: \"\" },\n { name: '--wzl-glass-tint', type: \"color\", group: \"glass\", defaultValue: \"#2e1f7a\", description: \"Frosted-glass tint. Components compose it as color-mix(in srgb, var(--wzl-glass-tint) 78%, transparent) with backdrop-filter: blur(3px).\" },\n { name: '--wzl-surface-hover', type: \"color\", group: \"surface\", defaultValue: \"rgba(230, 231, 233, 0.1)\", description: \"Hover wash over a raised surface. Same formula as line-subtle, different job — do not collapse them.\" },\n { name: '--wzl-surface-pressed', type: \"color\", group: \"surface\", defaultValue: \"rgba(230, 231, 233, 0.18)\", description: \"Pressed wash over a raised surface.\" },\n { name: '--wzl-swatch-green', type: \"color\", group: \"swatch\", defaultValue: \"#2fdd18\", description: \"First of ten categorical spot colors for plotting, status and data viz. Ordered — take them in sequence. Mode-invariant on purpose: a series keeps its color when the mode flips.\" },\n { name: '--wzl-swatch-pink', type: \"color\", group: \"swatch\", defaultValue: \"#ff5885\", description: \"\" },\n { name: '--wzl-swatch-cyan', type: \"color\", group: \"swatch\", defaultValue: \"#00dfff\", description: \"\" },\n { name: '--wzl-swatch-gold', type: \"color\", group: \"swatch\", defaultValue: \"#dcb700\", description: \"\" },\n { name: '--wzl-swatch-amber', type: \"color\", group: \"swatch\", defaultValue: \"#ff8c00\", description: \"\" },\n { name: '--wzl-swatch-violet', type: \"color\", group: \"swatch\", defaultValue: \"#a497ff\", description: \"\" },\n { name: '--wzl-swatch-mint', type: \"color\", group: \"swatch\", defaultValue: \"#00e7af\", description: \"\" },\n { name: '--wzl-swatch-sky', type: \"color\", group: \"swatch\", defaultValue: \"#00b8ff\", description: \"\" },\n { name: '--wzl-swatch-orange', type: \"color\", group: \"swatch\", defaultValue: \"#ff6b00\", description: \"\" },\n { name: '--wzl-swatch-magenta', type: \"color\", group: \"swatch\", defaultValue: \"#ff6eff\", description: \"\" },\n { name: '--wzl-radius-sm', type: \"dimension\", group: \"radius\", defaultValue: \"3px\", description: \"\" },\n { name: '--wzl-radius-md', type: \"dimension\", group: \"radius\", defaultValue: \"5px\", description: \"\" },\n { name: '--wzl-border-w', type: \"dimension\", group: \"border\", defaultValue: \"1px\", description: \"\" },\n { name: '--wzl-line-width', type: \"dimension\", group: \"line\", defaultValue: \"2px\", description: \"Structural lines — gridlines, dividers, axes.\" },\n { name: '--wzl-curve-width', type: \"dimension\", group: \"curve\", defaultValue: \"3px\", description: \"Drawn data curves. Heavier than structural lines so data reads as primary content.\" },\n { name: '--wzl-tb-height', type: \"dimension\", group: \"tb\", defaultValue: \"28px\", description: \"Height of a horizontal toolbar strip (ActionsBar, OptionsBar, ToggleBar, ToolOptionsBar).\" },\n { name: '--wzl-radius-lg', type: \"dimension\", group: \"radius\", defaultValue: \"14px\", description: \"\" },\n { name: '--wzl-control-h', type: \"dimension\", group: \"control\", defaultValue: \"28px\", description: \"Height of an interactive control — button, input, select. Distinct from tb-height, which sizes the strip a row of them sits in.\" },\n { name: '--wzl-glass-blur', type: \"dimension\", group: \"glass\", defaultValue: \"3px\", description: \"Backdrop blur radius for frosted surfaces. Pairs with glass-tint.\" },\n { name: '--wzl-font-size', type: \"dimension\", group: \"font\", defaultValue: \"13px\", description: \"\" },\n { name: '--wzl-font-size-sm', type: \"dimension\", group: \"font\", defaultValue: \"11px\", description: \"\" },\n { name: '--wzl-space-xs', type: \"dimension\", group: \"space\", defaultValue: \"4px\", description: \"\" },\n { name: '--wzl-space-sm', type: \"dimension\", group: \"space\", defaultValue: \"8px\", description: \"\" },\n { name: '--wzl-space-md', type: \"dimension\", group: \"space\", defaultValue: \"12px\", description: \"\" },\n { name: '--wzl-space-lg', type: \"dimension\", group: \"space\", defaultValue: \"16px\", description: \"\" },\n { name: '--wzl-z-toolbar', type: \"number\", group: \"z\", defaultValue: \"10\", description: \"\" },\n { name: '--wzl-z-overlay', type: \"number\", group: \"z\", defaultValue: \"20\", description: \"\" },\n { name: '--wzl-z-modal', type: \"number\", group: \"z\", defaultValue: \"30\", description: \"\" },\n { name: '--wzl-backdrop', type: \"gradient\", group: \"backdrop\", defaultValue: \"none\", description: \"Layered backdrop fill for a page or lab root. `none` here; a theme with a signature background sets it.\" },\n { name: '--wzl-motion-fast', type: \"duration\", group: \"motion\", defaultValue: \"120ms\", description: \"Micro-interactions — hover, focus, pressed.\" },\n { name: '--wzl-motion-medium', type: \"duration\", group: \"motion\", defaultValue: \"240ms\", description: \"Entrances and exits — toasts, popovers, panels.\" },\n { name: '--wzl-ease-in-cubic', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.32, 0, 0.67, 0)\", description: \"\" },\n { name: '--wzl-ease-out-cubic', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.33, 1, 0.68, 1)\", description: \"\" },\n { name: '--wzl-ease-in-out-cubic', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.65, 0, 0.35, 1)\", description: \"\" },\n { name: '--wzl-ease-out-back', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.34, 1.56, 0.64, 1)\", description: \"\" },\n { name: '--wzl-font-ui', type: \"fontFamily\", group: \"font\", defaultValue: \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\", description: \"Condensed UI/display face. The heavier cuts get blocky at any size, so the weight tokens stay in the 200-400 range.\" },\n { name: '--wzl-font-display', type: \"fontFamily\", group: \"font\", defaultValue: \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\", description: \"\" },\n { name: '--wzl-font-body', type: \"fontFamily\", group: \"font\", defaultValue: \"Inter, system-ui, -apple-system, 'Segoe UI', sans-serif\", description: \"\" },\n { name: '--wzl-font-mono', type: \"fontFamily\", group: \"font\", defaultValue: \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\", description: \"\" },\n { name: '--wzl-font-weight-light', type: \"fontWeight\", group: \"font\", defaultValue: \"200\", description: \"\" },\n { name: '--wzl-font-weight-normal', type: \"fontWeight\", group: \"font\", defaultValue: \"300\", description: \"\" },\n { name: '--wzl-font-weight-medium', type: \"fontWeight\", group: \"font\", defaultValue: \"350\", description: \"\" },\n { name: '--wzl-font-weight-bold', type: \"fontWeight\", group: \"font\", defaultValue: \"400\", description: \"\" },\n { name: '--wzl-surface', type: \"color\", group: \"surface\", defaultValue: \"#181a1e\", description: \"\" },\n { name: '--wzl-surface-raised', type: \"color\", group: \"surface\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-surface-sunken', type: \"color\", group: \"surface\", defaultValue: \"#0e0f12\", description: \"\" },\n { name: '--wzl-fg', type: \"color\", group: \"fg\", defaultValue: \"#e6e7e9\", description: \"\" },\n { name: '--wzl-fg-muted', type: \"color\", group: \"fg\", defaultValue: \"#9ea1a8\", description: \"\" },\n { name: '--wzl-fg-subtle', type: \"color\", group: \"fg\", defaultValue: \"#6f737b\", description: \"\" },\n { name: '--wzl-border', type: \"color\", group: \"border\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-border-strong', type: \"color\", group: \"border\", defaultValue: \"#383b42\", description: \"\" },\n { name: '--wzl-accent-fg', type: \"color\", group: \"accent\", defaultValue: \"#5841b8\", description: \"Accent for foreground use — text, icons, selected labels drawn on a surface. accent is a fill; the midnight base is too dim to read as text on dark surfaces.\" },\n { name: '--wzl-fg-inverse', type: \"color\", group: \"fg\", defaultValue: \"#0e0f12\", description: \"Text drawn on a filled foreground-colored element (e.g. a slider thumb). Flips with the mode, so it is a semantic, not an alias to a primitive.\" },\n];\n","/** The one `$extensions` key this kit defines. */\nexport const ALPHA_EXT = 'com.weasel.alpha';\n\nexport type TokenValue = string | number | readonly (string | number)[];\n\nexport interface RawToken {\n readonly type: string;\n readonly value: TokenValue;\n /** Render the referenced color at this alpha, 0–1. */\n readonly alpha?: number | undefined;\n readonly description?: string | undefined;\n}\n\nexport type FlatTokens = Record<string, RawToken>;\n\n/** A resolved theme: every token name mapped to its final CSS-ready string.\n * Named ...Map, not ...Tokens, to stay distinct from hud's public `ResolvedTokens`. */\nexport type ResolvedTokenMap = Record<string, string>;\n","import { ALPHA_EXT, type FlatTokens, type RawToken, type TokenValue } from './types';\n\ninterface DtcgToken {\n $value: TokenValue;\n $type?: string;\n $description?: string;\n $extensions?: Record<string, unknown>;\n}\n\nconst isToken = (v: unknown): v is DtcgToken =>\n typeof v === 'object' && v !== null && '$value' in v;\n\n/**\n * Collapse a DTCG document into flat token names.\n *\n * Groups exist only to carry `$type`; they contribute nothing to the name, so\n * `color.fg-muted` becomes `fg-muted` and in turn `--wzl-fg-muted`. This shape\n * is forced by the token set: `--wzl-accent` and `--wzl-accent-base` are both\n * real tokens, and DTCG forbids a token that is also a group.\n */\nexport function flattenTokens(doc: Record<string, unknown>): FlatTokens {\n const out: FlatTokens = {};\n\n for (const [groupName, group] of Object.entries(doc)) {\n if (groupName.startsWith('$')) continue;\n if (typeof group !== 'object' || group === null) continue;\n\n const g = group as Record<string, unknown> & { $type?: string };\n const groupType = g.$type;\n\n for (const [leaf, node] of Object.entries(g)) {\n if (leaf.startsWith('$')) continue;\n if (!isToken(node)) continue;\n\n const type = node.$type ?? groupType;\n if (!type) {\n throw new Error(`Token \"${leaf}\" has no $type and its group \"${groupName}\" declares none`);\n }\n if (leaf in out) {\n throw new Error(`Duplicate token name \"${leaf}\" — leaf keys must be unique across type groups`);\n }\n\n const alphaRaw = node.$extensions?.[ALPHA_EXT];\n const token: RawToken = {\n type,\n value: node.$value,\n alpha: typeof alphaRaw === 'number' ? alphaRaw : undefined,\n description: node.$description,\n };\n out[leaf] = token;\n }\n }\n\n return out;\n}\n","import { flattenTokens } from './dtcg/flatten';\nimport type { FlatTokens } from './dtcg/types';\nimport { weaselTheme, type Theme } from './theme';\n\ninterface DtcgDocument {\n name?: unknown;\n defaultMode?: unknown;\n extends?: Theme | null;\n primitives?: Record<string, unknown>;\n modes?: Record<string, Record<string, unknown>>;\n}\n\n/**\n * Build a `Theme` from a DTCG document — the interchange path, for tokens\n * exported by a design tool rather than authored in TS.\n */\nexport function loadDTCG(doc: DtcgDocument): Theme {\n if (typeof doc.name !== 'string' || doc.name === '') {\n throw new Error('DTCG document needs a string \"name\"');\n }\n const modes: Record<string, FlatTokens> = {};\n for (const [mode, body] of Object.entries(doc.modes ?? {})) {\n modes[mode] = flattenTokens(body);\n }\n const base = doc.extends === undefined ? weaselTheme : doc.extends;\n return {\n name: doc.name,\n extends: base,\n defaultMode:\n typeof doc.defaultMode === 'string' ? doc.defaultMode : (base?.defaultMode ?? 'dark'),\n tokens: flattenTokens(doc.primitives ?? {}),\n modes,\n };\n}\n"]}
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { T as Theme, a as ResolvedTheme } from './resolveTheme-Bl6riwGu.js';
|
|
3
|
+
|
|
4
|
+
interface ThemeContextValue {
|
|
5
|
+
readonly theme: Theme;
|
|
6
|
+
readonly mode: string;
|
|
7
|
+
readonly resolved: ResolvedTheme;
|
|
8
|
+
}
|
|
9
|
+
interface ThemeProviderProps {
|
|
10
|
+
readonly theme?: Theme;
|
|
11
|
+
readonly mode?: string;
|
|
12
|
+
/** Applied to the wrapper element, so it can be the layout element too. */
|
|
13
|
+
readonly className?: string;
|
|
14
|
+
readonly style?: React.CSSProperties;
|
|
15
|
+
readonly children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Applies a theme to a wrapper element and publishes the resolved record.
|
|
19
|
+
*
|
|
20
|
+
* Consumers that draw outside the DOM (the WebGL HUD) read `resolved` and
|
|
21
|
+
* never touch `getComputedStyle`.
|
|
22
|
+
*
|
|
23
|
+
* The wrapper is a real element in the layout. Pass `className` rather than
|
|
24
|
+
* nesting your own div inside — an anonymous div between a flex parent and
|
|
25
|
+
* its child breaks percentage heights.
|
|
26
|
+
*/
|
|
27
|
+
declare function ThemeProvider({ theme, mode, className, style, children, }: ThemeProviderProps): React.ReactElement;
|
|
28
|
+
declare function useTheme(): ThemeContextValue;
|
|
29
|
+
/**
|
|
30
|
+
* The theme if one is provided, `null` otherwise.
|
|
31
|
+
*
|
|
32
|
+
* For kit internals that should follow a theme when the app supplies one but
|
|
33
|
+
* must still work in an app that never mounted a provider — `useHud` is the
|
|
34
|
+
* motivating case.
|
|
35
|
+
*/
|
|
36
|
+
declare function useThemeOptional(): ThemeContextValue | null;
|
|
37
|
+
|
|
38
|
+
export { type ThemeContextValue, ThemeProvider, type ThemeProviderProps, useTheme, useThemeOptional };
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { weaselTheme, resolveTheme, applyTheme } from './chunk-RATE4LL3.js';
|
|
2
|
+
import { createContext, useRef, useMemo, useLayoutEffect, useContext } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var ThemeContext = createContext(null);
|
|
6
|
+
function ThemeProvider({
|
|
7
|
+
theme = weaselTheme,
|
|
8
|
+
mode,
|
|
9
|
+
className,
|
|
10
|
+
style,
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
13
|
+
const ref = useRef(null);
|
|
14
|
+
const effectiveMode = mode ?? theme.defaultMode;
|
|
15
|
+
const value = useMemo(
|
|
16
|
+
() => ({ theme, mode: effectiveMode, resolved: resolveTheme(theme, effectiveMode) }),
|
|
17
|
+
[theme, effectiveMode]
|
|
18
|
+
);
|
|
19
|
+
useLayoutEffect(() => {
|
|
20
|
+
if (ref.current) applyTheme(ref.current, theme, effectiveMode);
|
|
21
|
+
}, [theme, effectiveMode]);
|
|
22
|
+
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children: /* @__PURE__ */ jsx(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
ref,
|
|
26
|
+
className,
|
|
27
|
+
style,
|
|
28
|
+
"data-wzl-theme": theme.name,
|
|
29
|
+
"data-wzl-mode": effectiveMode,
|
|
30
|
+
children
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
33
|
+
}
|
|
34
|
+
function useTheme() {
|
|
35
|
+
const ctx = useContext(ThemeContext);
|
|
36
|
+
if (!ctx) throw new Error("useTheme must be used inside a <ThemeProvider>");
|
|
37
|
+
return ctx;
|
|
38
|
+
}
|
|
39
|
+
function useThemeOptional() {
|
|
40
|
+
return useContext(ThemeContext);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { ThemeProvider, useTheme, useThemeOptional };
|
|
44
|
+
//# sourceMappingURL=react.js.map
|
|
45
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react.tsx"],"names":[],"mappings":";;;;AAWA,IAAM,YAAA,GAAe,cAAwC,IAAI,CAAA;AAqB1D,SAAS,aAAA,CAAc;AAAA,EAC5B,KAAA,GAAQ,WAAA;AAAA,EACR,IAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,EAA2C;AACzC,EAAA,MAAM,GAAA,GAAM,OAAuB,IAAI,CAAA;AACvC,EAAA,MAAM,aAAA,GAAgB,QAAQ,KAAA,CAAM,WAAA;AAEpC,EAAA,MAAM,KAAA,GAAQ,OAAA;AAAA,IACZ,OAAO,EAAE,KAAA,EAAO,IAAA,EAAM,eAAe,QAAA,EAAU,YAAA,CAAa,KAAA,EAAO,aAAa,CAAA,EAAE,CAAA;AAAA,IAClF,CAAC,OAAO,aAAa;AAAA,GACvB;AAEA,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,IAAI,OAAA,EAAS,UAAA,CAAW,GAAA,CAAI,OAAA,EAAS,OAAO,aAAa,CAAA;AAAA,EAC/D,CAAA,EAAG,CAAC,KAAA,EAAO,aAAa,CAAC,CAAA;AAEzB,EAAA,uBACE,GAAA,CAAC,YAAA,CAAa,QAAA,EAAb,EAAsB,KAAA,EACrB,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,kBAAgB,KAAA,CAAM,IAAA;AAAA,MACtB,eAAA,EAAe,aAAA;AAAA,MAEd;AAAA;AAAA,GACH,EACF,CAAA;AAEJ;AAEO,SAAS,QAAA,GAA8B;AAC5C,EAAA,MAAM,GAAA,GAAM,WAAW,YAAY,CAAA;AACnC,EAAA,IAAI,CAAC,GAAA,EAAK,MAAM,IAAI,MAAM,gDAAgD,CAAA;AAC1E,EAAA,OAAO,GAAA;AACT;AASO,SAAS,gBAAA,GAA6C;AAC3D,EAAA,OAAO,WAAW,YAAY,CAAA;AAChC","file":"react.js","sourcesContent":["import React, { createContext, useContext, useMemo, useRef, useLayoutEffect } from 'react';\nimport { applyTheme } from './applyTheme';\nimport { resolveTheme, type ResolvedTheme } from './resolveTheme';\nimport { weaselTheme, type Theme } from './theme';\n\nexport interface ThemeContextValue {\n readonly theme: Theme;\n readonly mode: string;\n readonly resolved: ResolvedTheme;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n readonly theme?: Theme;\n readonly mode?: string;\n /** Applied to the wrapper element, so it can be the layout element too. */\n readonly className?: string;\n readonly style?: React.CSSProperties;\n readonly children: React.ReactNode;\n}\n\n/**\n * Applies a theme to a wrapper element and publishes the resolved record.\n *\n * Consumers that draw outside the DOM (the WebGL HUD) read `resolved` and\n * never touch `getComputedStyle`.\n *\n * The wrapper is a real element in the layout. Pass `className` rather than\n * nesting your own div inside — an anonymous div between a flex parent and\n * its child breaks percentage heights.\n */\nexport function ThemeProvider({\n theme = weaselTheme,\n mode,\n className,\n style,\n children,\n}: ThemeProviderProps): React.ReactElement {\n const ref = useRef<HTMLDivElement>(null);\n const effectiveMode = mode ?? theme.defaultMode;\n\n const value = useMemo<ThemeContextValue>(\n () => ({ theme, mode: effectiveMode, resolved: resolveTheme(theme, effectiveMode) }),\n [theme, effectiveMode],\n );\n\n useLayoutEffect(() => {\n if (ref.current) applyTheme(ref.current, theme, effectiveMode);\n }, [theme, effectiveMode]);\n\n return (\n <ThemeContext.Provider value={value}>\n <div\n ref={ref}\n className={className}\n style={style}\n data-wzl-theme={theme.name}\n data-wzl-mode={effectiveMode}\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n}\n\nexport function useTheme(): ThemeContextValue {\n const ctx = useContext(ThemeContext);\n if (!ctx) throw new Error('useTheme must be used inside a <ThemeProvider>');\n return ctx;\n}\n\n/**\n * The theme if one is provided, `null` otherwise.\n *\n * For kit internals that should follow a theme when the app supplies one but\n * must still work in an app that never mounted a provider — `useHud` is the\n * motivating case.\n */\nexport function useThemeOptional(): ThemeContextValue | null {\n return useContext(ThemeContext);\n}\n"]}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
type TokenValue = string | number | readonly (string | number)[];
|
|
2
|
+
interface RawToken {
|
|
3
|
+
readonly type: string;
|
|
4
|
+
readonly value: TokenValue;
|
|
5
|
+
/** Render the referenced color at this alpha, 0–1. */
|
|
6
|
+
readonly alpha?: number | undefined;
|
|
7
|
+
readonly description?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
type FlatTokens = Record<string, RawToken>;
|
|
10
|
+
|
|
11
|
+
type TokenName = '--wzl-accent' | '--wzl-accent-base' | '--wzl-accent-fg' | '--wzl-accent-hover' | '--wzl-accent-soft' | '--wzl-accent-strong' | '--wzl-backdrop' | '--wzl-border' | '--wzl-border-strong' | '--wzl-border-w' | '--wzl-control-h' | '--wzl-curve-color' | '--wzl-curve-width' | '--wzl-danger' | '--wzl-danger-base' | '--wzl-ease-in-cubic' | '--wzl-ease-in-out-cubic' | '--wzl-ease-out-back' | '--wzl-ease-out-cubic' | '--wzl-fg' | '--wzl-fg-inverse' | '--wzl-fg-muted' | '--wzl-fg-on-accent' | '--wzl-fg-subtle' | '--wzl-focus-ring' | '--wzl-font-body' | '--wzl-font-display' | '--wzl-font-mono' | '--wzl-font-size' | '--wzl-font-size-sm' | '--wzl-font-ui' | '--wzl-font-weight-bold' | '--wzl-font-weight-light' | '--wzl-font-weight-medium' | '--wzl-font-weight-normal' | '--wzl-glass-blur' | '--wzl-glass-tint' | '--wzl-gray-100' | '--wzl-gray-200' | '--wzl-gray-300' | '--wzl-gray-400' | '--wzl-gray-50' | '--wzl-gray-500' | '--wzl-gray-600' | '--wzl-gray-700' | '--wzl-gray-800' | '--wzl-gray-900' | '--wzl-line' | '--wzl-line-strong' | '--wzl-line-subtle' | '--wzl-line-width' | '--wzl-motion-fast' | '--wzl-motion-medium' | '--wzl-radius-lg' | '--wzl-radius-md' | '--wzl-radius-sm' | '--wzl-space-lg' | '--wzl-space-md' | '--wzl-space-sm' | '--wzl-space-xs' | '--wzl-success' | '--wzl-success-base' | '--wzl-surface' | '--wzl-surface-hover' | '--wzl-surface-pressed' | '--wzl-surface-raised' | '--wzl-surface-sunken' | '--wzl-swatch-amber' | '--wzl-swatch-cyan' | '--wzl-swatch-gold' | '--wzl-swatch-green' | '--wzl-swatch-magenta' | '--wzl-swatch-mint' | '--wzl-swatch-orange' | '--wzl-swatch-pink' | '--wzl-swatch-sky' | '--wzl-swatch-violet' | '--wzl-tb-height' | '--wzl-warning' | '--wzl-warning-base' | '--wzl-z-modal' | '--wzl-z-overlay' | '--wzl-z-toolbar';
|
|
12
|
+
interface GeneratedTheme {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly defaultMode: string;
|
|
15
|
+
readonly modes: Readonly<Record<string, Readonly<Record<TokenName, string>>>>;
|
|
16
|
+
}
|
|
17
|
+
declare const THEMES: {
|
|
18
|
+
readonly weasel: {
|
|
19
|
+
readonly name: "weasel";
|
|
20
|
+
readonly defaultMode: "dark";
|
|
21
|
+
readonly modes: {
|
|
22
|
+
readonly dark: {
|
|
23
|
+
readonly '--wzl-gray-50': "#f5f5f6";
|
|
24
|
+
readonly '--wzl-gray-100': "#e6e7e9";
|
|
25
|
+
readonly '--wzl-gray-200': "#c9cbcf";
|
|
26
|
+
readonly '--wzl-gray-300': "#9ea1a8";
|
|
27
|
+
readonly '--wzl-gray-400': "#6f737b";
|
|
28
|
+
readonly '--wzl-gray-500': "#4d5058";
|
|
29
|
+
readonly '--wzl-gray-600': "#383b42";
|
|
30
|
+
readonly '--wzl-gray-700': "#25272c";
|
|
31
|
+
readonly '--wzl-gray-800': "#181a1e";
|
|
32
|
+
readonly '--wzl-gray-900': "#0e0f12";
|
|
33
|
+
readonly '--wzl-accent-soft': "#1d1454";
|
|
34
|
+
readonly '--wzl-accent-base': "#2e1f7a";
|
|
35
|
+
readonly '--wzl-accent-strong': "#5841b8";
|
|
36
|
+
readonly '--wzl-danger-base': "#d94a3f";
|
|
37
|
+
readonly '--wzl-warning-base': "#d99a3f";
|
|
38
|
+
readonly '--wzl-success-base': "#2ec27e";
|
|
39
|
+
readonly '--wzl-fg-on-accent': "#f5f5f6";
|
|
40
|
+
readonly '--wzl-fg': "#e6e7e9";
|
|
41
|
+
readonly '--wzl-line-subtle': "rgba(230, 231, 233, 0.1)";
|
|
42
|
+
readonly '--wzl-line': "rgba(230, 231, 233, 0.2)";
|
|
43
|
+
readonly '--wzl-line-strong': "rgba(230, 231, 233, 0.4)";
|
|
44
|
+
readonly '--wzl-curve-color': "#5841b8";
|
|
45
|
+
readonly '--wzl-accent': "#2e1f7a";
|
|
46
|
+
readonly '--wzl-accent-hover': "#5841b8";
|
|
47
|
+
readonly '--wzl-danger': "#d94a3f";
|
|
48
|
+
readonly '--wzl-warning': "#d99a3f";
|
|
49
|
+
readonly '--wzl-success': "#2ec27e";
|
|
50
|
+
readonly '--wzl-focus-ring': "#5841b8";
|
|
51
|
+
readonly '--wzl-glass-tint': "#2e1f7a";
|
|
52
|
+
readonly '--wzl-surface-hover': "rgba(230, 231, 233, 0.1)";
|
|
53
|
+
readonly '--wzl-surface-pressed': "rgba(230, 231, 233, 0.18)";
|
|
54
|
+
readonly '--wzl-swatch-green': "#2fdd18";
|
|
55
|
+
readonly '--wzl-swatch-pink': "#ff5885";
|
|
56
|
+
readonly '--wzl-swatch-cyan': "#00dfff";
|
|
57
|
+
readonly '--wzl-swatch-gold': "#dcb700";
|
|
58
|
+
readonly '--wzl-swatch-amber': "#ff8c00";
|
|
59
|
+
readonly '--wzl-swatch-violet': "#a497ff";
|
|
60
|
+
readonly '--wzl-swatch-mint': "#00e7af";
|
|
61
|
+
readonly '--wzl-swatch-sky': "#00b8ff";
|
|
62
|
+
readonly '--wzl-swatch-orange': "#ff6b00";
|
|
63
|
+
readonly '--wzl-swatch-magenta': "#ff6eff";
|
|
64
|
+
readonly '--wzl-radius-sm': "3px";
|
|
65
|
+
readonly '--wzl-radius-md': "5px";
|
|
66
|
+
readonly '--wzl-border-w': "1px";
|
|
67
|
+
readonly '--wzl-line-width': "2px";
|
|
68
|
+
readonly '--wzl-curve-width': "3px";
|
|
69
|
+
readonly '--wzl-tb-height': "28px";
|
|
70
|
+
readonly '--wzl-radius-lg': "14px";
|
|
71
|
+
readonly '--wzl-control-h': "28px";
|
|
72
|
+
readonly '--wzl-glass-blur': "3px";
|
|
73
|
+
readonly '--wzl-font-size': "13px";
|
|
74
|
+
readonly '--wzl-font-size-sm': "11px";
|
|
75
|
+
readonly '--wzl-space-xs': "4px";
|
|
76
|
+
readonly '--wzl-space-sm': "8px";
|
|
77
|
+
readonly '--wzl-space-md': "12px";
|
|
78
|
+
readonly '--wzl-space-lg': "16px";
|
|
79
|
+
readonly '--wzl-z-toolbar': "10";
|
|
80
|
+
readonly '--wzl-z-overlay': "20";
|
|
81
|
+
readonly '--wzl-z-modal': "30";
|
|
82
|
+
readonly '--wzl-backdrop': "none";
|
|
83
|
+
readonly '--wzl-motion-fast': "120ms";
|
|
84
|
+
readonly '--wzl-motion-medium': "240ms";
|
|
85
|
+
readonly '--wzl-ease-in-cubic': "cubic-bezier(0.32, 0, 0.67, 0)";
|
|
86
|
+
readonly '--wzl-ease-out-cubic': "cubic-bezier(0.33, 1, 0.68, 1)";
|
|
87
|
+
readonly '--wzl-ease-in-out-cubic': "cubic-bezier(0.65, 0, 0.35, 1)";
|
|
88
|
+
readonly '--wzl-ease-out-back': "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
89
|
+
readonly '--wzl-font-ui': "Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif";
|
|
90
|
+
readonly '--wzl-font-display': "Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif";
|
|
91
|
+
readonly '--wzl-font-body': "Inter, system-ui, -apple-system, 'Segoe UI', sans-serif";
|
|
92
|
+
readonly '--wzl-font-mono': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
93
|
+
readonly '--wzl-font-weight-light': "200";
|
|
94
|
+
readonly '--wzl-font-weight-normal': "300";
|
|
95
|
+
readonly '--wzl-font-weight-medium': "350";
|
|
96
|
+
readonly '--wzl-font-weight-bold': "400";
|
|
97
|
+
readonly '--wzl-surface': "#181a1e";
|
|
98
|
+
readonly '--wzl-surface-raised': "#25272c";
|
|
99
|
+
readonly '--wzl-surface-sunken': "#0e0f12";
|
|
100
|
+
readonly '--wzl-fg-muted': "#9ea1a8";
|
|
101
|
+
readonly '--wzl-fg-subtle': "#6f737b";
|
|
102
|
+
readonly '--wzl-border': "#25272c";
|
|
103
|
+
readonly '--wzl-border-strong': "#383b42";
|
|
104
|
+
readonly '--wzl-accent-fg': "#5841b8";
|
|
105
|
+
readonly '--wzl-fg-inverse': "#0e0f12";
|
|
106
|
+
};
|
|
107
|
+
readonly light: {
|
|
108
|
+
readonly '--wzl-gray-50': "#f5f5f6";
|
|
109
|
+
readonly '--wzl-gray-100': "#e6e7e9";
|
|
110
|
+
readonly '--wzl-gray-200': "#c9cbcf";
|
|
111
|
+
readonly '--wzl-gray-300': "#9ea1a8";
|
|
112
|
+
readonly '--wzl-gray-400': "#6f737b";
|
|
113
|
+
readonly '--wzl-gray-500': "#4d5058";
|
|
114
|
+
readonly '--wzl-gray-600': "#383b42";
|
|
115
|
+
readonly '--wzl-gray-700': "#25272c";
|
|
116
|
+
readonly '--wzl-gray-800': "#181a1e";
|
|
117
|
+
readonly '--wzl-gray-900': "#0e0f12";
|
|
118
|
+
readonly '--wzl-accent-soft': "#1d1454";
|
|
119
|
+
readonly '--wzl-accent-base': "#2e1f7a";
|
|
120
|
+
readonly '--wzl-accent-strong': "#5841b8";
|
|
121
|
+
readonly '--wzl-danger-base': "#d94a3f";
|
|
122
|
+
readonly '--wzl-warning-base': "#d99a3f";
|
|
123
|
+
readonly '--wzl-success-base': "#2ec27e";
|
|
124
|
+
readonly '--wzl-fg-on-accent': "#f5f5f6";
|
|
125
|
+
readonly '--wzl-fg': "#0e0f12";
|
|
126
|
+
readonly '--wzl-line-subtle': "rgba(14, 15, 18, 0.1)";
|
|
127
|
+
readonly '--wzl-line': "rgba(14, 15, 18, 0.2)";
|
|
128
|
+
readonly '--wzl-line-strong': "rgba(14, 15, 18, 0.4)";
|
|
129
|
+
readonly '--wzl-curve-color': "#5841b8";
|
|
130
|
+
readonly '--wzl-accent': "#2e1f7a";
|
|
131
|
+
readonly '--wzl-accent-hover': "#5841b8";
|
|
132
|
+
readonly '--wzl-danger': "#d94a3f";
|
|
133
|
+
readonly '--wzl-warning': "#d99a3f";
|
|
134
|
+
readonly '--wzl-success': "#2ec27e";
|
|
135
|
+
readonly '--wzl-focus-ring': "#5841b8";
|
|
136
|
+
readonly '--wzl-glass-tint': "#2e1f7a";
|
|
137
|
+
readonly '--wzl-surface-hover': "rgba(14, 15, 18, 0.1)";
|
|
138
|
+
readonly '--wzl-surface-pressed': "rgba(14, 15, 18, 0.18)";
|
|
139
|
+
readonly '--wzl-swatch-green': "#2fdd18";
|
|
140
|
+
readonly '--wzl-swatch-pink': "#ff5885";
|
|
141
|
+
readonly '--wzl-swatch-cyan': "#00dfff";
|
|
142
|
+
readonly '--wzl-swatch-gold': "#dcb700";
|
|
143
|
+
readonly '--wzl-swatch-amber': "#ff8c00";
|
|
144
|
+
readonly '--wzl-swatch-violet': "#a497ff";
|
|
145
|
+
readonly '--wzl-swatch-mint': "#00e7af";
|
|
146
|
+
readonly '--wzl-swatch-sky': "#00b8ff";
|
|
147
|
+
readonly '--wzl-swatch-orange': "#ff6b00";
|
|
148
|
+
readonly '--wzl-swatch-magenta': "#ff6eff";
|
|
149
|
+
readonly '--wzl-radius-sm': "3px";
|
|
150
|
+
readonly '--wzl-radius-md': "5px";
|
|
151
|
+
readonly '--wzl-border-w': "1px";
|
|
152
|
+
readonly '--wzl-line-width': "2px";
|
|
153
|
+
readonly '--wzl-curve-width': "3px";
|
|
154
|
+
readonly '--wzl-tb-height': "28px";
|
|
155
|
+
readonly '--wzl-radius-lg': "14px";
|
|
156
|
+
readonly '--wzl-control-h': "28px";
|
|
157
|
+
readonly '--wzl-glass-blur': "3px";
|
|
158
|
+
readonly '--wzl-font-size': "13px";
|
|
159
|
+
readonly '--wzl-font-size-sm': "11px";
|
|
160
|
+
readonly '--wzl-space-xs': "4px";
|
|
161
|
+
readonly '--wzl-space-sm': "8px";
|
|
162
|
+
readonly '--wzl-space-md': "12px";
|
|
163
|
+
readonly '--wzl-space-lg': "16px";
|
|
164
|
+
readonly '--wzl-z-toolbar': "10";
|
|
165
|
+
readonly '--wzl-z-overlay': "20";
|
|
166
|
+
readonly '--wzl-z-modal': "30";
|
|
167
|
+
readonly '--wzl-backdrop': "none";
|
|
168
|
+
readonly '--wzl-motion-fast': "120ms";
|
|
169
|
+
readonly '--wzl-motion-medium': "240ms";
|
|
170
|
+
readonly '--wzl-ease-in-cubic': "cubic-bezier(0.32, 0, 0.67, 0)";
|
|
171
|
+
readonly '--wzl-ease-out-cubic': "cubic-bezier(0.33, 1, 0.68, 1)";
|
|
172
|
+
readonly '--wzl-ease-in-out-cubic': "cubic-bezier(0.65, 0, 0.35, 1)";
|
|
173
|
+
readonly '--wzl-ease-out-back': "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
174
|
+
readonly '--wzl-font-ui': "Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif";
|
|
175
|
+
readonly '--wzl-font-display': "Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif";
|
|
176
|
+
readonly '--wzl-font-body': "Inter, system-ui, -apple-system, 'Segoe UI', sans-serif";
|
|
177
|
+
readonly '--wzl-font-mono': "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
178
|
+
readonly '--wzl-font-weight-light': "200";
|
|
179
|
+
readonly '--wzl-font-weight-normal': "300";
|
|
180
|
+
readonly '--wzl-font-weight-medium': "350";
|
|
181
|
+
readonly '--wzl-font-weight-bold': "400";
|
|
182
|
+
readonly '--wzl-surface': "#f5f5f6";
|
|
183
|
+
readonly '--wzl-surface-raised': "#e6e7e9";
|
|
184
|
+
readonly '--wzl-surface-sunken': "#c9cbcf";
|
|
185
|
+
readonly '--wzl-fg-muted': "#383b42";
|
|
186
|
+
readonly '--wzl-fg-subtle': "#4d5058";
|
|
187
|
+
readonly '--wzl-border': "#c9cbcf";
|
|
188
|
+
readonly '--wzl-border-strong': "#9ea1a8";
|
|
189
|
+
readonly '--wzl-accent-fg': "#2e1f7a";
|
|
190
|
+
readonly '--wzl-fg-inverse': "#f5f5f6";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
/** Unresolved token graph. `extends` needs the aliases intact so an override
|
|
196
|
+
* of a base primitive still reaches everything referencing it. */
|
|
197
|
+
interface ThemeSource {
|
|
198
|
+
readonly primitives: Readonly<Record<string, RawToken>>;
|
|
199
|
+
readonly modes: Readonly<Record<string, Readonly<Record<string, RawToken>>>>;
|
|
200
|
+
}
|
|
201
|
+
declare const THEME_SOURCES: Readonly<Record<string, ThemeSource>>;
|
|
202
|
+
|
|
203
|
+
/** Authoring shorthand: a bare string is a literal or a `{ref}`. */
|
|
204
|
+
type TokenInput = string | number | RawToken;
|
|
205
|
+
interface ThemeInput {
|
|
206
|
+
readonly name: string;
|
|
207
|
+
/** Base to layer onto. Defaults to `weaselTheme`; `null` opts out. */
|
|
208
|
+
readonly extends?: Theme | null;
|
|
209
|
+
readonly defaultMode?: string;
|
|
210
|
+
/** Mode-invariant overrides. */
|
|
211
|
+
readonly tokens?: Readonly<Record<string, TokenInput>>;
|
|
212
|
+
readonly modes: Readonly<Record<string, Readonly<Record<string, TokenInput>>>>;
|
|
213
|
+
}
|
|
214
|
+
interface Theme {
|
|
215
|
+
readonly name: string;
|
|
216
|
+
readonly extends: Theme | null;
|
|
217
|
+
readonly defaultMode: string;
|
|
218
|
+
readonly tokens: FlatTokens;
|
|
219
|
+
readonly modes: Readonly<Record<string, FlatTokens>>;
|
|
220
|
+
}
|
|
221
|
+
/** The built-in theme, materialized from the generated source. */
|
|
222
|
+
declare const weaselTheme: Theme;
|
|
223
|
+
declare function defineTheme(input: ThemeInput): Theme;
|
|
224
|
+
|
|
225
|
+
type ResolvedTheme = Readonly<Record<TokenName, string>>;
|
|
226
|
+
/**
|
|
227
|
+
* Merge the extends chain, layer the mode over it, resolve every alias, and
|
|
228
|
+
* key the result by CSS custom-property name.
|
|
229
|
+
*
|
|
230
|
+
* Pure — no DOM. An unresolvable reference throws rather than falling back.
|
|
231
|
+
*/
|
|
232
|
+
declare function resolveTheme(theme: Theme, mode: string): ResolvedTheme;
|
|
233
|
+
|
|
234
|
+
export { type FlatTokens as F, type GeneratedTheme as G, type RawToken as R, type Theme as T, type ResolvedTheme as a, THEMES as b, THEME_SOURCES as c, type ThemeInput as d, type ThemeSource as e, type TokenInput as f, type TokenName as g, defineTheme as h, resolveTheme as r, weaselTheme as w };
|