@hanzo/ui 4.5.4 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +229 -0
  2. package/bin/create-registry.js +1 -1
  3. package/bin/test-mcp.sh +1 -1
  4. package/bin/update-registry.js +2 -2
  5. package/dist/index.d.mts +16 -0
  6. package/dist/index.d.ts +16 -0
  7. package/dist/index.js +9458 -0
  8. package/dist/index.mjs +9449 -0
  9. package/dist/lib/utils.d.mts +2 -0
  10. package/dist/lib/utils.d.ts +2 -0
  11. package/dist/lib/utils.js +47 -0
  12. package/dist/lib/utils.mjs +28 -0
  13. package/dist/src/utils.d.mts +7 -0
  14. package/dist/src/utils.d.ts +7 -0
  15. package/dist/src/utils.js +47 -0
  16. package/dist/src/utils.mjs +28 -0
  17. package/dist/tailwind/index.d.mts +2 -0
  18. package/dist/tailwind/index.d.ts +2 -0
  19. package/dist/tailwind/index.js +2048 -0
  20. package/dist/tailwind/index.mjs +2017 -0
  21. package/dist/types/index.d.mts +12 -0
  22. package/dist/types/index.d.ts +12 -0
  23. package/dist/types/index.js +79 -0
  24. package/dist/types/index.mjs +56 -0
  25. package/package.json +170 -23
  26. package/style/theme-provider.tsx +1 -1
  27. package/MCP-INSTRUCTIONS.md +0 -73
  28. package/README-MCP.md +0 -175
  29. package/blocks/components/accordian-block.tsx +0 -48
  30. package/blocks/components/block-component-props.ts +0 -11
  31. package/blocks/components/bullet-cards-block.tsx +0 -46
  32. package/blocks/components/card-block/index.tsx +0 -171
  33. package/blocks/components/card-block/link-out-button.tsx +0 -20
  34. package/blocks/components/card-block/util.ts +0 -28
  35. package/blocks/components/carte-blanche-block/index.tsx +0 -127
  36. package/blocks/components/carte-blanche-block/variant-content-left.tsx +0 -49
  37. package/blocks/components/content.tsx +0 -70
  38. package/blocks/components/cta-block.tsx +0 -115
  39. package/blocks/components/enh-heading-block.tsx +0 -204
  40. package/blocks/components/grid-block/grid-block-mutator.ts +0 -12
  41. package/blocks/components/grid-block/index.tsx +0 -83
  42. package/blocks/components/grid-block/mutator-registry.ts +0 -10
  43. package/blocks/components/grid-block/table-borders.mutator.ts +0 -47
  44. package/blocks/components/group-block.tsx +0 -83
  45. package/blocks/components/heading-block.tsx +0 -88
  46. package/blocks/components/image-block.tsx +0 -111
  47. package/blocks/components/index.ts +0 -30
  48. package/blocks/components/screenful-block/content.tsx +0 -123
  49. package/blocks/components/screenful-block/index.tsx +0 -107
  50. package/blocks/components/screenful-block/poster-background.tsx +0 -34
  51. package/blocks/components/screenful-block/video-background.tsx +0 -45
  52. package/blocks/components/space-block.tsx +0 -66
  53. package/blocks/components/video-block.tsx +0 -138
  54. package/blocks/def/accordian-block.ts +0 -14
  55. package/blocks/def/block.ts +0 -7
  56. package/blocks/def/bullet-cards-block.ts +0 -22
  57. package/blocks/def/card-block.ts +0 -22
  58. package/blocks/def/carte-blanche-block.ts +0 -21
  59. package/blocks/def/cta-block.ts +0 -19
  60. package/blocks/def/element-block.ts +0 -11
  61. package/blocks/def/enh-heading-block.ts +0 -44
  62. package/blocks/def/grid-block.ts +0 -16
  63. package/blocks/def/group-block.ts +0 -11
  64. package/blocks/def/heading-block.ts +0 -15
  65. package/blocks/def/image-block.ts +0 -31
  66. package/blocks/def/index.ts +0 -35
  67. package/blocks/def/screenful-block.ts +0 -54
  68. package/blocks/def/space-block.ts +0 -64
  69. package/blocks/def/video-block.ts +0 -9
  70. package/blocks/index.ts +0 -2
  71. package/dist/mcp/enhanced-server.d.ts +0 -29
  72. package/dist/mcp/enhanced-server.js +0 -1128
  73. package/dist/mcp/index.d.ts +0 -28
  74. package/dist/mcp/index.js +0 -436
  75. package/dist/registry/api.d.ts +0 -37
  76. package/dist/registry/api.js +0 -129
  77. package/dist/registry/index.d.ts +0 -353
  78. package/dist/registry/index.js +0 -45
  79. package/environment.d.ts +0 -6
  80. package/primitives/accordion.tsx +0 -66
  81. package/primitives/action-button.tsx +0 -42
  82. package/primitives/apply-typography.tsx +0 -55
  83. package/primitives/aspect-ratio.tsx +0 -5
  84. package/primitives/avatar.tsx +0 -49
  85. package/primitives/badge.tsx +0 -36
  86. package/primitives/breadcrumb.tsx +0 -115
  87. package/primitives/breakpoint-indicator.tsx +0 -19
  88. package/primitives/button.tsx +0 -85
  89. package/primitives/calendar.tsx +0 -72
  90. package/primitives/card.tsx +0 -83
  91. package/primitives/carousel.tsx +0 -237
  92. package/primitives/checkbox.tsx +0 -32
  93. package/primitives/combobox.tsx +0 -239
  94. package/primitives/command.tsx +0 -157
  95. package/primitives/context-menu.tsx +0 -200
  96. package/primitives/dialog-video-controller.tsx +0 -38
  97. package/primitives/dialog.tsx +0 -157
  98. package/primitives/drawer.tsx +0 -138
  99. package/primitives/form.tsx +0 -178
  100. package/primitives/icons/github.tsx +0 -14
  101. package/primitives/icons/index.ts +0 -18
  102. package/primitives/icons/youtube-logo.tsx +0 -59
  103. package/primitives/index-common.ts +0 -224
  104. package/primitives/index-next.ts +0 -2
  105. package/primitives/input-otp.tsx +0 -65
  106. package/primitives/input.tsx +0 -30
  107. package/primitives/label.tsx +0 -28
  108. package/primitives/list-adaptor.ts +0 -12
  109. package/primitives/list-box.tsx +0 -74
  110. package/primitives/loading-spinner.tsx +0 -33
  111. package/primitives/navigation-menu.tsx +0 -147
  112. package/primitives/next/image.tsx +0 -90
  113. package/primitives/next/index.ts +0 -7
  114. package/primitives/next/inline-icon.tsx +0 -36
  115. package/primitives/next/link-element.tsx +0 -109
  116. package/primitives/next/mdx-link.tsx +0 -22
  117. package/primitives/next/media-stack.tsx +0 -69
  118. package/primitives/next/nav-items.tsx +0 -45
  119. package/primitives/next/youtube-embed.tsx +0 -83
  120. package/primitives/popover.tsx +0 -37
  121. package/primitives/progress.tsx +0 -27
  122. package/primitives/radio-group.tsx +0 -56
  123. package/primitives/scroll-area.tsx +0 -47
  124. package/primitives/select.tsx +0 -169
  125. package/primitives/separator.tsx +0 -29
  126. package/primitives/sheet.tsx +0 -178
  127. package/primitives/skeleton.tsx +0 -20
  128. package/primitives/slider.tsx +0 -72
  129. package/primitives/sonner.tsx +0 -35
  130. package/primitives/step-indicator.tsx +0 -69
  131. package/primitives/switch.tsx +0 -35
  132. package/primitives/table.tsx +0 -117
  133. package/primitives/tabs.tsx +0 -60
  134. package/primitives/text-area.tsx +0 -26
  135. package/primitives/toggle-group.tsx +0 -63
  136. package/primitives/toggle.tsx +0 -73
  137. package/primitives/tooltip.tsx +0 -48
  138. package/primitives/video-player.tsx +0 -23
  139. package/public/r/accordion.json +0 -11
  140. package/public/r/alert.json +0 -11
  141. package/public/r/avatar.json +0 -11
  142. package/public/r/badge.json +0 -11
  143. package/public/r/button.json +0 -11
  144. package/public/r/card.json +0 -11
  145. package/public/r/checkbox.json +0 -11
  146. package/public/r/default.json +0 -6
  147. package/public/r/dialog.json +0 -11
  148. package/public/r/input.json +0 -11
  149. package/public/r/label.json +0 -11
  150. package/public/r/new-york.json +0 -6
  151. package/public/r/popover.json +0 -11
  152. package/public/r/select.json +0 -11
  153. package/public/r/table.json +0 -11
  154. package/public/r/tabs.json +0 -11
  155. package/public/r/toast.json +0 -11
  156. package/registry.json +0 -184
  157. package/src/mcp/README.md +0 -141
  158. package/src/mcp/enhanced-server.ts +0 -1208
  159. package/src/mcp/index.ts +0 -518
  160. package/src/mcp/package.json +0 -10
  161. package/src/registry/api.ts +0 -164
  162. package/src/registry/index.ts +0 -60
  163. package/src/registry/package.json +0 -10
  164. package/tailwind/colors.tailwind.js +0 -53
  165. package/tailwind/fontFamily.tailwind.ts +0 -7
  166. package/tailwind/fontSize.tailwind.ts +0 -13
  167. package/tailwind/index.ts +0 -7
  168. package/tailwind/safelist.tailwind.js +0 -26
  169. package/tailwind/screens.tailwind.js +0 -8
  170. package/tailwind/spacing.tailwind.js +0 -65
  171. package/tailwind/tailwind.config.hanzo-preset.d.ts +0 -5
  172. package/tailwind/tailwind.config.hanzo-preset.js +0 -915
  173. package/tailwind/tw-font-desc.ts +0 -15
  174. package/tailwind/typo-plugin/get-plugin-styles.js +0 -679
  175. package/tailwind/typo-plugin/index.d.ts +0 -9
  176. package/tailwind/typo-plugin/index.js +0 -141
  177. package/tailwind/typo-plugin/utils.js +0 -60
  178. package/tailwind/typography-test.mdx +0 -35
  179. package/tailwind/z-index.tailwind.js +0 -71
  180. package/test/test-registry.js +0 -73
  181. package/tsconfig.json +0 -22
  182. package/types/animation-def.ts +0 -3
  183. package/types/breakpoints.ts +0 -11
  184. package/types/bullet-item.ts +0 -10
  185. package/types/button-def.ts +0 -39
  186. package/types/dimensions.ts +0 -8
  187. package/types/grid-def.ts +0 -56
  188. package/types/image-def.ts +0 -32
  189. package/types/index.ts +0 -29
  190. package/types/link-def.ts +0 -56
  191. package/types/media-stack-def.ts +0 -31
  192. package/types/t-shirt-size.ts +0 -5
  193. package/types/tshirt-dimensions.ts +0 -20
  194. package/types/video-def.ts +0 -25
  195. package/util/format-and-abbreviate-as-currency.ts +0 -125
  196. package/util/format-to-max-char.ts +0 -68
  197. package/util/index-client.ts +0 -3
  198. package/util/index.ts +0 -78
  199. package/util/number-abbreviate.ts +0 -49
  200. package/util/specifier.ts +0 -43
  201. package/util/spread-to-transform.ts +0 -24
  202. package/util/step-animation.ts +0 -90
  203. package/util/two-way-map.ts +0 -19
package/README.md ADDED
@@ -0,0 +1,229 @@
1
+ # @hanzo/ui
2
+
3
+ A comprehensive UI component library for Hanzo applications, built with React and TypeScript.
4
+
5
+ ## Version 4.5.6
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @hanzo/ui
11
+ # or
12
+ pnpm add @hanzo/ui
13
+ # or
14
+ yarn add @hanzo/ui
15
+ ```
16
+
17
+ ## Components
18
+
19
+ ### Primitives
20
+
21
+ Core UI components based on Radix UI primitives:
22
+
23
+ - **Accordion** - Collapsible content panels
24
+ - **Alert** - Informative alert messages
25
+ - **AlertDialog** - Modal dialogs for important alerts
26
+ - **Avatar** - User avatar display
27
+ - **Badge** - Status and label badges
28
+ - **Breadcrumb** - Navigation breadcrumbs
29
+ - **Button** - Interactive buttons with variants
30
+ - **Calendar** - Date picker calendar
31
+ - **Card** - Container cards for content
32
+ - **Carousel** - Image/content carousel
33
+ - **Checkbox** - Checkbox input
34
+ - **Collapsible** - Collapsible content sections
35
+ - **Combobox** - Searchable select dropdown
36
+ - **Command** - Command palette component
37
+ - **ContextMenu** - Right-click context menus
38
+ - **Dialog** - Modal dialogs
39
+ - **Drawer** - Slide-out drawer panels
40
+ - **DropdownMenu** - Dropdown menu component
41
+ - **Form** - Form components with validation
42
+ - **HoverCard** - Hover-triggered info cards
43
+ - **Input** - Text input field
44
+ - **InputOTP** - One-time password input
45
+ - **Label** - Form labels
46
+ - **NavigationMenu** - Navigation menu bar
47
+ - **Popover** - Popover overlays
48
+ - **Progress** - Progress indicators
49
+ - **RadioGroup** - Radio button groups
50
+ - **ResizablePanel** - Resizable panel layouts
51
+ - **ScrollArea** - Custom scrollable areas
52
+ - **SearchInput** - Search input with icon
53
+ - **Select** - Select dropdown
54
+ - **Separator** - Visual separator line
55
+ - **Sheet** - Side sheet panels
56
+ - **Skeleton** - Loading skeleton screens
57
+ - **Slider** - Range slider input
58
+ - **Switch** - Toggle switch
59
+ - **Table** - Data tables
60
+ - **Tabs** - Tabbed interfaces
61
+ - **TextArea** - Multi-line text input
62
+ - **TextField** - Enhanced text input
63
+ - **Toast** - Toast notifications (via Sonner)
64
+ - **Toggle** - Toggle buttons
65
+ - **ToggleGroup** - Grouped toggle buttons
66
+ - **Tooltip** - Hover tooltips
67
+ - **VideoPlayer** - Video playback component
68
+
69
+ ### Assets
70
+
71
+ Icon components and visual assets:
72
+
73
+ #### AI Provider Icons
74
+ - **AnthropicIcon** - Anthropic AI logo
75
+ - **OpenAIIcon** - OpenAI logo
76
+ - **GeminiIcon** - Google Gemini logo
77
+ - **DeepSeekIcon** - DeepSeek logo
78
+ - **MistralIcon** - Mistral AI logo
79
+ - **MetaIcon** - Meta AI logo
80
+ - **GroqIcon** - Groq logo
81
+ - **OllamaIcon** - Ollama logo
82
+ - **HanzoIcon** - Hanzo AI logo
83
+ - **TogetherAI** - Together AI logo
84
+ - **ExoIcon** - Exo logo
85
+ - **GrokIcon** - Grok logo
86
+ - **LmStudioIcon** - LM Studio logo
87
+ - **OpenRouterIcon** - OpenRouter logo
88
+ - **PerplexityIcon** - Perplexity logo
89
+ - **QwenIcon** - Qwen logo
90
+ - **AyaCohereIcon** - Aya/Cohere logo
91
+
92
+ #### Feature Icons
93
+ - **AIAgentIcon** - AI agent indicator
94
+ - **AisIcon** - AI services icon
95
+ - **ReactJsIcon** - React.js logo
96
+ - **ReasoningIcon** - AI reasoning indicator
97
+ - **ToolsIcon** - Tools/utilities icon
98
+ - **TracingIcon** - Tracing/monitoring icon
99
+ - **ScheduledTasksIcon** - Scheduled tasks icon
100
+ - **SendIcon** - Send/submit icon
101
+
102
+ #### File Type Icons
103
+ - **FileTypeIcon** - Dynamic file type icon based on extension
104
+ - **DirectoryTypeIcon** - Folder/directory icon
105
+
106
+ ### Utilities
107
+
108
+ Helper functions and hooks:
109
+
110
+ - **cn()** - Class name utility (clsx + tailwind-merge)
111
+ - **markdown()** - Markdown to JSX converter
112
+ - **formatText()** - Text formatting utilities
113
+ - **useDebounce()** - Debounce hook
114
+ - **useMap()** - Map state management hook
115
+ - **formatDateToLocaleStringWithTime()** - Date formatting
116
+ - **getFileExt()** - File extension extraction
117
+ - **hexToRgb()** - Color conversion utilities
118
+
119
+ ### Custom Components
120
+
121
+ Additional enhanced components:
122
+
123
+ - **ChatInput** - Chat message input
124
+ - **ChatInputArea** - Multi-line chat input
125
+ - **ChatSettingsIcon** - Chat settings icon
126
+ - **CopyToClipboardIcon** - Copy to clipboard button
127
+ - **DotsLoader** - Loading dots animation
128
+ - **FileList** - File list display
129
+ - **FileUploader** - File upload component
130
+ - **JsonForm** - JSON-based dynamic forms
131
+ - **MarkdownText** - Markdown renderer
132
+ - **PrettyJsonPrint** - Formatted JSON display
133
+
134
+ ## Styling
135
+
136
+ The library uses Tailwind CSS for styling. Make sure your application includes Tailwind CSS configuration.
137
+
138
+ ## Dependencies
139
+
140
+ Key peer dependencies:
141
+ - React 18.3.1+
142
+ - React DOM 18.3.1+
143
+ - @hookform/resolvers ^3.3.2
144
+ - react-hook-form 7.51.4
145
+ - lucide-react 0.456.0
146
+ - next-themes ^0.2.1
147
+ - embla-carousel ^8.1.6
148
+
149
+ ## Usage Examples
150
+
151
+ ### Basic Button
152
+
153
+ ```tsx
154
+ import { Button } from '@hanzo/ui';
155
+
156
+ function App() {
157
+ return (
158
+ <Button variant="primary" onClick={() => console.log('clicked')}>
159
+ Click me
160
+ </Button>
161
+ );
162
+ }
163
+ ```
164
+
165
+ ### Alert Dialog
166
+
167
+ ```tsx
168
+ import {
169
+ AlertDialog,
170
+ AlertDialogTrigger,
171
+ AlertDialogContent,
172
+ AlertDialogHeader,
173
+ AlertDialogTitle,
174
+ AlertDialogDescription,
175
+ AlertDialogFooter,
176
+ AlertDialogAction,
177
+ AlertDialogCancel
178
+ } from '@hanzo/ui';
179
+
180
+ function ConfirmDialog() {
181
+ return (
182
+ <AlertDialog>
183
+ <AlertDialogTrigger>
184
+ <Button>Open Dialog</Button>
185
+ </AlertDialogTrigger>
186
+ <AlertDialogContent>
187
+ <AlertDialogHeader>
188
+ <AlertDialogTitle>Are you sure?</AlertDialogTitle>
189
+ <AlertDialogDescription>
190
+ This action cannot be undone.
191
+ </AlertDialogDescription>
192
+ </AlertDialogHeader>
193
+ <AlertDialogFooter>
194
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
195
+ <AlertDialogAction>Continue</AlertDialogAction>
196
+ </AlertDialogFooter>
197
+ </AlertDialogContent>
198
+ </AlertDialog>
199
+ );
200
+ }
201
+ ```
202
+
203
+ ### AI Provider Icons
204
+
205
+ ```tsx
206
+ import { OpenAIIcon, AnthropicIcon, GeminiIcon } from '@hanzo/ui/assets';
207
+
208
+ function AIProviders() {
209
+ return (
210
+ <div className="flex gap-4">
211
+ <OpenAIIcon className="h-6 w-6" />
212
+ <AnthropicIcon className="h-6 w-6" />
213
+ <GeminiIcon className="h-6 w-6" />
214
+ </div>
215
+ );
216
+ }
217
+ ```
218
+
219
+ ## License
220
+
221
+ BSD-3-Clause
222
+
223
+ ## Author
224
+
225
+ Hanzo AI, Inc.
226
+
227
+ ## Repository
228
+
229
+ https://github.com/hanzoai/react-sdk
@@ -16,7 +16,7 @@ const REGISTRY_STYLES = ['default', 'new-york'];
16
16
 
17
17
  // Registry schema
18
18
  const registrySchema = {
19
- "$schema": "https://ui.shadcn.com/schema/registry.json",
19
+ "$schema": "https://ui.hanzo.com/schema/registry.json",
20
20
  "name": "hanzo",
21
21
  "homepage": "https://ui.hanzo.ai",
22
22
  "items": []
package/bin/test-mcp.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # Test script for verifying the Hanzo UI MCP functionality
4
4
 
5
5
  # Set a test registry URL
6
- export REGISTRY_URL="https://ui.shadcn.com/registry/registry.json"
6
+ export REGISTRY_URL="https://ui.hanzo.com/registry/registry.json"
7
7
 
8
8
  echo "Testing Hanzo UI MCP Server"
9
9
  echo "============================"
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * This script updates the registry.json file based on components
5
- * found in the registry directory. It's similar to the approach used by shadcn/ui.
5
+ * found in the registry directory. It's similar to the approach used by hanzo/ui.
6
6
  */
7
7
 
8
8
  const fs = require('fs');
@@ -17,7 +17,7 @@ const REGISTRY_STYLES = ['default', 'new-york']; // Add other styles as needed
17
17
 
18
18
  // Schema for registry.json
19
19
  const registrySchema = {
20
- "$schema": "https://ui.shadcn.com/schema/registry.json",
20
+ "$schema": "https://ui.hanzo.com/schema/registry.json",
21
21
  "name": "hanzo",
22
22
  "homepage": "https://ui.hanzo.ai",
23
23
  "items": []
@@ -0,0 +1,16 @@
1
+ export * from './primitives/index-common.ts';
2
+ export * from './primitives/next/index.ts';
3
+ import './types/animation-def.ts';
4
+ import './types/breakpoints.ts';
5
+ import './types/bullet-item.ts';
6
+ import './types/button-def.ts';
7
+ import './types/dimensions.ts';
8
+ import './types/grid-def.ts';
9
+ import './types/image-def.ts';
10
+ import './types/link-def.ts';
11
+ import './types/tshirt-dimensions.ts';
12
+ import './types/t-shirt-size.ts';
13
+ import './types/video-def.ts';
14
+ import './types/media-stack-def.ts';
15
+ import './tailwind/tailwind.config.hanzo-preset.js';
16
+ import './tailwind/tw-font-desc.ts';
@@ -0,0 +1,16 @@
1
+ export * from './primitives/index-common.ts';
2
+ export * from './primitives/next/index.ts';
3
+ import './types/animation-def.ts';
4
+ import './types/breakpoints.ts';
5
+ import './types/bullet-item.ts';
6
+ import './types/button-def.ts';
7
+ import './types/dimensions.ts';
8
+ import './types/grid-def.ts';
9
+ import './types/image-def.ts';
10
+ import './types/link-def.ts';
11
+ import './types/tshirt-dimensions.ts';
12
+ import './types/t-shirt-size.ts';
13
+ import './types/video-def.ts';
14
+ import './types/media-stack-def.ts';
15
+ import './tailwind/tailwind.config.hanzo-preset.js';
16
+ import './tailwind/tw-font-desc.ts';