@glasshome/ui 0.5.3 → 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.
Files changed (78) hide show
  1. package/README.md +59 -25
  2. package/dist/index.d.ts +10 -3
  3. package/dist/index.js +9 -9
  4. package/dist/lib/alert-tones.d.ts +18 -0
  5. package/dist/lib/badge-tone.d.ts +2 -0
  6. package/dist/lib/button-variants.d.ts +65 -20
  7. package/dist/lib/card-classes.d.ts +19 -0
  8. package/dist/lib/glass-tone.d.ts +2 -0
  9. package/dist/lib/input-classes.d.ts +2 -0
  10. package/dist/lib/logo-lockup.d.ts +38 -0
  11. package/dist/lib/overlay-classes.d.ts +2 -0
  12. package/dist/lib/section-tokens.d.ts +4 -0
  13. package/dist/lib/tier-badge.d.ts +13 -0
  14. package/dist/solid/alert-dialog.d.ts +1 -3
  15. package/dist/solid/alert.d.ts +2 -11
  16. package/dist/solid/badge.d.ts +11 -22
  17. package/dist/solid/bottom-sheet/bottom-sheet.d.ts +1 -1
  18. package/dist/solid/bottom-sheet/constants.d.ts +0 -1
  19. package/dist/solid/bottom-sheet/drag-controller.d.ts +1 -1
  20. package/dist/solid/bottom-sheet/index.d.ts +1 -2
  21. package/dist/solid/breadcrumb.d.ts +1 -1
  22. package/dist/solid/button-group.d.ts +29 -11
  23. package/dist/solid/button.d.ts +1 -1
  24. package/dist/solid/card.d.ts +10 -2
  25. package/dist/solid/carousel.d.ts +1 -1
  26. package/dist/solid/charts.d.ts +45 -0
  27. package/dist/solid/count-pill.d.ts +10 -0
  28. package/dist/solid/data-table.d.ts +66 -0
  29. package/dist/solid/dock.d.ts +3 -0
  30. package/dist/solid/empty.d.ts +27 -9
  31. package/dist/solid/entity-data.d.ts +52 -0
  32. package/dist/solid/field.d.ts +31 -10
  33. package/dist/solid/form.d.ts +1 -1
  34. package/dist/solid/index.d.ts +74 -64
  35. package/dist/solid/index.js +11095 -10919
  36. package/dist/solid/input-group.d.ts +67 -19
  37. package/dist/solid/item.d.ts +77 -21
  38. package/dist/solid/logo.d.ts +23 -0
  39. package/dist/solid/number-field.d.ts +3 -0
  40. package/dist/solid/overlay.d.ts +3 -0
  41. package/dist/solid/page-header.d.ts +18 -0
  42. package/dist/solid/popover.d.ts +7 -1
  43. package/dist/solid/scope-indicator.d.ts +8 -0
  44. package/dist/solid/section-card.d.ts +54 -0
  45. package/dist/solid/select.d.ts +1 -18
  46. package/dist/solid/settings-row.d.ts +34 -0
  47. package/dist/solid/sliding-indicator.d.ts +32 -0
  48. package/dist/solid/sonner.d.ts +35 -4
  49. package/dist/solid/spinner.d.ts +2 -1
  50. package/dist/solid/switch.d.ts +1 -1
  51. package/dist/solid/toggle-group.d.ts +1 -1
  52. package/dist/solid/toggle.d.ts +44 -10
  53. package/dist/solid/widget-card.d.ts +29 -0
  54. package/dist/solid/widget-identity.d.ts +47 -0
  55. package/dist/solid/widget-trust-badge.d.ts +16 -0
  56. package/dist/tokens/index.d.ts +3 -3
  57. package/dist/tokens/index.js +11 -11
  58. package/dist/tokens/presets.d.ts +1 -1
  59. package/dist/utils-gbdcvo14.js +1910 -0
  60. package/package.json +38 -17
  61. package/scripts/check-tokens.ts +60 -0
  62. package/scripts/check-ui-drift.mjs +116 -0
  63. package/src/astro/Alert.astro +63 -0
  64. package/src/astro/Badge.astro +16 -0
  65. package/src/astro/Button.astro +43 -0
  66. package/src/astro/Card.astro +39 -0
  67. package/src/astro/Logo.astro +69 -0
  68. package/src/astro/TierBadge.astro +33 -0
  69. package/src/styles/globals.css +157 -0
  70. package/src/styles/theme.css +68 -12
  71. package/dist/solid/calendar.d.ts +0 -17
  72. package/dist/solid/command.d.ts +0 -24
  73. package/dist/solid/drawer.d.ts +0 -22
  74. package/dist/solid/glass-effect.d.ts +0 -6
  75. package/dist/solid/menubar.d.ts +0 -25
  76. package/dist/solid/navigation-menu.d.ts +0 -20
  77. package/dist/solid/sidebar.d.ts +0 -74
  78. package/dist/utils-BRD6YbhO.js +0 -1803
@@ -1,26 +1,74 @@
1
1
  import { type VariantProps } from "cva";
2
2
  import { type Component, type ComponentProps } from "solid-js";
3
- import { Button } from "./button";
3
+ import { Button } from "./button.js";
4
4
  declare const InputGroup: Component<ComponentProps<"div">>;
5
- declare const inputGroupAddonVariants: (props?: ({
6
- align?: "inline-end" | "inline-start" | "block-end" | "block-start" | undefined;
7
- } & ({
8
- class?: import("cva").ClassValue;
9
- className?: never;
10
- } | {
11
- class?: never;
12
- className?: import("cva").ClassValue;
13
- })) | undefined) => string;
5
+ declare const inputGroupAddonVariants: import("cva").CVAComponent<Omit<{
6
+ base: string;
7
+ variants: {
8
+ align: {
9
+ "inline-start": string;
10
+ "inline-end": string;
11
+ "block-start": string;
12
+ "block-end": string;
13
+ };
14
+ };
15
+ defaultVariants: {
16
+ align: "inline-start";
17
+ };
18
+ }, "defaultVariants"> & {
19
+ variants: {
20
+ align: {
21
+ "inline-start": string;
22
+ "inline-end": string;
23
+ "block-start": string;
24
+ "block-end": string;
25
+ };
26
+ };
27
+ defaultVariants: Omit<{}, "align"> & {
28
+ align: "inline-start";
29
+ };
30
+ }, {
31
+ align: {
32
+ "inline-start": string;
33
+ "inline-end": string;
34
+ "block-start": string;
35
+ "block-end": string;
36
+ };
37
+ }>;
14
38
  declare const InputGroupAddon: Component<ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>>;
15
- declare const inputGroupButtonVariants: (props?: ({
16
- size?: "sm" | "xs" | "icon-xs" | "icon-sm" | undefined;
17
- } & ({
18
- class?: import("cva").ClassValue;
19
- className?: never;
20
- } | {
21
- class?: never;
22
- className?: import("cva").ClassValue;
23
- })) | undefined) => string;
39
+ declare const inputGroupButtonVariants: import("cva").CVAComponent<Omit<{
40
+ base: string;
41
+ variants: {
42
+ size: {
43
+ xs: string;
44
+ sm: string;
45
+ "icon-xs": string;
46
+ "icon-sm": string;
47
+ };
48
+ };
49
+ defaultVariants: {
50
+ size: "xs";
51
+ };
52
+ }, "defaultVariants"> & {
53
+ variants: {
54
+ size: {
55
+ xs: string;
56
+ sm: string;
57
+ "icon-xs": string;
58
+ "icon-sm": string;
59
+ };
60
+ };
61
+ defaultVariants: Omit<{}, "size"> & {
62
+ size: "xs";
63
+ };
64
+ }, {
65
+ size: {
66
+ xs: string;
67
+ sm: string;
68
+ "icon-xs": string;
69
+ "icon-sm": string;
70
+ };
71
+ }>;
24
72
  declare const InputGroupButton: Component<Omit<ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>>;
25
73
  declare const InputGroupText: Component<ComponentProps<"span">>;
26
74
  declare const InputGroupInput: Component<ComponentProps<"input">>;
@@ -1,30 +1,86 @@
1
1
  import { type VariantProps } from "cva";
2
2
  import { type Component, type ComponentProps, type ValidComponent } from "solid-js";
3
- import { Separator } from "./separator";
3
+ import { Separator } from "./separator.js";
4
4
  declare const ItemGroup: Component<ComponentProps<"ul">>;
5
5
  declare const ItemSeparator: Component<ComponentProps<typeof Separator>>;
6
- declare const itemVariants: (props?: ({
7
- variant?: "default" | "outline" | "muted" | undefined;
8
- size?: "default" | "sm" | undefined;
9
- } & ({
10
- class?: import("cva").ClassValue;
11
- className?: never;
12
- } | {
13
- class?: never;
14
- className?: import("cva").ClassValue;
15
- })) | undefined) => string;
6
+ declare const itemVariants: import("cva").CVAComponent<Omit<{
7
+ base: string;
8
+ variants: {
9
+ variant: {
10
+ default: string;
11
+ outline: string;
12
+ muted: string;
13
+ };
14
+ size: {
15
+ default: string;
16
+ sm: string;
17
+ };
18
+ };
19
+ defaultVariants: {
20
+ variant: "default";
21
+ size: "default";
22
+ };
23
+ }, "defaultVariants"> & {
24
+ variants: {
25
+ variant: {
26
+ default: string;
27
+ outline: string;
28
+ muted: string;
29
+ };
30
+ size: {
31
+ default: string;
32
+ sm: string;
33
+ };
34
+ };
35
+ defaultVariants: Omit<{}, "variant" | "size"> & {
36
+ variant: "default";
37
+ size: "default";
38
+ };
39
+ }, {
40
+ variant: {
41
+ default: string;
42
+ outline: string;
43
+ muted: string;
44
+ };
45
+ size: {
46
+ default: string;
47
+ sm: string;
48
+ };
49
+ }>;
16
50
  declare const Item: Component<ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
17
- component?: ValidComponent;
51
+ as?: ValidComponent;
52
+ href?: string;
53
+ }>;
54
+ declare const itemMediaVariants: import("cva").CVAComponent<Omit<{
55
+ base: string;
56
+ variants: {
57
+ variant: {
58
+ default: string;
59
+ icon: string;
60
+ image: string;
61
+ };
62
+ };
63
+ defaultVariants: {
64
+ variant: "default";
65
+ };
66
+ }, "defaultVariants"> & {
67
+ variants: {
68
+ variant: {
69
+ default: string;
70
+ icon: string;
71
+ image: string;
72
+ };
73
+ };
74
+ defaultVariants: Omit<{}, "variant"> & {
75
+ variant: "default";
76
+ };
77
+ }, {
78
+ variant: {
79
+ default: string;
80
+ icon: string;
81
+ image: string;
82
+ };
18
83
  }>;
19
- declare const itemMediaVariants: (props?: ({
20
- variant?: "default" | "icon" | "image" | undefined;
21
- } & ({
22
- class?: import("cva").ClassValue;
23
- className?: never;
24
- } | {
25
- class?: never;
26
- className?: import("cva").ClassValue;
27
- })) | undefined) => string;
28
84
  declare const ItemMedia: Component<ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>>;
29
85
  declare const ItemContent: Component<ComponentProps<"div">>;
30
86
  declare const ItemTitle: Component<ComponentProps<"div">>;
@@ -0,0 +1,23 @@
1
+ import { type Component, type ComponentProps, type JSX } from "solid-js";
2
+ import { type LogoSize } from "../lib/logo-lockup.js";
3
+ type LogoProps = Omit<ComponentProps<"div">, "children"> & {
4
+ /** Sub-brand line. Defaults to "Dash". */
5
+ sub?: string;
6
+ size?: LogoSize;
7
+ /** Renders the lockup as a link when set. */
8
+ href?: string;
9
+ /** Override the mark asset. Both apps serve the default path. */
10
+ src?: string;
11
+ /** Extra classes for the mark, e.g. a hover transform. */
12
+ markClass?: string;
13
+ /** Replaces the sub-brand line for surfaces that animate over it. */
14
+ subSlot?: JSX.Element;
15
+ };
16
+ /**
17
+ * The GlassHome lockup: mark + "GlassHome" + the sub-brand line. One ratio
18
+ * everywhere (audit L2) — the sub-line is the dominant element, the wordmark
19
+ * rides above it as a smaller eyebrow, and both scale together via `size`.
20
+ * Never hand-build this stack; the spec lives in lib/logo-lockup.ts.
21
+ */
22
+ declare const Logo: Component<LogoProps>;
23
+ export { Logo };
@@ -0,0 +1,3 @@
1
+ import { type Component, type ComponentProps } from "solid-js";
2
+ declare const NumberField: Component<Omit<ComponentProps<"input">, "type">>;
3
+ export { NumberField };
@@ -0,0 +1,3 @@
1
+ import { type Component, type ComponentProps } from "solid-js";
2
+ declare const Overlay: Component<ComponentProps<"div">>;
3
+ export { Overlay };
@@ -0,0 +1,18 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { GlassSurface } from "./section-card.js";
3
+ export declare function PageHeader(props: {
4
+ /** Iconify icon name for the banner glyph. */
5
+ icon?: string;
6
+ /** Custom glyph, overrides `icon`. */
7
+ iconNode?: JSX.Element;
8
+ title: JSX.Element;
9
+ subtitle?: JSX.Element;
10
+ /** Small count pill next to the title. Rendered only when not null/undefined. */
11
+ count?: number | string;
12
+ /** Right-side actions. */
13
+ actions?: JSX.Element;
14
+ /** Watermark image src (e.g. the app logo). Omit for no watermark. */
15
+ logo?: string;
16
+ /** Performant-blur injection (dash). Omit for a normal frosted banner. */
17
+ glass?: GlassSurface;
18
+ }): JSX.Element;
@@ -13,4 +13,10 @@ declare const Popover: typeof import("@kobalte/core/popover").Root & {
13
13
  declare const PopoverTrigger: Component<ComponentProps<typeof PopoverPrimitive.Trigger>>;
14
14
  declare const PopoverContent: Component<ComponentProps<typeof PopoverPrimitive.Content>>;
15
15
  declare const PopoverAnchor: Component<ComponentProps<typeof PopoverPrimitive.Anchor>>;
16
- export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
16
+ declare const anchorToTriggerTop: (anchor?: HTMLElement) => {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ };
22
+ export { anchorToTriggerTop, Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Scope pill: `@scope (personal|org)`. The publisher-scope marker shared across
3
+ * widget cards and detail surfaces in both apps.
4
+ */
5
+ export declare function ScopeIndicator(props: {
6
+ scope: string;
7
+ type: "personal" | "organization";
8
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,54 @@
1
+ import { type ComponentProps, type JSX } from "solid-js";
2
+ export type GlassSurface = {
3
+ ref?: (el: HTMLElement) => void;
4
+ style?: () => JSX.CSSProperties;
5
+ active?: () => boolean;
6
+ };
7
+ type SectionCardProps = {
8
+ icon?: string;
9
+ title?: JSX.Element;
10
+ subtitle?: JSX.Element;
11
+ count?: number | string;
12
+ action?: JSX.Element;
13
+ toolbar?: JSX.Element;
14
+ headerClass?: string;
15
+ glass?: GlassSurface;
16
+ children: JSX.Element;
17
+ };
18
+ export declare function SectionCard(props: SectionCardProps): JSX.Element;
19
+ export declare function SectionRow(props: ComponentProps<"div">): JSX.Element;
20
+ type SectionIconSize = "sm" | "md" | "lg";
21
+ declare const ICON_TONES: {
22
+ readonly neutral: "bg-foreground/10 text-foreground/80";
23
+ readonly primary: "bg-primary/10 text-primary";
24
+ };
25
+ export declare function SectionIcon(props: {
26
+ icon?: string;
27
+ children?: JSX.Element;
28
+ size?: SectionIconSize;
29
+ tone?: keyof typeof ICON_TONES;
30
+ class?: string;
31
+ }): JSX.Element;
32
+ export declare function SectionTitle(props: {
33
+ children: JSX.Element;
34
+ class?: string;
35
+ }): JSX.Element;
36
+ export declare function SectionSubtitle(props: {
37
+ children: JSX.Element;
38
+ class?: string;
39
+ }): JSX.Element;
40
+ export declare function SectionLabel(props: {
41
+ children: JSX.Element;
42
+ class?: string;
43
+ }): JSX.Element;
44
+ export declare function SectionMeta(props: {
45
+ children: JSX.Element;
46
+ class?: string;
47
+ }): JSX.Element;
48
+ export declare function SectionRowSkeleton(props: {
49
+ class?: string;
50
+ }): JSX.Element;
51
+ export declare function SectionRowSkeletons(props: {
52
+ count?: number;
53
+ }): JSX.Element;
54
+ export {};
@@ -1,23 +1,6 @@
1
1
  import { Select as SelectPrimitive } from "@kobalte/core/select";
2
2
  import { type Component, type ComponentProps, type ParentComponent } from "solid-js";
3
- declare const Select: typeof import("@kobalte/core/select").Root & {
4
- Arrow: typeof import("@kobalte/core/popover").Arrow;
5
- Content: typeof import("@kobalte/core/select").Content;
6
- Description: typeof import("@kobalte/core/color-slider").Description;
7
- ErrorMessage: typeof import("@kobalte/core/color-slider").ErrorMessage;
8
- HiddenSelect: typeof import("@kobalte/core/select").HiddenSelect;
9
- Icon: typeof import("@kobalte/core/select").Icon;
10
- Item: typeof import("@kobalte/core/select").Item;
11
- ItemDescription: typeof import("@kobalte/core/select").ItemDescription;
12
- ItemIndicator: typeof import("@kobalte/core/select").ItemIndicator;
13
- ItemLabel: typeof import("@kobalte/core/select").ItemLabel;
14
- Label: typeof import("@kobalte/core/select").Label;
15
- Listbox: typeof import("@kobalte/core/select").Listbox;
16
- Portal: typeof import("@kobalte/core/select").Portal;
17
- Section: typeof import("@kobalte/core/select").Section;
18
- Trigger: typeof import("@kobalte/core/select").Trigger;
19
- Value: typeof import("@kobalte/core/select").Value;
20
- };
3
+ declare const Select: typeof SelectPrimitive;
21
4
  declare const SelectValue: typeof import("@kobalte/core/select").Value;
22
5
  declare const SelectTrigger: ParentComponent<ComponentProps<typeof SelectPrimitive.Trigger> & {
23
6
  size?: "sm" | "default";
@@ -0,0 +1,34 @@
1
+ import { type JSX } from "solid-js";
2
+ /**
3
+ * Generic settings/list row primitives, shared by dash settings and any list UI.
4
+ * Presentational only — no app data or routing. (dash's LabeledIconPicker stays
5
+ * local since it depends on the dash IconPicker.)
6
+ */
7
+ export declare function SectionAddButton(props: {
8
+ onClick: () => void;
9
+ }): JSX.Element;
10
+ export declare function SectionEmpty(props: {
11
+ children: JSX.Element;
12
+ }): JSX.Element;
13
+ export declare function RowActions(props: {
14
+ onEdit: () => void;
15
+ onDelete: () => void;
16
+ deleteDisabled?: boolean;
17
+ deleteTitle?: string;
18
+ showDelete?: boolean;
19
+ }): JSX.Element;
20
+ export declare function LabeledField(props: {
21
+ label: string;
22
+ children: JSX.Element;
23
+ }): JSX.Element;
24
+ export declare function LabeledInput(props: {
25
+ label: string;
26
+ value: string;
27
+ onInput: (value: string) => void;
28
+ placeholder?: string;
29
+ }): JSX.Element;
30
+ export declare function SwitchRow(props: {
31
+ label: string;
32
+ checked: boolean;
33
+ onChange: (value: boolean) => void;
34
+ }): JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { type ComponentProps, type JSX } from "solid-js";
2
+ /**
3
+ * The sliding "moving background": a tinted indicator that measures the active item
4
+ * among its children and animates its position/size behind it. Reusable across
5
+ * any component with a selected item among siblings (Dock, Tabs, ToggleGroup,
6
+ * segmented controls…). Presentational + controlled — pass the active index.
7
+ *
8
+ * Wrap the items directly; by default it measures each direct child (excluding
9
+ * its own indicator). Give it `indicatorClass` for the look and `orientation` for the axis.
10
+ */
11
+ interface SlidingIndicatorProps extends ComponentProps<"div"> {
12
+ /** Index-based active item among the measured children, or null to hide.
13
+ * Use this when you own the selection (e.g. Dock). */
14
+ active?: number | null;
15
+ /** Attribute-based active item: a selector for the currently-active child
16
+ * (e.g. "[data-selected]"). Use this with libraries that mark the active item
17
+ * in the DOM (Kobalte Tabs/ToggleGroup); a MutationObserver re-slides on change. */
18
+ activeSelector?: string;
19
+ orientation?: "horizontal" | "vertical";
20
+ /** Extra classes for the sliding indicator — radius and any per-surface `--glass-*`
21
+ * knob overrides. The trusted `.glass` material is ALWAYS applied underneath, so
22
+ * this can't flatten the indicator; it only tunes it. Default radius: `rounded-lg`. */
23
+ indicatorClass?: string;
24
+ /** Glass tone that drives the `.glass` material (`--glass-tone`). Defaults to
25
+ * `var(--primary)` — the one trusted look. Pass another CSS color to re-tint. */
26
+ indicatorTone?: string;
27
+ /** Selector for the measurable items. Default: direct children (minus the indicator). */
28
+ itemSelector?: string;
29
+ children: JSX.Element;
30
+ }
31
+ export declare function SlidingIndicator(props: SlidingIndicatorProps): JSX.Element;
32
+ export {};
@@ -1,5 +1,36 @@
1
- import { type Component, type ComponentProps } from "solid-js";
2
- import { Toaster as SolidSonner } from "solid-sonner";
1
+ import { type Component, type ComponentProps, type JSX } from "solid-js";
2
+ import { type ExternalToast, Toaster as SolidSonner } from "solid-sonner";
3
+ type ToastMessage = JSX.Element | string;
4
+ type ToastKind = "success" | "error" | "warning" | "info" | "loading" | "message";
5
+ type GlassToastProps = {
6
+ kind: ToastKind;
7
+ title: ToastMessage;
8
+ description?: ToastMessage;
9
+ icon?: JSX.Element;
10
+ action?: JSX.Element;
11
+ };
12
+ declare const GlassToast: Component<GlassToastProps>;
13
+ type PromiseData<T> = Omit<ExternalToast, "description"> & {
14
+ loading?: ToastMessage;
15
+ success?: ToastMessage | ((data: T) => ToastMessage);
16
+ error?: ToastMessage | ((err: unknown) => ToastMessage);
17
+ finally?: () => void | Promise<void>;
18
+ };
19
+ declare function glassPromise<T>(promise: Promise<T> | (() => Promise<T>), data?: PromiseData<T>): {
20
+ unwrap: () => Promise<T>;
21
+ };
22
+ declare const toast: ((message: ToastMessage, data?: ExternalToast) => string | number) & {
23
+ success: (message: ToastMessage, data?: ExternalToast) => string | number;
24
+ error: (message: ToastMessage, data?: ExternalToast) => string | number;
25
+ warning: (message: ToastMessage, data?: ExternalToast) => string | number;
26
+ info: (message: ToastMessage, data?: ExternalToast) => string | number;
27
+ message: (message: ToastMessage, data?: ExternalToast) => string | number;
28
+ loading: (message: ToastMessage, data?: ExternalToast) => string | number;
29
+ custom: (jsx: (id: number | string) => JSX.Element, data?: ExternalToast) => string | number;
30
+ dismiss: (id?: number | string) => string | number | undefined;
31
+ promise: typeof glassPromise;
32
+ getHistory: () => (import("solid-sonner").ToastT | import("solid-sonner").ToastToDismiss)[];
33
+ getToasts: () => import("solid-sonner").ToastT[];
34
+ };
3
35
  declare const Toaster: Component<ComponentProps<typeof SolidSonner>>;
4
- export { toast } from "solid-sonner";
5
- export { Toaster };
36
+ export { GlassToast, Toaster, toast };
@@ -1,3 +1,4 @@
1
+ import { Icon } from "@iconify-icon/solid";
1
2
  import { type Component, type ComponentProps } from "solid-js";
2
- declare const Spinner: Component<ComponentProps<"svg">>;
3
+ declare const Spinner: Component<Omit<ComponentProps<typeof Icon>, "icon">>;
3
4
  export { Spinner };
@@ -1,5 +1,5 @@
1
1
  import { type Component } from "solid-js";
2
- export interface SwitchProps {
2
+ interface SwitchProps {
3
3
  checked?: boolean;
4
4
  defaultChecked?: boolean;
5
5
  onChange?: (checked: boolean) => void;
@@ -1,7 +1,7 @@
1
1
  import { ToggleGroup as ToggleGroupPrimitive } from "@kobalte/core/toggle-group";
2
2
  import type { VariantProps } from "cva";
3
3
  import { type Component, type ComponentProps, type ParentComponent } from "solid-js";
4
- import { toggleVariants } from "./toggle";
4
+ import { toggleVariants } from "./toggle.js";
5
5
  declare const ToggleGroup: ParentComponent<ComponentProps<typeof ToggleGroupPrimitive> & VariantProps<typeof toggleVariants>>;
6
6
  declare const ToggleGroupItem: Component<ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>>;
7
7
  export { ToggleGroup, ToggleGroupItem };
@@ -1,15 +1,49 @@
1
1
  import { ToggleButton as ToggleButtonPrimitive } from "@kobalte/core/toggle-button";
2
2
  import { type VariantProps } from "cva";
3
3
  import { type Component, type ComponentProps } from "solid-js";
4
- declare const toggleVariants: (props?: ({
5
- variant?: "default" | "outline" | undefined;
6
- size?: "default" | "sm" | "lg" | undefined;
7
- } & ({
8
- class?: import("cva").ClassValue;
9
- className?: never;
10
- } | {
11
- class?: never;
12
- className?: import("cva").ClassValue;
13
- })) | undefined) => string;
4
+ declare const toggleVariants: import("cva").CVAComponent<Omit<{
5
+ base: string;
6
+ variants: {
7
+ variant: {
8
+ default: string;
9
+ outline: string;
10
+ };
11
+ size: {
12
+ default: string;
13
+ sm: string;
14
+ lg: string;
15
+ };
16
+ };
17
+ defaultVariants: {
18
+ variant: "default";
19
+ size: "default";
20
+ };
21
+ }, "defaultVariants"> & {
22
+ variants: {
23
+ variant: {
24
+ default: string;
25
+ outline: string;
26
+ };
27
+ size: {
28
+ default: string;
29
+ sm: string;
30
+ lg: string;
31
+ };
32
+ };
33
+ defaultVariants: Omit<{}, "variant" | "size"> & {
34
+ variant: "default";
35
+ size: "default";
36
+ };
37
+ }, {
38
+ variant: {
39
+ default: string;
40
+ outline: string;
41
+ };
42
+ size: {
43
+ default: string;
44
+ sm: string;
45
+ lg: string;
46
+ };
47
+ }>;
14
48
  declare const Toggle: Component<ComponentProps<typeof ToggleButtonPrimitive> & VariantProps<typeof toggleVariants>>;
15
49
  export { Toggle, toggleVariants };
@@ -0,0 +1,29 @@
1
+ import { type JSX } from "solid-js";
2
+ import { type WidgetSummary } from "./widget-identity.js";
3
+ /**
4
+ * The registry widget card: `row` for dense lists, `tile` for grids/galleries.
5
+ * Both are a <Card> + the WidgetIdentity/WidgetMeta nucleus. Shared by every
6
+ * widget surface (registry gallery, dashboard browse, admin tables) across
7
+ * apps; the data model is `WidgetSummary`.
8
+ */
9
+ type WidgetCardProps = {
10
+ widget: WidgetSummary;
11
+ /** `row` for dense lists, `tile` for grids/galleries. Default `row`. */
12
+ layout?: "row" | "tile";
13
+ /** When set, the whole card becomes a link. */
14
+ href?: string;
15
+ /** Click handler (used when no href). */
16
+ onClick?: (e: MouseEvent) => void;
17
+ /** Show the (personal/org) scope pill. Default false. */
18
+ showScopeIndicator?: boolean;
19
+ /** Show the version-count meta. Default false. */
20
+ showVersions?: boolean;
21
+ /** Show the description (tile only). Default true for tiles. */
22
+ showDescription?: boolean;
23
+ /** Custom trailing element for the row layout. Defaults to a chevron when
24
+ * the card is interactive (href/onClick), otherwise nothing. */
25
+ trailing?: JSX.Element;
26
+ class?: string;
27
+ };
28
+ export declare function WidgetCard(_props: WidgetCardProps): JSX.Element;
29
+ export {};
@@ -0,0 +1,47 @@
1
+ import { type JSX } from "solid-js";
2
+ /**
3
+ * The reusable nucleus for rendering one widget/package: icon pill + name (with
4
+ * official/unlisted markers + inline version) + the @scope/name line, plus the
5
+ * download/version meta cluster. Shared by every widget surface (registry
6
+ * gallery, dashboard browse, admin tables). App-specific cards (hub's row/tile
7
+ * registry card, dash's interactive picker) compose this; the data model is
8
+ * `WidgetSummary`.
9
+ */
10
+ export interface WidgetSummary {
11
+ scope: string;
12
+ name: string;
13
+ displayName?: string | null;
14
+ icon?: string | null;
15
+ description?: string | null;
16
+ isOfficial?: boolean;
17
+ isUnlisted?: boolean;
18
+ downloadCount?: number;
19
+ latestVersion?: string | null;
20
+ versionCount?: number;
21
+ ownerType?: "personal" | "organization";
22
+ }
23
+ /** Canonical public detail URL for a widget (`/widgets/@scope/name`). */
24
+ export declare function widgetHref(w: {
25
+ scope: string;
26
+ name: string;
27
+ }): string;
28
+ /** Compact download/count formatting, shared by every surface. */
29
+ export declare function formatWidgetCount(n: number | null | undefined): string;
30
+ type WidgetIdentityProps = {
31
+ widget: WidgetSummary;
32
+ /** Icon pill size. Rows use sm, tiles use md. */
33
+ iconSize?: "sm" | "md";
34
+ /** Append `v{latestVersion}` next to the name. Default true. */
35
+ showVersionInline?: boolean;
36
+ /** Show the (personal/org) scope pill after the @scope/name line. */
37
+ showScopeIndicator?: boolean;
38
+ class?: string;
39
+ };
40
+ export declare function WidgetIdentity(_props: WidgetIdentityProps): JSX.Element;
41
+ /** Downloads (+ optional version count) meta cluster. */
42
+ export declare function WidgetMeta(props: {
43
+ widget: WidgetSummary;
44
+ showVersions?: boolean;
45
+ class?: string;
46
+ }): JSX.Element;
47
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Official / Community trust marker, single source for every widget surface
3
+ * (browser card, picker card, detail dialog) in both apps. Was drifted: hub used
4
+ * `lucide:badge-check`, dash used `mdi:check-decagram`; unified on the decagram,
5
+ * inlined as SVG so it needs no iconify collection registered by the consumer
6
+ * (hub has no `mdi` collection). The `title` is hover-only and ignored by screen
7
+ * readers, so the sr-only span carries the verbal label alongside the glyph.
8
+ *
9
+ * Both states are glyph-only: official is the decagram check (primary),
10
+ * community is the account-group people icon (muted). Community was a full
11
+ * `Badge` word before, but the label ate horizontal space next to the widget
12
+ * name, so it now matches the official marker's compact icon form.
13
+ */
14
+ export declare function WidgetTrustBadge(props: {
15
+ isOfficial: boolean;
16
+ }): import("solid-js").JSX.Element;
@@ -2,6 +2,6 @@
2
2
  * Design tokens as data, framework-free. Must stay in sync with
3
3
  * styles/theme.css (presets.ts is the machine-readable form of that palette).
4
4
  */
5
- export * from "./hex";
6
- export * from "./presets";
7
- export * from "./theme-colors";
5
+ export * from "./hex.js";
6
+ export * from "./presets.js";
7
+ export * from "./theme-colors.js";