@hanzo/ui 4.5.3 → 4.5.4

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 (271) hide show
  1. package/dist/mcp/enhanced-server.js +1 -1
  2. package/dist/mcp/index.js +1 -1
  3. package/dist/registry/api.js +1 -2
  4. package/dist/registry/index.d.ts +348 -4
  5. package/package.json +1 -1
  6. package/tsconfig.json +9 -4
  7. package/dist/blocks/components/accordian-block.d.ts +0 -4
  8. package/dist/blocks/components/accordian-block.jsx +0 -25
  9. package/dist/blocks/components/block-component-props.d.ts +0 -7
  10. package/dist/blocks/components/block-component-props.js +0 -1
  11. package/dist/blocks/components/bullet-cards-block.d.ts +0 -4
  12. package/dist/blocks/components/bullet-cards-block.jsx +0 -25
  13. package/dist/blocks/components/card-block/index.d.ts +0 -6
  14. package/dist/blocks/components/card-block/index.jsx +0 -87
  15. package/dist/blocks/components/card-block/link-out-button.d.ts +0 -6
  16. package/dist/blocks/components/card-block/link-out-button.jsx +0 -4
  17. package/dist/blocks/components/card-block/util.d.ts +0 -4
  18. package/dist/blocks/components/card-block/util.js +0 -6
  19. package/dist/blocks/components/carte-blanche-block/index.d.ts +0 -4
  20. package/dist/blocks/components/carte-blanche-block/index.jsx +0 -82
  21. package/dist/blocks/components/carte-blanche-block/variant-content-left.d.ts +0 -10
  22. package/dist/blocks/components/carte-blanche-block/variant-content-left.jsx +0 -23
  23. package/dist/blocks/components/content.d.ts +0 -10
  24. package/dist/blocks/components/content.jsx +0 -47
  25. package/dist/blocks/components/cta-block.d.ts +0 -12
  26. package/dist/blocks/components/cta-block.jsx +0 -69
  27. package/dist/blocks/components/enh-heading-block.d.ts +0 -7
  28. package/dist/blocks/components/enh-heading-block.jsx +0 -142
  29. package/dist/blocks/components/grid-block/grid-block-mutator.d.ts +0 -5
  30. package/dist/blocks/components/grid-block/grid-block-mutator.js +0 -1
  31. package/dist/blocks/components/grid-block/index.d.ts +0 -9
  32. package/dist/blocks/components/grid-block/index.jsx +0 -56
  33. package/dist/blocks/components/grid-block/mutator-registry.d.ts +0 -3
  34. package/dist/blocks/components/grid-block/mutator-registry.js +0 -5
  35. package/dist/blocks/components/grid-block/table-borders.mutator.d.ts +0 -3
  36. package/dist/blocks/components/grid-block/table-borders.mutator.js +0 -36
  37. package/dist/blocks/components/group-block.d.ts +0 -7
  38. package/dist/blocks/components/group-block.jsx +0 -61
  39. package/dist/blocks/components/heading-block.d.ts +0 -4
  40. package/dist/blocks/components/heading-block.jsx +0 -99
  41. package/dist/blocks/components/image-block.d.ts +0 -7
  42. package/dist/blocks/components/image-block.jsx +0 -69
  43. package/dist/blocks/components/index.d.ts +0 -14
  44. package/dist/blocks/components/index.js +0 -13
  45. package/dist/blocks/components/screenful-block/content.d.ts +0 -8
  46. package/dist/blocks/components/screenful-block/content.jsx +0 -71
  47. package/dist/blocks/components/screenful-block/index.d.ts +0 -12
  48. package/dist/blocks/components/screenful-block/index.jsx +0 -57
  49. package/dist/blocks/components/screenful-block/poster-background.d.ts +0 -7
  50. package/dist/blocks/components/screenful-block/poster-background.jsx +0 -14
  51. package/dist/blocks/components/screenful-block/video-background.d.ts +0 -8
  52. package/dist/blocks/components/screenful-block/video-background.jsx +0 -20
  53. package/dist/blocks/components/space-block.d.ts +0 -4
  54. package/dist/blocks/components/space-block.jsx +0 -42
  55. package/dist/blocks/components/video-block.d.ts +0 -9
  56. package/dist/blocks/components/video-block.jsx +0 -83
  57. package/dist/blocks/def/accordian-block.d.ts +0 -10
  58. package/dist/blocks/def/accordian-block.js +0 -2
  59. package/dist/blocks/def/block.d.ts +0 -4
  60. package/dist/blocks/def/block.js +0 -1
  61. package/dist/blocks/def/bullet-cards-block.d.ts +0 -17
  62. package/dist/blocks/def/bullet-cards-block.js +0 -1
  63. package/dist/blocks/def/card-block.d.ts +0 -17
  64. package/dist/blocks/def/card-block.js +0 -2
  65. package/dist/blocks/def/carte-blanche-block.d.ts +0 -12
  66. package/dist/blocks/def/carte-blanche-block.js +0 -1
  67. package/dist/blocks/def/cta-block.d.ts +0 -8
  68. package/dist/blocks/def/cta-block.js +0 -1
  69. package/dist/blocks/def/element-block.d.ts +0 -7
  70. package/dist/blocks/def/element-block.js +0 -2
  71. package/dist/blocks/def/enh-heading-block.d.ts +0 -22
  72. package/dist/blocks/def/enh-heading-block.js +0 -1
  73. package/dist/blocks/def/grid-block.d.ts +0 -12
  74. package/dist/blocks/def/grid-block.js +0 -1
  75. package/dist/blocks/def/group-block.d.ts +0 -7
  76. package/dist/blocks/def/group-block.js +0 -1
  77. package/dist/blocks/def/heading-block.d.ts +0 -11
  78. package/dist/blocks/def/heading-block.js +0 -1
  79. package/dist/blocks/def/image-block.d.ts +0 -26
  80. package/dist/blocks/def/image-block.js +0 -1
  81. package/dist/blocks/def/index.d.ts +0 -17
  82. package/dist/blocks/def/index.js +0 -2
  83. package/dist/blocks/def/screenful-block.d.ts +0 -41
  84. package/dist/blocks/def/screenful-block.js +0 -1
  85. package/dist/blocks/def/space-block.d.ts +0 -47
  86. package/dist/blocks/def/space-block.js +0 -8
  87. package/dist/blocks/def/video-block.d.ts +0 -5
  88. package/dist/blocks/def/video-block.js +0 -1
  89. package/dist/blocks/index.d.ts +0 -2
  90. package/dist/blocks/index.js +0 -2
  91. package/dist/primitives/accordion.d.ts +0 -10
  92. package/dist/primitives/accordion.jsx +0 -21
  93. package/dist/primitives/action-button.d.ts +0 -9
  94. package/dist/primitives/action-button.jsx +0 -16
  95. package/dist/primitives/apply-typography.d.ts +0 -7
  96. package/dist/primitives/apply-typography.jsx +0 -38
  97. package/dist/primitives/aspect-ratio.d.ts +0 -3
  98. package/dist/primitives/aspect-ratio.jsx +0 -4
  99. package/dist/primitives/avatar.d.ts +0 -6
  100. package/dist/primitives/avatar.jsx +0 -11
  101. package/dist/primitives/badge.d.ts +0 -9
  102. package/dist/primitives/badge.jsx +0 -18
  103. package/dist/primitives/breadcrumb.d.ts +0 -19
  104. package/dist/primitives/breadcrumb.jsx +0 -27
  105. package/dist/primitives/breakpoint-indicator.d.ts +0 -3
  106. package/dist/primitives/breakpoint-indicator.jsx +0 -14
  107. package/dist/primitives/button.d.ts +0 -12
  108. package/dist/primitives/button.jsx +0 -55
  109. package/dist/primitives/calendar.d.ts +0 -8
  110. package/dist/primitives/calendar.jsx +0 -40
  111. package/dist/primitives/card.d.ts +0 -8
  112. package/dist/primitives/card.jsx +0 -18
  113. package/dist/primitives/carousel.d.ts +0 -18
  114. package/dist/primitives/carousel.jsx +0 -106
  115. package/dist/primitives/checkbox.d.ts +0 -4
  116. package/dist/primitives/checkbox.jsx +0 -15
  117. package/dist/primitives/combobox.d.ts +0 -41
  118. package/dist/primitives/combobox.jsx +0 -77
  119. package/dist/primitives/command.d.ts +0 -17
  120. package/dist/primitives/command.jsx +0 -38
  121. package/dist/primitives/context-menu.d.ts +0 -27
  122. package/dist/primitives/context-menu.jsx +0 -57
  123. package/dist/primitives/dialog-video-controller.d.ts +0 -3
  124. package/dist/primitives/dialog-video-controller.jsx +0 -24
  125. package/dist/primitives/dialog.d.ts +0 -28
  126. package/dist/primitives/dialog.jsx +0 -37
  127. package/dist/primitives/drawer.d.ts +0 -29
  128. package/dist/primitives/drawer.jsx +0 -34
  129. package/dist/primitives/form.d.ts +0 -12
  130. package/dist/primitives/form.jsx +0 -69
  131. package/dist/primitives/icons/github.d.ts +0 -4
  132. package/dist/primitives/icons/github.jsx +0 -6
  133. package/dist/primitives/icons/index.d.ts +0 -4
  134. package/dist/primitives/icons/index.js +0 -4
  135. package/dist/primitives/icons/youtube-logo.d.ts +0 -4
  136. package/dist/primitives/icons/youtube-logo.jsx +0 -39
  137. package/dist/primitives/index-common.d.ts +0 -47
  138. package/dist/primitives/index-common.js +0 -46
  139. package/dist/primitives/index-next.d.ts +0 -2
  140. package/dist/primitives/index-next.js +0 -2
  141. package/dist/primitives/input-otp.d.ts +0 -7
  142. package/dist/primitives/input-otp.jsx +0 -24
  143. package/dist/primitives/input.d.ts +0 -5
  144. package/dist/primitives/input.jsx +0 -11
  145. package/dist/primitives/label.d.ts +0 -5
  146. package/dist/primitives/label.jsx +0 -11
  147. package/dist/primitives/list-adaptor.d.ts +0 -9
  148. package/dist/primitives/list-adaptor.js +0 -1
  149. package/dist/primitives/list-box.d.ts +0 -10
  150. package/dist/primitives/list-box.jsx +0 -14
  151. package/dist/primitives/loading-spinner.d.ts +0 -5
  152. package/dist/primitives/loading-spinner.jsx +0 -8
  153. package/dist/primitives/navigation-menu.d.ts +0 -12
  154. package/dist/primitives/navigation-menu.jsx +0 -38
  155. package/dist/primitives/next/image.d.ts +0 -11
  156. package/dist/primitives/next/image.jsx +0 -42
  157. package/dist/primitives/next/index.d.ts +0 -7
  158. package/dist/primitives/next/index.js +0 -7
  159. package/dist/primitives/next/inline-icon.d.ts +0 -13
  160. package/dist/primitives/next/inline-icon.jsx +0 -15
  161. package/dist/primitives/next/link-element.d.ts +0 -23
  162. package/dist/primitives/next/link-element.jsx +0 -56
  163. package/dist/primitives/next/mdx-link.d.ts +0 -3
  164. package/dist/primitives/next/mdx-link.jsx +0 -12
  165. package/dist/primitives/next/media-stack.d.ts +0 -8
  166. package/dist/primitives/next/media-stack.jsx +0 -28
  167. package/dist/primitives/next/nav-items.d.ts +0 -10
  168. package/dist/primitives/next/nav-items.jsx +0 -24
  169. package/dist/primitives/next/youtube-embed.d.ts +0 -11
  170. package/dist/primitives/next/youtube-embed.jsx +0 -23
  171. package/dist/primitives/popover.d.ts +0 -9
  172. package/dist/primitives/popover.jsx +0 -18
  173. package/dist/primitives/progress.d.ts +0 -4
  174. package/dist/primitives/progress.jsx +0 -9
  175. package/dist/primitives/radio-group.d.ts +0 -7
  176. package/dist/primitives/radio-group.jsx +0 -18
  177. package/dist/primitives/scroll-area.d.ts +0 -5
  178. package/dist/primitives/scroll-area.jsx +0 -19
  179. package/dist/primitives/select.d.ts +0 -13
  180. package/dist/primitives/select.jsx +0 -62
  181. package/dist/primitives/separator.d.ts +0 -4
  182. package/dist/primitives/separator.jsx +0 -7
  183. package/dist/primitives/sheet.d.ts +0 -30
  184. package/dist/primitives/sheet.jsx +0 -56
  185. package/dist/primitives/skeleton.d.ts +0 -4
  186. package/dist/primitives/skeleton.jsx +0 -3
  187. package/dist/primitives/slider.d.ts +0 -9
  188. package/dist/primitives/slider.jsx +0 -30
  189. package/dist/primitives/sonner.d.ts +0 -5
  190. package/dist/primitives/sonner.jsx +0 -16
  191. package/dist/primitives/step-indicator.d.ts +0 -9
  192. package/dist/primitives/step-indicator.jsx +0 -23
  193. package/dist/primitives/switch.d.ts +0 -6
  194. package/dist/primitives/switch.jsx +0 -14
  195. package/dist/primitives/table.d.ts +0 -10
  196. package/dist/primitives/table.jsx +0 -21
  197. package/dist/primitives/tabs.d.ts +0 -7
  198. package/dist/primitives/tabs.jsx +0 -18
  199. package/dist/primitives/text-area.d.ts +0 -5
  200. package/dist/primitives/text-area.jsx +0 -9
  201. package/dist/primitives/toggle-group.d.ts +0 -14
  202. package/dist/primitives/toggle-group.jsx +0 -28
  203. package/dist/primitives/toggle.d.ts +0 -14
  204. package/dist/primitives/toggle.jsx +0 -52
  205. package/dist/primitives/tooltip.d.ts +0 -11
  206. package/dist/primitives/tooltip.jsx +0 -18
  207. package/dist/primitives/video-player.d.ts +0 -6
  208. package/dist/primitives/video-player.jsx +0 -8
  209. package/dist/style/theme-provider.d.ts +0 -4
  210. package/dist/style/theme-provider.jsx +0 -11
  211. package/dist/tailwind/fontFamily.tailwind.d.ts +0 -8
  212. package/dist/tailwind/fontFamily.tailwind.js +0 -7
  213. package/dist/tailwind/fontSize.tailwind.d.ts +0 -36
  214. package/dist/tailwind/fontSize.tailwind.js +0 -13
  215. package/dist/tailwind/index.d.ts +0 -3
  216. package/dist/tailwind/index.js +0 -2
  217. package/dist/tailwind/screens.tailwind.d.ts +0 -9
  218. package/dist/tailwind/screens.tailwind.js +0 -8
  219. package/dist/tailwind/tw-font-desc.d.ts +0 -6
  220. package/dist/tailwind/tw-font-desc.js +0 -6
  221. package/dist/types/animation-def.d.ts +0 -2
  222. package/dist/types/animation-def.js +0 -1
  223. package/dist/types/breakpoints.d.ts +0 -4
  224. package/dist/types/breakpoints.js +0 -4
  225. package/dist/types/bullet-item.d.ts +0 -6
  226. package/dist/types/bullet-item.js +0 -2
  227. package/dist/types/button-def.d.ts +0 -29
  228. package/dist/types/button-def.js +0 -2
  229. package/dist/types/dimensions.d.ts +0 -5
  230. package/dist/types/dimensions.js +0 -1
  231. package/dist/types/grid-def.d.ts +0 -36
  232. package/dist/types/grid-def.js +0 -33
  233. package/dist/types/image-def.d.ts +0 -27
  234. package/dist/types/image-def.js +0 -1
  235. package/dist/types/index.d.ts +0 -13
  236. package/dist/types/index.js +0 -2
  237. package/dist/types/link-def.d.ts +0 -44
  238. package/dist/types/link-def.js +0 -1
  239. package/dist/types/media-stack-def.d.ts +0 -25
  240. package/dist/types/media-stack-def.js +0 -1
  241. package/dist/types/t-shirt-size.d.ts +0 -2
  242. package/dist/types/t-shirt-size.js +0 -1
  243. package/dist/types/tshirt-dimensions.d.ts +0 -12
  244. package/dist/types/tshirt-dimensions.js +0 -1
  245. package/dist/types/video-def.d.ts +0 -9
  246. package/dist/types/video-def.js +0 -1
  247. package/dist/util/format-and-abbreviate-as-currency.d.ts +0 -11
  248. package/dist/util/format-and-abbreviate-as-currency.js +0 -91
  249. package/dist/util/format-to-max-char.d.ts +0 -5
  250. package/dist/util/format-to-max-char.js +0 -57
  251. package/dist/util/index-client.d.ts +0 -2
  252. package/dist/util/index-client.js +0 -3
  253. package/dist/util/index.d.ts +0 -17
  254. package/dist/util/index.js +0 -41
  255. package/dist/util/number-abbreviate.d.ts +0 -9
  256. package/dist/util/number-abbreviate.js +0 -30
  257. package/dist/util/specifier.d.ts +0 -7
  258. package/dist/util/specifier.js +0 -31
  259. package/dist/util/spread-to-transform.d.ts +0 -7
  260. package/dist/util/spread-to-transform.js +0 -18
  261. package/dist/util/step-animation.d.ts +0 -5
  262. package/dist/util/step-animation.js +0 -60
  263. package/dist/util/two-way-map.d.ts +0 -8
  264. package/dist/util/two-way-map.js +0 -16
  265. /package/{mcp → src/mcp}/README.md +0 -0
  266. /package/{mcp → src/mcp}/enhanced-server.ts +0 -0
  267. /package/{mcp → src/mcp}/index.ts +0 -0
  268. /package/{mcp → src/mcp}/package.json +0 -0
  269. /package/{registry → src/registry}/api.ts +0 -0
  270. /package/{registry → src/registry}/index.ts +0 -0
  271. /package/{registry → src/registry}/package.json +0 -0
@@ -1,4 +1,4 @@
1
- import { registrySchema, Registry, RegistryItem } from "../registry";
1
+ import { registrySchema } from "../registry";
2
2
  import { fetchRegistry, getRegistryItem, getRegistryItemUrl } from "../registry/api";
3
3
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
package/dist/mcp/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { registrySchema, Registry, RegistryItem } from "../registry";
1
+ import { registrySchema } from "../registry";
2
2
  import { fetchRegistry, getRegistryItem, getRegistryItemUrl } from "../registry/api";
3
3
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
@@ -1,5 +1,4 @@
1
- import { registryItemSchema, RegistryItem, Registry } from ".";
2
- import { z } from "zod";
1
+ import { registryItemSchema } from ".";
3
2
  const registryCache = new Map();
4
3
  /**
5
4
  * Gets the full registry URL based on the registry name or URL provided
@@ -1,8 +1,352 @@
1
1
  import { z } from "zod";
2
- export declare const fileSchema: any;
3
- export declare const registryItemSchema: any;
4
- export declare const registrySchema: any;
5
- export declare const registryWithContentSchema: any;
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
+ }>;
6
350
  export type RegistryItem = z.infer<typeof registryItemSchema>;
7
351
  export type Registry = z.infer<typeof registrySchema>;
8
352
  export type RegistryWithContent = z.infer<typeof registryWithContentSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "4.5.3",
3
+ "version": "4.5.4",
4
4
  "description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
package/tsconfig.json CHANGED
@@ -1,17 +1,22 @@
1
1
  {
2
2
  "extends": "../tsconfig.hanzo.base.json",
3
3
  "include": [
4
- "**/*.ts",
5
- "**/*.tsx",
4
+ "src/**/*.ts",
5
+ "src/**/*.tsx"
6
6
  ],
7
7
  "exclude": [
8
8
  "node_modules",
9
9
  "dist",
10
- "registry/index.d.ts"
10
+ "bin",
11
+ "test"
11
12
  ],
12
13
  "compilerOptions": {
13
14
  "noEmit": false,
14
15
  "declaration": true,
15
- "outDir": "./dist"
16
+ "outDir": "./dist",
17
+ "skipLibCheck": true,
18
+ "rootDir": "./src",
19
+ "types": ["node"],
20
+ "verbatimModuleSyntax": false
16
21
  }
17
22
  }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type BlockComponentProps from './block-component-props';
3
- declare const AccordianBlockComponent: React.FC<BlockComponentProps>;
4
- export default AccordianBlockComponent;
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ApplyTypography } from '../../primitives/index-common';
3
- import { cn } from '../../util';
4
- const AccordianBlockComponent = ({ block, className = '' }) => {
5
- if (block.blockType !== 'accordian') {
6
- return <>accordian block required</>;
7
- }
8
- const accordian = block;
9
- return (<Accordion type="single" collapsible className={cn('w-full border rounded-xl overflow-hidden', className)}>
10
- {accordian.items.map((item, index) => (<AccordionItem className='border-b last:border-0 overflow-hidden' value={`value-${index}`} key={index}>
11
- <AccordionTrigger className='px-3 md:px-4 lg:px-6 hover:no-underline hover:bg-level-3'>
12
- <ApplyTypography>
13
- {/* styles specific to accordion. From old site */}
14
- <h6 className='leading-[1.2] text-[1.05rem] font-semibold '>{item.trigger}</h6>
15
- </ApplyTypography>
16
- </AccordionTrigger>
17
- <AccordionContent className='p-4 border-t bg-level-1'>
18
- <ApplyTypography className='flex flex-col justify-start items-start '>
19
- {(typeof item.content === 'string') ? (<p>{item.content}</p>) : item.content}
20
- </ApplyTypography>
21
- </AccordionContent>
22
- </AccordionItem>))}
23
- </Accordion>);
24
- };
25
- export default AccordianBlockComponent;
@@ -1,7 +0,0 @@
1
- import type { Block } from "../def";
2
- interface BlockComponentProps {
3
- block: Block;
4
- className?: string;
5
- agent?: string;
6
- }
7
- export { type BlockComponentProps as default };
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type BlockComponentProps from './block-component-props';
3
- declare const BulletCardsBlockComponent: React.FC<BlockComponentProps>;
4
- export default BulletCardsBlockComponent;
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { containsToken, cn } from '../../util';
3
- import InlineIcon from '../../primitives/next/inline-icon';
4
- import GridBlockComponent from './grid-block';
5
- const BulletCardsBlockComponent = ({ block, className = '', agent }) => {
6
- if (block.blockType !== 'bullet-cards') {
7
- return <>bullet cards block required</>;
8
- }
9
- const b = block;
10
- const specified = (s) => (containsToken(b.specifiers, s));
11
- const noBorder = specified('no-card-border') ? 'border-0' : 'md:border';
12
- const mobileTextXs = specified('mobile-small-text') ? 'text-xs' : 'text-sm';
13
- const borderclx = specified('border-muted-3') ?
14
- 'md:border-muted-3'
15
- :
16
- (specified('border-muted-1') ? 'md:border-muted-1' : 'md:border-muted-2');
17
- return (<GridBlockComponent block={{ blockType: 'grid', grid: b.grid }} className={className} agent={agent}>
18
- {b.cards.map((card, index) => (<div key={index} className={cn('px-0 sm:px-4 py-1 md:py-4 rounded-lg ' +
19
- 'flex flex-row justify-start items-center not-typography text-foreground', noBorder, borderclx)}>
20
- <InlineIcon icon={card.icon} size={b.iconSize ?? 28} agent={agent} className='shrink-0 mr-2 md:mr-4 '/>
21
- <p className={cn('m-0 sm:text-base', mobileTextXs)}>{card.text}</p>
22
- </div>))}
23
- </GridBlockComponent>);
24
- };
25
- export default BulletCardsBlockComponent;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import type BlockComponentProps from '../block-component-props';
3
- declare const CardBlockComponent: React.FC<BlockComponentProps & {
4
- contentClassName?: string;
5
- }>;
6
- export default CardBlockComponent;
@@ -1,87 +0,0 @@
1
- import React from 'react';
2
- import { ApplyTypography, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '../../../primitives/index-common';
3
- import ImageBlockComponent from '../image-block';
4
- import VideoBlockComponent from '../video-block';
5
- import CTABlockComponent from '../cta-block';
6
- import { cn } from '../../../util';
7
- import { getTypographySize } from './util';
8
- import LinkOutButton from './link-out-button';
9
- const CardBlockComponent = ({ block, className = '', contentClassName = '' }) => {
10
- if (block.blockType !== 'card') {
11
- return <>card block required</>;
12
- }
13
- const card = block;
14
- const has = (s) => (card.specifiers?.includes(s));
15
- const ghost = has('ghost'); // no outer padding, no borders, larger title, all left-aligned bg is same (default)
16
- const contentclx = (has('content-left') ? 'items-start ' : ' items-center ') + (has('content-top') ? '!justify-start' : '') + contentClassName;
17
- const disabledBorder = (has('appear-disabled') ? ' border-muted-4' : ' border-muted-3');
18
- const outerBorder = ((has('no-outer-border') || ghost) ? ' border-0' : '');
19
- const innerBorder = (ghost ? ' border-0' : '');
20
- const paddingclx = ghost ? ' px-0 py-0' : ' px-6 py-3';
21
- const mainGap = ghost ? ' gap-2' : '';
22
- const disabledText = (has('appear-disabled') ? ' text-muted-2' : '');
23
- const disabledTypoText = (has('appear-disabled') ? ' typography-p:text-muted-2' : '');
24
- const bgclx = (has('bg-card') ? ' bg-level-1' : '');
25
- const titleclx = (has('heading-style-title') ? ' font-heading text-base leading-tight' : '') +
26
- (ghost ? ' text-left md:text-xl' : '');
27
- const typoSize = (card.specifiers) ? getTypographySize(card.specifiers) : 'responsive';
28
- const typoclx = (typoSize === 'sm') ? 'typography-sm typography-p:text-sm ' : (typoSize === 'lg') ? 'typography-lg ' : '';
29
- const contentBefore = has('content-before');
30
- const iconInline = has('icon-inline');
31
- const contentOnHover = has('reveal-content-on-hover');
32
- //const smallIconDim = (contentOnHover && card.specifiers) ? getSmallIconDim(card.specifiers) : undefined
33
- const Header = ({ inContent = false, className = '' }) => ((card.title || card.byline || card.icon) ? (<CardHeader className={'not-typography' + ' text-accent' + disabledText + paddingclx + innerBorder + className}>
34
- <div className={(iconInline || inContent) ? 'flex flex-row justify-start items-end my-3' : ''}>
35
- {(card.icon && !card.iconAfter) && (<div className={iconInline ? 'mr-1' : 'mb-2'}>{card.icon}</div>)}
36
- {card.title && (<CardTitle className={'text-center text-lg font-medium' + titleclx + (iconInline ? ' md:text-xl/none' : '')}>
37
- {card.title}
38
- </CardTitle>)}
39
- {(card.icon && card.iconAfter) && (<div className={iconInline ? 'ml-1' : 'my-1'}>{card.icon}</div>)}
40
- </div>
41
- {card.byline && (<CardDescription>{card.byline}</CardDescription>)}
42
- </CardHeader>) : null);
43
- const MediaAndContent = ({ className = '' }) => (has('media-left') ? (
44
- // media left layout
45
- <CardContent className={'flex flex-row justify-start items-stretch p-0 grow ' + disabledBorder + bgclx + contentclx + className}>
46
- {card.media && (<div className={'box-content grow-0 not-typography' + paddingclx} style={{
47
- // If this layout has been specified, assume media is video, and that the 'sm' dim exists.
48
- width: card.media.dim.sm.w
49
- }}>
50
- <VideoBlockComponent block={card.media} usePoster={has('video-use-poster')} size='sm' className={has('appear-disabled') ? 'opacity-[0.6]' : ''}/>
51
- </div>)}
52
- {card.content && (<ApplyTypography className={'grow border-l flex flex-col justify-center ' + disabledTypoText + paddingclx + disabledBorder + contentclx} size={typoSize}>
53
- {(typeof card.content === 'string') ? (<p>{card.content}</p>) : card.content}
54
- </ApplyTypography>)}
55
- </CardContent>) : ( // default layout
56
- <CardContent className={'grow typography flex flex-col justify-center ' +
57
- typoclx + disabledTypoText + bgclx + paddingclx + contentclx + (has('full-width') ? ' p-0 ' : ' ') +
58
- className}>
59
- {contentOnHover && (<Header inContent/>)}
60
- {card.content && contentBefore && ((typeof card.content === 'string') ? (<p>{card.content}</p>) : card.content)}
61
- {card.media && (card.media.blockType === 'image' ? (<ImageBlockComponent block={card.media}/>) : (<VideoBlockComponent block={card.media}/>))}
62
- {card.content && !contentBefore && ((typeof card.content === 'string') ? (<p>{card.content}</p>) : card.content)}
63
- </CardContent>));
64
- const Footer = () => (!card.cta ? null : (has('links-w-arrow') ? (
65
- // links w arrow
66
- <CardFooter className={'typography typography-a:text-muted-2 typography-a:hover:text-muted-1 typography-a:text-xs typography-a:no-underline typography-a:hover:underline ' +
67
- 'flex flex-col justify-start items-stretch ' + paddingclx}>
68
- <CTABlockComponent block={card.cta} renderLink={(def, key) => (<LinkOutButton def={def} key={key}/>)}/>
69
- </CardFooter>) : ( // default
70
- <CardFooter className={'grid grid-cols-1 gap-2 md:flex md:flex-row md:justify-center ' + paddingclx}>
71
- <CTABlockComponent block={card.cta}/>
72
- </CardFooter>)));
73
- return (<Card className={cn('flex flex-col self-stretch ' +
74
- (contentOnHover ? 'group relative' : '') +
75
- disabledBorder +
76
- outerBorder +
77
- bgclx +
78
- mainGap, className)}>
79
- <Header className={(contentOnHover ? ' absolute top-[0px] left-[0px] w-full hidden ' : '')}/>
80
- <MediaAndContent className={(contentOnHover ?
81
- ' bg-gradient-to-t from-secondary to-65%' +
82
- ' items-start justify-start rounded-lg p-4' +
83
- ' transition-opacity duration-500 ease-out opacity-100 ' : '')}/>
84
- <Footer />
85
- </Card>);
86
- };
87
- export default CardBlockComponent;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import type { LinkDef } from '../../../types';
3
- declare const ArrowLinkElement: React.FC<{
4
- def: LinkDef;
5
- }>;
6
- export default ArrowLinkElement;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { LinkElement, Icons } from '../../../primitives/index-next';
3
- const ArrowLinkElement = ({ def }) => (<LinkElement def={def} className='justify-between' variant='link' icon={<Icons.linkOut className='w-[18px] h-[18px]'/>} iconAfter/>);
4
- export default ArrowLinkElement;
@@ -1,4 +0,0 @@
1
- import type { Dimensions } from '../../../types';
2
- import type { TypographySize } from '../../../primitives/index-common';
3
- export declare const getTypographySize: (s: string) => TypographySize;
4
- export declare const getSmallIconDim: (s: string) => Dimensions | undefined;
@@ -1,6 +0,0 @@
1
- import { getSpecifierData, getPrimaryStartingWith, getDim, } from '../../../util/specifier';
2
- export const getTypographySize = (s) => getSpecifierData(s, (s) => (getPrimaryStartingWith(s, 'typography')), (s) => {
3
- const subTokenArray = s.split('-');
4
- return subTokenArray[subTokenArray.length - 1];
5
- }, 'responsive');
6
- export const getSmallIconDim = (s) => (getSpecifierData(s, (s) => (getPrimaryStartingWith(s, 'small-icon')), getDim));
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type BlockComponentProps from '../block-component-props';
3
- declare const CarteBlancheBlockComponent: React.FC<BlockComponentProps>;
4
- export default CarteBlancheBlockComponent;