@hanzo/ui 4.6.0 → 4.7.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.
- package/dist/index.d.mts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +9458 -0
- package/dist/index.mjs +9449 -0
- package/dist/lib/utils.d.mts +2 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +47 -0
- package/dist/lib/utils.mjs +28 -0
- package/dist/src/utils.d.mts +7 -0
- package/dist/src/utils.d.ts +7 -0
- package/dist/src/utils.js +47 -0
- package/dist/src/utils.mjs +28 -0
- package/dist/tailwind/index.d.mts +2 -0
- package/dist/tailwind/index.d.ts +2 -0
- package/dist/tailwind/index.js +2048 -0
- package/dist/tailwind/index.mjs +2017 -0
- package/dist/types/index.d.mts +12 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.js +79 -0
- package/dist/types/index.mjs +56 -0
- package/package.json +151 -25
- package/MCP-INSTRUCTIONS.md +0 -73
- package/README-MCP.md +0 -175
- package/assets/ai-icons.tsx +0 -207
- package/assets/crypto.tsx +0 -33
- package/assets/file-type-icon.tsx +0 -66
- package/assets/file.tsx +0 -45
- package/assets/general.tsx +0 -2318
- package/assets/hanzo-logo.svg +0 -9
- package/assets/hanzo-logo.tsx +0 -15
- package/assets/index.ts +0 -8
- package/assets/index.tsx +0 -4
- package/assets/llm-provider.tsx +0 -1094
- package/blocks/components/accordian-block.tsx +0 -48
- package/blocks/components/block-component-props.ts +0 -11
- package/blocks/components/bullet-cards-block.tsx +0 -46
- package/blocks/components/card-block/index.tsx +0 -171
- package/blocks/components/card-block/link-out-button.tsx +0 -20
- package/blocks/components/card-block/util.ts +0 -28
- package/blocks/components/carte-blanche-block/index.tsx +0 -127
- package/blocks/components/carte-blanche-block/variant-content-left.tsx +0 -49
- package/blocks/components/content.tsx +0 -70
- package/blocks/components/cta-block.tsx +0 -115
- package/blocks/components/enh-heading-block.tsx +0 -204
- package/blocks/components/grid-block/grid-block-mutator.ts +0 -12
- package/blocks/components/grid-block/index.tsx +0 -83
- package/blocks/components/grid-block/mutator-registry.ts +0 -10
- package/blocks/components/grid-block/table-borders.mutator.ts +0 -47
- package/blocks/components/group-block.tsx +0 -83
- package/blocks/components/heading-block.tsx +0 -88
- package/blocks/components/image-block.tsx +0 -111
- package/blocks/components/index.ts +0 -30
- package/blocks/components/screenful-block/content.tsx +0 -123
- package/blocks/components/screenful-block/index.tsx +0 -107
- package/blocks/components/screenful-block/poster-background.tsx +0 -34
- package/blocks/components/screenful-block/video-background.tsx +0 -45
- package/blocks/components/space-block.tsx +0 -66
- package/blocks/components/video-block.tsx +0 -138
- package/blocks/def/accordian-block.ts +0 -14
- package/blocks/def/block.ts +0 -7
- package/blocks/def/bullet-cards-block.ts +0 -22
- package/blocks/def/card-block.ts +0 -22
- package/blocks/def/carte-blanche-block.ts +0 -21
- package/blocks/def/cta-block.ts +0 -19
- package/blocks/def/element-block.ts +0 -11
- package/blocks/def/enh-heading-block.ts +0 -44
- package/blocks/def/grid-block.ts +0 -16
- package/blocks/def/group-block.ts +0 -11
- package/blocks/def/heading-block.ts +0 -15
- package/blocks/def/image-block.ts +0 -31
- package/blocks/def/index.ts +0 -35
- package/blocks/def/screenful-block.ts +0 -54
- package/blocks/def/space-block.ts +0 -64
- package/blocks/def/video-block.ts +0 -9
- package/blocks/index.ts +0 -2
- package/components/index.ts +0 -56
- 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/helpers/file.ts +0 -33
- package/helpers/memoization.ts +0 -40
- package/primitives/accordion.tsx +0 -74
- package/primitives/action-button.tsx +0 -42
- package/primitives/alert-dialog.tsx +0 -185
- package/primitives/alert.tsx +0 -74
- package/primitives/apply-typography.tsx +0 -55
- package/primitives/aspect-ratio.tsx +0 -5
- package/primitives/avatar.tsx +0 -57
- package/primitives/background-beams.tsx +0 -142
- package/primitives/badge.tsx +0 -44
- package/primitives/breadcrumb.tsx +0 -130
- package/primitives/breakpoint-indicator.tsx +0 -19
- package/primitives/button.tsx +0 -82
- package/primitives/calendar.tsx +0 -72
- package/primitives/card.tsx +0 -97
- package/primitives/carousel.tsx +0 -237
- package/primitives/chat/chat-input-area.tsx +0 -87
- package/primitives/chat/chat-input.tsx +0 -71
- package/primitives/chat/files-preview.tsx +0 -330
- package/primitives/chat/index.ts +0 -6
- package/primitives/chat/json-form.tsx +0 -8
- package/primitives/chat/message-list.tsx +0 -307
- package/primitives/chat/message.tsx +0 -569
- package/primitives/chat/sqlite-preview.tsx +0 -215
- package/primitives/checkbox.tsx +0 -31
- package/primitives/collapsible.tsx +0 -9
- package/primitives/combobox.tsx +0 -239
- package/primitives/command.tsx +0 -149
- package/primitives/context-menu.tsx +0 -206
- package/primitives/copy-to-clipboard-icon.tsx +0 -60
- package/primitives/dialog-video-controller.tsx +0 -38
- package/primitives/dialog.tsx +0 -123
- package/primitives/dot-pattern.tsx +0 -57
- package/primitives/dots-loader.tsx +0 -13
- package/primitives/drawer.tsx +0 -110
- package/primitives/dropdown-menu.tsx +0 -199
- package/primitives/error-message.tsx +0 -19
- package/primitives/file-uploader.tsx +0 -200
- package/primitives/form.tsx +0 -183
- package/primitives/hover-card.tsx +0 -28
- package/primitives/icons/github.tsx +0 -14
- package/primitives/icons/index.ts +0 -18
- package/primitives/icons/youtube-logo.tsx +0 -59
- package/primitives/index-common.ts +0 -303
- package/primitives/index-next.ts +0 -4
- package/primitives/input-otp.tsx +0 -65
- package/primitives/input.tsx +0 -125
- package/primitives/label.tsx +0 -20
- package/primitives/list-adaptor.ts +0 -12
- package/primitives/list-box.tsx +0 -74
- package/primitives/loading-spinner.tsx +0 -33
- package/primitives/markdown-preview.tsx +0 -609
- package/primitives/mermaid.tsx +0 -196
- package/primitives/navigation-menu.tsx +0 -147
- package/primitives/next/image.tsx +0 -90
- package/primitives/next/index.ts +0 -7
- package/primitives/next/inline-icon.tsx +0 -36
- package/primitives/next/link-element.tsx +0 -109
- package/primitives/next/mdx-link.tsx +0 -22
- package/primitives/next/media-stack.tsx +0 -69
- package/primitives/next/nav-items.tsx +0 -45
- package/primitives/next/youtube-embed.tsx +0 -83
- package/primitives/pagination.tsx +0 -117
- package/primitives/popover.tsx +0 -32
- package/primitives/pretty-json-print.tsx +0 -28
- package/primitives/progress.tsx +0 -26
- package/primitives/prompt-textarea.tsx +0 -72
- package/primitives/qr-code.tsx +0 -112
- package/primitives/radio-group.tsx +0 -42
- package/primitives/resizable.tsx +0 -47
- package/primitives/scroll-area.tsx +0 -57
- package/primitives/search-input.tsx +0 -66
- package/primitives/select.tsx +0 -122
- package/primitives/separator.tsx +0 -25
- package/primitives/sheet.tsx +0 -139
- package/primitives/skeleton.tsx +0 -17
- package/primitives/slider.tsx +0 -62
- package/primitives/sonner.tsx +0 -35
- package/primitives/step-indicator.tsx +0 -69
- package/primitives/stepper.tsx +0 -272
- package/primitives/switch.tsx +0 -26
- package/primitives/table.tsx +0 -105
- package/primitives/tabs.tsx +0 -50
- package/primitives/text-area.tsx +0 -26
- package/primitives/text-link.tsx +0 -25
- package/primitives/textarea.tsx +0 -61
- package/primitives/textfield.tsx +0 -75
- package/primitives/toast.tsx +0 -30
- package/primitives/toggle-group.tsx +0 -63
- package/primitives/toggle.tsx +0 -44
- package/primitives/tooltip.tsx +0 -47
- package/primitives/video-player.tsx +0 -23
- 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/src/button.ts +0 -1
- package/src/hooks/index.ts +0 -7
- package/src/hooks/use-click-away.ts +0 -31
- package/src/hooks/use-combined-refs.ts +0 -22
- package/src/hooks/use-copy-clipboard.ts +0 -30
- package/src/hooks/use-debounce.ts +0 -17
- package/src/hooks/use-fill-ids.ts +0 -25
- package/src/hooks/use-map.ts +0 -26
- package/src/hooks/use-measure.ts +0 -42
- package/src/hooks/use-reverse-video-playback.ts +0 -43
- package/src/hooks/use-scroll-restoration.ts +0 -50
- package/src/mcp/README.md +0 -141
- package/src/mcp/enhanced-server.ts +0 -1208
- package/src/mcp/index.ts +0 -518
- package/src/mcp/package.json +0 -10
- package/src/registry/api.ts +0 -164
- package/src/registry/index.ts +0 -60
- package/src/registry/package.json +0 -10
- package/src/utils.ts +0 -1
- package/tailwind/colors.tailwind.js +0 -53
- package/tailwind/fontFamily.tailwind.ts +0 -7
- package/tailwind/fontSize.tailwind.ts +0 -13
- package/tailwind/index.ts +0 -7
- package/tailwind/safelist.tailwind.js +0 -26
- package/tailwind/screens.tailwind.js +0 -8
- package/tailwind/spacing.tailwind.js +0 -65
- package/tailwind/tailwind.config.hanzo-preset.d.ts +0 -5
- package/tailwind/tailwind.config.hanzo-preset.js +0 -915
- package/tailwind/tw-font-desc.ts +0 -15
- package/tailwind/typo-plugin/get-plugin-styles.js +0 -679
- package/tailwind/typo-plugin/index.d.ts +0 -9
- package/tailwind/typo-plugin/index.js +0 -141
- package/tailwind/typo-plugin/utils.js +0 -60
- package/tailwind/typography-test.mdx +0 -35
- package/tailwind/z-index.tailwind.js +0 -71
- package/test/test-registry.js +0 -73
- package/test-imports.mjs +0 -19
- package/tsconfig.json +0 -22
- package/types/animation-def.ts +0 -3
- package/types/breakpoints.ts +0 -11
- package/types/bullet-item.ts +0 -10
- package/types/button-def.ts +0 -39
- package/types/dimensions.ts +0 -8
- package/types/grid-def.ts +0 -56
- package/types/image-def.ts +0 -32
- package/types/index.ts +0 -29
- package/types/link-def.ts +0 -56
- package/types/media-stack-def.ts +0 -31
- package/types/t-shirt-size.ts +0 -5
- package/types/tshirt-dimensions.ts +0 -20
- package/types/video-def.ts +0 -25
- package/util/blob.ts +0 -28
- package/util/copy-to-clipboard.ts +0 -17
- package/util/create-shadow-root.ts +0 -22
- package/util/date.ts +0 -83
- package/util/debounce.ts +0 -11
- package/util/file.ts +0 -15
- package/util/format-and-abbreviate-as-currency.ts +0 -125
- package/util/format-text.ts +0 -33
- package/util/format-to-max-char.ts +0 -68
- package/util/index-client.ts +0 -3
- package/util/index.ts +0 -9
- package/util/number-abbreviate.ts +0 -49
- package/util/specifier.ts +0 -43
- package/util/spread-to-transform.ts +0 -24
- package/util/step-animation.ts +0 -90
- package/util/timing.ts +0 -3
- package/util/toasts.tsx +0 -17
- package/util/two-way-map.ts +0 -19
- package/utils.ts +0 -9
package/dist/registry/index.d.ts
DELETED
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const fileSchema: z.ZodObject<{
|
|
3
|
-
path: z.ZodString;
|
|
4
|
-
content: z.ZodOptional<z.ZodString>;
|
|
5
|
-
type: z.ZodString;
|
|
6
|
-
target: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
type: string;
|
|
9
|
-
path: string;
|
|
10
|
-
content?: string | undefined;
|
|
11
|
-
target?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
type: string;
|
|
14
|
-
path: string;
|
|
15
|
-
content?: string | undefined;
|
|
16
|
-
target?: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
export declare const registryItemSchema: z.ZodObject<{
|
|
19
|
-
name: z.ZodString;
|
|
20
|
-
type: z.ZodString;
|
|
21
|
-
description: z.ZodOptional<z.ZodString>;
|
|
22
|
-
author: z.ZodOptional<z.ZodString>;
|
|
23
|
-
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
24
|
-
devDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
25
|
-
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
26
|
-
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
|
-
path: z.ZodString;
|
|
28
|
-
content: z.ZodOptional<z.ZodString>;
|
|
29
|
-
type: z.ZodString;
|
|
30
|
-
target: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
type: string;
|
|
33
|
-
path: string;
|
|
34
|
-
content?: string | undefined;
|
|
35
|
-
target?: string | undefined;
|
|
36
|
-
}, {
|
|
37
|
-
type: string;
|
|
38
|
-
path: string;
|
|
39
|
-
content?: string | undefined;
|
|
40
|
-
target?: string | undefined;
|
|
41
|
-
}>, "many">>;
|
|
42
|
-
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
43
|
-
title: z.ZodOptional<z.ZodString>;
|
|
44
|
-
cssVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
45
|
-
tailwind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
46
|
-
category: z.ZodOptional<z.ZodString>;
|
|
47
|
-
subcategory: z.ZodOptional<z.ZodString>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
name: string;
|
|
50
|
-
type: string;
|
|
51
|
-
title?: string | undefined;
|
|
52
|
-
description?: string | undefined;
|
|
53
|
-
author?: string | undefined;
|
|
54
|
-
dependencies?: string[] | undefined;
|
|
55
|
-
devDependencies?: string[] | undefined;
|
|
56
|
-
registryDependencies?: string[] | undefined;
|
|
57
|
-
files?: {
|
|
58
|
-
type: string;
|
|
59
|
-
path: string;
|
|
60
|
-
content?: string | undefined;
|
|
61
|
-
target?: string | undefined;
|
|
62
|
-
}[] | undefined;
|
|
63
|
-
meta?: Record<string, any> | undefined;
|
|
64
|
-
cssVars?: Record<string, any> | undefined;
|
|
65
|
-
tailwind?: Record<string, any> | undefined;
|
|
66
|
-
category?: string | undefined;
|
|
67
|
-
subcategory?: string | undefined;
|
|
68
|
-
}, {
|
|
69
|
-
name: string;
|
|
70
|
-
type: string;
|
|
71
|
-
title?: string | undefined;
|
|
72
|
-
description?: string | undefined;
|
|
73
|
-
author?: string | undefined;
|
|
74
|
-
dependencies?: string[] | undefined;
|
|
75
|
-
devDependencies?: string[] | undefined;
|
|
76
|
-
registryDependencies?: string[] | undefined;
|
|
77
|
-
files?: {
|
|
78
|
-
type: string;
|
|
79
|
-
path: string;
|
|
80
|
-
content?: string | undefined;
|
|
81
|
-
target?: string | undefined;
|
|
82
|
-
}[] | undefined;
|
|
83
|
-
meta?: Record<string, any> | undefined;
|
|
84
|
-
cssVars?: Record<string, any> | undefined;
|
|
85
|
-
tailwind?: Record<string, any> | undefined;
|
|
86
|
-
category?: string | undefined;
|
|
87
|
-
subcategory?: string | undefined;
|
|
88
|
-
}>;
|
|
89
|
-
export declare const registrySchema: z.ZodObject<{
|
|
90
|
-
$schema: z.ZodOptional<z.ZodString>;
|
|
91
|
-
name: z.ZodString;
|
|
92
|
-
homepage: z.ZodOptional<z.ZodString>;
|
|
93
|
-
style: z.ZodOptional<z.ZodString>;
|
|
94
|
-
items: z.ZodArray<z.ZodObject<{
|
|
95
|
-
name: z.ZodString;
|
|
96
|
-
type: z.ZodString;
|
|
97
|
-
description: z.ZodOptional<z.ZodString>;
|
|
98
|
-
author: z.ZodOptional<z.ZodString>;
|
|
99
|
-
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
100
|
-
devDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
101
|
-
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
102
|
-
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
103
|
-
path: z.ZodString;
|
|
104
|
-
content: z.ZodOptional<z.ZodString>;
|
|
105
|
-
type: z.ZodString;
|
|
106
|
-
target: z.ZodOptional<z.ZodString>;
|
|
107
|
-
}, "strip", z.ZodTypeAny, {
|
|
108
|
-
type: string;
|
|
109
|
-
path: string;
|
|
110
|
-
content?: string | undefined;
|
|
111
|
-
target?: string | undefined;
|
|
112
|
-
}, {
|
|
113
|
-
type: string;
|
|
114
|
-
path: string;
|
|
115
|
-
content?: string | undefined;
|
|
116
|
-
target?: string | undefined;
|
|
117
|
-
}>, "many">>;
|
|
118
|
-
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
119
|
-
title: z.ZodOptional<z.ZodString>;
|
|
120
|
-
cssVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
121
|
-
tailwind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
122
|
-
category: z.ZodOptional<z.ZodString>;
|
|
123
|
-
subcategory: z.ZodOptional<z.ZodString>;
|
|
124
|
-
}, "strip", z.ZodTypeAny, {
|
|
125
|
-
name: string;
|
|
126
|
-
type: string;
|
|
127
|
-
title?: string | undefined;
|
|
128
|
-
description?: string | undefined;
|
|
129
|
-
author?: string | undefined;
|
|
130
|
-
dependencies?: string[] | undefined;
|
|
131
|
-
devDependencies?: string[] | undefined;
|
|
132
|
-
registryDependencies?: string[] | undefined;
|
|
133
|
-
files?: {
|
|
134
|
-
type: string;
|
|
135
|
-
path: string;
|
|
136
|
-
content?: string | undefined;
|
|
137
|
-
target?: string | undefined;
|
|
138
|
-
}[] | undefined;
|
|
139
|
-
meta?: Record<string, any> | undefined;
|
|
140
|
-
cssVars?: Record<string, any> | undefined;
|
|
141
|
-
tailwind?: Record<string, any> | undefined;
|
|
142
|
-
category?: string | undefined;
|
|
143
|
-
subcategory?: string | undefined;
|
|
144
|
-
}, {
|
|
145
|
-
name: string;
|
|
146
|
-
type: string;
|
|
147
|
-
title?: string | undefined;
|
|
148
|
-
description?: string | undefined;
|
|
149
|
-
author?: string | undefined;
|
|
150
|
-
dependencies?: string[] | undefined;
|
|
151
|
-
devDependencies?: string[] | undefined;
|
|
152
|
-
registryDependencies?: string[] | undefined;
|
|
153
|
-
files?: {
|
|
154
|
-
type: string;
|
|
155
|
-
path: string;
|
|
156
|
-
content?: string | undefined;
|
|
157
|
-
target?: string | undefined;
|
|
158
|
-
}[] | undefined;
|
|
159
|
-
meta?: Record<string, any> | undefined;
|
|
160
|
-
cssVars?: Record<string, any> | undefined;
|
|
161
|
-
tailwind?: Record<string, any> | undefined;
|
|
162
|
-
category?: string | undefined;
|
|
163
|
-
subcategory?: string | undefined;
|
|
164
|
-
}>, "many">;
|
|
165
|
-
}, "strip", z.ZodTypeAny, {
|
|
166
|
-
name: string;
|
|
167
|
-
items: {
|
|
168
|
-
name: string;
|
|
169
|
-
type: string;
|
|
170
|
-
title?: string | undefined;
|
|
171
|
-
description?: string | undefined;
|
|
172
|
-
author?: string | undefined;
|
|
173
|
-
dependencies?: string[] | undefined;
|
|
174
|
-
devDependencies?: string[] | undefined;
|
|
175
|
-
registryDependencies?: string[] | undefined;
|
|
176
|
-
files?: {
|
|
177
|
-
type: string;
|
|
178
|
-
path: string;
|
|
179
|
-
content?: string | undefined;
|
|
180
|
-
target?: string | undefined;
|
|
181
|
-
}[] | undefined;
|
|
182
|
-
meta?: Record<string, any> | undefined;
|
|
183
|
-
cssVars?: Record<string, any> | undefined;
|
|
184
|
-
tailwind?: Record<string, any> | undefined;
|
|
185
|
-
category?: string | undefined;
|
|
186
|
-
subcategory?: string | undefined;
|
|
187
|
-
}[];
|
|
188
|
-
style?: string | undefined;
|
|
189
|
-
$schema?: string | undefined;
|
|
190
|
-
homepage?: string | undefined;
|
|
191
|
-
}, {
|
|
192
|
-
name: string;
|
|
193
|
-
items: {
|
|
194
|
-
name: string;
|
|
195
|
-
type: string;
|
|
196
|
-
title?: string | undefined;
|
|
197
|
-
description?: string | undefined;
|
|
198
|
-
author?: string | undefined;
|
|
199
|
-
dependencies?: string[] | undefined;
|
|
200
|
-
devDependencies?: string[] | undefined;
|
|
201
|
-
registryDependencies?: string[] | undefined;
|
|
202
|
-
files?: {
|
|
203
|
-
type: string;
|
|
204
|
-
path: string;
|
|
205
|
-
content?: string | undefined;
|
|
206
|
-
target?: string | undefined;
|
|
207
|
-
}[] | undefined;
|
|
208
|
-
meta?: Record<string, any> | undefined;
|
|
209
|
-
cssVars?: Record<string, any> | undefined;
|
|
210
|
-
tailwind?: Record<string, any> | undefined;
|
|
211
|
-
category?: string | undefined;
|
|
212
|
-
subcategory?: string | undefined;
|
|
213
|
-
}[];
|
|
214
|
-
style?: string | undefined;
|
|
215
|
-
$schema?: string | undefined;
|
|
216
|
-
homepage?: string | undefined;
|
|
217
|
-
}>;
|
|
218
|
-
export declare const registryWithContentSchema: z.ZodObject<{
|
|
219
|
-
$schema: z.ZodOptional<z.ZodString>;
|
|
220
|
-
name: z.ZodString;
|
|
221
|
-
homepage: z.ZodOptional<z.ZodString>;
|
|
222
|
-
style: z.ZodOptional<z.ZodString>;
|
|
223
|
-
} & {
|
|
224
|
-
items: z.ZodArray<z.ZodObject<{
|
|
225
|
-
name: z.ZodString;
|
|
226
|
-
type: z.ZodString;
|
|
227
|
-
description: z.ZodOptional<z.ZodString>;
|
|
228
|
-
author: z.ZodOptional<z.ZodString>;
|
|
229
|
-
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
230
|
-
devDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
231
|
-
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
232
|
-
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
233
|
-
title: z.ZodOptional<z.ZodString>;
|
|
234
|
-
cssVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
235
|
-
tailwind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
236
|
-
category: z.ZodOptional<z.ZodString>;
|
|
237
|
-
subcategory: z.ZodOptional<z.ZodString>;
|
|
238
|
-
} & {
|
|
239
|
-
files: z.ZodArray<z.ZodObject<{
|
|
240
|
-
path: z.ZodString;
|
|
241
|
-
type: z.ZodString;
|
|
242
|
-
target: z.ZodOptional<z.ZodString>;
|
|
243
|
-
} & {
|
|
244
|
-
content: z.ZodString;
|
|
245
|
-
}, "strip", z.ZodTypeAny, {
|
|
246
|
-
type: string;
|
|
247
|
-
content: string;
|
|
248
|
-
path: string;
|
|
249
|
-
target?: string | undefined;
|
|
250
|
-
}, {
|
|
251
|
-
type: string;
|
|
252
|
-
content: string;
|
|
253
|
-
path: string;
|
|
254
|
-
target?: string | undefined;
|
|
255
|
-
}>, "many">;
|
|
256
|
-
}, "strip", z.ZodTypeAny, {
|
|
257
|
-
name: string;
|
|
258
|
-
type: string;
|
|
259
|
-
files: {
|
|
260
|
-
type: string;
|
|
261
|
-
content: string;
|
|
262
|
-
path: string;
|
|
263
|
-
target?: string | undefined;
|
|
264
|
-
}[];
|
|
265
|
-
title?: string | undefined;
|
|
266
|
-
description?: string | undefined;
|
|
267
|
-
author?: string | undefined;
|
|
268
|
-
dependencies?: string[] | undefined;
|
|
269
|
-
devDependencies?: string[] | undefined;
|
|
270
|
-
registryDependencies?: string[] | undefined;
|
|
271
|
-
meta?: Record<string, any> | undefined;
|
|
272
|
-
cssVars?: Record<string, any> | undefined;
|
|
273
|
-
tailwind?: Record<string, any> | undefined;
|
|
274
|
-
category?: string | undefined;
|
|
275
|
-
subcategory?: string | undefined;
|
|
276
|
-
}, {
|
|
277
|
-
name: string;
|
|
278
|
-
type: string;
|
|
279
|
-
files: {
|
|
280
|
-
type: string;
|
|
281
|
-
content: string;
|
|
282
|
-
path: string;
|
|
283
|
-
target?: string | undefined;
|
|
284
|
-
}[];
|
|
285
|
-
title?: string | undefined;
|
|
286
|
-
description?: string | undefined;
|
|
287
|
-
author?: string | undefined;
|
|
288
|
-
dependencies?: string[] | undefined;
|
|
289
|
-
devDependencies?: string[] | undefined;
|
|
290
|
-
registryDependencies?: string[] | undefined;
|
|
291
|
-
meta?: Record<string, any> | undefined;
|
|
292
|
-
cssVars?: Record<string, any> | undefined;
|
|
293
|
-
tailwind?: Record<string, any> | undefined;
|
|
294
|
-
category?: string | undefined;
|
|
295
|
-
subcategory?: string | undefined;
|
|
296
|
-
}>, "many">;
|
|
297
|
-
}, "strip", z.ZodTypeAny, {
|
|
298
|
-
name: string;
|
|
299
|
-
items: {
|
|
300
|
-
name: string;
|
|
301
|
-
type: string;
|
|
302
|
-
files: {
|
|
303
|
-
type: string;
|
|
304
|
-
content: string;
|
|
305
|
-
path: string;
|
|
306
|
-
target?: string | undefined;
|
|
307
|
-
}[];
|
|
308
|
-
title?: string | undefined;
|
|
309
|
-
description?: string | undefined;
|
|
310
|
-
author?: string | undefined;
|
|
311
|
-
dependencies?: string[] | undefined;
|
|
312
|
-
devDependencies?: string[] | undefined;
|
|
313
|
-
registryDependencies?: string[] | undefined;
|
|
314
|
-
meta?: Record<string, any> | undefined;
|
|
315
|
-
cssVars?: Record<string, any> | undefined;
|
|
316
|
-
tailwind?: Record<string, any> | undefined;
|
|
317
|
-
category?: string | undefined;
|
|
318
|
-
subcategory?: string | undefined;
|
|
319
|
-
}[];
|
|
320
|
-
style?: string | undefined;
|
|
321
|
-
$schema?: string | undefined;
|
|
322
|
-
homepage?: string | undefined;
|
|
323
|
-
}, {
|
|
324
|
-
name: string;
|
|
325
|
-
items: {
|
|
326
|
-
name: string;
|
|
327
|
-
type: string;
|
|
328
|
-
files: {
|
|
329
|
-
type: string;
|
|
330
|
-
content: string;
|
|
331
|
-
path: string;
|
|
332
|
-
target?: string | undefined;
|
|
333
|
-
}[];
|
|
334
|
-
title?: string | undefined;
|
|
335
|
-
description?: string | undefined;
|
|
336
|
-
author?: string | undefined;
|
|
337
|
-
dependencies?: string[] | undefined;
|
|
338
|
-
devDependencies?: string[] | undefined;
|
|
339
|
-
registryDependencies?: string[] | undefined;
|
|
340
|
-
meta?: Record<string, any> | undefined;
|
|
341
|
-
cssVars?: Record<string, any> | undefined;
|
|
342
|
-
tailwind?: Record<string, any> | undefined;
|
|
343
|
-
category?: string | undefined;
|
|
344
|
-
subcategory?: string | undefined;
|
|
345
|
-
}[];
|
|
346
|
-
style?: string | undefined;
|
|
347
|
-
$schema?: string | undefined;
|
|
348
|
-
homepage?: string | undefined;
|
|
349
|
-
}>;
|
|
350
|
-
export type RegistryItem = z.infer<typeof registryItemSchema>;
|
|
351
|
-
export type Registry = z.infer<typeof registrySchema>;
|
|
352
|
-
export type RegistryWithContent = z.infer<typeof registryWithContentSchema>;
|
|
353
|
-
export type RegistryFile = z.infer<typeof fileSchema>;
|
package/dist/registry/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
// Define the file schema to match hanzo/ui's format
|
|
3
|
-
export const fileSchema = z.object({
|
|
4
|
-
path: z.string(),
|
|
5
|
-
content: z.string().optional(),
|
|
6
|
-
type: z.string(),
|
|
7
|
-
target: z.string().optional(),
|
|
8
|
-
});
|
|
9
|
-
// Registry item schema aligned with hanzo/ui format
|
|
10
|
-
export const registryItemSchema = z.object({
|
|
11
|
-
name: z.string(),
|
|
12
|
-
type: z.string(),
|
|
13
|
-
description: z.string().optional(),
|
|
14
|
-
author: z.string().optional(),
|
|
15
|
-
dependencies: z.array(z.string()).optional(),
|
|
16
|
-
devDependencies: z.array(z.string()).optional(),
|
|
17
|
-
registryDependencies: z.array(z.string()).optional(),
|
|
18
|
-
files: z.array(fileSchema).optional(),
|
|
19
|
-
meta: z.record(z.any()).optional(),
|
|
20
|
-
title: z.string().optional(),
|
|
21
|
-
cssVars: z.record(z.any()).optional(),
|
|
22
|
-
tailwind: z.record(z.any()).optional(),
|
|
23
|
-
category: z.string().optional(),
|
|
24
|
-
subcategory: z.string().optional(),
|
|
25
|
-
});
|
|
26
|
-
// Registry schema aligned with hanzo/ui format
|
|
27
|
-
export const registrySchema = z.object({
|
|
28
|
-
$schema: z.string().optional(),
|
|
29
|
-
name: z.string(),
|
|
30
|
-
homepage: z.string().optional(),
|
|
31
|
-
style: z.string().optional(),
|
|
32
|
-
items: z.array(registryItemSchema),
|
|
33
|
-
});
|
|
34
|
-
// Schema for a registry with full content
|
|
35
|
-
export const registryWithContentSchema = registrySchema.extend({
|
|
36
|
-
items: z.array(registryItemSchema.extend({
|
|
37
|
-
files: z.array(fileSchema.extend({
|
|
38
|
-
content: z.string(),
|
|
39
|
-
})),
|
|
40
|
-
})),
|
|
41
|
-
});
|
|
42
|
-
// Support CommonJS
|
|
43
|
-
if (typeof module !== 'undefined') {
|
|
44
|
-
module.exports = { fileSchema, registryItemSchema, registrySchema, registryWithContentSchema };
|
|
45
|
-
}
|
package/dist/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../../app/lib/utils';
|
package/dist/utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../../app/lib/utils';
|
package/environment.d.ts
DELETED
package/helpers/file.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export const getFileExt = (fileName: string): string => {
|
|
2
|
-
if (!fileName) return '';
|
|
3
|
-
const parts = fileName.split('.');
|
|
4
|
-
return parts.length > 1 ? parts[parts.length - 1].toLowerCase() : '';
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const formatFileSize = (bytes: number): string => {
|
|
8
|
-
if (bytes === 0) return '0 Bytes';
|
|
9
|
-
const k = 1024;
|
|
10
|
-
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
|
11
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
12
|
-
return Math.round(bytes / Math.pow(k, i) * 100) / 100 + ' ' + sizes[i];
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const isImageFile = (fileName: string): boolean => {
|
|
16
|
-
const ext = getFileExt(fileName);
|
|
17
|
-
return ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp'].includes(ext);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const isPdfFile = (fileName: string): boolean => {
|
|
21
|
-
const ext = getFileExt(fileName);
|
|
22
|
-
return ext === 'pdf';
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const isVideoFile = (fileName: string): boolean => {
|
|
26
|
-
const ext = getFileExt(fileName);
|
|
27
|
-
return ['mp4', 'avi', 'mov', 'wmv', 'flv', 'mkv', 'webm'].includes(ext);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const isAudioFile = (fileName: string): boolean => {
|
|
31
|
-
const ext = getFileExt(fileName);
|
|
32
|
-
return ['mp3', 'wav', 'ogg', 'aac', 'flac', 'wma'].includes(ext);
|
|
33
|
-
};
|
package/helpers/memoization.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
// Memoization helpers for markdown components
|
|
4
|
-
export const memoCompareNodes = (
|
|
5
|
-
prevProps: { children?: React.ReactNode },
|
|
6
|
-
nextProps: { children?: React.ReactNode }
|
|
7
|
-
): boolean => {
|
|
8
|
-
return prevProps.children === nextProps.children;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const memoizeMarkdownComponents = <T extends Record<string, React.ComponentType<any>>>(
|
|
12
|
-
components: T
|
|
13
|
-
): T => {
|
|
14
|
-
const memoized: any = {};
|
|
15
|
-
|
|
16
|
-
for (const key in components) {
|
|
17
|
-
if (components.hasOwnProperty(key)) {
|
|
18
|
-
memoized[key] = React.memo(components[key]);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return memoized as T;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// Helper to check if props are equal for memoization
|
|
26
|
-
export const arePropsEqual = <T extends Record<string, any>>(
|
|
27
|
-
prevProps: T,
|
|
28
|
-
nextProps: T,
|
|
29
|
-
keys?: string[]
|
|
30
|
-
): boolean => {
|
|
31
|
-
const keysToCheck = keys || Object.keys(prevProps);
|
|
32
|
-
|
|
33
|
-
for (const key of keysToCheck) {
|
|
34
|
-
if (prevProps[key] !== nextProps[key]) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return true;
|
|
40
|
-
};
|
package/primitives/accordion.tsx
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
-
import { ChevronDown } from 'lucide-react';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
import { cn } from '../src/utils';
|
|
6
|
-
|
|
7
|
-
const Accordion = AccordionPrimitive.Root;
|
|
8
|
-
|
|
9
|
-
type AccordionItemProps = React.ComponentPropsWithoutRef<
|
|
10
|
-
typeof AccordionPrimitive.Item
|
|
11
|
-
> & {
|
|
12
|
-
ref?: React.RefObject<React.ComponentRef<typeof AccordionPrimitive.Item>>;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const AccordionItem = ({ className, ref, ...props }: AccordionItemProps) => (
|
|
16
|
-
<AccordionPrimitive.Item className={cn('', className)} ref={ref} {...props} />
|
|
17
|
-
);
|
|
18
|
-
AccordionItem.displayName = 'AccordionItem';
|
|
19
|
-
|
|
20
|
-
type AccordionTriggerProps = React.ComponentPropsWithoutRef<
|
|
21
|
-
typeof AccordionPrimitive.Trigger
|
|
22
|
-
> & {
|
|
23
|
-
hideArrow?: boolean;
|
|
24
|
-
ref?: React.RefObject<React.ComponentRef<typeof AccordionPrimitive.Trigger>>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const AccordionTrigger = ({
|
|
28
|
-
className,
|
|
29
|
-
children,
|
|
30
|
-
hideArrow = false,
|
|
31
|
-
ref,
|
|
32
|
-
...props
|
|
33
|
-
}: AccordionTriggerProps) => (
|
|
34
|
-
<AccordionPrimitive.Header className="flex">
|
|
35
|
-
<AccordionPrimitive.Trigger
|
|
36
|
-
className={cn(
|
|
37
|
-
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
|
|
38
|
-
className,
|
|
39
|
-
)}
|
|
40
|
-
ref={ref}
|
|
41
|
-
{...props}
|
|
42
|
-
>
|
|
43
|
-
{children}
|
|
44
|
-
{hideArrow ? null : (
|
|
45
|
-
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
|
|
46
|
-
)}
|
|
47
|
-
</AccordionPrimitive.Trigger>
|
|
48
|
-
</AccordionPrimitive.Header>
|
|
49
|
-
);
|
|
50
|
-
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
51
|
-
|
|
52
|
-
type AccordionContentProps = React.ComponentPropsWithoutRef<
|
|
53
|
-
typeof AccordionPrimitive.Content
|
|
54
|
-
> & {
|
|
55
|
-
ref?: React.RefObject<React.ComponentRef<typeof AccordionPrimitive.Content>>;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const AccordionContent = ({
|
|
59
|
-
className,
|
|
60
|
-
children,
|
|
61
|
-
ref,
|
|
62
|
-
...props
|
|
63
|
-
}: AccordionContentProps) => (
|
|
64
|
-
<AccordionPrimitive.Content
|
|
65
|
-
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down w-full overflow-hidden text-sm transition-all"
|
|
66
|
-
ref={ref}
|
|
67
|
-
{...props}
|
|
68
|
-
>
|
|
69
|
-
<div className={cn('pt-0 pb-4', className)}>{children}</div>
|
|
70
|
-
</AccordionPrimitive.Content>
|
|
71
|
-
);
|
|
72
|
-
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
73
|
-
|
|
74
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
import { cn, type VariantProps } from '../util'
|
|
5
|
-
|
|
6
|
-
import type { ButtonDef, ButtonModalDef } from '../types'
|
|
7
|
-
import type { buttonVariants } from './button'
|
|
8
|
-
import DVC from './dialog-video-controller'
|
|
9
|
-
|
|
10
|
-
const ActionButton: React.FC<
|
|
11
|
-
VariantProps<typeof buttonVariants> &
|
|
12
|
-
{
|
|
13
|
-
def: ButtonDef
|
|
14
|
-
className?: string
|
|
15
|
-
}
|
|
16
|
-
> = ({
|
|
17
|
-
def,
|
|
18
|
-
className='',
|
|
19
|
-
...rest
|
|
20
|
-
}) => {
|
|
21
|
-
if (def.action.type === 'modal') {
|
|
22
|
-
const m = def.action.def as ButtonModalDef
|
|
23
|
-
const Modal = m.Comp
|
|
24
|
-
return (
|
|
25
|
-
<DVC>
|
|
26
|
-
<Modal
|
|
27
|
-
title={m.title}
|
|
28
|
-
byline={m.byline}
|
|
29
|
-
buttonText={def.text}
|
|
30
|
-
buttonProps={{...def.props, ...rest, className: cn((def.props?.className ?? ''), className)}}
|
|
31
|
-
action={m.action}
|
|
32
|
-
actionEnclosure={m.actionEnclosure}
|
|
33
|
-
{...m.props}
|
|
34
|
-
/>
|
|
35
|
-
</DVC>
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
// no other types supported yet
|
|
39
|
-
return <></>
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export default ActionButton
|