@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
@@ -1,106 +0,0 @@
1
- 'use client';
2
- import * as React from 'react';
3
- import useEmblaCarousel from 'embla-carousel-react';
4
- import { ArrowLeft, ArrowRight } from 'lucide-react';
5
- import { cn } from '../util';
6
- import Button from './button';
7
- const CarouselContext = React.createContext(null);
8
- const useCarousel = () => {
9
- const service = React.useContext(CarouselContext);
10
- if (!service) {
11
- throw new Error('useCarousel must be used within a <Carousel />');
12
- }
13
- return service;
14
- };
15
- // https://github.com/emilkowalski/vaul/pull/250
16
- // See data-vaul-no-drag throughout
17
- const Carousel = React.forwardRef(({ orientation = 'horizontal', options, setApi, plugins, className, children, onCarouselSelect, ...props }, ref) => {
18
- const [carouselRef, api] = useEmblaCarousel({ ...options, axis: orientation === 'horizontal' ? 'x' : 'y' }, plugins);
19
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
20
- const [canScrollNext, setCanScrollNext] = React.useState(false);
21
- const onSelect = React.useCallback((api) => {
22
- if (!api) {
23
- return;
24
- } // would this ever happen??
25
- setCanScrollPrev(api.canScrollPrev());
26
- setCanScrollNext(api.canScrollNext());
27
- if (onCarouselSelect) {
28
- onCarouselSelect(api);
29
- }
30
- }, []);
31
- const scrollPrev = React.useCallback(() => { api?.scrollPrev(); }, [api]);
32
- const scrollNext = React.useCallback(() => { api?.scrollNext(); }, [api]);
33
- const handleKeyDown = React.useCallback((event) => {
34
- if (event.key === 'ArrowLeft') {
35
- event.preventDefault();
36
- scrollPrev();
37
- }
38
- else if (event.key === 'ArrowRight') {
39
- event.preventDefault();
40
- scrollNext();
41
- }
42
- }, [scrollPrev, scrollNext]);
43
- React.useEffect(() => {
44
- if (!api || !setApi) {
45
- return;
46
- }
47
- setApi(api);
48
- }, [api, setApi]);
49
- React.useEffect(() => {
50
- if (!api) {
51
- return;
52
- }
53
- onSelect(api);
54
- api.on('reInit', onSelect);
55
- api.on('select', onSelect);
56
- return () => { api?.off('select', onSelect); };
57
- }, [api, onSelect]);
58
- return (<CarouselContext.Provider value={{
59
- carouselRef,
60
- api,
61
- options,
62
- orientation: orientation || (options?.axis === 'y' ? 'vertical' : 'horizontal'),
63
- scrollPrev,
64
- scrollNext,
65
- canScrollPrev,
66
- canScrollNext,
67
- }}>
68
- <div ref={ref} onKeyDownCapture={handleKeyDown} className={cn('relative', className)} role='region' aria-roledescription='carousel' data-vaul-no-drag {...props}>
69
- {children}
70
- </div>
71
- </CarouselContext.Provider>);
72
- });
73
- Carousel.displayName = 'Carousel';
74
- const CarouselContent = React.forwardRef(({ className, ...props }, ref) => {
75
- const { carouselRef, orientation } = useCarousel();
76
- return (<div ref={carouselRef} className='overflow-hidden' data-vaul-no-drag>
77
- <div ref={ref} className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)} {...props}/>
78
- </div>);
79
- });
80
- CarouselContent.displayName = 'CarouselContent';
81
- const CarouselItem = React.forwardRef(({ className, ...props }, ref) => {
82
- const { orientation } = useCarousel();
83
- return (<div ref={ref} role='group' aria-roledescription='slide' data-vaul-no-drag className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)} {...props}/>);
84
- });
85
- CarouselItem.displayName = 'CarouselItem';
86
- const CarouselPrevious = React.forwardRef(({ className, variant = 'ghost', size = 'icon', ...props }, ref) => {
87
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
88
- return (<Button ref={ref} variant={variant} size={size} className={cn('absolute h-8 w-8 rounded-full', orientation === 'horizontal'
89
- ? '-left-12 top-1/2 -translate-y-1/2'
90
- : '-top-12 left-1/2 -translate-x-1/2 rotate-90', className)} disabled={!canScrollPrev} onClick={scrollPrev} {...props}>
91
- <ArrowLeft className='h-4 w-4'/>
92
- <span className='sr-only'>Previous slide</span>
93
- </Button>);
94
- });
95
- CarouselPrevious.displayName = 'CarouselPrevious';
96
- const CarouselNext = React.forwardRef(({ className, variant = 'ghost', size = 'icon', ...props }, ref) => {
97
- const { orientation, scrollNext, canScrollNext } = useCarousel();
98
- return (<Button ref={ref} variant={variant} size={size} className={cn('absolute h-8 w-8 rounded-full', orientation === 'horizontal'
99
- ? '-right-12 top-1/2 -translate-y-1/2'
100
- : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90', className)} disabled={!canScrollNext} onClick={scrollNext} {...props}>
101
- <ArrowRight className='h-4 w-4'/>
102
- <span className='sr-only'>Next slide</span>
103
- </Button>);
104
- });
105
- CarouselNext.displayName = 'CarouselNext';
106
- export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
- export default Checkbox;
@@ -1,15 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
- import { Check } from 'lucide-react';
5
- import { cn } from '../util';
6
- const Checkbox = React.forwardRef(({ className, ...props }, ref) => (<CheckboxPrimitive.Root ref={ref} className={cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background ' +
7
- 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ' +
8
- 'focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ' +
9
- 'data-[state=checked]:bg-primary data-[state=checked]:text-primary-fg', className)} {...props}>
10
- <CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>
11
- <Check className='h-4 w-4'/>
12
- </CheckboxPrimitive.Indicator>
13
- </CheckboxPrimitive.Root>));
14
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
15
- export default Checkbox;
@@ -1,41 +0,0 @@
1
- import React from 'react';
2
- import type ListAdaptor from './list-adaptor';
3
- interface ComboboxTriggerProps<T> {
4
- current: T | null;
5
- currentLabel: string | null;
6
- imageUrl: string | null;
7
- placeholder?: string;
8
- buttonClx?: string;
9
- imageClx?: string;
10
- disabled?: boolean;
11
- imageSize?: number;
12
- noChevron?: boolean;
13
- open: boolean;
14
- }
15
- declare const Combobox: <T, P extends ComboboxTriggerProps<T>>({ elements, initial, current, setCurrent, closeOnSelect, adaptor, popoverClx, listItemClx, listItemSelectedClx, listItemDisabledClx, noCheckmark, listItemImageClx, searchPlaceholder, noneFoundMessage, listItemImageSize, noSearch, popoverAlign, popoverSideOffset, Trigger, triggerProps }: {
16
- elements: T[];
17
- initial?: T | null;
18
- current?: T | null;
19
- setCurrent: (c: T | null) => void;
20
- closeOnSelect?: boolean;
21
- adaptor: ListAdaptor<T>;
22
- popoverClx?: string;
23
- listItemClx?: string;
24
- listItemSelectedClx?: string;
25
- listItemDisabledClx?: string;
26
- listItemImageClx?: string;
27
- listItemImageSize?: number;
28
- noCheckmark?: boolean;
29
- searchPlaceholder?: string;
30
- noneFoundMessage?: string;
31
- noSearch?: boolean;
32
- popoverAlign?: "center" | "end" | "start";
33
- popoverSideOffset?: number;
34
- /** If (custom) Trigger is not supplied,
35
- * passed to default trigger */
36
- triggerProps: P;
37
- Trigger?: <T_1, P_1>(props: P_1 & {
38
- ref?: React.ForwardedRef<HTMLButtonElement>;
39
- }) => React.ReactNode;
40
- }) => React.JSX.Element;
41
- export { Combobox as default, type ComboboxTriggerProps };
@@ -1,77 +0,0 @@
1
- 'use client';
2
- import React, { useState } from 'react';
3
- import { Check, ChevronDown } from 'lucide-react';
4
- import { cn } from '../util';
5
- import Button from './button';
6
- import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from './command';
7
- import { Popover, PopoverContent, PopoverTrigger, } from './popover';
8
- const DEFAULT_IMAGE_SIZE = 32;
9
- const DefaultTriggerInner = ({ current, currentLabel, imageUrl, buttonClx = '', imageClx = '', placeholder = '(select)', disabled = false, imageSize = DEFAULT_IMAGE_SIZE, noChevron = false, open, ...rest }, ref) => (<Button ref={ref} {...rest} variant='outline' role='combobox' aria-expanded={open} className={cn('flex', noChevron ? 'justify-start' : 'justify-between', buttonClx)} disabled={disabled}>
10
- <div className='flex justify-start items-center gap-2'>
11
- {(current && imageUrl) ? (<img src={imageUrl} alt={currentLabel + ' image'} height={imageSize} width={imageSize} loading="eager" className={cn('block', imageClx)}/>) : (<div style={{ width: imageSize, height: imageSize }}/>)}
12
- <span className='block'>{currentLabel}</span>
13
- </div>
14
- {!noChevron && (<ChevronDown className={cn('block', open ? '' : 'opacity-50')}/>)}
15
- </Button>);
16
- const DefaultTrigger = React.forwardRef(DefaultTriggerInner);
17
- const Combobox = ({ elements, initial, current, setCurrent, closeOnSelect = true, adaptor, popoverClx = '', listItemClx = '', listItemSelectedClx = '', listItemDisabledClx = '', noCheckmark = false, listItemImageClx = '', searchPlaceholder = 'Search...', noneFoundMessage = 'None found.', listItemImageSize = DEFAULT_IMAGE_SIZE, noSearch = false, popoverAlign = 'center', popoverSideOffset = 4, Trigger, triggerProps }) => {
18
- const [_open, _setOpen] = useState(false);
19
- // for non-controlled base (must declare the hook either way)
20
- const [_current, _setCurrent] = useState(initial ?? null);
21
- const handleSelect = (selString) => {
22
- const found = elements.find((el) => (adaptor.valueEquals(el, selString)));
23
- if (found) {
24
- // non-controlled ('initial' supplied (may have been null))
25
- if (initial !== undefined) {
26
- _setCurrent(found);
27
- }
28
- setCurrent(found);
29
- }
30
- if (closeOnSelect) {
31
- _setOpen(false);
32
- }
33
- };
34
- const isCurrent = (el) => {
35
- // non-controlled?
36
- const curr = (current === undefined) ? _current : current;
37
- return !!curr && adaptor.equals(el, curr);
38
- };
39
- const _triggerProps = current ? {
40
- ...triggerProps,
41
- current,
42
- currentLabel: adaptor.getLabel ? adaptor.getLabel(current) : adaptor.getValue(current),
43
- imageUrl: adaptor.getImageUrl ? adaptor.getImageUrl(current) : null,
44
- open: _open
45
- } : {
46
- ...triggerProps,
47
- current: null,
48
- currentLabel: null,
49
- imageUrl: null,
50
- open: _open
51
- };
52
- return (<Popover open={_open} onOpenChange={_setOpen}>
53
- <PopoverTrigger asChild>
54
- {Trigger ? (<Trigger {..._triggerProps}/>) : (<DefaultTrigger {..._triggerProps}/>)}
55
- </PopoverTrigger>
56
- <PopoverContent className={cn('p-0', popoverClx)} align={popoverAlign} sideOffset={popoverSideOffset}>
57
- <Command>
58
- {!noSearch && (<CommandInput placeholder={searchPlaceholder}/>)}
59
- <CommandList>
60
- <CommandEmpty>{noneFoundMessage}</CommandEmpty>
61
- <CommandGroup>
62
- {elements.map((el) => (<CommandItem key={adaptor.getValue(el)} value={adaptor.getValue(el)} onSelect={handleSelect} disabled={adaptor.isDisabled ? adaptor.isDisabled(el) : false} className={cn('flex', noCheckmark ? 'justify-start' : 'justify-between', listItemClx, (isCurrent(el) ? listItemSelectedClx : ''), ((adaptor.isDisabled && adaptor.isDisabled(el)) ? listItemDisabledClx : ''))}>
63
- <div className='flex justify-start items-center gap-2'>
64
- {(adaptor.getImageUrl && adaptor.getImageUrl(el)) ? (<img src={adaptor.getImageUrl(el)} alt={adaptor.getValue(el) + ' image'} height={listItemImageSize} width={listItemImageSize} loading="eager" className={listItemImageClx}/>) : (<div style={{ width: listItemImageSize, height: listItemImageSize }}/>)}
65
- <span>{adaptor.getLabel ? adaptor.getLabel(el) : adaptor.getValue(el)}</span>
66
- </div>
67
- {!noCheckmark && (<div>
68
- <Check className={cn('ml-auto', (isCurrent(el)) ? '' : 'invisible')}/>
69
- </div>)}
70
- </CommandItem>))}
71
- </CommandGroup>
72
- </CommandList>
73
- </Command>
74
- </PopoverContent>
75
- </Popover>);
76
- };
77
- export { Combobox as default };
@@ -1,17 +0,0 @@
1
- import React from "react";
2
- import { type DialogProps } from "@radix-ui/react-dialog";
3
- declare const Command: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
4
- interface CommandDialogProps extends DialogProps {
5
- }
6
- declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => React.JSX.Element;
7
- declare const CommandInput: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
8
- declare const CommandList: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
9
- declare const CommandEmpty: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
10
- declare const CommandGroup: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
11
- declare const CommandSeparator: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
12
- declare const CommandItem: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
13
- declare const CommandShortcut: {
14
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
15
- displayName: string;
16
- };
17
- export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -1,38 +0,0 @@
1
- "use client";
2
- import React from "react";
3
- import {} from "@radix-ui/react-dialog";
4
- import { Command as CommandPrimitive } from "cmdk";
5
- import { Search } from "lucide-react";
6
- import { cn } from "../util";
7
- import { Dialog, DialogContent } from "./dialog";
8
- const Command = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive ref={ref} className={cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-level-1 text-foreground", className)} {...props}/>));
9
- Command.displayName = CommandPrimitive.displayName;
10
- const CommandDialog = ({ children, ...props }) => {
11
- return (<Dialog {...props}>
12
- <DialogContent className="overflow-hidden p-0 shadow-lg">
13
- <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-1 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
14
- {children}
15
- </Command>
16
- </DialogContent>
17
- </Dialog>);
18
- };
19
- const CommandInput = React.forwardRef(({ className, ...props }, ref) => (<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
20
- <Search className="mr-2 h-4 w-4 shrink-0 opacity-50"/>
21
- <CommandPrimitive.Input ref={ref} className={cn("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-2 disabled:cursor-not-allowed disabled:opacity-50", className)} {...props}/>
22
- </div>));
23
- CommandInput.displayName = CommandPrimitive.Input.displayName;
24
- const CommandList = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.List ref={ref} className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)} {...props}/>));
25
- CommandList.displayName = CommandPrimitive.List.displayName;
26
- const CommandEmpty = React.forwardRef((props, ref) => (<CommandPrimitive.Empty ref={ref} className="py-6 text-center text-sm" {...props}/>));
27
- CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
28
- const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.Group ref={ref} className={cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted", className)} {...props}/>));
29
- CommandGroup.displayName = CommandPrimitive.Group.displayName;
30
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.Separator ref={ref} className={cn("-mx-1 h-px bg-border", className)} {...props}/>));
31
- CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
32
- const CommandItem = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.Item ref={ref} className={cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none', 'data-selected:bg-level-3 aria-selected:text-accent', 'data-[disabled]:pointer-events-none data-[disabled]:opacity-35', className)} {...props}/>));
33
- CommandItem.displayName = CommandPrimitive.Item.displayName;
34
- const CommandShortcut = ({ className, ...props }) => {
35
- return (<span className={cn("ml-auto text-xs tracking-widest text-muted", className)} {...props}/>);
36
- };
37
- CommandShortcut.displayName = "CommandShortcut";
38
- export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -1,27 +0,0 @@
1
- import * as React from "react";
2
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
- declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
4
- declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
5
- declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
- declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
7
- declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
8
- declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
- declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
- inset?: boolean;
11
- } & React.RefAttributes<HTMLDivElement>>;
12
- declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
- declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
- declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
- inset?: boolean;
16
- } & React.RefAttributes<HTMLDivElement>>;
17
- declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
- declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
- declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
- inset?: boolean;
21
- } & React.RefAttributes<HTMLDivElement>>;
22
- declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
- declare const ContextMenuShortcut: {
24
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
25
- displayName: string;
26
- };
27
- export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -1,57 +0,0 @@
1
- "use client";
2
- import * as React from "react";
3
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
4
- import { Check, ChevronRight, Circle } from "lucide-react";
5
- import { cn } from "../util";
6
- const ContextMenu = ContextMenuPrimitive.Root;
7
- const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
8
- const ContextMenuGroup = ContextMenuPrimitive.Group;
9
- const ContextMenuPortal = ContextMenuPrimitive.Portal;
10
- const ContextMenuSub = ContextMenuPrimitive.Sub;
11
- const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
12
- const ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (<ContextMenuPrimitive.SubTrigger ref={ref} className={cn('flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none ' +
13
- 'focus:bg-level-1 focus:text-accent data-[state=open]:bg-level-1 data-[state=open]:text-accent', inset && "pl-8", className)} {...props}>
14
- {children}
15
- <ChevronRight className="ml-auto h-4 w-4"/>
16
- </ContextMenuPrimitive.SubTrigger>));
17
- ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
18
- const ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (<ContextMenuPrimitive.SubContent ref={ref} className={cn('z-popup min-w-[8rem] overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-md ' +
19
- 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 ' +
20
- 'data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 ' +
21
- 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 ' +
22
- 'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className)} {...props}/>));
23
- ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
24
- const ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => (<ContextMenuPrimitive.Portal>
25
- <ContextMenuPrimitive.Content ref={ref} className={cn("z-popup min-w-[8rem] overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)} {...props}/>
26
- </ContextMenuPrimitive.Portal>));
27
- ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
28
- const ContextMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (<ContextMenuPrimitive.Item ref={ref} className={cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-level-1 focus:text-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className)} {...props}/>));
29
- ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
30
- const ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (<ContextMenuPrimitive.CheckboxItem ref={ref} className={cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-level-1 focus:text-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)} checked={checked} {...props}>
31
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
32
- <ContextMenuPrimitive.ItemIndicator>
33
- <Check className="h-4 w-4"/>
34
- </ContextMenuPrimitive.ItemIndicator>
35
- </span>
36
- {children}
37
- </ContextMenuPrimitive.CheckboxItem>));
38
- ContextMenuCheckboxItem.displayName =
39
- ContextMenuPrimitive.CheckboxItem.displayName;
40
- const ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (<ContextMenuPrimitive.RadioItem ref={ref} className={cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-level-1 focus:text-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)} {...props}>
41
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
42
- <ContextMenuPrimitive.ItemIndicator>
43
- <Circle className="h-2 w-2 fill-current"/>
44
- </ContextMenuPrimitive.ItemIndicator>
45
- </span>
46
- {children}
47
- </ContextMenuPrimitive.RadioItem>));
48
- ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
49
- const ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (<ContextMenuPrimitive.Label ref={ref} className={cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className)} {...props}/>));
50
- ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
51
- const ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (<ContextMenuPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-border", className)} {...props}/>));
52
- ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
53
- const ContextMenuShortcut = ({ className, ...props }) => {
54
- return (<span className={cn("ml-auto text-xs tracking-widest text-muted", className)} {...props}/>);
55
- };
56
- ContextMenuShortcut.displayName = "ContextMenuShortcut";
57
- export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -1,3 +0,0 @@
1
- import React, { type PropsWithChildren } from 'react';
2
- declare const DialogVideoController: React.FC<PropsWithChildren>;
3
- export default DialogVideoController;
@@ -1,24 +0,0 @@
1
- 'use client';
2
- import React, { useState } from 'react';
3
- const DialogVideoController = ({ children, }) => {
4
- const [open, setOpen] = useState(false);
5
- const onOpenChange = (b) => {
6
- setOpen(b);
7
- const videos = document.getElementsByTagName('video');
8
- const videoArray = Array.from(videos);
9
- videoArray.forEach((v) => {
10
- if (b) {
11
- v.pause();
12
- }
13
- else {
14
- v.play();
15
- }
16
- });
17
- };
18
- // https://stackoverflow.com/a/49052730/11645689
19
- const updatedChildren = React.Children.map(children, (child) => (React.cloneElement(child, { open, onOpenChange })));
20
- return (<>
21
- {updatedChildren}
22
- </>);
23
- };
24
- export default DialogVideoController;
@@ -1,28 +0,0 @@
1
- import * as React from "react";
2
- import * as DialogPrimitive from "@radix-ui/react-dialog";
3
- declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
- declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- interface DialogPortalProps extends React.PropsWithChildren<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>> {
6
- className?: string;
7
- }
8
- declare const DialogPortal: React.ForwardRefExoticComponent<DialogPortalProps & React.RefAttributes<never>>;
9
- interface DialogOverlayProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> {
10
- className?: string;
11
- }
12
- declare const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
13
- interface DialogCloseProps extends React.PropsWithChildren<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>> {
14
- className?: string;
15
- }
16
- declare const DialogClose: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
17
- declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
- declare const DialogHeader: {
19
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
20
- displayName: string;
21
- };
22
- declare const DialogFooter: {
23
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
24
- displayName: string;
25
- };
26
- declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
27
- declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
28
- export { Dialog, DialogTrigger, DialogOverlay, DialogClose, DialogPortal, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -1,37 +0,0 @@
1
- 'use client';
2
- import * as React from "react";
3
- import * as DialogPrimitive from "@radix-ui/react-dialog";
4
- import { X } from "lucide-react";
5
- import { cn } from "../util";
6
- const Dialog = DialogPrimitive.Root;
7
- const DialogTrigger = DialogPrimitive.Trigger;
8
- const DialogPortal = React.forwardRef(({ className, children, ...props }, ref) => (<DialogPrimitive.Portal {...props}>
9
- <div className={cn("fixed inset-0 z-50 flex items-end justify-center sm:items-center", className)}>
10
- {children}
11
- </div>
12
- </DialogPrimitive.Portal>));
13
- DialogPortal.displayName = 'DialogPortal';
14
- const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Overlay ref={ref} className={cn("fixed inset-0 z-50 bg-overlay backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)} {...props}/>));
15
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
16
- const DialogClose = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Close ref={ref} className={cn("absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", className)} {...props}>
17
- <X className="h-4 w-4"/>
18
- <span className="sr-only">Close</span>
19
- </DialogPrimitive.Close>));
20
- DialogClose.displayName = DialogPrimitive.Close.displayName;
21
- const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (<DialogPortal>
22
- <DialogOverlay />
23
- <DialogPrimitive.Content ref={ref} className={cn("fixed z-50 grid w-full gap-4 rounded-t-lg bg-level-1 p-6 shadow-lg animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-lg sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0", className)} {...props}>
24
- {children}
25
- <DialogClose />
26
- </DialogPrimitive.Content>
27
- </DialogPortal>));
28
- DialogContent.displayName = DialogPrimitive.Content.displayName;
29
- const DialogHeader = ({ className, ...props }) => (<div className={cn("flex flex-col space-y-1.5 text-center sm:text-left", className)} {...props}/>);
30
- DialogHeader.displayName = "DialogHeader";
31
- const DialogFooter = ({ className, ...props }) => (<div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props}/>);
32
- DialogFooter.displayName = "DialogFooter";
33
- const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold leading-none tracking-tight text-foreground", className)} {...props}/>));
34
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
35
- const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (<DialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-1", className)} {...props}/>));
36
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
37
- export { Dialog, DialogTrigger, DialogOverlay, DialogClose, DialogPortal, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -1,29 +0,0 @@
1
- import * as React from 'react';
2
- import { Drawer as DrawerPrimitive } from '@hanzo/react-drawer';
3
- declare const Drawer: {
4
- ({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element;
5
- displayName: string;
6
- };
7
- declare const DrawerTrigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
8
- declare const DrawerPortal: import("react").FC<import("@radix-ui/react-dialog").DialogPortalProps>;
9
- declare const DrawerHandle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
10
- declare const DrawerClose: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
11
- declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
- declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
13
- onAnimationEnd?: (open: boolean) => void;
14
- } & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
15
- overlayClx?: string;
16
- defaultHandle?: boolean;
17
- } & React.RefAttributes<HTMLDivElement>>;
18
- declare const DrawerHeader: {
19
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
20
- displayName: string;
21
- };
22
- declare const DrawerFooter: {
23
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
24
- displayName: string;
25
- };
26
- declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
27
- declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
28
- type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;
29
- export { type DrawerProps, Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHandle, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription };
@@ -1,34 +0,0 @@
1
- 'use client';
2
- import * as React from 'react';
3
- import { Drawer as DrawerPrimitive } from '@hanzo/react-drawer';
4
- import { cn } from '../util';
5
- const Drawer = ({ shouldScaleBackground = false, ...props }) => (<DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props}/>);
6
- Drawer.displayName = 'Drawer';
7
- const DrawerTrigger = DrawerPrimitive.Trigger;
8
- const DrawerPortal = DrawerPrimitive.Portal;
9
- const DrawerHandle = DrawerPrimitive.Handle;
10
- const DrawerClose = DrawerPrimitive.Close;
11
- const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => (<DrawerPrimitive.Overlay ref={ref} className={cn('fixed inset-0 bg-overlay backdrop-blur-sm', className)} {...props}/>));
12
- DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
13
- const DrawerContent = React.forwardRef(({ className, children, overlayClx = '', defaultHandle = true, ...props }, ref) => {
14
- return (<DrawerPortal>
15
- {/* If no or same z index, overlay should precede content */}
16
- <DrawerOverlay className={cn('z-below-modal', overlayClx)}/>
17
- <DrawerPrimitive.Content ref={ref} className={cn('fixed left-0 right-0 bottom-0 z-modal', 'mt-24 flex flex-col rounded-t-[10px] pt-6 border bg-background',
18
- // 'h-[80%]'
19
- className)} {...props}>
20
- {defaultHandle && (<div className='absolute left-0 right-0 mx-auto top-2 h-2 w-[100px] rounded-full bg-level-3 shrink-0'/>)}
21
- {children}
22
- </DrawerPrimitive.Content>
23
- </DrawerPortal>);
24
- });
25
- DrawerContent.displayName = 'DrawerContent';
26
- const DrawerHeader = ({ className, ...props }) => (<div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props}/>);
27
- DrawerHeader.displayName = 'DrawerHeader';
28
- const DrawerFooter = ({ className, ...props }) => (<div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props}/>);
29
- DrawerFooter.displayName = 'DrawerFooter';
30
- const DrawerTitle = React.forwardRef(({ className, ...props }, ref) => (<DrawerPrimitive.Title ref={ref} className={cn('text-lg font-semibold leading-none tracking-tight', className)} {...props}/>));
31
- DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
32
- const DrawerDescription = React.forwardRef(({ className, ...props }, ref) => (<DrawerPrimitive.Description ref={ref} className={cn('text-sm text-muted', className)} {...props}/>));
33
- DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
34
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHandle, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription };
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
- import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
4
- declare const Form: any;
5
- declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
6
- declare const useFormField: () => any;
7
- declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
8
- declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
9
- declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
10
- declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
11
- declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
12
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };