release: WRNexusJS 0.8.0
Quality / quality (ubuntu-latest) (push) Failing after 21s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-02 23:18:51 +05:30
parent 87507edf59
commit 586a6db8ff
625 changed files with 243608 additions and 11210 deletions
+46 -1
View File
@@ -11,7 +11,52 @@
* emitted as the native CSS property instead of a custom property.
*/
export type ThemeTokens = Record<string, string>;
export type ThemeSemanticColor =
"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "error";
export type ThemeToken =
| "color-scheme"
| "color-bg"
| "color-background"
| "color-foreground"
| "color-surface"
| "color-surface-2"
| "color-surface-raised"
| "color-surface-muted"
| "color-text"
| "color-text-muted"
| "color-text-subtle"
| "color-muted"
| "color-border"
| "color-border-strong"
| "color-code-background"
| "color-code-surface"
| "color-code-text"
| "color-code-muted"
| "color-code-border"
| `color-${ThemeSemanticColor}`
| `color-${ThemeSemanticColor}-${"hover" | "active" | "contrast" | "soft" | "muted" | "text"}`
| `color-on-${"primary" | "secondary"}`
| "radius"
| "radius-sm"
| "shadow-1"
| "shadow-sm"
| "shadow-md"
| "shadow-lg"
| "space-section"
| "space-section-sm"
| "container-max"
| "font-sans";
/** Known tokens get autocomplete while applications may add namespaced custom tokens. */
export type ThemeTokens = Partial<Record<ThemeToken, string>> & Record<string, string>;
export function defineThemeTokens<T extends ThemeTokens>(tokens: T): T {
return tokens;
}
export function themeVar(token: ThemeToken, fallback?: string): string {
return `var(--wire-${token}${fallback ? `, ${fallback}` : ""})`;
}
export const THEME_PALETTE_NAMES = [
"blue",