@abduljebar/text-editor 2.6.2 → 2.8.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.css +1 -1
- package/dist/index.js +150 -150
- package/dist/index.umd.cjs +11 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Lt, { useState as ee, useRef as re, useCallback as W, useEffect as me, forwardRef as zt, useImperativeHandle as Ot } from "react";
|
|
2
|
-
import { Save as
|
|
2
|
+
import { Save as pt, FileDown as Pt, Trash2 as Mt, Image as Ce, Undo as qt, Redo as Dt, Bold as Ft, Italic as Ut, Underline as $t, Strikethrough as Bt, Heading1 as Gt, Heading2 as Wt, Type as Ht, Code as Vt, Quote as Yt, List as Jt, ListOrdered as Kt, Indent as Xt, Outdent as Qt, AlignLeft as Zt, AlignCenter as er, AlignRight as tr, Superscript as rr, Subscript as nr, Link as or, Loader2 as sr, CheckCircle as ar, AlertCircle as ir, Upload as lr } from "lucide-react";
|
|
3
3
|
var we = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
4
|
function cr(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -232,7 +232,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
232
232
|
return o();
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
var D, U = {},
|
|
235
|
+
var D, U = {}, g = q.react_stack_bottom_frame.bind(
|
|
236
236
|
q,
|
|
237
237
|
c
|
|
238
238
|
)(), X = A(n(c)), B = {};
|
|
@@ -243,7 +243,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
243
243
|
y,
|
|
244
244
|
w,
|
|
245
245
|
!1,
|
|
246
|
-
C ? Error("react-stack-top-frame") :
|
|
246
|
+
C ? Error("react-stack-top-frame") : g,
|
|
247
247
|
C ? A(n(o)) : X
|
|
248
248
|
);
|
|
249
249
|
}, ve.jsxs = function(o, y, w) {
|
|
@@ -253,7 +253,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
253
253
|
y,
|
|
254
254
|
w,
|
|
255
255
|
!0,
|
|
256
|
-
C ? Error("react-stack-top-frame") :
|
|
256
|
+
C ? Error("react-stack-top-frame") : g,
|
|
257
257
|
C ? A(n(o)) : X
|
|
258
258
|
);
|
|
259
259
|
};
|
|
@@ -293,8 +293,8 @@ const fr = ({
|
|
|
293
293
|
se = se.parentNode;
|
|
294
294
|
}
|
|
295
295
|
L(ie);
|
|
296
|
-
const
|
|
297
|
-
M &&
|
|
296
|
+
const p = [];
|
|
297
|
+
M && p.push("bold"), S && p.push("italic"), z && p.push("underline"), $ && p.push("strikeThrough"), N && p.push("insertUnorderedList"), G && p.push("insertOrderedList"), x === "left" && p.push("justifyLeft"), x === "center" && p.push("justifyCenter"), x === "right" && p.push("justifyRight"), (ie === "h1" || ie === "h2") && p.push(`formatBlock:${ie}`), f(p);
|
|
298
298
|
}, [M, S, z, $, N, G, x]);
|
|
299
299
|
me(() => {
|
|
300
300
|
const O = () => {
|
|
@@ -321,7 +321,7 @@ const fr = ({
|
|
|
321
321
|
e("outdent");
|
|
322
322
|
}, U = () => {
|
|
323
323
|
e("undo");
|
|
324
|
-
},
|
|
324
|
+
}, g = () => {
|
|
325
325
|
e("redo");
|
|
326
326
|
}, X = () => {
|
|
327
327
|
e("formatBlock", "pre");
|
|
@@ -344,7 +344,7 @@ const fr = ({
|
|
|
344
344
|
command: "redo",
|
|
345
345
|
icon: /* @__PURE__ */ i.jsx(Dt, { size: 18 }),
|
|
346
346
|
title: "Redo",
|
|
347
|
-
onClick:
|
|
347
|
+
onClick: g
|
|
348
348
|
},
|
|
349
349
|
{ id: "separator-1", separator: !0 },
|
|
350
350
|
{
|
|
@@ -499,7 +499,7 @@ const fr = ({
|
|
|
499
499
|
title: "Insert Image",
|
|
500
500
|
onClick: u
|
|
501
501
|
}
|
|
502
|
-
], C = (O) => /* @__PURE__ */ i.jsx("div", { className: "flex items-center border-r border-gray-200 pr-2 mr-2 last:border-r-0 last:pr-0 last:mr-0", children: O.map((I) => {
|
|
502
|
+
], C = (O) => /* @__PURE__ */ i.jsx("div", { className: "toolbar-section flex items-center border-r border-gray-200 pr-2 mr-2 last:border-r-0 last:pr-0 last:mr-0", children: O.map((I) => {
|
|
503
503
|
if (I.separator)
|
|
504
504
|
return /* @__PURE__ */ i.jsx("div", { className: "w-px h-6 bg-gray-300 mx-2" }, I.id);
|
|
505
505
|
const de = I.isActive !== void 0 ? I.isActive : I.command ? m.includes(I.command) || I.command === "formatBlock" && I.value === R : !1;
|
|
@@ -514,7 +514,7 @@ const fr = ({
|
|
|
514
514
|
},
|
|
515
515
|
title: I.title,
|
|
516
516
|
type: "button",
|
|
517
|
-
className: `min-w-[36px] h-9 flex items-center justify-center rounded-md border transition-all duration-150 ${de ? "bg-blue-100 text-blue-600 border-blue-300 hover:bg-blue-200 shadow-sm" : "bg-white border-gray-300 text-gray-700 hover:bg-gray-100 hover:border-gray-400"} active:scale-95 mx-0.5`,
|
|
517
|
+
className: `toolbar-button min-w-[36px] h-9 flex items-center justify-center rounded-md border transition-all duration-150 ${de ? "active bg-blue-100 text-blue-600 border-blue-300 hover:bg-blue-200 shadow-sm" : "bg-white border-gray-300 text-gray-700 hover:bg-gray-100 hover:border-gray-400"} active:scale-95 mx-0.5`,
|
|
518
518
|
disabled: I.disabled,
|
|
519
519
|
children: I.icon
|
|
520
520
|
},
|
|
@@ -525,7 +525,7 @@ const fr = ({
|
|
|
525
525
|
"div",
|
|
526
526
|
{
|
|
527
527
|
ref: d,
|
|
528
|
-
className: "flex flex-col sm:flex-row flex-wrap items-start sm:items-center justify-between p-3 bg-gray-50 border-b border-gray-200 gap-2",
|
|
528
|
+
className: "toolbar flex flex-col sm:flex-row flex-wrap items-start sm:items-center justify-between p-3 bg-gray-50 border-b border-gray-200 gap-2",
|
|
529
529
|
children: [
|
|
530
530
|
/* @__PURE__ */ i.jsxs("div", { className: "flex flex-wrap items-center gap-1 order-1 w-full sm:w-auto", children: [
|
|
531
531
|
C(Z),
|
|
@@ -536,7 +536,7 @@ const fr = ({
|
|
|
536
536
|
C(oe),
|
|
537
537
|
C(le)
|
|
538
538
|
] }),
|
|
539
|
-
c && /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-2 order-2 sm:order-3 mt-2 sm:mt-0 flex-shrink-0", children: [
|
|
539
|
+
c && /* @__PURE__ */ i.jsxs("div", { className: "action-buttons flex items-center gap-2 order-2 sm:order-3 mt-2 sm:mt-0 flex-shrink-0", children: [
|
|
540
540
|
/* @__PURE__ */ i.jsxs(
|
|
541
541
|
"button",
|
|
542
542
|
{
|
|
@@ -548,9 +548,9 @@ const fr = ({
|
|
|
548
548
|
},
|
|
549
549
|
disabled: !l,
|
|
550
550
|
title: "Save Document (Ctrl+S)",
|
|
551
|
-
className: "flex items-center gap-2 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-md hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed transition-colors duration-200 active:scale-95",
|
|
551
|
+
className: "action-button save-button flex items-center gap-2 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-md hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed transition-colors duration-200 active:scale-95",
|
|
552
552
|
children: [
|
|
553
|
-
/* @__PURE__ */ i.jsx(
|
|
553
|
+
/* @__PURE__ */ i.jsx(pt, { size: 16 }),
|
|
554
554
|
/* @__PURE__ */ i.jsx("span", { className: "hidden sm:inline", children: "Save" })
|
|
555
555
|
]
|
|
556
556
|
}
|
|
@@ -565,7 +565,7 @@ const fr = ({
|
|
|
565
565
|
}, 10);
|
|
566
566
|
},
|
|
567
567
|
title: "Export as HTML",
|
|
568
|
-
className: "flex items-center gap-2 px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-md hover:bg-green-700 transition-colors duration-200 active:scale-95",
|
|
568
|
+
className: "action-button export-button flex items-center gap-2 px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-md hover:bg-green-700 transition-colors duration-200 active:scale-95",
|
|
569
569
|
children: [
|
|
570
570
|
/* @__PURE__ */ i.jsx(Pt, { size: 16 }),
|
|
571
571
|
/* @__PURE__ */ i.jsx("span", { className: "hidden sm:inline", children: "Export" })
|
|
@@ -582,7 +582,7 @@ const fr = ({
|
|
|
582
582
|
}, 10);
|
|
583
583
|
},
|
|
584
584
|
title: "Clear Editor",
|
|
585
|
-
className: "flex items-center gap-2 px-4 py-2 bg-red-600 text-white text-sm font-medium rounded-md hover:bg-red-700 transition-colors duration-200 active:scale-95",
|
|
585
|
+
className: "action-button clear-button flex items-center gap-2 px-4 py-2 bg-red-600 text-white text-sm font-medium rounded-md hover:bg-red-700 transition-colors duration-200 active:scale-95",
|
|
586
586
|
children: [
|
|
587
587
|
/* @__PURE__ */ i.jsx(Mt, { size: 16 }),
|
|
588
588
|
/* @__PURE__ */ i.jsx("span", { className: "hidden sm:inline", children: "Clear" })
|
|
@@ -606,35 +606,35 @@ const fr = ({
|
|
|
606
606
|
]
|
|
607
607
|
}
|
|
608
608
|
);
|
|
609
|
-
},
|
|
609
|
+
}, pr = ({
|
|
610
610
|
wordCount: e,
|
|
611
611
|
characterCount: t,
|
|
612
612
|
hasUnsavedChanges: r,
|
|
613
613
|
pendingImagesCount: n = 0
|
|
614
|
-
}) => /* @__PURE__ */ i.jsxs("div", { className: "flex justify-between items-center px-5 py-3 bg-gray-50 border-t border-gray-200 text-sm text-gray-600", children: [
|
|
615
|
-
/* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-6", children: [
|
|
616
|
-
/* @__PURE__ */ i.jsxs("div", { children: [
|
|
614
|
+
}) => /* @__PURE__ */ i.jsxs("div", { className: "status-bar flex justify-between items-center px-5 py-3 bg-gray-50 border-t border-gray-200 text-sm text-gray-600", children: [
|
|
615
|
+
/* @__PURE__ */ i.jsxs("div", { className: "status-bar-content flex items-center gap-6", children: [
|
|
616
|
+
/* @__PURE__ */ i.jsxs("div", { className: "status-item", children: [
|
|
617
617
|
"Words: ",
|
|
618
|
-
/* @__PURE__ */ i.jsx("strong", { className: "text-gray-800", children: e })
|
|
618
|
+
/* @__PURE__ */ i.jsx("strong", { className: "status-value text-gray-800", children: e })
|
|
619
619
|
] }),
|
|
620
|
-
/* @__PURE__ */ i.jsxs("div", { children: [
|
|
620
|
+
/* @__PURE__ */ i.jsxs("div", { className: "status-item", children: [
|
|
621
621
|
"Characters: ",
|
|
622
|
-
/* @__PURE__ */ i.jsx("strong", { className: "text-gray-800", children: t })
|
|
622
|
+
/* @__PURE__ */ i.jsx("strong", { className: "status-value text-gray-800", children: t })
|
|
623
623
|
] }),
|
|
624
|
-
n > 0 && /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
625
|
-
/* @__PURE__ */ i.jsx(Ce, { size: 14, className: "text-blue-600" }),
|
|
626
|
-
/* @__PURE__ */ i.jsxs("span", { className: "text-blue-600", children: [
|
|
624
|
+
n > 0 && /* @__PURE__ */ i.jsxs("div", { className: "status-item flex items-center gap-1", children: [
|
|
625
|
+
/* @__PURE__ */ i.jsx(Ce, { size: 14, className: "status-value text-blue-600" }),
|
|
626
|
+
/* @__PURE__ */ i.jsxs("span", { className: "status-value text-blue-600", children: [
|
|
627
627
|
n,
|
|
628
628
|
" image",
|
|
629
629
|
n !== 1 ? "s" : ""
|
|
630
630
|
] })
|
|
631
631
|
] })
|
|
632
632
|
] }),
|
|
633
|
-
/* @__PURE__ */ i.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ i.jsxs("div", { className: `flex items-center gap-1 ${r ? "
|
|
634
|
-
r && /* @__PURE__ */ i.jsx(
|
|
633
|
+
/* @__PURE__ */ i.jsx("div", { className: "status-bar-content flex items-center gap-2", children: /* @__PURE__ */ i.jsxs("div", { className: `flex items-center gap-1 ${r ? "status-unsaved" : "status-saved"}`, children: [
|
|
634
|
+
r && /* @__PURE__ */ i.jsx(pt, { size: 14, className: "animate-pulse" }),
|
|
635
635
|
/* @__PURE__ */ i.jsx("strong", { children: r ? "Unsaved Changes" : "Saved" })
|
|
636
636
|
] }) })
|
|
637
|
-
] }),
|
|
637
|
+
] }), gr = ({
|
|
638
638
|
initialContent: e = "",
|
|
639
639
|
onImageUpload: t,
|
|
640
640
|
imageUploadEndpoint: r,
|
|
@@ -713,7 +713,7 @@ const fr = ({
|
|
|
713
713
|
try {
|
|
714
714
|
let u = !1;
|
|
715
715
|
if (d === "formatBlock" && v)
|
|
716
|
-
u = document.execCommand("formatBlock", !1,
|
|
716
|
+
u = document.execCommand("formatBlock", !1, v);
|
|
717
717
|
else if (d === "createLink" && v) {
|
|
718
718
|
const j = window.getSelection();
|
|
719
719
|
j && !j.isCollapsed ? u = document.execCommand("createLink", !1, v) : (document.execCommand("insertHTML", !1, `<a href="${v}" target="_blank">${v}</a>`), u = !0);
|
|
@@ -750,9 +750,9 @@ const fr = ({
|
|
|
750
750
|
});
|
|
751
751
|
const U = document.createElement("img");
|
|
752
752
|
U.src = D, U.alt = d.name, U.className = "max-w-full h-auto border rounded", U.setAttribute("data-image-id", u), U.setAttribute("data-file-name", d.name), U.style.maxWidth = "100%", U.style.height = "auto";
|
|
753
|
-
const
|
|
754
|
-
if (v &&
|
|
755
|
-
|
|
753
|
+
const g = M();
|
|
754
|
+
if (v && g) {
|
|
755
|
+
g.deleteContents(), g.insertNode(U);
|
|
756
756
|
const X = document.createRange();
|
|
757
757
|
X.setStartAfter(U), X.collapse(!0);
|
|
758
758
|
const B = window.getSelection();
|
|
@@ -973,7 +973,7 @@ const fr = ({
|
|
|
973
973
|
}, hr = (e, t) => ({
|
|
974
974
|
classGroupId: e,
|
|
975
975
|
validator: t
|
|
976
|
-
}),
|
|
976
|
+
}), gt = (e = /* @__PURE__ */ new Map(), t = null, r) => ({
|
|
977
977
|
nextPart: e,
|
|
978
978
|
validators: t,
|
|
979
979
|
classGroupId: r
|
|
@@ -1024,7 +1024,7 @@ const fr = ({
|
|
|
1024
1024
|
} = e;
|
|
1025
1025
|
return kr(r, t);
|
|
1026
1026
|
}, kr = (e, t) => {
|
|
1027
|
-
const r =
|
|
1027
|
+
const r = gt();
|
|
1028
1028
|
for (const n in e) {
|
|
1029
1029
|
const a = e[n];
|
|
1030
1030
|
We(a, r, n, t);
|
|
@@ -1067,7 +1067,7 @@ const fr = ({
|
|
|
1067
1067
|
for (let c = 0; c < a; c++) {
|
|
1068
1068
|
const l = n[c];
|
|
1069
1069
|
let s = r.nextPart.get(l);
|
|
1070
|
-
s || (s =
|
|
1070
|
+
s || (s = gt(), r.nextPart.set(l, s)), r = s;
|
|
1071
1071
|
}
|
|
1072
1072
|
return r;
|
|
1073
1073
|
}, Rr = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Ar = (e) => {
|
|
@@ -1237,12 +1237,12 @@ const fr = ({
|
|
|
1237
1237
|
}, Mr = [], Y = (e) => {
|
|
1238
1238
|
const t = (r) => r[e] || Mr;
|
|
1239
1239
|
return t.isThemeGetter = !0, t;
|
|
1240
|
-
}, vt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, yt = /^\((?:(\w[\w-]*):)?(.+)\)$/i, qr = /^\d+\/\d+$/, Dr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Fr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ur = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, $r = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Br = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,
|
|
1240
|
+
}, vt = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, yt = /^\((?:(\w[\w-]*):)?(.+)\)$/i, qr = /^\d+\/\d+$/, Dr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Fr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ur = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, $r = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Br = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ge = (e) => qr.test(e), _ = (e) => !!e && !Number.isNaN(Number(e)), ue = (e) => !!e && Number.isInteger(Number(e)), Re = (e) => e.endsWith("%") && _(e.slice(0, -1)), ce = (e) => Dr.test(e), Gr = () => !0, Wr = (e) => (
|
|
1241
1241
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
1242
1242
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
1243
1243
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
1244
1244
|
Fr.test(e) && !Ur.test(e)
|
|
1245
|
-
), wt = () => !1, Hr = (e) => $r.test(e), Vr = (e) => Br.test(e), Yr = (e) => !b(e) && !h(e), Jr = (e) => be(e, jt, wt), b = (e) => vt.test(e),
|
|
1245
|
+
), wt = () => !1, Hr = (e) => $r.test(e), Vr = (e) => Br.test(e), Yr = (e) => !b(e) && !h(e), Jr = (e) => be(e, jt, wt), b = (e) => vt.test(e), pe = (e) => be(e, Ct, Wr), Ae = (e) => be(e, en, _), Qe = (e) => be(e, kt, wt), Kr = (e) => be(e, Tt, Vr), Te = (e) => be(e, St, Hr), h = (e) => yt.test(e), ye = (e) => he(e, Ct), Xr = (e) => he(e, tn), Ze = (e) => he(e, kt), Qr = (e) => he(e, jt), Zr = (e) => he(e, Tt), je = (e) => he(e, St, !0), be = (e, t, r) => {
|
|
1246
1246
|
const n = vt.exec(e);
|
|
1247
1247
|
return n ? n[1] ? t(n[1]) : r(n[2]) : !1;
|
|
1248
1248
|
}, he = (e, t, r = !1) => {
|
|
@@ -1267,15 +1267,15 @@ const fr = ({
|
|
|
1267
1267
|
"bottom-left",
|
|
1268
1268
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
1269
1269
|
"left-bottom"
|
|
1270
|
-
], V = () => [...N(), h, b], G = () => ["auto", "hidden", "clip", "visible", "scroll"], J = () => ["auto", "contain", "none"], x = () => [h, b, m], P = () => [
|
|
1270
|
+
], V = () => [...N(), h, b], G = () => ["auto", "hidden", "clip", "visible", "scroll"], J = () => ["auto", "contain", "none"], x = () => [h, b, m], P = () => [ge, "full", "auto", ...x()], d = () => [ue, "none", "subgrid", h, b], v = () => ["auto", {
|
|
1271
1271
|
span: ["full", ue, h, b]
|
|
1272
|
-
}, ue, h, b], T = () => [ue, "auto", h, b], u = () => ["auto", "min", "max", "fr", h, b], j = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], A = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], D = () => ["auto", ...x()], U = () => [
|
|
1272
|
+
}, ue, h, b], T = () => [ue, "auto", h, b], u = () => ["auto", "min", "max", "fr", h, b], j = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], A = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], D = () => ["auto", ...x()], U = () => [ge, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...x()], g = () => [e, h, b], X = () => [...N(), Ze, Qe, {
|
|
1273
1273
|
position: [h, b]
|
|
1274
1274
|
}], B = () => ["no-repeat", {
|
|
1275
1275
|
repeat: ["", "x", "y", "space", "round"]
|
|
1276
1276
|
}], o = () => ["auto", "cover", "contain", Qr, Jr, {
|
|
1277
1277
|
size: [h, b]
|
|
1278
|
-
}], y = () => [Re, ye,
|
|
1278
|
+
}], y = () => [Re, ye, pe], w = () => [
|
|
1279
1279
|
// Deprecated since Tailwind CSS v4.0.0
|
|
1280
1280
|
"",
|
|
1281
1281
|
"none",
|
|
@@ -1283,14 +1283,14 @@ const fr = ({
|
|
|
1283
1283
|
f,
|
|
1284
1284
|
h,
|
|
1285
1285
|
b
|
|
1286
|
-
], C = () => ["", _, ye,
|
|
1286
|
+
], C = () => ["", _, ye, pe], Z = () => ["solid", "dashed", "dotted", "double"], ne = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], E = () => [_, Re, Ze, Qe], Q = () => [
|
|
1287
1287
|
// Deprecated since Tailwind CSS v4.0.0
|
|
1288
1288
|
"",
|
|
1289
1289
|
"none",
|
|
1290
1290
|
S,
|
|
1291
1291
|
h,
|
|
1292
1292
|
b
|
|
1293
|
-
], te = () => ["none", _, h, b], oe = () => ["none", _, h, b], le = () => [_, h, b], O = () => [
|
|
1293
|
+
], te = () => ["none", _, h, b], oe = () => ["none", _, h, b], le = () => [_, h, b], O = () => [ge, "full", ...x()];
|
|
1294
1294
|
return {
|
|
1295
1295
|
cacheSize: 500,
|
|
1296
1296
|
theme: {
|
|
@@ -1323,7 +1323,7 @@ const fr = ({
|
|
|
1323
1323
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
1324
1324
|
*/
|
|
1325
1325
|
aspect: [{
|
|
1326
|
-
aspect: ["auto", "square",
|
|
1326
|
+
aspect: ["auto", "square", ge, b, h, z]
|
|
1327
1327
|
}],
|
|
1328
1328
|
/**
|
|
1329
1329
|
* Container
|
|
@@ -1546,7 +1546,7 @@ const fr = ({
|
|
|
1546
1546
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
1547
1547
|
*/
|
|
1548
1548
|
basis: [{
|
|
1549
|
-
basis: [
|
|
1549
|
+
basis: [ge, "full", "auto", s, ...x()]
|
|
1550
1550
|
}],
|
|
1551
1551
|
/**
|
|
1552
1552
|
* Flex Direction
|
|
@@ -1567,7 +1567,7 @@ const fr = ({
|
|
|
1567
1567
|
* @see https://tailwindcss.com/docs/flex
|
|
1568
1568
|
*/
|
|
1569
1569
|
flex: [{
|
|
1570
|
-
flex: [_,
|
|
1570
|
+
flex: [_, ge, "auto", "initial", "none", b]
|
|
1571
1571
|
}],
|
|
1572
1572
|
/**
|
|
1573
1573
|
* Flex Grow
|
|
@@ -1983,7 +1983,7 @@ const fr = ({
|
|
|
1983
1983
|
* @see https://tailwindcss.com/docs/font-size
|
|
1984
1984
|
*/
|
|
1985
1985
|
"font-size": [{
|
|
1986
|
-
text: ["base", r, ye,
|
|
1986
|
+
text: ["base", r, ye, pe]
|
|
1987
1987
|
}],
|
|
1988
1988
|
/**
|
|
1989
1989
|
* Font Smoothing
|
|
@@ -2105,14 +2105,14 @@ const fr = ({
|
|
|
2105
2105
|
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
2106
2106
|
*/
|
|
2107
2107
|
"placeholder-color": [{
|
|
2108
|
-
placeholder:
|
|
2108
|
+
placeholder: g()
|
|
2109
2109
|
}],
|
|
2110
2110
|
/**
|
|
2111
2111
|
* Text Color
|
|
2112
2112
|
* @see https://tailwindcss.com/docs/text-color
|
|
2113
2113
|
*/
|
|
2114
2114
|
"text-color": [{
|
|
2115
|
-
text:
|
|
2115
|
+
text: g()
|
|
2116
2116
|
}],
|
|
2117
2117
|
/**
|
|
2118
2118
|
* Text Decoration
|
|
@@ -2131,14 +2131,14 @@ const fr = ({
|
|
|
2131
2131
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
2132
2132
|
*/
|
|
2133
2133
|
"text-decoration-thickness": [{
|
|
2134
|
-
decoration: [_, "from-font", "auto", h,
|
|
2134
|
+
decoration: [_, "from-font", "auto", h, pe]
|
|
2135
2135
|
}],
|
|
2136
2136
|
/**
|
|
2137
2137
|
* Text Decoration Color
|
|
2138
2138
|
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
2139
2139
|
*/
|
|
2140
2140
|
"text-decoration-color": [{
|
|
2141
|
-
decoration:
|
|
2141
|
+
decoration: g()
|
|
2142
2142
|
}],
|
|
2143
2143
|
/**
|
|
2144
2144
|
* Text Underline Offset
|
|
@@ -2276,7 +2276,7 @@ const fr = ({
|
|
|
2276
2276
|
* @see https://tailwindcss.com/docs/background-color
|
|
2277
2277
|
*/
|
|
2278
2278
|
"bg-color": [{
|
|
2279
|
-
bg:
|
|
2279
|
+
bg: g()
|
|
2280
2280
|
}],
|
|
2281
2281
|
/**
|
|
2282
2282
|
* Gradient Color Stops From Position
|
|
@@ -2304,21 +2304,21 @@ const fr = ({
|
|
|
2304
2304
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2305
2305
|
*/
|
|
2306
2306
|
"gradient-from": [{
|
|
2307
|
-
from:
|
|
2307
|
+
from: g()
|
|
2308
2308
|
}],
|
|
2309
2309
|
/**
|
|
2310
2310
|
* Gradient Color Stops Via
|
|
2311
2311
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2312
2312
|
*/
|
|
2313
2313
|
"gradient-via": [{
|
|
2314
|
-
via:
|
|
2314
|
+
via: g()
|
|
2315
2315
|
}],
|
|
2316
2316
|
/**
|
|
2317
2317
|
* Gradient Color Stops To
|
|
2318
2318
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2319
2319
|
*/
|
|
2320
2320
|
"gradient-to": [{
|
|
2321
|
-
to:
|
|
2321
|
+
to: g()
|
|
2322
2322
|
}],
|
|
2323
2323
|
// ---------------
|
|
2324
2324
|
// --- Borders ---
|
|
@@ -2534,70 +2534,70 @@ const fr = ({
|
|
|
2534
2534
|
* @see https://tailwindcss.com/docs/border-color
|
|
2535
2535
|
*/
|
|
2536
2536
|
"border-color": [{
|
|
2537
|
-
border:
|
|
2537
|
+
border: g()
|
|
2538
2538
|
}],
|
|
2539
2539
|
/**
|
|
2540
2540
|
* Border Color X
|
|
2541
2541
|
* @see https://tailwindcss.com/docs/border-color
|
|
2542
2542
|
*/
|
|
2543
2543
|
"border-color-x": [{
|
|
2544
|
-
"border-x":
|
|
2544
|
+
"border-x": g()
|
|
2545
2545
|
}],
|
|
2546
2546
|
/**
|
|
2547
2547
|
* Border Color Y
|
|
2548
2548
|
* @see https://tailwindcss.com/docs/border-color
|
|
2549
2549
|
*/
|
|
2550
2550
|
"border-color-y": [{
|
|
2551
|
-
"border-y":
|
|
2551
|
+
"border-y": g()
|
|
2552
2552
|
}],
|
|
2553
2553
|
/**
|
|
2554
2554
|
* Border Color S
|
|
2555
2555
|
* @see https://tailwindcss.com/docs/border-color
|
|
2556
2556
|
*/
|
|
2557
2557
|
"border-color-s": [{
|
|
2558
|
-
"border-s":
|
|
2558
|
+
"border-s": g()
|
|
2559
2559
|
}],
|
|
2560
2560
|
/**
|
|
2561
2561
|
* Border Color E
|
|
2562
2562
|
* @see https://tailwindcss.com/docs/border-color
|
|
2563
2563
|
*/
|
|
2564
2564
|
"border-color-e": [{
|
|
2565
|
-
"border-e":
|
|
2565
|
+
"border-e": g()
|
|
2566
2566
|
}],
|
|
2567
2567
|
/**
|
|
2568
2568
|
* Border Color Top
|
|
2569
2569
|
* @see https://tailwindcss.com/docs/border-color
|
|
2570
2570
|
*/
|
|
2571
2571
|
"border-color-t": [{
|
|
2572
|
-
"border-t":
|
|
2572
|
+
"border-t": g()
|
|
2573
2573
|
}],
|
|
2574
2574
|
/**
|
|
2575
2575
|
* Border Color Right
|
|
2576
2576
|
* @see https://tailwindcss.com/docs/border-color
|
|
2577
2577
|
*/
|
|
2578
2578
|
"border-color-r": [{
|
|
2579
|
-
"border-r":
|
|
2579
|
+
"border-r": g()
|
|
2580
2580
|
}],
|
|
2581
2581
|
/**
|
|
2582
2582
|
* Border Color Bottom
|
|
2583
2583
|
* @see https://tailwindcss.com/docs/border-color
|
|
2584
2584
|
*/
|
|
2585
2585
|
"border-color-b": [{
|
|
2586
|
-
"border-b":
|
|
2586
|
+
"border-b": g()
|
|
2587
2587
|
}],
|
|
2588
2588
|
/**
|
|
2589
2589
|
* Border Color Left
|
|
2590
2590
|
* @see https://tailwindcss.com/docs/border-color
|
|
2591
2591
|
*/
|
|
2592
2592
|
"border-color-l": [{
|
|
2593
|
-
"border-l":
|
|
2593
|
+
"border-l": g()
|
|
2594
2594
|
}],
|
|
2595
2595
|
/**
|
|
2596
2596
|
* Divide Color
|
|
2597
2597
|
* @see https://tailwindcss.com/docs/divide-color
|
|
2598
2598
|
*/
|
|
2599
2599
|
"divide-color": [{
|
|
2600
|
-
divide:
|
|
2600
|
+
divide: g()
|
|
2601
2601
|
}],
|
|
2602
2602
|
/**
|
|
2603
2603
|
* Outline Style
|
|
@@ -2618,14 +2618,14 @@ const fr = ({
|
|
|
2618
2618
|
* @see https://tailwindcss.com/docs/outline-width
|
|
2619
2619
|
*/
|
|
2620
2620
|
"outline-w": [{
|
|
2621
|
-
outline: ["", _, ye,
|
|
2621
|
+
outline: ["", _, ye, pe]
|
|
2622
2622
|
}],
|
|
2623
2623
|
/**
|
|
2624
2624
|
* Outline Color
|
|
2625
2625
|
* @see https://tailwindcss.com/docs/outline-color
|
|
2626
2626
|
*/
|
|
2627
2627
|
"outline-color": [{
|
|
2628
|
-
outline:
|
|
2628
|
+
outline: g()
|
|
2629
2629
|
}],
|
|
2630
2630
|
// ---------------
|
|
2631
2631
|
// --- Effects ---
|
|
@@ -2649,7 +2649,7 @@ const fr = ({
|
|
|
2649
2649
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
2650
2650
|
*/
|
|
2651
2651
|
"shadow-color": [{
|
|
2652
|
-
shadow:
|
|
2652
|
+
shadow: g()
|
|
2653
2653
|
}],
|
|
2654
2654
|
/**
|
|
2655
2655
|
* Inset Box Shadow
|
|
@@ -2663,7 +2663,7 @@ const fr = ({
|
|
|
2663
2663
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
2664
2664
|
*/
|
|
2665
2665
|
"inset-shadow-color": [{
|
|
2666
|
-
"inset-shadow":
|
|
2666
|
+
"inset-shadow": g()
|
|
2667
2667
|
}],
|
|
2668
2668
|
/**
|
|
2669
2669
|
* Ring Width
|
|
@@ -2684,7 +2684,7 @@ const fr = ({
|
|
|
2684
2684
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
2685
2685
|
*/
|
|
2686
2686
|
"ring-color": [{
|
|
2687
|
-
ring:
|
|
2687
|
+
ring: g()
|
|
2688
2688
|
}],
|
|
2689
2689
|
/**
|
|
2690
2690
|
* Ring Offset Width
|
|
@@ -2693,7 +2693,7 @@ const fr = ({
|
|
|
2693
2693
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2694
2694
|
*/
|
|
2695
2695
|
"ring-offset-w": [{
|
|
2696
|
-
"ring-offset": [_,
|
|
2696
|
+
"ring-offset": [_, pe]
|
|
2697
2697
|
}],
|
|
2698
2698
|
/**
|
|
2699
2699
|
* Ring Offset Color
|
|
@@ -2702,7 +2702,7 @@ const fr = ({
|
|
|
2702
2702
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2703
2703
|
*/
|
|
2704
2704
|
"ring-offset-color": [{
|
|
2705
|
-
"ring-offset":
|
|
2705
|
+
"ring-offset": g()
|
|
2706
2706
|
}],
|
|
2707
2707
|
/**
|
|
2708
2708
|
* Inset Ring Width
|
|
@@ -2716,7 +2716,7 @@ const fr = ({
|
|
|
2716
2716
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
2717
2717
|
*/
|
|
2718
2718
|
"inset-ring-color": [{
|
|
2719
|
-
"inset-ring":
|
|
2719
|
+
"inset-ring": g()
|
|
2720
2720
|
}],
|
|
2721
2721
|
/**
|
|
2722
2722
|
* Text Shadow
|
|
@@ -2730,7 +2730,7 @@ const fr = ({
|
|
|
2730
2730
|
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
2731
2731
|
*/
|
|
2732
2732
|
"text-shadow-color": [{
|
|
2733
|
-
"text-shadow":
|
|
2733
|
+
"text-shadow": g()
|
|
2734
2734
|
}],
|
|
2735
2735
|
/**
|
|
2736
2736
|
* Opacity
|
|
@@ -2781,10 +2781,10 @@ const fr = ({
|
|
|
2781
2781
|
"mask-linear-to": E()
|
|
2782
2782
|
}],
|
|
2783
2783
|
"mask-image-linear-from-color": [{
|
|
2784
|
-
"mask-linear-from":
|
|
2784
|
+
"mask-linear-from": g()
|
|
2785
2785
|
}],
|
|
2786
2786
|
"mask-image-linear-to-color": [{
|
|
2787
|
-
"mask-linear-to":
|
|
2787
|
+
"mask-linear-to": g()
|
|
2788
2788
|
}],
|
|
2789
2789
|
"mask-image-t-from-pos": [{
|
|
2790
2790
|
"mask-t-from": E()
|
|
@@ -2793,10 +2793,10 @@ const fr = ({
|
|
|
2793
2793
|
"mask-t-to": E()
|
|
2794
2794
|
}],
|
|
2795
2795
|
"mask-image-t-from-color": [{
|
|
2796
|
-
"mask-t-from":
|
|
2796
|
+
"mask-t-from": g()
|
|
2797
2797
|
}],
|
|
2798
2798
|
"mask-image-t-to-color": [{
|
|
2799
|
-
"mask-t-to":
|
|
2799
|
+
"mask-t-to": g()
|
|
2800
2800
|
}],
|
|
2801
2801
|
"mask-image-r-from-pos": [{
|
|
2802
2802
|
"mask-r-from": E()
|
|
@@ -2805,10 +2805,10 @@ const fr = ({
|
|
|
2805
2805
|
"mask-r-to": E()
|
|
2806
2806
|
}],
|
|
2807
2807
|
"mask-image-r-from-color": [{
|
|
2808
|
-
"mask-r-from":
|
|
2808
|
+
"mask-r-from": g()
|
|
2809
2809
|
}],
|
|
2810
2810
|
"mask-image-r-to-color": [{
|
|
2811
|
-
"mask-r-to":
|
|
2811
|
+
"mask-r-to": g()
|
|
2812
2812
|
}],
|
|
2813
2813
|
"mask-image-b-from-pos": [{
|
|
2814
2814
|
"mask-b-from": E()
|
|
@@ -2817,10 +2817,10 @@ const fr = ({
|
|
|
2817
2817
|
"mask-b-to": E()
|
|
2818
2818
|
}],
|
|
2819
2819
|
"mask-image-b-from-color": [{
|
|
2820
|
-
"mask-b-from":
|
|
2820
|
+
"mask-b-from": g()
|
|
2821
2821
|
}],
|
|
2822
2822
|
"mask-image-b-to-color": [{
|
|
2823
|
-
"mask-b-to":
|
|
2823
|
+
"mask-b-to": g()
|
|
2824
2824
|
}],
|
|
2825
2825
|
"mask-image-l-from-pos": [{
|
|
2826
2826
|
"mask-l-from": E()
|
|
@@ -2829,10 +2829,10 @@ const fr = ({
|
|
|
2829
2829
|
"mask-l-to": E()
|
|
2830
2830
|
}],
|
|
2831
2831
|
"mask-image-l-from-color": [{
|
|
2832
|
-
"mask-l-from":
|
|
2832
|
+
"mask-l-from": g()
|
|
2833
2833
|
}],
|
|
2834
2834
|
"mask-image-l-to-color": [{
|
|
2835
|
-
"mask-l-to":
|
|
2835
|
+
"mask-l-to": g()
|
|
2836
2836
|
}],
|
|
2837
2837
|
"mask-image-x-from-pos": [{
|
|
2838
2838
|
"mask-x-from": E()
|
|
@@ -2841,10 +2841,10 @@ const fr = ({
|
|
|
2841
2841
|
"mask-x-to": E()
|
|
2842
2842
|
}],
|
|
2843
2843
|
"mask-image-x-from-color": [{
|
|
2844
|
-
"mask-x-from":
|
|
2844
|
+
"mask-x-from": g()
|
|
2845
2845
|
}],
|
|
2846
2846
|
"mask-image-x-to-color": [{
|
|
2847
|
-
"mask-x-to":
|
|
2847
|
+
"mask-x-to": g()
|
|
2848
2848
|
}],
|
|
2849
2849
|
"mask-image-y-from-pos": [{
|
|
2850
2850
|
"mask-y-from": E()
|
|
@@ -2853,10 +2853,10 @@ const fr = ({
|
|
|
2853
2853
|
"mask-y-to": E()
|
|
2854
2854
|
}],
|
|
2855
2855
|
"mask-image-y-from-color": [{
|
|
2856
|
-
"mask-y-from":
|
|
2856
|
+
"mask-y-from": g()
|
|
2857
2857
|
}],
|
|
2858
2858
|
"mask-image-y-to-color": [{
|
|
2859
|
-
"mask-y-to":
|
|
2859
|
+
"mask-y-to": g()
|
|
2860
2860
|
}],
|
|
2861
2861
|
"mask-image-radial": [{
|
|
2862
2862
|
"mask-radial": [h, b]
|
|
@@ -2868,10 +2868,10 @@ const fr = ({
|
|
|
2868
2868
|
"mask-radial-to": E()
|
|
2869
2869
|
}],
|
|
2870
2870
|
"mask-image-radial-from-color": [{
|
|
2871
|
-
"mask-radial-from":
|
|
2871
|
+
"mask-radial-from": g()
|
|
2872
2872
|
}],
|
|
2873
2873
|
"mask-image-radial-to-color": [{
|
|
2874
|
-
"mask-radial-to":
|
|
2874
|
+
"mask-radial-to": g()
|
|
2875
2875
|
}],
|
|
2876
2876
|
"mask-image-radial-shape": [{
|
|
2877
2877
|
"mask-radial": ["circle", "ellipse"]
|
|
@@ -2895,10 +2895,10 @@ const fr = ({
|
|
|
2895
2895
|
"mask-conic-to": E()
|
|
2896
2896
|
}],
|
|
2897
2897
|
"mask-image-conic-from-color": [{
|
|
2898
|
-
"mask-conic-from":
|
|
2898
|
+
"mask-conic-from": g()
|
|
2899
2899
|
}],
|
|
2900
2900
|
"mask-image-conic-to-color": [{
|
|
2901
|
-
"mask-conic-to":
|
|
2901
|
+
"mask-conic-to": g()
|
|
2902
2902
|
}],
|
|
2903
2903
|
/**
|
|
2904
2904
|
* Mask Mode
|
|
@@ -3005,7 +3005,7 @@ const fr = ({
|
|
|
3005
3005
|
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
3006
3006
|
*/
|
|
3007
3007
|
"drop-shadow-color": [{
|
|
3008
|
-
"drop-shadow":
|
|
3008
|
+
"drop-shadow": g()
|
|
3009
3009
|
}],
|
|
3010
3010
|
/**
|
|
3011
3011
|
* Grayscale
|
|
@@ -3376,7 +3376,7 @@ const fr = ({
|
|
|
3376
3376
|
* @see https://tailwindcss.com/docs/accent-color
|
|
3377
3377
|
*/
|
|
3378
3378
|
accent: [{
|
|
3379
|
-
accent:
|
|
3379
|
+
accent: g()
|
|
3380
3380
|
}],
|
|
3381
3381
|
/**
|
|
3382
3382
|
* Appearance
|
|
@@ -3390,7 +3390,7 @@ const fr = ({
|
|
|
3390
3390
|
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
3391
3391
|
*/
|
|
3392
3392
|
"caret-color": [{
|
|
3393
|
-
caret:
|
|
3393
|
+
caret: g()
|
|
3394
3394
|
}],
|
|
3395
3395
|
/**
|
|
3396
3396
|
* Color Scheme
|
|
@@ -3636,21 +3636,21 @@ const fr = ({
|
|
|
3636
3636
|
* @see https://tailwindcss.com/docs/fill
|
|
3637
3637
|
*/
|
|
3638
3638
|
fill: [{
|
|
3639
|
-
fill: ["none", ...
|
|
3639
|
+
fill: ["none", ...g()]
|
|
3640
3640
|
}],
|
|
3641
3641
|
/**
|
|
3642
3642
|
* Stroke Width
|
|
3643
3643
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
3644
3644
|
*/
|
|
3645
3645
|
"stroke-w": [{
|
|
3646
|
-
stroke: [_, ye,
|
|
3646
|
+
stroke: [_, ye, pe, Ae]
|
|
3647
3647
|
}],
|
|
3648
3648
|
/**
|
|
3649
3649
|
* Stroke
|
|
3650
3650
|
* @see https://tailwindcss.com/docs/stroke
|
|
3651
3651
|
*/
|
|
3652
3652
|
stroke: [{
|
|
3653
|
-
stroke: ["none", ...
|
|
3653
|
+
stroke: ["none", ...g()]
|
|
3654
3654
|
}],
|
|
3655
3655
|
// ---------------------
|
|
3656
3656
|
// --- Accessibility ---
|
|
@@ -3844,7 +3844,7 @@ function fn() {
|
|
|
3844
3844
|
return Fe = e, Fe;
|
|
3845
3845
|
}
|
|
3846
3846
|
var Ue, ut;
|
|
3847
|
-
function
|
|
3847
|
+
function pn() {
|
|
3848
3848
|
if (ut) return Ue;
|
|
3849
3849
|
ut = 1;
|
|
3850
3850
|
var e = mn(), t = fn(), r = "[object Symbol]";
|
|
@@ -3854,10 +3854,10 @@ function gn() {
|
|
|
3854
3854
|
return Ue = n, Ue;
|
|
3855
3855
|
}
|
|
3856
3856
|
var $e, mt;
|
|
3857
|
-
function
|
|
3857
|
+
function gn() {
|
|
3858
3858
|
if (mt) return $e;
|
|
3859
3859
|
mt = 1;
|
|
3860
|
-
var e = cn(), t = At(), r =
|
|
3860
|
+
var e = cn(), t = At(), r = pn(), n = NaN, a = /^[-+]0x[0-9a-f]+$/i, c = /^0b[01]+$/i, l = /^0o[0-7]+$/i, s = parseInt;
|
|
3861
3861
|
function m(f) {
|
|
3862
3862
|
if (typeof f == "number")
|
|
3863
3863
|
return f;
|
|
@@ -3879,7 +3879,7 @@ var Be, ft;
|
|
|
3879
3879
|
function bn() {
|
|
3880
3880
|
if (ft) return Be;
|
|
3881
3881
|
ft = 1;
|
|
3882
|
-
var e = At(), t = an(), r =
|
|
3882
|
+
var e = At(), t = an(), r = gn(), n = "Expected a function", a = Math.max, c = Math.min;
|
|
3883
3883
|
function l(s, m, f) {
|
|
3884
3884
|
var R, L, M, q, S, F, z = 0, H = !1, $ = !1, k = !0;
|
|
3885
3885
|
if (typeof s != "function")
|
|
@@ -3971,13 +3971,13 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
3971
3971
|
handleDrop: u,
|
|
3972
3972
|
insertImage: j,
|
|
3973
3973
|
uploadPendingImages: A
|
|
3974
|
-
} =
|
|
3974
|
+
} = gr({
|
|
3975
3975
|
initialContent: e,
|
|
3976
3976
|
onImageUpload: f,
|
|
3977
3977
|
imageUploadEndpoint: R,
|
|
3978
3978
|
allowedImageTypes: L,
|
|
3979
3979
|
maxImageSize: M
|
|
3980
|
-
}), D = re(null), U = re(!1),
|
|
3980
|
+
}), D = re(null), U = re(!1), g = re(null), [X, B] = ee(!1), [o, y] = ee(""), [w, C] = ee(!1), [Z, ne] = ee(0), E = re(null), Q = re(t), te = re(k.content), oe = re(k.title);
|
|
3981
3981
|
me(() => {
|
|
3982
3982
|
Q.current = t;
|
|
3983
3983
|
}, [t]), Ot($, () => ({
|
|
@@ -3988,23 +3988,23 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
3988
3988
|
focus: () => {
|
|
3989
3989
|
if (N.current) {
|
|
3990
3990
|
N.current.focus();
|
|
3991
|
-
const
|
|
3992
|
-
|
|
3991
|
+
const p = document.createRange();
|
|
3992
|
+
p.selectNodeContents(N.current), p.collapse(!1);
|
|
3993
3993
|
const K = window.getSelection();
|
|
3994
|
-
K?.removeAllRanges(), K?.addRange(
|
|
3994
|
+
K?.removeAllRanges(), K?.addRange(p);
|
|
3995
3995
|
}
|
|
3996
3996
|
},
|
|
3997
|
-
insertText: (
|
|
3998
|
-
N.current && (document.execCommand("insertText", !1,
|
|
3997
|
+
insertText: (p) => {
|
|
3998
|
+
N.current && (document.execCommand("insertText", !1, p), V(N.current.innerHTML));
|
|
3999
3999
|
},
|
|
4000
|
-
insertHTML: (
|
|
4001
|
-
N.current && (document.execCommand("insertHTML", !1,
|
|
4000
|
+
insertHTML: (p) => {
|
|
4001
|
+
N.current && (document.execCommand("insertHTML", !1, p), V(N.current.innerHTML));
|
|
4002
4002
|
},
|
|
4003
|
-
setHTML: (
|
|
4004
|
-
v(
|
|
4003
|
+
setHTML: (p) => {
|
|
4004
|
+
v(p);
|
|
4005
4005
|
},
|
|
4006
|
-
executeCommand: (
|
|
4007
|
-
J(
|
|
4006
|
+
executeCommand: (p, K) => {
|
|
4007
|
+
J(p, K);
|
|
4008
4008
|
}
|
|
4009
4009
|
})), me(() => {
|
|
4010
4010
|
q && N.current && !U.current && (q(N.current), U.current = !0);
|
|
@@ -4012,23 +4012,23 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4012
4012
|
H && N.current && !a && setTimeout(() => {
|
|
4013
4013
|
if (N.current) {
|
|
4014
4014
|
N.current.focus();
|
|
4015
|
-
const
|
|
4016
|
-
|
|
4015
|
+
const p = document.createRange();
|
|
4016
|
+
p.selectNodeContents(N.current), p.collapse(!1);
|
|
4017
4017
|
const K = window.getSelection();
|
|
4018
|
-
K?.removeAllRanges(), K?.addRange(
|
|
4018
|
+
K?.removeAllRanges(), K?.addRange(p);
|
|
4019
4019
|
}
|
|
4020
4020
|
}, 100);
|
|
4021
|
-
}, [H, a, N]), me(() => (
|
|
4022
|
-
(
|
|
4023
|
-
Q.current?.(
|
|
4021
|
+
}, [H, a, N]), me(() => (g.current = xn(
|
|
4022
|
+
(p, K, ae) => {
|
|
4023
|
+
Q.current?.(p, K, ae);
|
|
4024
4024
|
},
|
|
4025
4025
|
S
|
|
4026
4026
|
), () => {
|
|
4027
|
-
|
|
4027
|
+
g.current && g.current.cancel();
|
|
4028
4028
|
}), [S]), me(() => {
|
|
4029
4029
|
if (!Q.current || k.content === te.current && k.title === oe.current)
|
|
4030
4030
|
return;
|
|
4031
|
-
const
|
|
4031
|
+
const p = (() => {
|
|
4032
4032
|
try {
|
|
4033
4033
|
return P({
|
|
4034
4034
|
includeStyles: !1,
|
|
@@ -4038,11 +4038,11 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4038
4038
|
return `<!DOCTYPE html><html><body>${k.content}</body></html>`;
|
|
4039
4039
|
}
|
|
4040
4040
|
})();
|
|
4041
|
-
te.current = k.content, oe.current = k.title, S > 0 &&
|
|
4041
|
+
te.current = k.content, oe.current = k.title, S > 0 && g.current ? g.current(
|
|
4042
4042
|
k.content,
|
|
4043
|
-
|
|
4043
|
+
p,
|
|
4044
4044
|
k.title
|
|
4045
|
-
) : Q.current(k.content,
|
|
4045
|
+
) : Q.current(k.content, p, k.title);
|
|
4046
4046
|
}, [
|
|
4047
4047
|
k.content,
|
|
4048
4048
|
k.title,
|
|
@@ -4050,7 +4050,7 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4050
4050
|
S
|
|
4051
4051
|
]);
|
|
4052
4052
|
const le = W(async () => {
|
|
4053
|
-
if (
|
|
4053
|
+
if (g.current && g.current.flush?.(), k.pendingImages.length > 0) {
|
|
4054
4054
|
C(!0);
|
|
4055
4055
|
try {
|
|
4056
4056
|
await A(), y("Images uploaded successfully!"), setTimeout(() => y(""), 3e3);
|
|
@@ -4063,9 +4063,9 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4063
4063
|
C(!1);
|
|
4064
4064
|
}
|
|
4065
4065
|
}
|
|
4066
|
-
const
|
|
4067
|
-
if (!
|
|
4068
|
-
y(
|
|
4066
|
+
const p = x();
|
|
4067
|
+
if (!p.success) {
|
|
4068
|
+
y(p.error || "Please fix validation errors before saving."), B(!0), setTimeout(() => {
|
|
4069
4069
|
B(!1), y("");
|
|
4070
4070
|
}, 3e3);
|
|
4071
4071
|
return;
|
|
@@ -4086,20 +4086,20 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4086
4086
|
P,
|
|
4087
4087
|
r
|
|
4088
4088
|
]), O = W(async () => {
|
|
4089
|
-
if (
|
|
4089
|
+
if (g.current && g.current.flush?.(), k.pendingImages.length > 0) {
|
|
4090
4090
|
C(!0);
|
|
4091
4091
|
try {
|
|
4092
4092
|
await A();
|
|
4093
|
-
} catch (
|
|
4094
|
-
console.error("Failed to upload images:",
|
|
4093
|
+
} catch (p) {
|
|
4094
|
+
console.error("Failed to upload images:", p);
|
|
4095
4095
|
} finally {
|
|
4096
4096
|
C(!1);
|
|
4097
4097
|
}
|
|
4098
4098
|
}
|
|
4099
4099
|
try {
|
|
4100
|
-
const
|
|
4101
|
-
n?.(
|
|
4102
|
-
const K = new Blob([
|
|
4100
|
+
const p = P();
|
|
4101
|
+
n?.(p);
|
|
4102
|
+
const K = new Blob([p], { type: "text/html" }), ae = URL.createObjectURL(K), fe = document.createElement("a");
|
|
4103
4103
|
fe.href = ae, fe.download = `${k.title.replace(/[^\w\s]/gi, "").replace(/\s+/g, "_") || "document"}.html`, document.body.appendChild(fe), fe.click(), document.body.removeChild(fe), URL.revokeObjectURL(ae), y("Document exported successfully!"), B(!0), setTimeout(() => {
|
|
4104
4104
|
B(!1), y("");
|
|
4105
4105
|
}, 2e3);
|
|
@@ -4109,13 +4109,13 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4109
4109
|
}, 3e3);
|
|
4110
4110
|
}
|
|
4111
4111
|
}, [k, A, P, n]), I = W(
|
|
4112
|
-
(
|
|
4113
|
-
V(
|
|
4112
|
+
(p) => {
|
|
4113
|
+
V(p);
|
|
4114
4114
|
},
|
|
4115
4115
|
[V]
|
|
4116
|
-
), de = async (
|
|
4117
|
-
if (!
|
|
4118
|
-
const K = Array.from(
|
|
4116
|
+
), de = async (p) => {
|
|
4117
|
+
if (!p.target.files || a) return;
|
|
4118
|
+
const K = Array.from(p.target.files);
|
|
4119
4119
|
let ae = 0;
|
|
4120
4120
|
const fe = K.length;
|
|
4121
4121
|
for (const Nt of K)
|
|
@@ -4124,18 +4124,18 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4124
4124
|
} catch (It) {
|
|
4125
4125
|
console.error("Failed to insert image:", It);
|
|
4126
4126
|
}
|
|
4127
|
-
ne(0),
|
|
4127
|
+
ne(0), p.target.value = "";
|
|
4128
4128
|
}, se = W(() => {
|
|
4129
4129
|
a || N.current && N.current.focus();
|
|
4130
|
-
}, [a, N]), ie = W((
|
|
4131
|
-
(
|
|
4130
|
+
}, [a, N]), ie = W((p) => {
|
|
4131
|
+
(p.ctrlKey || p.metaKey) && p.key === "s" && (p.preventDefault(), le()), (p.ctrlKey || p.metaKey) && p.key === "e" && (p.preventDefault(), O()), (p.ctrlKey || p.metaKey) && p.key === "k" && p.shiftKey && (p.preventDefault(), d());
|
|
4132
4132
|
}, [le, O, d]);
|
|
4133
4133
|
return /* @__PURE__ */ i.jsxs(
|
|
4134
4134
|
"div",
|
|
4135
4135
|
{
|
|
4136
4136
|
ref: E,
|
|
4137
4137
|
className: Ee(
|
|
4138
|
-
"relative w-full bg-white border border-gray-300 rounded-lg overflow-hidden flex flex-col",
|
|
4138
|
+
"text-editor relative w-full bg-white border border-gray-300 rounded-lg overflow-hidden flex flex-col",
|
|
4139
4139
|
a && "pointer-events-none opacity-80",
|
|
4140
4140
|
F
|
|
4141
4141
|
),
|
|
@@ -4147,7 +4147,7 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4147
4147
|
{
|
|
4148
4148
|
className: "w-full text-xl md:text-2xl font-bold bg-transparent outline-none placeholder:text-gray-400",
|
|
4149
4149
|
value: k.title,
|
|
4150
|
-
onChange: (
|
|
4150
|
+
onChange: (p) => G(p.target.value),
|
|
4151
4151
|
placeholder: "Document Title",
|
|
4152
4152
|
readOnly: a,
|
|
4153
4153
|
maxLength: 100
|
|
@@ -4206,15 +4206,15 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4206
4206
|
{
|
|
4207
4207
|
ref: N,
|
|
4208
4208
|
className: Ee(
|
|
4209
|
-
"flex-1 p-4 md:p-6 outline-none overflow-y-auto min-h-[200px] bg-transparent z-10",
|
|
4209
|
+
"editor-content flex-1 p-4 md:p-6 outline-none overflow-y-auto min-h-[200px] bg-transparent z-10",
|
|
4210
4210
|
a ? "cursor-default select-text" : "cursor-text"
|
|
4211
4211
|
),
|
|
4212
4212
|
contentEditable: !a,
|
|
4213
4213
|
suppressContentEditableWarning: !0,
|
|
4214
|
-
onInput: (
|
|
4214
|
+
onInput: (p) => I(p.currentTarget.innerHTML),
|
|
4215
4215
|
onPaste: T,
|
|
4216
4216
|
onDrop: u,
|
|
4217
|
-
onDragOver: (
|
|
4217
|
+
onDragOver: (p) => p.preventDefault(),
|
|
4218
4218
|
onClick: se,
|
|
4219
4219
|
onKeyDown: ie,
|
|
4220
4220
|
"data-placeholder": z,
|
|
@@ -4245,7 +4245,7 @@ const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
|
4245
4245
|
)
|
|
4246
4246
|
] }),
|
|
4247
4247
|
s && /* @__PURE__ */ i.jsx(
|
|
4248
|
-
|
|
4248
|
+
pr,
|
|
4249
4249
|
{
|
|
4250
4250
|
wordCount: k.wordCount,
|
|
4251
4251
|
characterCount: k.characterCount,
|