@hanzo/ui 8.0.11 → 8.0.13

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 (169) hide show
  1. package/dist/backends/gui/index.d.ts +2 -0
  2. package/dist/backends/shadcn/aspect-ratio.d.ts +4 -0
  3. package/dist/backends/shadcn/avatar.d.ts +6 -0
  4. package/dist/backends/shadcn/badge.d.ts +9 -0
  5. package/dist/backends/shadcn/button.d.ts +19 -0
  6. package/dist/backends/shadcn/card.d.ts +9 -0
  7. package/dist/backends/shadcn/checkbox.d.ts +9 -0
  8. package/dist/backends/shadcn/collapsible.d.ts +5 -0
  9. package/dist/backends/shadcn/command.d.ts +80 -0
  10. package/dist/backends/shadcn/dialog.d.ts +15 -0
  11. package/dist/backends/shadcn/dropdown-menu.d.ts +34 -0
  12. package/dist/backends/shadcn/index.d.ts +23 -0
  13. package/dist/backends/shadcn/input.d.ts +11 -0
  14. package/dist/backends/shadcn/label.d.ts +4 -0
  15. package/dist/backends/shadcn/popover.d.ts +7 -0
  16. package/dist/backends/shadcn/progress.d.ts +4 -0
  17. package/dist/backends/shadcn/scroll-area.d.ts +5 -0
  18. package/dist/backends/shadcn/select.d.ts +13 -0
  19. package/dist/backends/shadcn/separator.d.ts +4 -0
  20. package/dist/backends/shadcn/slider.d.ts +4 -0
  21. package/dist/backends/shadcn/switch.d.ts +4 -0
  22. package/dist/backends/shadcn/tabs.d.ts +7 -0
  23. package/dist/backends/shadcn/textarea.d.ts +4 -0
  24. package/dist/backends/shadcn/toaster.d.ts +10 -0
  25. package/dist/backends/shadcn/tooltip.d.ts +7 -0
  26. package/dist/backends/shadcn/utils.d.ts +8 -0
  27. package/dist/components.d.ts +1 -0
  28. package/dist/core/cn.d.ts +11 -0
  29. package/dist/core/fonts.d.ts +26 -0
  30. package/dist/core/index.d.ts +3 -0
  31. package/dist/core/tokens.d.ts +16 -0
  32. package/dist/gitops.cjs +3 -3
  33. package/dist/gitops.d.ts +1 -1
  34. package/dist/gitops.js +1 -1
  35. package/dist/index.cjs +1138 -291
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.ts +2 -2
  38. package/dist/index.js +1017 -3
  39. package/dist/index.js.map +1 -1
  40. package/dist/models/ModelSelector.d.ts +23 -0
  41. package/dist/models/catalog.d.ts +53 -0
  42. package/dist/models/index.d.ts +5 -0
  43. package/dist/models/types.d.ts +39 -0
  44. package/dist/primitives/AspectRatio.d.ts +1 -0
  45. package/dist/primitives/Avatar.d.ts +1 -0
  46. package/dist/primitives/AvatarFallback.d.ts +1 -0
  47. package/dist/primitives/AvatarImage.d.ts +1 -0
  48. package/dist/primitives/Badge.d.ts +1 -0
  49. package/dist/primitives/Button.d.ts +1 -0
  50. package/dist/primitives/Card.d.ts +1 -0
  51. package/dist/primitives/CardAction.d.ts +1 -0
  52. package/dist/primitives/CardContent.d.ts +1 -0
  53. package/dist/primitives/CardDescription.d.ts +1 -0
  54. package/dist/primitives/CardFooter.d.ts +1 -0
  55. package/dist/primitives/CardHeader.d.ts +1 -0
  56. package/dist/primitives/CardTitle.d.ts +1 -0
  57. package/dist/primitives/Checkbox.d.ts +1 -0
  58. package/dist/primitives/Collapsible.d.ts +1 -0
  59. package/dist/primitives/CollapsibleContent.d.ts +1 -0
  60. package/dist/primitives/CollapsibleTrigger.d.ts +1 -0
  61. package/dist/primitives/Command.d.ts +1 -0
  62. package/dist/primitives/CommandDialog.d.ts +1 -0
  63. package/dist/primitives/CommandEmpty.d.ts +1 -0
  64. package/dist/primitives/CommandGroup.d.ts +1 -0
  65. package/dist/primitives/CommandInput.d.ts +1 -0
  66. package/dist/primitives/CommandItem.d.ts +1 -0
  67. package/dist/primitives/CommandList.d.ts +1 -0
  68. package/dist/primitives/CommandSeparator.d.ts +1 -0
  69. package/dist/primitives/CommandShortcut.d.ts +1 -0
  70. package/dist/primitives/Dialog.d.ts +1 -0
  71. package/dist/primitives/DialogClose.d.ts +1 -0
  72. package/dist/primitives/DialogContent.d.ts +1 -0
  73. package/dist/primitives/DialogDescription.d.ts +1 -0
  74. package/dist/primitives/DialogFooter.d.ts +1 -0
  75. package/dist/primitives/DialogHeader.d.ts +1 -0
  76. package/dist/primitives/DialogOverlay.d.ts +1 -0
  77. package/dist/primitives/DialogPortal.d.ts +1 -0
  78. package/dist/primitives/DialogTitle.d.ts +1 -0
  79. package/dist/primitives/DialogTrigger.d.ts +1 -0
  80. package/dist/primitives/DropdownMenu.d.ts +1 -0
  81. package/dist/primitives/DropdownMenuCheckboxItem.d.ts +1 -0
  82. package/dist/primitives/DropdownMenuContent.d.ts +1 -0
  83. package/dist/primitives/DropdownMenuGroup.d.ts +1 -0
  84. package/dist/primitives/DropdownMenuItem.d.ts +1 -0
  85. package/dist/primitives/DropdownMenuLabel.d.ts +1 -0
  86. package/dist/primitives/DropdownMenuPortal.d.ts +1 -0
  87. package/dist/primitives/DropdownMenuRadioGroup.d.ts +1 -0
  88. package/dist/primitives/DropdownMenuRadioItem.d.ts +1 -0
  89. package/dist/primitives/DropdownMenuSeparator.d.ts +1 -0
  90. package/dist/primitives/DropdownMenuShortcut.d.ts +1 -0
  91. package/dist/primitives/DropdownMenuSub.d.ts +1 -0
  92. package/dist/primitives/DropdownMenuSubContent.d.ts +1 -0
  93. package/dist/primitives/DropdownMenuSubTrigger.d.ts +1 -0
  94. package/dist/primitives/DropdownMenuTrigger.d.ts +1 -0
  95. package/dist/primitives/Input.d.ts +1 -0
  96. package/dist/primitives/Label.d.ts +1 -0
  97. package/dist/primitives/Popover.d.ts +1 -0
  98. package/dist/primitives/PopoverAnchor.d.ts +1 -0
  99. package/dist/primitives/PopoverContent.d.ts +1 -0
  100. package/dist/primitives/PopoverTrigger.d.ts +1 -0
  101. package/dist/primitives/Progress.d.ts +1 -0
  102. package/dist/primitives/ScrollArea.d.ts +1 -0
  103. package/dist/primitives/ScrollBar.d.ts +1 -0
  104. package/dist/primitives/Select.d.ts +1 -0
  105. package/dist/primitives/SelectContent.d.ts +1 -0
  106. package/dist/primitives/SelectGroup.d.ts +1 -0
  107. package/dist/primitives/SelectItem.d.ts +1 -0
  108. package/dist/primitives/SelectLabel.d.ts +1 -0
  109. package/dist/primitives/SelectScrollDownButton.d.ts +1 -0
  110. package/dist/primitives/SelectScrollUpButton.d.ts +1 -0
  111. package/dist/primitives/SelectSeparator.d.ts +1 -0
  112. package/dist/primitives/SelectTrigger.d.ts +1 -0
  113. package/dist/primitives/SelectValue.d.ts +1 -0
  114. package/dist/primitives/Separator.d.ts +1 -0
  115. package/dist/primitives/Slider.d.ts +1 -0
  116. package/dist/primitives/Switch.d.ts +1 -0
  117. package/dist/primitives/Tabs.d.ts +1 -0
  118. package/dist/primitives/TabsContent.d.ts +1 -0
  119. package/dist/primitives/TabsList.d.ts +1 -0
  120. package/dist/primitives/TabsTrigger.d.ts +1 -0
  121. package/dist/primitives/Textarea.d.ts +1 -0
  122. package/dist/primitives/Toaster.d.ts +1 -0
  123. package/dist/primitives/Tooltip.d.ts +1 -0
  124. package/dist/primitives/TooltipContent.d.ts +1 -0
  125. package/dist/primitives/TooltipProvider.d.ts +1 -0
  126. package/dist/primitives/TooltipTrigger.d.ts +1 -0
  127. package/dist/primitives/badgeVariants.d.ts +1 -0
  128. package/dist/primitives/buttonVariants.d.ts +1 -0
  129. package/dist/primitives/index.d.ts +1 -0
  130. package/dist/primitives/toast.d.ts +1 -0
  131. package/dist/product/AnimatedLogo.d.ts +47 -0
  132. package/dist/product/BackendState.d.ts +42 -0
  133. package/dist/product/Charts.d.ts +4 -0
  134. package/dist/product/CommerceResource.d.ts +32 -0
  135. package/dist/product/ConfirmDelete.d.ts +8 -0
  136. package/dist/product/DataTable.d.ts +30 -2
  137. package/dist/product/Field.d.ts +7 -2
  138. package/dist/product/Filters.d.ts +29 -0
  139. package/dist/product/PrimaryButton.d.ts +5 -0
  140. package/dist/product/SiteFooter.d.ts +28 -0
  141. package/dist/product/SiteNav.d.ts +60 -0
  142. package/dist/product/accent.d.ts +33 -0
  143. package/dist/product/animatedLogo.logic.d.ts +52 -0
  144. package/dist/product/brand.d.ts +45 -0
  145. package/dist/product/host.d.ts +21 -0
  146. package/dist/product/index.cjs +3516 -265
  147. package/dist/product/index.cjs.map +1 -1
  148. package/dist/product/index.d.ts +11 -0
  149. package/dist/product/index.js +3402 -1
  150. package/dist/product/index.js.map +1 -1
  151. package/dist/product/social/CampaignCard.d.ts +13 -0
  152. package/dist/product/social/ChannelBadge.d.ts +14 -0
  153. package/dist/product/social/PostAgenda.d.ts +5 -0
  154. package/dist/product/social/PostCard.d.ts +6 -0
  155. package/dist/product/social/PostComposer.d.ts +24 -0
  156. package/dist/product/social/ProviderReadinessList.d.ts +4 -0
  157. package/dist/product/social/SocialResource.d.ts +7 -0
  158. package/dist/product/social/SocialSummaryBar.d.ts +4 -0
  159. package/dist/product/social/ViewToggle.d.ts +5 -0
  160. package/dist/product/social/api.d.ts +128 -0
  161. package/dist/product/social/format.d.ts +16 -0
  162. package/dist/product/social/index.d.ts +11 -0
  163. package/dist/product/surfaces.data.d.ts +1 -0
  164. package/dist/styles/hanzo-motion.css +52 -0
  165. package/package.json +90 -15
  166. package/dist/chunk-M2ILMK44.cjs +0 -2104
  167. package/dist/chunk-M2ILMK44.cjs.map +0 -1
  168. package/dist/chunk-YSURJUOA.js +0 -2035
  169. package/dist/chunk-YSURJUOA.js.map +0 -1
@@ -0,0 +1,13 @@
1
+ export type Campaign = {
2
+ id: string;
3
+ name: string;
4
+ channel: string;
5
+ status: string;
6
+ objective?: string;
7
+ /** minor units (cents) */
8
+ budget: number;
9
+ spend: number;
10
+ };
11
+ export declare function CampaignCard({ campaign }: {
12
+ campaign: Campaign;
13
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import type { Provider } from './api';
2
+ /** The network vocabulary is the backend's ONE ordered list (./api PROVIDERS). */
3
+ export type Channel = Provider;
4
+ /**
5
+ * A known network, or whatever string the server sent. The badge renders unknown
6
+ * values through the `x` fallback below, so the type says what it really accepts —
7
+ * callers keep autocomplete without having to narrow a `string` field first.
8
+ */
9
+ export type ChannelLike = Channel | (string & {});
10
+ export declare function ChannelBadge({ channel, showLabel, size, }: {
11
+ channel: ChannelLike;
12
+ showLabel?: boolean;
13
+ size?: number;
14
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { Post } from './api';
2
+ export declare function PostAgenda({ posts, onOpen }: {
3
+ posts: Post[];
4
+ onOpen: (p: Post) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { Post } from './api';
2
+ export declare function PostCard({ post, onEdit, onDelete, }: {
3
+ post: Post;
4
+ onEdit?: (p: Post) => void;
5
+ onDelete?: (p: Post) => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import type { ProviderCapability } from './api';
2
+ /** Compose intents → the (status, scheduleAt) the backend stores. */
3
+ export declare const COMPOSE_MODES: readonly ["draft", "schedule", "now"];
4
+ export type ComposeMode = (typeof COMPOSE_MODES)[number];
5
+ /** The writable fields of a new post — what the intent above encodes. */
6
+ export type PostDraft = {
7
+ content: string;
8
+ channel: string;
9
+ status: string;
10
+ /** unix seconds; 0 = not scheduled / publish now */
11
+ scheduleAt: number;
12
+ };
13
+ export declare function PostComposer({ channels, providers, onSubmit, }: {
14
+ /** The networks offered, in order; the first is the default. */
15
+ channels: string[];
16
+ /** Live publish-readiness, used to warn before a publish that cannot succeed. */
17
+ providers: ProviderCapability[];
18
+ /**
19
+ * Persist the draft. Resolve `null` when it landed — the host then swaps this
20
+ * panel out — or a message to surface, which keeps the panel open and editable.
21
+ * Total by contract: the host classifies its own failures rather than throwing.
22
+ */
23
+ onSubmit: (draft: PostDraft, mode: ComposeMode) => Promise<string | null>;
24
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { ProviderCapability } from './api';
2
+ export declare function ProviderReadinessList({ providers }: {
3
+ providers: ProviderCapability[];
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { type SocialApi } from './api';
2
+ export declare function SocialResource({ api, title, subtitle, }: {
3
+ /** The bound `/v1/social` client — `createSocialApi(<host transport>)`. */
4
+ api: SocialApi;
5
+ title?: string;
6
+ subtitle?: string;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { SocialSummary } from './api';
2
+ export declare function SocialSummaryBar({ summary }: {
3
+ summary: SocialSummary;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export type PostView = 'list' | 'calendar';
2
+ export declare function ViewToggle({ view, onChange, }: {
3
+ view: PostView;
4
+ onChange: (v: PostView) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,128 @@
1
+ /**
2
+ * The `/v1/social` contract — the ONE typed client for the Hanzo Social surface,
3
+ * shared by every host that renders it (the console's Publish product, the dedicated
4
+ * social.hanzo.ai app, any white-label admin).
5
+ *
6
+ * The backend is `hanzoai/cloud` `clients/social`: a native-Go per-org accounts+posts
7
+ * store on Base/SQLite (the in-process fold of the standalone social stack, twin of
8
+ * clients/crm) — NOT a proxy to the retired social pods. Routes (social.go):
9
+ *
10
+ * GET /v1/social/summary per-org roll-up
11
+ * GET /v1/social/providers publish-readiness per network
12
+ * GET/POST /v1/social/accounts list (?provider=) / connect
13
+ * GET/PUT/DELETE /v1/social/accounts/:id detail / update / disconnect
14
+ * GET/POST /v1/social/posts list (?status=) / create-or-schedule
15
+ * GET/PUT/DELETE /v1/social/posts/:id detail / update / delete
16
+ * POST /v1/social/posts/:id/publish publish now
17
+ *
18
+ * TRANSPORT IS INJECTED. This layer never picks an origin, a credential or a fetch
19
+ * wrapper — the host passes a `SocialRest` whose paths are relative to `/v1/social`
20
+ * (`'summary'`, `'posts/<id>/publish'`), so the console rides its session-cookie
21
+ * `originV1Url` and another app rides its own. Every read/write is org-scoped
22
+ * SERVER-SIDE from the validated bearer/session owner claim; no org ever travels
23
+ * from the browser.
24
+ *
25
+ * Payloads are normalized DEFENSIVELY: a field rename upstream degrades a cell
26
+ * rather than throwing, and a list is read from whichever envelope key the backend
27
+ * uses (`data`/`items`/`rows`, or a bare array).
28
+ */
29
+ /** Networks — the ONE ordered vocabulary (cloud rejects an unknown provider; '' → x). */
30
+ export declare const PROVIDERS: readonly ["x", "facebook", "instagram", "linkedin", "tiktok", "youtube", "threads"];
31
+ export type Provider = (typeof PROVIDERS)[number];
32
+ /** Account connection lifecycle (cloud rejects an unknown status; '' → connected). */
33
+ export declare const ACCOUNT_STATUSES: readonly ["connected", "disconnected", "error"];
34
+ /** Post lifecycle (cloud rejects an unknown status; '' → draft). */
35
+ export declare const POST_STATUSES: readonly ["draft", "scheduled", "published", "failed"];
36
+ export type Account = {
37
+ id: string;
38
+ provider: string;
39
+ handle: string;
40
+ status: string;
41
+ createdAt: number;
42
+ updatedAt: number;
43
+ };
44
+ export type Post = {
45
+ id: string;
46
+ content: string;
47
+ channel: string;
48
+ status: string;
49
+ /** Unix seconds; 0 = not scheduled / publish now. */
50
+ scheduleAt: number;
51
+ /**
52
+ * Attached media URLs. Cloud ALWAYS serializes an array (never null) and its PUT
53
+ * rebuilds the row from the body — so this has to round-trip: an update that
54
+ * omitted it would wipe the post's media.
55
+ */
56
+ media: string[];
57
+ /** Server-managed publish results (empty until a publish attempt lands). */
58
+ accountId?: string;
59
+ externalId?: string;
60
+ error?: string;
61
+ createdAt: number;
62
+ updatedAt: number;
63
+ };
64
+ /** The per-org roll-up (GET /v1/social/summary) — the counts SocialSummaryBar renders. */
65
+ export type SocialSummary = {
66
+ posts: number;
67
+ scheduled: number;
68
+ published: number;
69
+ accounts: number;
70
+ };
71
+ /**
72
+ * A network's publish-readiness (GET /v1/social/providers): whether this deployment
73
+ * holds the OAuth-app credentials to publish, and — if not — exactly which env vars
74
+ * are missing. The honest connect affordance; never a fabricated "connected".
75
+ */
76
+ export type ProviderCapability = {
77
+ provider: string;
78
+ credentialsConfigured: boolean;
79
+ missingCredentials: string[];
80
+ };
81
+ /** Create/update bodies — only the writable fields (server owns id/org/timestamps). */
82
+ export type NewAccount = Partial<Omit<Account, 'id' | 'createdAt' | 'updatedAt'>> & {
83
+ provider: string;
84
+ };
85
+ export type NewPost = Partial<Omit<Post, 'id' | 'createdAt' | 'updatedAt'>> & {
86
+ content: string;
87
+ };
88
+ export declare function normalizeAccount(raw: unknown): Account;
89
+ export declare function normalizePost(raw: unknown): Post;
90
+ export declare function normalizeSummary(raw: unknown): SocialSummary;
91
+ export declare function normalizeProviderCapability(raw: unknown): ProviderCapability;
92
+ export declare const normalizeAccounts: (p: unknown) => Account[];
93
+ export declare const normalizePosts: (p: unknown) => Post[];
94
+ export declare const normalizeProviders: (p: unknown) => ProviderCapability[];
95
+ /**
96
+ * The host's REST transport. `path` is relative to `/v1/social` (no leading slash);
97
+ * the host owns the origin, the credential and the error class. A rejected promise
98
+ * is passed straight to `classifyBackend`, so any client's error type works.
99
+ */
100
+ export type SocialRest = {
101
+ get: (path: string) => Promise<unknown>;
102
+ post: (path: string, body?: unknown) => Promise<unknown>;
103
+ put: (path: string, body?: unknown) => Promise<unknown>;
104
+ del: (path: string) => Promise<void>;
105
+ };
106
+ export type SocialApi = ReturnType<typeof createSocialApi>;
107
+ /** Bind the `/v1/social` contract to a host transport. One method per documented route. */
108
+ export declare function createSocialApi(rest: SocialRest): {
109
+ summary: () => Promise<SocialSummary>;
110
+ /** Publish-readiness per network (+ the exact missing OAuth-app credentials). */
111
+ providers: () => Promise<ProviderCapability[]>;
112
+ accounts: {
113
+ list: (provider?: string) => Promise<Account[]>;
114
+ get: (id: string) => Promise<Account>;
115
+ create: (body: NewAccount) => Promise<Account>;
116
+ update: (id: string, body: NewAccount) => Promise<Account>;
117
+ remove: (id: string) => Promise<void>;
118
+ };
119
+ posts: {
120
+ list: (status?: string) => Promise<Post[]>;
121
+ get: (id: string) => Promise<Post>;
122
+ create: (body: NewPost) => Promise<Post>;
123
+ update: (id: string, body: NewPost) => Promise<Post>;
124
+ remove: (id: string) => Promise<void>;
125
+ /** Publish a post NOW to its channel's connected accounts. */
126
+ publish: (id: string) => Promise<Post>;
127
+ };
128
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The ONE place a post's schedule time and body are formatted, bucketed by day,
3
+ * and parsed. Pure (no React, no host) so the agenda, the table cells and the
4
+ * composer all read the same clock. Extracted from Hanzo Social.
5
+ */
6
+ /** Unix seconds → a short local timestamp, or '—' when unset (0). */
7
+ export declare function formatPostTime(unix: number): string;
8
+ /** Unix seconds → a day bucket key + label for the agenda (calendar) view. */
9
+ export declare function postDayBucket(unix: number): {
10
+ key: string;
11
+ label: string;
12
+ };
13
+ /** Truncate a post body for a table cell / agenda card. */
14
+ export declare function postPreview(s: string): string;
15
+ /** Parse a user-typed datetime (ISO or local) into unix seconds; invalid → 0. */
16
+ export declare function parsePostTime(dt: string): number;
@@ -0,0 +1,11 @@
1
+ export * from './api';
2
+ export * from './SocialResource';
3
+ export * from './ChannelBadge';
4
+ export * from './CampaignCard';
5
+ export * from './PostCard';
6
+ export * from './PostAgenda';
7
+ export * from './PostComposer';
8
+ export * from './ProviderReadinessList';
9
+ export * from './SocialSummaryBar';
10
+ export * from './ViewToggle';
11
+ export * from './format';
@@ -1,3 +1,4 @@
1
+ /** The seven surfaces this shell's app switcher offers. */
1
2
  export type SurfaceId = 'ai' | 'console' | 'app' | 'chat' | 'bot' | 'team' | 'billing';
2
3
  /** One Hanzo surface the app switcher offers. */
3
4
  export type Surface = {
@@ -134,3 +134,55 @@
134
134
  animation: none;
135
135
  }
136
136
  }
137
+
138
+ /* ── Typography + surface classes the product layer's components reference ──────
139
+ DataTable/Metric typeset numeric cells with `hz-mono`/`hz-tnum`; ComboBox and
140
+ SelectMenu paint their popovers with `hz-paper hz-menu-in`; DataTable rows use
141
+ `hz-row`. They travel WITH the components (this is the package's one stylesheet)
142
+ so any host that imports `@hanzo/ui/styles/motion.css` renders them correctly.
143
+ The elevation/ring variables fall back to sane values, so a host that defines its
144
+ own `--hz-*` theme tokens (the console does) still wins. */
145
+
146
+ .hz-tnum {
147
+ font-variant-numeric: tabular-nums;
148
+ font-feature-settings: 'tnum' 1;
149
+ }
150
+
151
+ /* Data/numeric face — Geist Mono + tabular figures for metric values, prices, IDs
152
+ and counts, so numbers read as precise, column-aligned data. */
153
+ .hz-mono {
154
+ font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
155
+ font-variant-numeric: tabular-nums;
156
+ font-feature-settings: 'tnum' 1;
157
+ letter-spacing: -0.01em;
158
+ }
159
+
160
+ .hz-paper {
161
+ box-shadow: var(--hz-ring, inset 0 0 0 1px rgba(255, 255, 255, 0.08)),
162
+ var(--hz-paper-highlight, inset 0 1px 0 0 rgba(255, 255, 255, 0.05)),
163
+ var(--hz-elevation-3, 0 8px 24px rgba(0, 0, 0, 0.36));
164
+ }
165
+
166
+ @keyframes hz-menu-in {
167
+ from {
168
+ opacity: 0;
169
+ }
170
+ to {
171
+ opacity: 1;
172
+ }
173
+ }
174
+
175
+ .hz-menu-in {
176
+ animation: hz-menu-in 140ms ease-out both;
177
+ will-change: opacity;
178
+ }
179
+
180
+ .hz-row {
181
+ transition: background-color 140ms ease-out;
182
+ }
183
+
184
+ @media (prefers-reduced-motion: reduce) {
185
+ .hz-menu-in {
186
+ animation: none;
187
+ }
188
+ }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "8.0.11",
3
+ "version": "8.0.13",
4
4
  "type": "module",
5
- "description": "Hanzo UI \u2014 the one cross-platform component library on @hanzo/gui. The product/app layer (charts, metrics, page headers, status tags, rich empty states, combobox, slide-over, toasts, drag-reorder, labeled field rows, provider/product marks) + the metadata-driven record layer (@hanzo/data: RecordsView, DataTable, board, typed field editors) + the calm dark-first tokens and motion. Presentational, host-agnostic (data/effects injected), clean-room. Web + native (iOS) + desktop.",
5
+ "description": "Hanzo UI the one canonical, backend-flexible component library on @hanzo/gui + @hanzo/tokens. A shared design core (Hanzo dark-first tokens, Geist Sans/Mono typography) with per-backend implementations: the shadcn-compatible web surface (Radix + Tailwind, the API apps import) and the @hanzo/gui product layer (cross-platform web + native + desktop). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./dist/index.d.ts",
@@ -10,6 +10,36 @@
10
10
  "require": "./dist/index.cjs",
11
11
  "default": "./dist/index.js"
12
12
  },
13
+ "./shadcn": {
14
+ "types": "./src/backends/shadcn/index.ts",
15
+ "default": "./src/backends/shadcn/index.ts"
16
+ },
17
+ "./gui": {
18
+ "types": "./src/backends/gui/index.ts",
19
+ "default": "./src/backends/gui/index.ts"
20
+ },
21
+ "./svelte": {
22
+ "svelte": "./src/backends/svelte/index.ts",
23
+ "types": "./src/backends/svelte/index.ts",
24
+ "default": "./src/backends/svelte/index.ts"
25
+ },
26
+ "./components": {
27
+ "types": "./src/components.ts",
28
+ "default": "./src/components.ts"
29
+ },
30
+ "./models": {
31
+ "types": "./src/models/index.ts",
32
+ "default": "./src/models/index.ts"
33
+ },
34
+ "./core": {
35
+ "types": "./src/core/index.ts",
36
+ "default": "./src/core/index.ts"
37
+ },
38
+ "./tokens": {
39
+ "types": "./src/core/tokens.ts",
40
+ "default": "./src/core/tokens.ts"
41
+ },
42
+ "./theme.css": "./src/theme.css",
13
43
  "./product": {
14
44
  "types": "./dist/product/index.d.ts",
15
45
  "import": "./dist/product/index.js",
@@ -22,12 +52,20 @@
22
52
  "require": "./dist/data.cjs",
23
53
  "default": "./dist/data.js"
24
54
  },
55
+ "./primitives": {
56
+ "types": "./src/primitives/index.ts",
57
+ "default": "./src/primitives/index.ts"
58
+ },
25
59
  "./primitives/bases/data": {
26
60
  "types": "./dist/primitives/bases/data/index.d.ts",
27
61
  "import": "./dist/primitives/bases/data/index.js",
28
62
  "require": "./dist/primitives/bases/data/index.cjs",
29
63
  "default": "./dist/primitives/bases/data/index.js"
30
64
  },
65
+ "./primitives/*": {
66
+ "types": "./src/primitives/*.tsx",
67
+ "default": "./src/primitives/*.tsx"
68
+ },
31
69
  "./gitops": {
32
70
  "types": "./dist/gitops.d.ts",
33
71
  "import": "./dist/gitops.js",
@@ -97,31 +135,71 @@
97
135
  "scripts": {
98
136
  "build": "tsup && tsc -p tsconfig.build.json && mkdir -p dist/styles && cp src/styles/hanzo-motion.css dist/styles/hanzo-motion.css && node scripts/add-use-client.mjs",
99
137
  "clean": "rm -rf dist types",
138
+ "gen:primitives": "node scripts/gen-primitives.mjs",
100
139
  "prepack": "pnpm run build",
101
140
  "tc": "tsc --noEmit",
102
141
  "typecheck": "tsc --noEmit",
142
+ "typecheck:ui": "tsc -p tsconfig.check.json",
143
+ "check:svelte": "svelte-check --tsconfig ./tsconfig.svelte.json",
103
144
  "test": "vitest run",
104
145
  "test:watch": "vitest"
105
146
  },
147
+ "dependencies": {
148
+ "@hanzo/logo": "^1.0.13",
149
+ "@hanzo/products": "workspace:*",
150
+ "@hanzo/tokens": "workspace:*",
151
+ "@hanzogui/telemetry": "^0.1.0",
152
+ "@radix-ui/react-aspect-ratio": "^1.1.8",
153
+ "@radix-ui/react-avatar": "^1.1.11",
154
+ "@radix-ui/react-checkbox": "^1.3.3",
155
+ "@radix-ui/react-collapsible": "^1.1.12",
156
+ "@radix-ui/react-dialog": "^1.1.15",
157
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
158
+ "@radix-ui/react-icons": "^1.3.2",
159
+ "@radix-ui/react-label": "^2.1.8",
160
+ "@radix-ui/react-popover": "^1.1.15",
161
+ "@radix-ui/react-progress": "^1.1.8",
162
+ "@radix-ui/react-scroll-area": "^1.2.10",
163
+ "@radix-ui/react-select": "^2.2.6",
164
+ "@radix-ui/react-separator": "^1.1.8",
165
+ "@radix-ui/react-slider": "^1.3.6",
166
+ "@radix-ui/react-slot": "^1.2.4",
167
+ "@radix-ui/react-switch": "^1.2.6",
168
+ "@radix-ui/react-tabs": "^1.1.13",
169
+ "@radix-ui/react-tooltip": "^1.2.8",
170
+ "class-variance-authority": "^0.7.1",
171
+ "clsx": "^2.1.1",
172
+ "cmdk": "^1.1.1",
173
+ "lucide-react": ">=0.456.0",
174
+ "sonner": "^2.0.7",
175
+ "tailwind-merge": "^3.5.0"
176
+ },
106
177
  "peerDependencies": {
107
178
  "@hanzo/canvas": ">=0.1.0",
108
179
  "@hanzo/dashboard": ">=0.1.0",
109
180
  "@hanzo/data": ">=1.2.0",
110
- "@hanzo/gitops": ">=0.1.0",
181
+ "@hanzo/cd": ">=0.1.0",
111
182
  "@hanzo/gui": ">=7.2.2",
112
183
  "@hanzo/ui-shadcn": ">=5.7.0",
113
184
  "@hanzo/usage": ">=0.1.0",
185
+ "@hanzogui/lucide-icons-2": ">=7.3.0",
114
186
  "@hanzogui/next-theme": ">=7.3.0",
115
- "react": ">=19"
187
+ "next-themes": ">=0.2.1",
188
+ "react": ">=19",
189
+ "react-dom": ">=19",
190
+ "svelte": ">=5"
116
191
  },
117
192
  "peerDependenciesMeta": {
193
+ "svelte": {
194
+ "optional": true
195
+ },
118
196
  "@hanzo/canvas": {
119
197
  "optional": true
120
198
  },
121
199
  "@hanzo/dashboard": {
122
200
  "optional": true
123
201
  },
124
- "@hanzo/gitops": {
202
+ "@hanzo/cd": {
125
203
  "optional": true
126
204
  },
127
205
  "@hanzo/ui-shadcn": {
@@ -132,16 +210,14 @@
132
210
  },
133
211
  "@hanzogui/next-theme": {
134
212
  "optional": true
213
+ },
214
+ "next-themes": {
215
+ "optional": true
135
216
  }
136
217
  },
137
218
  "devDependencies": {
138
- "@hanzo/canvas": "workspace:*",
139
- "@hanzo/dashboard": "workspace:*",
140
219
  "@hanzo/data": "1.2.1",
141
- "@hanzo/gitops": "workspace:*",
142
220
  "@hanzo/gui": "7.3.0",
143
- "@hanzo/ui-shadcn": "workspace:*",
144
- "@hanzo/usage": "^0.1.6",
145
221
  "@hanzogui/config": "7.3.0",
146
222
  "@hanzogui/core": "7.3.0",
147
223
  "@hanzogui/lucide-icons-2": "7.3.0",
@@ -149,8 +225,11 @@
149
225
  "@hanzogui/web": "7.3.0",
150
226
  "@types/react": "^19.1.10",
151
227
  "@types/react-dom": "^19.1.0",
228
+ "next-themes": "^0.4.6",
152
229
  "react": "^19.0.0",
153
230
  "react-dom": "^19.0.0",
231
+ "svelte": "^4.2.20",
232
+ "svelte-check": "^3.8.6",
154
233
  "typescript": "^5.7.2",
155
234
  "vitest": "^4.1.8",
156
235
  "react-native-web": "^0.21.2",
@@ -160,9 +239,5 @@
160
239
  "access": "public"
161
240
  },
162
241
  "license": "BSD-3-Clause",
163
- "author": "Hanzo AI <dev@hanzo.ai>",
164
- "dependencies": {
165
- "@hanzo/logo": "^1.0.13",
166
- "@hanzogui/telemetry": "^0.1.0"
167
- }
242
+ "author": "Hanzo AI <dev@hanzo.ai>"
168
243
  }