@hanzo/ui 4.6.0 → 4.8.2

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 (184) hide show
  1. package/assets/general.tsx +1 -1
  2. package/assets/hanzo-logo.tsx +3 -1
  3. package/assets/index.ts +119 -5
  4. package/blocks/auth/index.ts +6 -0
  5. package/blocks/auth/login-2fa.tsx +165 -0
  6. package/blocks/auth/login-basic.tsx +94 -0
  7. package/blocks/auth/login-social.tsx +148 -0
  8. package/blocks/auth/magic-link.tsx +129 -0
  9. package/blocks/auth/password-reset.tsx +97 -0
  10. package/blocks/auth/signup.tsx +157 -0
  11. package/blocks/data-display/activity-feed.tsx +242 -0
  12. package/blocks/data-display/data-table.tsx +235 -0
  13. package/blocks/data-display/stats-grid.tsx +194 -0
  14. package/blocks/ecommerce/checkout.tsx +242 -0
  15. package/blocks/ecommerce/index.ts +7 -0
  16. package/blocks/ecommerce/product-detail.tsx +257 -0
  17. package/blocks/ecommerce/product-grid.tsx +148 -0
  18. package/blocks/ecommerce/shopping-cart.tsx +181 -0
  19. package/blocks/marketing/cta-section.tsx +207 -0
  20. package/blocks/marketing/faq.tsx +159 -0
  21. package/blocks/marketing/features-grid.tsx +156 -0
  22. package/blocks/marketing/hero-section.tsx +192 -0
  23. package/blocks/marketing/index.ts +6 -0
  24. package/blocks/marketing/pricing-table.tsx +121 -0
  25. package/blocks/marketing/testimonials.tsx +196 -0
  26. package/components/index.ts +4 -51
  27. package/dist/index.js +9351 -0
  28. package/dist/index.mjs +9340 -0
  29. package/dist/lib/utils.js +47 -0
  30. package/dist/lib/utils.mjs +28 -0
  31. package/dist/src/utils.js +47 -0
  32. package/dist/src/utils.mjs +28 -0
  33. package/dist/tailwind/index.js +2050 -0
  34. package/dist/tailwind/index.mjs +2019 -0
  35. package/dist/types/index.js +79 -0
  36. package/dist/types/index.mjs +56 -0
  37. package/dist/util/format-text.js +51 -0
  38. package/dist/util/format-text.mjs +32 -0
  39. package/dist/util/index.js +384 -0
  40. package/dist/util/index.mjs +363 -0
  41. package/frameworks/core/index.ts +6 -0
  42. package/frameworks/core/utils/index.ts +64 -0
  43. package/frameworks/react/components/button.tsx +26 -0
  44. package/frameworks/react/components/index.ts +5 -0
  45. package/frameworks/react/hooks/index.ts +5 -0
  46. package/frameworks/react/index.ts +9 -0
  47. package/frameworks/react/package.json +8 -0
  48. package/frameworks/react/utils/index.ts +2 -0
  49. package/frameworks/react-native/index.ts +9 -0
  50. package/frameworks/react-native/package.json +8 -0
  51. package/frameworks/registry.json +371 -0
  52. package/frameworks/setup.sh +69 -0
  53. package/frameworks/svelte/index.ts +9 -0
  54. package/frameworks/svelte/package.json +8 -0
  55. package/frameworks/tracker.json +1854 -0
  56. package/frameworks/vue/index.ts +9 -0
  57. package/frameworks/vue/package.json +8 -0
  58. package/package.json +192 -28
  59. package/primitives/accordion.tsx +1 -1
  60. package/primitives/alert-dialog.tsx +1 -1
  61. package/primitives/alert.tsx +1 -1
  62. package/primitives/avatar.tsx +1 -1
  63. package/primitives/badge.tsx +2 -1
  64. package/primitives/breadcrumb.tsx +1 -1
  65. package/primitives/button.tsx +37 -47
  66. package/primitives/card.tsx +1 -1
  67. package/primitives/carousel.tsx +3 -2
  68. package/primitives/chat/chat-input-area.tsx +5 -4
  69. package/primitives/chat/chat-input.tsx +2 -2
  70. package/primitives/chat/files-preview.tsx +5 -4
  71. package/primitives/chat/message-list.tsx +2 -1
  72. package/primitives/chat/sqlite-preview.tsx +8 -8
  73. package/primitives/checkbox.tsx +2 -1
  74. package/primitives/command.tsx +3 -1
  75. package/primitives/context-menu.tsx +1 -1
  76. package/primitives/dialog.tsx +6 -1
  77. package/primitives/drawer.tsx +4 -1
  78. package/primitives/dropdown-menu.tsx +1 -1
  79. package/primitives/file-uploader.tsx +4 -2
  80. package/primitives/form.tsx +1 -1
  81. package/primitives/hover-card.tsx +1 -1
  82. package/primitives/icons/github.tsx +2 -2
  83. package/primitives/icons/youtube-logo.tsx +1 -1
  84. package/primitives/index-common.ts +7 -6
  85. package/primitives/input-otp.tsx +1 -1
  86. package/primitives/input.tsx +2 -1
  87. package/primitives/label.tsx +2 -1
  88. package/primitives/markdown-preview.tsx +3 -0
  89. package/primitives/mermaid.tsx +13 -18
  90. package/primitives/next/image.tsx +2 -1
  91. package/primitives/next/inline-icon.tsx +14 -14
  92. package/primitives/next/media-stack.tsx +2 -19
  93. package/primitives/pagination.tsx +1 -1
  94. package/primitives/popover.tsx +4 -2
  95. package/primitives/progress.tsx +2 -1
  96. package/primitives/prompt-textarea.tsx +1 -1
  97. package/primitives/radio-group.tsx +1 -1
  98. package/primitives/scroll-area.tsx +1 -1
  99. package/primitives/search-input.tsx +1 -1
  100. package/primitives/select.tsx +1 -1
  101. package/primitives/separator.tsx +2 -1
  102. package/primitives/sheet.tsx +1 -1
  103. package/primitives/skeleton.tsx +1 -0
  104. package/primitives/slider.tsx +2 -1
  105. package/primitives/stepper.tsx +1 -1
  106. package/primitives/switch.tsx +2 -1
  107. package/primitives/table.tsx +1 -1
  108. package/primitives/tabs.tsx +1 -1
  109. package/primitives/textarea.tsx +2 -1
  110. package/primitives/textfield.tsx +1 -0
  111. package/primitives/toggle-group.tsx +1 -1
  112. package/primitives/toggle.tsx +1 -1
  113. package/primitives/tooltip.tsx +1 -1
  114. package/src/hooks/use-copy-clipboard.ts +1 -1
  115. package/src/index-lean.ts +87 -0
  116. package/src/index.ts +54 -0
  117. package/src/registry/api.ts +1 -1
  118. package/src/utils.ts +19 -1
  119. package/tailwind/tailwind.config.hanzo-preset.js +7 -7
  120. package/tailwind/typo-plugin/index.js +1 -1
  121. package/types/animation-def.ts +1 -1
  122. package/types/index.ts +2 -1
  123. package/util/blob.ts +9 -4
  124. package/util/date.ts +2 -1
  125. package/util/format-text.ts +2 -1
  126. package/util/index.ts +103 -0
  127. package/util/spread-to-transform.ts +9 -8
  128. package/MCP-INSTRUCTIONS.md +0 -73
  129. package/README-MCP.md +0 -175
  130. package/dist/button.d.ts +0 -1
  131. package/dist/button.js +0 -1
  132. package/dist/hooks/index.d.ts +0 -7
  133. package/dist/hooks/index.js +0 -7
  134. package/dist/hooks/use-click-away.d.ts +0 -2
  135. package/dist/hooks/use-click-away.js +0 -23
  136. package/dist/hooks/use-combined-refs.d.ts +0 -3
  137. package/dist/hooks/use-combined-refs.js +0 -18
  138. package/dist/hooks/use-copy-clipboard.d.ts +0 -9
  139. package/dist/hooks/use-copy-clipboard.js +0 -21
  140. package/dist/hooks/use-debounce.d.ts +0 -1
  141. package/dist/hooks/use-debounce.js +0 -13
  142. package/dist/hooks/use-fill-ids.d.ts +0 -8
  143. package/dist/hooks/use-fill-ids.js +0 -20
  144. package/dist/hooks/use-map.d.ts +0 -1
  145. package/dist/hooks/use-map.js +0 -20
  146. package/dist/hooks/use-measure.d.ts +0 -8
  147. package/dist/hooks/use-measure.js +0 -25
  148. package/dist/hooks/use-reverse-video-playback.d.ts +0 -1
  149. package/dist/hooks/use-reverse-video-playback.js +0 -41
  150. package/dist/hooks/use-scroll-restoration.d.ts +0 -8
  151. package/dist/hooks/use-scroll-restoration.js +0 -36
  152. package/dist/mcp/enhanced-server.d.ts +0 -29
  153. package/dist/mcp/enhanced-server.js +0 -1128
  154. package/dist/mcp/index.d.ts +0 -28
  155. package/dist/mcp/index.js +0 -436
  156. package/dist/registry/api.d.ts +0 -37
  157. package/dist/registry/api.js +0 -129
  158. package/dist/registry/index.d.ts +0 -353
  159. package/dist/registry/index.js +0 -45
  160. package/dist/utils.d.ts +0 -1
  161. package/dist/utils.js +0 -1
  162. package/environment.d.ts +0 -6
  163. package/public/r/accordion.json +0 -11
  164. package/public/r/alert.json +0 -11
  165. package/public/r/avatar.json +0 -11
  166. package/public/r/badge.json +0 -11
  167. package/public/r/button.json +0 -11
  168. package/public/r/card.json +0 -11
  169. package/public/r/checkbox.json +0 -11
  170. package/public/r/default.json +0 -6
  171. package/public/r/dialog.json +0 -11
  172. package/public/r/input.json +0 -11
  173. package/public/r/label.json +0 -11
  174. package/public/r/new-york.json +0 -6
  175. package/public/r/popover.json +0 -11
  176. package/public/r/select.json +0 -11
  177. package/public/r/table.json +0 -11
  178. package/public/r/tabs.json +0 -11
  179. package/public/r/toast.json +0 -11
  180. package/registry.json +0 -184
  181. package/test/test-registry.js +0 -73
  182. package/test-imports.mjs +0 -19
  183. package/tsconfig.json +0 -22
  184. package/utils.ts +0 -9
@@ -1,6 +1,8 @@
1
+ 'use client';
2
+
1
3
  import * as DialogPrimitive from '@radix-ui/react-dialog';
2
4
  import { X } from 'lucide-react';
3
- import * as React from 'react';
5
+ import React from 'react';
4
6
 
5
7
  import { cn } from '../src/utils';
6
8
 
@@ -10,6 +12,8 @@ const DialogTrigger = DialogPrimitive.Trigger;
10
12
 
11
13
  const DialogPortal = DialogPrimitive.Portal;
12
14
 
15
+ const DialogClose = DialogPrimitive.Close;
16
+
13
17
  const DialogOverlay = ({
14
18
  className,
15
19
  ...props
@@ -114,6 +118,7 @@ export {
114
118
  Dialog,
115
119
  DialogPortal,
116
120
  DialogOverlay,
121
+ DialogClose,
117
122
  DialogTrigger,
118
123
  DialogContent,
119
124
  DialogHeader,
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { Drawer as DrawerPrimitive } from 'vaul';
3
3
 
4
4
  import { cn } from '../src/utils';
@@ -20,6 +20,8 @@ const DrawerPortal = DrawerPrimitive.Portal;
20
20
 
21
21
  const DrawerClose = DrawerPrimitive.Close;
22
22
 
23
+ const DrawerHandle = DrawerPrimitive.Handle;
24
+
23
25
  const DrawerOverlay = ({
24
26
  className,
25
27
  ...props
@@ -102,6 +104,7 @@ export {
102
104
  DrawerOverlay,
103
105
  DrawerTrigger,
104
106
  DrawerClose,
107
+ DrawerHandle,
105
108
  DrawerContent,
106
109
  DrawerHeader,
107
110
  DrawerFooter,
@@ -1,6 +1,6 @@
1
1
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
2
2
  import { Check, ChevronRight } from 'lucide-react';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
 
5
5
  import { cn } from '../src/utils';
6
6
 
@@ -1,5 +1,7 @@
1
- import { useTranslation } from '@hanzo_network/hanzo-i18n';
2
- import { partial } from 'filesize';
1
+ // import { useTranslation } from '@hanzo_network/hanzo-i18n';
2
+ const useTranslation = () => ({ t: (key) => key });
3
+ // import { partial } from 'filesize';
4
+ const partial = () => (bytes) => `${(bytes / 1024 / 1024).toFixed(2)} MB`;
3
5
  import { Loader2, Trash, Upload } from 'lucide-react';
4
6
  import React, { useEffect, useState } from 'react';
5
7
  import { useDropzone } from 'react-dropzone';
@@ -1,6 +1,6 @@
1
1
  import type * as LabelPrimitive from '@radix-ui/react-label';
2
2
  import { Slot } from '@radix-ui/react-slot';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
  import {
5
5
  Controller,
6
6
  type ControllerProps,
@@ -1,5 +1,5 @@
1
1
  import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
- import type { LucideProps } from 'lucide-react'
2
+ // import type { LucideProps } from 'lucide-react'
3
3
 
4
4
 
5
- const GitHub: React.FC<LucideProps> = (props: LucideProps) => (
5
+ const GitHub = (props) => (
6
6
  <svg viewBox="0 0 438.549 438.549" {...props}>
7
7
  <path
8
8
  fill="currentColor"
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { LucideProps } from 'lucide-react'
3
3
 
4
- const YouTubeLogo: React.FC<LucideProps> = (props: LucideProps) => (
4
+ const YouTubeLogo = (props) => (
5
5
  <svg
6
6
  viewBox="0 0 256 256"
7
7
  xmlns="http://www.w3.org/2000/svg"
@@ -41,9 +41,9 @@ export {
41
41
 
42
42
  export {
43
43
  default as Button,
44
- type ButtonProps,
45
44
  buttonVariants,
46
45
  } from './button'
46
+ export type { ButtonProps } from './button'
47
47
 
48
48
  export {
49
49
  Card,
@@ -101,7 +101,6 @@ export {
101
101
  } from './context-menu'
102
102
 
103
103
  export {
104
- type DrawerProps,
105
104
  Drawer,
106
105
  DrawerPortal,
107
106
  DrawerOverlay,
@@ -146,6 +145,8 @@ export {
146
145
  DropdownMenuRadioGroup,
147
146
  } from './dropdown-menu'
148
147
 
148
+ export { ErrorMessage } from './error-message'
149
+
149
150
  export {
150
151
  useFormField,
151
152
  Form,
@@ -206,8 +207,8 @@ export {
206
207
  SelectLabel,
207
208
  SelectItem,
208
209
  SelectSeparator,
209
- SelectScrollUpButton,
210
- SelectScrollDownButton,
210
+ // SelectScrollUpButton, // Does not exist in select.tsx
211
+ // SelectScrollDownButton, // Does not exist in select.tsx
211
212
  } from './select'
212
213
 
213
214
  export {
@@ -266,7 +267,7 @@ export { default as Slider } from './slider'
266
267
  export { default as Skeleton } from './skeleton'
267
268
  export { default as StepIndicator } from './step-indicator'
268
269
  export { default as Switch } from './switch'
269
- export { default as TextArea } from './textarea'
270
+ export { Textarea } from './textarea'
270
271
  export { default as TextField } from './textfield'
271
272
  export { Toaster, toast } from './sonner'
272
273
  export { Toggle, toggleVariants } from './toggle'
@@ -276,7 +277,7 @@ export { default as VideoPlayer } from './video-player'
276
277
  // Chat components
277
278
  export { ChatInput } from './chat/chat-input'
278
279
  export { ChatInputArea } from './chat/chat-input-area'
279
- export { FileList } from './chat/files-preview'
280
+ // export { FileList } from './chat/files-preview' // Uses Tauri APIs not available in web
280
281
 
281
282
  // Additional components
282
283
  export { CopyToClipboardIcon } from './copy-to-clipboard-icon'
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- import * as React from 'react'
2
+ import React from 'react';
3
3
 
4
4
  import { OTPInput, type SlotProps } from 'input-otp'
5
5
  import { Dot } from 'lucide-react'
@@ -1,5 +1,5 @@
1
1
  import { EyeIcon, EyeOffIcon } from 'lucide-react';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
  import { useEffect, useImperativeHandle, useRef } from 'react';
4
4
 
5
5
  import { RefCallBack } from 'react-hook-form';
@@ -123,3 +123,4 @@ const Input = ({
123
123
  Input.displayName = 'Input';
124
124
 
125
125
  export { Input };
126
+ export default Input;
@@ -1,6 +1,6 @@
1
1
  import * as LabelPrimitive from '@radix-ui/react-label';
2
2
  import { cva, type VariantProps } from 'class-variance-authority';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
 
5
5
  import { cn } from '../src/utils';
6
6
 
@@ -18,3 +18,4 @@ const Label = ({
18
18
  Label.displayName = LabelPrimitive.Root.displayName;
19
19
 
20
20
  export { Label };
21
+ export default Label;
@@ -607,3 +607,6 @@ export const MarkdownText = memo(
607
607
  prev.isRunning === next.isRunning &&
608
608
  prev.className === next.className,
609
609
  );
610
+
611
+ // Alias for compatibility
612
+ export const MarkdownPreview = MarkdownText;
@@ -1,5 +1,5 @@
1
- import { save } from '@tauri-apps/plugin-dialog';
2
- import * as fs from '@tauri-apps/plugin-fs';
1
+ // import { save } from '@tauri-apps/plugin-dialog'; // Not available in web environment
2
+ // import * as fs from '@tauri-apps/plugin-fs'; // Not available in web environment
3
3
  import { RotateCcw, Download } from 'lucide-react';
4
4
  import mermaid from 'mermaid';
5
5
  import { FC, useEffect, useRef, useState, useCallback } from 'react';
@@ -29,23 +29,18 @@ mermaid.initialize({
29
29
  const generateId = () => `mermaid-${Math.random().toString(36).slice(2)}`;
30
30
 
31
31
  const downloadBlob = async (blob: Blob, filename: string) => {
32
- const filePath = await save({
33
- title: 'Save Mermaid Diagram',
34
- filters: [
35
- {
36
- name: 'SVG Files',
37
- extensions: ['svg'],
38
- },
39
- ],
40
- defaultPath: filename,
41
- });
42
-
43
- if (filePath) {
44
- const arrayBuffer = await blob.arrayBuffer();
45
- await fs.writeFile(filePath, new Uint8Array(arrayBuffer), {
46
- baseDir: fs.BaseDirectory.Download,
47
- });
32
+ // Web-compatible download (instead of Tauri)
33
+ try {
34
+ const link = document.createElement('a');
35
+ link.href = URL.createObjectURL(blob);
36
+ link.download = filename;
37
+ document.body.appendChild(link);
38
+ link.click();
39
+ document.body.removeChild(link);
40
+ URL.revokeObjectURL(link.href);
48
41
  toast.success('Mermaid diagram saved successfully');
42
+ } catch (error) {
43
+ toast.error('Failed to download diagram');
49
44
  }
50
45
  };
51
46
 
@@ -1,7 +1,8 @@
1
1
  import React from 'react'
2
2
  import NextImage from 'next/image'
3
3
 
4
- import type { ImageDef, Dimensions, MediaTransform } from '../../types'
4
+ // @ts-ignore
5
+ const { ImageDef, Dimensions, MediaTransform } = {}
5
6
  import { constrain, cn, spreadToTransform } from '../../util'
6
7
 
7
8
  const Image: React.FC<{
@@ -1,21 +1,21 @@
1
1
  import React from 'react'
2
2
  import Image from 'next/image'
3
3
 
4
+ interface InlineIconProps {
5
+ /**
6
+ * If a ReactNode is passed in, it should be set to 'w-full h-auto' so that it can be sized
7
+ * according to width of parent.
8
+ */
9
+ icon: React.ReactNode;
10
+ /** default should be handled by calling code. */
11
+ size?: number;
12
+ agent?: string;
13
+ className?: string;
14
+ }
4
15
 
5
- const InlineIcon: React.FC<{
6
- /**
7
- * If a ReactNode is passed in, it should be set to 'w-full h-auto' so that it can be sized
8
- * according to width of parent.
9
- */
10
- icon: React.ReactNode
11
- /** default should be handled by calling code. */
12
- size?: number
13
-
14
- agent?: string,
15
- className?: string
16
- }> = ({
16
+ const InlineIcon: React.FC<InlineIconProps> = ({
17
17
  icon,
18
- size,
18
+ size,
19
19
  agent,
20
20
  className=''
21
21
  }) => {
@@ -33,4 +33,4 @@ const InlineIcon: React.FC<{
33
33
  )
34
34
  }
35
35
 
36
- export default InlineIcon
36
+ export default InlineIcon
@@ -1,8 +1,6 @@
1
1
  'use client'
2
2
  import React from 'react'
3
3
 
4
- import Spline from '@splinetool/react-spline'
5
-
6
4
  import { cn, constrain, spreadToTransform } from '../../util'
7
5
  import type { MediaStackDef, Dimensions } from '../../types'
8
6
 
@@ -18,26 +16,11 @@ const MediaStack: React.FC<{
18
16
  constrainTo: cnst = {w: 250, h: 250},
19
17
  clx=''
20
18
  }) => {
21
- const {img, video, animation, mediaTransform} = media
19
+ const {img, video, mediaTransform} = media
22
20
 
23
21
  const transform = mediaTransform ?? {}
24
22
 
25
- // Order of precedence: 3D > MP4 > Image
26
- if (animation) {
27
- return (
28
- <Spline
29
- scene={animation}
30
- className={cn(clx, 'pointer-events-none')}
31
- data-vaul-no-drag
32
- style={{
33
- // // !aspect-[12/10]
34
- width: (6/5 * (typeof cnst.h === 'number' ? cnst.h as number : parseInt(cnst.h as string)) ),
35
- height: cnst.h,
36
- ...spreadToTransform(transform)
37
- }}
38
- />
39
- )
40
- }
23
+ // Order of precedence: MP4 > Image
41
24
  if (video) {
42
25
  const dim = constrain(video.dim.md, cnst)
43
26
  return (
@@ -1,5 +1,5 @@
1
1
  import { MoreHorizontal, RedoIcon, UndoIcon } from 'lucide-react';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
  import { ButtonProps, buttonVariants } from './button';
@@ -1,5 +1,5 @@
1
1
  import * as PopoverPrimitive from '@radix-ui/react-popover';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -7,6 +7,8 @@ const Popover = PopoverPrimitive.Root;
7
7
 
8
8
  const PopoverTrigger = PopoverPrimitive.Trigger;
9
9
  const PopoverAnchor = PopoverPrimitive.Anchor;
10
+ const PopoverArrow = PopoverPrimitive.Arrow;
11
+ const PopoverClose = PopoverPrimitive.Close;
10
12
 
11
13
  const PopoverContent = ({
12
14
  className,
@@ -29,4 +31,4 @@ const PopoverContent = ({
29
31
  );
30
32
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
31
33
 
32
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
34
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverArrow, PopoverClose };
@@ -1,5 +1,5 @@
1
1
  import * as ProgressPrimitive from '@radix-ui/react-progress';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -24,3 +24,4 @@ const Progress = ({
24
24
  Progress.displayName = ProgressPrimitive.Root.displayName;
25
25
 
26
26
  export { Progress };
27
+ export default Progress;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
 
3
3
  import { cn } from '../src/utils';
4
4
  import { DotsLoader } from './dots-loader';
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
4
4
  import { Circle } from 'lucide-react';
5
- import * as React from 'react';
5
+ import React from 'react';
6
6
 
7
7
  import { cn } from '../src/utils';
8
8
 
@@ -1,5 +1,5 @@
1
1
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { SearchIcon, XIcon } from 'lucide-react';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
  import { Button } from './button';
@@ -1,7 +1,7 @@
1
1
  import { CheckIcon } from '@radix-ui/react-icons';
2
2
  import * as SelectPrimitive from '@radix-ui/react-select';
3
3
  import { ChevronDown } from 'lucide-react';
4
- import * as React from 'react';
4
+ import React from 'react';
5
5
 
6
6
  import { cn } from '../src/utils';
7
7
 
@@ -1,5 +1,5 @@
1
1
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -23,3 +23,4 @@ const Separator = ({
23
23
  Separator.displayName = SeparatorPrimitive.Root.displayName;
24
24
 
25
25
  export { Separator };
26
+ export default Separator;
@@ -1,7 +1,7 @@
1
1
  import * as SheetPrimitive from '@radix-ui/react-dialog';
2
2
  import { cva, type VariantProps } from 'class-variance-authority';
3
3
  import { X } from 'lucide-react';
4
- import * as React from 'react';
4
+ import React from 'react';
5
5
 
6
6
  import { cn } from '../src/utils';
7
7
 
@@ -15,3 +15,4 @@ function Skeleton({
15
15
  }
16
16
 
17
17
  export { Skeleton };
18
+ export default Skeleton;
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import * as SliderPrimitive from '@radix-ui/react-slider';
4
- import * as React from 'react';
4
+ import React from 'react';
5
5
  import { cn } from '../src/utils';
6
6
 
7
7
  function Slider({
@@ -60,3 +60,4 @@ function Slider({
60
60
  }
61
61
 
62
62
  export { Slider };
63
+ export default Slider;
@@ -1,6 +1,6 @@
1
1
  import { CheckIcon } from '@radix-ui/react-icons';
2
2
  import { LoaderCircle } from 'lucide-react';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
  import { createContext, useContext } from 'react';
5
5
 
6
6
  import { cn } from '../src/utils';
@@ -1,5 +1,5 @@
1
1
  import * as SwitchPrimitives from '@radix-ui/react-switch';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -24,3 +24,4 @@ const Switch = ({
24
24
  Switch.displayName = SwitchPrimitives.Root.displayName;
25
25
 
26
26
  export { Switch };
27
+ export default Switch;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
 
3
3
  import { cn } from '../src/utils';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import * as TabsPrimitive from '@radix-ui/react-tabs';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
 
3
3
  import { RefCallBack } from 'react-hook-form';
4
4
  import { cn } from '../src/utils';
@@ -59,3 +59,4 @@ const Textarea = ({
59
59
  Textarea.displayName = 'Textarea';
60
60
 
61
61
  export { Textarea };
62
+ export default Textarea;
@@ -73,3 +73,4 @@ const TextField = ({
73
73
  };
74
74
 
75
75
  export { TextField };
76
+ export default TextField;
@@ -1,6 +1,6 @@
1
1
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
2
2
  import { VariantProps } from 'class-variance-authority';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
 
5
5
  import { cn } from '../src/utils';
6
6
  import { toggleVariants } from './toggle';
@@ -1,6 +1,6 @@
1
1
  import * as TogglePrimitive from '@radix-ui/react-toggle';
2
2
  import { cva, type VariantProps } from 'class-variance-authority';
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
 
5
5
  import { cn } from '../src/utils';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
 
4
4
  import { cn } from '../src/utils';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { useState } from 'react';
2
- import { copyToClipboard } from '../helpers';
2
+ import { copyToClipboard } from '../../util/copy-to-clipboard';
3
3
 
4
4
  type UseCopyClipboardProps = {
5
5
  string?: string;
@@ -0,0 +1,87 @@
1
+ /**
2
+ * @hanzo/ui - Lean Build (Minimal Bundle)
3
+ *
4
+ * This is a lightweight version that excludes heavy dependencies.
5
+ * Heavy components can be imported separately when needed:
6
+ *
7
+ * - Syntax highlighting: import from '@hanzo/ui/components/syntax-highlighter'
8
+ * - Markdown: import from '@hanzo/ui/components/markdown'
9
+ * - Math rendering: import from '@hanzo/ui/components/katex'
10
+ * - Animations: import from 'framer-motion' directly
11
+ */
12
+
13
+ // Core utilities - must be imported first
14
+ export { cn } from './utils'
15
+ export * from './utils'
16
+
17
+ // Hooks (lightweight)
18
+ export * from './hooks'
19
+
20
+ // Only export the core Radix primitives used in the desktop app
21
+ // Button
22
+ export { Button, buttonVariants } from '../primitives/button'
23
+ export type { ButtonProps } from '../primitives/button'
24
+
25
+ // Form components
26
+ export * from '../primitives/form'
27
+ export * from '../primitives/input'
28
+ export * from '../primitives/label'
29
+ export * from '../primitives/textarea'
30
+ export * from '../primitives/checkbox'
31
+ export * from '../primitives/radio-group'
32
+ export * from '../primitives/select'
33
+ export * from '../primitives/switch'
34
+
35
+ // Layout
36
+ export * from '../primitives/card'
37
+ export * from '../primitives/separator'
38
+ export * from '../primitives/scroll-area'
39
+ export * from '../primitives/tabs'
40
+ export * from '../primitives/accordion'
41
+
42
+ // Feedback
43
+ export * from '../primitives/alert'
44
+ export * from '../primitives/alert-dialog'
45
+ export * from '../primitives/dialog'
46
+ export * from '../primitives/toast'
47
+ export * from '../primitives/progress'
48
+ export * from '../primitives/skeleton'
49
+ export * from '../primitives/badge'
50
+
51
+ // Navigation
52
+ export * from '../primitives/dropdown-menu'
53
+ export * from '../primitives/command'
54
+ export * from '../primitives/breadcrumb'
55
+ export * from '../primitives/sheet'
56
+
57
+ // Data display
58
+ export * from '../primitives/table'
59
+ export * from '../primitives/avatar'
60
+ export * from '../primitives/hover-card'
61
+ export * from '../primitives/popover'
62
+ export * from '../primitives/tooltip'
63
+
64
+ // Other essentials
65
+ export * from '../primitives/collapsible'
66
+ export * from '../primitives/context-menu'
67
+ export * from '../primitives/resizable'
68
+ export * from '../primitives/slider'
69
+ export * from '../primitives/toggle'
70
+ export * from '../primitives/toggle-group'
71
+
72
+ // Re-export assets (icons are lightweight)
73
+ export * from '../assets'
74
+
75
+ // Re-export utilities
76
+ export * from '../util'
77
+ export * from '../util/index-client'
78
+
79
+ // Types
80
+ export * from '../types'
81
+
82
+ // NOTE: Heavy components excluded from lean build:
83
+ // - MarkdownText (react-markdown + plugins)
84
+ // - SyntaxHighlighter (react-syntax-highlighter)
85
+ // - KatexRender (katex)
86
+ // - Animated components (framer-motion)
87
+ // - MediaStack, Mapbox, Spline3D, PlotlyChart