@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/registry.json DELETED
@@ -1,184 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.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/src/mcp/README.md DELETED
@@ -1,141 +0,0 @@
1
- # Hanzo UI MCP Server
2
-
3
- The Hanzo UI MCP (Model Context Protocol) server provides AI assistants with comprehensive access to the Hanzo UI component library, enabling them to browse, search, and help developers use Hanzo UI components effectively.
4
-
5
- ## Quick Start
6
-
7
- ### For AI Clients
8
-
9
- Configure your AI client to use the Hanzo UI MCP server:
10
-
11
- **Claude Desktop** (`.mcp.json`):
12
- ```json
13
- {
14
- "mcpServers": {
15
- "hanzo-ui": {
16
- "command": "npx",
17
- "args": ["@hanzo/ui@latest", "mcp"]
18
- }
19
- }
20
- }
21
- ```
22
-
23
- **Cursor** (`.cursor/mcp.json`):
24
- ```json
25
- {
26
- "mcpServers": {
27
- "hanzo-ui": {
28
- "command": "npx",
29
- "args": ["@hanzo/ui@latest", "mcp"]
30
- }
31
- }
32
- }
33
- ```
34
-
35
- **VS Code** (`.vscode/mcp.json`):
36
- ```json
37
- {
38
- "mcpServers": {
39
- "hanzo-ui": {
40
- "command": "npx",
41
- "args": ["@hanzo/ui@latest", "mcp"]
42
- }
43
- }
44
- }
45
- ```
46
-
47
- ### Manual Usage
48
-
49
- ```bash
50
- # Run the MCP server (stdio mode for AI clients)
51
- npx @hanzo/ui mcp
52
-
53
- # Run in HTTP mode for testing
54
- npx @hanzo/ui mcp --http --port 3333
55
-
56
- # Use custom registry
57
- npx @hanzo/ui mcp --registry https://my-registry.com/registry.json
58
-
59
- # Legacy command (still works)
60
- npx @hanzo/ui registry:mcp
61
- ```
62
-
63
- ## Available Tools
64
-
65
- The enhanced MCP server provides comprehensive tools:
66
-
67
- 1. **Component Management**
68
- - `init` - Initialize a new project with Hanzo UI
69
- - `list_components` - List all available components
70
- - `get_component` - Get detailed component information
71
- - `get_component_source` - Get full component source code
72
- - `get_component_demo` - Get demo implementation
73
- - `add_component` - Get installation instructions
74
-
75
- 2. **Blocks & Patterns**
76
- - `list_blocks` - List UI blocks and patterns
77
- - `get_block` - Get block details
78
-
79
- 3. **Search & Discovery**
80
- - `search_registry` - Search components by name/description
81
- - `list_styles` - View available styles
82
- - `get_installation_guide` - Complete setup guide
83
-
84
- ## Available Resources
85
-
86
- The MCP server exposes these resources:
87
- - `hanzo://components/list` - Complete component catalog
88
- - `hanzo://blocks/list` - UI blocks and patterns
89
- - `hanzo://installation/guide` - Installation guide
90
- - `hanzo://theming/guide` - Theming documentation
91
-
92
- ## Available Prompts
93
-
94
- AI-assisted development prompts:
95
- - `component_usage` - Generate usage examples
96
- - `build_page` - Build complete pages
97
- - `component_composition` - Create custom components
98
- - `accessibility_review` - Review accessibility
99
- - `theme_customization` - Generate custom themes
100
-
101
- ## Example Interactions
102
-
103
- Ask your AI assistant:
104
-
105
- - "Show me all available Hanzo UI components"
106
- - "How do I use the Dialog component?"
107
- - "Build a login form using Hanzo UI"
108
- - "Create a dashboard layout with Hanzo components"
109
- - "Generate a dark theme with purple accents"
110
- - "Create a custom date picker using Hanzo primitives"
111
-
112
- ## Development
113
-
114
- To build the MCP server:
115
-
116
- ```bash
117
- cd pkg/ui
118
- pnpm build
119
- ```
120
-
121
- This will compile the TypeScript files and make the MCP server available.
122
-
123
- ## Registry Format
124
-
125
- The registry follows the same format as shadcn/ui registries, with items defined as:
126
-
127
- ```json
128
- {
129
- "name": "button",
130
- "type": "registry:component",
131
- "description": "A button component with different variants.",
132
- "files": [
133
- {
134
- "path": "components/ui/button.tsx",
135
- "type": "registry:component"
136
- }
137
- ]
138
- }
139
- ```
140
-
141
- To configure your own registry, set the `REGISTRY_URL` environment variable before running the MCP server.