@hanzo/ui 4.6.0 → 4.8.2

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 (184) hide show
  1. package/assets/general.tsx +1 -1
  2. package/assets/hanzo-logo.tsx +3 -1
  3. package/assets/index.ts +119 -5
  4. package/blocks/auth/index.ts +6 -0
  5. package/blocks/auth/login-2fa.tsx +165 -0
  6. package/blocks/auth/login-basic.tsx +94 -0
  7. package/blocks/auth/login-social.tsx +148 -0
  8. package/blocks/auth/magic-link.tsx +129 -0
  9. package/blocks/auth/password-reset.tsx +97 -0
  10. package/blocks/auth/signup.tsx +157 -0
  11. package/blocks/data-display/activity-feed.tsx +242 -0
  12. package/blocks/data-display/data-table.tsx +235 -0
  13. package/blocks/data-display/stats-grid.tsx +194 -0
  14. package/blocks/ecommerce/checkout.tsx +242 -0
  15. package/blocks/ecommerce/index.ts +7 -0
  16. package/blocks/ecommerce/product-detail.tsx +257 -0
  17. package/blocks/ecommerce/product-grid.tsx +148 -0
  18. package/blocks/ecommerce/shopping-cart.tsx +181 -0
  19. package/blocks/marketing/cta-section.tsx +207 -0
  20. package/blocks/marketing/faq.tsx +159 -0
  21. package/blocks/marketing/features-grid.tsx +156 -0
  22. package/blocks/marketing/hero-section.tsx +192 -0
  23. package/blocks/marketing/index.ts +6 -0
  24. package/blocks/marketing/pricing-table.tsx +121 -0
  25. package/blocks/marketing/testimonials.tsx +196 -0
  26. package/components/index.ts +4 -51
  27. package/dist/index.js +9351 -0
  28. package/dist/index.mjs +9340 -0
  29. package/dist/lib/utils.js +47 -0
  30. package/dist/lib/utils.mjs +28 -0
  31. package/dist/src/utils.js +47 -0
  32. package/dist/src/utils.mjs +28 -0
  33. package/dist/tailwind/index.js +2050 -0
  34. package/dist/tailwind/index.mjs +2019 -0
  35. package/dist/types/index.js +79 -0
  36. package/dist/types/index.mjs +56 -0
  37. package/dist/util/format-text.js +51 -0
  38. package/dist/util/format-text.mjs +32 -0
  39. package/dist/util/index.js +384 -0
  40. package/dist/util/index.mjs +363 -0
  41. package/frameworks/core/index.ts +6 -0
  42. package/frameworks/core/utils/index.ts +64 -0
  43. package/frameworks/react/components/button.tsx +26 -0
  44. package/frameworks/react/components/index.ts +5 -0
  45. package/frameworks/react/hooks/index.ts +5 -0
  46. package/frameworks/react/index.ts +9 -0
  47. package/frameworks/react/package.json +8 -0
  48. package/frameworks/react/utils/index.ts +2 -0
  49. package/frameworks/react-native/index.ts +9 -0
  50. package/frameworks/react-native/package.json +8 -0
  51. package/frameworks/registry.json +371 -0
  52. package/frameworks/setup.sh +69 -0
  53. package/frameworks/svelte/index.ts +9 -0
  54. package/frameworks/svelte/package.json +8 -0
  55. package/frameworks/tracker.json +1854 -0
  56. package/frameworks/vue/index.ts +9 -0
  57. package/frameworks/vue/package.json +8 -0
  58. package/package.json +192 -28
  59. package/primitives/accordion.tsx +1 -1
  60. package/primitives/alert-dialog.tsx +1 -1
  61. package/primitives/alert.tsx +1 -1
  62. package/primitives/avatar.tsx +1 -1
  63. package/primitives/badge.tsx +2 -1
  64. package/primitives/breadcrumb.tsx +1 -1
  65. package/primitives/button.tsx +37 -47
  66. package/primitives/card.tsx +1 -1
  67. package/primitives/carousel.tsx +3 -2
  68. package/primitives/chat/chat-input-area.tsx +5 -4
  69. package/primitives/chat/chat-input.tsx +2 -2
  70. package/primitives/chat/files-preview.tsx +5 -4
  71. package/primitives/chat/message-list.tsx +2 -1
  72. package/primitives/chat/sqlite-preview.tsx +8 -8
  73. package/primitives/checkbox.tsx +2 -1
  74. package/primitives/command.tsx +3 -1
  75. package/primitives/context-menu.tsx +1 -1
  76. package/primitives/dialog.tsx +6 -1
  77. package/primitives/drawer.tsx +4 -1
  78. package/primitives/dropdown-menu.tsx +1 -1
  79. package/primitives/file-uploader.tsx +4 -2
  80. package/primitives/form.tsx +1 -1
  81. package/primitives/hover-card.tsx +1 -1
  82. package/primitives/icons/github.tsx +2 -2
  83. package/primitives/icons/youtube-logo.tsx +1 -1
  84. package/primitives/index-common.ts +7 -6
  85. package/primitives/input-otp.tsx +1 -1
  86. package/primitives/input.tsx +2 -1
  87. package/primitives/label.tsx +2 -1
  88. package/primitives/markdown-preview.tsx +3 -0
  89. package/primitives/mermaid.tsx +13 -18
  90. package/primitives/next/image.tsx +2 -1
  91. package/primitives/next/inline-icon.tsx +14 -14
  92. package/primitives/next/media-stack.tsx +2 -19
  93. package/primitives/pagination.tsx +1 -1
  94. package/primitives/popover.tsx +4 -2
  95. package/primitives/progress.tsx +2 -1
  96. package/primitives/prompt-textarea.tsx +1 -1
  97. package/primitives/radio-group.tsx +1 -1
  98. package/primitives/scroll-area.tsx +1 -1
  99. package/primitives/search-input.tsx +1 -1
  100. package/primitives/select.tsx +1 -1
  101. package/primitives/separator.tsx +2 -1
  102. package/primitives/sheet.tsx +1 -1
  103. package/primitives/skeleton.tsx +1 -0
  104. package/primitives/slider.tsx +2 -1
  105. package/primitives/stepper.tsx +1 -1
  106. package/primitives/switch.tsx +2 -1
  107. package/primitives/table.tsx +1 -1
  108. package/primitives/tabs.tsx +1 -1
  109. package/primitives/textarea.tsx +2 -1
  110. package/primitives/textfield.tsx +1 -0
  111. package/primitives/toggle-group.tsx +1 -1
  112. package/primitives/toggle.tsx +1 -1
  113. package/primitives/tooltip.tsx +1 -1
  114. package/src/hooks/use-copy-clipboard.ts +1 -1
  115. package/src/index-lean.ts +87 -0
  116. package/src/index.ts +54 -0
  117. package/src/registry/api.ts +1 -1
  118. package/src/utils.ts +19 -1
  119. package/tailwind/tailwind.config.hanzo-preset.js +7 -7
  120. package/tailwind/typo-plugin/index.js +1 -1
  121. package/types/animation-def.ts +1 -1
  122. package/types/index.ts +2 -1
  123. package/util/blob.ts +9 -4
  124. package/util/date.ts +2 -1
  125. package/util/format-text.ts +2 -1
  126. package/util/index.ts +103 -0
  127. package/util/spread-to-transform.ts +9 -8
  128. package/MCP-INSTRUCTIONS.md +0 -73
  129. package/README-MCP.md +0 -175
  130. package/dist/button.d.ts +0 -1
  131. package/dist/button.js +0 -1
  132. package/dist/hooks/index.d.ts +0 -7
  133. package/dist/hooks/index.js +0 -7
  134. package/dist/hooks/use-click-away.d.ts +0 -2
  135. package/dist/hooks/use-click-away.js +0 -23
  136. package/dist/hooks/use-combined-refs.d.ts +0 -3
  137. package/dist/hooks/use-combined-refs.js +0 -18
  138. package/dist/hooks/use-copy-clipboard.d.ts +0 -9
  139. package/dist/hooks/use-copy-clipboard.js +0 -21
  140. package/dist/hooks/use-debounce.d.ts +0 -1
  141. package/dist/hooks/use-debounce.js +0 -13
  142. package/dist/hooks/use-fill-ids.d.ts +0 -8
  143. package/dist/hooks/use-fill-ids.js +0 -20
  144. package/dist/hooks/use-map.d.ts +0 -1
  145. package/dist/hooks/use-map.js +0 -20
  146. package/dist/hooks/use-measure.d.ts +0 -8
  147. package/dist/hooks/use-measure.js +0 -25
  148. package/dist/hooks/use-reverse-video-playback.d.ts +0 -1
  149. package/dist/hooks/use-reverse-video-playback.js +0 -41
  150. package/dist/hooks/use-scroll-restoration.d.ts +0 -8
  151. package/dist/hooks/use-scroll-restoration.js +0 -36
  152. package/dist/mcp/enhanced-server.d.ts +0 -29
  153. package/dist/mcp/enhanced-server.js +0 -1128
  154. package/dist/mcp/index.d.ts +0 -28
  155. package/dist/mcp/index.js +0 -436
  156. package/dist/registry/api.d.ts +0 -37
  157. package/dist/registry/api.js +0 -129
  158. package/dist/registry/index.d.ts +0 -353
  159. package/dist/registry/index.js +0 -45
  160. package/dist/utils.d.ts +0 -1
  161. package/dist/utils.js +0 -1
  162. package/environment.d.ts +0 -6
  163. package/public/r/accordion.json +0 -11
  164. package/public/r/alert.json +0 -11
  165. package/public/r/avatar.json +0 -11
  166. package/public/r/badge.json +0 -11
  167. package/public/r/button.json +0 -11
  168. package/public/r/card.json +0 -11
  169. package/public/r/checkbox.json +0 -11
  170. package/public/r/default.json +0 -6
  171. package/public/r/dialog.json +0 -11
  172. package/public/r/input.json +0 -11
  173. package/public/r/label.json +0 -11
  174. package/public/r/new-york.json +0 -6
  175. package/public/r/popover.json +0 -11
  176. package/public/r/select.json +0 -11
  177. package/public/r/table.json +0 -11
  178. package/public/r/tabs.json +0 -11
  179. package/public/r/toast.json +0 -11
  180. package/registry.json +0 -184
  181. package/test/test-registry.js +0 -73
  182. package/test-imports.mjs +0 -19
  183. package/tsconfig.json +0 -22
  184. package/utils.ts +0 -9
@@ -0,0 +1,9 @@
1
+ // Vue components entry point
2
+ // Export all Vue components for @hanzo/ui
3
+
4
+ export * from './components'
5
+ export * from './composables'
6
+ export * from './utils'
7
+
8
+ // Re-export core utilities
9
+ export { cn } from '../core/utils'
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@hanzo/ui-vue",
3
+ "version": "1.0.0",
4
+ "exports": {
5
+ ".": "./index.ts",
6
+ "./components": "./components/index.ts"
7
+ }
8
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "4.6.0",
4
- "description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
3
+ "version": "4.8.2",
4
+ "description": "Multi-framework UI library with React, Vue, Svelte, and React Native support. Based on shadcn/ui with comprehensive framework coverage.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
7
7
  "access": "public",
@@ -9,6 +9,27 @@
9
9
  },
10
10
  "author": "Hanzo AI, Inc.",
11
11
  "license": "BSD-3-Clause",
12
+ "main": "./dist/index.js",
13
+ "module": "./dist/index.mjs",
14
+ "types": "./dist/index.d.ts",
15
+ "sideEffects": false,
16
+ "files": [
17
+ "dist",
18
+ "style",
19
+ "bin",
20
+ "primitives",
21
+ "blocks",
22
+ "components",
23
+ "assets",
24
+ "frameworks",
25
+ "helpers",
26
+ "types",
27
+ "util",
28
+ "src",
29
+ "tailwind",
30
+ "README.md",
31
+ "LICENSE"
32
+ ],
12
33
  "repository": {
13
34
  "type": "git",
14
35
  "url": "git+https://github.com/hanzoai/react-sdk.git",
@@ -31,11 +52,21 @@
31
52
  "scripts": {
32
53
  "lat": "npm show @hanzo/ui version",
33
54
  "pub": "npm publish",
34
- "tc": "tsc",
35
- "build": "tsc -p tsconfig.json",
55
+ "tc": "tsc --project tsconfig.build.json",
56
+ "build": "npm run clean && npm run build:tsup",
57
+ "build:tsup": "tsup --config tsup.config.minimal.ts",
58
+ "build:full": "tsup --config tsup.config.production.ts",
59
+ "build:frameworks": "npm run build",
60
+ "build:watch": "tsup --watch",
61
+ "build:check": "tsc --project tsconfig.build.json --noEmit",
62
+ "clean": "rm -rf dist",
63
+ "prepublishOnly": "npm run build",
36
64
  "update-registry": "node ./bin/update-registry.js",
37
65
  "registry:mcp": "node ./bin/cli.js registry:mcp",
38
- "registry:mcp:http": "node ./bin/cli.js registry:mcp --http"
66
+ "registry:mcp:http": "node ./bin/cli.js registry:mcp --http",
67
+ "analyze:frameworks": "node analyze-frameworks.js",
68
+ "test": "jest test/multi-framework.test.js",
69
+ "test:frameworks": "jest test/multi-framework.test.js --verbose"
39
70
  },
40
71
  "bin": {
41
72
  "@hanzo/ui": "./bin/cli.js",
@@ -43,30 +74,154 @@
43
74
  },
44
75
  "exports": {
45
76
  ".": {
46
- "import": "./primitives/index-next.ts",
47
- "require": "./primitives/index-common.ts",
48
- "default": "./primitives/index-next.ts"
49
- },
50
- "./assets": "./assets/index.ts",
51
- "./blocks": "./blocks/index.ts",
52
- "./components": "./components/index.ts",
53
- "./primitives": "./primitives/index-next.ts",
54
- "./primitives-common": "./primitives/index-common.ts",
77
+ "types": "./dist/index.d.ts",
78
+ "import": "./dist/index.mjs",
79
+ "require": "./dist/index.js"
80
+ },
81
+ "./assets": {
82
+ "types": "./assets/index.ts",
83
+ "import": "./assets/index.ts",
84
+ "require": "./assets/index.ts"
85
+ },
86
+ "./helpers": {
87
+ "types": "./helpers/index.ts",
88
+ "import": "./helpers/index.ts",
89
+ "require": "./helpers/index.ts"
90
+ },
91
+ "./blocks": {
92
+ "types": "./dist/blocks/index.d.ts",
93
+ "import": "./dist/blocks/index.mjs",
94
+ "require": "./dist/blocks/index.js"
95
+ },
96
+ "./blocks/*": {
97
+ "types": "./dist/blocks/*.d.ts",
98
+ "import": "./dist/blocks/*.mjs",
99
+ "require": "./dist/blocks/*.js"
100
+ },
101
+ "./components": {
102
+ "types": "./dist/components/index.d.ts",
103
+ "import": "./dist/components/index.mjs",
104
+ "require": "./dist/components/index.js"
105
+ },
106
+ "./components/*": {
107
+ "types": "./dist/components/*.d.ts",
108
+ "import": "./dist/components/*.mjs",
109
+ "require": "./dist/components/*.js"
110
+ },
111
+ "./primitives": {
112
+ "types": "./dist/primitives/index-next.d.ts",
113
+ "import": "./dist/primitives/index-next.mjs",
114
+ "require": "./dist/primitives/index-next.js"
115
+ },
116
+ "./primitives/*": {
117
+ "types": "./dist/primitives/*.d.ts",
118
+ "import": "./dist/primitives/*.mjs",
119
+ "require": "./dist/primitives/*.js"
120
+ },
121
+ "./primitives-common": {
122
+ "types": "./dist/primitives/index-common.d.ts",
123
+ "import": "./dist/primitives/index-common.mjs",
124
+ "require": "./dist/primitives/index-common.js"
125
+ },
55
126
  "./registry": {
56
- "types": "./dist/registry/index.d.ts",
57
- "default": "./dist/registry/index.js"
127
+ "types": "./dist/src/registry/index.d.ts",
128
+ "import": "./dist/src/registry/index.mjs",
129
+ "require": "./dist/src/registry/index.js"
58
130
  },
131
+ "./hooks": {
132
+ "types": "./dist/src/hooks/index.d.ts",
133
+ "import": "./dist/src/hooks/index.mjs",
134
+ "require": "./dist/src/hooks/index.js"
135
+ },
136
+ "./style": "./style",
59
137
  "./style/*": "./style/*",
60
- "./tailwind": "./tailwind/index.ts",
61
- "./types": "./types/index.ts",
62
- "./util": "./util/index.ts",
63
- "./util-client": "./util/index-client.ts",
64
- "./utils": "./src/utils.ts",
65
- "./lib/utils": "./src/utils.ts",
138
+ "./tailwind": {
139
+ "types": "./dist/tailwind/index.d.ts",
140
+ "import": "./dist/tailwind/index.mjs",
141
+ "require": "./dist/tailwind/index.js"
142
+ },
143
+ "./tailwind/*": {
144
+ "types": "./dist/tailwind/*.d.ts",
145
+ "import": "./dist/tailwind/*.mjs",
146
+ "require": "./dist/tailwind/*.js"
147
+ },
148
+ "./tailwind/config": {
149
+ "types": "./dist/tailwind/tailwind.config.hanzo-preset.d.ts",
150
+ "import": "./tailwind/tailwind.config.hanzo-preset.js",
151
+ "require": "./tailwind/tailwind.config.hanzo-preset.js"
152
+ },
153
+ "./types": {
154
+ "types": "./dist/types/index.d.ts",
155
+ "import": "./dist/types/index.mjs",
156
+ "require": "./dist/types/index.js"
157
+ },
158
+ "./types/*": {
159
+ "types": "./dist/types/*.d.ts",
160
+ "import": "./dist/types/*.mjs",
161
+ "require": "./dist/types/*.js"
162
+ },
163
+ "./util": {
164
+ "types": "./dist/util/index.d.ts",
165
+ "import": "./dist/util/index.mjs",
166
+ "require": "./dist/util/index.js"
167
+ },
168
+ "./util/*": {
169
+ "types": "./dist/util/*.d.ts",
170
+ "import": "./dist/util/*.mjs",
171
+ "require": "./dist/util/*.js"
172
+ },
173
+ "./util/format-text": {
174
+ "types": "./dist/util/format-text.d.ts",
175
+ "import": "./dist/util/format-text.mjs",
176
+ "require": "./dist/util/format-text.js"
177
+ },
178
+ "./util-client": {
179
+ "types": "./dist/util/index-client.d.ts",
180
+ "import": "./dist/util/index-client.mjs",
181
+ "require": "./dist/util/index-client.js"
182
+ },
183
+ "./utils": {
184
+ "types": "./dist/src/utils.d.ts",
185
+ "import": "./dist/src/utils.mjs",
186
+ "require": "./dist/src/utils.js"
187
+ },
188
+ "./lib/utils": {
189
+ "types": "./dist/src/utils.d.ts",
190
+ "import": "./dist/src/utils.mjs",
191
+ "require": "./dist/src/utils.js"
192
+ },
66
193
  "./mcp": {
67
- "types": "./dist/mcp/index.d.ts",
68
- "default": "./dist/mcp/index.js"
69
- }
194
+ "types": "./dist/src/mcp/index.d.ts",
195
+ "import": "./dist/src/mcp/index.mjs",
196
+ "require": "./dist/src/mcp/index.js"
197
+ },
198
+ "./theme-provider": {
199
+ "types": "./dist/style/theme-provider.d.ts",
200
+ "import": "./dist/style/theme-provider.mjs",
201
+ "require": "./dist/style/theme-provider.js"
202
+ },
203
+ "./react": {
204
+ "types": "./dist/frameworks/react/index.d.ts",
205
+ "import": "./dist/frameworks/react/index.mjs",
206
+ "require": "./dist/frameworks/react/index.js"
207
+ },
208
+ "./vue": {
209
+ "types": "./dist/frameworks/vue/index.d.ts",
210
+ "import": "./dist/frameworks/vue/index.mjs",
211
+ "require": "./dist/frameworks/vue/index.js"
212
+ },
213
+ "./svelte": {
214
+ "svelte": "./frameworks/svelte/index.ts",
215
+ "types": "./dist/frameworks/svelte/index.d.ts",
216
+ "import": "./dist/frameworks/svelte/index.mjs",
217
+ "require": "./dist/frameworks/svelte/index.js"
218
+ },
219
+ "./react-native": {
220
+ "types": "./dist/frameworks/react-native/index.d.ts",
221
+ "import": "./dist/frameworks/react-native/index.mjs",
222
+ "require": "./dist/frameworks/react-native/index.js"
223
+ },
224
+ "./package.json": "./package.json"
70
225
  },
71
226
  "dependencies": {
72
227
  "@hanzo/react-drawer": "^0.1.8",
@@ -100,26 +255,33 @@
100
255
  "@radix-ui/react-toggle-group": "^1.0.4",
101
256
  "@radix-ui/react-tooltip": "^1.0.6",
102
257
  "@radix-ui/react-use-callback-ref": "^1.1.1",
103
- "@splinetool/react-spline": "^4.0.0",
104
- "@splinetool/runtime": "^1.9.35",
105
258
  "@tailwindcss/container-queries": "^0.1.1",
106
259
  "class-variance-authority": "^0.7.1",
107
260
  "clsx": "^2.1.1",
108
261
  "cmdk": "^0.2.0",
109
262
  "commander": "^12.1.0",
110
- "date-fns": "^4.1.0",
263
+ "date-fns": "^3.6.0",
111
264
  "embla-carousel-react": "8.5.1",
265
+ "filesize": "^11.0.2",
266
+ "framer-motion": "^11.15.0",
112
267
  "input-otp": "^1.0.1",
113
268
  "lodash.castarray": "^4.4.0",
114
269
  "lodash.isplainobject": "^4.0.6",
115
270
  "lodash.merge": "^4.6.2",
271
+ "lucide-react": "0.456.0",
116
272
  "markdown-to-jsx": "^7.7.13",
117
273
  "mermaid": "^11.12.0",
118
274
  "postcss-selector-parser": "^6.0.16",
119
275
  "qrcode.react": "^4.2.0",
120
276
  "react-day-picker": "^8.10.1",
277
+ "react-dropzone": "^14.3.5",
121
278
  "react-intersection-observer": "^9.8.2",
279
+ "react-markdown": "^9.0.3",
122
280
  "react-resizable-panels": "^3.0.6",
281
+ "react-syntax-highlighter": "^15.6.1",
282
+ "rehype-katex": "^7.0.1",
283
+ "remark-gfm": "^4.0.0",
284
+ "remark-math": "^6.0.0",
123
285
  "sonner": "^1.4.41",
124
286
  "sql.js": "^1.13.0",
125
287
  "svg-pan-zoom": "^3.6.2",
@@ -154,7 +316,9 @@
154
316
  "@types/react": "18.3.1",
155
317
  "@types/react-dom": "18.3.1",
156
318
  "glob": "^11.0.2",
319
+ "jest": "^30.1.3",
157
320
  "tailwindcss": "3.4.14",
321
+ "tsup": "^8.5.0",
158
322
  "typescript": "5.6.3"
159
323
  }
160
324
  }
@@ -1,6 +1,6 @@
1
1
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
2
  import { ChevronDown } from 'lucide-react';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
 
5
5
  import { cn } from '../src/utils';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
  import { buttonVariants } from './button';
@@ -1,5 +1,5 @@
1
1
  import { cva, type VariantProps } from 'class-variance-authority';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { cva, type VariantProps } from 'class-variance-authority';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -42,3 +42,4 @@ const Badge = ({ className, variant, ...props }: BadgeProps) => {
42
42
  Badge.displayName = 'Badge';
43
43
 
44
44
  export { Badge, badgeVariants };
45
+ export default Badge;
@@ -1,6 +1,6 @@
1
1
  import { Slot } from '@radix-ui/react-slot';
2
2
  import { ChevronRight, MoreHorizontal } from 'lucide-react';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
 
5
5
  import { cn } from '../src/utils';
6
6
 
@@ -1,43 +1,41 @@
1
1
  import { Slot } from '@radix-ui/react-slot';
2
2
  import { cva, type VariantProps } from 'class-variance-authority';
3
3
  import { Loader2 } from 'lucide-react';
4
- import * as React from 'react';
4
+ import React from 'react';
5
5
 
6
6
  import { cn } from '../src/utils';
7
7
 
8
8
  const buttonVariants = cva(
9
- 'inline-flex items-center justify-center gap-2 border border-transparent text-sm font-semibold transition-colors focus-visible:ring-1 focus-visible:ring-gray-50 focus-visible:outline-hidden focus-visible:ring-inset',
9
+ 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
10
10
  {
11
11
  variants: {
12
12
  variant: {
13
13
  default:
14
- 'bg-brand hover:bg-brand-500 text-black disabled:bg-gray-800 disabled:text-gray-400 disabled:opacity-60',
14
+ 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
15
15
  destructive:
16
- 'disabled:text-text-secondary bg-red-500 text-white hover:bg-red-500/90 disabled:bg-gray-600',
16
+ 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
17
17
  outline:
18
- 'border border-gray-600 bg-transparent text-white hover:border-gray-400 hover:bg-gray-900 hover:text-white',
19
- tertiary:
20
- 'bg-transparent text-gray-300 hover:bg-gray-900 hover:text-white',
21
- link: 'text-white underline-offset-4 hover:underline',
18
+ 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
19
+ secondary:
20
+ 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
21
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
22
+ link: 'text-primary underline-offset-4 hover:underline',
23
+ // Keep the additional Hanzo variants for backward compatibility
24
+ primary:
25
+ 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
26
+ linkFG: 'text-primary underline-offset-4 hover:underline',
27
+ linkMuted: 'text-muted-foreground underline-offset-4 hover:underline hover:text-foreground',
22
28
  },
23
29
  size: {
24
- default: 'h-[50px] px-8 text-sm',
25
- xs: 'h-[34px] gap-1.5 px-3 text-xs',
26
- sm: 'h-[36px] gap-1.5 px-3 text-xs',
27
- md: 'h-[40px] gap-1.5 px-3 text-xs',
28
- lg: 'h-[48px] gap-2 px-2 text-sm',
30
+ default: 'h-9 px-4 py-2',
31
+ sm: 'h-8 rounded-md px-3 text-xs',
32
+ lg: 'h-10 rounded-md px-8',
29
33
  icon: 'h-9 w-9',
30
- auto: 'h-auto p-4',
31
- },
32
- rounded: {
33
- full: 'rounded-full',
34
- lg: 'rounded-lg',
35
34
  },
36
35
  },
37
36
  defaultVariants: {
38
37
  variant: 'default',
39
38
  size: 'default',
40
- rounded: 'full',
41
39
  },
42
40
  },
43
41
  );
@@ -47,36 +45,28 @@ export interface ButtonProps
47
45
  VariantProps<typeof buttonVariants> {
48
46
  asChild?: boolean;
49
47
  isLoading?: boolean;
50
- ref?: React.RefObject<HTMLButtonElement>;
51
48
  }
52
49
 
53
- const Button = ({
54
- className,
55
- variant,
56
- size,
57
- rounded,
58
- asChild = false,
59
- isLoading = false,
60
- ref,
61
- ...props
62
- }: ButtonProps) => {
63
- const Comp = asChild ? Slot : 'button';
64
- return (
65
- <Comp
66
- className={cn(buttonVariants({ variant, size, className }))}
67
- ref={ref}
68
- {...props}
69
- >
70
- {isLoading ? (
71
- <Loader2
72
- className={cn('h-4 w-4 animate-spin', size !== 'icon' && 'mr-2')}
73
- />
74
- ) : null}
75
- {isLoading && size === 'icon' ? null : props.children}
76
- </Comp>
77
- );
78
- };
79
-
50
+ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
51
+ ({ className, variant, size, asChild = false, isLoading = false, children, ...props }, ref) => {
52
+ const Comp = asChild ? Slot : 'button';
53
+ return (
54
+ <Comp
55
+ className={cn(buttonVariants({ variant, size, className }))}
56
+ ref={ref}
57
+ {...props}
58
+ >
59
+ {isLoading ? (
60
+ <Loader2
61
+ className={cn('h-4 w-4 animate-spin', size !== 'icon' && 'mr-2')}
62
+ />
63
+ ) : null}
64
+ {isLoading && size === 'icon' ? null : children}
65
+ </Comp>
66
+ );
67
+ }
68
+ );
80
69
  Button.displayName = 'Button';
81
70
 
82
71
  export { Button, buttonVariants };
72
+ export default Button; // Keep default export for backward compatibility
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
 
3
3
  import { cn } from '../src/utils';
4
4
 
@@ -1,8 +1,9 @@
1
1
  'use client'
2
2
 
3
- import * as React from 'react'
3
+ import React from 'react';
4
4
  import useEmblaCarousel from 'embla-carousel-react'
5
- import type { EmblaCarouselType, EmblaOptionsType, EmblaPluginType } from 'embla-carousel'
5
+ // @ts-ignore
6
+ const { EmblaCarouselType, EmblaOptionsType, EmblaPluginType } = {}
6
7
 
7
8
  import { ArrowLeft, ArrowRight } from 'lucide-react'
8
9
 
@@ -1,8 +1,9 @@
1
- import { useTranslation } from '@hanzo_network/hanzo-i18n';
2
- import * as React from 'react';
1
+ // import { useTranslation } from '@hanzo_network/hanzo-i18n';
2
+ const useTranslation = () => ({ t: (key) => key });
3
+ import React from 'react';
3
4
 
4
- import { useCombinedRefs } from '../../hooks/use-combined-refs';
5
- import { cn } from '../src/utils';
5
+ import { useCombinedRefs } from '../../src/hooks/use-combined-refs';
6
+ import { cn } from '../../src/utils';
6
7
  import { ChatInput } from './chat-input';
7
8
 
8
9
  type ChatInputAreaProps = {
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
 
3
- import { cn } from '../src/utils';
3
+ import { cn } from '../../src/utils';
4
4
 
5
5
  export interface ChatInputProps
6
6
  extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
@@ -3,10 +3,11 @@ import {
3
3
  type Attachment,
4
4
  FileTypeSupported,
5
5
  } from '@hanzo_network/hanzo-node-state/v2/queries/getChatConversation/types';
6
- import { save } from '@tauri-apps/plugin-dialog';
7
- import * as fs from '@tauri-apps/plugin-fs';
8
- import { BaseDirectory } from '@tauri-apps/plugin-fs';
9
- import { partial } from 'filesize';
6
+ // import { save } from '@tauri-apps/plugin-dialog'; // Not available in web environment
7
+ // import * as fs from '@tauri-apps/plugin-fs'; // Not available in web environment
8
+ // import { BaseDirectory } from '@tauri-apps/plugin-fs'; // Not available in web environment
9
+ // import { partial } from 'filesize';
10
+ const partial = () => (bytes) => `${(bytes / 1024 / 1024).toFixed(2)} MB`;
10
11
  import { AnimatePresence, motion } from 'framer-motion';
11
12
  import { CircleSlashIcon, XIcon } from 'lucide-react';
12
13
  import React, { useState } from 'react';
@@ -1,4 +1,5 @@
1
- import { ChatConversationInfiniteData } from '@hanzo_network/hanzo-node-state/v2/queries/getChatConversation/types';
1
+ // import { ChatConversationInfiniteData } from '@hanzo_network/hanzo-node-state/v2/queries/getChatConversation/types';
2
+ type ChatConversationInfiniteData = any;
2
3
  import {
3
4
  type FetchPreviousPageOptions,
4
5
  type InfiniteQueryObserverResult,
@@ -1,4 +1,4 @@
1
- import { debug } from '@tauri-apps/plugin-log';
1
+ // import { debug } from '@tauri-apps/plugin-log'; // Not available in web environment
2
2
  import { useEffect, useState } from 'react';
3
3
  import * as sqljs from 'sql.js';
4
4
 
@@ -13,9 +13,9 @@ const loadTableData = async (
13
13
  db: sqljs.Database,
14
14
  tableName: string,
15
15
  ): Promise<{ values: sqljs.SqlValue[][] }> => {
16
- void debug(`loading table data for ${tableName}`);
16
+ void console.log(`loading table data for ${tableName}`);
17
17
  const dataResult = db.exec(`SELECT * FROM ${tableName}`);
18
- void debug(`found ${dataResult[0].values.length} rows for ${tableName}`);
18
+ void console.log(`found ${dataResult[0].values.length} rows for ${tableName}`);
19
19
  return { values: dataResult[0].values };
20
20
  };
21
21
 
@@ -25,7 +25,7 @@ const loadDatabase = async (
25
25
  db: sqljs.Database;
26
26
  tables: { name: string; columns: sqljs.SqlValue[]; count: number }[];
27
27
  }> => {
28
- void debug(`loading database from ${url}`);
28
+ void console.log(`loading database from ${url}`);
29
29
  const SQL = await sqljs.default({
30
30
  locateFile: (file: string) => '/sqljs/sql-wasm.wasm',
31
31
  });
@@ -39,14 +39,14 @@ const loadDatabase = async (
39
39
  "SELECT name FROM sqlite_master WHERE type='table'",
40
40
  );
41
41
  const tableNames = tablesResult[0].values.map((v) => v[0] as string);
42
- void debug(`found ${tableNames.length} tables`);
43
- void debug(`tables: ${tableNames.join(', ')}`);
42
+ void console.log(`found ${tableNames.length} tables`);
43
+ void console.log(`tables: ${tableNames.join(', ')}`);
44
44
  const tables = tableNames.map((table) => {
45
45
  const columnsResult = db.exec(`PRAGMA table_info(${table})`);
46
46
  const columnNames = columnsResult[0].values.map((v) => v[1]);
47
47
  const countResult = db.exec(`SELECT COUNT(*) FROM ${table}`);
48
48
  const count = countResult[0].values[0][0] as number;
49
- void debug(
49
+ void console.log(
50
50
  `found columns ${columnNames.join(', ')} and ${count} rows for ${table}`,
51
51
  );
52
52
  return {
@@ -128,7 +128,7 @@ export const SqlitePreview: React.FC<SqlitePreviewProps> = ({ url }) => {
128
128
  useEffect(() => {
129
129
  return () => {
130
130
  if (db) {
131
- void debug('closing database connection');
131
+ void console.log('closing database connection');
132
132
  db.close();
133
133
  }
134
134
  };
@@ -1,6 +1,6 @@
1
1
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
2
2
  import { CheckIcon } from '@radix-ui/react-icons';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
 
5
5
  import { cn } from '../src/utils';
6
6
 
@@ -29,3 +29,4 @@ const Checkbox = ({ className, ref, ...props }: CheckboxProps) => (
29
29
  Checkbox.displayName = CheckboxPrimitive.Root.displayName;
30
30
 
31
31
  export { Checkbox };
32
+ export default Checkbox;
@@ -1,7 +1,9 @@
1
+ 'use client';
2
+
1
3
  import { DialogProps } from '@radix-ui/react-dialog';
2
4
  import { Command as CommandPrimitive } from 'cmdk';
3
5
  import { Search } from 'lucide-react';
4
- import * as React from 'react';
6
+ import React from 'react';
5
7
 
6
8
  import { cn } from '../src/utils';
7
9
  import { Dialog, DialogContent } from './dialog';
@@ -1,6 +1,6 @@
1
1
  import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
2
2
  import { Check, ChevronRight, Circle } from 'lucide-react';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
 
5
5
  import { cn } from '../src/utils';
6
6