@abduljebar/text-editor 2.3.2 → 2.4.1

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