@glasshome/ui 1.9.0 → 1.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
@@ -70,20 +70,9 @@ Framework-free theme model: presets, oklch parsing/derivation, and oklch→hex c
70
70
  import { THEME_PRESETS, DEFAULT_THEME_ID, resolveThemeColors, oklchToHex } from "@glasshome/ui/tokens";
71
71
  ```
72
72
 
73
- ### `@glasshome/ui/astro/*` — zero-JS server components
73
+ ### Astro
74
74
 
75
- Astro components rendering the same surfaces with no client JS:
76
-
77
- ```astro
78
- ---
79
- import Badge from "@glasshome/ui/astro/Badge.astro";
80
- import Button from "@glasshome/ui/astro/Button.astro";
81
- import Card from "@glasshome/ui/astro/Card.astro";
82
- import Alert from "@glasshome/ui/astro/Alert.astro";
83
- ---
84
- ```
85
-
86
- Do not import `@glasshome/ui/solid` in server-run `.astro` files; use these or the root recipes instead.
75
+ `.astro` files import `@glasshome/ui/solid` like any Solid file. The package ships its source under the `solid` export condition, so Astro's Solid integration compiles it for the server; a component with no `client:` directive renders to static HTML with no runtime shipped.
87
76
 
88
77
  ### `@glasshome/ui/styles` — Tailwind v4 CSS
89
78
 
package/SPEC.md CHANGED
@@ -101,7 +101,7 @@ role clears 4.5:1 against `--background`/`--card`/`--popover`/`--muted` (3:1 for
101
101
 
102
102
  | Need | Use | Never |
103
103
  |---|---|---|
104
- | a panel | `<Card>` (Solid or `astro/Card.astro`) | `border bg-card/NN backdrop-blur` |
104
+ | a panel | `<Card>` | `border bg-card/NN backdrop-blur` |
105
105
  | a floating panel | `<Overlay>` / the overlay-wearing primitive | raw `bg-popover shadow` |
106
106
  | a modal | `<ResponsiveDialog>` (desktop dialog + mobile bottom sheet), `<Dialog>` for desktop-only | `<Sheet side="bottom">` as a modal |
107
107
  | an avatar or icon beside a modal title | `<Header media={…}>` | a hand-rolled row inside the header |
@@ -118,9 +118,9 @@ role clears 4.5:1 against `--background`/`--card`/`--popover`/`--muted` (3:1 for
118
118
  | tinted text alone | `glassToneText(tone)` | ad-hoc color-mix |
119
119
  | a metallic tier chip | `<TierBadge>` | gradients by hand |
120
120
 
121
- In server-run `.astro` frontmatter you cannot import `@glasshome/ui/solid`
122
- (Solid `template()` throws at module load). Use the `@glasshome/ui/astro`
123
- components, or the pure recipes/tokens from the root `@glasshome/ui`.
121
+ Server-run `.astro` markup imports `@glasshome/ui/solid` too: the `solid`
122
+ export condition hands Astro the source, and a component with no `client:`
123
+ directive renders to static HTML with no runtime shipped.
124
124
 
125
125
  ## Motion (the pillar)
126
126
 
@@ -1,4 +1,2 @@
1
1
  export declare const BADGE_DEFAULT_TONE = "var(--primary)";
2
- /** @deprecated CHIP from lib/pill-classes.ts */
3
- export declare const BADGE_TONE_CLASS = "glass glass-tint inline-flex w-fit shrink-0 select-none items-center gap-1.5 whitespace-nowrap rounded-full px-2.5 py-0.5 font-medium text-xs";
4
2
  export declare const BADGE_NEUTRAL_KNOBS = "[--glass-wash:12%] [--glass-light:0.08]";
@@ -1,5 +1,5 @@
1
1
  import { type Component, type ComponentProps, type ValidComponent } from "solid-js";
2
- type BadgeProps = ComponentProps<"span"> & {
2
+ type BadgeProps = ComponentProps<"span"> & Partial<Pick<ComponentProps<"a">, "href" | "target" | "rel">> & {
3
3
  as?: ValidComponent;
4
4
  /** Any CSS color (semantic token or arbitrary hue). Defaults to var(--primary). */
5
5
  tone?: string;
@@ -1,11 +1,13 @@
1
1
  import { type Component, type ComponentProps, type ValidComponent } from "solid-js";
2
2
  import { type CardPadding } from "../lib/card-classes.js";
3
- type CardProps = ComponentProps<"div"> & {
3
+ type CardProps = ComponentProps<"div"> & Partial<Pick<ComponentProps<"a">, "href" | "target" | "rel">> & Partial<Pick<ComponentProps<"details">, "name" | "open">> & {
4
4
  interactive?: boolean;
5
5
  opaque?: boolean;
6
6
  padding?: CardPadding;
7
7
  as?: ValidComponent;
8
- href?: string;
8
+ type?: "button" | "submit" | "reset";
9
+ /** The corner glyph of a go-somewhere ("arrow") or picked ("check") card. */
10
+ ornament?: "arrow" | "check";
9
11
  };
10
12
  declare const Card: Component<CardProps>;
11
13
  declare const CardHeader: Component<ComponentProps<"div">>;
@@ -0,0 +1,14 @@
1
+ import "iconify-icon";
2
+ import type { IconifyIconProperties } from "iconify-icon";
3
+ import type { JSX } from "solid-js";
4
+ declare module "solid-js" {
5
+ namespace JSX {
6
+ interface IntrinsicElements {
7
+ "iconify-icon": HTMLAttributes<HTMLElement> & IconifyIconProperties & {
8
+ rotate?: string | number;
9
+ };
10
+ }
11
+ }
12
+ }
13
+ export type IconProps = JSX.IntrinsicElements["iconify-icon"];
14
+ export declare function Icon(props: IconProps): JSX.Element;