@moondreamsdev/dreamer-ui 1.7.10-test.177 → 1.7.10-test.179
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/{Toast-ZM4zo3RX.js → Toast-D72jyqqq.js} +23 -19
- package/dist/Toast-D72jyqqq.js.map +1 -0
- package/dist/Toast-MGGgLYmr.cjs +2 -0
- package/dist/Toast-MGGgLYmr.cjs.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +2052 -1979
- package/dist/components.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +1 -1
- package/dist/src/components/code-block/CodeBlock.d.ts +1 -1
- package/dist/src/components/code-block/classes.d.ts +2 -1
- package/dist/src/components/code-block/format.d.ts +2 -1
- package/dist/src/components/code-block/index.d.ts +1 -1
- package/dist/src/components/code-block/tokenize.d.ts +5 -1
- package/dist/src/components/code-block/types.d.ts +24 -1
- package/package.json +1 -1
- package/dist/Toast-ZM4zo3RX.js.map +0 -1
- package/dist/Toast-xb4aaX0v.cjs +0 -2
- package/dist/Toast-xb4aaX0v.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as u, Fragment as q, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import g, { createContext as l, useId as H, useState as x, useEffect as p, useRef as K, useCallback as j, useMemo as z, useContext as M } from "react";
|
|
3
3
|
import { createPortal as P } from "react-dom";
|
|
4
|
-
import { X as V, C as
|
|
5
|
-
import { j as
|
|
4
|
+
import { X as V, C as Z, E as _, I as F } from "./X-CIoyLewf.js";
|
|
5
|
+
import { j as X } from "./join-BmgR_f4v.js";
|
|
6
6
|
function y(...n) {
|
|
7
7
|
return n.filter((i) => typeof i == "string" && i).join(" ").trim() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function G({ size: n = 15, color: i = "currentColor", className: t = "inline", ...e }) {
|
|
10
10
|
return /* @__PURE__ */ u(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
@@ -336,7 +336,11 @@ l(null);
|
|
|
336
336
|
l(null);
|
|
337
337
|
l(void 0);
|
|
338
338
|
l(void 0);
|
|
339
|
-
|
|
339
|
+
l(null);
|
|
340
|
+
l(null);
|
|
341
|
+
l(void 0);
|
|
342
|
+
l(void 0);
|
|
343
|
+
function J() {
|
|
340
344
|
const [n, i] = x(0);
|
|
341
345
|
return p(() => {
|
|
342
346
|
const t = setInterval(() => {
|
|
@@ -354,7 +358,7 @@ function G() {
|
|
|
354
358
|
t
|
|
355
359
|
)) });
|
|
356
360
|
}
|
|
357
|
-
const
|
|
361
|
+
const Q = {
|
|
358
362
|
base: "",
|
|
359
363
|
primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
|
|
360
364
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
|
|
@@ -362,7 +366,7 @@ const J = {
|
|
|
362
366
|
outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
|
|
363
367
|
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
|
|
364
368
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
|
|
365
|
-
},
|
|
369
|
+
}, U = {
|
|
366
370
|
stripped: "",
|
|
367
371
|
fitted: "size-fit leading-0",
|
|
368
372
|
sm: "px-2 py-1 text-sm",
|
|
@@ -370,7 +374,7 @@ const J = {
|
|
|
370
374
|
lg: "px-6 py-3 text-lg",
|
|
371
375
|
icon: "p-1 w-fit aspect-square",
|
|
372
376
|
full: "p-2 w-full"
|
|
373
|
-
},
|
|
377
|
+
}, W = {
|
|
374
378
|
none: "rounded-none",
|
|
375
379
|
sm: "rounded-sm",
|
|
376
380
|
md: "rounded-md",
|
|
@@ -381,7 +385,7 @@ const J = {
|
|
|
381
385
|
size: "md",
|
|
382
386
|
rounded: "md"
|
|
383
387
|
};
|
|
384
|
-
function
|
|
388
|
+
function Y({
|
|
385
389
|
variant: n = k.variant,
|
|
386
390
|
size: i,
|
|
387
391
|
rounded: t = k.rounded,
|
|
@@ -393,9 +397,9 @@ function W({
|
|
|
393
397
|
n === "link" && !i ? a = "fitted" : a = i || k.size;
|
|
394
398
|
const s = y(
|
|
395
399
|
"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
400
|
+
Q[n],
|
|
401
|
+
U[a],
|
|
402
|
+
W[t],
|
|
399
403
|
e && "relative pointer-events-none",
|
|
400
404
|
r
|
|
401
405
|
);
|
|
@@ -433,7 +437,7 @@ function W({
|
|
|
433
437
|
type: d.type ?? "button",
|
|
434
438
|
className: s,
|
|
435
439
|
children: [
|
|
436
|
-
e && /* @__PURE__ */ u(
|
|
440
|
+
e && /* @__PURE__ */ u(J, {}),
|
|
437
441
|
c()
|
|
438
442
|
]
|
|
439
443
|
}
|
|
@@ -502,7 +506,7 @@ function el({
|
|
|
502
506
|
if (nl(E, N), ll(N, t), !N) return null;
|
|
503
507
|
const I = () => e ? g.isValidElement(e) ? /* @__PURE__ */ u("div", { className: "mb-4", children: e }) : /* @__PURE__ */ u("h2", { className: "mb-4 text-xl font-semibold", id: L, children: e }) : null, B = () => v.length === 0 ? null : /* @__PURE__ */ u("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: v.map((D, O) => {
|
|
504
508
|
const { label: S, ...$ } = D;
|
|
505
|
-
return /* @__PURE__ */ u(
|
|
509
|
+
return /* @__PURE__ */ u(Y, { ...$, "data-modal-action": "true", children: S }, O);
|
|
506
510
|
}) });
|
|
507
511
|
return /* @__PURE__ */ u(q, { children: P(
|
|
508
512
|
/* @__PURE__ */ u(
|
|
@@ -542,7 +546,7 @@ function el({
|
|
|
542
546
|
onClick: t,
|
|
543
547
|
"data-modal-close-button": "true",
|
|
544
548
|
className: "rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",
|
|
545
|
-
children: /* @__PURE__ */ u(
|
|
549
|
+
children: /* @__PURE__ */ u(G, { size: 18 })
|
|
546
550
|
}
|
|
547
551
|
),
|
|
548
552
|
I(),
|
|
@@ -621,15 +625,15 @@ const ul = l(null), cl = () => {
|
|
|
621
625
|
}, T = {
|
|
622
626
|
info: {
|
|
623
627
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
624
|
-
icon: /* @__PURE__ */ u(
|
|
628
|
+
icon: /* @__PURE__ */ u(F, { size: 20 })
|
|
625
629
|
},
|
|
626
630
|
warning: {
|
|
627
631
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
628
|
-
icon: /* @__PURE__ */ u(
|
|
632
|
+
icon: /* @__PURE__ */ u(_, { size: 20 })
|
|
629
633
|
},
|
|
630
634
|
error: {
|
|
631
635
|
className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
|
|
632
|
-
icon: /* @__PURE__ */ u(
|
|
636
|
+
icon: /* @__PURE__ */ u(Z, { size: 20 })
|
|
633
637
|
}
|
|
634
638
|
};
|
|
635
639
|
function ml({
|
|
@@ -674,7 +678,7 @@ function ml({
|
|
|
674
678
|
{
|
|
675
679
|
role: e === "error" ? "alert" : "status",
|
|
676
680
|
"aria-live": e === "error" ? void 0 : "polite",
|
|
677
|
-
className:
|
|
681
|
+
className: X(
|
|
678
682
|
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",
|
|
679
683
|
r && "pb-3",
|
|
680
684
|
f.className,
|
|
@@ -715,4 +719,4 @@ export {
|
|
|
715
719
|
y as n,
|
|
716
720
|
cl as u
|
|
717
721
|
};
|
|
718
|
-
//# sourceMappingURL=Toast-
|
|
722
|
+
//# sourceMappingURL=Toast-D72jyqqq.js.map
|