@mjml-agent-editor/editor 0.1.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/LICENSE +21 -0
- package/README.md +93 -0
- package/dist/canvas.cjs +1099 -0
- package/dist/canvas.cjs.map +1 -0
- package/dist/canvas.d.cts +49 -0
- package/dist/canvas.d.ts +49 -0
- package/dist/canvas.js +629 -0
- package/dist/canvas.js.map +1 -0
- package/dist/chunk-LSF33PSW.js +1649 -0
- package/dist/chunk-LSF33PSW.js.map +1 -0
- package/dist/chunk-V6RR4VRD.js +340 -0
- package/dist/chunk-V6RR4VRD.js.map +1 -0
- package/dist/index.cjs +1935 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +71 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/ui.cjs +384 -0
- package/dist/ui.cjs.map +1 -0
- package/dist/ui.d.cts +47 -0
- package/dist/ui.d.ts +47 -0
- package/dist/ui.js +42 -0
- package/dist/ui.js.map +1 -0
- package/package.json +92 -0
- package/src/components/editor/editor-theme.css +411 -0
package/dist/ui.cjs
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/ui.ts
|
|
22
|
+
var ui_exports = {};
|
|
23
|
+
__export(ui_exports, {
|
|
24
|
+
Badge: () => Badge,
|
|
25
|
+
Button: () => Button,
|
|
26
|
+
Empty: () => Empty,
|
|
27
|
+
EmptyContent: () => EmptyContent,
|
|
28
|
+
EmptyDescription: () => EmptyDescription,
|
|
29
|
+
EmptyHeader: () => EmptyHeader,
|
|
30
|
+
EmptyMedia: () => EmptyMedia,
|
|
31
|
+
EmptyTitle: () => EmptyTitle,
|
|
32
|
+
Input: () => Input,
|
|
33
|
+
Separator: () => Separator,
|
|
34
|
+
Spinner: () => Spinner,
|
|
35
|
+
Textarea: () => Textarea,
|
|
36
|
+
Tooltip: () => Tooltip,
|
|
37
|
+
TooltipContent: () => TooltipContent,
|
|
38
|
+
TooltipProvider: () => TooltipProvider,
|
|
39
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
40
|
+
buttonVariants: () => buttonVariants,
|
|
41
|
+
cn: () => cn
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(ui_exports);
|
|
44
|
+
|
|
45
|
+
// src/components/ui/badge.tsx
|
|
46
|
+
var React = require("react");
|
|
47
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
48
|
+
var import_radix_ui = require("radix-ui");
|
|
49
|
+
|
|
50
|
+
// src/lib/utils.ts
|
|
51
|
+
var import_clsx = require("clsx");
|
|
52
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
53
|
+
function cn(...inputs) {
|
|
54
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// src/components/ui/badge.tsx
|
|
58
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
|
+
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
60
|
+
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
61
|
+
{
|
|
62
|
+
variants: {
|
|
63
|
+
variant: {
|
|
64
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
65
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
66
|
+
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
67
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
68
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
69
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
variant: "default"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
function Badge({
|
|
78
|
+
className,
|
|
79
|
+
variant = "default",
|
|
80
|
+
asChild = false,
|
|
81
|
+
...props
|
|
82
|
+
}) {
|
|
83
|
+
const Comp = asChild ? import_radix_ui.Slot.Root : "span";
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
Comp,
|
|
86
|
+
{
|
|
87
|
+
"data-slot": "badge",
|
|
88
|
+
"data-variant": variant,
|
|
89
|
+
className: cn(badgeVariants({ variant }), className),
|
|
90
|
+
...props
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// src/components/ui/button.tsx
|
|
96
|
+
var React2 = require("react");
|
|
97
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
98
|
+
var import_radix_ui2 = require("radix-ui");
|
|
99
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
100
|
+
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
101
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
102
|
+
{
|
|
103
|
+
variants: {
|
|
104
|
+
variant: {
|
|
105
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
106
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
107
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
108
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
109
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
110
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
111
|
+
},
|
|
112
|
+
size: {
|
|
113
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
114
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
115
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
116
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
117
|
+
icon: "size-8",
|
|
118
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
119
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
120
|
+
"icon-lg": "size-9"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
defaultVariants: {
|
|
124
|
+
variant: "default",
|
|
125
|
+
size: "default"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
function Button({
|
|
130
|
+
className,
|
|
131
|
+
variant = "default",
|
|
132
|
+
size = "default",
|
|
133
|
+
asChild = false,
|
|
134
|
+
...props
|
|
135
|
+
}) {
|
|
136
|
+
const Comp = asChild ? import_radix_ui2.Slot.Root : "button";
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
138
|
+
Comp,
|
|
139
|
+
{
|
|
140
|
+
"data-slot": "button",
|
|
141
|
+
"data-variant": variant,
|
|
142
|
+
"data-size": size,
|
|
143
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
144
|
+
...props
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// src/components/ui/input.tsx
|
|
150
|
+
var React3 = require("react");
|
|
151
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
152
|
+
function Input({ className, type, ...props }) {
|
|
153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
154
|
+
"input",
|
|
155
|
+
{
|
|
156
|
+
type,
|
|
157
|
+
"data-slot": "input",
|
|
158
|
+
className: cn(
|
|
159
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
160
|
+
className
|
|
161
|
+
),
|
|
162
|
+
...props
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// src/components/ui/separator.tsx
|
|
168
|
+
var React4 = require("react");
|
|
169
|
+
var import_radix_ui3 = require("radix-ui");
|
|
170
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
171
|
+
function Separator({
|
|
172
|
+
className,
|
|
173
|
+
orientation = "horizontal",
|
|
174
|
+
decorative = true,
|
|
175
|
+
...props
|
|
176
|
+
}) {
|
|
177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
178
|
+
import_radix_ui3.Separator.Root,
|
|
179
|
+
{
|
|
180
|
+
"data-slot": "separator",
|
|
181
|
+
decorative,
|
|
182
|
+
orientation,
|
|
183
|
+
className: cn(
|
|
184
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
185
|
+
className
|
|
186
|
+
),
|
|
187
|
+
...props
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// src/components/ui/spinner.tsx
|
|
193
|
+
var import_lucide_react = require("lucide-react");
|
|
194
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
195
|
+
function Spinner({ className, ...props }) {
|
|
196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
197
|
+
import_lucide_react.Loader2Icon,
|
|
198
|
+
{
|
|
199
|
+
"data-slot": "spinner",
|
|
200
|
+
role: "status",
|
|
201
|
+
"aria-label": "Loading",
|
|
202
|
+
className: cn("size-4 animate-spin", className),
|
|
203
|
+
...props
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// src/components/ui/textarea.tsx
|
|
209
|
+
var React5 = require("react");
|
|
210
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
211
|
+
function Textarea({ className, ...props }) {
|
|
212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
213
|
+
"textarea",
|
|
214
|
+
{
|
|
215
|
+
"data-slot": "textarea",
|
|
216
|
+
className: cn(
|
|
217
|
+
"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
218
|
+
className
|
|
219
|
+
),
|
|
220
|
+
...props
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// src/components/ui/tooltip.tsx
|
|
226
|
+
var React6 = require("react");
|
|
227
|
+
var import_radix_ui4 = require("radix-ui");
|
|
228
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
229
|
+
function TooltipProvider({
|
|
230
|
+
delayDuration = 0,
|
|
231
|
+
...props
|
|
232
|
+
}) {
|
|
233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
234
|
+
import_radix_ui4.Tooltip.Provider,
|
|
235
|
+
{
|
|
236
|
+
"data-slot": "tooltip-provider",
|
|
237
|
+
delayDuration,
|
|
238
|
+
...props
|
|
239
|
+
}
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
function Tooltip({ ...props }) {
|
|
243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui4.Tooltip.Root, { "data-slot": "tooltip", ...props });
|
|
244
|
+
}
|
|
245
|
+
function TooltipTrigger({ ...props }) {
|
|
246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui4.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
247
|
+
}
|
|
248
|
+
function TooltipContent({
|
|
249
|
+
className,
|
|
250
|
+
sideOffset = 0,
|
|
251
|
+
children,
|
|
252
|
+
...props
|
|
253
|
+
}) {
|
|
254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui4.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
255
|
+
import_radix_ui4.Tooltip.Content,
|
|
256
|
+
{
|
|
257
|
+
"data-slot": "tooltip-content",
|
|
258
|
+
sideOffset,
|
|
259
|
+
className: cn(
|
|
260
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
261
|
+
className
|
|
262
|
+
),
|
|
263
|
+
...props,
|
|
264
|
+
children: [
|
|
265
|
+
children,
|
|
266
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui4.Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
) });
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// src/components/ui/empty.tsx
|
|
273
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
274
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
275
|
+
function Empty({ className, ...props }) {
|
|
276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
277
|
+
"div",
|
|
278
|
+
{
|
|
279
|
+
"data-slot": "empty",
|
|
280
|
+
className: cn(
|
|
281
|
+
"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
|
|
282
|
+
className
|
|
283
|
+
),
|
|
284
|
+
...props
|
|
285
|
+
}
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
function EmptyHeader({ className, ...props }) {
|
|
289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
290
|
+
"div",
|
|
291
|
+
{
|
|
292
|
+
"data-slot": "empty-header",
|
|
293
|
+
className: cn("flex max-w-sm flex-col items-center gap-2", className),
|
|
294
|
+
...props
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
var emptyMediaVariants = (0, import_class_variance_authority3.cva)(
|
|
299
|
+
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
300
|
+
{
|
|
301
|
+
variants: {
|
|
302
|
+
variant: {
|
|
303
|
+
default: "bg-transparent",
|
|
304
|
+
icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
defaultVariants: {
|
|
308
|
+
variant: "default"
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
function EmptyMedia({
|
|
313
|
+
className,
|
|
314
|
+
variant = "default",
|
|
315
|
+
...props
|
|
316
|
+
}) {
|
|
317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
318
|
+
"div",
|
|
319
|
+
{
|
|
320
|
+
"data-slot": "empty-icon",
|
|
321
|
+
"data-variant": variant,
|
|
322
|
+
className: cn(emptyMediaVariants({ variant, className })),
|
|
323
|
+
...props
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
function EmptyTitle({ className, ...props }) {
|
|
328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
329
|
+
"div",
|
|
330
|
+
{
|
|
331
|
+
"data-slot": "empty-title",
|
|
332
|
+
className: cn("font-heading text-sm font-medium tracking-tight", className),
|
|
333
|
+
...props
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
function EmptyDescription({ className, ...props }) {
|
|
338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
339
|
+
"div",
|
|
340
|
+
{
|
|
341
|
+
"data-slot": "empty-description",
|
|
342
|
+
className: cn(
|
|
343
|
+
"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
344
|
+
className
|
|
345
|
+
),
|
|
346
|
+
...props
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
function EmptyContent({ className, ...props }) {
|
|
351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
352
|
+
"div",
|
|
353
|
+
{
|
|
354
|
+
"data-slot": "empty-content",
|
|
355
|
+
className: cn(
|
|
356
|
+
"flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
|
|
357
|
+
className
|
|
358
|
+
),
|
|
359
|
+
...props
|
|
360
|
+
}
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
364
|
+
0 && (module.exports = {
|
|
365
|
+
Badge,
|
|
366
|
+
Button,
|
|
367
|
+
Empty,
|
|
368
|
+
EmptyContent,
|
|
369
|
+
EmptyDescription,
|
|
370
|
+
EmptyHeader,
|
|
371
|
+
EmptyMedia,
|
|
372
|
+
EmptyTitle,
|
|
373
|
+
Input,
|
|
374
|
+
Separator,
|
|
375
|
+
Spinner,
|
|
376
|
+
Textarea,
|
|
377
|
+
Tooltip,
|
|
378
|
+
TooltipContent,
|
|
379
|
+
TooltipProvider,
|
|
380
|
+
TooltipTrigger,
|
|
381
|
+
buttonVariants,
|
|
382
|
+
cn
|
|
383
|
+
});
|
|
384
|
+
//# sourceMappingURL=ui.cjs.map
|
package/dist/ui.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ui.ts","../src/components/ui/badge.tsx","../src/lib/utils.ts","../src/components/ui/button.tsx","../src/components/ui/input.tsx","../src/components/ui/separator.tsx","../src/components/ui/spinner.tsx","../src/components/ui/textarea.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/empty.tsx"],"sourcesContent":["/**\n * The shadcn primitives the editor is built from, as their own entry point.\n *\n * Separate from the main entry because that one reaches `EmailEditor`, which imports\n * GrapesJS, which touches `window` at import time. With a single barrel, a layout file\n * importing a tooltip provider drags the whole canvas into the server bundle and the\n * build dies with \"window is not defined\" while prerendering an unrelated page.\n *\n * Styled entirely through the CSS custom properties in `styles.css` — override those\n * rather than forking the components.\n */\n\nexport { Badge } from \"./components/ui/badge.js\";\nexport { Button, buttonVariants } from \"./components/ui/button.js\";\nexport { Input } from \"./components/ui/input.js\";\nexport { Separator } from \"./components/ui/separator.js\";\nexport { Spinner } from \"./components/ui/spinner.js\";\nexport { Textarea } from \"./components/ui/textarea.js\";\nexport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"./components/ui/tooltip.js\";\nexport {\n Empty,\n EmptyContent,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from \"./components/ui/empty.js\";\n\nexport { cn } from \"./lib/utils.js\";\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst badgeVariants = cva(\n \"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n secondary: \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n destructive:\n \"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20\",\n outline: \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n ghost: \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Badge({\n className,\n variant = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"span\";\n\n return (\n <Comp\n data-slot=\"badge\"\n data-variant={variant}\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nexport { Badge, badgeVariants };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline:\n \"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default:\n \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n icon: \"size-8\",\n \"icon-xs\":\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\":\n \"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\n \"icon-lg\": \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot.Root : \"button\";\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n","import * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Separator as SeparatorPrimitive } from \"radix-ui\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n","import { cn } from \"../../lib/utils\";\nimport { Loader2Icon } from \"lucide-react\";\n\nfunction Spinner({ className, ...props }: React.ComponentProps<\"svg\">) {\n return (\n <Loader2Icon\n data-slot=\"spinner\"\n role=\"status\"\n aria-label=\"Loading\"\n className={cn(\"size-4 animate-spin\", className)}\n {...props}\n />\n );\n}\n\nexport { Spinner };\n","import * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Tooltip as TooltipPrimitive } from \"radix-ui\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n \"z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };\n","import { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Empty({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty\"\n className={cn(\n \"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction EmptyHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty-header\"\n className={cn(\"flex max-w-sm flex-col items-center gap-2\", className)}\n {...props}\n />\n );\n}\n\nconst emptyMediaVariants = cva(\n \"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction EmptyMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof emptyMediaVariants>) {\n return (\n <div\n data-slot=\"empty-icon\"\n data-variant={variant}\n className={cn(emptyMediaVariants({ variant, className }))}\n {...props}\n />\n );\n}\n\nfunction EmptyTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty-title\"\n className={cn(\"font-heading text-sm font-medium tracking-tight\", className)}\n {...props}\n />\n );\n}\n\nfunction EmptyDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <div\n data-slot=\"empty-description\"\n className={cn(\n \"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction EmptyContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty-content\"\n className={cn(\n \"flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,sCAAuC;AACvC,sBAAqB;;;ACFrB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD8BI;AA7BJ,IAAM,oBAAgB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aACE;AAAA,QACF,SAAS;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEA,SAAS,MAAM;AAAA,EACb;AAAA,EACA,UAAU;AAAA,EACV,UAAU;AAAA,EACV,GAAG;AACL,GAA8F;AAC5F,QAAM,OAAO,UAAU,qBAAK,OAAO;AAEnC,SACE;AAAA,IAAC;AAAA;AAAA,M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Ac;AAAA,MACd,WAAW,GAAG,mBAAmB,EAAE,SAAS,UAAU,CAAC,CAAC;AAAA,MACvD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,mDAAmD,SAAS;AAAA,MACzE,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,iBAAiB,EAAE,WAAW,GAAG,MAAM,GAA8B;AAC5E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC1E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["React","import_class_variance_authority","import_radix_ui","import_jsx_runtime","React","import_jsx_runtime","React","import_radix_ui","import_jsx_runtime","SeparatorPrimitive","import_jsx_runtime","React","import_jsx_runtime","React","import_radix_ui","import_jsx_runtime","TooltipPrimitive","import_class_variance_authority","import_jsx_runtime"]}
|
package/dist/ui.d.cts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { Separator as Separator$1, Tooltip as Tooltip$1 } from 'radix-ui';
|
|
5
|
+
import { ClassValue } from 'clsx';
|
|
6
|
+
|
|
7
|
+
declare const badgeVariants: (props?: ({
|
|
8
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}): React$1.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare const buttonVariants: (props?: ({
|
|
15
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
16
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
17
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
18
|
+
declare function Button({ className, variant, size, asChild, ...props }: React$1.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
19
|
+
asChild?: boolean;
|
|
20
|
+
}): React$1.JSX.Element;
|
|
21
|
+
|
|
22
|
+
declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): React$1.JSX.Element;
|
|
23
|
+
|
|
24
|
+
declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof Separator$1.Root>): React$1.JSX.Element;
|
|
25
|
+
|
|
26
|
+
declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): React$1.JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare function Textarea({ className, ...props }: React$1.ComponentProps<"textarea">): React$1.JSX.Element;
|
|
29
|
+
|
|
30
|
+
declare function TooltipProvider({ delayDuration, ...props }: React$1.ComponentProps<typeof Tooltip$1.Provider>): React$1.JSX.Element;
|
|
31
|
+
declare function Tooltip({ ...props }: React$1.ComponentProps<typeof Tooltip$1.Root>): React$1.JSX.Element;
|
|
32
|
+
declare function TooltipTrigger({ ...props }: React$1.ComponentProps<typeof Tooltip$1.Trigger>): React$1.JSX.Element;
|
|
33
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React$1.ComponentProps<typeof Tooltip$1.Content>): React$1.JSX.Element;
|
|
34
|
+
|
|
35
|
+
declare function Empty({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
36
|
+
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
37
|
+
declare const emptyMediaVariants: (props?: ({
|
|
38
|
+
variant?: "default" | "icon" | null | undefined;
|
|
39
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
40
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): React$1.JSX.Element;
|
|
41
|
+
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
42
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): React$1.JSX.Element;
|
|
43
|
+
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
44
|
+
|
|
45
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
46
|
+
|
|
47
|
+
export { Badge, Button, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Input, Separator, Spinner, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cn };
|
package/dist/ui.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { Separator as Separator$1, Tooltip as Tooltip$1 } from 'radix-ui';
|
|
5
|
+
import { ClassValue } from 'clsx';
|
|
6
|
+
|
|
7
|
+
declare const badgeVariants: (props?: ({
|
|
8
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}): React$1.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare const buttonVariants: (props?: ({
|
|
15
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
16
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
17
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
18
|
+
declare function Button({ className, variant, size, asChild, ...props }: React$1.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
19
|
+
asChild?: boolean;
|
|
20
|
+
}): React$1.JSX.Element;
|
|
21
|
+
|
|
22
|
+
declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): React$1.JSX.Element;
|
|
23
|
+
|
|
24
|
+
declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof Separator$1.Root>): React$1.JSX.Element;
|
|
25
|
+
|
|
26
|
+
declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): React$1.JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare function Textarea({ className, ...props }: React$1.ComponentProps<"textarea">): React$1.JSX.Element;
|
|
29
|
+
|
|
30
|
+
declare function TooltipProvider({ delayDuration, ...props }: React$1.ComponentProps<typeof Tooltip$1.Provider>): React$1.JSX.Element;
|
|
31
|
+
declare function Tooltip({ ...props }: React$1.ComponentProps<typeof Tooltip$1.Root>): React$1.JSX.Element;
|
|
32
|
+
declare function TooltipTrigger({ ...props }: React$1.ComponentProps<typeof Tooltip$1.Trigger>): React$1.JSX.Element;
|
|
33
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React$1.ComponentProps<typeof Tooltip$1.Content>): React$1.JSX.Element;
|
|
34
|
+
|
|
35
|
+
declare function Empty({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
36
|
+
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
37
|
+
declare const emptyMediaVariants: (props?: ({
|
|
38
|
+
variant?: "default" | "icon" | null | undefined;
|
|
39
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
40
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): React$1.JSX.Element;
|
|
41
|
+
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
42
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): React$1.JSX.Element;
|
|
43
|
+
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
|
|
44
|
+
|
|
45
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
46
|
+
|
|
47
|
+
export { Badge, Button, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Input, Separator, Spinner, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cn };
|
package/dist/ui.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Badge,
|
|
4
|
+
Button,
|
|
5
|
+
Empty,
|
|
6
|
+
EmptyContent,
|
|
7
|
+
EmptyDescription,
|
|
8
|
+
EmptyHeader,
|
|
9
|
+
EmptyMedia,
|
|
10
|
+
EmptyTitle,
|
|
11
|
+
Input,
|
|
12
|
+
Separator,
|
|
13
|
+
Spinner,
|
|
14
|
+
Textarea,
|
|
15
|
+
Tooltip,
|
|
16
|
+
TooltipContent,
|
|
17
|
+
TooltipProvider,
|
|
18
|
+
TooltipTrigger,
|
|
19
|
+
buttonVariants,
|
|
20
|
+
cn
|
|
21
|
+
} from "./chunk-V6RR4VRD.js";
|
|
22
|
+
export {
|
|
23
|
+
Badge,
|
|
24
|
+
Button,
|
|
25
|
+
Empty,
|
|
26
|
+
EmptyContent,
|
|
27
|
+
EmptyDescription,
|
|
28
|
+
EmptyHeader,
|
|
29
|
+
EmptyMedia,
|
|
30
|
+
EmptyTitle,
|
|
31
|
+
Input,
|
|
32
|
+
Separator,
|
|
33
|
+
Spinner,
|
|
34
|
+
Textarea,
|
|
35
|
+
Tooltip,
|
|
36
|
+
TooltipContent,
|
|
37
|
+
TooltipProvider,
|
|
38
|
+
TooltipTrigger,
|
|
39
|
+
buttonVariants,
|
|
40
|
+
cn
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mjml-agent-editor/editor",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React MJML editor with an agent chat panel and canvas comments.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mjml",
|
|
7
|
+
"email-editor",
|
|
8
|
+
"grapesjs",
|
|
9
|
+
"react",
|
|
10
|
+
"ai-agent",
|
|
11
|
+
"comments"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Krzysztof Marmol",
|
|
15
|
+
"homepage": "https://github.com/KrzysztofMarmol/mjml-agent-editor/tree/main/packages/editor#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/KrzysztofMarmol/mjml-agent-editor/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/KrzysztofMarmol/mjml-agent-editor.git",
|
|
22
|
+
"directory": "packages/editor"
|
|
23
|
+
},
|
|
24
|
+
"type": "module",
|
|
25
|
+
"sideEffects": [
|
|
26
|
+
"*.css"
|
|
27
|
+
],
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=20"
|
|
30
|
+
},
|
|
31
|
+
"main": "./dist/index.js",
|
|
32
|
+
"module": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"import": "./dist/index.js",
|
|
38
|
+
"require": "./dist/index.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./ui": {
|
|
41
|
+
"types": "./dist/ui.d.ts",
|
|
42
|
+
"import": "./dist/ui.js",
|
|
43
|
+
"require": "./dist/ui.cjs"
|
|
44
|
+
},
|
|
45
|
+
"./canvas": {
|
|
46
|
+
"types": "./dist/canvas.d.ts",
|
|
47
|
+
"import": "./dist/canvas.js",
|
|
48
|
+
"require": "./dist/canvas.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./styles.css": "./src/components/editor/editor-theme.css"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"dist",
|
|
54
|
+
"src/components/editor/editor-theme.css"
|
|
55
|
+
],
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@ai-sdk/react": "^3.0.232",
|
|
61
|
+
"@grapesjs/react": "^2.0.0",
|
|
62
|
+
"@shadcn/react": "^0.2.1",
|
|
63
|
+
"ai": "^6.0.230",
|
|
64
|
+
"class-variance-authority": "^0.7.1",
|
|
65
|
+
"clsx": "^2.1.1",
|
|
66
|
+
"grapesjs": "^0.22.16",
|
|
67
|
+
"grapesjs-mjml": "^1.0.8",
|
|
68
|
+
"lucide-react": "^1.25.0",
|
|
69
|
+
"radix-ui": "^1.6.2",
|
|
70
|
+
"react-markdown": "^10.1.0",
|
|
71
|
+
"remark-gfm": "^4.0.1",
|
|
72
|
+
"sonner": "^2.0.7",
|
|
73
|
+
"tailwind-merge": "^3.6.0",
|
|
74
|
+
"@mjml-agent-editor/core": "0.1.0"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"react": "^19",
|
|
78
|
+
"react-dom": "^19"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@types/react": "^19",
|
|
82
|
+
"@types/react-dom": "^19",
|
|
83
|
+
"react": "19.2.4",
|
|
84
|
+
"tsup": "^8.3.5",
|
|
85
|
+
"typescript": "^5.7.2"
|
|
86
|
+
},
|
|
87
|
+
"scripts": {
|
|
88
|
+
"build": "tsup",
|
|
89
|
+
"dev": "tsup --watch",
|
|
90
|
+
"typecheck": "tsc --noEmit"
|
|
91
|
+
}
|
|
92
|
+
}
|