@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
package/registry.json DELETED
@@ -1,184 +0,0 @@
1
- {
2
- "$schema": "https://ui.hanzo.com/schema/registry.json",
3
- "name": "hanzo",
4
- "homepage": "https://ui.hanzo.ai",
5
- "items": [
6
- {
7
- "name": "default",
8
- "type": "registry:style",
9
- "description": "The default style for Hanzo UI components.",
10
- "files": []
11
- },
12
- {
13
- "name": "new-york",
14
- "type": "registry:style",
15
- "description": "The new-york style for Hanzo UI components.",
16
- "files": []
17
- },
18
- {
19
- "name": "accordion",
20
- "type": "registry:component",
21
- "description": "A accordion component for your UI.",
22
- "files": [
23
- {
24
- "path": "default/ui/accordion/accordion.tsx",
25
- "type": "registry:component"
26
- }
27
- ]
28
- },
29
- {
30
- "name": "alert",
31
- "type": "registry:component",
32
- "description": "A alert component for your UI.",
33
- "files": [
34
- {
35
- "path": "default/ui/alert/alert.tsx",
36
- "type": "registry:component"
37
- }
38
- ]
39
- },
40
- {
41
- "name": "avatar",
42
- "type": "registry:component",
43
- "description": "A avatar component for your UI.",
44
- "files": [
45
- {
46
- "path": "default/ui/avatar/avatar.tsx",
47
- "type": "registry:component"
48
- }
49
- ]
50
- },
51
- {
52
- "name": "badge",
53
- "type": "registry:component",
54
- "description": "A badge component for your UI.",
55
- "files": [
56
- {
57
- "path": "default/ui/badge/badge.tsx",
58
- "type": "registry:component"
59
- }
60
- ]
61
- },
62
- {
63
- "name": "button",
64
- "type": "registry:component",
65
- "description": "A button component for your UI.",
66
- "files": [
67
- {
68
- "path": "default/ui/button/button.tsx",
69
- "type": "registry:component"
70
- }
71
- ]
72
- },
73
- {
74
- "name": "card",
75
- "type": "registry:component",
76
- "description": "A card component for your UI.",
77
- "files": [
78
- {
79
- "path": "default/ui/card/card.tsx",
80
- "type": "registry:component"
81
- }
82
- ]
83
- },
84
- {
85
- "name": "checkbox",
86
- "type": "registry:component",
87
- "description": "A checkbox component for your UI.",
88
- "files": [
89
- {
90
- "path": "default/ui/checkbox/checkbox.tsx",
91
- "type": "registry:component"
92
- }
93
- ]
94
- },
95
- {
96
- "name": "dialog",
97
- "type": "registry:component",
98
- "description": "A dialog component for your UI.",
99
- "files": [
100
- {
101
- "path": "default/ui/dialog/dialog.tsx",
102
- "type": "registry:component"
103
- }
104
- ]
105
- },
106
- {
107
- "name": "input",
108
- "type": "registry:component",
109
- "description": "A input component for your UI.",
110
- "files": [
111
- {
112
- "path": "default/ui/input/input.tsx",
113
- "type": "registry:component"
114
- }
115
- ]
116
- },
117
- {
118
- "name": "label",
119
- "type": "registry:component",
120
- "description": "A label component for your UI.",
121
- "files": [
122
- {
123
- "path": "default/ui/label/label.tsx",
124
- "type": "registry:component"
125
- }
126
- ]
127
- },
128
- {
129
- "name": "popover",
130
- "type": "registry:component",
131
- "description": "A popover component for your UI.",
132
- "files": [
133
- {
134
- "path": "default/ui/popover/popover.tsx",
135
- "type": "registry:component"
136
- }
137
- ]
138
- },
139
- {
140
- "name": "select",
141
- "type": "registry:component",
142
- "description": "A select component for your UI.",
143
- "files": [
144
- {
145
- "path": "default/ui/select/select.tsx",
146
- "type": "registry:component"
147
- }
148
- ]
149
- },
150
- {
151
- "name": "table",
152
- "type": "registry:component",
153
- "description": "A table component for your UI.",
154
- "files": [
155
- {
156
- "path": "default/ui/table/table.tsx",
157
- "type": "registry:component"
158
- }
159
- ]
160
- },
161
- {
162
- "name": "tabs",
163
- "type": "registry:component",
164
- "description": "A tabs component for your UI.",
165
- "files": [
166
- {
167
- "path": "default/ui/tabs/tabs.tsx",
168
- "type": "registry:component"
169
- }
170
- ]
171
- },
172
- {
173
- "name": "toast",
174
- "type": "registry:component",
175
- "description": "A toast component for your UI.",
176
- "files": [
177
- {
178
- "path": "default/ui/toast/toast.tsx",
179
- "type": "registry:component"
180
- }
181
- ]
182
- }
183
- ]
184
- }
@@ -1,73 +0,0 @@
1
- // Small test for the registry functionality
2
- // This script checks if the registry is accessible
3
- const https = require('https');
4
-
5
- function fetchJson(url) {
6
- return new Promise((resolve, reject) => {
7
- https.get(url, (res) => {
8
- let data = '';
9
-
10
- // Handle HTTP errors
11
- if (res.statusCode !== 200) {
12
- reject(new Error(`HTTP error: ${res.statusCode} ${res.statusMessage}`));
13
- return;
14
- }
15
-
16
- // Collect data chunks
17
- res.on('data', (chunk) => {
18
- data += chunk;
19
- });
20
-
21
- // Process complete response
22
- res.on('end', () => {
23
- try {
24
- const parsed = JSON.parse(data);
25
- resolve(parsed);
26
- } catch (error) {
27
- reject(new Error(`Invalid JSON: ${error.message}`));
28
- }
29
- });
30
-
31
- }).on('error', (err) => {
32
- reject(err);
33
- });
34
- });
35
- }
36
-
37
- async function main() {
38
- try {
39
- // Define registry URL
40
- const registryUrl = "https://ui.hanzo.ai/registry/registry.json";
41
-
42
- // Fetch the registry
43
- console.log(`Fetching registry from ${registryUrl}...`);
44
- const registry = await fetchJson(registryUrl);
45
-
46
- console.log(`Successfully fetched registry with ${registry.items.length} items`);
47
-
48
- // Display some basic information
49
- console.log(`Registry name: ${registry.name}`);
50
- console.log(`Homepage: ${registry.homepage || 'Not specified'}`);
51
-
52
- // Count items by type
53
- const typeCount = {};
54
- registry.items.forEach(item => {
55
- const type = item.type;
56
- typeCount[type] = (typeCount[type] || 0) + 1;
57
- });
58
-
59
- console.log("Items by type:");
60
- Object.entries(typeCount).forEach(([type, count]) => {
61
- console.log(` ${type}: ${count} items`);
62
- });
63
-
64
- // Test complete
65
- console.log("Registry test completed successfully!");
66
- } catch (error) {
67
- console.error("Error testing registry:", error);
68
- process.exit(1);
69
- }
70
- }
71
-
72
- // Run the test
73
- main();
package/test-imports.mjs DELETED
@@ -1,19 +0,0 @@
1
- // Test file to verify all import styles work correctly
2
-
3
- // Test 1: Direct import from @hanzo/ui (top-level)
4
- import { Button, Card } from '@hanzo/ui'
5
- console.log('✓ Top-level import works:', typeof Button, typeof Card)
6
-
7
- // Test 2: Import from /components (same as top-level)
8
- import { Badge, Alert } from '@hanzo/ui/components'
9
- console.log('✓ Components import works:', typeof Badge, typeof Alert)
10
-
11
- // Test 3: Utility imports
12
- import { cn } from '@hanzo/ui/lib/utils'
13
- console.log('✓ Utils import works:', typeof cn)
14
-
15
- console.log('\n🎉 All main import styles are working correctly!')
16
- console.log('\nSupported import styles:')
17
- console.log(' - import { Button } from "@hanzo/ui"')
18
- console.log(' - import { Button } from "@hanzo/ui/components"')
19
- console.log(' - import { cn } from "@hanzo/ui/lib/utils"')
package/tsconfig.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "extends": "../tsconfig.hanzo.base.json",
3
- "include": [
4
- "src/**/*.ts",
5
- "src/**/*.tsx"
6
- ],
7
- "exclude": [
8
- "node_modules",
9
- "dist",
10
- "bin",
11
- "test"
12
- ],
13
- "compilerOptions": {
14
- "noEmit": false,
15
- "declaration": true,
16
- "outDir": "./dist",
17
- "skipLibCheck": true,
18
- "rootDir": "./src",
19
- "types": ["node"],
20
- "verbatimModuleSyntax": false
21
- }
22
- }
package/utils.ts DELETED
@@ -1,9 +0,0 @@
1
- import { type ClassValue, clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs));
6
- }
7
-
8
- // Re-export from src/utils for backward compatibility
9
- export * from './src/utils';