@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.
- package/assets/general.tsx +1 -1
- package/assets/hanzo-logo.tsx +3 -1
- package/assets/index.ts +119 -5
- package/blocks/auth/index.ts +6 -0
- package/blocks/auth/login-2fa.tsx +165 -0
- package/blocks/auth/login-basic.tsx +94 -0
- package/blocks/auth/login-social.tsx +148 -0
- package/blocks/auth/magic-link.tsx +129 -0
- package/blocks/auth/password-reset.tsx +97 -0
- package/blocks/auth/signup.tsx +157 -0
- package/blocks/data-display/activity-feed.tsx +242 -0
- package/blocks/data-display/data-table.tsx +235 -0
- package/blocks/data-display/stats-grid.tsx +194 -0
- package/blocks/ecommerce/checkout.tsx +242 -0
- package/blocks/ecommerce/index.ts +7 -0
- package/blocks/ecommerce/product-detail.tsx +257 -0
- package/blocks/ecommerce/product-grid.tsx +148 -0
- package/blocks/ecommerce/shopping-cart.tsx +181 -0
- package/blocks/marketing/cta-section.tsx +207 -0
- package/blocks/marketing/faq.tsx +159 -0
- package/blocks/marketing/features-grid.tsx +156 -0
- package/blocks/marketing/hero-section.tsx +192 -0
- package/blocks/marketing/index.ts +6 -0
- package/blocks/marketing/pricing-table.tsx +121 -0
- package/blocks/marketing/testimonials.tsx +196 -0
- package/components/index.ts +4 -51
- package/dist/index.js +9351 -0
- package/dist/index.mjs +9340 -0
- package/dist/lib/utils.js +47 -0
- package/dist/lib/utils.mjs +28 -0
- package/dist/src/utils.js +47 -0
- package/dist/src/utils.mjs +28 -0
- package/dist/tailwind/index.js +2050 -0
- package/dist/tailwind/index.mjs +2019 -0
- package/dist/types/index.js +79 -0
- package/dist/types/index.mjs +56 -0
- package/dist/util/format-text.js +51 -0
- package/dist/util/format-text.mjs +32 -0
- package/dist/util/index.js +384 -0
- package/dist/util/index.mjs +363 -0
- package/frameworks/core/index.ts +6 -0
- package/frameworks/core/utils/index.ts +64 -0
- package/frameworks/react/components/button.tsx +26 -0
- package/frameworks/react/components/index.ts +5 -0
- package/frameworks/react/hooks/index.ts +5 -0
- package/frameworks/react/index.ts +9 -0
- package/frameworks/react/package.json +8 -0
- package/frameworks/react/utils/index.ts +2 -0
- package/frameworks/react-native/index.ts +9 -0
- package/frameworks/react-native/package.json +8 -0
- package/frameworks/registry.json +371 -0
- package/frameworks/setup.sh +69 -0
- package/frameworks/svelte/index.ts +9 -0
- package/frameworks/svelte/package.json +8 -0
- package/frameworks/tracker.json +1854 -0
- package/frameworks/vue/index.ts +9 -0
- package/frameworks/vue/package.json +8 -0
- package/package.json +192 -28
- package/primitives/accordion.tsx +1 -1
- package/primitives/alert-dialog.tsx +1 -1
- package/primitives/alert.tsx +1 -1
- package/primitives/avatar.tsx +1 -1
- package/primitives/badge.tsx +2 -1
- package/primitives/breadcrumb.tsx +1 -1
- package/primitives/button.tsx +37 -47
- package/primitives/card.tsx +1 -1
- package/primitives/carousel.tsx +3 -2
- package/primitives/chat/chat-input-area.tsx +5 -4
- package/primitives/chat/chat-input.tsx +2 -2
- package/primitives/chat/files-preview.tsx +5 -4
- package/primitives/chat/message-list.tsx +2 -1
- package/primitives/chat/sqlite-preview.tsx +8 -8
- package/primitives/checkbox.tsx +2 -1
- package/primitives/command.tsx +3 -1
- package/primitives/context-menu.tsx +1 -1
- package/primitives/dialog.tsx +6 -1
- package/primitives/drawer.tsx +4 -1
- package/primitives/dropdown-menu.tsx +1 -1
- package/primitives/file-uploader.tsx +4 -2
- package/primitives/form.tsx +1 -1
- package/primitives/hover-card.tsx +1 -1
- package/primitives/icons/github.tsx +2 -2
- package/primitives/icons/youtube-logo.tsx +1 -1
- package/primitives/index-common.ts +7 -6
- package/primitives/input-otp.tsx +1 -1
- package/primitives/input.tsx +2 -1
- package/primitives/label.tsx +2 -1
- package/primitives/markdown-preview.tsx +3 -0
- package/primitives/mermaid.tsx +13 -18
- package/primitives/next/image.tsx +2 -1
- package/primitives/next/inline-icon.tsx +14 -14
- package/primitives/next/media-stack.tsx +2 -19
- package/primitives/pagination.tsx +1 -1
- package/primitives/popover.tsx +4 -2
- package/primitives/progress.tsx +2 -1
- package/primitives/prompt-textarea.tsx +1 -1
- package/primitives/radio-group.tsx +1 -1
- package/primitives/scroll-area.tsx +1 -1
- package/primitives/search-input.tsx +1 -1
- package/primitives/select.tsx +1 -1
- package/primitives/separator.tsx +2 -1
- package/primitives/sheet.tsx +1 -1
- package/primitives/skeleton.tsx +1 -0
- package/primitives/slider.tsx +2 -1
- package/primitives/stepper.tsx +1 -1
- package/primitives/switch.tsx +2 -1
- package/primitives/table.tsx +1 -1
- package/primitives/tabs.tsx +1 -1
- package/primitives/textarea.tsx +2 -1
- package/primitives/textfield.tsx +1 -0
- package/primitives/toggle-group.tsx +1 -1
- package/primitives/toggle.tsx +1 -1
- package/primitives/tooltip.tsx +1 -1
- package/src/hooks/use-copy-clipboard.ts +1 -1
- package/src/index-lean.ts +87 -0
- package/src/index.ts +54 -0
- package/src/registry/api.ts +1 -1
- package/src/utils.ts +19 -1
- package/tailwind/tailwind.config.hanzo-preset.js +7 -7
- package/tailwind/typo-plugin/index.js +1 -1
- package/types/animation-def.ts +1 -1
- package/types/index.ts +2 -1
- package/util/blob.ts +9 -4
- package/util/date.ts +2 -1
- package/util/format-text.ts +2 -1
- package/util/index.ts +103 -0
- package/util/spread-to-transform.ts +9 -8
- package/MCP-INSTRUCTIONS.md +0 -73
- package/README-MCP.md +0 -175
- package/dist/button.d.ts +0 -1
- package/dist/button.js +0 -1
- package/dist/hooks/index.d.ts +0 -7
- package/dist/hooks/index.js +0 -7
- package/dist/hooks/use-click-away.d.ts +0 -2
- package/dist/hooks/use-click-away.js +0 -23
- package/dist/hooks/use-combined-refs.d.ts +0 -3
- package/dist/hooks/use-combined-refs.js +0 -18
- package/dist/hooks/use-copy-clipboard.d.ts +0 -9
- package/dist/hooks/use-copy-clipboard.js +0 -21
- package/dist/hooks/use-debounce.d.ts +0 -1
- package/dist/hooks/use-debounce.js +0 -13
- package/dist/hooks/use-fill-ids.d.ts +0 -8
- package/dist/hooks/use-fill-ids.js +0 -20
- package/dist/hooks/use-map.d.ts +0 -1
- package/dist/hooks/use-map.js +0 -20
- package/dist/hooks/use-measure.d.ts +0 -8
- package/dist/hooks/use-measure.js +0 -25
- package/dist/hooks/use-reverse-video-playback.d.ts +0 -1
- package/dist/hooks/use-reverse-video-playback.js +0 -41
- package/dist/hooks/use-scroll-restoration.d.ts +0 -8
- package/dist/hooks/use-scroll-restoration.js +0 -36
- package/dist/mcp/enhanced-server.d.ts +0 -29
- package/dist/mcp/enhanced-server.js +0 -1128
- package/dist/mcp/index.d.ts +0 -28
- package/dist/mcp/index.js +0 -436
- package/dist/registry/api.d.ts +0 -37
- package/dist/registry/api.js +0 -129
- package/dist/registry/index.d.ts +0 -353
- package/dist/registry/index.js +0 -45
- package/dist/utils.d.ts +0 -1
- package/dist/utils.js +0 -1
- package/environment.d.ts +0 -6
- package/public/r/accordion.json +0 -11
- package/public/r/alert.json +0 -11
- package/public/r/avatar.json +0 -11
- package/public/r/badge.json +0 -11
- package/public/r/button.json +0 -11
- package/public/r/card.json +0 -11
- package/public/r/checkbox.json +0 -11
- package/public/r/default.json +0 -6
- package/public/r/dialog.json +0 -11
- package/public/r/input.json +0 -11
- package/public/r/label.json +0 -11
- package/public/r/new-york.json +0 -6
- package/public/r/popover.json +0 -11
- package/public/r/select.json +0 -11
- package/public/r/table.json +0 -11
- package/public/r/tabs.json +0 -11
- package/public/r/toast.json +0 -11
- package/registry.json +0 -184
- package/test/test-registry.js +0 -73
- package/test-imports.mjs +0 -19
- package/tsconfig.json +0 -22
- 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
|
-
}
|
package/test/test-registry.js
DELETED
|
@@ -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';
|