@abduljebar/text-editor 2.4.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +564 -564
- package/dist/Reproduction.d.ts +2 -0
- package/dist/Reproduction.d.ts.map +1 -0
- package/dist/components/TextEditor.d.ts +1 -0
- package/dist/components/TextEditor.d.ts.map +1 -1
- package/dist/hooks/useTextEditor.d.ts +1 -0
- package/dist/hooks/useTextEditor.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1157 -1150
- package/dist/index.umd.cjs +13 -13
- package/package.json +84 -84
- package/dist/demo.jpg +0 -1
package/dist/index.js
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Save as
|
|
3
|
-
var
|
|
4
|
-
function
|
|
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 gt, 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
|
+
var we = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
|
+
function cr(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
11
|
-
|
|
7
|
+
var ke = { exports: {} }, xe = {};
|
|
8
|
+
var He;
|
|
9
|
+
function dr() {
|
|
10
|
+
if (He) return xe;
|
|
11
|
+
He = 1;
|
|
12
12
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
13
|
-
function r(n,
|
|
14
|
-
var
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
for (var
|
|
18
|
-
|
|
19
|
-
} else
|
|
20
|
-
return
|
|
13
|
+
function r(n, a, c) {
|
|
14
|
+
var l = null;
|
|
15
|
+
if (c !== void 0 && (l = "" + c), a.key !== void 0 && (l = "" + a.key), "key" in a) {
|
|
16
|
+
c = {};
|
|
17
|
+
for (var s in a)
|
|
18
|
+
s !== "key" && (c[s] = a[s]);
|
|
19
|
+
} else c = a;
|
|
20
|
+
return a = c.ref, {
|
|
21
21
|
$$typeof: e,
|
|
22
22
|
type: n,
|
|
23
|
-
key:
|
|
24
|
-
ref:
|
|
25
|
-
props:
|
|
23
|
+
key: l,
|
|
24
|
+
ref: a !== void 0 ? a : null,
|
|
25
|
+
props: c
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return xe.Fragment = t, xe.jsx = r, xe.jsxs = r, xe;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var ve = {};
|
|
31
31
|
var Ve;
|
|
32
|
-
function
|
|
32
|
+
function ur() {
|
|
33
33
|
return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
34
34
|
function e(o) {
|
|
35
35
|
if (o == null) return null;
|
|
36
36
|
if (typeof o == "function")
|
|
37
|
-
return o.$$typeof ===
|
|
37
|
+
return o.$$typeof === v ? null : o.displayName || o.name || null;
|
|
38
38
|
if (typeof o == "string") return o;
|
|
39
39
|
switch (o) {
|
|
40
|
-
case
|
|
40
|
+
case z:
|
|
41
41
|
return "Fragment";
|
|
42
|
-
case
|
|
42
|
+
case $:
|
|
43
43
|
return "Profiler";
|
|
44
|
-
case
|
|
44
|
+
case H:
|
|
45
45
|
return "StrictMode";
|
|
46
46
|
case G:
|
|
47
47
|
return "Suspense";
|
|
48
48
|
case J:
|
|
49
49
|
return "SuspenseList";
|
|
50
|
-
case
|
|
50
|
+
case d:
|
|
51
51
|
return "Activity";
|
|
52
52
|
}
|
|
53
53
|
if (typeof o == "object")
|
|
54
54
|
switch (typeof o.tag == "number" && console.error(
|
|
55
55
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
56
56
|
), o.$$typeof) {
|
|
57
|
-
case
|
|
57
|
+
case F:
|
|
58
58
|
return "Portal";
|
|
59
|
-
case
|
|
59
|
+
case N:
|
|
60
60
|
return o.displayName || "Context";
|
|
61
|
-
case
|
|
61
|
+
case k:
|
|
62
62
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
63
|
-
case
|
|
64
|
-
var
|
|
65
|
-
return o = o.displayName, o || (o =
|
|
66
|
-
case
|
|
67
|
-
return
|
|
68
|
-
case
|
|
69
|
-
|
|
63
|
+
case V:
|
|
64
|
+
var y = o.render;
|
|
65
|
+
return o = o.displayName, o || (o = y.displayName || y.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
66
|
+
case x:
|
|
67
|
+
return y = o.displayName || null, y !== null ? y : e(o.type) || "Memo";
|
|
68
|
+
case P:
|
|
69
|
+
y = o._payload, o = o._init;
|
|
70
70
|
try {
|
|
71
|
-
return e(o(
|
|
71
|
+
return e(o(y));
|
|
72
72
|
} catch {
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -80,50 +80,50 @@ function lr() {
|
|
|
80
80
|
function r(o) {
|
|
81
81
|
try {
|
|
82
82
|
t(o);
|
|
83
|
-
var
|
|
83
|
+
var y = !1;
|
|
84
84
|
} catch {
|
|
85
|
-
|
|
85
|
+
y = !0;
|
|
86
86
|
}
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
var w =
|
|
87
|
+
if (y) {
|
|
88
|
+
y = console;
|
|
89
|
+
var w = y.error, C = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
90
90
|
return w.call(
|
|
91
|
-
|
|
91
|
+
y,
|
|
92
92
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
93
93
|
C
|
|
94
94
|
), t(o);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
function n(o) {
|
|
98
|
-
if (o ===
|
|
99
|
-
if (typeof o == "object" && o !== null && o.$$typeof ===
|
|
98
|
+
if (o === z) return "<>";
|
|
99
|
+
if (typeof o == "object" && o !== null && o.$$typeof === P)
|
|
100
100
|
return "<...>";
|
|
101
101
|
try {
|
|
102
|
-
var
|
|
103
|
-
return
|
|
102
|
+
var y = e(o);
|
|
103
|
+
return y ? "<" + y + ">" : "<...>";
|
|
104
104
|
} catch {
|
|
105
105
|
return "<...>";
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
var o =
|
|
108
|
+
function a() {
|
|
109
|
+
var o = T.A;
|
|
110
110
|
return o === null ? null : o.getOwner();
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function c() {
|
|
113
113
|
return Error("react-stack-top-frame");
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
if (
|
|
117
|
-
var
|
|
118
|
-
if (
|
|
115
|
+
function l(o) {
|
|
116
|
+
if (u.call(o, "key")) {
|
|
117
|
+
var y = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
118
|
+
if (y && y.isReactWarning) return !1;
|
|
119
119
|
}
|
|
120
120
|
return o.key !== void 0;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function s(o, y) {
|
|
123
123
|
function w() {
|
|
124
|
-
|
|
124
|
+
D || (D = !0, console.error(
|
|
125
125
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
126
|
-
|
|
126
|
+
y
|
|
127
127
|
));
|
|
128
128
|
}
|
|
129
129
|
w.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
@@ -133,19 +133,19 @@ function lr() {
|
|
|
133
133
|
}
|
|
134
134
|
function m() {
|
|
135
135
|
var o = e(this.type);
|
|
136
|
-
return
|
|
136
|
+
return U[o] || (U[o] = !0, console.error(
|
|
137
137
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
138
138
|
)), o = this.props.ref, o !== void 0 ? o : null;
|
|
139
139
|
}
|
|
140
|
-
function f(o,
|
|
141
|
-
var
|
|
140
|
+
function f(o, y, w, C, Z, ne) {
|
|
141
|
+
var E = w.ref;
|
|
142
142
|
return o = {
|
|
143
143
|
$$typeof: S,
|
|
144
144
|
type: o,
|
|
145
|
-
key:
|
|
145
|
+
key: y,
|
|
146
146
|
props: w,
|
|
147
147
|
_owner: C
|
|
148
|
-
}, (
|
|
148
|
+
}, (E !== void 0 ? E : null) !== null ? Object.defineProperty(o, "ref", {
|
|
149
149
|
enumerable: !1,
|
|
150
150
|
get: m
|
|
151
151
|
}) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
@@ -167,28 +167,28 @@ function lr() {
|
|
|
167
167
|
configurable: !1,
|
|
168
168
|
enumerable: !1,
|
|
169
169
|
writable: !0,
|
|
170
|
-
value:
|
|
170
|
+
value: ne
|
|
171
171
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
var
|
|
175
|
-
if (
|
|
173
|
+
function R(o, y, w, C, Z, ne) {
|
|
174
|
+
var E = y.children;
|
|
175
|
+
if (E !== void 0)
|
|
176
176
|
if (C)
|
|
177
|
-
if (E
|
|
178
|
-
for (C = 0; C <
|
|
179
|
-
|
|
180
|
-
Object.freeze && Object.freeze(
|
|
177
|
+
if (j(E)) {
|
|
178
|
+
for (C = 0; C < E.length; C++)
|
|
179
|
+
L(E[C]);
|
|
180
|
+
Object.freeze && Object.freeze(E);
|
|
181
181
|
} else
|
|
182
182
|
console.error(
|
|
183
183
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
184
184
|
);
|
|
185
|
-
else
|
|
186
|
-
if (
|
|
187
|
-
|
|
188
|
-
var Q = Object.keys(
|
|
189
|
-
return
|
|
185
|
+
else L(E);
|
|
186
|
+
if (u.call(y, "key")) {
|
|
187
|
+
E = e(o);
|
|
188
|
+
var Q = Object.keys(y).filter(function(oe) {
|
|
189
|
+
return oe !== "key";
|
|
190
190
|
});
|
|
191
|
-
C = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
191
|
+
C = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", B[E + C] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
192
192
|
`A props object containing a "key" prop is being spread into JSX:
|
|
193
193
|
let props = %s;
|
|
194
194
|
<%s {...props} />
|
|
@@ -196,35 +196,35 @@ React keys must be passed directly to JSX without using spread:
|
|
|
196
196
|
let props = %s;
|
|
197
197
|
<%s key={someKey} {...props} />`,
|
|
198
198
|
C,
|
|
199
|
-
|
|
199
|
+
E,
|
|
200
200
|
Q,
|
|
201
|
-
|
|
202
|
-
),
|
|
201
|
+
E
|
|
202
|
+
), B[E + C] = !0);
|
|
203
203
|
}
|
|
204
|
-
if (
|
|
204
|
+
if (E = null, w !== void 0 && (r(w), E = "" + w), l(y) && (r(y.key), E = "" + y.key), "key" in y) {
|
|
205
205
|
w = {};
|
|
206
|
-
for (var
|
|
207
|
-
|
|
208
|
-
} else w =
|
|
209
|
-
return
|
|
206
|
+
for (var te in y)
|
|
207
|
+
te !== "key" && (w[te] = y[te]);
|
|
208
|
+
} else w = y;
|
|
209
|
+
return E && s(
|
|
210
210
|
w,
|
|
211
211
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
212
212
|
), f(
|
|
213
213
|
o,
|
|
214
|
-
|
|
214
|
+
E,
|
|
215
215
|
w,
|
|
216
|
-
|
|
216
|
+
a(),
|
|
217
217
|
Z,
|
|
218
|
-
|
|
218
|
+
ne
|
|
219
219
|
);
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
|
|
221
|
+
function L(o) {
|
|
222
|
+
M(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === P && (o._payload.status === "fulfilled" ? M(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function M(o) {
|
|
225
225
|
return typeof o == "object" && o !== null && o.$$typeof === S;
|
|
226
226
|
}
|
|
227
|
-
var q =
|
|
227
|
+
var q = Lt, S = /* @__PURE__ */ Symbol.for("react.transitional.element"), F = /* @__PURE__ */ Symbol.for("react.portal"), z = /* @__PURE__ */ Symbol.for("react.fragment"), H = /* @__PURE__ */ Symbol.for("react.strict_mode"), $ = /* @__PURE__ */ Symbol.for("react.profiler"), k = /* @__PURE__ */ Symbol.for("react.consumer"), N = /* @__PURE__ */ Symbol.for("react.context"), V = /* @__PURE__ */ Symbol.for("react.forward_ref"), G = /* @__PURE__ */ Symbol.for("react.suspense"), J = /* @__PURE__ */ Symbol.for("react.suspense_list"), x = /* @__PURE__ */ Symbol.for("react.memo"), P = /* @__PURE__ */ Symbol.for("react.lazy"), d = /* @__PURE__ */ Symbol.for("react.activity"), v = /* @__PURE__ */ Symbol.for("react.client.reference"), T = q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, u = Object.prototype.hasOwnProperty, j = Array.isArray, A = console.createTask ? console.createTask : function() {
|
|
228
228
|
return null;
|
|
229
229
|
};
|
|
230
230
|
q = {
|
|
@@ -232,325 +232,325 @@ React keys must be passed directly to JSX without using spread:
|
|
|
232
232
|
return o();
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
var
|
|
235
|
+
var D, U = {}, p = q.react_stack_bottom_frame.bind(
|
|
236
236
|
q,
|
|
237
|
-
|
|
238
|
-
)(),
|
|
239
|
-
|
|
240
|
-
var C = 1e4 >
|
|
241
|
-
return
|
|
237
|
+
c
|
|
238
|
+
)(), X = A(n(c)), B = {};
|
|
239
|
+
ve.Fragment = z, ve.jsx = function(o, y, w) {
|
|
240
|
+
var C = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
241
|
+
return R(
|
|
242
242
|
o,
|
|
243
|
-
|
|
243
|
+
y,
|
|
244
244
|
w,
|
|
245
245
|
!1,
|
|
246
|
-
C ? Error("react-stack-top-frame") :
|
|
247
|
-
C ?
|
|
246
|
+
C ? Error("react-stack-top-frame") : p,
|
|
247
|
+
C ? A(n(o)) : X
|
|
248
248
|
);
|
|
249
|
-
},
|
|
250
|
-
var C = 1e4 >
|
|
251
|
-
return
|
|
249
|
+
}, ve.jsxs = function(o, y, w) {
|
|
250
|
+
var C = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
251
|
+
return R(
|
|
252
252
|
o,
|
|
253
|
-
|
|
253
|
+
y,
|
|
254
254
|
w,
|
|
255
255
|
!0,
|
|
256
|
-
C ? Error("react-stack-top-frame") :
|
|
257
|
-
C ?
|
|
256
|
+
C ? Error("react-stack-top-frame") : p,
|
|
257
|
+
C ? A(n(o)) : X
|
|
258
258
|
);
|
|
259
259
|
};
|
|
260
|
-
})()),
|
|
260
|
+
})()), ve;
|
|
261
261
|
}
|
|
262
|
-
var
|
|
263
|
-
function
|
|
264
|
-
return
|
|
262
|
+
var Ye;
|
|
263
|
+
function mr() {
|
|
264
|
+
return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? ke.exports = dr() : ke.exports = ur()), ke.exports;
|
|
265
265
|
}
|
|
266
|
-
var i =
|
|
267
|
-
const
|
|
266
|
+
var i = mr();
|
|
267
|
+
const fr = ({
|
|
268
268
|
onCommand: e,
|
|
269
269
|
onSave: t,
|
|
270
270
|
onExport: r,
|
|
271
271
|
onClear: n,
|
|
272
|
-
onImageUpload:
|
|
273
|
-
showButtons:
|
|
274
|
-
hasUnsavedChanges:
|
|
275
|
-
pendingImagesCount:
|
|
272
|
+
onImageUpload: a,
|
|
273
|
+
showButtons: c = !1,
|
|
274
|
+
hasUnsavedChanges: l,
|
|
275
|
+
pendingImagesCount: s = 0
|
|
276
276
|
}) => {
|
|
277
|
-
const [m, f] = ee([]), [
|
|
277
|
+
const [m, f] = ee([]), [R, L] = ee("p"), [M, q] = ee(!1), [S, F] = ee(!1), [z, H] = ee(!1), [$, k] = ee(!1), [N, V] = ee(!1), [G, J] = ee(!1), [x, P] = ee("left"), d = re(null), v = W(() => {
|
|
278
278
|
if (typeof window > "u" || typeof document > "u") return;
|
|
279
279
|
const O = window.getSelection();
|
|
280
280
|
if (!O || O.rangeCount === 0 || O.isCollapsed)
|
|
281
281
|
return;
|
|
282
|
-
const
|
|
283
|
-
q(document.queryCommandState("bold")),
|
|
284
|
-
let
|
|
285
|
-
for (;
|
|
286
|
-
if (
|
|
287
|
-
const
|
|
288
|
-
if (["h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "blockquote", "pre"].includes(
|
|
289
|
-
["h1", "h2"].includes(
|
|
282
|
+
const de = O.getRangeAt(0).commonAncestorContainer;
|
|
283
|
+
q(document.queryCommandState("bold")), F(document.queryCommandState("italic")), H(document.queryCommandState("underline")), k(document.queryCommandState("strikeThrough")), V(document.queryCommandState("insertUnorderedList")), J(document.queryCommandState("insertOrderedList")), document.queryCommandState("justifyLeft") ? P("left") : document.queryCommandState("justifyCenter") ? P("center") : document.queryCommandState("justifyRight") && P("right");
|
|
284
|
+
let se = de, ie = "p";
|
|
285
|
+
for (; se && se !== document.body; ) {
|
|
286
|
+
if (se.nodeType === Node.ELEMENT_NODE) {
|
|
287
|
+
const ae = se.tagName.toLowerCase();
|
|
288
|
+
if (["h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "blockquote", "pre"].includes(ae)) {
|
|
289
|
+
["h1", "h2"].includes(ae) && (ie = ae);
|
|
290
290
|
break;
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
|
|
293
|
+
se = se.parentNode;
|
|
294
294
|
}
|
|
295
|
-
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
}, [
|
|
299
|
-
|
|
295
|
+
L(ie);
|
|
296
|
+
const g = [];
|
|
297
|
+
M && g.push("bold"), S && g.push("italic"), z && g.push("underline"), $ && g.push("strikeThrough"), N && g.push("insertUnorderedList"), G && g.push("insertOrderedList"), x === "left" && g.push("justifyLeft"), x === "center" && g.push("justifyCenter"), x === "right" && g.push("justifyRight"), (ie === "h1" || ie === "h2") && g.push(`formatBlock:${ie}`), f(g);
|
|
298
|
+
}, [M, S, z, $, N, G, x]);
|
|
299
|
+
me(() => {
|
|
300
300
|
const O = () => {
|
|
301
|
-
requestAnimationFrame(
|
|
302
|
-
},
|
|
303
|
-
setTimeout(
|
|
304
|
-
},
|
|
305
|
-
setTimeout(
|
|
301
|
+
requestAnimationFrame(v);
|
|
302
|
+
}, I = () => {
|
|
303
|
+
setTimeout(v, 10);
|
|
304
|
+
}, de = () => {
|
|
305
|
+
setTimeout(v, 10);
|
|
306
306
|
};
|
|
307
|
-
return document.addEventListener("selectionchange", O), document.addEventListener("mouseup",
|
|
308
|
-
document.removeEventListener("selectionchange", O), document.removeEventListener("mouseup",
|
|
307
|
+
return document.addEventListener("selectionchange", O), document.addEventListener("mouseup", I), document.addEventListener("keyup", de), v(), () => {
|
|
308
|
+
document.removeEventListener("selectionchange", O), document.removeEventListener("mouseup", I), document.removeEventListener("keyup", de);
|
|
309
309
|
};
|
|
310
|
-
}, [
|
|
311
|
-
const
|
|
310
|
+
}, [v]);
|
|
311
|
+
const T = () => {
|
|
312
312
|
const O = prompt("Enter URL:", "https://");
|
|
313
313
|
O && e("createLink", O);
|
|
314
|
-
},
|
|
315
|
-
|
|
316
|
-
},
|
|
314
|
+
}, u = () => {
|
|
315
|
+
a();
|
|
316
|
+
}, j = (O) => {
|
|
317
317
|
e("formatBlock", O);
|
|
318
|
-
},
|
|
318
|
+
}, A = () => {
|
|
319
319
|
e("indent");
|
|
320
|
-
},
|
|
320
|
+
}, D = () => {
|
|
321
321
|
e("outdent");
|
|
322
|
-
},
|
|
322
|
+
}, U = () => {
|
|
323
323
|
e("undo");
|
|
324
|
-
},
|
|
324
|
+
}, p = () => {
|
|
325
325
|
e("redo");
|
|
326
|
-
},
|
|
326
|
+
}, X = () => {
|
|
327
327
|
e("formatBlock", "pre");
|
|
328
|
-
},
|
|
328
|
+
}, B = () => {
|
|
329
329
|
e("formatBlock", "blockquote");
|
|
330
330
|
}, o = () => {
|
|
331
331
|
e("superscript");
|
|
332
|
-
},
|
|
332
|
+
}, y = () => {
|
|
333
333
|
e("subscript");
|
|
334
334
|
}, w = [
|
|
335
335
|
{
|
|
336
336
|
id: "undo",
|
|
337
337
|
command: "undo",
|
|
338
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
338
|
+
icon: /* @__PURE__ */ i.jsx(qt, { size: 18 }),
|
|
339
339
|
title: "Undo",
|
|
340
|
-
onClick:
|
|
340
|
+
onClick: U
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
343
|
id: "redo",
|
|
344
344
|
command: "redo",
|
|
345
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
345
|
+
icon: /* @__PURE__ */ i.jsx(Dt, { size: 18 }),
|
|
346
346
|
title: "Redo",
|
|
347
|
-
onClick:
|
|
347
|
+
onClick: p
|
|
348
348
|
},
|
|
349
349
|
{ id: "separator-1", separator: !0 },
|
|
350
350
|
{
|
|
351
351
|
id: "bold",
|
|
352
352
|
command: "bold",
|
|
353
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
353
|
+
icon: /* @__PURE__ */ i.jsx(Ft, { size: 18 }),
|
|
354
354
|
title: "Bold (Ctrl+B)",
|
|
355
|
-
isActive:
|
|
355
|
+
isActive: M
|
|
356
356
|
},
|
|
357
357
|
{
|
|
358
358
|
id: "italic",
|
|
359
359
|
command: "italic",
|
|
360
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
360
|
+
icon: /* @__PURE__ */ i.jsx(Ut, { size: 18 }),
|
|
361
361
|
title: "Italic (Ctrl+I)",
|
|
362
362
|
isActive: S
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
365
|
id: "underline",
|
|
366
366
|
command: "underline",
|
|
367
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
367
|
+
icon: /* @__PURE__ */ i.jsx($t, { size: 18 }),
|
|
368
368
|
title: "Underline (Ctrl+U)",
|
|
369
|
-
isActive:
|
|
369
|
+
isActive: z
|
|
370
370
|
},
|
|
371
371
|
{
|
|
372
372
|
id: "strikeThrough",
|
|
373
373
|
command: "strikeThrough",
|
|
374
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
374
|
+
icon: /* @__PURE__ */ i.jsx(Bt, { size: 18 }),
|
|
375
375
|
title: "Strikethrough",
|
|
376
|
-
isActive:
|
|
376
|
+
isActive: $
|
|
377
377
|
},
|
|
378
378
|
{ id: "separator-2", separator: !0 },
|
|
379
379
|
{
|
|
380
380
|
id: "heading-1",
|
|
381
381
|
command: "formatBlock",
|
|
382
382
|
value: "h1",
|
|
383
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
383
|
+
icon: /* @__PURE__ */ i.jsx(Gt, { size: 18 }),
|
|
384
384
|
title: "Heading 1",
|
|
385
|
-
isActive:
|
|
385
|
+
isActive: R === "h1"
|
|
386
386
|
},
|
|
387
387
|
{
|
|
388
388
|
id: "heading-2",
|
|
389
389
|
command: "formatBlock",
|
|
390
390
|
value: "h2",
|
|
391
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
391
|
+
icon: /* @__PURE__ */ i.jsx(Wt, { size: 18 }),
|
|
392
392
|
title: "Heading 2",
|
|
393
|
-
isActive:
|
|
393
|
+
isActive: R === "h2"
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
396
|
id: "paragraph",
|
|
397
397
|
command: "formatBlock",
|
|
398
398
|
value: "p",
|
|
399
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
399
|
+
icon: /* @__PURE__ */ i.jsx(Ht, { size: 18 }),
|
|
400
400
|
title: "Paragraph",
|
|
401
|
-
isActive:
|
|
401
|
+
isActive: R === "p"
|
|
402
402
|
},
|
|
403
403
|
{
|
|
404
404
|
id: "code",
|
|
405
405
|
command: "formatBlock",
|
|
406
406
|
value: "pre",
|
|
407
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
407
|
+
icon: /* @__PURE__ */ i.jsx(Vt, { size: 18 }),
|
|
408
408
|
title: "Code Block",
|
|
409
|
-
onClick:
|
|
409
|
+
onClick: X
|
|
410
410
|
},
|
|
411
411
|
{
|
|
412
412
|
id: "quote",
|
|
413
413
|
command: "formatBlock",
|
|
414
414
|
value: "blockquote",
|
|
415
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
415
|
+
icon: /* @__PURE__ */ i.jsx(Yt, { size: 18 }),
|
|
416
416
|
title: "Blockquote",
|
|
417
|
-
onClick:
|
|
417
|
+
onClick: B
|
|
418
418
|
},
|
|
419
419
|
{ id: "separator-3", separator: !0 },
|
|
420
420
|
{
|
|
421
421
|
id: "unordered-list",
|
|
422
422
|
command: "insertUnorderedList",
|
|
423
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
423
|
+
icon: /* @__PURE__ */ i.jsx(Jt, { size: 18 }),
|
|
424
424
|
title: "Bullet List",
|
|
425
|
-
isActive:
|
|
425
|
+
isActive: N
|
|
426
426
|
},
|
|
427
427
|
{
|
|
428
428
|
id: "ordered-list",
|
|
429
429
|
command: "insertOrderedList",
|
|
430
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
430
|
+
icon: /* @__PURE__ */ i.jsx(Kt, { size: 18 }),
|
|
431
431
|
title: "Numbered List",
|
|
432
432
|
isActive: G
|
|
433
433
|
},
|
|
434
434
|
{
|
|
435
435
|
id: "indent",
|
|
436
436
|
command: "indent",
|
|
437
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
437
|
+
icon: /* @__PURE__ */ i.jsx(Xt, { size: 18 }),
|
|
438
438
|
title: "Indent",
|
|
439
|
-
onClick:
|
|
439
|
+
onClick: A
|
|
440
440
|
},
|
|
441
441
|
{
|
|
442
442
|
id: "outdent",
|
|
443
443
|
command: "outdent",
|
|
444
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
444
|
+
icon: /* @__PURE__ */ i.jsx(Qt, { size: 18 }),
|
|
445
445
|
title: "Outdent",
|
|
446
|
-
onClick:
|
|
446
|
+
onClick: D
|
|
447
447
|
},
|
|
448
448
|
{ id: "separator-4", separator: !0 },
|
|
449
449
|
{
|
|
450
450
|
id: "align-left",
|
|
451
451
|
command: "justifyLeft",
|
|
452
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
452
|
+
icon: /* @__PURE__ */ i.jsx(Zt, { size: 18 }),
|
|
453
453
|
title: "Align Left",
|
|
454
|
-
isActive:
|
|
454
|
+
isActive: x === "left"
|
|
455
455
|
},
|
|
456
456
|
{
|
|
457
457
|
id: "align-center",
|
|
458
458
|
command: "justifyCenter",
|
|
459
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
459
|
+
icon: /* @__PURE__ */ i.jsx(er, { size: 18 }),
|
|
460
460
|
title: "Center",
|
|
461
|
-
isActive:
|
|
461
|
+
isActive: x === "center"
|
|
462
462
|
},
|
|
463
463
|
{
|
|
464
464
|
id: "align-right",
|
|
465
465
|
command: "justifyRight",
|
|
466
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
466
|
+
icon: /* @__PURE__ */ i.jsx(tr, { size: 18 }),
|
|
467
467
|
title: "Align Right",
|
|
468
|
-
isActive:
|
|
468
|
+
isActive: x === "right"
|
|
469
469
|
},
|
|
470
470
|
{ id: "separator-5", separator: !0 },
|
|
471
471
|
{
|
|
472
472
|
id: "superscript",
|
|
473
473
|
command: "superscript",
|
|
474
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
474
|
+
icon: /* @__PURE__ */ i.jsx(rr, { size: 18 }),
|
|
475
475
|
title: "Superscript",
|
|
476
476
|
onClick: o
|
|
477
477
|
},
|
|
478
478
|
{
|
|
479
479
|
id: "subscript",
|
|
480
480
|
command: "subscript",
|
|
481
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
481
|
+
icon: /* @__PURE__ */ i.jsx(nr, { size: 18 }),
|
|
482
482
|
title: "Subscript",
|
|
483
|
-
onClick:
|
|
483
|
+
onClick: y
|
|
484
484
|
},
|
|
485
485
|
{
|
|
486
486
|
id: "link",
|
|
487
487
|
command: "createLink",
|
|
488
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
488
|
+
icon: /* @__PURE__ */ i.jsx(or, { size: 18 }),
|
|
489
489
|
title: "Insert Link",
|
|
490
|
-
onClick:
|
|
490
|
+
onClick: T
|
|
491
491
|
},
|
|
492
492
|
{
|
|
493
493
|
id: "image",
|
|
494
494
|
command: "insertImage",
|
|
495
|
-
icon:
|
|
496
|
-
/* @__PURE__ */ i.jsx(
|
|
497
|
-
/* @__PURE__ */ i.jsx("span", { className: "absolute -top-2 -right-2 bg-blue-600 text-white text-xs rounded-full w-4 h-4 flex items-center justify-center", children:
|
|
498
|
-
] }) : /* @__PURE__ */ i.jsx(
|
|
495
|
+
icon: s > 0 ? /* @__PURE__ */ i.jsxs("div", { className: "relative", children: [
|
|
496
|
+
/* @__PURE__ */ i.jsx(Ce, { size: 18 }),
|
|
497
|
+
/* @__PURE__ */ i.jsx("span", { className: "absolute -top-2 -right-2 bg-blue-600 text-white text-xs rounded-full w-4 h-4 flex items-center justify-center", children: s })
|
|
498
|
+
] }) : /* @__PURE__ */ i.jsx(Ce, { size: 18 }),
|
|
499
499
|
title: "Insert Image",
|
|
500
|
-
onClick:
|
|
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((
|
|
503
|
-
if (
|
|
504
|
-
return /* @__PURE__ */ i.jsx("div", { className: "w-px h-6 bg-gray-300 mx-2" },
|
|
505
|
-
const
|
|
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) => {
|
|
503
|
+
if (I.separator)
|
|
504
|
+
return /* @__PURE__ */ i.jsx("div", { className: "w-px h-6 bg-gray-300 mx-2" }, I.id);
|
|
505
|
+
const de = I.isActive !== void 0 ? I.isActive : I.command ? m.includes(I.command) || I.command === "formatBlock" && I.value === R : !1;
|
|
506
506
|
return /* @__PURE__ */ i.jsx(
|
|
507
507
|
"button",
|
|
508
508
|
{
|
|
509
|
-
onClick: (
|
|
510
|
-
|
|
511
|
-
const
|
|
512
|
-
|
|
509
|
+
onClick: (se) => {
|
|
510
|
+
se.preventDefault(), se.stopPropagation(), I.onClick ? I.onClick() : I.command === "formatBlock" && I.value ? j(I.value) : I.command && e(I.command, I.value), setTimeout(() => {
|
|
511
|
+
const ie = document.querySelector('[contenteditable="true"]');
|
|
512
|
+
ie && ie.focus();
|
|
513
513
|
}, 10);
|
|
514
514
|
},
|
|
515
|
-
title:
|
|
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 ${
|
|
518
|
-
disabled:
|
|
519
|
-
children:
|
|
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`,
|
|
518
|
+
disabled: I.disabled,
|
|
519
|
+
children: I.icon
|
|
520
520
|
},
|
|
521
|
-
|
|
521
|
+
I.id
|
|
522
522
|
);
|
|
523
|
-
}) }), Z = w.slice(0, 3),
|
|
523
|
+
}) }), Z = w.slice(0, 3), ne = w.slice(3, 10), E = w.slice(10, 16), Q = w.slice(16, 20), te = w.slice(20, 24), oe = w.slice(24, 28), le = w.slice(28);
|
|
524
524
|
return /* @__PURE__ */ i.jsxs(
|
|
525
525
|
"div",
|
|
526
526
|
{
|
|
527
|
-
ref:
|
|
527
|
+
ref: d,
|
|
528
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",
|
|
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),
|
|
532
|
-
C(oe),
|
|
533
|
-
C(R),
|
|
534
|
-
C(Q),
|
|
535
532
|
C(ne),
|
|
536
|
-
C(
|
|
537
|
-
C(
|
|
533
|
+
C(E),
|
|
534
|
+
C(Q),
|
|
535
|
+
C(te),
|
|
536
|
+
C(oe),
|
|
537
|
+
C(le)
|
|
538
538
|
] }),
|
|
539
|
-
|
|
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: [
|
|
540
540
|
/* @__PURE__ */ i.jsxs(
|
|
541
541
|
"button",
|
|
542
542
|
{
|
|
543
543
|
onClick: (O) => {
|
|
544
544
|
O.preventDefault(), O.stopPropagation(), t(), setTimeout(() => {
|
|
545
|
-
const
|
|
546
|
-
|
|
545
|
+
const I = document.querySelector('[contenteditable="true"]');
|
|
546
|
+
I && I.focus();
|
|
547
547
|
}, 10);
|
|
548
548
|
},
|
|
549
|
-
disabled: !
|
|
549
|
+
disabled: !l,
|
|
550
550
|
title: "Save Document (Ctrl+S)",
|
|
551
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",
|
|
552
552
|
children: [
|
|
553
|
-
/* @__PURE__ */ i.jsx(
|
|
553
|
+
/* @__PURE__ */ i.jsx(gt, { size: 16 }),
|
|
554
554
|
/* @__PURE__ */ i.jsx("span", { className: "hidden sm:inline", children: "Save" })
|
|
555
555
|
]
|
|
556
556
|
}
|
|
@@ -560,14 +560,14 @@ const dr = ({
|
|
|
560
560
|
{
|
|
561
561
|
onClick: (O) => {
|
|
562
562
|
O.preventDefault(), O.stopPropagation(), r(), setTimeout(() => {
|
|
563
|
-
const
|
|
564
|
-
|
|
563
|
+
const I = document.querySelector('[contenteditable="true"]');
|
|
564
|
+
I && I.focus();
|
|
565
565
|
}, 10);
|
|
566
566
|
},
|
|
567
567
|
title: "Export as HTML",
|
|
568
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",
|
|
569
569
|
children: [
|
|
570
|
-
/* @__PURE__ */ i.jsx(
|
|
570
|
+
/* @__PURE__ */ i.jsx(Pt, { size: 16 }),
|
|
571
571
|
/* @__PURE__ */ i.jsx("span", { className: "hidden sm:inline", children: "Export" })
|
|
572
572
|
]
|
|
573
573
|
}
|
|
@@ -577,28 +577,28 @@ const dr = ({
|
|
|
577
577
|
{
|
|
578
578
|
onClick: (O) => {
|
|
579
579
|
O.preventDefault(), O.stopPropagation(), n(), setTimeout(() => {
|
|
580
|
-
const
|
|
581
|
-
|
|
580
|
+
const I = document.querySelector('[contenteditable="true"]');
|
|
581
|
+
I && I.focus();
|
|
582
582
|
}, 10);
|
|
583
583
|
},
|
|
584
584
|
title: "Clear Editor",
|
|
585
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",
|
|
586
586
|
children: [
|
|
587
|
-
/* @__PURE__ */ i.jsx(
|
|
587
|
+
/* @__PURE__ */ i.jsx(Mt, { size: 16 }),
|
|
588
588
|
/* @__PURE__ */ i.jsx("span", { className: "hidden sm:inline", children: "Clear" })
|
|
589
589
|
]
|
|
590
590
|
}
|
|
591
591
|
)
|
|
592
592
|
] }),
|
|
593
593
|
/* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-3 text-sm text-gray-500 order-3 sm:order-2 mt-2 sm:mt-0 flex-shrink-0", children: [
|
|
594
|
-
|
|
595
|
-
/* @__PURE__ */ i.jsx(
|
|
594
|
+
s > 0 && /* @__PURE__ */ i.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
595
|
+
/* @__PURE__ */ i.jsx(Ce, { size: 14 }),
|
|
596
596
|
/* @__PURE__ */ i.jsxs("span", { children: [
|
|
597
|
-
|
|
597
|
+
s,
|
|
598
598
|
" pending"
|
|
599
599
|
] })
|
|
600
600
|
] }),
|
|
601
|
-
|
|
601
|
+
l && /* @__PURE__ */ i.jsxs("span", { className: "flex items-center gap-1 text-amber-600", children: [
|
|
602
602
|
/* @__PURE__ */ i.jsx("span", { className: "w-2 h-2 bg-amber-500 rounded-full animate-pulse" }),
|
|
603
603
|
/* @__PURE__ */ i.jsx("span", { children: "Unsaved changes" })
|
|
604
604
|
] })
|
|
@@ -606,7 +606,7 @@ const dr = ({
|
|
|
606
606
|
]
|
|
607
607
|
}
|
|
608
608
|
);
|
|
609
|
-
},
|
|
609
|
+
}, gr = ({
|
|
610
610
|
wordCount: e,
|
|
611
611
|
characterCount: t,
|
|
612
612
|
hasUnsavedChanges: r,
|
|
@@ -622,7 +622,7 @@ const dr = ({
|
|
|
622
622
|
/* @__PURE__ */ i.jsx("strong", { className: "text-gray-800", children: t })
|
|
623
623
|
] }),
|
|
624
624
|
n > 0 && /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
625
|
-
/* @__PURE__ */ i.jsx(
|
|
625
|
+
/* @__PURE__ */ i.jsx(Ce, { size: 14, className: "text-blue-600" }),
|
|
626
626
|
/* @__PURE__ */ i.jsxs("span", { className: "text-blue-600", children: [
|
|
627
627
|
n,
|
|
628
628
|
" image",
|
|
@@ -631,51 +631,51 @@ const dr = ({
|
|
|
631
631
|
] })
|
|
632
632
|
] }),
|
|
633
633
|
/* @__PURE__ */ i.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ i.jsxs("div", { className: `flex items-center gap-1 ${r ? "text-orange-600" : "text-green-600"}`, children: [
|
|
634
|
-
r && /* @__PURE__ */ i.jsx(
|
|
634
|
+
r && /* @__PURE__ */ i.jsx(gt, { size: 14, className: "animate-pulse" }),
|
|
635
635
|
/* @__PURE__ */ i.jsx("strong", { children: r ? "Unsaved Changes" : "Saved" })
|
|
636
636
|
] }) })
|
|
637
|
-
] }),
|
|
637
|
+
] }), pr = ({
|
|
638
638
|
initialContent: e = "",
|
|
639
639
|
onImageUpload: t,
|
|
640
640
|
imageUploadEndpoint: r,
|
|
641
641
|
allowedImageTypes: n = ["image/jpeg", "image/png", "image/gif", "image/webp"],
|
|
642
|
-
maxImageSize:
|
|
642
|
+
maxImageSize: a = 5 * 1024 * 1024
|
|
643
643
|
}) => {
|
|
644
|
-
const [
|
|
644
|
+
const [c, l] = ee({
|
|
645
645
|
content: e,
|
|
646
646
|
title: "Untitled Document",
|
|
647
647
|
wordCount: e.trim() ? e.trim().split(/\s+/).length : 0,
|
|
648
648
|
characterCount: e.length,
|
|
649
649
|
hasUnsavedChanges: !1,
|
|
650
650
|
pendingImages: []
|
|
651
|
-
}),
|
|
652
|
-
if (!
|
|
653
|
-
|
|
651
|
+
}), s = re(null), m = re(/* @__PURE__ */ new Map()), f = re(e), R = re(!0), L = W(() => {
|
|
652
|
+
if (!s.current) return;
|
|
653
|
+
s.current.focus();
|
|
654
654
|
const d = window.getSelection();
|
|
655
655
|
if (d && d.rangeCount > 0) {
|
|
656
|
-
const
|
|
657
|
-
if (
|
|
656
|
+
const u = d.getRangeAt(0);
|
|
657
|
+
if (s.current.contains(u.commonAncestorContainer))
|
|
658
658
|
return;
|
|
659
659
|
}
|
|
660
|
-
const
|
|
661
|
-
|
|
660
|
+
const v = document.createRange();
|
|
661
|
+
v.selectNodeContents(s.current), v.collapse(!1);
|
|
662
662
|
const T = window.getSelection();
|
|
663
|
-
T?.removeAllRanges(), T?.addRange(
|
|
664
|
-
}, []),
|
|
663
|
+
T?.removeAllRanges(), T?.addRange(v);
|
|
664
|
+
}, []), M = W(() => {
|
|
665
665
|
const d = window.getSelection();
|
|
666
|
-
if (!d || d.rangeCount === 0 || !
|
|
667
|
-
const
|
|
668
|
-
return
|
|
669
|
-
}, []), q =
|
|
670
|
-
if (!d || !
|
|
671
|
-
|
|
672
|
-
const
|
|
673
|
-
|
|
666
|
+
if (!d || d.rangeCount === 0 || !s.current) return null;
|
|
667
|
+
const v = d.getRangeAt(0);
|
|
668
|
+
return s.current.contains(v.commonAncestorContainer) ? v.cloneRange() : null;
|
|
669
|
+
}, []), q = W((d) => {
|
|
670
|
+
if (!d || !s.current) return;
|
|
671
|
+
s.current.focus();
|
|
672
|
+
const v = window.getSelection();
|
|
673
|
+
v?.removeAllRanges(), v?.addRange(d);
|
|
674
674
|
}, []);
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
}, [e]),
|
|
678
|
-
e !== f.current &&
|
|
675
|
+
me(() => {
|
|
676
|
+
s.current && R.current && (s.current.innerHTML = e || "", R.current = !1);
|
|
677
|
+
}, [e]), me(() => {
|
|
678
|
+
e !== f.current && s.current && (s.current.innerHTML !== e && (s.current.innerHTML = e), f.current = e, l((d) => ({
|
|
679
679
|
...d,
|
|
680
680
|
content: e,
|
|
681
681
|
wordCount: e.trim() ? e.trim().split(/\s+/).length : 0,
|
|
@@ -683,208 +683,208 @@ const dr = ({
|
|
|
683
683
|
hasUnsavedChanges: !1
|
|
684
684
|
})));
|
|
685
685
|
}, [e]);
|
|
686
|
-
const S =
|
|
687
|
-
const
|
|
688
|
-
|
|
689
|
-
...
|
|
686
|
+
const S = W((d) => {
|
|
687
|
+
const v = d.trim() ? d.trim().split(/\s+/).length : 0, T = d.length;
|
|
688
|
+
l((u) => ({
|
|
689
|
+
...u,
|
|
690
690
|
content: d,
|
|
691
|
-
wordCount:
|
|
691
|
+
wordCount: v,
|
|
692
692
|
characterCount: T,
|
|
693
693
|
hasUnsavedChanges: !0
|
|
694
694
|
})), f.current = d;
|
|
695
|
-
}, []),
|
|
696
|
-
|
|
697
|
-
...
|
|
695
|
+
}, []), F = W((d) => {
|
|
696
|
+
l((v) => ({
|
|
697
|
+
...v,
|
|
698
698
|
title: d,
|
|
699
699
|
hasUnsavedChanges: !0
|
|
700
700
|
}));
|
|
701
|
-
}, []),
|
|
702
|
-
if (!
|
|
703
|
-
const T =
|
|
704
|
-
if (
|
|
701
|
+
}, []), z = W((d, v) => {
|
|
702
|
+
if (!s.current) return;
|
|
703
|
+
const T = M();
|
|
704
|
+
if (s.current.focus(), T)
|
|
705
705
|
q(T);
|
|
706
706
|
else {
|
|
707
|
-
const
|
|
708
|
-
if (!
|
|
709
|
-
const
|
|
710
|
-
|
|
707
|
+
const u = window.getSelection();
|
|
708
|
+
if (!u || u.rangeCount === 0) {
|
|
709
|
+
const j = document.createRange();
|
|
710
|
+
j.selectNodeContents(s.current), j.collapse(!1), u?.removeAllRanges(), u?.addRange(j);
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
try {
|
|
714
|
-
let
|
|
715
|
-
if (d === "formatBlock" &&
|
|
716
|
-
|
|
717
|
-
else if (d === "createLink" &&
|
|
718
|
-
const
|
|
719
|
-
|
|
714
|
+
let u = !1;
|
|
715
|
+
if (d === "formatBlock" && v)
|
|
716
|
+
u = document.execCommand("formatBlock", !1, `<${v}>`);
|
|
717
|
+
else if (d === "createLink" && v) {
|
|
718
|
+
const j = window.getSelection();
|
|
719
|
+
j && !j.isCollapsed ? u = document.execCommand("createLink", !1, v) : (document.execCommand("insertHTML", !1, `<a href="${v}" target="_blank">${v}</a>`), u = !0);
|
|
720
720
|
} else
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
721
|
+
u = document.execCommand(d, !1, v);
|
|
722
|
+
u || console.warn(`Command ${d} failed to execute`), setTimeout(() => {
|
|
723
|
+
s.current && S(s.current.innerHTML);
|
|
724
724
|
}, 0);
|
|
725
|
-
} catch (
|
|
726
|
-
console.error(`Command ${d} failed:`,
|
|
725
|
+
} catch (u) {
|
|
726
|
+
console.error(`Command ${d} failed:`, u);
|
|
727
727
|
}
|
|
728
|
-
|
|
729
|
-
}, [S,
|
|
728
|
+
s.current.focus();
|
|
729
|
+
}, [S, M, q]), H = W((d) => n.includes(d.type) ? d.size > a ? {
|
|
730
730
|
valid: !1,
|
|
731
|
-
error: `File too large. Maximum size: ${Math.round(
|
|
731
|
+
error: `File too large. Maximum size: ${Math.round(a / (1024 * 1024))}MB`
|
|
732
732
|
} : { valid: !0 } : {
|
|
733
733
|
valid: !1,
|
|
734
734
|
error: `Invalid file type. Allowed types: ${n.join(", ")}`
|
|
735
|
-
}, [n,
|
|
736
|
-
const T =
|
|
735
|
+
}, [n, a]), $ = W(async (d, v = !0) => {
|
|
736
|
+
const T = H(d);
|
|
737
737
|
if (!T.valid) {
|
|
738
738
|
alert(T.error);
|
|
739
739
|
return;
|
|
740
740
|
}
|
|
741
|
-
if (!
|
|
742
|
-
const
|
|
743
|
-
|
|
744
|
-
const
|
|
745
|
-
m.current.set(
|
|
746
|
-
originalUrl:
|
|
741
|
+
if (!s.current) return;
|
|
742
|
+
const u = `image-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, j = new FileReader();
|
|
743
|
+
j.onload = (A) => {
|
|
744
|
+
const D = A.target?.result;
|
|
745
|
+
m.current.set(u, {
|
|
746
|
+
originalUrl: D,
|
|
747
747
|
fileName: d.name,
|
|
748
748
|
size: d.size,
|
|
749
749
|
type: d.type
|
|
750
750
|
});
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
|
|
756
|
-
const
|
|
757
|
-
|
|
758
|
-
const
|
|
759
|
-
|
|
751
|
+
const U = document.createElement("img");
|
|
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 p = M();
|
|
754
|
+
if (v && p) {
|
|
755
|
+
p.deleteContents(), p.insertNode(U);
|
|
756
|
+
const X = document.createRange();
|
|
757
|
+
X.setStartAfter(U), X.collapse(!0);
|
|
758
|
+
const B = window.getSelection();
|
|
759
|
+
B?.removeAllRanges(), B?.addRange(X);
|
|
760
760
|
} else
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
...
|
|
761
|
+
s.current?.appendChild(U);
|
|
762
|
+
s.current && S(s?.current?.innerHTML), (t || r) && l((X) => ({
|
|
763
|
+
...X,
|
|
764
764
|
pendingImages: [
|
|
765
|
-
...
|
|
765
|
+
...X.pendingImages,
|
|
766
766
|
{
|
|
767
|
-
id:
|
|
767
|
+
id: u,
|
|
768
768
|
file: d,
|
|
769
|
-
placeholderUrl:
|
|
769
|
+
placeholderUrl: D,
|
|
770
770
|
status: "pending"
|
|
771
771
|
}
|
|
772
772
|
]
|
|
773
|
-
})),
|
|
774
|
-
},
|
|
775
|
-
}, [
|
|
773
|
+
})), s.current?.focus();
|
|
774
|
+
}, j.readAsDataURL(d);
|
|
775
|
+
}, [H, S, t, r, M]), k = W(async () => {
|
|
776
776
|
if (!t && !r)
|
|
777
777
|
return;
|
|
778
|
-
const d =
|
|
778
|
+
const d = c.pendingImages.filter((v) => v.status === "pending");
|
|
779
779
|
if (d.length !== 0) {
|
|
780
|
-
for (const
|
|
780
|
+
for (const v of d)
|
|
781
781
|
try {
|
|
782
|
-
|
|
783
|
-
...
|
|
784
|
-
pendingImages:
|
|
785
|
-
(
|
|
782
|
+
l((j) => ({
|
|
783
|
+
...j,
|
|
784
|
+
pendingImages: j.pendingImages.map(
|
|
785
|
+
(A) => A.id === v.id ? { ...A, status: "uploading" } : A
|
|
786
786
|
)
|
|
787
787
|
}));
|
|
788
788
|
let T;
|
|
789
789
|
if (t)
|
|
790
|
-
T = await t(
|
|
790
|
+
T = await t(v.file);
|
|
791
791
|
else if (r) {
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
-
const
|
|
792
|
+
const j = new FormData();
|
|
793
|
+
j.append("image", v.file);
|
|
794
|
+
const A = await fetch(r, {
|
|
795
795
|
method: "POST",
|
|
796
|
-
body:
|
|
796
|
+
body: j
|
|
797
797
|
});
|
|
798
|
-
if (!
|
|
799
|
-
throw new Error(`Upload failed: ${
|
|
800
|
-
const
|
|
801
|
-
T =
|
|
798
|
+
if (!A.ok)
|
|
799
|
+
throw new Error(`Upload failed: ${A.statusText}`);
|
|
800
|
+
const D = await A.json();
|
|
801
|
+
T = D.url || D.imageUrl || D.data;
|
|
802
802
|
} else
|
|
803
803
|
throw new Error("No upload method provided");
|
|
804
|
-
const
|
|
805
|
-
if (
|
|
806
|
-
|
|
807
|
-
const
|
|
808
|
-
|
|
809
|
-
...
|
|
804
|
+
const u = s.current?.querySelector(`img[data-image-id="${v.id}"]`);
|
|
805
|
+
if (u) {
|
|
806
|
+
u.src = T, u.classList.add("uploaded");
|
|
807
|
+
const j = m.current.get(v.id);
|
|
808
|
+
j && m.current.set(v.id, {
|
|
809
|
+
...j,
|
|
810
810
|
uploadedUrl: T
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
|
|
814
|
-
...
|
|
815
|
-
pendingImages:
|
|
816
|
-
(
|
|
813
|
+
l((j) => ({
|
|
814
|
+
...j,
|
|
815
|
+
pendingImages: j.pendingImages.map(
|
|
816
|
+
(A) => A.id === v.id ? { ...A, status: "uploaded" } : A
|
|
817
817
|
)
|
|
818
818
|
}));
|
|
819
819
|
} catch (T) {
|
|
820
820
|
console.error("Image upload failed:", T);
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
...
|
|
824
|
-
pendingImages:
|
|
825
|
-
(
|
|
821
|
+
const u = s.current?.querySelector(`img[data-image-id="${v.id}"]`);
|
|
822
|
+
u && u.classList.add("failed"), l((j) => ({
|
|
823
|
+
...j,
|
|
824
|
+
pendingImages: j.pendingImages.map(
|
|
825
|
+
(A) => A.id === v.id ? { ...A, status: "failed" } : A
|
|
826
826
|
)
|
|
827
827
|
}));
|
|
828
828
|
}
|
|
829
|
-
|
|
829
|
+
s.current && S(s.current.innerHTML);
|
|
830
830
|
}
|
|
831
|
-
}, [
|
|
832
|
-
const
|
|
831
|
+
}, [c.pendingImages, t, r, S]), N = W((d) => {
|
|
832
|
+
const v = d.clipboardData.items;
|
|
833
833
|
let T = !1;
|
|
834
|
-
for (const
|
|
835
|
-
if (
|
|
834
|
+
for (const u of v)
|
|
835
|
+
if (u.type.indexOf("image") !== -1) {
|
|
836
836
|
d.preventDefault();
|
|
837
|
-
const
|
|
838
|
-
|
|
837
|
+
const j = u.getAsFile();
|
|
838
|
+
j && (T = !0, $(j));
|
|
839
839
|
break;
|
|
840
840
|
}
|
|
841
841
|
T || setTimeout(() => {
|
|
842
|
-
|
|
842
|
+
s.current && S(s.current.innerHTML);
|
|
843
843
|
}, 0);
|
|
844
|
-
}, [
|
|
844
|
+
}, [$, S]), V = W((d) => {
|
|
845
845
|
d.preventDefault();
|
|
846
|
-
const
|
|
846
|
+
const v = Array.from(d.dataTransfer.files);
|
|
847
847
|
let T = !1;
|
|
848
|
-
for (const
|
|
849
|
-
|
|
850
|
-
if (!T &&
|
|
851
|
-
const
|
|
852
|
-
if (
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
|
|
848
|
+
for (const u of v)
|
|
849
|
+
u.type.startsWith("image/") && (T = !0, $(u, !1));
|
|
850
|
+
if (!T && s.current) {
|
|
851
|
+
const u = window.getSelection();
|
|
852
|
+
if (u && u.rangeCount > 0) {
|
|
853
|
+
const j = u.getRangeAt(0);
|
|
854
|
+
s.current.contains(j.commonAncestorContainer) && setTimeout(() => {
|
|
855
|
+
s.current && S(s.current.innerHTML);
|
|
856
856
|
}, 0);
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
|
-
}, [
|
|
859
|
+
}, [$, S]), G = W(() => {
|
|
860
860
|
try {
|
|
861
|
-
const d =
|
|
861
|
+
const d = s.current?.innerHTML || c.content;
|
|
862
862
|
return { success: !0, data: {
|
|
863
|
-
title:
|
|
863
|
+
title: c.title,
|
|
864
864
|
content: d,
|
|
865
865
|
metadata: {
|
|
866
866
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
867
867
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
868
|
-
wordCount:
|
|
869
|
-
characterCount:
|
|
868
|
+
wordCount: c.wordCount,
|
|
869
|
+
characterCount: c.characterCount
|
|
870
870
|
}
|
|
871
871
|
} };
|
|
872
872
|
} catch (d) {
|
|
873
873
|
return { success: !1, error: d instanceof Error ? d.message : "Validation failed" };
|
|
874
874
|
}
|
|
875
|
-
}, [
|
|
875
|
+
}, [c]), J = W(
|
|
876
876
|
(d = { includeStyles: !0, includeMeta: !0 }) => {
|
|
877
|
-
const
|
|
878
|
-
if (!
|
|
879
|
-
throw new Error(
|
|
880
|
-
const { data: T } =
|
|
881
|
-
let
|
|
877
|
+
const v = G();
|
|
878
|
+
if (!v.success)
|
|
879
|
+
throw new Error(v.error);
|
|
880
|
+
const { data: T } = v;
|
|
881
|
+
let u = `<!DOCTYPE html>
|
|
882
882
|
<html>
|
|
883
883
|
<head>
|
|
884
884
|
<meta charset="UTF-8">
|
|
885
885
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
886
886
|
<title>${T?.title || "Document"}</title>`;
|
|
887
|
-
return d.includeStyles && (
|
|
887
|
+
return d.includeStyles && (u += `
|
|
888
888
|
<style>
|
|
889
889
|
body {
|
|
890
890
|
font-family: system-ui, -apple-system, sans-serif;
|
|
@@ -919,155 +919,158 @@ const dr = ({
|
|
|
919
919
|
a { color: #2563eb; text-decoration: underline; }
|
|
920
920
|
.image-uploading { opacity: 0.7; }
|
|
921
921
|
.image-failed { border: 2px solid #ef4444; }
|
|
922
|
-
</style>`),
|
|
922
|
+
</style>`), u += `
|
|
923
923
|
</head>
|
|
924
|
-
<body>`, d.includeMeta && T && (
|
|
924
|
+
<body>`, d.includeMeta && T && (u += `
|
|
925
925
|
<div class="document-meta">
|
|
926
926
|
<h1>${T.title}</h1>
|
|
927
927
|
<p><small>Created: ${new Date(T.metadata.createdAt).toLocaleString()} |
|
|
928
928
|
Words: ${T.metadata.wordCount} |
|
|
929
929
|
Characters: ${T.metadata.characterCount}</small></p>
|
|
930
930
|
<hr>
|
|
931
|
-
</div>`),
|
|
931
|
+
</div>`), u += `
|
|
932
932
|
<div class="${d.includeStyles ? "readonly-content" : ""}">
|
|
933
933
|
${T?.content || ""}
|
|
934
934
|
</div>
|
|
935
935
|
</body>
|
|
936
|
-
</html>`,
|
|
936
|
+
</html>`, u;
|
|
937
937
|
},
|
|
938
938
|
[G]
|
|
939
|
-
),
|
|
940
|
-
|
|
939
|
+
), x = W(() => {
|
|
940
|
+
l({
|
|
941
941
|
content: "",
|
|
942
942
|
title: "Untitled Document",
|
|
943
943
|
wordCount: 0,
|
|
944
944
|
characterCount: 0,
|
|
945
945
|
hasUnsavedChanges: !1,
|
|
946
946
|
pendingImages: []
|
|
947
|
-
}), m.current.clear(),
|
|
948
|
-
}, [
|
|
947
|
+
}), m.current.clear(), s.current && (s.current.innerHTML = "", L()), f.current = "";
|
|
948
|
+
}, [L]), P = W((d) => {
|
|
949
|
+
s.current && (s.current.innerHTML = d || "", S(d || ""), f.current = d || "");
|
|
950
|
+
}, [S]);
|
|
949
951
|
return {
|
|
950
|
-
editorState:
|
|
951
|
-
editorRef:
|
|
952
|
+
editorState: c,
|
|
953
|
+
editorRef: s,
|
|
952
954
|
updateContent: S,
|
|
953
|
-
updateTitle:
|
|
954
|
-
executeCommand:
|
|
955
|
+
updateTitle: F,
|
|
956
|
+
executeCommand: z,
|
|
955
957
|
getValidationResult: G,
|
|
956
958
|
exportToHTML: J,
|
|
957
|
-
clearEditor:
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
959
|
+
clearEditor: x,
|
|
960
|
+
setHTML: P,
|
|
961
|
+
handlePaste: N,
|
|
962
|
+
handleDrop: V,
|
|
963
|
+
insertImage: $,
|
|
964
|
+
uploadPendingImages: k
|
|
962
965
|
};
|
|
963
|
-
},
|
|
966
|
+
}, br = (e, t) => {
|
|
964
967
|
const r = new Array(e.length + t.length);
|
|
965
968
|
for (let n = 0; n < e.length; n++)
|
|
966
969
|
r[n] = e[n];
|
|
967
970
|
for (let n = 0; n < t.length; n++)
|
|
968
971
|
r[e.length + n] = t[n];
|
|
969
972
|
return r;
|
|
970
|
-
},
|
|
973
|
+
}, hr = (e, t) => ({
|
|
971
974
|
classGroupId: e,
|
|
972
975
|
validator: t
|
|
973
976
|
}), pt = (e = /* @__PURE__ */ new Map(), t = null, r) => ({
|
|
974
977
|
nextPart: e,
|
|
975
978
|
validators: t,
|
|
976
979
|
classGroupId: r
|
|
977
|
-
}),
|
|
978
|
-
const t =
|
|
980
|
+
}), Se = "-", Je = [], xr = "arbitrary..", vr = (e) => {
|
|
981
|
+
const t = wr(e), {
|
|
979
982
|
conflictingClassGroups: r,
|
|
980
983
|
conflictingClassGroupModifiers: n
|
|
981
984
|
} = e;
|
|
982
985
|
return {
|
|
983
|
-
getClassGroupId: (
|
|
984
|
-
if (
|
|
985
|
-
return
|
|
986
|
-
const
|
|
987
|
-
return
|
|
986
|
+
getClassGroupId: (l) => {
|
|
987
|
+
if (l.startsWith("[") && l.endsWith("]"))
|
|
988
|
+
return yr(l);
|
|
989
|
+
const s = l.split(Se), m = s[0] === "" && s.length > 1 ? 1 : 0;
|
|
990
|
+
return bt(s, m, t);
|
|
988
991
|
},
|
|
989
|
-
getConflictingClassGroupIds: (
|
|
990
|
-
if (
|
|
991
|
-
const m = n[
|
|
992
|
-
return m ? f ?
|
|
992
|
+
getConflictingClassGroupIds: (l, s) => {
|
|
993
|
+
if (s) {
|
|
994
|
+
const m = n[l], f = r[l];
|
|
995
|
+
return m ? f ? br(f, m) : m : f || Je;
|
|
993
996
|
}
|
|
994
|
-
return r[
|
|
997
|
+
return r[l] || Je;
|
|
995
998
|
}
|
|
996
999
|
};
|
|
997
|
-
},
|
|
1000
|
+
}, bt = (e, t, r) => {
|
|
998
1001
|
if (e.length - t === 0)
|
|
999
1002
|
return r.classGroupId;
|
|
1000
|
-
const
|
|
1001
|
-
if (
|
|
1002
|
-
const f =
|
|
1003
|
+
const a = e[t], c = r.nextPart.get(a);
|
|
1004
|
+
if (c) {
|
|
1005
|
+
const f = bt(e, t + 1, c);
|
|
1003
1006
|
if (f) return f;
|
|
1004
1007
|
}
|
|
1005
|
-
const
|
|
1006
|
-
if (
|
|
1008
|
+
const l = r.validators;
|
|
1009
|
+
if (l === null)
|
|
1007
1010
|
return;
|
|
1008
|
-
const
|
|
1011
|
+
const s = t === 0 ? e.join(Se) : e.slice(t).join(Se), m = l.length;
|
|
1009
1012
|
for (let f = 0; f < m; f++) {
|
|
1010
|
-
const
|
|
1011
|
-
if (
|
|
1012
|
-
return
|
|
1013
|
+
const R = l[f];
|
|
1014
|
+
if (R.validator(s))
|
|
1015
|
+
return R.classGroupId;
|
|
1013
1016
|
}
|
|
1014
|
-
},
|
|
1017
|
+
}, yr = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
1015
1018
|
const t = e.slice(1, -1), r = t.indexOf(":"), n = t.slice(0, r);
|
|
1016
|
-
return n ?
|
|
1017
|
-
})(),
|
|
1019
|
+
return n ? xr + n : void 0;
|
|
1020
|
+
})(), wr = (e) => {
|
|
1018
1021
|
const {
|
|
1019
1022
|
theme: t,
|
|
1020
1023
|
classGroups: r
|
|
1021
1024
|
} = e;
|
|
1022
|
-
return
|
|
1023
|
-
},
|
|
1025
|
+
return kr(r, t);
|
|
1026
|
+
}, kr = (e, t) => {
|
|
1024
1027
|
const r = pt();
|
|
1025
1028
|
for (const n in e) {
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1029
|
+
const a = e[n];
|
|
1030
|
+
We(a, r, n, t);
|
|
1028
1031
|
}
|
|
1029
1032
|
return r;
|
|
1030
|
-
},
|
|
1031
|
-
const
|
|
1032
|
-
for (let
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1033
|
+
}, We = (e, t, r, n) => {
|
|
1034
|
+
const a = e.length;
|
|
1035
|
+
for (let c = 0; c < a; c++) {
|
|
1036
|
+
const l = e[c];
|
|
1037
|
+
Tr(l, t, r, n);
|
|
1035
1038
|
}
|
|
1036
|
-
},
|
|
1039
|
+
}, Tr = (e, t, r, n) => {
|
|
1037
1040
|
if (typeof e == "string") {
|
|
1038
|
-
|
|
1041
|
+
jr(e, t, r);
|
|
1039
1042
|
return;
|
|
1040
1043
|
}
|
|
1041
1044
|
if (typeof e == "function") {
|
|
1042
|
-
|
|
1045
|
+
Cr(e, t, r, n);
|
|
1043
1046
|
return;
|
|
1044
1047
|
}
|
|
1045
|
-
|
|
1046
|
-
},
|
|
1047
|
-
const n = e === "" ? t :
|
|
1048
|
+
Sr(e, t, r, n);
|
|
1049
|
+
}, jr = (e, t, r) => {
|
|
1050
|
+
const n = e === "" ? t : ht(t, e);
|
|
1048
1051
|
n.classGroupId = r;
|
|
1049
|
-
},
|
|
1050
|
-
if (
|
|
1051
|
-
|
|
1052
|
+
}, Cr = (e, t, r, n) => {
|
|
1053
|
+
if (Rr(e)) {
|
|
1054
|
+
We(e(n), t, r, n);
|
|
1052
1055
|
return;
|
|
1053
1056
|
}
|
|
1054
|
-
t.validators === null && (t.validators = []), t.validators.push(
|
|
1055
|
-
},
|
|
1056
|
-
const
|
|
1057
|
-
for (let
|
|
1058
|
-
const [
|
|
1059
|
-
|
|
1057
|
+
t.validators === null && (t.validators = []), t.validators.push(hr(r, e));
|
|
1058
|
+
}, Sr = (e, t, r, n) => {
|
|
1059
|
+
const a = Object.entries(e), c = a.length;
|
|
1060
|
+
for (let l = 0; l < c; l++) {
|
|
1061
|
+
const [s, m] = a[l];
|
|
1062
|
+
We(m, ht(t, s), r, n);
|
|
1060
1063
|
}
|
|
1061
|
-
},
|
|
1064
|
+
}, ht = (e, t) => {
|
|
1062
1065
|
let r = e;
|
|
1063
|
-
const n = t.split(
|
|
1064
|
-
for (let
|
|
1065
|
-
const
|
|
1066
|
-
let
|
|
1067
|
-
|
|
1066
|
+
const n = t.split(Se), a = n.length;
|
|
1067
|
+
for (let c = 0; c < a; c++) {
|
|
1068
|
+
const l = n[c];
|
|
1069
|
+
let s = r.nextPart.get(l);
|
|
1070
|
+
s || (s = pt(), r.nextPart.set(l, s)), r = s;
|
|
1068
1071
|
}
|
|
1069
1072
|
return r;
|
|
1070
|
-
},
|
|
1073
|
+
}, Rr = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Ar = (e) => {
|
|
1071
1074
|
if (e < 1)
|
|
1072
1075
|
return {
|
|
1073
1076
|
get: () => {
|
|
@@ -1076,177 +1079,177 @@ const dr = ({
|
|
|
1076
1079
|
}
|
|
1077
1080
|
};
|
|
1078
1081
|
let t = 0, r = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
|
|
1079
|
-
const
|
|
1080
|
-
r[
|
|
1082
|
+
const a = (c, l) => {
|
|
1083
|
+
r[c] = l, t++, t > e && (t = 0, n = r, r = /* @__PURE__ */ Object.create(null));
|
|
1081
1084
|
};
|
|
1082
1085
|
return {
|
|
1083
|
-
get(
|
|
1084
|
-
let
|
|
1085
|
-
if (
|
|
1086
|
-
return
|
|
1087
|
-
if ((
|
|
1088
|
-
return
|
|
1086
|
+
get(c) {
|
|
1087
|
+
let l = r[c];
|
|
1088
|
+
if (l !== void 0)
|
|
1089
|
+
return l;
|
|
1090
|
+
if ((l = n[c]) !== void 0)
|
|
1091
|
+
return a(c, l), l;
|
|
1089
1092
|
},
|
|
1090
|
-
set(
|
|
1091
|
-
|
|
1093
|
+
set(c, l) {
|
|
1094
|
+
c in r ? r[c] = l : a(c, l);
|
|
1092
1095
|
}
|
|
1093
1096
|
};
|
|
1094
|
-
},
|
|
1097
|
+
}, Ge = "!", Ke = ":", Er = [], Xe = (e, t, r, n, a) => ({
|
|
1095
1098
|
modifiers: e,
|
|
1096
1099
|
hasImportantModifier: t,
|
|
1097
1100
|
baseClassName: r,
|
|
1098
1101
|
maybePostfixModifierPosition: n,
|
|
1099
|
-
isExternal:
|
|
1100
|
-
}),
|
|
1102
|
+
isExternal: a
|
|
1103
|
+
}), _r = (e) => {
|
|
1101
1104
|
const {
|
|
1102
1105
|
prefix: t,
|
|
1103
1106
|
experimentalParseClassName: r
|
|
1104
1107
|
} = e;
|
|
1105
|
-
let n = (
|
|
1106
|
-
const
|
|
1107
|
-
let
|
|
1108
|
-
const
|
|
1109
|
-
for (let
|
|
1110
|
-
const
|
|
1111
|
-
if (
|
|
1112
|
-
if (
|
|
1113
|
-
|
|
1108
|
+
let n = (a) => {
|
|
1109
|
+
const c = [];
|
|
1110
|
+
let l = 0, s = 0, m = 0, f;
|
|
1111
|
+
const R = a.length;
|
|
1112
|
+
for (let F = 0; F < R; F++) {
|
|
1113
|
+
const z = a[F];
|
|
1114
|
+
if (l === 0 && s === 0) {
|
|
1115
|
+
if (z === Ke) {
|
|
1116
|
+
c.push(a.slice(m, F)), m = F + 1;
|
|
1114
1117
|
continue;
|
|
1115
1118
|
}
|
|
1116
|
-
if (
|
|
1117
|
-
f =
|
|
1119
|
+
if (z === "/") {
|
|
1120
|
+
f = F;
|
|
1118
1121
|
continue;
|
|
1119
1122
|
}
|
|
1120
1123
|
}
|
|
1121
|
-
|
|
1124
|
+
z === "[" ? l++ : z === "]" ? l-- : z === "(" ? s++ : z === ")" && s--;
|
|
1122
1125
|
}
|
|
1123
|
-
const
|
|
1124
|
-
let
|
|
1125
|
-
|
|
1126
|
+
const L = c.length === 0 ? a : a.slice(m);
|
|
1127
|
+
let M = L, q = !1;
|
|
1128
|
+
L.endsWith(Ge) ? (M = L.slice(0, -1), q = !0) : (
|
|
1126
1129
|
/**
|
|
1127
1130
|
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
1128
1131
|
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
1129
1132
|
*/
|
|
1130
|
-
|
|
1133
|
+
L.startsWith(Ge) && (M = L.slice(1), q = !0)
|
|
1131
1134
|
);
|
|
1132
1135
|
const S = f && f > m ? f - m : void 0;
|
|
1133
|
-
return
|
|
1136
|
+
return Xe(c, q, M, S);
|
|
1134
1137
|
};
|
|
1135
1138
|
if (t) {
|
|
1136
|
-
const
|
|
1137
|
-
n = (
|
|
1139
|
+
const a = t + Ke, c = n;
|
|
1140
|
+
n = (l) => l.startsWith(a) ? c(l.slice(a.length)) : Xe(Er, !1, l, void 0, !0);
|
|
1138
1141
|
}
|
|
1139
1142
|
if (r) {
|
|
1140
|
-
const
|
|
1141
|
-
n = (
|
|
1142
|
-
className:
|
|
1143
|
-
parseClassName:
|
|
1143
|
+
const a = n;
|
|
1144
|
+
n = (c) => r({
|
|
1145
|
+
className: c,
|
|
1146
|
+
parseClassName: a
|
|
1144
1147
|
});
|
|
1145
1148
|
}
|
|
1146
1149
|
return n;
|
|
1147
|
-
},
|
|
1150
|
+
}, Nr = (e) => {
|
|
1148
1151
|
const t = /* @__PURE__ */ new Map();
|
|
1149
1152
|
return e.orderSensitiveModifiers.forEach((r, n) => {
|
|
1150
1153
|
t.set(r, 1e6 + n);
|
|
1151
1154
|
}), (r) => {
|
|
1152
1155
|
const n = [];
|
|
1153
|
-
let
|
|
1154
|
-
for (let
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1156
|
+
let a = [];
|
|
1157
|
+
for (let c = 0; c < r.length; c++) {
|
|
1158
|
+
const l = r[c], s = l[0] === "[", m = t.has(l);
|
|
1159
|
+
s || m ? (a.length > 0 && (a.sort(), n.push(...a), a = []), n.push(l)) : a.push(l);
|
|
1157
1160
|
}
|
|
1158
|
-
return
|
|
1161
|
+
return a.length > 0 && (a.sort(), n.push(...a)), n;
|
|
1159
1162
|
};
|
|
1160
|
-
},
|
|
1161
|
-
cache:
|
|
1162
|
-
parseClassName:
|
|
1163
|
-
sortModifiers:
|
|
1164
|
-
...
|
|
1165
|
-
}),
|
|
1163
|
+
}, Ir = (e) => ({
|
|
1164
|
+
cache: Ar(e.cacheSize),
|
|
1165
|
+
parseClassName: _r(e),
|
|
1166
|
+
sortModifiers: Nr(e),
|
|
1167
|
+
...vr(e)
|
|
1168
|
+
}), Lr = /\s+/, zr = (e, t) => {
|
|
1166
1169
|
const {
|
|
1167
1170
|
parseClassName: r,
|
|
1168
1171
|
getClassGroupId: n,
|
|
1169
|
-
getConflictingClassGroupIds:
|
|
1170
|
-
sortModifiers:
|
|
1171
|
-
} = t,
|
|
1172
|
+
getConflictingClassGroupIds: a,
|
|
1173
|
+
sortModifiers: c
|
|
1174
|
+
} = t, l = [], s = e.trim().split(Lr);
|
|
1172
1175
|
let m = "";
|
|
1173
|
-
for (let f =
|
|
1174
|
-
const
|
|
1175
|
-
isExternal:
|
|
1176
|
-
modifiers:
|
|
1176
|
+
for (let f = s.length - 1; f >= 0; f -= 1) {
|
|
1177
|
+
const R = s[f], {
|
|
1178
|
+
isExternal: L,
|
|
1179
|
+
modifiers: M,
|
|
1177
1180
|
hasImportantModifier: q,
|
|
1178
1181
|
baseClassName: S,
|
|
1179
|
-
maybePostfixModifierPosition:
|
|
1180
|
-
} = r(
|
|
1181
|
-
if (
|
|
1182
|
-
m =
|
|
1182
|
+
maybePostfixModifierPosition: F
|
|
1183
|
+
} = r(R);
|
|
1184
|
+
if (L) {
|
|
1185
|
+
m = R + (m.length > 0 ? " " + m : m);
|
|
1183
1186
|
continue;
|
|
1184
1187
|
}
|
|
1185
|
-
let
|
|
1186
|
-
if (!
|
|
1187
|
-
if (!
|
|
1188
|
-
m =
|
|
1188
|
+
let z = !!F, H = n(z ? S.substring(0, F) : S);
|
|
1189
|
+
if (!H) {
|
|
1190
|
+
if (!z) {
|
|
1191
|
+
m = R + (m.length > 0 ? " " + m : m);
|
|
1189
1192
|
continue;
|
|
1190
1193
|
}
|
|
1191
|
-
if (
|
|
1192
|
-
m =
|
|
1194
|
+
if (H = n(S), !H) {
|
|
1195
|
+
m = R + (m.length > 0 ? " " + m : m);
|
|
1193
1196
|
continue;
|
|
1194
1197
|
}
|
|
1195
|
-
|
|
1198
|
+
z = !1;
|
|
1196
1199
|
}
|
|
1197
|
-
const
|
|
1198
|
-
if (
|
|
1200
|
+
const $ = M.length === 0 ? "" : M.length === 1 ? M[0] : c(M).join(":"), k = q ? $ + Ge : $, N = k + H;
|
|
1201
|
+
if (l.indexOf(N) > -1)
|
|
1199
1202
|
continue;
|
|
1200
|
-
|
|
1201
|
-
const
|
|
1202
|
-
for (let G = 0; G <
|
|
1203
|
-
const J =
|
|
1204
|
-
|
|
1203
|
+
l.push(N);
|
|
1204
|
+
const V = a(H, z);
|
|
1205
|
+
for (let G = 0; G < V.length; ++G) {
|
|
1206
|
+
const J = V[G];
|
|
1207
|
+
l.push(k + J);
|
|
1205
1208
|
}
|
|
1206
|
-
m =
|
|
1209
|
+
m = R + (m.length > 0 ? " " + m : m);
|
|
1207
1210
|
}
|
|
1208
1211
|
return m;
|
|
1209
|
-
},
|
|
1210
|
-
let t = 0, r, n,
|
|
1212
|
+
}, Or = (...e) => {
|
|
1213
|
+
let t = 0, r, n, a = "";
|
|
1211
1214
|
for (; t < e.length; )
|
|
1212
|
-
(r = e[t++]) && (n =
|
|
1213
|
-
return
|
|
1214
|
-
},
|
|
1215
|
+
(r = e[t++]) && (n = xt(r)) && (a && (a += " "), a += n);
|
|
1216
|
+
return a;
|
|
1217
|
+
}, xt = (e) => {
|
|
1215
1218
|
if (typeof e == "string")
|
|
1216
1219
|
return e;
|
|
1217
1220
|
let t, r = "";
|
|
1218
1221
|
for (let n = 0; n < e.length; n++)
|
|
1219
|
-
e[n] && (t =
|
|
1222
|
+
e[n] && (t = xt(e[n])) && (r && (r += " "), r += t);
|
|
1220
1223
|
return r;
|
|
1221
|
-
},
|
|
1222
|
-
let r, n,
|
|
1223
|
-
const
|
|
1224
|
-
const f = t.reduce((
|
|
1225
|
-
return r =
|
|
1226
|
-
},
|
|
1224
|
+
}, Pr = (e, ...t) => {
|
|
1225
|
+
let r, n, a, c;
|
|
1226
|
+
const l = (m) => {
|
|
1227
|
+
const f = t.reduce((R, L) => L(R), e());
|
|
1228
|
+
return r = Ir(f), n = r.cache.get, a = r.cache.set, c = s, s(m);
|
|
1229
|
+
}, s = (m) => {
|
|
1227
1230
|
const f = n(m);
|
|
1228
1231
|
if (f)
|
|
1229
1232
|
return f;
|
|
1230
|
-
const
|
|
1231
|
-
return
|
|
1233
|
+
const R = zr(m, r);
|
|
1234
|
+
return a(m, R), R;
|
|
1232
1235
|
};
|
|
1233
|
-
return
|
|
1234
|
-
},
|
|
1235
|
-
const t = (r) => r[e] ||
|
|
1236
|
+
return c = l, (...m) => c(Or(...m));
|
|
1237
|
+
}, Mr = [], Y = (e) => {
|
|
1238
|
+
const t = (r) => r[e] || Mr;
|
|
1236
1239
|
return t.isThemeGetter = !0, t;
|
|
1237
|
-
},
|
|
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)\(.+\)$/, pe = (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) => (
|
|
1238
1241
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
1239
1242
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
1240
1243
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
1241
|
-
|
|
1242
|
-
),
|
|
1243
|
-
const n = xt.exec(e);
|
|
1244
|
-
return n ? n[1] ? t(n[1]) : r(n[2]) : !1;
|
|
1245
|
-
}, pe = (e, t, r = !1) => {
|
|
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), ge = (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
|
+
return n ? n[1] ? t(n[1]) : r(n[2]) : !1;
|
|
1248
|
+
}, he = (e, t, r = !1) => {
|
|
1249
|
+
const n = yt.exec(e);
|
|
1247
1250
|
return n ? n[1] ? t(n[1]) : r : !1;
|
|
1248
|
-
},
|
|
1249
|
-
const e = Y("color"), t = Y("font"), r = Y("text"), n = Y("font-weight"),
|
|
1251
|
+
}, kt = (e) => e === "position" || e === "percentage", Tt = (e) => e === "image" || e === "url", jt = (e) => e === "length" || e === "size" || e === "bg-size", Ct = (e) => e === "length", en = (e) => e === "number", tn = (e) => e === "family-name", St = (e) => e === "shadow", rn = () => {
|
|
1252
|
+
const e = Y("color"), t = Y("font"), r = Y("text"), n = Y("font-weight"), a = Y("tracking"), c = Y("leading"), l = Y("breakpoint"), s = Y("container"), m = Y("spacing"), f = Y("radius"), R = Y("shadow"), L = Y("inset-shadow"), M = Y("text-shadow"), q = Y("drop-shadow"), S = Y("blur"), F = Y("perspective"), z = Y("aspect"), H = Y("ease"), $ = Y("animate"), k = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], N = () => [
|
|
1250
1253
|
"center",
|
|
1251
1254
|
"top",
|
|
1252
1255
|
"bottom",
|
|
@@ -1264,51 +1267,51 @@ const dr = ({
|
|
|
1264
1267
|
"bottom-left",
|
|
1265
1268
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
1266
1269
|
"left-bottom"
|
|
1267
|
-
],
|
|
1268
|
-
span: ["full",
|
|
1269
|
-
},
|
|
1270
|
-
position: [
|
|
1271
|
-
}],
|
|
1270
|
+
], V = () => [...N(), h, b], G = () => ["auto", "hidden", "clip", "visible", "scroll"], J = () => ["auto", "contain", "none"], x = () => [h, b, m], P = () => [pe, "full", "auto", ...x()], d = () => [ue, "none", "subgrid", h, b], v = () => ["auto", {
|
|
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 = () => [pe, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...x()], p = () => [e, h, b], X = () => [...N(), Ze, Qe, {
|
|
1273
|
+
position: [h, b]
|
|
1274
|
+
}], B = () => ["no-repeat", {
|
|
1272
1275
|
repeat: ["", "x", "y", "space", "round"]
|
|
1273
|
-
}], o = () => ["auto", "cover", "contain",
|
|
1274
|
-
size: [
|
|
1275
|
-
}],
|
|
1276
|
+
}], o = () => ["auto", "cover", "contain", Qr, Jr, {
|
|
1277
|
+
size: [h, b]
|
|
1278
|
+
}], y = () => [Re, ye, ge], w = () => [
|
|
1276
1279
|
// Deprecated since Tailwind CSS v4.0.0
|
|
1277
1280
|
"",
|
|
1278
1281
|
"none",
|
|
1279
1282
|
"full",
|
|
1280
1283
|
f,
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
], C = () => ["", _,
|
|
1284
|
+
h,
|
|
1285
|
+
b
|
|
1286
|
+
], C = () => ["", _, ye, ge], 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 = () => [
|
|
1284
1287
|
// Deprecated since Tailwind CSS v4.0.0
|
|
1285
1288
|
"",
|
|
1286
1289
|
"none",
|
|
1287
1290
|
S,
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
],
|
|
1291
|
+
h,
|
|
1292
|
+
b
|
|
1293
|
+
], te = () => ["none", _, h, b], oe = () => ["none", _, h, b], le = () => [_, h, b], O = () => [pe, "full", ...x()];
|
|
1291
1294
|
return {
|
|
1292
1295
|
cacheSize: 500,
|
|
1293
1296
|
theme: {
|
|
1294
1297
|
animate: ["spin", "ping", "pulse", "bounce"],
|
|
1295
1298
|
aspect: ["video"],
|
|
1296
|
-
blur: [
|
|
1297
|
-
breakpoint: [
|
|
1298
|
-
color: [
|
|
1299
|
-
container: [
|
|
1300
|
-
"drop-shadow": [
|
|
1299
|
+
blur: [ce],
|
|
1300
|
+
breakpoint: [ce],
|
|
1301
|
+
color: [Gr],
|
|
1302
|
+
container: [ce],
|
|
1303
|
+
"drop-shadow": [ce],
|
|
1301
1304
|
ease: ["in", "out", "in-out"],
|
|
1302
|
-
font: [
|
|
1305
|
+
font: [Yr],
|
|
1303
1306
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
1304
|
-
"inset-shadow": [
|
|
1307
|
+
"inset-shadow": [ce],
|
|
1305
1308
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
1306
1309
|
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
|
|
1307
|
-
radius: [
|
|
1308
|
-
shadow: [
|
|
1310
|
+
radius: [ce],
|
|
1311
|
+
shadow: [ce],
|
|
1309
1312
|
spacing: ["px", _],
|
|
1310
|
-
text: [
|
|
1311
|
-
"text-shadow": [
|
|
1313
|
+
text: [ce],
|
|
1314
|
+
"text-shadow": [ce],
|
|
1312
1315
|
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
|
|
1313
1316
|
},
|
|
1314
1317
|
classGroups: {
|
|
@@ -1320,7 +1323,7 @@ const dr = ({
|
|
|
1320
1323
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
1321
1324
|
*/
|
|
1322
1325
|
aspect: [{
|
|
1323
|
-
aspect: ["auto", "square",
|
|
1326
|
+
aspect: ["auto", "square", pe, b, h, z]
|
|
1324
1327
|
}],
|
|
1325
1328
|
/**
|
|
1326
1329
|
* Container
|
|
@@ -1333,21 +1336,21 @@ const dr = ({
|
|
|
1333
1336
|
* @see https://tailwindcss.com/docs/columns
|
|
1334
1337
|
*/
|
|
1335
1338
|
columns: [{
|
|
1336
|
-
columns: [_,
|
|
1339
|
+
columns: [_, b, h, s]
|
|
1337
1340
|
}],
|
|
1338
1341
|
/**
|
|
1339
1342
|
* Break After
|
|
1340
1343
|
* @see https://tailwindcss.com/docs/break-after
|
|
1341
1344
|
*/
|
|
1342
1345
|
"break-after": [{
|
|
1343
|
-
"break-after":
|
|
1346
|
+
"break-after": k()
|
|
1344
1347
|
}],
|
|
1345
1348
|
/**
|
|
1346
1349
|
* Break Before
|
|
1347
1350
|
* @see https://tailwindcss.com/docs/break-before
|
|
1348
1351
|
*/
|
|
1349
1352
|
"break-before": [{
|
|
1350
|
-
"break-before":
|
|
1353
|
+
"break-before": k()
|
|
1351
1354
|
}],
|
|
1352
1355
|
/**
|
|
1353
1356
|
* Break Inside
|
|
@@ -1411,7 +1414,7 @@ const dr = ({
|
|
|
1411
1414
|
* @see https://tailwindcss.com/docs/object-position
|
|
1412
1415
|
*/
|
|
1413
1416
|
"object-position": [{
|
|
1414
|
-
object:
|
|
1417
|
+
object: V()
|
|
1415
1418
|
}],
|
|
1416
1419
|
/**
|
|
1417
1420
|
* Overflow
|
|
@@ -1465,63 +1468,63 @@ const dr = ({
|
|
|
1465
1468
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1466
1469
|
*/
|
|
1467
1470
|
inset: [{
|
|
1468
|
-
inset:
|
|
1471
|
+
inset: P()
|
|
1469
1472
|
}],
|
|
1470
1473
|
/**
|
|
1471
1474
|
* Right / Left
|
|
1472
1475
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1473
1476
|
*/
|
|
1474
1477
|
"inset-x": [{
|
|
1475
|
-
"inset-x":
|
|
1478
|
+
"inset-x": P()
|
|
1476
1479
|
}],
|
|
1477
1480
|
/**
|
|
1478
1481
|
* Top / Bottom
|
|
1479
1482
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1480
1483
|
*/
|
|
1481
1484
|
"inset-y": [{
|
|
1482
|
-
"inset-y":
|
|
1485
|
+
"inset-y": P()
|
|
1483
1486
|
}],
|
|
1484
1487
|
/**
|
|
1485
1488
|
* Start
|
|
1486
1489
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1487
1490
|
*/
|
|
1488
1491
|
start: [{
|
|
1489
|
-
start:
|
|
1492
|
+
start: P()
|
|
1490
1493
|
}],
|
|
1491
1494
|
/**
|
|
1492
1495
|
* End
|
|
1493
1496
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1494
1497
|
*/
|
|
1495
1498
|
end: [{
|
|
1496
|
-
end:
|
|
1499
|
+
end: P()
|
|
1497
1500
|
}],
|
|
1498
1501
|
/**
|
|
1499
1502
|
* Top
|
|
1500
1503
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1501
1504
|
*/
|
|
1502
1505
|
top: [{
|
|
1503
|
-
top:
|
|
1506
|
+
top: P()
|
|
1504
1507
|
}],
|
|
1505
1508
|
/**
|
|
1506
1509
|
* Right
|
|
1507
1510
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1508
1511
|
*/
|
|
1509
1512
|
right: [{
|
|
1510
|
-
right:
|
|
1513
|
+
right: P()
|
|
1511
1514
|
}],
|
|
1512
1515
|
/**
|
|
1513
1516
|
* Bottom
|
|
1514
1517
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1515
1518
|
*/
|
|
1516
1519
|
bottom: [{
|
|
1517
|
-
bottom:
|
|
1520
|
+
bottom: P()
|
|
1518
1521
|
}],
|
|
1519
1522
|
/**
|
|
1520
1523
|
* Left
|
|
1521
1524
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1522
1525
|
*/
|
|
1523
1526
|
left: [{
|
|
1524
|
-
left:
|
|
1527
|
+
left: P()
|
|
1525
1528
|
}],
|
|
1526
1529
|
/**
|
|
1527
1530
|
* Visibility
|
|
@@ -1533,7 +1536,7 @@ const dr = ({
|
|
|
1533
1536
|
* @see https://tailwindcss.com/docs/z-index
|
|
1534
1537
|
*/
|
|
1535
1538
|
z: [{
|
|
1536
|
-
z: [
|
|
1539
|
+
z: [ue, "auto", h, b]
|
|
1537
1540
|
}],
|
|
1538
1541
|
// ------------------------
|
|
1539
1542
|
// --- Flexbox and Grid ---
|
|
@@ -1543,7 +1546,7 @@ const dr = ({
|
|
|
1543
1546
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
1544
1547
|
*/
|
|
1545
1548
|
basis: [{
|
|
1546
|
-
basis: [
|
|
1549
|
+
basis: [pe, "full", "auto", s, ...x()]
|
|
1547
1550
|
}],
|
|
1548
1551
|
/**
|
|
1549
1552
|
* Flex Direction
|
|
@@ -1564,84 +1567,84 @@ const dr = ({
|
|
|
1564
1567
|
* @see https://tailwindcss.com/docs/flex
|
|
1565
1568
|
*/
|
|
1566
1569
|
flex: [{
|
|
1567
|
-
flex: [_,
|
|
1570
|
+
flex: [_, pe, "auto", "initial", "none", b]
|
|
1568
1571
|
}],
|
|
1569
1572
|
/**
|
|
1570
1573
|
* Flex Grow
|
|
1571
1574
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
1572
1575
|
*/
|
|
1573
1576
|
grow: [{
|
|
1574
|
-
grow: ["", _,
|
|
1577
|
+
grow: ["", _, h, b]
|
|
1575
1578
|
}],
|
|
1576
1579
|
/**
|
|
1577
1580
|
* Flex Shrink
|
|
1578
1581
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
1579
1582
|
*/
|
|
1580
1583
|
shrink: [{
|
|
1581
|
-
shrink: ["", _,
|
|
1584
|
+
shrink: ["", _, h, b]
|
|
1582
1585
|
}],
|
|
1583
1586
|
/**
|
|
1584
1587
|
* Order
|
|
1585
1588
|
* @see https://tailwindcss.com/docs/order
|
|
1586
1589
|
*/
|
|
1587
1590
|
order: [{
|
|
1588
|
-
order: [
|
|
1591
|
+
order: [ue, "first", "last", "none", h, b]
|
|
1589
1592
|
}],
|
|
1590
1593
|
/**
|
|
1591
1594
|
* Grid Template Columns
|
|
1592
1595
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
1593
1596
|
*/
|
|
1594
1597
|
"grid-cols": [{
|
|
1595
|
-
"grid-cols":
|
|
1598
|
+
"grid-cols": d()
|
|
1596
1599
|
}],
|
|
1597
1600
|
/**
|
|
1598
1601
|
* Grid Column Start / End
|
|
1599
1602
|
* @see https://tailwindcss.com/docs/grid-column
|
|
1600
1603
|
*/
|
|
1601
1604
|
"col-start-end": [{
|
|
1602
|
-
col:
|
|
1605
|
+
col: v()
|
|
1603
1606
|
}],
|
|
1604
1607
|
/**
|
|
1605
1608
|
* Grid Column Start
|
|
1606
1609
|
* @see https://tailwindcss.com/docs/grid-column
|
|
1607
1610
|
*/
|
|
1608
1611
|
"col-start": [{
|
|
1609
|
-
"col-start":
|
|
1612
|
+
"col-start": T()
|
|
1610
1613
|
}],
|
|
1611
1614
|
/**
|
|
1612
1615
|
* Grid Column End
|
|
1613
1616
|
* @see https://tailwindcss.com/docs/grid-column
|
|
1614
1617
|
*/
|
|
1615
1618
|
"col-end": [{
|
|
1616
|
-
"col-end":
|
|
1619
|
+
"col-end": T()
|
|
1617
1620
|
}],
|
|
1618
1621
|
/**
|
|
1619
1622
|
* Grid Template Rows
|
|
1620
1623
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
1621
1624
|
*/
|
|
1622
1625
|
"grid-rows": [{
|
|
1623
|
-
"grid-rows":
|
|
1626
|
+
"grid-rows": d()
|
|
1624
1627
|
}],
|
|
1625
1628
|
/**
|
|
1626
1629
|
* Grid Row Start / End
|
|
1627
1630
|
* @see https://tailwindcss.com/docs/grid-row
|
|
1628
1631
|
*/
|
|
1629
1632
|
"row-start-end": [{
|
|
1630
|
-
row:
|
|
1633
|
+
row: v()
|
|
1631
1634
|
}],
|
|
1632
1635
|
/**
|
|
1633
1636
|
* Grid Row Start
|
|
1634
1637
|
* @see https://tailwindcss.com/docs/grid-row
|
|
1635
1638
|
*/
|
|
1636
1639
|
"row-start": [{
|
|
1637
|
-
"row-start":
|
|
1640
|
+
"row-start": T()
|
|
1638
1641
|
}],
|
|
1639
1642
|
/**
|
|
1640
1643
|
* Grid Row End
|
|
1641
1644
|
* @see https://tailwindcss.com/docs/grid-row
|
|
1642
1645
|
*/
|
|
1643
1646
|
"row-end": [{
|
|
1644
|
-
"row-end":
|
|
1647
|
+
"row-end": T()
|
|
1645
1648
|
}],
|
|
1646
1649
|
/**
|
|
1647
1650
|
* Grid Auto Flow
|
|
@@ -1655,70 +1658,70 @@ const dr = ({
|
|
|
1655
1658
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
1656
1659
|
*/
|
|
1657
1660
|
"auto-cols": [{
|
|
1658
|
-
"auto-cols":
|
|
1661
|
+
"auto-cols": u()
|
|
1659
1662
|
}],
|
|
1660
1663
|
/**
|
|
1661
1664
|
* Grid Auto Rows
|
|
1662
1665
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
1663
1666
|
*/
|
|
1664
1667
|
"auto-rows": [{
|
|
1665
|
-
"auto-rows":
|
|
1668
|
+
"auto-rows": u()
|
|
1666
1669
|
}],
|
|
1667
1670
|
/**
|
|
1668
1671
|
* Gap
|
|
1669
1672
|
* @see https://tailwindcss.com/docs/gap
|
|
1670
1673
|
*/
|
|
1671
1674
|
gap: [{
|
|
1672
|
-
gap:
|
|
1675
|
+
gap: x()
|
|
1673
1676
|
}],
|
|
1674
1677
|
/**
|
|
1675
1678
|
* Gap X
|
|
1676
1679
|
* @see https://tailwindcss.com/docs/gap
|
|
1677
1680
|
*/
|
|
1678
1681
|
"gap-x": [{
|
|
1679
|
-
"gap-x":
|
|
1682
|
+
"gap-x": x()
|
|
1680
1683
|
}],
|
|
1681
1684
|
/**
|
|
1682
1685
|
* Gap Y
|
|
1683
1686
|
* @see https://tailwindcss.com/docs/gap
|
|
1684
1687
|
*/
|
|
1685
1688
|
"gap-y": [{
|
|
1686
|
-
"gap-y":
|
|
1689
|
+
"gap-y": x()
|
|
1687
1690
|
}],
|
|
1688
1691
|
/**
|
|
1689
1692
|
* Justify Content
|
|
1690
1693
|
* @see https://tailwindcss.com/docs/justify-content
|
|
1691
1694
|
*/
|
|
1692
1695
|
"justify-content": [{
|
|
1693
|
-
justify: [...
|
|
1696
|
+
justify: [...j(), "normal"]
|
|
1694
1697
|
}],
|
|
1695
1698
|
/**
|
|
1696
1699
|
* Justify Items
|
|
1697
1700
|
* @see https://tailwindcss.com/docs/justify-items
|
|
1698
1701
|
*/
|
|
1699
1702
|
"justify-items": [{
|
|
1700
|
-
"justify-items": [...
|
|
1703
|
+
"justify-items": [...A(), "normal"]
|
|
1701
1704
|
}],
|
|
1702
1705
|
/**
|
|
1703
1706
|
* Justify Self
|
|
1704
1707
|
* @see https://tailwindcss.com/docs/justify-self
|
|
1705
1708
|
*/
|
|
1706
1709
|
"justify-self": [{
|
|
1707
|
-
"justify-self": ["auto", ...
|
|
1710
|
+
"justify-self": ["auto", ...A()]
|
|
1708
1711
|
}],
|
|
1709
1712
|
/**
|
|
1710
1713
|
* Align Content
|
|
1711
1714
|
* @see https://tailwindcss.com/docs/align-content
|
|
1712
1715
|
*/
|
|
1713
1716
|
"align-content": [{
|
|
1714
|
-
content: ["normal", ...
|
|
1717
|
+
content: ["normal", ...j()]
|
|
1715
1718
|
}],
|
|
1716
1719
|
/**
|
|
1717
1720
|
* Align Items
|
|
1718
1721
|
* @see https://tailwindcss.com/docs/align-items
|
|
1719
1722
|
*/
|
|
1720
1723
|
"align-items": [{
|
|
1721
|
-
items: [...
|
|
1724
|
+
items: [...A(), {
|
|
1722
1725
|
baseline: ["", "last"]
|
|
1723
1726
|
}]
|
|
1724
1727
|
}],
|
|
@@ -1727,7 +1730,7 @@ const dr = ({
|
|
|
1727
1730
|
* @see https://tailwindcss.com/docs/align-self
|
|
1728
1731
|
*/
|
|
1729
1732
|
"align-self": [{
|
|
1730
|
-
self: ["auto", ...
|
|
1733
|
+
self: ["auto", ...A(), {
|
|
1731
1734
|
baseline: ["", "last"]
|
|
1732
1735
|
}]
|
|
1733
1736
|
}],
|
|
@@ -1736,21 +1739,21 @@ const dr = ({
|
|
|
1736
1739
|
* @see https://tailwindcss.com/docs/place-content
|
|
1737
1740
|
*/
|
|
1738
1741
|
"place-content": [{
|
|
1739
|
-
"place-content":
|
|
1742
|
+
"place-content": j()
|
|
1740
1743
|
}],
|
|
1741
1744
|
/**
|
|
1742
1745
|
* Place Items
|
|
1743
1746
|
* @see https://tailwindcss.com/docs/place-items
|
|
1744
1747
|
*/
|
|
1745
1748
|
"place-items": [{
|
|
1746
|
-
"place-items": [...
|
|
1749
|
+
"place-items": [...A(), "baseline"]
|
|
1747
1750
|
}],
|
|
1748
1751
|
/**
|
|
1749
1752
|
* Place Self
|
|
1750
1753
|
* @see https://tailwindcss.com/docs/place-self
|
|
1751
1754
|
*/
|
|
1752
1755
|
"place-self": [{
|
|
1753
|
-
"place-self": ["auto", ...
|
|
1756
|
+
"place-self": ["auto", ...A()]
|
|
1754
1757
|
}],
|
|
1755
1758
|
// Spacing
|
|
1756
1759
|
/**
|
|
@@ -1758,133 +1761,133 @@ const dr = ({
|
|
|
1758
1761
|
* @see https://tailwindcss.com/docs/padding
|
|
1759
1762
|
*/
|
|
1760
1763
|
p: [{
|
|
1761
|
-
p:
|
|
1764
|
+
p: x()
|
|
1762
1765
|
}],
|
|
1763
1766
|
/**
|
|
1764
1767
|
* Padding X
|
|
1765
1768
|
* @see https://tailwindcss.com/docs/padding
|
|
1766
1769
|
*/
|
|
1767
1770
|
px: [{
|
|
1768
|
-
px:
|
|
1771
|
+
px: x()
|
|
1769
1772
|
}],
|
|
1770
1773
|
/**
|
|
1771
1774
|
* Padding Y
|
|
1772
1775
|
* @see https://tailwindcss.com/docs/padding
|
|
1773
1776
|
*/
|
|
1774
1777
|
py: [{
|
|
1775
|
-
py:
|
|
1778
|
+
py: x()
|
|
1776
1779
|
}],
|
|
1777
1780
|
/**
|
|
1778
1781
|
* Padding Start
|
|
1779
1782
|
* @see https://tailwindcss.com/docs/padding
|
|
1780
1783
|
*/
|
|
1781
1784
|
ps: [{
|
|
1782
|
-
ps:
|
|
1785
|
+
ps: x()
|
|
1783
1786
|
}],
|
|
1784
1787
|
/**
|
|
1785
1788
|
* Padding End
|
|
1786
1789
|
* @see https://tailwindcss.com/docs/padding
|
|
1787
1790
|
*/
|
|
1788
1791
|
pe: [{
|
|
1789
|
-
pe:
|
|
1792
|
+
pe: x()
|
|
1790
1793
|
}],
|
|
1791
1794
|
/**
|
|
1792
1795
|
* Padding Top
|
|
1793
1796
|
* @see https://tailwindcss.com/docs/padding
|
|
1794
1797
|
*/
|
|
1795
1798
|
pt: [{
|
|
1796
|
-
pt:
|
|
1799
|
+
pt: x()
|
|
1797
1800
|
}],
|
|
1798
1801
|
/**
|
|
1799
1802
|
* Padding Right
|
|
1800
1803
|
* @see https://tailwindcss.com/docs/padding
|
|
1801
1804
|
*/
|
|
1802
1805
|
pr: [{
|
|
1803
|
-
pr:
|
|
1806
|
+
pr: x()
|
|
1804
1807
|
}],
|
|
1805
1808
|
/**
|
|
1806
1809
|
* Padding Bottom
|
|
1807
1810
|
* @see https://tailwindcss.com/docs/padding
|
|
1808
1811
|
*/
|
|
1809
1812
|
pb: [{
|
|
1810
|
-
pb:
|
|
1813
|
+
pb: x()
|
|
1811
1814
|
}],
|
|
1812
1815
|
/**
|
|
1813
1816
|
* Padding Left
|
|
1814
1817
|
* @see https://tailwindcss.com/docs/padding
|
|
1815
1818
|
*/
|
|
1816
1819
|
pl: [{
|
|
1817
|
-
pl:
|
|
1820
|
+
pl: x()
|
|
1818
1821
|
}],
|
|
1819
1822
|
/**
|
|
1820
1823
|
* Margin
|
|
1821
1824
|
* @see https://tailwindcss.com/docs/margin
|
|
1822
1825
|
*/
|
|
1823
1826
|
m: [{
|
|
1824
|
-
m:
|
|
1827
|
+
m: D()
|
|
1825
1828
|
}],
|
|
1826
1829
|
/**
|
|
1827
1830
|
* Margin X
|
|
1828
1831
|
* @see https://tailwindcss.com/docs/margin
|
|
1829
1832
|
*/
|
|
1830
1833
|
mx: [{
|
|
1831
|
-
mx:
|
|
1834
|
+
mx: D()
|
|
1832
1835
|
}],
|
|
1833
1836
|
/**
|
|
1834
1837
|
* Margin Y
|
|
1835
1838
|
* @see https://tailwindcss.com/docs/margin
|
|
1836
1839
|
*/
|
|
1837
1840
|
my: [{
|
|
1838
|
-
my:
|
|
1841
|
+
my: D()
|
|
1839
1842
|
}],
|
|
1840
1843
|
/**
|
|
1841
1844
|
* Margin Start
|
|
1842
1845
|
* @see https://tailwindcss.com/docs/margin
|
|
1843
1846
|
*/
|
|
1844
1847
|
ms: [{
|
|
1845
|
-
ms:
|
|
1848
|
+
ms: D()
|
|
1846
1849
|
}],
|
|
1847
1850
|
/**
|
|
1848
1851
|
* Margin End
|
|
1849
1852
|
* @see https://tailwindcss.com/docs/margin
|
|
1850
1853
|
*/
|
|
1851
1854
|
me: [{
|
|
1852
|
-
me:
|
|
1855
|
+
me: D()
|
|
1853
1856
|
}],
|
|
1854
1857
|
/**
|
|
1855
1858
|
* Margin Top
|
|
1856
1859
|
* @see https://tailwindcss.com/docs/margin
|
|
1857
1860
|
*/
|
|
1858
1861
|
mt: [{
|
|
1859
|
-
mt:
|
|
1862
|
+
mt: D()
|
|
1860
1863
|
}],
|
|
1861
1864
|
/**
|
|
1862
1865
|
* Margin Right
|
|
1863
1866
|
* @see https://tailwindcss.com/docs/margin
|
|
1864
1867
|
*/
|
|
1865
1868
|
mr: [{
|
|
1866
|
-
mr:
|
|
1869
|
+
mr: D()
|
|
1867
1870
|
}],
|
|
1868
1871
|
/**
|
|
1869
1872
|
* Margin Bottom
|
|
1870
1873
|
* @see https://tailwindcss.com/docs/margin
|
|
1871
1874
|
*/
|
|
1872
1875
|
mb: [{
|
|
1873
|
-
mb:
|
|
1876
|
+
mb: D()
|
|
1874
1877
|
}],
|
|
1875
1878
|
/**
|
|
1876
1879
|
* Margin Left
|
|
1877
1880
|
* @see https://tailwindcss.com/docs/margin
|
|
1878
1881
|
*/
|
|
1879
1882
|
ml: [{
|
|
1880
|
-
ml:
|
|
1883
|
+
ml: D()
|
|
1881
1884
|
}],
|
|
1882
1885
|
/**
|
|
1883
1886
|
* Space Between X
|
|
1884
1887
|
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1885
1888
|
*/
|
|
1886
1889
|
"space-x": [{
|
|
1887
|
-
"space-x":
|
|
1890
|
+
"space-x": x()
|
|
1888
1891
|
}],
|
|
1889
1892
|
/**
|
|
1890
1893
|
* Space Between X Reverse
|
|
@@ -1896,7 +1899,7 @@ const dr = ({
|
|
|
1896
1899
|
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1897
1900
|
*/
|
|
1898
1901
|
"space-y": [{
|
|
1899
|
-
"space-y":
|
|
1902
|
+
"space-y": x()
|
|
1900
1903
|
}],
|
|
1901
1904
|
/**
|
|
1902
1905
|
* Space Between Y Reverse
|
|
@@ -1911,14 +1914,14 @@ const dr = ({
|
|
|
1911
1914
|
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
1912
1915
|
*/
|
|
1913
1916
|
size: [{
|
|
1914
|
-
size:
|
|
1917
|
+
size: U()
|
|
1915
1918
|
}],
|
|
1916
1919
|
/**
|
|
1917
1920
|
* Width
|
|
1918
1921
|
* @see https://tailwindcss.com/docs/width
|
|
1919
1922
|
*/
|
|
1920
1923
|
w: [{
|
|
1921
|
-
w: [
|
|
1924
|
+
w: [s, "screen", ...U()]
|
|
1922
1925
|
}],
|
|
1923
1926
|
/**
|
|
1924
1927
|
* Min-Width
|
|
@@ -1926,11 +1929,11 @@ const dr = ({
|
|
|
1926
1929
|
*/
|
|
1927
1930
|
"min-w": [{
|
|
1928
1931
|
"min-w": [
|
|
1929
|
-
|
|
1932
|
+
s,
|
|
1930
1933
|
"screen",
|
|
1931
1934
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1932
1935
|
"none",
|
|
1933
|
-
...
|
|
1936
|
+
...U()
|
|
1934
1937
|
]
|
|
1935
1938
|
}],
|
|
1936
1939
|
/**
|
|
@@ -1939,16 +1942,16 @@ const dr = ({
|
|
|
1939
1942
|
*/
|
|
1940
1943
|
"max-w": [{
|
|
1941
1944
|
"max-w": [
|
|
1942
|
-
|
|
1945
|
+
s,
|
|
1943
1946
|
"screen",
|
|
1944
1947
|
"none",
|
|
1945
1948
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1946
1949
|
"prose",
|
|
1947
1950
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1948
1951
|
{
|
|
1949
|
-
screen: [
|
|
1952
|
+
screen: [l]
|
|
1950
1953
|
},
|
|
1951
|
-
...
|
|
1954
|
+
...U()
|
|
1952
1955
|
]
|
|
1953
1956
|
}],
|
|
1954
1957
|
/**
|
|
@@ -1956,21 +1959,21 @@ const dr = ({
|
|
|
1956
1959
|
* @see https://tailwindcss.com/docs/height
|
|
1957
1960
|
*/
|
|
1958
1961
|
h: [{
|
|
1959
|
-
h: ["screen", "lh", ...
|
|
1962
|
+
h: ["screen", "lh", ...U()]
|
|
1960
1963
|
}],
|
|
1961
1964
|
/**
|
|
1962
1965
|
* Min-Height
|
|
1963
1966
|
* @see https://tailwindcss.com/docs/min-height
|
|
1964
1967
|
*/
|
|
1965
1968
|
"min-h": [{
|
|
1966
|
-
"min-h": ["screen", "lh", "none", ...
|
|
1969
|
+
"min-h": ["screen", "lh", "none", ...U()]
|
|
1967
1970
|
}],
|
|
1968
1971
|
/**
|
|
1969
1972
|
* Max-Height
|
|
1970
1973
|
* @see https://tailwindcss.com/docs/max-height
|
|
1971
1974
|
*/
|
|
1972
1975
|
"max-h": [{
|
|
1973
|
-
"max-h": ["screen", "lh", ...
|
|
1976
|
+
"max-h": ["screen", "lh", ...U()]
|
|
1974
1977
|
}],
|
|
1975
1978
|
// ------------------
|
|
1976
1979
|
// --- Typography ---
|
|
@@ -1980,7 +1983,7 @@ const dr = ({
|
|
|
1980
1983
|
* @see https://tailwindcss.com/docs/font-size
|
|
1981
1984
|
*/
|
|
1982
1985
|
"font-size": [{
|
|
1983
|
-
text: ["base", r,
|
|
1986
|
+
text: ["base", r, ye, ge]
|
|
1984
1987
|
}],
|
|
1985
1988
|
/**
|
|
1986
1989
|
* Font Smoothing
|
|
@@ -1997,21 +2000,21 @@ const dr = ({
|
|
|
1997
2000
|
* @see https://tailwindcss.com/docs/font-weight
|
|
1998
2001
|
*/
|
|
1999
2002
|
"font-weight": [{
|
|
2000
|
-
font: [n,
|
|
2003
|
+
font: [n, h, Ae]
|
|
2001
2004
|
}],
|
|
2002
2005
|
/**
|
|
2003
2006
|
* Font Stretch
|
|
2004
2007
|
* @see https://tailwindcss.com/docs/font-stretch
|
|
2005
2008
|
*/
|
|
2006
2009
|
"font-stretch": [{
|
|
2007
|
-
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded",
|
|
2010
|
+
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", Re, b]
|
|
2008
2011
|
}],
|
|
2009
2012
|
/**
|
|
2010
2013
|
* Font Family
|
|
2011
2014
|
* @see https://tailwindcss.com/docs/font-family
|
|
2012
2015
|
*/
|
|
2013
2016
|
"font-family": [{
|
|
2014
|
-
font: [
|
|
2017
|
+
font: [Xr, b, t]
|
|
2015
2018
|
}],
|
|
2016
2019
|
/**
|
|
2017
2020
|
* Font Variant Numeric
|
|
@@ -2048,14 +2051,14 @@ const dr = ({
|
|
|
2048
2051
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
2049
2052
|
*/
|
|
2050
2053
|
tracking: [{
|
|
2051
|
-
tracking: [
|
|
2054
|
+
tracking: [a, h, b]
|
|
2052
2055
|
}],
|
|
2053
2056
|
/**
|
|
2054
2057
|
* Line Clamp
|
|
2055
2058
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
2056
2059
|
*/
|
|
2057
2060
|
"line-clamp": [{
|
|
2058
|
-
"line-clamp": [_, "none",
|
|
2061
|
+
"line-clamp": [_, "none", h, Ae]
|
|
2059
2062
|
}],
|
|
2060
2063
|
/**
|
|
2061
2064
|
* Line Height
|
|
@@ -2064,8 +2067,8 @@ const dr = ({
|
|
|
2064
2067
|
leading: [{
|
|
2065
2068
|
leading: [
|
|
2066
2069
|
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
2067
|
-
|
|
2068
|
-
...
|
|
2070
|
+
c,
|
|
2071
|
+
...x()
|
|
2069
2072
|
]
|
|
2070
2073
|
}],
|
|
2071
2074
|
/**
|
|
@@ -2073,7 +2076,7 @@ const dr = ({
|
|
|
2073
2076
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
2074
2077
|
*/
|
|
2075
2078
|
"list-image": [{
|
|
2076
|
-
"list-image": ["none",
|
|
2079
|
+
"list-image": ["none", h, b]
|
|
2077
2080
|
}],
|
|
2078
2081
|
/**
|
|
2079
2082
|
* List Style Position
|
|
@@ -2087,7 +2090,7 @@ const dr = ({
|
|
|
2087
2090
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
2088
2091
|
*/
|
|
2089
2092
|
"list-style-type": [{
|
|
2090
|
-
list: ["disc", "decimal", "none",
|
|
2093
|
+
list: ["disc", "decimal", "none", h, b]
|
|
2091
2094
|
}],
|
|
2092
2095
|
/**
|
|
2093
2096
|
* Text Alignment
|
|
@@ -2102,14 +2105,14 @@ const dr = ({
|
|
|
2102
2105
|
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
2103
2106
|
*/
|
|
2104
2107
|
"placeholder-color": [{
|
|
2105
|
-
placeholder:
|
|
2108
|
+
placeholder: p()
|
|
2106
2109
|
}],
|
|
2107
2110
|
/**
|
|
2108
2111
|
* Text Color
|
|
2109
2112
|
* @see https://tailwindcss.com/docs/text-color
|
|
2110
2113
|
*/
|
|
2111
2114
|
"text-color": [{
|
|
2112
|
-
text:
|
|
2115
|
+
text: p()
|
|
2113
2116
|
}],
|
|
2114
2117
|
/**
|
|
2115
2118
|
* Text Decoration
|
|
@@ -2128,21 +2131,21 @@ const dr = ({
|
|
|
2128
2131
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
2129
2132
|
*/
|
|
2130
2133
|
"text-decoration-thickness": [{
|
|
2131
|
-
decoration: [_, "from-font", "auto",
|
|
2134
|
+
decoration: [_, "from-font", "auto", h, ge]
|
|
2132
2135
|
}],
|
|
2133
2136
|
/**
|
|
2134
2137
|
* Text Decoration Color
|
|
2135
2138
|
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
2136
2139
|
*/
|
|
2137
2140
|
"text-decoration-color": [{
|
|
2138
|
-
decoration:
|
|
2141
|
+
decoration: p()
|
|
2139
2142
|
}],
|
|
2140
2143
|
/**
|
|
2141
2144
|
* Text Underline Offset
|
|
2142
2145
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
2143
2146
|
*/
|
|
2144
2147
|
"underline-offset": [{
|
|
2145
|
-
"underline-offset": [_, "auto",
|
|
2148
|
+
"underline-offset": [_, "auto", h, b]
|
|
2146
2149
|
}],
|
|
2147
2150
|
/**
|
|
2148
2151
|
* Text Transform
|
|
@@ -2166,14 +2169,14 @@ const dr = ({
|
|
|
2166
2169
|
* @see https://tailwindcss.com/docs/text-indent
|
|
2167
2170
|
*/
|
|
2168
2171
|
indent: [{
|
|
2169
|
-
indent:
|
|
2172
|
+
indent: x()
|
|
2170
2173
|
}],
|
|
2171
2174
|
/**
|
|
2172
2175
|
* Vertical Alignment
|
|
2173
2176
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
2174
2177
|
*/
|
|
2175
2178
|
"vertical-align": [{
|
|
2176
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
2179
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", h, b]
|
|
2177
2180
|
}],
|
|
2178
2181
|
/**
|
|
2179
2182
|
* Whitespace
|
|
@@ -2208,7 +2211,7 @@ const dr = ({
|
|
|
2208
2211
|
* @see https://tailwindcss.com/docs/content
|
|
2209
2212
|
*/
|
|
2210
2213
|
content: [{
|
|
2211
|
-
content: ["none",
|
|
2214
|
+
content: ["none", h, b]
|
|
2212
2215
|
}],
|
|
2213
2216
|
// -------------------
|
|
2214
2217
|
// --- Backgrounds ---
|
|
@@ -2239,14 +2242,14 @@ const dr = ({
|
|
|
2239
2242
|
* @see https://tailwindcss.com/docs/background-position
|
|
2240
2243
|
*/
|
|
2241
2244
|
"bg-position": [{
|
|
2242
|
-
bg:
|
|
2245
|
+
bg: X()
|
|
2243
2246
|
}],
|
|
2244
2247
|
/**
|
|
2245
2248
|
* Background Repeat
|
|
2246
2249
|
* @see https://tailwindcss.com/docs/background-repeat
|
|
2247
2250
|
*/
|
|
2248
2251
|
"bg-repeat": [{
|
|
2249
|
-
bg:
|
|
2252
|
+
bg: B()
|
|
2250
2253
|
}],
|
|
2251
2254
|
/**
|
|
2252
2255
|
* Background Size
|
|
@@ -2263,59 +2266,59 @@ const dr = ({
|
|
|
2263
2266
|
bg: ["none", {
|
|
2264
2267
|
linear: [{
|
|
2265
2268
|
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
2266
|
-
},
|
|
2267
|
-
radial: ["",
|
|
2268
|
-
conic: [
|
|
2269
|
-
},
|
|
2269
|
+
}, ue, h, b],
|
|
2270
|
+
radial: ["", h, b],
|
|
2271
|
+
conic: [ue, h, b]
|
|
2272
|
+
}, Zr, Kr]
|
|
2270
2273
|
}],
|
|
2271
2274
|
/**
|
|
2272
2275
|
* Background Color
|
|
2273
2276
|
* @see https://tailwindcss.com/docs/background-color
|
|
2274
2277
|
*/
|
|
2275
2278
|
"bg-color": [{
|
|
2276
|
-
bg:
|
|
2279
|
+
bg: p()
|
|
2277
2280
|
}],
|
|
2278
2281
|
/**
|
|
2279
2282
|
* Gradient Color Stops From Position
|
|
2280
2283
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2281
2284
|
*/
|
|
2282
2285
|
"gradient-from-pos": [{
|
|
2283
|
-
from:
|
|
2286
|
+
from: y()
|
|
2284
2287
|
}],
|
|
2285
2288
|
/**
|
|
2286
2289
|
* Gradient Color Stops Via Position
|
|
2287
2290
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2288
2291
|
*/
|
|
2289
2292
|
"gradient-via-pos": [{
|
|
2290
|
-
via:
|
|
2293
|
+
via: y()
|
|
2291
2294
|
}],
|
|
2292
2295
|
/**
|
|
2293
2296
|
* Gradient Color Stops To Position
|
|
2294
2297
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2295
2298
|
*/
|
|
2296
2299
|
"gradient-to-pos": [{
|
|
2297
|
-
to:
|
|
2300
|
+
to: y()
|
|
2298
2301
|
}],
|
|
2299
2302
|
/**
|
|
2300
2303
|
* Gradient Color Stops From
|
|
2301
2304
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2302
2305
|
*/
|
|
2303
2306
|
"gradient-from": [{
|
|
2304
|
-
from:
|
|
2307
|
+
from: p()
|
|
2305
2308
|
}],
|
|
2306
2309
|
/**
|
|
2307
2310
|
* Gradient Color Stops Via
|
|
2308
2311
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2309
2312
|
*/
|
|
2310
2313
|
"gradient-via": [{
|
|
2311
|
-
via:
|
|
2314
|
+
via: p()
|
|
2312
2315
|
}],
|
|
2313
2316
|
/**
|
|
2314
2317
|
* Gradient Color Stops To
|
|
2315
2318
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2316
2319
|
*/
|
|
2317
2320
|
"gradient-to": [{
|
|
2318
|
-
to:
|
|
2321
|
+
to: p()
|
|
2319
2322
|
}],
|
|
2320
2323
|
// ---------------
|
|
2321
2324
|
// --- Borders ---
|
|
@@ -2531,70 +2534,70 @@ const dr = ({
|
|
|
2531
2534
|
* @see https://tailwindcss.com/docs/border-color
|
|
2532
2535
|
*/
|
|
2533
2536
|
"border-color": [{
|
|
2534
|
-
border:
|
|
2537
|
+
border: p()
|
|
2535
2538
|
}],
|
|
2536
2539
|
/**
|
|
2537
2540
|
* Border Color X
|
|
2538
2541
|
* @see https://tailwindcss.com/docs/border-color
|
|
2539
2542
|
*/
|
|
2540
2543
|
"border-color-x": [{
|
|
2541
|
-
"border-x":
|
|
2544
|
+
"border-x": p()
|
|
2542
2545
|
}],
|
|
2543
2546
|
/**
|
|
2544
2547
|
* Border Color Y
|
|
2545
2548
|
* @see https://tailwindcss.com/docs/border-color
|
|
2546
2549
|
*/
|
|
2547
2550
|
"border-color-y": [{
|
|
2548
|
-
"border-y":
|
|
2551
|
+
"border-y": p()
|
|
2549
2552
|
}],
|
|
2550
2553
|
/**
|
|
2551
2554
|
* Border Color S
|
|
2552
2555
|
* @see https://tailwindcss.com/docs/border-color
|
|
2553
2556
|
*/
|
|
2554
2557
|
"border-color-s": [{
|
|
2555
|
-
"border-s":
|
|
2558
|
+
"border-s": p()
|
|
2556
2559
|
}],
|
|
2557
2560
|
/**
|
|
2558
2561
|
* Border Color E
|
|
2559
2562
|
* @see https://tailwindcss.com/docs/border-color
|
|
2560
2563
|
*/
|
|
2561
2564
|
"border-color-e": [{
|
|
2562
|
-
"border-e":
|
|
2565
|
+
"border-e": p()
|
|
2563
2566
|
}],
|
|
2564
2567
|
/**
|
|
2565
2568
|
* Border Color Top
|
|
2566
2569
|
* @see https://tailwindcss.com/docs/border-color
|
|
2567
2570
|
*/
|
|
2568
2571
|
"border-color-t": [{
|
|
2569
|
-
"border-t":
|
|
2572
|
+
"border-t": p()
|
|
2570
2573
|
}],
|
|
2571
2574
|
/**
|
|
2572
2575
|
* Border Color Right
|
|
2573
2576
|
* @see https://tailwindcss.com/docs/border-color
|
|
2574
2577
|
*/
|
|
2575
2578
|
"border-color-r": [{
|
|
2576
|
-
"border-r":
|
|
2579
|
+
"border-r": p()
|
|
2577
2580
|
}],
|
|
2578
2581
|
/**
|
|
2579
2582
|
* Border Color Bottom
|
|
2580
2583
|
* @see https://tailwindcss.com/docs/border-color
|
|
2581
2584
|
*/
|
|
2582
2585
|
"border-color-b": [{
|
|
2583
|
-
"border-b":
|
|
2586
|
+
"border-b": p()
|
|
2584
2587
|
}],
|
|
2585
2588
|
/**
|
|
2586
2589
|
* Border Color Left
|
|
2587
2590
|
* @see https://tailwindcss.com/docs/border-color
|
|
2588
2591
|
*/
|
|
2589
2592
|
"border-color-l": [{
|
|
2590
|
-
"border-l":
|
|
2593
|
+
"border-l": p()
|
|
2591
2594
|
}],
|
|
2592
2595
|
/**
|
|
2593
2596
|
* Divide Color
|
|
2594
2597
|
* @see https://tailwindcss.com/docs/divide-color
|
|
2595
2598
|
*/
|
|
2596
2599
|
"divide-color": [{
|
|
2597
|
-
divide:
|
|
2600
|
+
divide: p()
|
|
2598
2601
|
}],
|
|
2599
2602
|
/**
|
|
2600
2603
|
* Outline Style
|
|
@@ -2608,21 +2611,21 @@ const dr = ({
|
|
|
2608
2611
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
2609
2612
|
*/
|
|
2610
2613
|
"outline-offset": [{
|
|
2611
|
-
"outline-offset": [_,
|
|
2614
|
+
"outline-offset": [_, h, b]
|
|
2612
2615
|
}],
|
|
2613
2616
|
/**
|
|
2614
2617
|
* Outline Width
|
|
2615
2618
|
* @see https://tailwindcss.com/docs/outline-width
|
|
2616
2619
|
*/
|
|
2617
2620
|
"outline-w": [{
|
|
2618
|
-
outline: ["", _,
|
|
2621
|
+
outline: ["", _, ye, ge]
|
|
2619
2622
|
}],
|
|
2620
2623
|
/**
|
|
2621
2624
|
* Outline Color
|
|
2622
2625
|
* @see https://tailwindcss.com/docs/outline-color
|
|
2623
2626
|
*/
|
|
2624
2627
|
"outline-color": [{
|
|
2625
|
-
outline:
|
|
2628
|
+
outline: p()
|
|
2626
2629
|
}],
|
|
2627
2630
|
// ---------------
|
|
2628
2631
|
// --- Effects ---
|
|
@@ -2636,9 +2639,9 @@ const dr = ({
|
|
|
2636
2639
|
// Deprecated since Tailwind CSS v4.0.0
|
|
2637
2640
|
"",
|
|
2638
2641
|
"none",
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
+
R,
|
|
2643
|
+
je,
|
|
2644
|
+
Te
|
|
2642
2645
|
]
|
|
2643
2646
|
}],
|
|
2644
2647
|
/**
|
|
@@ -2646,21 +2649,21 @@ const dr = ({
|
|
|
2646
2649
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
2647
2650
|
*/
|
|
2648
2651
|
"shadow-color": [{
|
|
2649
|
-
shadow:
|
|
2652
|
+
shadow: p()
|
|
2650
2653
|
}],
|
|
2651
2654
|
/**
|
|
2652
2655
|
* Inset Box Shadow
|
|
2653
2656
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
2654
2657
|
*/
|
|
2655
2658
|
"inset-shadow": [{
|
|
2656
|
-
"inset-shadow": ["none",
|
|
2659
|
+
"inset-shadow": ["none", L, je, Te]
|
|
2657
2660
|
}],
|
|
2658
2661
|
/**
|
|
2659
2662
|
* Inset Box Shadow Color
|
|
2660
2663
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
2661
2664
|
*/
|
|
2662
2665
|
"inset-shadow-color": [{
|
|
2663
|
-
"inset-shadow":
|
|
2666
|
+
"inset-shadow": p()
|
|
2664
2667
|
}],
|
|
2665
2668
|
/**
|
|
2666
2669
|
* Ring Width
|
|
@@ -2681,7 +2684,7 @@ const dr = ({
|
|
|
2681
2684
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
2682
2685
|
*/
|
|
2683
2686
|
"ring-color": [{
|
|
2684
|
-
ring:
|
|
2687
|
+
ring: p()
|
|
2685
2688
|
}],
|
|
2686
2689
|
/**
|
|
2687
2690
|
* Ring Offset Width
|
|
@@ -2690,7 +2693,7 @@ const dr = ({
|
|
|
2690
2693
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2691
2694
|
*/
|
|
2692
2695
|
"ring-offset-w": [{
|
|
2693
|
-
"ring-offset": [_,
|
|
2696
|
+
"ring-offset": [_, ge]
|
|
2694
2697
|
}],
|
|
2695
2698
|
/**
|
|
2696
2699
|
* Ring Offset Color
|
|
@@ -2699,7 +2702,7 @@ const dr = ({
|
|
|
2699
2702
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
2700
2703
|
*/
|
|
2701
2704
|
"ring-offset-color": [{
|
|
2702
|
-
"ring-offset":
|
|
2705
|
+
"ring-offset": p()
|
|
2703
2706
|
}],
|
|
2704
2707
|
/**
|
|
2705
2708
|
* Inset Ring Width
|
|
@@ -2713,42 +2716,42 @@ const dr = ({
|
|
|
2713
2716
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
2714
2717
|
*/
|
|
2715
2718
|
"inset-ring-color": [{
|
|
2716
|
-
"inset-ring":
|
|
2719
|
+
"inset-ring": p()
|
|
2717
2720
|
}],
|
|
2718
2721
|
/**
|
|
2719
2722
|
* Text Shadow
|
|
2720
2723
|
* @see https://tailwindcss.com/docs/text-shadow
|
|
2721
2724
|
*/
|
|
2722
2725
|
"text-shadow": [{
|
|
2723
|
-
"text-shadow": ["none",
|
|
2726
|
+
"text-shadow": ["none", M, je, Te]
|
|
2724
2727
|
}],
|
|
2725
2728
|
/**
|
|
2726
2729
|
* Text Shadow Color
|
|
2727
2730
|
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
2728
2731
|
*/
|
|
2729
2732
|
"text-shadow-color": [{
|
|
2730
|
-
"text-shadow":
|
|
2733
|
+
"text-shadow": p()
|
|
2731
2734
|
}],
|
|
2732
2735
|
/**
|
|
2733
2736
|
* Opacity
|
|
2734
2737
|
* @see https://tailwindcss.com/docs/opacity
|
|
2735
2738
|
*/
|
|
2736
2739
|
opacity: [{
|
|
2737
|
-
opacity: [_,
|
|
2740
|
+
opacity: [_, h, b]
|
|
2738
2741
|
}],
|
|
2739
2742
|
/**
|
|
2740
2743
|
* Mix Blend Mode
|
|
2741
2744
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
2742
2745
|
*/
|
|
2743
2746
|
"mix-blend": [{
|
|
2744
|
-
"mix-blend": [...
|
|
2747
|
+
"mix-blend": [...ne(), "plus-darker", "plus-lighter"]
|
|
2745
2748
|
}],
|
|
2746
2749
|
/**
|
|
2747
2750
|
* Background Blend Mode
|
|
2748
2751
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
2749
2752
|
*/
|
|
2750
2753
|
"bg-blend": [{
|
|
2751
|
-
"bg-blend":
|
|
2754
|
+
"bg-blend": ne()
|
|
2752
2755
|
}],
|
|
2753
2756
|
/**
|
|
2754
2757
|
* Mask Clip
|
|
@@ -2772,103 +2775,103 @@ const dr = ({
|
|
|
2772
2775
|
"mask-linear": [_]
|
|
2773
2776
|
}],
|
|
2774
2777
|
"mask-image-linear-from-pos": [{
|
|
2775
|
-
"mask-linear-from":
|
|
2778
|
+
"mask-linear-from": E()
|
|
2776
2779
|
}],
|
|
2777
2780
|
"mask-image-linear-to-pos": [{
|
|
2778
|
-
"mask-linear-to":
|
|
2781
|
+
"mask-linear-to": E()
|
|
2779
2782
|
}],
|
|
2780
2783
|
"mask-image-linear-from-color": [{
|
|
2781
|
-
"mask-linear-from":
|
|
2784
|
+
"mask-linear-from": p()
|
|
2782
2785
|
}],
|
|
2783
2786
|
"mask-image-linear-to-color": [{
|
|
2784
|
-
"mask-linear-to":
|
|
2787
|
+
"mask-linear-to": p()
|
|
2785
2788
|
}],
|
|
2786
2789
|
"mask-image-t-from-pos": [{
|
|
2787
|
-
"mask-t-from":
|
|
2790
|
+
"mask-t-from": E()
|
|
2788
2791
|
}],
|
|
2789
2792
|
"mask-image-t-to-pos": [{
|
|
2790
|
-
"mask-t-to":
|
|
2793
|
+
"mask-t-to": E()
|
|
2791
2794
|
}],
|
|
2792
2795
|
"mask-image-t-from-color": [{
|
|
2793
|
-
"mask-t-from":
|
|
2796
|
+
"mask-t-from": p()
|
|
2794
2797
|
}],
|
|
2795
2798
|
"mask-image-t-to-color": [{
|
|
2796
|
-
"mask-t-to":
|
|
2799
|
+
"mask-t-to": p()
|
|
2797
2800
|
}],
|
|
2798
2801
|
"mask-image-r-from-pos": [{
|
|
2799
|
-
"mask-r-from":
|
|
2802
|
+
"mask-r-from": E()
|
|
2800
2803
|
}],
|
|
2801
2804
|
"mask-image-r-to-pos": [{
|
|
2802
|
-
"mask-r-to":
|
|
2805
|
+
"mask-r-to": E()
|
|
2803
2806
|
}],
|
|
2804
2807
|
"mask-image-r-from-color": [{
|
|
2805
|
-
"mask-r-from":
|
|
2808
|
+
"mask-r-from": p()
|
|
2806
2809
|
}],
|
|
2807
2810
|
"mask-image-r-to-color": [{
|
|
2808
|
-
"mask-r-to":
|
|
2811
|
+
"mask-r-to": p()
|
|
2809
2812
|
}],
|
|
2810
2813
|
"mask-image-b-from-pos": [{
|
|
2811
|
-
"mask-b-from":
|
|
2814
|
+
"mask-b-from": E()
|
|
2812
2815
|
}],
|
|
2813
2816
|
"mask-image-b-to-pos": [{
|
|
2814
|
-
"mask-b-to":
|
|
2817
|
+
"mask-b-to": E()
|
|
2815
2818
|
}],
|
|
2816
2819
|
"mask-image-b-from-color": [{
|
|
2817
|
-
"mask-b-from":
|
|
2820
|
+
"mask-b-from": p()
|
|
2818
2821
|
}],
|
|
2819
2822
|
"mask-image-b-to-color": [{
|
|
2820
|
-
"mask-b-to":
|
|
2823
|
+
"mask-b-to": p()
|
|
2821
2824
|
}],
|
|
2822
2825
|
"mask-image-l-from-pos": [{
|
|
2823
|
-
"mask-l-from":
|
|
2826
|
+
"mask-l-from": E()
|
|
2824
2827
|
}],
|
|
2825
2828
|
"mask-image-l-to-pos": [{
|
|
2826
|
-
"mask-l-to":
|
|
2829
|
+
"mask-l-to": E()
|
|
2827
2830
|
}],
|
|
2828
2831
|
"mask-image-l-from-color": [{
|
|
2829
|
-
"mask-l-from":
|
|
2832
|
+
"mask-l-from": p()
|
|
2830
2833
|
}],
|
|
2831
2834
|
"mask-image-l-to-color": [{
|
|
2832
|
-
"mask-l-to":
|
|
2835
|
+
"mask-l-to": p()
|
|
2833
2836
|
}],
|
|
2834
2837
|
"mask-image-x-from-pos": [{
|
|
2835
|
-
"mask-x-from":
|
|
2838
|
+
"mask-x-from": E()
|
|
2836
2839
|
}],
|
|
2837
2840
|
"mask-image-x-to-pos": [{
|
|
2838
|
-
"mask-x-to":
|
|
2841
|
+
"mask-x-to": E()
|
|
2839
2842
|
}],
|
|
2840
2843
|
"mask-image-x-from-color": [{
|
|
2841
|
-
"mask-x-from":
|
|
2844
|
+
"mask-x-from": p()
|
|
2842
2845
|
}],
|
|
2843
2846
|
"mask-image-x-to-color": [{
|
|
2844
|
-
"mask-x-to":
|
|
2847
|
+
"mask-x-to": p()
|
|
2845
2848
|
}],
|
|
2846
2849
|
"mask-image-y-from-pos": [{
|
|
2847
|
-
"mask-y-from":
|
|
2850
|
+
"mask-y-from": E()
|
|
2848
2851
|
}],
|
|
2849
2852
|
"mask-image-y-to-pos": [{
|
|
2850
|
-
"mask-y-to":
|
|
2853
|
+
"mask-y-to": E()
|
|
2851
2854
|
}],
|
|
2852
2855
|
"mask-image-y-from-color": [{
|
|
2853
|
-
"mask-y-from":
|
|
2856
|
+
"mask-y-from": p()
|
|
2854
2857
|
}],
|
|
2855
2858
|
"mask-image-y-to-color": [{
|
|
2856
|
-
"mask-y-to":
|
|
2859
|
+
"mask-y-to": p()
|
|
2857
2860
|
}],
|
|
2858
2861
|
"mask-image-radial": [{
|
|
2859
|
-
"mask-radial": [
|
|
2862
|
+
"mask-radial": [h, b]
|
|
2860
2863
|
}],
|
|
2861
2864
|
"mask-image-radial-from-pos": [{
|
|
2862
|
-
"mask-radial-from":
|
|
2865
|
+
"mask-radial-from": E()
|
|
2863
2866
|
}],
|
|
2864
2867
|
"mask-image-radial-to-pos": [{
|
|
2865
|
-
"mask-radial-to":
|
|
2868
|
+
"mask-radial-to": E()
|
|
2866
2869
|
}],
|
|
2867
2870
|
"mask-image-radial-from-color": [{
|
|
2868
|
-
"mask-radial-from":
|
|
2871
|
+
"mask-radial-from": p()
|
|
2869
2872
|
}],
|
|
2870
2873
|
"mask-image-radial-to-color": [{
|
|
2871
|
-
"mask-radial-to":
|
|
2874
|
+
"mask-radial-to": p()
|
|
2872
2875
|
}],
|
|
2873
2876
|
"mask-image-radial-shape": [{
|
|
2874
2877
|
"mask-radial": ["circle", "ellipse"]
|
|
@@ -2880,22 +2883,22 @@ const dr = ({
|
|
|
2880
2883
|
}]
|
|
2881
2884
|
}],
|
|
2882
2885
|
"mask-image-radial-pos": [{
|
|
2883
|
-
"mask-radial-at":
|
|
2886
|
+
"mask-radial-at": N()
|
|
2884
2887
|
}],
|
|
2885
2888
|
"mask-image-conic-pos": [{
|
|
2886
2889
|
"mask-conic": [_]
|
|
2887
2890
|
}],
|
|
2888
2891
|
"mask-image-conic-from-pos": [{
|
|
2889
|
-
"mask-conic-from":
|
|
2892
|
+
"mask-conic-from": E()
|
|
2890
2893
|
}],
|
|
2891
2894
|
"mask-image-conic-to-pos": [{
|
|
2892
|
-
"mask-conic-to":
|
|
2895
|
+
"mask-conic-to": E()
|
|
2893
2896
|
}],
|
|
2894
2897
|
"mask-image-conic-from-color": [{
|
|
2895
|
-
"mask-conic-from":
|
|
2898
|
+
"mask-conic-from": p()
|
|
2896
2899
|
}],
|
|
2897
2900
|
"mask-image-conic-to-color": [{
|
|
2898
|
-
"mask-conic-to":
|
|
2901
|
+
"mask-conic-to": p()
|
|
2899
2902
|
}],
|
|
2900
2903
|
/**
|
|
2901
2904
|
* Mask Mode
|
|
@@ -2916,14 +2919,14 @@ const dr = ({
|
|
|
2916
2919
|
* @see https://tailwindcss.com/docs/mask-position
|
|
2917
2920
|
*/
|
|
2918
2921
|
"mask-position": [{
|
|
2919
|
-
mask:
|
|
2922
|
+
mask: X()
|
|
2920
2923
|
}],
|
|
2921
2924
|
/**
|
|
2922
2925
|
* Mask Repeat
|
|
2923
2926
|
* @see https://tailwindcss.com/docs/mask-repeat
|
|
2924
2927
|
*/
|
|
2925
2928
|
"mask-repeat": [{
|
|
2926
|
-
mask:
|
|
2929
|
+
mask: B()
|
|
2927
2930
|
}],
|
|
2928
2931
|
/**
|
|
2929
2932
|
* Mask Size
|
|
@@ -2944,7 +2947,7 @@ const dr = ({
|
|
|
2944
2947
|
* @see https://tailwindcss.com/docs/mask-image
|
|
2945
2948
|
*/
|
|
2946
2949
|
"mask-image": [{
|
|
2947
|
-
mask: ["none",
|
|
2950
|
+
mask: ["none", h, b]
|
|
2948
2951
|
}],
|
|
2949
2952
|
// ---------------
|
|
2950
2953
|
// --- Filters ---
|
|
@@ -2958,8 +2961,8 @@ const dr = ({
|
|
|
2958
2961
|
// Deprecated since Tailwind CSS v3.0.0
|
|
2959
2962
|
"",
|
|
2960
2963
|
"none",
|
|
2961
|
-
|
|
2962
|
-
|
|
2964
|
+
h,
|
|
2965
|
+
b
|
|
2963
2966
|
]
|
|
2964
2967
|
}],
|
|
2965
2968
|
/**
|
|
@@ -2974,14 +2977,14 @@ const dr = ({
|
|
|
2974
2977
|
* @see https://tailwindcss.com/docs/brightness
|
|
2975
2978
|
*/
|
|
2976
2979
|
brightness: [{
|
|
2977
|
-
brightness: [_,
|
|
2980
|
+
brightness: [_, h, b]
|
|
2978
2981
|
}],
|
|
2979
2982
|
/**
|
|
2980
2983
|
* Contrast
|
|
2981
2984
|
* @see https://tailwindcss.com/docs/contrast
|
|
2982
2985
|
*/
|
|
2983
2986
|
contrast: [{
|
|
2984
|
-
contrast: [_,
|
|
2987
|
+
contrast: [_, h, b]
|
|
2985
2988
|
}],
|
|
2986
2989
|
/**
|
|
2987
2990
|
* Drop Shadow
|
|
@@ -2993,8 +2996,8 @@ const dr = ({
|
|
|
2993
2996
|
"",
|
|
2994
2997
|
"none",
|
|
2995
2998
|
q,
|
|
2996
|
-
|
|
2997
|
-
|
|
2999
|
+
je,
|
|
3000
|
+
Te
|
|
2998
3001
|
]
|
|
2999
3002
|
}],
|
|
3000
3003
|
/**
|
|
@@ -3002,42 +3005,42 @@ const dr = ({
|
|
|
3002
3005
|
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
3003
3006
|
*/
|
|
3004
3007
|
"drop-shadow-color": [{
|
|
3005
|
-
"drop-shadow":
|
|
3008
|
+
"drop-shadow": p()
|
|
3006
3009
|
}],
|
|
3007
3010
|
/**
|
|
3008
3011
|
* Grayscale
|
|
3009
3012
|
* @see https://tailwindcss.com/docs/grayscale
|
|
3010
3013
|
*/
|
|
3011
3014
|
grayscale: [{
|
|
3012
|
-
grayscale: ["", _,
|
|
3015
|
+
grayscale: ["", _, h, b]
|
|
3013
3016
|
}],
|
|
3014
3017
|
/**
|
|
3015
3018
|
* Hue Rotate
|
|
3016
3019
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
3017
3020
|
*/
|
|
3018
3021
|
"hue-rotate": [{
|
|
3019
|
-
"hue-rotate": [_,
|
|
3022
|
+
"hue-rotate": [_, h, b]
|
|
3020
3023
|
}],
|
|
3021
3024
|
/**
|
|
3022
3025
|
* Invert
|
|
3023
3026
|
* @see https://tailwindcss.com/docs/invert
|
|
3024
3027
|
*/
|
|
3025
3028
|
invert: [{
|
|
3026
|
-
invert: ["", _,
|
|
3029
|
+
invert: ["", _, h, b]
|
|
3027
3030
|
}],
|
|
3028
3031
|
/**
|
|
3029
3032
|
* Saturate
|
|
3030
3033
|
* @see https://tailwindcss.com/docs/saturate
|
|
3031
3034
|
*/
|
|
3032
3035
|
saturate: [{
|
|
3033
|
-
saturate: [_,
|
|
3036
|
+
saturate: [_, h, b]
|
|
3034
3037
|
}],
|
|
3035
3038
|
/**
|
|
3036
3039
|
* Sepia
|
|
3037
3040
|
* @see https://tailwindcss.com/docs/sepia
|
|
3038
3041
|
*/
|
|
3039
3042
|
sepia: [{
|
|
3040
|
-
sepia: ["", _,
|
|
3043
|
+
sepia: ["", _, h, b]
|
|
3041
3044
|
}],
|
|
3042
3045
|
/**
|
|
3043
3046
|
* Backdrop Filter
|
|
@@ -3048,8 +3051,8 @@ const dr = ({
|
|
|
3048
3051
|
// Deprecated since Tailwind CSS v3.0.0
|
|
3049
3052
|
"",
|
|
3050
3053
|
"none",
|
|
3051
|
-
|
|
3052
|
-
|
|
3054
|
+
h,
|
|
3055
|
+
b
|
|
3053
3056
|
]
|
|
3054
3057
|
}],
|
|
3055
3058
|
/**
|
|
@@ -3064,56 +3067,56 @@ const dr = ({
|
|
|
3064
3067
|
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
3065
3068
|
*/
|
|
3066
3069
|
"backdrop-brightness": [{
|
|
3067
|
-
"backdrop-brightness": [_,
|
|
3070
|
+
"backdrop-brightness": [_, h, b]
|
|
3068
3071
|
}],
|
|
3069
3072
|
/**
|
|
3070
3073
|
* Backdrop Contrast
|
|
3071
3074
|
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
3072
3075
|
*/
|
|
3073
3076
|
"backdrop-contrast": [{
|
|
3074
|
-
"backdrop-contrast": [_,
|
|
3077
|
+
"backdrop-contrast": [_, h, b]
|
|
3075
3078
|
}],
|
|
3076
3079
|
/**
|
|
3077
3080
|
* Backdrop Grayscale
|
|
3078
3081
|
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
3079
3082
|
*/
|
|
3080
3083
|
"backdrop-grayscale": [{
|
|
3081
|
-
"backdrop-grayscale": ["", _,
|
|
3084
|
+
"backdrop-grayscale": ["", _, h, b]
|
|
3082
3085
|
}],
|
|
3083
3086
|
/**
|
|
3084
3087
|
* Backdrop Hue Rotate
|
|
3085
3088
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
3086
3089
|
*/
|
|
3087
3090
|
"backdrop-hue-rotate": [{
|
|
3088
|
-
"backdrop-hue-rotate": [_,
|
|
3091
|
+
"backdrop-hue-rotate": [_, h, b]
|
|
3089
3092
|
}],
|
|
3090
3093
|
/**
|
|
3091
3094
|
* Backdrop Invert
|
|
3092
3095
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
3093
3096
|
*/
|
|
3094
3097
|
"backdrop-invert": [{
|
|
3095
|
-
"backdrop-invert": ["", _,
|
|
3098
|
+
"backdrop-invert": ["", _, h, b]
|
|
3096
3099
|
}],
|
|
3097
3100
|
/**
|
|
3098
3101
|
* Backdrop Opacity
|
|
3099
3102
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
3100
3103
|
*/
|
|
3101
3104
|
"backdrop-opacity": [{
|
|
3102
|
-
"backdrop-opacity": [_,
|
|
3105
|
+
"backdrop-opacity": [_, h, b]
|
|
3103
3106
|
}],
|
|
3104
3107
|
/**
|
|
3105
3108
|
* Backdrop Saturate
|
|
3106
3109
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
3107
3110
|
*/
|
|
3108
3111
|
"backdrop-saturate": [{
|
|
3109
|
-
"backdrop-saturate": [_,
|
|
3112
|
+
"backdrop-saturate": [_, h, b]
|
|
3110
3113
|
}],
|
|
3111
3114
|
/**
|
|
3112
3115
|
* Backdrop Sepia
|
|
3113
3116
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3114
3117
|
*/
|
|
3115
3118
|
"backdrop-sepia": [{
|
|
3116
|
-
"backdrop-sepia": ["", _,
|
|
3119
|
+
"backdrop-sepia": ["", _, h, b]
|
|
3117
3120
|
}],
|
|
3118
3121
|
// --------------
|
|
3119
3122
|
// --- Tables ---
|
|
@@ -3130,21 +3133,21 @@ const dr = ({
|
|
|
3130
3133
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
3131
3134
|
*/
|
|
3132
3135
|
"border-spacing": [{
|
|
3133
|
-
"border-spacing":
|
|
3136
|
+
"border-spacing": x()
|
|
3134
3137
|
}],
|
|
3135
3138
|
/**
|
|
3136
3139
|
* Border Spacing X
|
|
3137
3140
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
3138
3141
|
*/
|
|
3139
3142
|
"border-spacing-x": [{
|
|
3140
|
-
"border-spacing-x":
|
|
3143
|
+
"border-spacing-x": x()
|
|
3141
3144
|
}],
|
|
3142
3145
|
/**
|
|
3143
3146
|
* Border Spacing Y
|
|
3144
3147
|
* @see https://tailwindcss.com/docs/border-spacing
|
|
3145
3148
|
*/
|
|
3146
3149
|
"border-spacing-y": [{
|
|
3147
|
-
"border-spacing-y":
|
|
3150
|
+
"border-spacing-y": x()
|
|
3148
3151
|
}],
|
|
3149
3152
|
/**
|
|
3150
3153
|
* Table Layout
|
|
@@ -3168,7 +3171,7 @@ const dr = ({
|
|
|
3168
3171
|
* @see https://tailwindcss.com/docs/transition-property
|
|
3169
3172
|
*/
|
|
3170
3173
|
transition: [{
|
|
3171
|
-
transition: ["", "all", "colors", "opacity", "shadow", "transform", "none",
|
|
3174
|
+
transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", h, b]
|
|
3172
3175
|
}],
|
|
3173
3176
|
/**
|
|
3174
3177
|
* Transition Behavior
|
|
@@ -3182,28 +3185,28 @@ const dr = ({
|
|
|
3182
3185
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
3183
3186
|
*/
|
|
3184
3187
|
duration: [{
|
|
3185
|
-
duration: [_, "initial",
|
|
3188
|
+
duration: [_, "initial", h, b]
|
|
3186
3189
|
}],
|
|
3187
3190
|
/**
|
|
3188
3191
|
* Transition Timing Function
|
|
3189
3192
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
3190
3193
|
*/
|
|
3191
3194
|
ease: [{
|
|
3192
|
-
ease: ["linear", "initial",
|
|
3195
|
+
ease: ["linear", "initial", H, h, b]
|
|
3193
3196
|
}],
|
|
3194
3197
|
/**
|
|
3195
3198
|
* Transition Delay
|
|
3196
3199
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
3197
3200
|
*/
|
|
3198
3201
|
delay: [{
|
|
3199
|
-
delay: [_,
|
|
3202
|
+
delay: [_, h, b]
|
|
3200
3203
|
}],
|
|
3201
3204
|
/**
|
|
3202
3205
|
* Animation
|
|
3203
3206
|
* @see https://tailwindcss.com/docs/animation
|
|
3204
3207
|
*/
|
|
3205
3208
|
animate: [{
|
|
3206
|
-
animate: ["none",
|
|
3209
|
+
animate: ["none", $, h, b]
|
|
3207
3210
|
}],
|
|
3208
3211
|
// ------------------
|
|
3209
3212
|
// --- Transforms ---
|
|
@@ -3220,70 +3223,70 @@ const dr = ({
|
|
|
3220
3223
|
* @see https://tailwindcss.com/docs/perspective
|
|
3221
3224
|
*/
|
|
3222
3225
|
perspective: [{
|
|
3223
|
-
perspective: [
|
|
3226
|
+
perspective: [F, h, b]
|
|
3224
3227
|
}],
|
|
3225
3228
|
/**
|
|
3226
3229
|
* Perspective Origin
|
|
3227
3230
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
3228
3231
|
*/
|
|
3229
3232
|
"perspective-origin": [{
|
|
3230
|
-
"perspective-origin":
|
|
3233
|
+
"perspective-origin": V()
|
|
3231
3234
|
}],
|
|
3232
3235
|
/**
|
|
3233
3236
|
* Rotate
|
|
3234
3237
|
* @see https://tailwindcss.com/docs/rotate
|
|
3235
3238
|
*/
|
|
3236
3239
|
rotate: [{
|
|
3237
|
-
rotate:
|
|
3240
|
+
rotate: te()
|
|
3238
3241
|
}],
|
|
3239
3242
|
/**
|
|
3240
3243
|
* Rotate X
|
|
3241
3244
|
* @see https://tailwindcss.com/docs/rotate
|
|
3242
3245
|
*/
|
|
3243
3246
|
"rotate-x": [{
|
|
3244
|
-
"rotate-x":
|
|
3247
|
+
"rotate-x": te()
|
|
3245
3248
|
}],
|
|
3246
3249
|
/**
|
|
3247
3250
|
* Rotate Y
|
|
3248
3251
|
* @see https://tailwindcss.com/docs/rotate
|
|
3249
3252
|
*/
|
|
3250
3253
|
"rotate-y": [{
|
|
3251
|
-
"rotate-y":
|
|
3254
|
+
"rotate-y": te()
|
|
3252
3255
|
}],
|
|
3253
3256
|
/**
|
|
3254
3257
|
* Rotate Z
|
|
3255
3258
|
* @see https://tailwindcss.com/docs/rotate
|
|
3256
3259
|
*/
|
|
3257
3260
|
"rotate-z": [{
|
|
3258
|
-
"rotate-z":
|
|
3261
|
+
"rotate-z": te()
|
|
3259
3262
|
}],
|
|
3260
3263
|
/**
|
|
3261
3264
|
* Scale
|
|
3262
3265
|
* @see https://tailwindcss.com/docs/scale
|
|
3263
3266
|
*/
|
|
3264
3267
|
scale: [{
|
|
3265
|
-
scale:
|
|
3268
|
+
scale: oe()
|
|
3266
3269
|
}],
|
|
3267
3270
|
/**
|
|
3268
3271
|
* Scale X
|
|
3269
3272
|
* @see https://tailwindcss.com/docs/scale
|
|
3270
3273
|
*/
|
|
3271
3274
|
"scale-x": [{
|
|
3272
|
-
"scale-x":
|
|
3275
|
+
"scale-x": oe()
|
|
3273
3276
|
}],
|
|
3274
3277
|
/**
|
|
3275
3278
|
* Scale Y
|
|
3276
3279
|
* @see https://tailwindcss.com/docs/scale
|
|
3277
3280
|
*/
|
|
3278
3281
|
"scale-y": [{
|
|
3279
|
-
"scale-y":
|
|
3282
|
+
"scale-y": oe()
|
|
3280
3283
|
}],
|
|
3281
3284
|
/**
|
|
3282
3285
|
* Scale Z
|
|
3283
3286
|
* @see https://tailwindcss.com/docs/scale
|
|
3284
3287
|
*/
|
|
3285
3288
|
"scale-z": [{
|
|
3286
|
-
"scale-z":
|
|
3289
|
+
"scale-z": oe()
|
|
3287
3290
|
}],
|
|
3288
3291
|
/**
|
|
3289
3292
|
* Scale 3D
|
|
@@ -3295,35 +3298,35 @@ const dr = ({
|
|
|
3295
3298
|
* @see https://tailwindcss.com/docs/skew
|
|
3296
3299
|
*/
|
|
3297
3300
|
skew: [{
|
|
3298
|
-
skew:
|
|
3301
|
+
skew: le()
|
|
3299
3302
|
}],
|
|
3300
3303
|
/**
|
|
3301
3304
|
* Skew X
|
|
3302
3305
|
* @see https://tailwindcss.com/docs/skew
|
|
3303
3306
|
*/
|
|
3304
3307
|
"skew-x": [{
|
|
3305
|
-
"skew-x":
|
|
3308
|
+
"skew-x": le()
|
|
3306
3309
|
}],
|
|
3307
3310
|
/**
|
|
3308
3311
|
* Skew Y
|
|
3309
3312
|
* @see https://tailwindcss.com/docs/skew
|
|
3310
3313
|
*/
|
|
3311
3314
|
"skew-y": [{
|
|
3312
|
-
"skew-y":
|
|
3315
|
+
"skew-y": le()
|
|
3313
3316
|
}],
|
|
3314
3317
|
/**
|
|
3315
3318
|
* Transform
|
|
3316
3319
|
* @see https://tailwindcss.com/docs/transform
|
|
3317
3320
|
*/
|
|
3318
3321
|
transform: [{
|
|
3319
|
-
transform: [
|
|
3322
|
+
transform: [h, b, "", "none", "gpu", "cpu"]
|
|
3320
3323
|
}],
|
|
3321
3324
|
/**
|
|
3322
3325
|
* Transform Origin
|
|
3323
3326
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
3324
3327
|
*/
|
|
3325
3328
|
"transform-origin": [{
|
|
3326
|
-
origin:
|
|
3329
|
+
origin: V()
|
|
3327
3330
|
}],
|
|
3328
3331
|
/**
|
|
3329
3332
|
* Transform Style
|
|
@@ -3373,7 +3376,7 @@ const dr = ({
|
|
|
3373
3376
|
* @see https://tailwindcss.com/docs/accent-color
|
|
3374
3377
|
*/
|
|
3375
3378
|
accent: [{
|
|
3376
|
-
accent:
|
|
3379
|
+
accent: p()
|
|
3377
3380
|
}],
|
|
3378
3381
|
/**
|
|
3379
3382
|
* Appearance
|
|
@@ -3387,7 +3390,7 @@ const dr = ({
|
|
|
3387
3390
|
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
3388
3391
|
*/
|
|
3389
3392
|
"caret-color": [{
|
|
3390
|
-
caret:
|
|
3393
|
+
caret: p()
|
|
3391
3394
|
}],
|
|
3392
3395
|
/**
|
|
3393
3396
|
* Color Scheme
|
|
@@ -3401,7 +3404,7 @@ const dr = ({
|
|
|
3401
3404
|
* @see https://tailwindcss.com/docs/cursor
|
|
3402
3405
|
*/
|
|
3403
3406
|
cursor: [{
|
|
3404
|
-
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out",
|
|
3407
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", h, b]
|
|
3405
3408
|
}],
|
|
3406
3409
|
/**
|
|
3407
3410
|
* Field Sizing
|
|
@@ -3436,126 +3439,126 @@ const dr = ({
|
|
|
3436
3439
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3437
3440
|
*/
|
|
3438
3441
|
"scroll-m": [{
|
|
3439
|
-
"scroll-m":
|
|
3442
|
+
"scroll-m": x()
|
|
3440
3443
|
}],
|
|
3441
3444
|
/**
|
|
3442
3445
|
* Scroll Margin X
|
|
3443
3446
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3444
3447
|
*/
|
|
3445
3448
|
"scroll-mx": [{
|
|
3446
|
-
"scroll-mx":
|
|
3449
|
+
"scroll-mx": x()
|
|
3447
3450
|
}],
|
|
3448
3451
|
/**
|
|
3449
3452
|
* Scroll Margin Y
|
|
3450
3453
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3451
3454
|
*/
|
|
3452
3455
|
"scroll-my": [{
|
|
3453
|
-
"scroll-my":
|
|
3456
|
+
"scroll-my": x()
|
|
3454
3457
|
}],
|
|
3455
3458
|
/**
|
|
3456
3459
|
* Scroll Margin Start
|
|
3457
3460
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3458
3461
|
*/
|
|
3459
3462
|
"scroll-ms": [{
|
|
3460
|
-
"scroll-ms":
|
|
3463
|
+
"scroll-ms": x()
|
|
3461
3464
|
}],
|
|
3462
3465
|
/**
|
|
3463
3466
|
* Scroll Margin End
|
|
3464
3467
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3465
3468
|
*/
|
|
3466
3469
|
"scroll-me": [{
|
|
3467
|
-
"scroll-me":
|
|
3470
|
+
"scroll-me": x()
|
|
3468
3471
|
}],
|
|
3469
3472
|
/**
|
|
3470
3473
|
* Scroll Margin Top
|
|
3471
3474
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3472
3475
|
*/
|
|
3473
3476
|
"scroll-mt": [{
|
|
3474
|
-
"scroll-mt":
|
|
3477
|
+
"scroll-mt": x()
|
|
3475
3478
|
}],
|
|
3476
3479
|
/**
|
|
3477
3480
|
* Scroll Margin Right
|
|
3478
3481
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3479
3482
|
*/
|
|
3480
3483
|
"scroll-mr": [{
|
|
3481
|
-
"scroll-mr":
|
|
3484
|
+
"scroll-mr": x()
|
|
3482
3485
|
}],
|
|
3483
3486
|
/**
|
|
3484
3487
|
* Scroll Margin Bottom
|
|
3485
3488
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3486
3489
|
*/
|
|
3487
3490
|
"scroll-mb": [{
|
|
3488
|
-
"scroll-mb":
|
|
3491
|
+
"scroll-mb": x()
|
|
3489
3492
|
}],
|
|
3490
3493
|
/**
|
|
3491
3494
|
* Scroll Margin Left
|
|
3492
3495
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
3493
3496
|
*/
|
|
3494
3497
|
"scroll-ml": [{
|
|
3495
|
-
"scroll-ml":
|
|
3498
|
+
"scroll-ml": x()
|
|
3496
3499
|
}],
|
|
3497
3500
|
/**
|
|
3498
3501
|
* Scroll Padding
|
|
3499
3502
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3500
3503
|
*/
|
|
3501
3504
|
"scroll-p": [{
|
|
3502
|
-
"scroll-p":
|
|
3505
|
+
"scroll-p": x()
|
|
3503
3506
|
}],
|
|
3504
3507
|
/**
|
|
3505
3508
|
* Scroll Padding X
|
|
3506
3509
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3507
3510
|
*/
|
|
3508
3511
|
"scroll-px": [{
|
|
3509
|
-
"scroll-px":
|
|
3512
|
+
"scroll-px": x()
|
|
3510
3513
|
}],
|
|
3511
3514
|
/**
|
|
3512
3515
|
* Scroll Padding Y
|
|
3513
3516
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3514
3517
|
*/
|
|
3515
3518
|
"scroll-py": [{
|
|
3516
|
-
"scroll-py":
|
|
3519
|
+
"scroll-py": x()
|
|
3517
3520
|
}],
|
|
3518
3521
|
/**
|
|
3519
3522
|
* Scroll Padding Start
|
|
3520
3523
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3521
3524
|
*/
|
|
3522
3525
|
"scroll-ps": [{
|
|
3523
|
-
"scroll-ps":
|
|
3526
|
+
"scroll-ps": x()
|
|
3524
3527
|
}],
|
|
3525
3528
|
/**
|
|
3526
3529
|
* Scroll Padding End
|
|
3527
3530
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3528
3531
|
*/
|
|
3529
3532
|
"scroll-pe": [{
|
|
3530
|
-
"scroll-pe":
|
|
3533
|
+
"scroll-pe": x()
|
|
3531
3534
|
}],
|
|
3532
3535
|
/**
|
|
3533
3536
|
* Scroll Padding Top
|
|
3534
3537
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3535
3538
|
*/
|
|
3536
3539
|
"scroll-pt": [{
|
|
3537
|
-
"scroll-pt":
|
|
3540
|
+
"scroll-pt": x()
|
|
3538
3541
|
}],
|
|
3539
3542
|
/**
|
|
3540
3543
|
* Scroll Padding Right
|
|
3541
3544
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3542
3545
|
*/
|
|
3543
3546
|
"scroll-pr": [{
|
|
3544
|
-
"scroll-pr":
|
|
3547
|
+
"scroll-pr": x()
|
|
3545
3548
|
}],
|
|
3546
3549
|
/**
|
|
3547
3550
|
* Scroll Padding Bottom
|
|
3548
3551
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3549
3552
|
*/
|
|
3550
3553
|
"scroll-pb": [{
|
|
3551
|
-
"scroll-pb":
|
|
3554
|
+
"scroll-pb": x()
|
|
3552
3555
|
}],
|
|
3553
3556
|
/**
|
|
3554
3557
|
* Scroll Padding Left
|
|
3555
3558
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
3556
3559
|
*/
|
|
3557
3560
|
"scroll-pl": [{
|
|
3558
|
-
"scroll-pl":
|
|
3561
|
+
"scroll-pl": x()
|
|
3559
3562
|
}],
|
|
3560
3563
|
/**
|
|
3561
3564
|
* Scroll Snap Align
|
|
@@ -3623,7 +3626,7 @@ const dr = ({
|
|
|
3623
3626
|
* @see https://tailwindcss.com/docs/will-change
|
|
3624
3627
|
*/
|
|
3625
3628
|
"will-change": [{
|
|
3626
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
3629
|
+
"will-change": ["auto", "scroll", "contents", "transform", h, b]
|
|
3627
3630
|
}],
|
|
3628
3631
|
// -----------
|
|
3629
3632
|
// --- SVG ---
|
|
@@ -3633,21 +3636,21 @@ const dr = ({
|
|
|
3633
3636
|
* @see https://tailwindcss.com/docs/fill
|
|
3634
3637
|
*/
|
|
3635
3638
|
fill: [{
|
|
3636
|
-
fill: ["none", ...
|
|
3639
|
+
fill: ["none", ...p()]
|
|
3637
3640
|
}],
|
|
3638
3641
|
/**
|
|
3639
3642
|
* Stroke Width
|
|
3640
3643
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
3641
3644
|
*/
|
|
3642
3645
|
"stroke-w": [{
|
|
3643
|
-
stroke: [_,
|
|
3646
|
+
stroke: [_, ye, ge, Ae]
|
|
3644
3647
|
}],
|
|
3645
3648
|
/**
|
|
3646
3649
|
* Stroke
|
|
3647
3650
|
* @see https://tailwindcss.com/docs/stroke
|
|
3648
3651
|
*/
|
|
3649
3652
|
stroke: [{
|
|
3650
|
-
stroke: ["none", ...
|
|
3653
|
+
stroke: ["none", ...p()]
|
|
3651
3654
|
}],
|
|
3652
3655
|
// ---------------------
|
|
3653
3656
|
// --- Accessibility ---
|
|
@@ -3715,544 +3718,548 @@ const dr = ({
|
|
|
3715
3718
|
},
|
|
3716
3719
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
3717
3720
|
};
|
|
3718
|
-
},
|
|
3719
|
-
function
|
|
3721
|
+
}, nn = /* @__PURE__ */ Pr(rn);
|
|
3722
|
+
function Rt(e) {
|
|
3720
3723
|
var t, r, n = "";
|
|
3721
3724
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
3722
3725
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
3723
|
-
var
|
|
3724
|
-
for (t = 0; t <
|
|
3726
|
+
var a = e.length;
|
|
3727
|
+
for (t = 0; t < a; t++) e[t] && (r = Rt(e[t])) && (n && (n += " "), n += r);
|
|
3725
3728
|
} else for (r in e) e[r] && (n && (n += " "), n += r);
|
|
3726
3729
|
return n;
|
|
3727
3730
|
}
|
|
3728
|
-
function
|
|
3729
|
-
for (var e, t, r = 0, n = "",
|
|
3731
|
+
function on() {
|
|
3732
|
+
for (var e, t, r = 0, n = "", a = arguments.length; r < a; r++) (e = arguments[r]) && (t = Rt(e)) && (n && (n += " "), n += t);
|
|
3730
3733
|
return n;
|
|
3731
3734
|
}
|
|
3732
|
-
function
|
|
3733
|
-
return
|
|
3735
|
+
function Ee(...e) {
|
|
3736
|
+
return nn(on(e));
|
|
3734
3737
|
}
|
|
3735
|
-
var
|
|
3736
|
-
function
|
|
3737
|
-
if (
|
|
3738
|
-
|
|
3738
|
+
var _e, et;
|
|
3739
|
+
function At() {
|
|
3740
|
+
if (et) return _e;
|
|
3741
|
+
et = 1;
|
|
3739
3742
|
function e(t) {
|
|
3740
3743
|
var r = typeof t;
|
|
3741
3744
|
return t != null && (r == "object" || r == "function");
|
|
3742
3745
|
}
|
|
3743
|
-
return
|
|
3744
|
-
}
|
|
3745
|
-
var Ee, et;
|
|
3746
|
-
function rn() {
|
|
3747
|
-
if (et) return Ee;
|
|
3748
|
-
et = 1;
|
|
3749
|
-
var e = typeof xe == "object" && xe && xe.Object === Object && xe;
|
|
3750
|
-
return Ee = e, Ee;
|
|
3746
|
+
return _e = e, _e;
|
|
3751
3747
|
}
|
|
3752
|
-
var
|
|
3753
|
-
function
|
|
3754
|
-
if (tt) return
|
|
3748
|
+
var Ne, tt;
|
|
3749
|
+
function sn() {
|
|
3750
|
+
if (tt) return Ne;
|
|
3755
3751
|
tt = 1;
|
|
3756
|
-
var e =
|
|
3757
|
-
return
|
|
3752
|
+
var e = typeof we == "object" && we && we.Object === Object && we;
|
|
3753
|
+
return Ne = e, Ne;
|
|
3758
3754
|
}
|
|
3759
3755
|
var Ie, rt;
|
|
3760
|
-
function
|
|
3756
|
+
function Et() {
|
|
3761
3757
|
if (rt) return Ie;
|
|
3762
3758
|
rt = 1;
|
|
3763
|
-
var e =
|
|
3759
|
+
var e = sn(), t = typeof self == "object" && self && self.Object === Object && self, r = e || t || Function("return this")();
|
|
3760
|
+
return Ie = r, Ie;
|
|
3761
|
+
}
|
|
3762
|
+
var Le, nt;
|
|
3763
|
+
function an() {
|
|
3764
|
+
if (nt) return Le;
|
|
3765
|
+
nt = 1;
|
|
3766
|
+
var e = Et(), t = function() {
|
|
3764
3767
|
return e.Date.now();
|
|
3765
3768
|
};
|
|
3766
|
-
return
|
|
3769
|
+
return Le = t, Le;
|
|
3767
3770
|
}
|
|
3768
|
-
var
|
|
3769
|
-
function
|
|
3770
|
-
if (
|
|
3771
|
-
|
|
3771
|
+
var ze, ot;
|
|
3772
|
+
function ln() {
|
|
3773
|
+
if (ot) return ze;
|
|
3774
|
+
ot = 1;
|
|
3772
3775
|
var e = /\s/;
|
|
3773
3776
|
function t(r) {
|
|
3774
3777
|
for (var n = r.length; n-- && e.test(r.charAt(n)); )
|
|
3775
3778
|
;
|
|
3776
3779
|
return n;
|
|
3777
3780
|
}
|
|
3778
|
-
return
|
|
3781
|
+
return ze = t, ze;
|
|
3779
3782
|
}
|
|
3780
|
-
var
|
|
3781
|
-
function
|
|
3782
|
-
if (
|
|
3783
|
-
|
|
3784
|
-
var e =
|
|
3783
|
+
var Oe, st;
|
|
3784
|
+
function cn() {
|
|
3785
|
+
if (st) return Oe;
|
|
3786
|
+
st = 1;
|
|
3787
|
+
var e = ln(), t = /^\s+/;
|
|
3785
3788
|
function r(n) {
|
|
3786
3789
|
return n && n.slice(0, e(n) + 1).replace(t, "");
|
|
3787
3790
|
}
|
|
3788
|
-
return
|
|
3791
|
+
return Oe = r, Oe;
|
|
3789
3792
|
}
|
|
3790
|
-
var
|
|
3791
|
-
function
|
|
3792
|
-
if (
|
|
3793
|
-
st = 1;
|
|
3794
|
-
var e = At(), t = e.Symbol;
|
|
3795
|
-
return ze = t, ze;
|
|
3796
|
-
}
|
|
3797
|
-
var Oe, at;
|
|
3798
|
-
function an() {
|
|
3799
|
-
if (at) return Oe;
|
|
3793
|
+
var Pe, at;
|
|
3794
|
+
function _t() {
|
|
3795
|
+
if (at) return Pe;
|
|
3800
3796
|
at = 1;
|
|
3801
|
-
var e = Et(), t =
|
|
3802
|
-
|
|
3803
|
-
|
|
3797
|
+
var e = Et(), t = e.Symbol;
|
|
3798
|
+
return Pe = t, Pe;
|
|
3799
|
+
}
|
|
3800
|
+
var Me, it;
|
|
3801
|
+
function dn() {
|
|
3802
|
+
if (it) return Me;
|
|
3803
|
+
it = 1;
|
|
3804
|
+
var e = _t(), t = Object.prototype, r = t.hasOwnProperty, n = t.toString, a = e ? e.toStringTag : void 0;
|
|
3805
|
+
function c(l) {
|
|
3806
|
+
var s = r.call(l, a), m = l[a];
|
|
3804
3807
|
try {
|
|
3805
|
-
|
|
3808
|
+
l[a] = void 0;
|
|
3806
3809
|
var f = !0;
|
|
3807
3810
|
} catch {
|
|
3808
3811
|
}
|
|
3809
|
-
var
|
|
3810
|
-
return f && (
|
|
3812
|
+
var R = n.call(l);
|
|
3813
|
+
return f && (s ? l[a] = m : delete l[a]), R;
|
|
3811
3814
|
}
|
|
3812
|
-
return
|
|
3815
|
+
return Me = c, Me;
|
|
3813
3816
|
}
|
|
3814
|
-
var
|
|
3815
|
-
function
|
|
3816
|
-
if (
|
|
3817
|
-
|
|
3817
|
+
var qe, lt;
|
|
3818
|
+
function un() {
|
|
3819
|
+
if (lt) return qe;
|
|
3820
|
+
lt = 1;
|
|
3818
3821
|
var e = Object.prototype, t = e.toString;
|
|
3819
3822
|
function r(n) {
|
|
3820
3823
|
return t.call(n);
|
|
3821
3824
|
}
|
|
3822
|
-
return
|
|
3825
|
+
return qe = r, qe;
|
|
3823
3826
|
}
|
|
3824
|
-
var
|
|
3825
|
-
function
|
|
3826
|
-
if (
|
|
3827
|
-
|
|
3828
|
-
var e =
|
|
3829
|
-
function
|
|
3830
|
-
return
|
|
3827
|
+
var De, ct;
|
|
3828
|
+
function mn() {
|
|
3829
|
+
if (ct) return De;
|
|
3830
|
+
ct = 1;
|
|
3831
|
+
var e = _t(), t = dn(), r = un(), n = "[object Null]", a = "[object Undefined]", c = e ? e.toStringTag : void 0;
|
|
3832
|
+
function l(s) {
|
|
3833
|
+
return s == null ? s === void 0 ? a : n : c && c in Object(s) ? t(s) : r(s);
|
|
3831
3834
|
}
|
|
3832
|
-
return
|
|
3835
|
+
return De = l, De;
|
|
3833
3836
|
}
|
|
3834
|
-
var
|
|
3835
|
-
function
|
|
3836
|
-
if (
|
|
3837
|
-
|
|
3837
|
+
var Fe, dt;
|
|
3838
|
+
function fn() {
|
|
3839
|
+
if (dt) return Fe;
|
|
3840
|
+
dt = 1;
|
|
3838
3841
|
function e(t) {
|
|
3839
3842
|
return t != null && typeof t == "object";
|
|
3840
3843
|
}
|
|
3841
|
-
return
|
|
3844
|
+
return Fe = e, Fe;
|
|
3842
3845
|
}
|
|
3843
|
-
var
|
|
3844
|
-
function
|
|
3845
|
-
if (
|
|
3846
|
-
|
|
3847
|
-
var e =
|
|
3848
|
-
function n(
|
|
3849
|
-
return typeof
|
|
3846
|
+
var Ue, ut;
|
|
3847
|
+
function gn() {
|
|
3848
|
+
if (ut) return Ue;
|
|
3849
|
+
ut = 1;
|
|
3850
|
+
var e = mn(), t = fn(), r = "[object Symbol]";
|
|
3851
|
+
function n(a) {
|
|
3852
|
+
return typeof a == "symbol" || t(a) && e(a) == r;
|
|
3850
3853
|
}
|
|
3851
|
-
return
|
|
3854
|
+
return Ue = n, Ue;
|
|
3852
3855
|
}
|
|
3853
|
-
var
|
|
3854
|
-
function
|
|
3855
|
-
if (
|
|
3856
|
-
|
|
3857
|
-
var e =
|
|
3856
|
+
var $e, mt;
|
|
3857
|
+
function pn() {
|
|
3858
|
+
if (mt) return $e;
|
|
3859
|
+
mt = 1;
|
|
3860
|
+
var e = cn(), t = At(), r = gn(), n = NaN, a = /^[-+]0x[0-9a-f]+$/i, c = /^0b[01]+$/i, l = /^0o[0-7]+$/i, s = parseInt;
|
|
3858
3861
|
function m(f) {
|
|
3859
3862
|
if (typeof f == "number")
|
|
3860
3863
|
return f;
|
|
3861
3864
|
if (r(f))
|
|
3862
3865
|
return n;
|
|
3863
3866
|
if (t(f)) {
|
|
3864
|
-
var
|
|
3865
|
-
f = t(
|
|
3867
|
+
var R = typeof f.valueOf == "function" ? f.valueOf() : f;
|
|
3868
|
+
f = t(R) ? R + "" : R;
|
|
3866
3869
|
}
|
|
3867
3870
|
if (typeof f != "string")
|
|
3868
3871
|
return f === 0 ? f : +f;
|
|
3869
3872
|
f = e(f);
|
|
3870
|
-
var
|
|
3871
|
-
return
|
|
3873
|
+
var L = c.test(f);
|
|
3874
|
+
return L || l.test(f) ? s(f.slice(2), L ? 2 : 8) : a.test(f) ? n : +f;
|
|
3872
3875
|
}
|
|
3873
|
-
return
|
|
3876
|
+
return $e = m, $e;
|
|
3874
3877
|
}
|
|
3875
|
-
var
|
|
3876
|
-
function
|
|
3877
|
-
if (
|
|
3878
|
-
|
|
3879
|
-
var e =
|
|
3880
|
-
function
|
|
3881
|
-
var
|
|
3882
|
-
if (typeof
|
|
3878
|
+
var Be, ft;
|
|
3879
|
+
function bn() {
|
|
3880
|
+
if (ft) return Be;
|
|
3881
|
+
ft = 1;
|
|
3882
|
+
var e = At(), t = an(), r = pn(), n = "Expected a function", a = Math.max, c = Math.min;
|
|
3883
|
+
function l(s, m, f) {
|
|
3884
|
+
var R, L, M, q, S, F, z = 0, H = !1, $ = !1, k = !0;
|
|
3885
|
+
if (typeof s != "function")
|
|
3883
3886
|
throw new TypeError(n);
|
|
3884
|
-
m = r(m) || 0, e(f) && (
|
|
3885
|
-
function
|
|
3886
|
-
var
|
|
3887
|
-
return
|
|
3887
|
+
m = r(m) || 0, e(f) && (H = !!f.leading, $ = "maxWait" in f, M = $ ? a(r(f.maxWait) || 0, m) : M, k = "trailing" in f ? !!f.trailing : k);
|
|
3888
|
+
function N(u) {
|
|
3889
|
+
var j = R, A = L;
|
|
3890
|
+
return R = L = void 0, z = u, q = s.apply(A, j), q;
|
|
3888
3891
|
}
|
|
3889
|
-
function
|
|
3890
|
-
return
|
|
3892
|
+
function V(u) {
|
|
3893
|
+
return z = u, S = setTimeout(x, m), H ? N(u) : q;
|
|
3891
3894
|
}
|
|
3892
|
-
function G(
|
|
3893
|
-
var
|
|
3894
|
-
return
|
|
3895
|
+
function G(u) {
|
|
3896
|
+
var j = u - F, A = u - z, D = m - j;
|
|
3897
|
+
return $ ? c(D, M - A) : D;
|
|
3895
3898
|
}
|
|
3896
|
-
function J(
|
|
3897
|
-
var
|
|
3898
|
-
return
|
|
3899
|
+
function J(u) {
|
|
3900
|
+
var j = u - F, A = u - z;
|
|
3901
|
+
return F === void 0 || j >= m || j < 0 || $ && A >= M;
|
|
3899
3902
|
}
|
|
3900
|
-
function
|
|
3901
|
-
var
|
|
3902
|
-
if (J(
|
|
3903
|
-
return
|
|
3904
|
-
S = setTimeout(
|
|
3903
|
+
function x() {
|
|
3904
|
+
var u = t();
|
|
3905
|
+
if (J(u))
|
|
3906
|
+
return P(u);
|
|
3907
|
+
S = setTimeout(x, G(u));
|
|
3905
3908
|
}
|
|
3906
|
-
function
|
|
3907
|
-
return S = void 0,
|
|
3909
|
+
function P(u) {
|
|
3910
|
+
return S = void 0, k && R ? N(u) : (R = L = void 0, q);
|
|
3908
3911
|
}
|
|
3909
|
-
function
|
|
3910
|
-
S !== void 0 && clearTimeout(S),
|
|
3912
|
+
function d() {
|
|
3913
|
+
S !== void 0 && clearTimeout(S), z = 0, R = F = L = S = void 0;
|
|
3911
3914
|
}
|
|
3912
|
-
function
|
|
3913
|
-
return S === void 0 ? q :
|
|
3915
|
+
function v() {
|
|
3916
|
+
return S === void 0 ? q : P(t());
|
|
3914
3917
|
}
|
|
3915
|
-
function
|
|
3916
|
-
var
|
|
3917
|
-
if (
|
|
3918
|
+
function T() {
|
|
3919
|
+
var u = t(), j = J(u);
|
|
3920
|
+
if (R = arguments, L = this, F = u, j) {
|
|
3918
3921
|
if (S === void 0)
|
|
3919
|
-
return
|
|
3920
|
-
if (
|
|
3921
|
-
return clearTimeout(S), S = setTimeout(
|
|
3922
|
+
return V(F);
|
|
3923
|
+
if ($)
|
|
3924
|
+
return clearTimeout(S), S = setTimeout(x, m), N(F);
|
|
3922
3925
|
}
|
|
3923
|
-
return S === void 0 && (S = setTimeout(
|
|
3926
|
+
return S === void 0 && (S = setTimeout(x, m)), q;
|
|
3924
3927
|
}
|
|
3925
|
-
return
|
|
3928
|
+
return T.cancel = d, T.flush = v, T;
|
|
3926
3929
|
}
|
|
3927
|
-
return
|
|
3930
|
+
return Be = l, Be;
|
|
3928
3931
|
}
|
|
3929
|
-
var
|
|
3930
|
-
const
|
|
3932
|
+
var hn = bn();
|
|
3933
|
+
const xn = /* @__PURE__ */ cr(hn), vn = zt(
|
|
3931
3934
|
({
|
|
3932
3935
|
initialContent: e = "",
|
|
3933
3936
|
onChange: t,
|
|
3934
3937
|
onSave: r,
|
|
3935
3938
|
onExport: n,
|
|
3936
|
-
readOnly:
|
|
3937
|
-
showButtons:
|
|
3938
|
-
showSaveTitle:
|
|
3939
|
-
showStatusBar:
|
|
3939
|
+
readOnly: a = !1,
|
|
3940
|
+
showButtons: c = !1,
|
|
3941
|
+
showSaveTitle: l = !1,
|
|
3942
|
+
showStatusBar: s = !1,
|
|
3940
3943
|
height: m = "500px",
|
|
3941
3944
|
onImageUpload: f,
|
|
3942
|
-
imageUploadEndpoint:
|
|
3943
|
-
allowedImageTypes:
|
|
3945
|
+
imageUploadEndpoint: R,
|
|
3946
|
+
allowedImageTypes: L = [
|
|
3944
3947
|
"image/jpeg",
|
|
3945
3948
|
"image/png",
|
|
3946
3949
|
"image/gif",
|
|
3947
3950
|
"image/webp",
|
|
3948
3951
|
"image/svg+xml"
|
|
3949
3952
|
],
|
|
3950
|
-
maxImageSize:
|
|
3953
|
+
maxImageSize: M = 5 * 1024 * 1024,
|
|
3951
3954
|
onInit: q,
|
|
3952
3955
|
debounceDelay: S = 300,
|
|
3953
|
-
className:
|
|
3954
|
-
placeholder:
|
|
3955
|
-
autoFocus:
|
|
3956
|
-
},
|
|
3956
|
+
className: F = "",
|
|
3957
|
+
placeholder: z = "Start typing here...",
|
|
3958
|
+
autoFocus: H = !1
|
|
3959
|
+
}, $) => {
|
|
3957
3960
|
const {
|
|
3958
|
-
editorState:
|
|
3959
|
-
editorRef:
|
|
3960
|
-
updateContent:
|
|
3961
|
+
editorState: k,
|
|
3962
|
+
editorRef: N,
|
|
3963
|
+
updateContent: V,
|
|
3961
3964
|
updateTitle: G,
|
|
3962
3965
|
executeCommand: J,
|
|
3963
|
-
getValidationResult:
|
|
3964
|
-
exportToHTML:
|
|
3965
|
-
clearEditor:
|
|
3966
|
+
getValidationResult: x,
|
|
3967
|
+
exportToHTML: P,
|
|
3968
|
+
clearEditor: d,
|
|
3969
|
+
setHTML: v,
|
|
3966
3970
|
handlePaste: T,
|
|
3967
|
-
handleDrop:
|
|
3968
|
-
insertImage:
|
|
3969
|
-
uploadPendingImages:
|
|
3970
|
-
} =
|
|
3971
|
+
handleDrop: u,
|
|
3972
|
+
insertImage: j,
|
|
3973
|
+
uploadPendingImages: A
|
|
3974
|
+
} = pr({
|
|
3971
3975
|
initialContent: e,
|
|
3972
3976
|
onImageUpload: f,
|
|
3973
|
-
imageUploadEndpoint:
|
|
3974
|
-
allowedImageTypes:
|
|
3975
|
-
maxImageSize:
|
|
3976
|
-
}),
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3977
|
+
imageUploadEndpoint: R,
|
|
3978
|
+
allowedImageTypes: L,
|
|
3979
|
+
maxImageSize: M
|
|
3980
|
+
}), D = re(null), U = re(!1), p = 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
|
+
me(() => {
|
|
3982
|
+
Q.current = t;
|
|
3983
|
+
}, [t]), Ot($, () => ({
|
|
3984
|
+
getContent: () => k.content,
|
|
3985
|
+
getHTML: () => P(),
|
|
3986
|
+
getTitle: () => k.title,
|
|
3987
|
+
clear: d,
|
|
3982
3988
|
focus: () => {
|
|
3983
|
-
if (
|
|
3984
|
-
|
|
3985
|
-
const
|
|
3986
|
-
|
|
3987
|
-
const
|
|
3988
|
-
|
|
3989
|
+
if (N.current) {
|
|
3990
|
+
N.current.focus();
|
|
3991
|
+
const g = document.createRange();
|
|
3992
|
+
g.selectNodeContents(N.current), g.collapse(!1);
|
|
3993
|
+
const K = window.getSelection();
|
|
3994
|
+
K?.removeAllRanges(), K?.addRange(g);
|
|
3989
3995
|
}
|
|
3990
3996
|
},
|
|
3991
|
-
insertText: (
|
|
3992
|
-
|
|
3997
|
+
insertText: (g) => {
|
|
3998
|
+
N.current && (document.execCommand("insertText", !1, g), V(N.current.innerHTML));
|
|
3993
3999
|
},
|
|
3994
|
-
insertHTML: (
|
|
3995
|
-
|
|
4000
|
+
insertHTML: (g) => {
|
|
4001
|
+
N.current && (document.execCommand("insertHTML", !1, g), V(N.current.innerHTML));
|
|
3996
4002
|
},
|
|
3997
|
-
|
|
3998
|
-
|
|
4003
|
+
setHTML: (g) => {
|
|
4004
|
+
v(g);
|
|
4005
|
+
},
|
|
4006
|
+
executeCommand: (g, K) => {
|
|
4007
|
+
J(g, K);
|
|
3999
4008
|
}
|
|
4000
|
-
})),
|
|
4001
|
-
q &&
|
|
4002
|
-
}, [q,
|
|
4003
|
-
|
|
4004
|
-
if (
|
|
4005
|
-
|
|
4006
|
-
const
|
|
4007
|
-
|
|
4008
|
-
const
|
|
4009
|
-
|
|
4009
|
+
})), me(() => {
|
|
4010
|
+
q && N.current && !U.current && (q(N.current), U.current = !0);
|
|
4011
|
+
}, [q, N]), me(() => {
|
|
4012
|
+
H && N.current && !a && setTimeout(() => {
|
|
4013
|
+
if (N.current) {
|
|
4014
|
+
N.current.focus();
|
|
4015
|
+
const g = document.createRange();
|
|
4016
|
+
g.selectNodeContents(N.current), g.collapse(!1);
|
|
4017
|
+
const K = window.getSelection();
|
|
4018
|
+
K?.removeAllRanges(), K?.addRange(g);
|
|
4010
4019
|
}
|
|
4011
4020
|
}, 100);
|
|
4012
|
-
}, [
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
if (!t || !j.content && !j.content.trim()) return;
|
|
4024
|
-
const l = (() => {
|
|
4021
|
+
}, [H, a, N]), me(() => (p.current = xn(
|
|
4022
|
+
(g, K, ae) => {
|
|
4023
|
+
Q.current?.(g, K, ae);
|
|
4024
|
+
},
|
|
4025
|
+
S
|
|
4026
|
+
), () => {
|
|
4027
|
+
p.current && p.current.cancel();
|
|
4028
|
+
}), [S]), me(() => {
|
|
4029
|
+
if (!Q.current || k.content === te.current && k.title === oe.current)
|
|
4030
|
+
return;
|
|
4031
|
+
const g = (() => {
|
|
4025
4032
|
try {
|
|
4026
|
-
return
|
|
4033
|
+
return P({
|
|
4027
4034
|
includeStyles: !1,
|
|
4028
4035
|
includeMeta: !1
|
|
4029
4036
|
});
|
|
4030
4037
|
} catch {
|
|
4031
|
-
return `<!DOCTYPE html><html><body>${
|
|
4038
|
+
return `<!DOCTYPE html><html><body>${k.content}</body></html>`;
|
|
4032
4039
|
}
|
|
4033
4040
|
})();
|
|
4034
|
-
S > 0 &&
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
) :
|
|
4041
|
+
te.current = k.content, oe.current = k.title, S > 0 && p.current ? p.current(
|
|
4042
|
+
k.content,
|
|
4043
|
+
g,
|
|
4044
|
+
k.title
|
|
4045
|
+
) : Q.current(k.content, g, k.title);
|
|
4039
4046
|
}, [
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
d,
|
|
4047
|
+
k.content,
|
|
4048
|
+
k.title,
|
|
4049
|
+
P,
|
|
4044
4050
|
S
|
|
4045
4051
|
]);
|
|
4046
|
-
const
|
|
4047
|
-
if (
|
|
4048
|
-
|
|
4052
|
+
const le = W(async () => {
|
|
4053
|
+
if (p.current && p.current.flush?.(), k.pendingImages.length > 0) {
|
|
4054
|
+
C(!0);
|
|
4049
4055
|
try {
|
|
4050
|
-
await
|
|
4056
|
+
await A(), y("Images uploaded successfully!"), setTimeout(() => y(""), 3e3);
|
|
4051
4057
|
} catch {
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
}, 5e3),
|
|
4058
|
+
y("Failed to upload images. Please try again."), B(!0), setTimeout(() => {
|
|
4059
|
+
B(!1), y("");
|
|
4060
|
+
}, 5e3), C(!1);
|
|
4055
4061
|
return;
|
|
4056
4062
|
} finally {
|
|
4057
|
-
|
|
4063
|
+
C(!1);
|
|
4058
4064
|
}
|
|
4059
4065
|
}
|
|
4060
|
-
const
|
|
4061
|
-
if (!
|
|
4062
|
-
|
|
4063
|
-
|
|
4066
|
+
const g = x();
|
|
4067
|
+
if (!g.success) {
|
|
4068
|
+
y(g.error || "Please fix validation errors before saving."), B(!0), setTimeout(() => {
|
|
4069
|
+
B(!1), y("");
|
|
4064
4070
|
}, 3e3);
|
|
4065
4071
|
return;
|
|
4066
4072
|
}
|
|
4067
4073
|
try {
|
|
4068
|
-
r?.(
|
|
4069
|
-
|
|
4074
|
+
r?.(k.content, P()), y("Document saved successfully!"), B(!0), setTimeout(() => {
|
|
4075
|
+
B(!1), y("");
|
|
4070
4076
|
}, 2e3);
|
|
4071
4077
|
} catch {
|
|
4072
|
-
|
|
4073
|
-
|
|
4078
|
+
y("Failed to save document."), B(!0), setTimeout(() => {
|
|
4079
|
+
B(!1), y("");
|
|
4074
4080
|
}, 3e3);
|
|
4075
4081
|
}
|
|
4076
4082
|
}, [
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4083
|
+
k,
|
|
4084
|
+
A,
|
|
4085
|
+
x,
|
|
4086
|
+
P,
|
|
4081
4087
|
r
|
|
4082
|
-
]),
|
|
4083
|
-
if (
|
|
4084
|
-
|
|
4088
|
+
]), O = W(async () => {
|
|
4089
|
+
if (p.current && p.current.flush?.(), k.pendingImages.length > 0) {
|
|
4090
|
+
C(!0);
|
|
4085
4091
|
try {
|
|
4086
|
-
await
|
|
4087
|
-
} catch (
|
|
4088
|
-
console.error("Failed to upload images:",
|
|
4092
|
+
await A();
|
|
4093
|
+
} catch (g) {
|
|
4094
|
+
console.error("Failed to upload images:", g);
|
|
4089
4095
|
} finally {
|
|
4090
|
-
|
|
4096
|
+
C(!1);
|
|
4091
4097
|
}
|
|
4092
4098
|
}
|
|
4093
4099
|
try {
|
|
4094
|
-
const
|
|
4095
|
-
n?.(
|
|
4096
|
-
const
|
|
4097
|
-
|
|
4098
|
-
|
|
4100
|
+
const g = P();
|
|
4101
|
+
n?.(g);
|
|
4102
|
+
const K = new Blob([g], { type: "text/html" }), ae = URL.createObjectURL(K), fe = document.createElement("a");
|
|
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
|
+
B(!1), y("");
|
|
4099
4105
|
}, 2e3);
|
|
4100
4106
|
} catch {
|
|
4101
|
-
|
|
4102
|
-
|
|
4107
|
+
y("Failed to export document."), B(!0), setTimeout(() => {
|
|
4108
|
+
B(!1), y("");
|
|
4103
4109
|
}, 3e3);
|
|
4104
4110
|
}
|
|
4105
|
-
}, [
|
|
4106
|
-
(
|
|
4107
|
-
|
|
4111
|
+
}, [k, A, P, n]), I = W(
|
|
4112
|
+
(g) => {
|
|
4113
|
+
V(g);
|
|
4108
4114
|
},
|
|
4109
|
-
[
|
|
4110
|
-
),
|
|
4111
|
-
if (!
|
|
4112
|
-
const
|
|
4113
|
-
let
|
|
4114
|
-
const
|
|
4115
|
-
for (const
|
|
4115
|
+
[V]
|
|
4116
|
+
), de = async (g) => {
|
|
4117
|
+
if (!g.target.files || a) return;
|
|
4118
|
+
const K = Array.from(g.target.files);
|
|
4119
|
+
let ae = 0;
|
|
4120
|
+
const fe = K.length;
|
|
4121
|
+
for (const Nt of K)
|
|
4116
4122
|
try {
|
|
4117
|
-
await
|
|
4118
|
-
} catch (
|
|
4119
|
-
console.error("Failed to insert image:",
|
|
4123
|
+
await j(Nt), ae++, ne(Math.round(ae / fe * 100));
|
|
4124
|
+
} catch (It) {
|
|
4125
|
+
console.error("Failed to insert image:", It);
|
|
4120
4126
|
}
|
|
4121
|
-
|
|
4122
|
-
},
|
|
4123
|
-
|
|
4124
|
-
}, [
|
|
4125
|
-
(
|
|
4126
|
-
}, [
|
|
4127
|
+
ne(0), g.target.value = "";
|
|
4128
|
+
}, se = W(() => {
|
|
4129
|
+
a || N.current && N.current.focus();
|
|
4130
|
+
}, [a, N]), ie = W((g) => {
|
|
4131
|
+
(g.ctrlKey || g.metaKey) && g.key === "s" && (g.preventDefault(), le()), (g.ctrlKey || g.metaKey) && g.key === "e" && (g.preventDefault(), O()), (g.ctrlKey || g.metaKey) && g.key === "k" && g.shiftKey && (g.preventDefault(), d());
|
|
4132
|
+
}, [le, O, d]);
|
|
4127
4133
|
return /* @__PURE__ */ i.jsxs(
|
|
4128
4134
|
"div",
|
|
4129
4135
|
{
|
|
4130
|
-
ref:
|
|
4131
|
-
className:
|
|
4136
|
+
ref: E,
|
|
4137
|
+
className: Ee(
|
|
4132
4138
|
"relative w-full bg-white border border-gray-300 rounded-lg overflow-hidden flex flex-col",
|
|
4133
|
-
|
|
4134
|
-
|
|
4139
|
+
a && "pointer-events-none opacity-80",
|
|
4140
|
+
F
|
|
4135
4141
|
),
|
|
4136
4142
|
style: { height: m },
|
|
4137
4143
|
children: [
|
|
4138
|
-
|
|
4144
|
+
l && /* @__PURE__ */ i.jsxs("div", { className: "p-4 md:p-6 border-b bg-gradient-to-r from-gray-50 to-white", children: [
|
|
4139
4145
|
/* @__PURE__ */ i.jsx(
|
|
4140
4146
|
"input",
|
|
4141
4147
|
{
|
|
4142
4148
|
className: "w-full text-xl md:text-2xl font-bold bg-transparent outline-none placeholder:text-gray-400",
|
|
4143
|
-
value:
|
|
4144
|
-
onChange: (
|
|
4149
|
+
value: k.title,
|
|
4150
|
+
onChange: (g) => G(g.target.value),
|
|
4145
4151
|
placeholder: "Document Title",
|
|
4146
|
-
readOnly:
|
|
4152
|
+
readOnly: a,
|
|
4147
4153
|
maxLength: 100
|
|
4148
4154
|
}
|
|
4149
4155
|
),
|
|
4150
|
-
|
|
4151
|
-
|
|
4156
|
+
k.title.length >= 90 && /* @__PURE__ */ i.jsxs("div", { className: "text-xs text-gray-500 text-right mt-1", children: [
|
|
4157
|
+
k.title.length,
|
|
4152
4158
|
"/100 characters"
|
|
4153
4159
|
] })
|
|
4154
4160
|
] }),
|
|
4155
4161
|
/* @__PURE__ */ i.jsx(
|
|
4156
|
-
|
|
4162
|
+
fr,
|
|
4157
4163
|
{
|
|
4158
4164
|
onCommand: J,
|
|
4159
|
-
onSave:
|
|
4160
|
-
onExport:
|
|
4161
|
-
showButtons:
|
|
4162
|
-
onClear:
|
|
4163
|
-
hasUnsavedChanges:
|
|
4164
|
-
onImageUpload: () =>
|
|
4165
|
-
pendingImagesCount:
|
|
4165
|
+
onSave: le,
|
|
4166
|
+
onExport: O,
|
|
4167
|
+
showButtons: c,
|
|
4168
|
+
onClear: d,
|
|
4169
|
+
hasUnsavedChanges: k.hasUnsavedChanges,
|
|
4170
|
+
onImageUpload: () => D.current?.click(),
|
|
4171
|
+
pendingImagesCount: k.pendingImages.length
|
|
4166
4172
|
}
|
|
4167
4173
|
),
|
|
4168
4174
|
/* @__PURE__ */ i.jsx(
|
|
4169
4175
|
"input",
|
|
4170
4176
|
{
|
|
4171
|
-
ref:
|
|
4177
|
+
ref: D,
|
|
4172
4178
|
type: "file",
|
|
4173
4179
|
className: "hidden",
|
|
4174
|
-
accept:
|
|
4180
|
+
accept: L.join(","),
|
|
4175
4181
|
multiple: !0,
|
|
4176
|
-
onChange:
|
|
4177
|
-
disabled:
|
|
4182
|
+
onChange: de,
|
|
4183
|
+
disabled: a
|
|
4178
4184
|
}
|
|
4179
4185
|
),
|
|
4180
|
-
(
|
|
4186
|
+
(X || w) && /* @__PURE__ */ i.jsx("div", { className: Ee(
|
|
4181
4187
|
"px-4 py-3 text-sm flex items-center gap-2 transition-all duration-300",
|
|
4182
|
-
|
|
4183
|
-
), children:
|
|
4184
|
-
/* @__PURE__ */ i.jsx(
|
|
4188
|
+
w ? "bg-blue-50 text-blue-700 border-b border-blue-100" : o.includes("success") ? "bg-green-50 text-green-700 border-b border-green-100" : "bg-red-50 text-red-700 border-b border-red-100"
|
|
4189
|
+
), children: w ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4190
|
+
/* @__PURE__ */ i.jsx(sr, { className: "h-4 w-4 animate-spin" }),
|
|
4185
4191
|
/* @__PURE__ */ i.jsxs("span", { children: [
|
|
4186
4192
|
"Uploading images... ",
|
|
4187
|
-
|
|
4193
|
+
Z > 0 && `${Z}%`
|
|
4188
4194
|
] })
|
|
4189
|
-
] }) :
|
|
4190
|
-
/* @__PURE__ */ i.jsx(
|
|
4191
|
-
/* @__PURE__ */ i.jsx("span", { children:
|
|
4195
|
+
] }) : o.includes("success") ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4196
|
+
/* @__PURE__ */ i.jsx(ar, { className: "h-4 w-4" }),
|
|
4197
|
+
/* @__PURE__ */ i.jsx("span", { children: o })
|
|
4192
4198
|
] }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
4193
|
-
/* @__PURE__ */ i.jsx(
|
|
4194
|
-
/* @__PURE__ */ i.jsx("span", { children:
|
|
4199
|
+
/* @__PURE__ */ i.jsx(ir, { className: "h-4 w-4" }),
|
|
4200
|
+
/* @__PURE__ */ i.jsx("span", { children: o })
|
|
4195
4201
|
] }) }),
|
|
4196
|
-
/* @__PURE__ */ i.
|
|
4197
|
-
"div",
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4202
|
+
/* @__PURE__ */ i.jsxs("div", { className: "relative flex-1 flex flex-col overflow-hidden", children: [
|
|
4203
|
+
!k.content && /* @__PURE__ */ i.jsx("div", { className: "absolute top-6 left-6 text-gray-400 pointer-events-none select-none z-0", children: z }),
|
|
4204
|
+
/* @__PURE__ */ i.jsx(
|
|
4205
|
+
"div",
|
|
4206
|
+
{
|
|
4207
|
+
ref: N,
|
|
4208
|
+
className: Ee(
|
|
4209
|
+
"flex-1 p-4 md:p-6 outline-none overflow-y-auto min-h-[200px] bg-transparent z-10",
|
|
4210
|
+
a ? "cursor-default select-text" : "cursor-text"
|
|
4211
|
+
),
|
|
4212
|
+
contentEditable: !a,
|
|
4213
|
+
suppressContentEditableWarning: !0,
|
|
4214
|
+
onInput: (g) => I(g.currentTarget.innerHTML),
|
|
4215
|
+
onPaste: T,
|
|
4216
|
+
onDrop: u,
|
|
4217
|
+
onDragOver: (g) => g.preventDefault(),
|
|
4218
|
+
onClick: se,
|
|
4219
|
+
onKeyDown: ie,
|
|
4220
|
+
"data-placeholder": z,
|
|
4221
|
+
role: "textbox",
|
|
4222
|
+
"aria-label": "Text editor",
|
|
4223
|
+
"aria-multiline": "true"
|
|
4224
|
+
}
|
|
4225
|
+
)
|
|
4226
|
+
] }),
|
|
4227
|
+
k.pendingImages.length > 0 && /* @__PURE__ */ i.jsxs("div", { className: "px-4 py-3 text-sm text-blue-600 bg-blue-50 border-t border-blue-100 flex items-center justify-between", children: [
|
|
4221
4228
|
/* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4222
|
-
/* @__PURE__ */ i.jsx(
|
|
4229
|
+
/* @__PURE__ */ i.jsx(lr, { size: 16 }),
|
|
4223
4230
|
/* @__PURE__ */ i.jsxs("span", { children: [
|
|
4224
|
-
|
|
4231
|
+
k.pendingImages.length,
|
|
4225
4232
|
" image",
|
|
4226
|
-
|
|
4233
|
+
k.pendingImages.length !== 1 ? "s" : "",
|
|
4227
4234
|
" pending upload"
|
|
4228
4235
|
] })
|
|
4229
4236
|
] }),
|
|
4230
4237
|
/* @__PURE__ */ i.jsx(
|
|
4231
4238
|
"button",
|
|
4232
4239
|
{
|
|
4233
|
-
onClick:
|
|
4234
|
-
disabled:
|
|
4240
|
+
onClick: A,
|
|
4241
|
+
disabled: w,
|
|
4235
4242
|
className: "text-sm px-3 py-1 bg-blue-100 hover:bg-blue-200 text-blue-700 rounded-md transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4236
|
-
children:
|
|
4243
|
+
children: w ? "Uploading..." : "Upload Now"
|
|
4237
4244
|
}
|
|
4238
4245
|
)
|
|
4239
4246
|
] }),
|
|
4240
|
-
|
|
4241
|
-
|
|
4247
|
+
s && /* @__PURE__ */ i.jsx(
|
|
4248
|
+
gr,
|
|
4242
4249
|
{
|
|
4243
|
-
wordCount:
|
|
4244
|
-
characterCount:
|
|
4245
|
-
hasUnsavedChanges:
|
|
4246
|
-
pendingImagesCount:
|
|
4250
|
+
wordCount: k.wordCount,
|
|
4251
|
+
characterCount: k.characterCount,
|
|
4252
|
+
hasUnsavedChanges: k.hasUnsavedChanges,
|
|
4253
|
+
pendingImagesCount: k.pendingImages.length
|
|
4247
4254
|
}
|
|
4248
4255
|
),
|
|
4249
|
-
!
|
|
4256
|
+
!a && /* @__PURE__ */ i.jsx("div", { className: "hidden md:block absolute bottom-2 right-2 text-xs text-gray-400 bg-white/80 px-2 py-1 rounded", children: "Ctrl+S to save • Ctrl+E to export" })
|
|
4250
4257
|
]
|
|
4251
4258
|
}
|
|
4252
4259
|
);
|
|
4253
4260
|
}
|
|
4254
4261
|
);
|
|
4255
|
-
|
|
4262
|
+
vn.displayName = "TextEditor";
|
|
4256
4263
|
export {
|
|
4257
|
-
|
|
4264
|
+
vn as TextEditor
|
|
4258
4265
|
};
|