@abduljebar/text-editor 2.3.1 → 2.4.0

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