Package not found. Please check the package name and try again.

@hanzo/ui 4.5.3 → 4.6.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 (419) hide show
  1. package/README-MCP.md +3 -3
  2. package/README.md +229 -0
  3. package/assets/ai-icons.tsx +207 -0
  4. package/assets/crypto.tsx +33 -0
  5. package/assets/file-type-icon.tsx +66 -0
  6. package/assets/file.tsx +45 -0
  7. package/assets/general.tsx +2318 -0
  8. package/assets/hanzo-logo.svg +9 -0
  9. package/assets/hanzo-logo.tsx +15 -0
  10. package/assets/index.ts +8 -0
  11. package/assets/index.tsx +4 -0
  12. package/assets/llm-provider.tsx +1094 -0
  13. package/bin/create-registry.js +1 -1
  14. package/bin/test-mcp.sh +1 -1
  15. package/bin/update-registry.js +2 -2
  16. package/blocks/components/content.tsx +1 -1
  17. package/blocks/components/grid-block/index.tsx +1 -1
  18. package/blocks/components/screenful-block/content.tsx +1 -1
  19. package/blocks/components/screenful-block/poster-background.tsx +1 -1
  20. package/components/index.ts +56 -0
  21. package/dist/button.d.ts +1 -0
  22. package/dist/button.js +1 -0
  23. package/dist/hooks/index.d.ts +7 -0
  24. package/dist/hooks/index.js +7 -0
  25. package/dist/hooks/use-click-away.d.ts +2 -0
  26. package/dist/hooks/use-click-away.js +23 -0
  27. package/dist/hooks/use-combined-refs.d.ts +3 -0
  28. package/dist/hooks/use-combined-refs.js +18 -0
  29. package/dist/hooks/use-copy-clipboard.d.ts +9 -0
  30. package/dist/hooks/use-copy-clipboard.js +21 -0
  31. package/dist/hooks/use-debounce.d.ts +1 -0
  32. package/dist/hooks/use-debounce.js +13 -0
  33. package/dist/hooks/use-fill-ids.d.ts +8 -0
  34. package/dist/hooks/use-fill-ids.js +20 -0
  35. package/dist/hooks/use-map.d.ts +1 -0
  36. package/dist/hooks/use-map.js +20 -0
  37. package/dist/hooks/use-measure.d.ts +8 -0
  38. package/dist/hooks/use-measure.js +25 -0
  39. package/dist/hooks/use-reverse-video-playback.d.ts +1 -0
  40. package/dist/hooks/use-reverse-video-playback.js +41 -0
  41. package/dist/hooks/use-scroll-restoration.d.ts +8 -0
  42. package/dist/hooks/use-scroll-restoration.js +36 -0
  43. package/dist/mcp/enhanced-server.js +3 -3
  44. package/dist/mcp/index.js +1 -1
  45. package/dist/registry/api.d.ts +1 -1
  46. package/dist/registry/api.js +3 -4
  47. package/dist/registry/index.d.ts +348 -4
  48. package/dist/registry/index.js +3 -3
  49. package/dist/utils.d.ts +1 -0
  50. package/dist/utils.js +1 -0
  51. package/helpers/file.ts +33 -0
  52. package/helpers/memoization.ts +40 -0
  53. package/package.json +27 -6
  54. package/primitives/accordion.tsx +53 -45
  55. package/primitives/alert-dialog.tsx +185 -0
  56. package/primitives/alert.tsx +74 -0
  57. package/primitives/apply-typography.tsx +1 -1
  58. package/primitives/avatar.tsx +37 -29
  59. package/primitives/background-beams.tsx +142 -0
  60. package/primitives/badge.tsx +27 -19
  61. package/primitives/breadcrumb.tsx +77 -62
  62. package/primitives/button.tsx +69 -72
  63. package/primitives/card.tsx +73 -59
  64. package/primitives/chat/chat-input-area.tsx +87 -0
  65. package/primitives/chat/chat-input.tsx +71 -0
  66. package/primitives/chat/files-preview.tsx +330 -0
  67. package/primitives/chat/index.ts +6 -0
  68. package/primitives/chat/json-form.tsx +8 -0
  69. package/primitives/chat/message-list.tsx +307 -0
  70. package/primitives/chat/message.tsx +569 -0
  71. package/primitives/chat/sqlite-preview.tsx +215 -0
  72. package/primitives/checkbox.tsx +18 -19
  73. package/primitives/collapsible.tsx +9 -0
  74. package/primitives/command.tsx +75 -83
  75. package/primitives/context-menu.tsx +115 -109
  76. package/primitives/copy-to-clipboard-icon.tsx +60 -0
  77. package/primitives/dialog-video-controller.tsx +1 -1
  78. package/primitives/dialog.tsx +111 -145
  79. package/primitives/dot-pattern.tsx +57 -0
  80. package/primitives/dots-loader.tsx +13 -0
  81. package/primitives/drawer.tsx +59 -87
  82. package/primitives/dropdown-menu.tsx +199 -0
  83. package/primitives/error-message.tsx +19 -0
  84. package/primitives/file-uploader.tsx +200 -0
  85. package/primitives/form.tsx +92 -87
  86. package/primitives/hover-card.tsx +28 -0
  87. package/primitives/icons/github.tsx +1 -1
  88. package/primitives/icons/youtube-logo.tsx +1 -1
  89. package/primitives/index-common.ts +121 -42
  90. package/primitives/index-next.ts +3 -1
  91. package/primitives/input.tsx +115 -20
  92. package/primitives/label.tsx +15 -23
  93. package/primitives/loading-spinner.tsx +1 -1
  94. package/primitives/markdown-preview.tsx +609 -0
  95. package/primitives/mermaid.tsx +196 -0
  96. package/primitives/next/link-element.tsx +1 -1
  97. package/primitives/next/mdx-link.tsx +1 -1
  98. package/primitives/pagination.tsx +117 -0
  99. package/primitives/popover.tsx +20 -25
  100. package/primitives/pretty-json-print.tsx +28 -0
  101. package/primitives/progress.tsx +14 -15
  102. package/primitives/prompt-textarea.tsx +72 -0
  103. package/primitives/qr-code.tsx +112 -0
  104. package/primitives/radio-group.tsx +25 -39
  105. package/primitives/resizable.tsx +47 -0
  106. package/primitives/scroll-area.tsx +35 -25
  107. package/primitives/search-input.tsx +66 -0
  108. package/primitives/select.tsx +62 -109
  109. package/primitives/separator.tsx +22 -26
  110. package/primitives/sheet.tsx +78 -117
  111. package/primitives/skeleton.tsx +13 -16
  112. package/primitives/slider.tsx +50 -60
  113. package/primitives/stepper.tsx +272 -0
  114. package/primitives/switch.tsx +14 -23
  115. package/primitives/table.tsx +65 -77
  116. package/primitives/tabs.tsx +29 -39
  117. package/primitives/text-link.tsx +25 -0
  118. package/primitives/textarea.tsx +61 -0
  119. package/primitives/textfield.tsx +75 -0
  120. package/primitives/toast.tsx +30 -0
  121. package/primitives/toggle-group.tsx +33 -33
  122. package/primitives/toggle.tsx +22 -51
  123. package/primitives/tooltip.tsx +37 -38
  124. package/registry.json +1 -1
  125. package/src/button.ts +1 -0
  126. package/src/hooks/index.ts +7 -0
  127. package/src/hooks/use-click-away.ts +31 -0
  128. package/src/hooks/use-combined-refs.ts +22 -0
  129. package/src/hooks/use-copy-clipboard.ts +30 -0
  130. package/src/hooks/use-debounce.ts +17 -0
  131. package/src/hooks/use-fill-ids.ts +25 -0
  132. package/src/hooks/use-map.ts +26 -0
  133. package/src/hooks/use-measure.ts +42 -0
  134. package/src/hooks/use-reverse-video-playback.ts +43 -0
  135. package/src/hooks/use-scroll-restoration.ts +50 -0
  136. package/{mcp → src/mcp}/README.md +1 -1
  137. package/{mcp → src/mcp}/enhanced-server.ts +2 -2
  138. package/{registry → src/registry}/api.ts +3 -3
  139. package/{registry → src/registry}/index.ts +3 -3
  140. package/src/utils.ts +1 -0
  141. package/style/theme-provider.tsx +1 -1
  142. package/test-imports.mjs +19 -0
  143. package/tsconfig.json +9 -4
  144. package/types/animation-def.ts +1 -1
  145. package/types/button-def.ts +1 -1
  146. package/types/index.ts +1 -1
  147. package/util/blob.ts +28 -0
  148. package/util/copy-to-clipboard.ts +17 -0
  149. package/util/create-shadow-root.ts +22 -0
  150. package/util/date.ts +83 -0
  151. package/util/debounce.ts +11 -0
  152. package/util/file.ts +15 -0
  153. package/util/format-and-abbreviate-as-currency.ts +1 -1
  154. package/util/format-text.ts +33 -0
  155. package/util/index.ts +9 -78
  156. package/util/timing.ts +3 -0
  157. package/util/toasts.tsx +17 -0
  158. package/utils.ts +9 -0
  159. package/dist/blocks/components/accordian-block.d.ts +0 -4
  160. package/dist/blocks/components/accordian-block.jsx +0 -25
  161. package/dist/blocks/components/block-component-props.d.ts +0 -7
  162. package/dist/blocks/components/block-component-props.js +0 -1
  163. package/dist/blocks/components/bullet-cards-block.d.ts +0 -4
  164. package/dist/blocks/components/bullet-cards-block.jsx +0 -25
  165. package/dist/blocks/components/card-block/index.d.ts +0 -6
  166. package/dist/blocks/components/card-block/index.jsx +0 -87
  167. package/dist/blocks/components/card-block/link-out-button.d.ts +0 -6
  168. package/dist/blocks/components/card-block/link-out-button.jsx +0 -4
  169. package/dist/blocks/components/card-block/util.d.ts +0 -4
  170. package/dist/blocks/components/card-block/util.js +0 -6
  171. package/dist/blocks/components/carte-blanche-block/index.d.ts +0 -4
  172. package/dist/blocks/components/carte-blanche-block/index.jsx +0 -82
  173. package/dist/blocks/components/carte-blanche-block/variant-content-left.d.ts +0 -10
  174. package/dist/blocks/components/carte-blanche-block/variant-content-left.jsx +0 -23
  175. package/dist/blocks/components/content.d.ts +0 -10
  176. package/dist/blocks/components/content.jsx +0 -47
  177. package/dist/blocks/components/cta-block.d.ts +0 -12
  178. package/dist/blocks/components/cta-block.jsx +0 -69
  179. package/dist/blocks/components/enh-heading-block.d.ts +0 -7
  180. package/dist/blocks/components/enh-heading-block.jsx +0 -142
  181. package/dist/blocks/components/grid-block/grid-block-mutator.d.ts +0 -5
  182. package/dist/blocks/components/grid-block/grid-block-mutator.js +0 -1
  183. package/dist/blocks/components/grid-block/index.d.ts +0 -9
  184. package/dist/blocks/components/grid-block/index.jsx +0 -56
  185. package/dist/blocks/components/grid-block/mutator-registry.d.ts +0 -3
  186. package/dist/blocks/components/grid-block/mutator-registry.js +0 -5
  187. package/dist/blocks/components/grid-block/table-borders.mutator.d.ts +0 -3
  188. package/dist/blocks/components/grid-block/table-borders.mutator.js +0 -36
  189. package/dist/blocks/components/group-block.d.ts +0 -7
  190. package/dist/blocks/components/group-block.jsx +0 -61
  191. package/dist/blocks/components/heading-block.d.ts +0 -4
  192. package/dist/blocks/components/heading-block.jsx +0 -99
  193. package/dist/blocks/components/image-block.d.ts +0 -7
  194. package/dist/blocks/components/image-block.jsx +0 -69
  195. package/dist/blocks/components/index.d.ts +0 -14
  196. package/dist/blocks/components/index.js +0 -13
  197. package/dist/blocks/components/screenful-block/content.d.ts +0 -8
  198. package/dist/blocks/components/screenful-block/content.jsx +0 -71
  199. package/dist/blocks/components/screenful-block/index.d.ts +0 -12
  200. package/dist/blocks/components/screenful-block/index.jsx +0 -57
  201. package/dist/blocks/components/screenful-block/poster-background.d.ts +0 -7
  202. package/dist/blocks/components/screenful-block/poster-background.jsx +0 -14
  203. package/dist/blocks/components/screenful-block/video-background.d.ts +0 -8
  204. package/dist/blocks/components/screenful-block/video-background.jsx +0 -20
  205. package/dist/blocks/components/space-block.d.ts +0 -4
  206. package/dist/blocks/components/space-block.jsx +0 -42
  207. package/dist/blocks/components/video-block.d.ts +0 -9
  208. package/dist/blocks/components/video-block.jsx +0 -83
  209. package/dist/blocks/def/accordian-block.d.ts +0 -10
  210. package/dist/blocks/def/accordian-block.js +0 -2
  211. package/dist/blocks/def/block.d.ts +0 -4
  212. package/dist/blocks/def/block.js +0 -1
  213. package/dist/blocks/def/bullet-cards-block.d.ts +0 -17
  214. package/dist/blocks/def/bullet-cards-block.js +0 -1
  215. package/dist/blocks/def/card-block.d.ts +0 -17
  216. package/dist/blocks/def/card-block.js +0 -2
  217. package/dist/blocks/def/carte-blanche-block.d.ts +0 -12
  218. package/dist/blocks/def/carte-blanche-block.js +0 -1
  219. package/dist/blocks/def/cta-block.d.ts +0 -8
  220. package/dist/blocks/def/cta-block.js +0 -1
  221. package/dist/blocks/def/element-block.d.ts +0 -7
  222. package/dist/blocks/def/element-block.js +0 -2
  223. package/dist/blocks/def/enh-heading-block.d.ts +0 -22
  224. package/dist/blocks/def/enh-heading-block.js +0 -1
  225. package/dist/blocks/def/grid-block.d.ts +0 -12
  226. package/dist/blocks/def/grid-block.js +0 -1
  227. package/dist/blocks/def/group-block.d.ts +0 -7
  228. package/dist/blocks/def/group-block.js +0 -1
  229. package/dist/blocks/def/heading-block.d.ts +0 -11
  230. package/dist/blocks/def/heading-block.js +0 -1
  231. package/dist/blocks/def/image-block.d.ts +0 -26
  232. package/dist/blocks/def/image-block.js +0 -1
  233. package/dist/blocks/def/index.d.ts +0 -17
  234. package/dist/blocks/def/index.js +0 -2
  235. package/dist/blocks/def/screenful-block.d.ts +0 -41
  236. package/dist/blocks/def/screenful-block.js +0 -1
  237. package/dist/blocks/def/space-block.d.ts +0 -47
  238. package/dist/blocks/def/space-block.js +0 -8
  239. package/dist/blocks/def/video-block.d.ts +0 -5
  240. package/dist/blocks/def/video-block.js +0 -1
  241. package/dist/blocks/index.d.ts +0 -2
  242. package/dist/blocks/index.js +0 -2
  243. package/dist/primitives/accordion.d.ts +0 -10
  244. package/dist/primitives/accordion.jsx +0 -21
  245. package/dist/primitives/action-button.d.ts +0 -9
  246. package/dist/primitives/action-button.jsx +0 -16
  247. package/dist/primitives/apply-typography.d.ts +0 -7
  248. package/dist/primitives/apply-typography.jsx +0 -38
  249. package/dist/primitives/aspect-ratio.d.ts +0 -3
  250. package/dist/primitives/aspect-ratio.jsx +0 -4
  251. package/dist/primitives/avatar.d.ts +0 -6
  252. package/dist/primitives/avatar.jsx +0 -11
  253. package/dist/primitives/badge.d.ts +0 -9
  254. package/dist/primitives/badge.jsx +0 -18
  255. package/dist/primitives/breadcrumb.d.ts +0 -19
  256. package/dist/primitives/breadcrumb.jsx +0 -27
  257. package/dist/primitives/breakpoint-indicator.d.ts +0 -3
  258. package/dist/primitives/breakpoint-indicator.jsx +0 -14
  259. package/dist/primitives/button.d.ts +0 -12
  260. package/dist/primitives/button.jsx +0 -55
  261. package/dist/primitives/calendar.d.ts +0 -8
  262. package/dist/primitives/calendar.jsx +0 -40
  263. package/dist/primitives/card.d.ts +0 -8
  264. package/dist/primitives/card.jsx +0 -18
  265. package/dist/primitives/carousel.d.ts +0 -18
  266. package/dist/primitives/carousel.jsx +0 -106
  267. package/dist/primitives/checkbox.d.ts +0 -4
  268. package/dist/primitives/checkbox.jsx +0 -15
  269. package/dist/primitives/combobox.d.ts +0 -41
  270. package/dist/primitives/combobox.jsx +0 -77
  271. package/dist/primitives/command.d.ts +0 -17
  272. package/dist/primitives/command.jsx +0 -38
  273. package/dist/primitives/context-menu.d.ts +0 -27
  274. package/dist/primitives/context-menu.jsx +0 -57
  275. package/dist/primitives/dialog-video-controller.d.ts +0 -3
  276. package/dist/primitives/dialog-video-controller.jsx +0 -24
  277. package/dist/primitives/dialog.d.ts +0 -28
  278. package/dist/primitives/dialog.jsx +0 -37
  279. package/dist/primitives/drawer.d.ts +0 -29
  280. package/dist/primitives/drawer.jsx +0 -34
  281. package/dist/primitives/form.d.ts +0 -12
  282. package/dist/primitives/form.jsx +0 -69
  283. package/dist/primitives/icons/github.d.ts +0 -4
  284. package/dist/primitives/icons/github.jsx +0 -6
  285. package/dist/primitives/icons/index.d.ts +0 -4
  286. package/dist/primitives/icons/index.js +0 -4
  287. package/dist/primitives/icons/youtube-logo.d.ts +0 -4
  288. package/dist/primitives/icons/youtube-logo.jsx +0 -39
  289. package/dist/primitives/index-common.d.ts +0 -47
  290. package/dist/primitives/index-common.js +0 -46
  291. package/dist/primitives/index-next.d.ts +0 -2
  292. package/dist/primitives/index-next.js +0 -2
  293. package/dist/primitives/input-otp.d.ts +0 -7
  294. package/dist/primitives/input-otp.jsx +0 -24
  295. package/dist/primitives/input.d.ts +0 -5
  296. package/dist/primitives/input.jsx +0 -11
  297. package/dist/primitives/label.d.ts +0 -5
  298. package/dist/primitives/label.jsx +0 -11
  299. package/dist/primitives/list-adaptor.d.ts +0 -9
  300. package/dist/primitives/list-adaptor.js +0 -1
  301. package/dist/primitives/list-box.d.ts +0 -10
  302. package/dist/primitives/list-box.jsx +0 -14
  303. package/dist/primitives/loading-spinner.d.ts +0 -5
  304. package/dist/primitives/loading-spinner.jsx +0 -8
  305. package/dist/primitives/navigation-menu.d.ts +0 -12
  306. package/dist/primitives/navigation-menu.jsx +0 -38
  307. package/dist/primitives/next/image.d.ts +0 -11
  308. package/dist/primitives/next/image.jsx +0 -42
  309. package/dist/primitives/next/index.d.ts +0 -7
  310. package/dist/primitives/next/index.js +0 -7
  311. package/dist/primitives/next/inline-icon.d.ts +0 -13
  312. package/dist/primitives/next/inline-icon.jsx +0 -15
  313. package/dist/primitives/next/link-element.d.ts +0 -23
  314. package/dist/primitives/next/link-element.jsx +0 -56
  315. package/dist/primitives/next/mdx-link.d.ts +0 -3
  316. package/dist/primitives/next/mdx-link.jsx +0 -12
  317. package/dist/primitives/next/media-stack.d.ts +0 -8
  318. package/dist/primitives/next/media-stack.jsx +0 -28
  319. package/dist/primitives/next/nav-items.d.ts +0 -10
  320. package/dist/primitives/next/nav-items.jsx +0 -24
  321. package/dist/primitives/next/youtube-embed.d.ts +0 -11
  322. package/dist/primitives/next/youtube-embed.jsx +0 -23
  323. package/dist/primitives/popover.d.ts +0 -9
  324. package/dist/primitives/popover.jsx +0 -18
  325. package/dist/primitives/progress.d.ts +0 -4
  326. package/dist/primitives/progress.jsx +0 -9
  327. package/dist/primitives/radio-group.d.ts +0 -7
  328. package/dist/primitives/radio-group.jsx +0 -18
  329. package/dist/primitives/scroll-area.d.ts +0 -5
  330. package/dist/primitives/scroll-area.jsx +0 -19
  331. package/dist/primitives/select.d.ts +0 -13
  332. package/dist/primitives/select.jsx +0 -62
  333. package/dist/primitives/separator.d.ts +0 -4
  334. package/dist/primitives/separator.jsx +0 -7
  335. package/dist/primitives/sheet.d.ts +0 -30
  336. package/dist/primitives/sheet.jsx +0 -56
  337. package/dist/primitives/skeleton.d.ts +0 -4
  338. package/dist/primitives/skeleton.jsx +0 -3
  339. package/dist/primitives/slider.d.ts +0 -9
  340. package/dist/primitives/slider.jsx +0 -30
  341. package/dist/primitives/sonner.d.ts +0 -5
  342. package/dist/primitives/sonner.jsx +0 -16
  343. package/dist/primitives/step-indicator.d.ts +0 -9
  344. package/dist/primitives/step-indicator.jsx +0 -23
  345. package/dist/primitives/switch.d.ts +0 -6
  346. package/dist/primitives/switch.jsx +0 -14
  347. package/dist/primitives/table.d.ts +0 -10
  348. package/dist/primitives/table.jsx +0 -21
  349. package/dist/primitives/tabs.d.ts +0 -7
  350. package/dist/primitives/tabs.jsx +0 -18
  351. package/dist/primitives/text-area.d.ts +0 -5
  352. package/dist/primitives/text-area.jsx +0 -9
  353. package/dist/primitives/toggle-group.d.ts +0 -14
  354. package/dist/primitives/toggle-group.jsx +0 -28
  355. package/dist/primitives/toggle.d.ts +0 -14
  356. package/dist/primitives/toggle.jsx +0 -52
  357. package/dist/primitives/tooltip.d.ts +0 -11
  358. package/dist/primitives/tooltip.jsx +0 -18
  359. package/dist/primitives/video-player.d.ts +0 -6
  360. package/dist/primitives/video-player.jsx +0 -8
  361. package/dist/style/theme-provider.d.ts +0 -4
  362. package/dist/style/theme-provider.jsx +0 -11
  363. package/dist/tailwind/fontFamily.tailwind.d.ts +0 -8
  364. package/dist/tailwind/fontFamily.tailwind.js +0 -7
  365. package/dist/tailwind/fontSize.tailwind.d.ts +0 -36
  366. package/dist/tailwind/fontSize.tailwind.js +0 -13
  367. package/dist/tailwind/index.d.ts +0 -3
  368. package/dist/tailwind/index.js +0 -2
  369. package/dist/tailwind/screens.tailwind.d.ts +0 -9
  370. package/dist/tailwind/screens.tailwind.js +0 -8
  371. package/dist/tailwind/tw-font-desc.d.ts +0 -6
  372. package/dist/tailwind/tw-font-desc.js +0 -6
  373. package/dist/types/animation-def.d.ts +0 -2
  374. package/dist/types/animation-def.js +0 -1
  375. package/dist/types/breakpoints.d.ts +0 -4
  376. package/dist/types/breakpoints.js +0 -4
  377. package/dist/types/bullet-item.d.ts +0 -6
  378. package/dist/types/bullet-item.js +0 -2
  379. package/dist/types/button-def.d.ts +0 -29
  380. package/dist/types/button-def.js +0 -2
  381. package/dist/types/dimensions.d.ts +0 -5
  382. package/dist/types/dimensions.js +0 -1
  383. package/dist/types/grid-def.d.ts +0 -36
  384. package/dist/types/grid-def.js +0 -33
  385. package/dist/types/image-def.d.ts +0 -27
  386. package/dist/types/image-def.js +0 -1
  387. package/dist/types/index.d.ts +0 -13
  388. package/dist/types/index.js +0 -2
  389. package/dist/types/link-def.d.ts +0 -44
  390. package/dist/types/link-def.js +0 -1
  391. package/dist/types/media-stack-def.d.ts +0 -25
  392. package/dist/types/media-stack-def.js +0 -1
  393. package/dist/types/t-shirt-size.d.ts +0 -2
  394. package/dist/types/t-shirt-size.js +0 -1
  395. package/dist/types/tshirt-dimensions.d.ts +0 -12
  396. package/dist/types/tshirt-dimensions.js +0 -1
  397. package/dist/types/video-def.d.ts +0 -9
  398. package/dist/types/video-def.js +0 -1
  399. package/dist/util/format-and-abbreviate-as-currency.d.ts +0 -11
  400. package/dist/util/format-and-abbreviate-as-currency.js +0 -91
  401. package/dist/util/format-to-max-char.d.ts +0 -5
  402. package/dist/util/format-to-max-char.js +0 -57
  403. package/dist/util/index-client.d.ts +0 -2
  404. package/dist/util/index-client.js +0 -3
  405. package/dist/util/index.d.ts +0 -17
  406. package/dist/util/index.js +0 -41
  407. package/dist/util/number-abbreviate.d.ts +0 -9
  408. package/dist/util/number-abbreviate.js +0 -30
  409. package/dist/util/specifier.d.ts +0 -7
  410. package/dist/util/specifier.js +0 -31
  411. package/dist/util/spread-to-transform.d.ts +0 -7
  412. package/dist/util/spread-to-transform.js +0 -18
  413. package/dist/util/step-animation.d.ts +0 -5
  414. package/dist/util/step-animation.js +0 -60
  415. package/dist/util/two-way-map.d.ts +0 -8
  416. package/dist/util/two-way-map.js +0 -16
  417. /package/{mcp → src/mcp}/index.ts +0 -0
  418. /package/{mcp → src/mcp}/package.json +0 -0
  419. /package/{registry → src/registry}/package.json +0 -0
package/README-MCP.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Hanzo UI with MCP Support
2
2
 
3
- This implementation provides Model Context Protocol (MCP) support for the Hanzo UI library, enabling AI assistants to interact with the component registry based on shadcn/ui.
3
+ This implementation provides Model Context Protocol (MCP) support for the Hanzo UI library, enabling AI assistants to interact with the component registry based on hanzo/ui.
4
4
 
5
5
  ## Quick Start
6
6
 
@@ -91,7 +91,7 @@ node ./bin/cli.js registry:mcp
91
91
 
92
92
  ### Creating a Registry
93
93
 
94
- The registry is compatible with shadcn/ui's registry format. To create a custom registry:
94
+ The registry is compatible with hanzo/ui's registry format. To create a custom registry:
95
95
 
96
96
  1. Create a `registry.json` file using the schema from `/pkg/ui/registry/schema.ts`
97
97
  2. Build the registry using a build script
@@ -148,7 +148,7 @@ Which one would you like to add to your project?
148
148
 
149
149
  ### Registry Schema
150
150
 
151
- The registry schema is compatible with shadcn/ui and includes:
151
+ The registry schema is compatible with hanzo/ui and includes:
152
152
 
153
153
  - Component metadata (name, description, type)
154
154
  - Dependencies (npm packages)
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
@@ -0,0 +1,207 @@
1
+ // AI provider icon implementations
2
+ import React from 'react';
3
+ import { cn } from '../src/utils';
4
+ import { BrainIcon, ServerIcon, BotIcon, SparklesIcon, CpuIcon, ZapIcon, RocketIcon, ActivityIcon, NetworkIcon } from 'lucide-react';
5
+
6
+ // Simple placeholder icons for AI providers - replace with actual brand icons when available
7
+ export const AnthropicIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
8
+ ({ className, ...props }, ref) => (
9
+ <BrainIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
10
+ )
11
+ );
12
+ AnthropicIcon.displayName = 'AnthropicIcon';
13
+
14
+ export const AyaCohereIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
15
+ ({ className, ...props }, ref) => (
16
+ <SparklesIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
17
+ )
18
+ );
19
+ AyaCohereIcon.displayName = 'AyaCohereIcon';
20
+
21
+ export const DeepSeekIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
22
+ ({ className, ...props }, ref) => (
23
+ <CpuIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
24
+ )
25
+ );
26
+ DeepSeekIcon.displayName = 'DeepSeekIcon';
27
+
28
+ export const ExoIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
29
+ ({ className, ...props }, ref) => (
30
+ <ServerIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
31
+ )
32
+ );
33
+ ExoIcon.displayName = 'ExoIcon';
34
+
35
+ export const GeminiIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
36
+ ({ className, ...props }, ref) => (
37
+ <SparklesIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
38
+ )
39
+ );
40
+ GeminiIcon.displayName = 'GeminiIcon';
41
+
42
+ export const GoogleIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
43
+ ({ className, ...props }, ref) => (
44
+ <svg ref={ref} className={cn("h-4 w-4", className)} viewBox="0 0 24 24" fill="currentColor" {...props}>
45
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
46
+ </svg>
47
+ )
48
+ );
49
+ GoogleIcon.displayName = 'GoogleIcon';
50
+
51
+ export const GrokIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
52
+ ({ className, ...props }, ref) => (
53
+ <ZapIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
54
+ )
55
+ );
56
+ GrokIcon.displayName = 'GrokIcon';
57
+
58
+ export const GroqIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
59
+ ({ className, ...props }, ref) => (
60
+ <RocketIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
61
+ )
62
+ );
63
+ GroqIcon.displayName = 'GroqIcon';
64
+
65
+ export const LmStudioIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
66
+ ({ className, ...props }, ref) => (
67
+ <ServerIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
68
+ )
69
+ );
70
+ LmStudioIcon.displayName = 'LmStudioIcon';
71
+
72
+ export const MetaIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
73
+ ({ className, ...props }, ref) => (
74
+ <svg ref={ref} className={cn("h-4 w-4", className)} viewBox="0 0 24 24" fill="currentColor" {...props}>
75
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 2c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8z"/>
76
+ </svg>
77
+ )
78
+ );
79
+ MetaIcon.displayName = 'MetaIcon';
80
+
81
+ export const MistralIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
82
+ ({ className, ...props }, ref) => (
83
+ <ActivityIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
84
+ )
85
+ );
86
+ MistralIcon.displayName = 'MistralIcon';
87
+
88
+ export const OllamaIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
89
+ ({ className, ...props }, ref) => (
90
+ <ServerIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
91
+ )
92
+ );
93
+ OllamaIcon.displayName = 'OllamaIcon';
94
+
95
+ export const OpenAIIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
96
+ ({ className, ...props }, ref) => (
97
+ <BotIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
98
+ )
99
+ );
100
+ OpenAIIcon.displayName = 'OpenAIIcon';
101
+
102
+ export const OpenRouterIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
103
+ ({ className, ...props }, ref) => (
104
+ <NetworkIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
105
+ )
106
+ );
107
+ OpenRouterIcon.displayName = 'OpenRouterIcon';
108
+
109
+ export const PerplexityIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
110
+ ({ className, ...props }, ref) => (
111
+ <SparklesIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
112
+ )
113
+ );
114
+ PerplexityIcon.displayName = 'PerplexityIcon';
115
+
116
+ export const QwenIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
117
+ ({ className, ...props }, ref) => (
118
+ <CpuIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
119
+ )
120
+ );
121
+ QwenIcon.displayName = 'QwenIcon';
122
+
123
+ export const HanzoIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
124
+ ({ className, ...props }, ref) => (
125
+ <svg ref={ref} className={cn("h-4 w-4", className)} viewBox="0 0 24 24" fill="currentColor" {...props}>
126
+ <path d="M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z"/>
127
+ </svg>
128
+ )
129
+ );
130
+ HanzoIcon.displayName = 'HanzoIcon';
131
+
132
+ export const TogetherAI = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
133
+ ({ className, ...props }, ref) => (
134
+ <NetworkIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
135
+ )
136
+ );
137
+ TogetherAI.displayName = 'TogetherAI';
138
+
139
+ // Generic AI icon for providers without specific icons
140
+ export const AisIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
141
+ ({ className, ...props }, ref) => (
142
+ <BrainIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
143
+ )
144
+ );
145
+ AisIcon.displayName = 'AisIcon';
146
+
147
+ // Also export the ScheduledTasksIcon and SendIcon that might be needed
148
+ export const ScheduledTasksIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
149
+ ({ className, ...props }, ref) => (
150
+ <ActivityIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
151
+ )
152
+ );
153
+ ScheduledTasksIcon.displayName = 'ScheduledTasksIcon';
154
+
155
+ export const SendIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
156
+ ({ className, ...props }, ref) => (
157
+ <svg ref={ref} className={cn("h-4 w-4", className)} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" {...props}>
158
+ <line x1="22" y1="2" x2="11" y2="13"></line>
159
+ <polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
160
+ </svg>
161
+ )
162
+ );
163
+ SendIcon.displayName = 'SendIcon';
164
+
165
+ export const ReactJsIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
166
+ ({ className, ...props }, ref) => (
167
+ <svg ref={ref} className={cn("h-4 w-4", className)} viewBox="0 0 24 24" fill="currentColor" {...props}>
168
+ <circle cx="12" cy="12" r="10" fill="none" stroke="currentColor" strokeWidth="2"/>
169
+ <circle cx="12" cy="12" r="3" fill="currentColor"/>
170
+ <circle cx="12" cy="6" r="2" fill="currentColor"/>
171
+ <circle cx="18" cy="15" r="2" fill="currentColor"/>
172
+ <circle cx="6" cy="15" r="2" fill="currentColor"/>
173
+ <path d="M12 12 L12 6 M12 12 L18 15 M12 12 L6 15" stroke="currentColor" strokeWidth="1.5"/>
174
+ </svg>
175
+ )
176
+ );
177
+ ReactJsIcon.displayName = 'ReactJsIcon';
178
+
179
+ export const ReasoningIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
180
+ ({ className, ...props }, ref) => (
181
+ <BrainIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
182
+ )
183
+ );
184
+ ReasoningIcon.displayName = 'ReasoningIcon';
185
+
186
+ export const ToolsIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
187
+ ({ className, ...props }, ref) => (
188
+ <svg ref={ref} className={cn("h-4 w-4", className)} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" {...props}>
189
+ <path d="M14 2l1.5 1.5v5.5L21 9v6l-5.5-.5V21L14 22l-2-7-2 7-1.5-1V14.5L3 15V9l5.5.5V4L10 2h4z"/>
190
+ </svg>
191
+ )
192
+ );
193
+ ToolsIcon.displayName = 'ToolsIcon';
194
+
195
+ export const AIAgentIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
196
+ ({ className, ...props }, ref) => (
197
+ <BotIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
198
+ )
199
+ );
200
+ AIAgentIcon.displayName = 'AIAgentIcon';
201
+
202
+ export const TracingIcon = React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(
203
+ ({ className, ...props }, ref) => (
204
+ <ActivityIcon ref={ref} className={cn("h-4 w-4", className)} {...props} />
205
+ )
206
+ );
207
+ TracingIcon.displayName = 'TracingIcon';
@@ -0,0 +1,33 @@
1
+ import { cn } from '../src/utils';
2
+
3
+ export const EthereumIcon = ({ className }: { className?: string }) => (
4
+ <svg
5
+ className={cn('shrink-0', className)}
6
+ width="16"
7
+ height="16"
8
+ fill="none"
9
+ viewBox="0 0 24 24"
10
+ >
11
+ <path
12
+ fill="#fff"
13
+ d="M12 3v6.65l5.625 2.516zm0 0-5.625 9.166L12 9.651zm0 13.477v4.522l5.625-7.784zM12 21v-4.523l-5.625-3.262z"
14
+ />
15
+ </svg>
16
+ );
17
+
18
+ export const USDCIcon = ({ className }: { className?: string }) => (
19
+ <svg
20
+ width="16"
21
+ className={cn('shrink-0', className)}
22
+ height="16"
23
+ fill="none"
24
+ viewBox="0 0 24 24"
25
+ >
26
+ <path
27
+ fill="#fff"
28
+ fillRule="evenodd"
29
+ d="M12 21c4.99 0 9-4.01 9-9s-4.01-9-9-9-9 4.01-9 9 4.01 9 9 9m2.475-7.578c0-1.31-.787-1.76-2.362-1.946-1.125-.152-1.35-.45-1.35-.978 0-.523.377-.86 1.125-.86.675 0 1.052.224 1.237.787.04.112.152.185.265.185h.596a.256.256 0 0 0 .264-.259v-.039c-.152-.827-.827-1.614-1.687-1.687v-.827c0-.152-.113-.265-.298-.298h-.495c-.152 0-.293.112-.332.298v.827c-1.125.151-1.873 1.012-1.873 1.951 0 1.238.748 1.722 2.323 1.913 1.052.185 1.39.41 1.39 1.012 0 .597-.53 1.013-1.238 1.013-.98 0-1.316-.416-1.429-.979-.034-.146-.146-.225-.259-.225h-.641a.256.256 0 0 0-.259.264v.04c.146.934.748 1.575 1.986 1.76v.833c0 .152.112.253.298.293h.54c.146 0 .248-.102.287-.293v-.833c1.125-.185 1.912-.939 1.912-1.952"
30
+ clipRule="evenodd"
31
+ />
32
+ </svg>
33
+ );
@@ -0,0 +1,66 @@
1
+ // FileTypeIcon component
2
+ import React from 'react';
3
+ import { cn } from '../src/utils';
4
+ import { FileIcon, FolderIcon, ImageIcon, FileTextIcon, FileCodeIcon, FileArchiveIcon } from 'lucide-react';
5
+
6
+ export interface FileTypeIconProps extends React.SVGProps<SVGSVGElement> {
7
+ type?: string;
8
+ }
9
+
10
+ const getIconForType = (type?: string) => {
11
+ if (!type) return FileIcon;
12
+
13
+ const lowerType = type.toLowerCase();
14
+
15
+ // Image files
16
+ if (['png', 'jpg', 'jpeg', 'gif', 'svg', 'webp', 'ico', 'bmp'].includes(lowerType)) {
17
+ return ImageIcon;
18
+ }
19
+
20
+ // Document files
21
+ if (['pdf', 'doc', 'docx', 'txt', 'md', 'rtf'].includes(lowerType)) {
22
+ return FileTextIcon;
23
+ }
24
+
25
+ // Code files
26
+ if (['js', 'jsx', 'ts', 'tsx', 'html', 'css', 'scss', 'json', 'xml', 'py', 'java', 'c', 'cpp', 'rs', 'go'].includes(lowerType)) {
27
+ return FileCodeIcon;
28
+ }
29
+
30
+ // Archive files
31
+ if (['zip', 'rar', '7z', 'tar', 'gz', 'bz2', 'xz'].includes(lowerType)) {
32
+ return FileArchiveIcon;
33
+ }
34
+
35
+ return FileIcon;
36
+ };
37
+
38
+ export const FileTypeIcon = React.forwardRef<SVGSVGElement, FileTypeIconProps>(
39
+ ({ type, className, ...props }, ref) => {
40
+ const Icon = getIconForType(type);
41
+
42
+ return (
43
+ <Icon
44
+ ref={ref}
45
+ className={cn("h-4 w-4", className)}
46
+ {...props}
47
+ />
48
+ );
49
+ }
50
+ );
51
+
52
+ FileTypeIcon.displayName = 'FileTypeIcon';
53
+
54
+ export const DirectoryTypeIcon = React.forwardRef<SVGSVGElement, Omit<FileTypeIconProps, 'type'>>(
55
+ ({ className, ...props }, ref) => {
56
+ return (
57
+ <FolderIcon
58
+ ref={ref}
59
+ className={cn("h-4 w-4", className)}
60
+ {...props}
61
+ />
62
+ );
63
+ }
64
+ );
65
+
66
+ DirectoryTypeIcon.displayName = 'DirectoryTypeIcon';
@@ -0,0 +1,45 @@
1
+ // File icon map - placeholder for now
2
+ // TODO: Add actual file icons when SVG assets are available
3
+
4
+ export const fileIconMap: Record<string, string> = {
5
+ aep: '',
6
+ ai: '',
7
+ avi: '',
8
+ css: '',
9
+ csv: '',
10
+ dmg: '',
11
+ doc: '',
12
+ docx: '',
13
+ gif: '',
14
+ html: '',
15
+ jpeg: '',
16
+ jpg: '',
17
+ js: '',
18
+ json: '',
19
+ pdf: '',
20
+ png: '',
21
+ ppt: '',
22
+ pptx: '',
23
+ psd: '',
24
+ svg: '',
25
+ xls: '',
26
+ xlsx: '',
27
+ xml: '',
28
+ };
29
+
30
+ export const PaperClipIcon = ({ className }: { className?: string }) => (
31
+ <svg
32
+ xmlns="http://www.w3.org/2000/svg"
33
+ fill="none"
34
+ viewBox="0 0 24 24"
35
+ strokeWidth={1.5}
36
+ stroke="currentColor"
37
+ className={className}
38
+ >
39
+ <path
40
+ strokeLinecap="round"
41
+ strokeLinejoin="round"
42
+ d="m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"
43
+ />
44
+ </svg>
45
+ );