@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.
- package/assets/general.tsx +1 -1
- package/assets/hanzo-logo.tsx +3 -1
- package/assets/index.ts +119 -5
- package/blocks/auth/index.ts +6 -0
- package/blocks/auth/login-2fa.tsx +165 -0
- package/blocks/auth/login-basic.tsx +94 -0
- package/blocks/auth/login-social.tsx +148 -0
- package/blocks/auth/magic-link.tsx +129 -0
- package/blocks/auth/password-reset.tsx +97 -0
- package/blocks/auth/signup.tsx +157 -0
- package/blocks/data-display/activity-feed.tsx +242 -0
- package/blocks/data-display/data-table.tsx +235 -0
- package/blocks/data-display/stats-grid.tsx +194 -0
- package/blocks/ecommerce/checkout.tsx +242 -0
- package/blocks/ecommerce/index.ts +7 -0
- package/blocks/ecommerce/product-detail.tsx +257 -0
- package/blocks/ecommerce/product-grid.tsx +148 -0
- package/blocks/ecommerce/shopping-cart.tsx +181 -0
- package/blocks/marketing/cta-section.tsx +207 -0
- package/blocks/marketing/faq.tsx +159 -0
- package/blocks/marketing/features-grid.tsx +156 -0
- package/blocks/marketing/hero-section.tsx +192 -0
- package/blocks/marketing/index.ts +6 -0
- package/blocks/marketing/pricing-table.tsx +121 -0
- package/blocks/marketing/testimonials.tsx +196 -0
- package/components/index.ts +4 -51
- package/dist/index.js +9351 -0
- package/dist/index.mjs +9340 -0
- package/dist/lib/utils.js +47 -0
- package/dist/lib/utils.mjs +28 -0
- package/dist/src/utils.js +47 -0
- package/dist/src/utils.mjs +28 -0
- package/dist/tailwind/index.js +2050 -0
- package/dist/tailwind/index.mjs +2019 -0
- package/dist/types/index.js +79 -0
- package/dist/types/index.mjs +56 -0
- package/dist/util/format-text.js +51 -0
- package/dist/util/format-text.mjs +32 -0
- package/dist/util/index.js +384 -0
- package/dist/util/index.mjs +363 -0
- package/frameworks/core/index.ts +6 -0
- package/frameworks/core/utils/index.ts +64 -0
- package/frameworks/react/components/button.tsx +26 -0
- package/frameworks/react/components/index.ts +5 -0
- package/frameworks/react/hooks/index.ts +5 -0
- package/frameworks/react/index.ts +9 -0
- package/frameworks/react/package.json +8 -0
- package/frameworks/react/utils/index.ts +2 -0
- package/frameworks/react-native/index.ts +9 -0
- package/frameworks/react-native/package.json +8 -0
- package/frameworks/registry.json +371 -0
- package/frameworks/setup.sh +69 -0
- package/frameworks/svelte/index.ts +9 -0
- package/frameworks/svelte/package.json +8 -0
- package/frameworks/tracker.json +1854 -0
- package/frameworks/vue/index.ts +9 -0
- package/frameworks/vue/package.json +8 -0
- package/package.json +192 -28
- package/primitives/accordion.tsx +1 -1
- package/primitives/alert-dialog.tsx +1 -1
- package/primitives/alert.tsx +1 -1
- package/primitives/avatar.tsx +1 -1
- package/primitives/badge.tsx +2 -1
- package/primitives/breadcrumb.tsx +1 -1
- package/primitives/button.tsx +37 -47
- package/primitives/card.tsx +1 -1
- package/primitives/carousel.tsx +3 -2
- package/primitives/chat/chat-input-area.tsx +5 -4
- package/primitives/chat/chat-input.tsx +2 -2
- package/primitives/chat/files-preview.tsx +5 -4
- package/primitives/chat/message-list.tsx +2 -1
- package/primitives/chat/sqlite-preview.tsx +8 -8
- package/primitives/checkbox.tsx +2 -1
- package/primitives/command.tsx +3 -1
- package/primitives/context-menu.tsx +1 -1
- package/primitives/dialog.tsx +6 -1
- package/primitives/drawer.tsx +4 -1
- package/primitives/dropdown-menu.tsx +1 -1
- package/primitives/file-uploader.tsx +4 -2
- package/primitives/form.tsx +1 -1
- package/primitives/hover-card.tsx +1 -1
- package/primitives/icons/github.tsx +2 -2
- package/primitives/icons/youtube-logo.tsx +1 -1
- package/primitives/index-common.ts +7 -6
- package/primitives/input-otp.tsx +1 -1
- package/primitives/input.tsx +2 -1
- package/primitives/label.tsx +2 -1
- package/primitives/markdown-preview.tsx +3 -0
- package/primitives/mermaid.tsx +13 -18
- package/primitives/next/image.tsx +2 -1
- package/primitives/next/inline-icon.tsx +14 -14
- package/primitives/next/media-stack.tsx +2 -19
- package/primitives/pagination.tsx +1 -1
- package/primitives/popover.tsx +4 -2
- package/primitives/progress.tsx +2 -1
- package/primitives/prompt-textarea.tsx +1 -1
- package/primitives/radio-group.tsx +1 -1
- package/primitives/scroll-area.tsx +1 -1
- package/primitives/search-input.tsx +1 -1
- package/primitives/select.tsx +1 -1
- package/primitives/separator.tsx +2 -1
- package/primitives/sheet.tsx +1 -1
- package/primitives/skeleton.tsx +1 -0
- package/primitives/slider.tsx +2 -1
- package/primitives/stepper.tsx +1 -1
- package/primitives/switch.tsx +2 -1
- package/primitives/table.tsx +1 -1
- package/primitives/tabs.tsx +1 -1
- package/primitives/textarea.tsx +2 -1
- package/primitives/textfield.tsx +1 -0
- package/primitives/toggle-group.tsx +1 -1
- package/primitives/toggle.tsx +1 -1
- package/primitives/tooltip.tsx +1 -1
- package/src/hooks/use-copy-clipboard.ts +1 -1
- package/src/index-lean.ts +87 -0
- package/src/index.ts +54 -0
- package/src/registry/api.ts +1 -1
- package/src/utils.ts +19 -1
- package/tailwind/tailwind.config.hanzo-preset.js +7 -7
- package/tailwind/typo-plugin/index.js +1 -1
- package/types/animation-def.ts +1 -1
- package/types/index.ts +2 -1
- package/util/blob.ts +9 -4
- package/util/date.ts +2 -1
- package/util/format-text.ts +2 -1
- package/util/index.ts +103 -0
- package/util/spread-to-transform.ts +9 -8
- package/MCP-INSTRUCTIONS.md +0 -73
- package/README-MCP.md +0 -175
- package/dist/button.d.ts +0 -1
- package/dist/button.js +0 -1
- package/dist/hooks/index.d.ts +0 -7
- package/dist/hooks/index.js +0 -7
- package/dist/hooks/use-click-away.d.ts +0 -2
- package/dist/hooks/use-click-away.js +0 -23
- package/dist/hooks/use-combined-refs.d.ts +0 -3
- package/dist/hooks/use-combined-refs.js +0 -18
- package/dist/hooks/use-copy-clipboard.d.ts +0 -9
- package/dist/hooks/use-copy-clipboard.js +0 -21
- package/dist/hooks/use-debounce.d.ts +0 -1
- package/dist/hooks/use-debounce.js +0 -13
- package/dist/hooks/use-fill-ids.d.ts +0 -8
- package/dist/hooks/use-fill-ids.js +0 -20
- package/dist/hooks/use-map.d.ts +0 -1
- package/dist/hooks/use-map.js +0 -20
- package/dist/hooks/use-measure.d.ts +0 -8
- package/dist/hooks/use-measure.js +0 -25
- package/dist/hooks/use-reverse-video-playback.d.ts +0 -1
- package/dist/hooks/use-reverse-video-playback.js +0 -41
- package/dist/hooks/use-scroll-restoration.d.ts +0 -8
- package/dist/hooks/use-scroll-restoration.js +0 -36
- package/dist/mcp/enhanced-server.d.ts +0 -29
- package/dist/mcp/enhanced-server.js +0 -1128
- package/dist/mcp/index.d.ts +0 -28
- package/dist/mcp/index.js +0 -436
- package/dist/registry/api.d.ts +0 -37
- package/dist/registry/api.js +0 -129
- package/dist/registry/index.d.ts +0 -353
- package/dist/registry/index.js +0 -45
- package/dist/utils.d.ts +0 -1
- package/dist/utils.js +0 -1
- package/environment.d.ts +0 -6
- package/public/r/accordion.json +0 -11
- package/public/r/alert.json +0 -11
- package/public/r/avatar.json +0 -11
- package/public/r/badge.json +0 -11
- package/public/r/button.json +0 -11
- package/public/r/card.json +0 -11
- package/public/r/checkbox.json +0 -11
- package/public/r/default.json +0 -6
- package/public/r/dialog.json +0 -11
- package/public/r/input.json +0 -11
- package/public/r/label.json +0 -11
- package/public/r/new-york.json +0 -6
- package/public/r/popover.json +0 -11
- package/public/r/select.json +0 -11
- package/public/r/table.json +0 -11
- package/public/r/tabs.json +0 -11
- package/public/r/toast.json +0 -11
- package/registry.json +0 -184
- package/test/test-registry.js +0 -73
- package/test-imports.mjs +0 -19
- package/tsconfig.json +0 -22
- package/utils.ts +0 -9
package/primitives/dialog.tsx
CHANGED
|
@@ -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
|
|
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,
|
package/primitives/drawer.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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,5 +1,7 @@
|
|
|
1
|
-
import { useTranslation } from '@hanzo_network/hanzo-i18n';
|
|
2
|
-
|
|
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';
|
package/primitives/form.tsx
CHANGED
|
@@ -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
|
|
5
|
+
const GitHub = (props) => (
|
|
6
6
|
<svg viewBox="0 0 438.549 438.549" {...props}>
|
|
7
7
|
<path
|
|
8
8
|
fill="currentColor"
|
|
@@ -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 {
|
|
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'
|
package/primitives/input-otp.tsx
CHANGED
package/primitives/input.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EyeIcon, EyeOffIcon } from 'lucide-react';
|
|
2
|
-
import
|
|
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;
|
package/primitives/label.tsx
CHANGED
|
@@ -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
|
|
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;
|
package/primitives/mermaid.tsx
CHANGED
|
@@ -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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
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,
|
|
19
|
+
const {img, video, mediaTransform} = media
|
|
22
20
|
|
|
23
21
|
const transform = mediaTransform ?? {}
|
|
24
22
|
|
|
25
|
-
|
|
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 (
|
package/primitives/popover.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
|
-
import
|
|
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 };
|
package/primitives/progress.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
2
|
-
import
|
|
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;
|
package/primitives/select.tsx
CHANGED
package/primitives/separator.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
2
|
-
import
|
|
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;
|
package/primitives/sheet.tsx
CHANGED
|
@@ -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
|
|
4
|
+
import React from 'react';
|
|
5
5
|
|
|
6
6
|
import { cn } from '../src/utils';
|
|
7
7
|
|
package/primitives/skeleton.tsx
CHANGED
package/primitives/slider.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
4
|
-
import
|
|
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;
|
package/primitives/stepper.tsx
CHANGED
package/primitives/switch.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
2
|
-
import
|
|
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;
|
package/primitives/table.tsx
CHANGED
package/primitives/tabs.tsx
CHANGED
package/primitives/textarea.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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;
|
package/primitives/textfield.tsx
CHANGED
|
@@ -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
|
|
3
|
+
import React from 'react';
|
|
4
4
|
|
|
5
5
|
import { cn } from '../src/utils';
|
|
6
6
|
import { toggleVariants } from './toggle';
|
package/primitives/toggle.tsx
CHANGED
package/primitives/tooltip.tsx
CHANGED
|
@@ -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
|