@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
@@ -1,353 +0,0 @@
1
- import { z } from "zod";
2
- export declare const fileSchema: z.ZodObject<{
3
- path: z.ZodString;
4
- content: z.ZodOptional<z.ZodString>;
5
- type: z.ZodString;
6
- target: z.ZodOptional<z.ZodString>;
7
- }, "strip", z.ZodTypeAny, {
8
- path: string;
9
- type: string;
10
- content?: string | undefined;
11
- target?: string | undefined;
12
- }, {
13
- path: string;
14
- type: string;
15
- content?: string | undefined;
16
- target?: string | undefined;
17
- }>;
18
- export declare const registryItemSchema: z.ZodObject<{
19
- name: z.ZodString;
20
- type: z.ZodString;
21
- description: z.ZodOptional<z.ZodString>;
22
- author: z.ZodOptional<z.ZodString>;
23
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
24
- devDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
25
- registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
26
- files: z.ZodOptional<z.ZodArray<z.ZodObject<{
27
- path: z.ZodString;
28
- content: z.ZodOptional<z.ZodString>;
29
- type: z.ZodString;
30
- target: z.ZodOptional<z.ZodString>;
31
- }, "strip", z.ZodTypeAny, {
32
- path: string;
33
- type: string;
34
- content?: string | undefined;
35
- target?: string | undefined;
36
- }, {
37
- path: string;
38
- type: string;
39
- content?: string | undefined;
40
- target?: string | undefined;
41
- }>, "many">>;
42
- meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
43
- title: z.ZodOptional<z.ZodString>;
44
- cssVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
45
- tailwind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
46
- category: z.ZodOptional<z.ZodString>;
47
- subcategory: z.ZodOptional<z.ZodString>;
48
- }, "strip", z.ZodTypeAny, {
49
- type: string;
50
- name: string;
51
- description?: string | undefined;
52
- author?: string | undefined;
53
- dependencies?: string[] | undefined;
54
- devDependencies?: string[] | undefined;
55
- registryDependencies?: string[] | undefined;
56
- files?: {
57
- path: string;
58
- type: string;
59
- content?: string | undefined;
60
- target?: string | undefined;
61
- }[] | undefined;
62
- meta?: Record<string, any> | undefined;
63
- title?: string | undefined;
64
- cssVars?: Record<string, any> | undefined;
65
- tailwind?: Record<string, any> | undefined;
66
- category?: string | undefined;
67
- subcategory?: string | undefined;
68
- }, {
69
- type: string;
70
- name: string;
71
- description?: string | undefined;
72
- author?: string | undefined;
73
- dependencies?: string[] | undefined;
74
- devDependencies?: string[] | undefined;
75
- registryDependencies?: string[] | undefined;
76
- files?: {
77
- path: string;
78
- type: string;
79
- content?: string | undefined;
80
- target?: string | undefined;
81
- }[] | undefined;
82
- meta?: Record<string, any> | undefined;
83
- title?: string | undefined;
84
- cssVars?: Record<string, any> | undefined;
85
- tailwind?: Record<string, any> | undefined;
86
- category?: string | undefined;
87
- subcategory?: string | undefined;
88
- }>;
89
- export declare const registrySchema: z.ZodObject<{
90
- $schema: z.ZodOptional<z.ZodString>;
91
- name: z.ZodString;
92
- homepage: z.ZodOptional<z.ZodString>;
93
- style: z.ZodOptional<z.ZodString>;
94
- items: z.ZodArray<z.ZodObject<{
95
- name: z.ZodString;
96
- type: z.ZodString;
97
- description: z.ZodOptional<z.ZodString>;
98
- author: z.ZodOptional<z.ZodString>;
99
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
100
- devDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
101
- registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
102
- files: z.ZodOptional<z.ZodArray<z.ZodObject<{
103
- path: z.ZodString;
104
- content: z.ZodOptional<z.ZodString>;
105
- type: z.ZodString;
106
- target: z.ZodOptional<z.ZodString>;
107
- }, "strip", z.ZodTypeAny, {
108
- path: string;
109
- type: string;
110
- content?: string | undefined;
111
- target?: string | undefined;
112
- }, {
113
- path: string;
114
- type: string;
115
- content?: string | undefined;
116
- target?: string | undefined;
117
- }>, "many">>;
118
- meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
119
- title: z.ZodOptional<z.ZodString>;
120
- cssVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
121
- tailwind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
122
- category: z.ZodOptional<z.ZodString>;
123
- subcategory: z.ZodOptional<z.ZodString>;
124
- }, "strip", z.ZodTypeAny, {
125
- type: string;
126
- name: string;
127
- description?: string | undefined;
128
- author?: string | undefined;
129
- dependencies?: string[] | undefined;
130
- devDependencies?: string[] | undefined;
131
- registryDependencies?: string[] | undefined;
132
- files?: {
133
- path: string;
134
- type: string;
135
- content?: string | undefined;
136
- target?: string | undefined;
137
- }[] | undefined;
138
- meta?: Record<string, any> | undefined;
139
- title?: string | undefined;
140
- cssVars?: Record<string, any> | undefined;
141
- tailwind?: Record<string, any> | undefined;
142
- category?: string | undefined;
143
- subcategory?: string | undefined;
144
- }, {
145
- type: string;
146
- name: string;
147
- description?: string | undefined;
148
- author?: string | undefined;
149
- dependencies?: string[] | undefined;
150
- devDependencies?: string[] | undefined;
151
- registryDependencies?: string[] | undefined;
152
- files?: {
153
- path: string;
154
- type: string;
155
- content?: string | undefined;
156
- target?: string | undefined;
157
- }[] | undefined;
158
- meta?: Record<string, any> | undefined;
159
- title?: string | undefined;
160
- cssVars?: Record<string, any> | undefined;
161
- tailwind?: Record<string, any> | undefined;
162
- category?: string | undefined;
163
- subcategory?: string | undefined;
164
- }>, "many">;
165
- }, "strip", z.ZodTypeAny, {
166
- name: string;
167
- items: {
168
- type: string;
169
- name: string;
170
- description?: string | undefined;
171
- author?: string | undefined;
172
- dependencies?: string[] | undefined;
173
- devDependencies?: string[] | undefined;
174
- registryDependencies?: string[] | undefined;
175
- files?: {
176
- path: string;
177
- type: string;
178
- content?: string | undefined;
179
- target?: string | undefined;
180
- }[] | undefined;
181
- meta?: Record<string, any> | undefined;
182
- title?: string | undefined;
183
- cssVars?: Record<string, any> | undefined;
184
- tailwind?: Record<string, any> | undefined;
185
- category?: string | undefined;
186
- subcategory?: string | undefined;
187
- }[];
188
- $schema?: string | undefined;
189
- homepage?: string | undefined;
190
- style?: string | undefined;
191
- }, {
192
- name: string;
193
- items: {
194
- type: string;
195
- name: string;
196
- description?: string | undefined;
197
- author?: string | undefined;
198
- dependencies?: string[] | undefined;
199
- devDependencies?: string[] | undefined;
200
- registryDependencies?: string[] | undefined;
201
- files?: {
202
- path: string;
203
- type: string;
204
- content?: string | undefined;
205
- target?: string | undefined;
206
- }[] | undefined;
207
- meta?: Record<string, any> | undefined;
208
- title?: string | undefined;
209
- cssVars?: Record<string, any> | undefined;
210
- tailwind?: Record<string, any> | undefined;
211
- category?: string | undefined;
212
- subcategory?: string | undefined;
213
- }[];
214
- $schema?: string | undefined;
215
- homepage?: string | undefined;
216
- style?: string | undefined;
217
- }>;
218
- export declare const registryWithContentSchema: z.ZodObject<{
219
- $schema: z.ZodOptional<z.ZodString>;
220
- name: z.ZodString;
221
- homepage: z.ZodOptional<z.ZodString>;
222
- style: z.ZodOptional<z.ZodString>;
223
- } & {
224
- items: z.ZodArray<z.ZodObject<{
225
- name: z.ZodString;
226
- type: z.ZodString;
227
- description: z.ZodOptional<z.ZodString>;
228
- author: z.ZodOptional<z.ZodString>;
229
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
230
- devDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
231
- registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
232
- meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
233
- title: z.ZodOptional<z.ZodString>;
234
- cssVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
235
- tailwind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
236
- category: z.ZodOptional<z.ZodString>;
237
- subcategory: z.ZodOptional<z.ZodString>;
238
- } & {
239
- files: z.ZodArray<z.ZodObject<{
240
- path: z.ZodString;
241
- type: z.ZodString;
242
- target: z.ZodOptional<z.ZodString>;
243
- } & {
244
- content: z.ZodString;
245
- }, "strip", z.ZodTypeAny, {
246
- path: string;
247
- content: string;
248
- type: string;
249
- target?: string | undefined;
250
- }, {
251
- path: string;
252
- content: string;
253
- type: string;
254
- target?: string | undefined;
255
- }>, "many">;
256
- }, "strip", z.ZodTypeAny, {
257
- type: string;
258
- name: string;
259
- files: {
260
- path: string;
261
- content: string;
262
- type: string;
263
- target?: string | undefined;
264
- }[];
265
- description?: string | undefined;
266
- author?: string | undefined;
267
- dependencies?: string[] | undefined;
268
- devDependencies?: string[] | undefined;
269
- registryDependencies?: string[] | undefined;
270
- meta?: Record<string, any> | undefined;
271
- title?: string | undefined;
272
- cssVars?: Record<string, any> | undefined;
273
- tailwind?: Record<string, any> | undefined;
274
- category?: string | undefined;
275
- subcategory?: string | undefined;
276
- }, {
277
- type: string;
278
- name: string;
279
- files: {
280
- path: string;
281
- content: string;
282
- type: string;
283
- target?: string | undefined;
284
- }[];
285
- description?: string | undefined;
286
- author?: string | undefined;
287
- dependencies?: string[] | undefined;
288
- devDependencies?: string[] | undefined;
289
- registryDependencies?: string[] | undefined;
290
- meta?: Record<string, any> | undefined;
291
- title?: string | undefined;
292
- cssVars?: Record<string, any> | undefined;
293
- tailwind?: Record<string, any> | undefined;
294
- category?: string | undefined;
295
- subcategory?: string | undefined;
296
- }>, "many">;
297
- }, "strip", z.ZodTypeAny, {
298
- name: string;
299
- items: {
300
- type: string;
301
- name: string;
302
- files: {
303
- path: string;
304
- content: string;
305
- type: string;
306
- target?: string | undefined;
307
- }[];
308
- description?: string | undefined;
309
- author?: string | undefined;
310
- dependencies?: string[] | undefined;
311
- devDependencies?: string[] | undefined;
312
- registryDependencies?: string[] | undefined;
313
- meta?: Record<string, any> | undefined;
314
- title?: string | undefined;
315
- cssVars?: Record<string, any> | undefined;
316
- tailwind?: Record<string, any> | undefined;
317
- category?: string | undefined;
318
- subcategory?: string | undefined;
319
- }[];
320
- $schema?: string | undefined;
321
- homepage?: string | undefined;
322
- style?: string | undefined;
323
- }, {
324
- name: string;
325
- items: {
326
- type: string;
327
- name: string;
328
- files: {
329
- path: string;
330
- content: string;
331
- type: string;
332
- target?: string | undefined;
333
- }[];
334
- description?: string | undefined;
335
- author?: string | undefined;
336
- dependencies?: string[] | undefined;
337
- devDependencies?: string[] | undefined;
338
- registryDependencies?: string[] | undefined;
339
- meta?: Record<string, any> | undefined;
340
- title?: string | undefined;
341
- cssVars?: Record<string, any> | undefined;
342
- tailwind?: Record<string, any> | undefined;
343
- category?: string | undefined;
344
- subcategory?: string | undefined;
345
- }[];
346
- $schema?: string | undefined;
347
- homepage?: string | undefined;
348
- style?: string | undefined;
349
- }>;
350
- export type RegistryItem = z.infer<typeof registryItemSchema>;
351
- export type Registry = z.infer<typeof registrySchema>;
352
- export type RegistryWithContent = z.infer<typeof registryWithContentSchema>;
353
- export type RegistryFile = z.infer<typeof fileSchema>;
@@ -1,45 +0,0 @@
1
- import { z } from "zod";
2
- // Define the file schema to match shadcn/ui's format
3
- export const fileSchema = z.object({
4
- path: z.string(),
5
- content: z.string().optional(),
6
- type: z.string(),
7
- target: z.string().optional(),
8
- });
9
- // Registry item schema aligned with shadcn/ui format
10
- export const registryItemSchema = z.object({
11
- name: z.string(),
12
- type: z.string(),
13
- description: z.string().optional(),
14
- author: z.string().optional(),
15
- dependencies: z.array(z.string()).optional(),
16
- devDependencies: z.array(z.string()).optional(),
17
- registryDependencies: z.array(z.string()).optional(),
18
- files: z.array(fileSchema).optional(),
19
- meta: z.record(z.any()).optional(),
20
- title: z.string().optional(),
21
- cssVars: z.record(z.any()).optional(),
22
- tailwind: z.record(z.any()).optional(),
23
- category: z.string().optional(),
24
- subcategory: z.string().optional(),
25
- });
26
- // Registry schema aligned with shadcn/ui format
27
- export const registrySchema = z.object({
28
- $schema: z.string().optional(),
29
- name: z.string(),
30
- homepage: z.string().optional(),
31
- style: z.string().optional(),
32
- items: z.array(registryItemSchema),
33
- });
34
- // Schema for a registry with full content
35
- export const registryWithContentSchema = registrySchema.extend({
36
- items: z.array(registryItemSchema.extend({
37
- files: z.array(fileSchema.extend({
38
- content: z.string(),
39
- })),
40
- })),
41
- });
42
- // Support CommonJS
43
- if (typeof module !== 'undefined') {
44
- module.exports = { fileSchema, registryItemSchema, registrySchema, registryWithContentSchema };
45
- }
package/environment.d.ts DELETED
@@ -1,6 +0,0 @@
1
- namespace NodeJS {
2
- interface ProcessEnv {
3
- NEXT_PUBLIC_GA_MEASUREMENT_ID: string;
4
- NEXT_PUBLIC_FACEBOOK_PIXEL_ID: string;
5
- }
6
- }
@@ -1,66 +0,0 @@
1
- // @ts-nocheck
2
- "use client"
3
-
4
- import * as React from "react"
5
- import * as AccordionPrimitive from "@radix-ui/react-accordion"
6
- import { ChevronDown } from "lucide-react"
7
-
8
- import { cn } from "../util"
9
-
10
- const Accordion = AccordionPrimitive.Root
11
-
12
- const AccordionItem = React.forwardRef<
13
- React.ElementRef<typeof AccordionPrimitive.Item>,
14
- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
15
- >(({ className, ...props }, ref) => (
16
- <AccordionPrimitive.Item
17
- ref={ref}
18
- className={cn("border-b", className)}
19
- {...props}
20
- />
21
- ))
22
- AccordionItem.displayName = "AccordionItem"
23
-
24
- type AccordionTriggerProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> & {
25
- showChevron?: boolean
26
- headerClx?: string
27
- }
28
-
29
- const AccordionTrigger = React.forwardRef<
30
- React.ElementRef<typeof AccordionPrimitive.Trigger>,
31
- AccordionTriggerProps
32
- >(({ showChevron = true, headerClx, className, children, ...props }, ref) => (
33
- <AccordionPrimitive.Header className={cn('flex', headerClx)}>
34
- <AccordionPrimitive.Trigger
35
- ref={ref}
36
- className={cn(
37
- "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
38
- className
39
- )}
40
- {...props}
41
- >
42
- {children}
43
- {showChevron && <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />}
44
- </AccordionPrimitive.Trigger>
45
- </AccordionPrimitive.Header>
46
- ))
47
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
48
-
49
- const AccordionContent = React.forwardRef<
50
- React.ElementRef<typeof AccordionPrimitive.Content>,
51
- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
52
- >(({ className, children, ...props }, ref) => (
53
- <AccordionPrimitive.Content
54
- ref={ref}
55
- className={cn(
56
- "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
57
- className
58
- )}
59
- {...props}
60
- >
61
- <div className="pb-4 pt-0">{children}</div>
62
- </AccordionPrimitive.Content>
63
- ))
64
- AccordionContent.displayName = AccordionPrimitive.Content.displayName
65
-
66
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
@@ -1,42 +0,0 @@
1
- 'use client'
2
- import React from 'react'
3
-
4
- import { cn, type VariantProps } from '../util'
5
-
6
- import type { ButtonDef, ButtonModalDef } from '../types'
7
- import type { buttonVariants } from './button'
8
- import DVC from './dialog-video-controller'
9
-
10
- const ActionButton: React.FC<
11
- VariantProps<typeof buttonVariants> &
12
- {
13
- def: ButtonDef
14
- className?: string
15
- }
16
- > = ({
17
- def,
18
- className='',
19
- ...rest
20
- }) => {
21
- if (def.action.type === 'modal') {
22
- const m = def.action.def as ButtonModalDef
23
- const Modal = m.Comp
24
- return (
25
- <DVC>
26
- <Modal
27
- title={m.title}
28
- byline={m.byline}
29
- buttonText={def.text}
30
- buttonProps={{...def.props, ...rest, className: cn((def.props?.className ?? ''), className)}}
31
- action={m.action}
32
- actionEnclosure={m.actionEnclosure}
33
- {...m.props}
34
- />
35
- </DVC>
36
- )
37
- }
38
- // no other types supported yet
39
- return <></>
40
- }
41
-
42
- export default ActionButton
@@ -1,55 +0,0 @@
1
- import React, { type PropsWithChildren } from 'react'
2
-
3
- import { cn } from '../util'
4
-
5
- type TypographySize = 'responsive' | 'sm' | 'base' | 'lg' | 'xl' // if t-shirt size, do *not* be responsive
6
-
7
- const ApplyTypography: React.FC<
8
- React.ComponentProps<'div'> & {
9
- asTag?: 'div' | 'section' | 'nav' | 'main' | 'article',
10
- size?: TypographySize
11
- }
12
- > = ({
13
- children,
14
- className='',
15
- asTag='div',
16
- size='responsive',
17
- ...rest
18
- }) => {
19
-
20
- // responsive version by default
21
- let typoClasses =
22
- 'typography gap-3 ' +
23
- 'xs:typography-sm ' +
24
- 'sm:typography sm:gap-4 ' +
25
- 'lg:typography-lg lg:gap-5 ' +
26
- 'xl:typography-xl xl:gap-6 ' +
27
- 'typography-headings:font-heading ' // only effects h1-h3 (in plugin)
28
-
29
- switch (size) {
30
- case 'sm': {
31
- typoClasses = 'typography typography-sm gap-3 typography-headings:font-heading typography-p:text-sm '
32
- } break
33
- case 'base': {
34
- typoClasses = 'typography gap-4 typography-headings:font-heading '
35
- } break
36
- case 'lg': {
37
- typoClasses = 'typography typography-lg gap-5 typography-headings:font-heading typography-p:text-lg '
38
- } break
39
- case 'xl': {
40
- typoClasses = 'typography typography-xl gap-6 typography-headings:font-heading typography-p:text-lg '
41
- } break
42
- }
43
-
44
- const Tag = asTag
45
- return (
46
- <Tag {...rest} className={cn(typoClasses, className)}>
47
- {children}
48
- </Tag>
49
- )
50
- }
51
-
52
- export {
53
- type TypographySize,
54
- ApplyTypography as default
55
- }
@@ -1,5 +0,0 @@
1
- "use client"
2
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
3
- const AspectRatio = AspectRatioPrimitive.Root
4
-
5
- export default AspectRatio
@@ -1,49 +0,0 @@
1
- 'use client'
2
- import React from 'react'
3
- import * as AvatarPrimitive from '@radix-ui/react-avatar'
4
-
5
- import { cn } from '../util'
6
-
7
- const Avatar = React.forwardRef<
8
- React.ElementRef<typeof AvatarPrimitive.Root>,
9
- React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
10
- >(({ className, ...props }, ref) => (
11
- <AvatarPrimitive.Root
12
- ref={ref}
13
- className={cn(
14
- 'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full',
15
- className
16
- )}
17
- {...props}
18
- />
19
- ))
20
- Avatar.displayName = AvatarPrimitive.Root.displayName
21
-
22
- const AvatarImage = React.forwardRef<
23
- React.ElementRef<typeof AvatarPrimitive.Image>,
24
- React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
25
- >(({ className, ...props }, ref) => (
26
- <AvatarPrimitive.Image
27
- ref={ref}
28
- className={cn('aspect-square h-full w-full', className)}
29
- {...props}
30
- />
31
- ))
32
- AvatarImage.displayName = AvatarPrimitive.Image.displayName
33
-
34
- const AvatarFallback = React.forwardRef<
35
- React.ElementRef<typeof AvatarPrimitive.Fallback>,
36
- React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
37
- >(({ className, ...props }, ref) => (
38
- <AvatarPrimitive.Fallback
39
- ref={ref}
40
- className={cn(
41
- 'flex h-full w-full items-center justify-center rounded-full bg-muted',
42
- className
43
- )}
44
- {...props}
45
- />
46
- ))
47
- AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
48
-
49
- export { Avatar, AvatarImage, AvatarFallback }
@@ -1,36 +0,0 @@
1
- import React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
3
-
4
- import { cn } from "../util"
5
-
6
- const badgeVariants = cva(
7
- "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-ring ",
8
- {
9
- variants: {
10
- variant: {
11
- default:
12
- "border-transparent bg-primary text-primary-fg shadow hover:bg-primary/80",
13
- secondary:
14
- "border-transparent bg-secondary text-secondary-fg hover:bg-secondary/80",
15
- destructive:
16
- "border-transparent bg-destructive text-destructive-fg shadow hover:bg-destructive/80",
17
- outline: "text-foreground",
18
- },
19
- },
20
- defaultVariants: {
21
- variant: "default",
22
- },
23
- }
24
- )
25
-
26
- interface BadgeProps
27
- extends React.HTMLAttributes<HTMLDivElement>,
28
- VariantProps<typeof badgeVariants> {}
29
-
30
- const Badge: React.FC<BadgeProps> = ({
31
- className, variant, ...props
32
- }) => (
33
- <div className={cn(badgeVariants({ variant }), className)} {...props} />
34
- )
35
-
36
- export { Badge as default, badgeVariants, type BadgeProps }