@glasshome/ui 1.17.0 → 1.19.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/SPEC.md +83 -2
- package/dist/index.js +2 -2
- package/dist/lib/button-variants.d.ts +4 -1
- package/dist/lib/card-classes.d.ts +4 -4
- package/dist/lib/motion-classes.d.ts +1 -0
- package/dist/lib/overlay-classes.d.ts +4 -2
- package/dist/lib/pill-classes.d.ts +1 -1
- package/dist/lib/spotlight-geometry.d.ts +22 -0
- package/dist/lib/thumb-classes.d.ts +1 -0
- package/dist/lib/tier-badge.d.ts +1 -1
- package/dist/solid/button.d.ts +8 -3
- package/dist/solid/dock.d.ts +9 -0
- package/dist/solid/docked-panel.d.ts +11 -0
- package/dist/solid/index.d.ts +6 -2
- package/dist/solid/index.js +4399 -4034
- package/dist/solid/option-card.d.ts +1 -1
- package/dist/solid/preview-tile.d.ts +33 -0
- package/dist/solid/spotlight.d.ts +14 -0
- package/dist/solid/swatch-picker.d.ts +12 -0
- package/dist/solid/tabs.d.ts +4 -1
- package/dist/solid/widget-identity.d.ts +2 -0
- package/dist/tokens/index.d.ts +3 -0
- package/dist/tokens/index.js +481 -67
- package/dist/tokens/material.d.ts +40 -0
- package/dist/tokens/presets.d.ts +3 -0
- package/dist/tokens/readability.d.ts +21 -0
- package/dist/tokens/theme-colors.d.ts +13 -3
- package/dist/tokens/theme-recipe.d.ts +33 -0
- package/dist/{utils-DMaksjvy.js → utils-CV6G6fr8.js} +343 -340
- package/package.json +2 -2
- package/src/lib/button-variants.ts +10 -7
- package/src/lib/card-classes.ts +4 -3
- package/src/lib/motion-classes.ts +5 -0
- package/src/lib/overlay-classes.ts +10 -2
- package/src/lib/pill-classes.ts +4 -3
- package/src/lib/spotlight-geometry.ts +90 -0
- package/src/lib/thumb-classes.ts +7 -0
- package/src/lib/tier-badge.ts +1 -1
- package/src/solid/button.tsx +17 -2
- package/src/solid/carousel.tsx +2 -2
- package/src/solid/data-table.tsx +2 -2
- package/src/solid/dock.tsx +67 -9
- package/src/solid/docked-panel.tsx +56 -0
- package/src/solid/hero-action.tsx +2 -2
- package/src/solid/icon-picker.tsx +1 -1
- package/src/solid/index.ts +11 -2
- package/src/solid/media-tile.tsx +1 -1
- package/src/solid/option-card.tsx +25 -31
- package/src/solid/preview-tile.tsx +79 -0
- package/src/solid/radio-group.tsx +7 -2
- package/src/solid/section-card.tsx +4 -2
- package/src/solid/sliding-indicator.tsx +13 -12
- package/src/solid/spotlight.tsx +179 -0
- package/src/solid/swatch-picker.tsx +47 -0
- package/src/solid/switch.tsx +5 -2
- package/src/solid/tabs.tsx +20 -4
- package/src/solid/toggle-group.tsx +1 -4
- package/src/solid/widget-identity.tsx +3 -1
- package/src/styles/globals.css +166 -14
- package/src/styles/theme.css +22 -3
- package/src/tokens/index.ts +3 -0
- package/src/tokens/material.ts +116 -0
- package/src/tokens/presets.ts +201 -62
- package/src/tokens/readability.ts +67 -0
- package/src/tokens/theme-colors.ts +15 -3
- package/src/tokens/theme-recipe.ts +161 -0
|
@@ -20,14 +20,24 @@ export interface ThemeColorsConfig {
|
|
|
20
20
|
light: ThemeColors;
|
|
21
21
|
dark: ThemeColors;
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface BackgroundLayer {
|
|
24
24
|
type: "solid" | "static" | "custom";
|
|
25
25
|
id: string;
|
|
26
|
-
themed: boolean;
|
|
27
|
-
url?: string;
|
|
28
26
|
fit?: "cover" | "contain" | "tile";
|
|
27
|
+
/** 0 to 1: how far the wallpaper fades toward `--background`. */
|
|
29
28
|
overlay?: number;
|
|
29
|
+
/** 0 to 20, in px. */
|
|
30
30
|
blur?: number;
|
|
31
|
+
/** 0 to 1: how dark the corners fall. */
|
|
32
|
+
vignette?: number;
|
|
33
|
+
}
|
|
34
|
+
/** The picture alone; visibility and softness belong to the theme, the same in both modes. */
|
|
35
|
+
export type BackgroundImage = Pick<BackgroundLayer, "type" | "id" | "fit">;
|
|
36
|
+
export interface BackgroundConfig extends BackgroundLayer {
|
|
37
|
+
themed: boolean;
|
|
38
|
+
url?: string;
|
|
39
|
+
/** Shown in dark mode instead of the top-level picture. */
|
|
40
|
+
dark?: BackgroundImage;
|
|
31
41
|
}
|
|
32
42
|
/** The 6 base colors used as input for resolving a full ThemeColors */
|
|
33
43
|
export type ThemeBaseColors = Pick<ThemeColors, "primary" | "accent" | "secondary" | "border" | "card" | "background">;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Material } from "./material.js";
|
|
2
|
+
import { type BackgroundConfig, type ThemeColors, type ThemeColorsConfig } from "./theme-colors.js";
|
|
3
|
+
export declare const RECIPE_VERSION = 1;
|
|
4
|
+
/** The studio's glass tint: `auto` follows the background picture; the rest are fixed surfaces. */
|
|
5
|
+
export type GlassTint = "auto" | "cool" | "neutral" | "warm";
|
|
6
|
+
export declare const TINT_SURFACES: Record<Exclude<GlassTint, "auto">, string>;
|
|
7
|
+
type Mode = "light" | "dark";
|
|
8
|
+
/** What was chosen, never what was computed: a stored theme re-derives on read. */
|
|
9
|
+
export interface ThemeRecipe {
|
|
10
|
+
/** Selects the derivation table, so a change to the math never moves a stored theme. */
|
|
11
|
+
v: typeof RECIPE_VERSION;
|
|
12
|
+
accent: string;
|
|
13
|
+
/** Tint and depth of the ground the glass sits on, as chosen for light. */
|
|
14
|
+
surface: string;
|
|
15
|
+
radius: number;
|
|
16
|
+
background: BackgroundConfig;
|
|
17
|
+
/** Dark is derived from the light result instead of from the seeds. */
|
|
18
|
+
darkLinked: boolean;
|
|
19
|
+
/** Hand-set colors only; everything absent is derived. */
|
|
20
|
+
set: {
|
|
21
|
+
light: Partial<ThemeColors>;
|
|
22
|
+
dark: Partial<ThemeColors>;
|
|
23
|
+
};
|
|
24
|
+
/** What the studio's tint choice was; `surface` stays the value the math reads. Absent is a hand-set surface. */
|
|
25
|
+
tint?: GlassTint;
|
|
26
|
+
/** The glass material; absent is Frosted, so no stored theme moved when this arrived. */
|
|
27
|
+
material?: Material;
|
|
28
|
+
}
|
|
29
|
+
export declare function resolveRecipe(recipe: ThemeRecipe): ThemeColorsConfig;
|
|
30
|
+
export declare function isDerived(recipe: ThemeRecipe, mode: Mode, key: keyof ThemeColors): boolean;
|
|
31
|
+
/** A flat theme (a preset, a legacy row) as a recipe that resolves back to the same 24 colors. */
|
|
32
|
+
export declare function seedsFromColors(colors: ThemeColorsConfig, radius: number, background: BackgroundConfig): ThemeRecipe;
|
|
33
|
+
export {};
|