@remarkablejames/editor 0.0.1 → 0.0.3
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/lib/{ActionMenuButton-B0EHT9CC.js → ActionMenuButton-D5HLfRzv.js} +1 -1
- package/lib/{ActionMenuButton-J1el_e6Z.cjs → ActionMenuButton-DN6VHLkp.cjs} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +5 -5
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +1 -1
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +2 -2
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -44
- package/lib/CodeBlock.js +181 -3857
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +2 -2
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +1 -1
- package/lib/{Drawer-BCWVN-4l.js → Drawer-B9l1SoRJ.js} +21 -21
- package/lib/{Drawer-BTouEroZ.cjs → Drawer-BN0lYcnJ.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +2 -2
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +12 -12
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +3 -3
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +3 -3
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +3 -3
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +2 -2
- package/lib/History.cjs +1 -1
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +1 -1
- package/lib/{Iframe-BfBLILDA.cjs → Iframe-CXFk3GEq.cjs} +1 -1
- package/lib/{Iframe-BdgiWGml.js → Iframe-MjeJ2OOI.js} +9 -9
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +22 -22
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +1 -1
- package/lib/{Indent-Dvqz_WEn.cjs → Indent-BPX9XRos.cjs} +1 -1
- package/lib/{Indent-BpMcZKok.js → Indent-CgwDItIf.js} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +1 -1
- package/lib/{Katex-B8_uprkO.js → Katex-CZ4g3vA9.js} +2 -2
- package/lib/{Katex-BQyeCeQ0.cjs → Katex-DIgsR_dS.cjs} +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +1 -1
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +2 -2
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +1 -1
- package/lib/{LinkEditBlock-CIshn_8F.cjs → LinkEditBlock-B2bU0Mcr.cjs} +1 -1
- package/lib/{LinkEditBlock-BX0fXXpF.js → LinkEditBlock-CaDV3Vq5.js} +2 -2
- package/lib/{Mermaid-0GiGVxn0.cjs → Mermaid-B9h7XKFo.cjs} +1 -1
- package/lib/{Mermaid-D8bbIgAl.js → Mermaid-EhYj_ICn.js} +2 -2
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +1 -1
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +1 -1
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +2 -2
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +2 -2
- package/lib/{SlashCommandNodeView-rDJ7OjRd.cjs → SlashCommandNodeView-COlWSlnE.cjs} +1 -1
- package/lib/{SlashCommandNodeView-BcmtKbEE.js → SlashCommandNodeView-CY3peX5x.js} +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +1 -1
- package/lib/{Table-DbxuP5xh.js → Table-Bw7rLue7.js} +2 -2
- package/lib/{Table-BEhNBeuA.cjs → Table-DLrtX6T7.cjs} +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +2 -2
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +2 -2
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +1 -1
- package/lib/{Twitter-BuEBgpi9.cjs → Twitter-Ck6vGefg.cjs} +1 -1
- package/lib/{Twitter-9I6BLNmg.js → Twitter-pM0y5Z-L.js} +2 -2
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +1 -1
- package/lib/bubble.cjs +1 -1
- package/lib/bubble.js +103 -103
- package/lib/{dropdown-menu-DjWlG2-J.cjs → dropdown-menu-DwR8tTs9.cjs} +1 -1
- package/lib/{dropdown-menu-Bs69ZBbO.js → dropdown-menu-nX-u8e2w.js} +1 -1
- package/lib/extensions/CodeBlock/CodeBlock.d.ts +1 -1
- package/lib/extensions/Image/Image.d.ts +11 -0
- package/lib/extensions/Image/components/ImageCropper.d.ts +1 -1
- package/lib/index-Dib4cXXf.cjs +10 -0
- package/lib/{index-lj3VWExo.js → index-_WrFM-Fk.js} +1289 -1118
- package/lib/index.cjs +1 -1
- package/lib/index.js +1 -1
- package/lib/{popover-D-hUKDYu.cjs → popover-BY7j9SiD.cjs} +1 -1
- package/lib/{popover-CPr9bHYn.js → popover-CSvY4C-l.js} +1 -1
- package/lib/{select-CuE_HaQJ.js → select-BelNLNvT.js} +1 -1
- package/lib/{select-C2KF4RNg.cjs → select-Bu-5iIA9.cjs} +1 -1
- package/lib/{separator-CHzYNMVt.js → separator-Br5kcIJa.js} +2 -2
- package/lib/{separator-_gvUNba_.cjs → separator-Cp9Lg3HU.cjs} +1 -1
- package/lib/style.css +1 -1
- package/lib/{textarea-gEoNp9CA.js → textarea-Ceev4t42.js} +1 -1
- package/lib/{textarea-DZj6EY-N.cjs → textarea-DfqvYaA6.cjs} +1 -1
- package/lib/theme/theme.d.ts +1 -1
- package/package.json +1 -1
- package/lib/index-D9oM__YW.cjs +0 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import Q, { useState as E, useMemo as
|
|
4
|
-
import { y as
|
|
1
|
+
import { jsxs as C, jsx as n, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import * as B from "react";
|
|
3
|
+
import Q, { useState as E, useMemo as $, useCallback as de, useEffect as Me, useRef as xe } from "react";
|
|
4
|
+
import { y as _t, b as Ut, S as Bt } from "./index-BG0kQamI.js";
|
|
5
5
|
import "./theme.js";
|
|
6
|
-
import * as
|
|
7
|
-
import { NotebookPen as
|
|
8
|
-
import { j as
|
|
9
|
-
import { I as
|
|
10
|
-
import { Slot as
|
|
6
|
+
import * as X from "@radix-ui/react-dialog";
|
|
7
|
+
import { NotebookPen as $t, ExternalLink as Ft, X as lt, Loader2 as Wt, WrapText as Gt, PencilRuler as Xt, FlipHorizontal as Yt, FlipVertical as qt, CropIcon as Zt, ChevronUp as Kt, Paperclip as Jt, Eye as Qt, Settings as er, ZoomOut as tr, ZoomIn as rr, BookMarked as ir, Sigma as nr, SmilePlusIcon as or, Replace as Ye, SmilePlus as ar, Frame as sr, Columns2 as qe, PanelRight as lr, PanelLeft as cr, Clipboard as dr, Copy as ur, GripVertical as hr, Plus as fr, Columns4 as mr, Columns3 as gr, Heading6 as pr, Heading5 as xr, Heading4 as br, Heading3 as vr, Heading2 as wr, Heading1 as yr, Pilcrow as Cr, ChevronsUpDown as kr, Trash as Mr, Trash2 as Ir, TableCellsSplit as Tr, TableCellsMerge as zr, BetweenVerticalEnd as Sr, BetweenVerticalStart as Ar, BetweenHorizonalStart as Lr, BetweenHorizonalEnd as Nr, Unlink as Er, Pencil as Rr, Sparkles as Vr, Table as Hr, Minimize as Dr, Maximize as jr, Video as Pr, ImageUp as Or, Link as _r, ListTodo as Ur, ListOrdered as Br, List as $r, IndentDecrease as Fr, IndentIncrease as Wr, Type as Gr, CodeXml as Xr, Code as Yr, Superscript as qr, Subscript as Zr, ChevronDown as Kr, Undo2 as Jr, Redo2 as Qr, PaintRoller as ei, Eraser as ti, Minus as ri, Strikethrough as ii, Quote as ni, Underline as oi, Italic as ai, LoaderCircle as si, Bold as li, Check as ci } from "lucide-react";
|
|
8
|
+
import { j as ct, N as dt, n as di, aa as ui, m as ut, h as Ze, a3 as hi, ab as fi, k as mi } from "./clsx-CDyrfCnw.js";
|
|
9
|
+
import { I as Ke, i as Je, j as gi, u as oe, V as pi } from "./index-4Q5IhypJ.js";
|
|
10
|
+
import { Slot as ht } from "@radix-ui/react-slot";
|
|
11
11
|
import * as be from "@radix-ui/react-tooltip";
|
|
12
|
-
import * as
|
|
13
|
-
import { TextAlignRightIcon as
|
|
14
|
-
import * as
|
|
15
|
-
import
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
const _e = "-",
|
|
19
|
-
const t =
|
|
12
|
+
import * as ft from "@radix-ui/react-toggle";
|
|
13
|
+
import { TextAlignRightIcon as xi, TextAlignLeftIcon as bi, TextAlignJustifyIcon as vi, TextAlignCenterIcon as wi } from "@radix-ui/react-icons";
|
|
14
|
+
import * as ie from "@radix-ui/react-tabs";
|
|
15
|
+
import yi from "react-image-crop";
|
|
16
|
+
import * as je from "@radix-ui/react-checkbox";
|
|
17
|
+
import * as mt from "@radix-ui/react-label";
|
|
18
|
+
const _e = "-", Ci = (e) => {
|
|
19
|
+
const t = Mi(e), {
|
|
20
20
|
conflictingClassGroups: r,
|
|
21
21
|
conflictingClassGroupModifiers: i
|
|
22
22
|
} = e;
|
|
23
23
|
return {
|
|
24
24
|
getClassGroupId: (l) => {
|
|
25
25
|
const s = l.split(_e);
|
|
26
|
-
return s[0] === "" && s.length !== 1 && s.shift(),
|
|
26
|
+
return s[0] === "" && s.length !== 1 && s.shift(), gt(s, t) || ki(l);
|
|
27
27
|
},
|
|
28
28
|
getConflictingClassGroupIds: (l, s) => {
|
|
29
29
|
const c = r[l] || [];
|
|
30
30
|
return s && i[l] ? [...c, ...i[l]] : c;
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
},
|
|
33
|
+
}, gt = (e, t) => {
|
|
34
34
|
var l;
|
|
35
35
|
if (e.length === 0)
|
|
36
36
|
return t.classGroupId;
|
|
37
|
-
const r = e[0], i = t.nextPart.get(r), o = i ?
|
|
37
|
+
const r = e[0], i = t.nextPart.get(r), o = i ? gt(e.slice(1), i) : void 0;
|
|
38
38
|
if (o)
|
|
39
39
|
return o;
|
|
40
40
|
if (t.validators.length === 0)
|
|
@@ -43,13 +43,13 @@ const _e = "-", yi = (e) => {
|
|
|
43
43
|
return (l = t.validators.find(({
|
|
44
44
|
validator: s
|
|
45
45
|
}) => s(a))) == null ? void 0 : l.classGroupId;
|
|
46
|
-
},
|
|
47
|
-
if (
|
|
48
|
-
const t =
|
|
46
|
+
}, Qe = /^\[(.+)\]$/, ki = (e) => {
|
|
47
|
+
if (Qe.test(e)) {
|
|
48
|
+
const t = Qe.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
49
49
|
if (r)
|
|
50
50
|
return "arbitrary.." + r;
|
|
51
51
|
}
|
|
52
|
-
},
|
|
52
|
+
}, Mi = (e) => {
|
|
53
53
|
const {
|
|
54
54
|
theme: t,
|
|
55
55
|
prefix: r
|
|
@@ -57,19 +57,19 @@ const _e = "-", yi = (e) => {
|
|
|
57
57
|
nextPart: /* @__PURE__ */ new Map(),
|
|
58
58
|
validators: []
|
|
59
59
|
};
|
|
60
|
-
return
|
|
61
|
-
|
|
60
|
+
return Ti(Object.entries(e.classGroups), r).forEach(([a, l]) => {
|
|
61
|
+
Pe(l, i, a, t);
|
|
62
62
|
}), i;
|
|
63
|
-
},
|
|
63
|
+
}, Pe = (e, t, r, i) => {
|
|
64
64
|
e.forEach((o) => {
|
|
65
65
|
if (typeof o == "string") {
|
|
66
|
-
const a = o === "" ? t :
|
|
66
|
+
const a = o === "" ? t : et(t, o);
|
|
67
67
|
a.classGroupId = r;
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
if (typeof o == "function") {
|
|
71
|
-
if (
|
|
72
|
-
|
|
71
|
+
if (Ii(o)) {
|
|
72
|
+
Pe(o(i), t, r, i);
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
t.validators.push({
|
|
@@ -79,10 +79,10 @@ const _e = "-", yi = (e) => {
|
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
Object.entries(o).forEach(([a, l]) => {
|
|
82
|
-
|
|
82
|
+
Pe(l, et(t, a), r, i);
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
|
-
},
|
|
85
|
+
}, et = (e, t) => {
|
|
86
86
|
let r = e;
|
|
87
87
|
return t.split(_e).forEach((i) => {
|
|
88
88
|
r.nextPart.has(i) || r.nextPart.set(i, {
|
|
@@ -90,7 +90,7 @@ const _e = "-", yi = (e) => {
|
|
|
90
90
|
validators: []
|
|
91
91
|
}), r = r.nextPart.get(i);
|
|
92
92
|
}), r;
|
|
93
|
-
},
|
|
93
|
+
}, Ii = (e) => e.isThemeGetter, Ti = (e, t) => t ? e.map(([r, i]) => {
|
|
94
94
|
const o = i.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([l, s]) => [t + l, s])) : a);
|
|
95
95
|
return [r, o];
|
|
96
96
|
}) : e, zi = (e) => {
|
|
@@ -117,40 +117,40 @@ const _e = "-", yi = (e) => {
|
|
|
117
117
|
r.has(a) ? r.set(a, l) : o(a, l);
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
|
-
},
|
|
120
|
+
}, pt = "!", Si = (e) => {
|
|
121
121
|
const {
|
|
122
122
|
separator: t,
|
|
123
123
|
experimentalParseClassName: r
|
|
124
124
|
} = e, i = t.length === 1, o = t[0], a = t.length, l = (s) => {
|
|
125
125
|
const c = [];
|
|
126
126
|
let d = 0, g = 0, p;
|
|
127
|
-
for (let
|
|
128
|
-
let
|
|
127
|
+
for (let u = 0; u < s.length; u++) {
|
|
128
|
+
let y = s[u];
|
|
129
129
|
if (d === 0) {
|
|
130
|
-
if (
|
|
131
|
-
c.push(s.slice(g,
|
|
130
|
+
if (y === o && (i || s.slice(u, u + a) === t)) {
|
|
131
|
+
c.push(s.slice(g, u)), g = u + a;
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
|
-
if (
|
|
135
|
-
p =
|
|
134
|
+
if (y === "/") {
|
|
135
|
+
p = u;
|
|
136
136
|
continue;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
y === "[" ? d++ : y === "]" && d--;
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const h = c.length === 0 ? s : s.substring(g), b = h.startsWith(pt), f = b ? h.substring(1) : h, k = p && p > g ? p - g : void 0;
|
|
142
142
|
return {
|
|
143
143
|
modifiers: c,
|
|
144
|
-
hasImportantModifier:
|
|
145
|
-
baseClassName:
|
|
146
|
-
maybePostfixModifierPosition:
|
|
144
|
+
hasImportantModifier: b,
|
|
145
|
+
baseClassName: f,
|
|
146
|
+
maybePostfixModifierPosition: k
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
149
|
return r ? (s) => r({
|
|
150
150
|
className: s,
|
|
151
151
|
parseClassName: l
|
|
152
152
|
}) : l;
|
|
153
|
-
},
|
|
153
|
+
}, Ai = (e) => {
|
|
154
154
|
if (e.length <= 1)
|
|
155
155
|
return e;
|
|
156
156
|
const t = [];
|
|
@@ -158,122 +158,122 @@ const _e = "-", yi = (e) => {
|
|
|
158
158
|
return e.forEach((i) => {
|
|
159
159
|
i[0] === "[" ? (t.push(...r.sort(), i), r = []) : r.push(i);
|
|
160
160
|
}), t.push(...r.sort()), t;
|
|
161
|
-
},
|
|
161
|
+
}, Li = (e) => ({
|
|
162
162
|
cache: zi(e.cacheSize),
|
|
163
|
-
parseClassName:
|
|
164
|
-
...
|
|
165
|
-
}),
|
|
163
|
+
parseClassName: Si(e),
|
|
164
|
+
...Ci(e)
|
|
165
|
+
}), Ni = /\s+/, Ei = (e, t) => {
|
|
166
166
|
const {
|
|
167
167
|
parseClassName: r,
|
|
168
168
|
getClassGroupId: i,
|
|
169
169
|
getConflictingClassGroupIds: o
|
|
170
|
-
} = t, a = [], l = e.trim().split(
|
|
170
|
+
} = t, a = [], l = e.trim().split(Ni);
|
|
171
171
|
let s = "";
|
|
172
172
|
for (let c = l.length - 1; c >= 0; c -= 1) {
|
|
173
173
|
const d = l[c], {
|
|
174
174
|
modifiers: g,
|
|
175
175
|
hasImportantModifier: p,
|
|
176
|
-
baseClassName:
|
|
177
|
-
maybePostfixModifierPosition:
|
|
176
|
+
baseClassName: h,
|
|
177
|
+
maybePostfixModifierPosition: b
|
|
178
178
|
} = r(d);
|
|
179
|
-
let
|
|
180
|
-
if (!
|
|
181
|
-
if (!
|
|
179
|
+
let f = !!b, k = i(f ? h.substring(0, b) : h);
|
|
180
|
+
if (!k) {
|
|
181
|
+
if (!f) {
|
|
182
182
|
s = d + (s.length > 0 ? " " + s : s);
|
|
183
183
|
continue;
|
|
184
184
|
}
|
|
185
|
-
if (
|
|
185
|
+
if (k = i(h), !k) {
|
|
186
186
|
s = d + (s.length > 0 ? " " + s : s);
|
|
187
187
|
continue;
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
f = !1;
|
|
190
190
|
}
|
|
191
|
-
const
|
|
192
|
-
if (a.includes(
|
|
191
|
+
const u = Ai(g).join(":"), y = p ? u + pt : u, m = y + k;
|
|
192
|
+
if (a.includes(m))
|
|
193
193
|
continue;
|
|
194
|
-
a.push(
|
|
195
|
-
const
|
|
196
|
-
for (let
|
|
197
|
-
const
|
|
198
|
-
a.push(
|
|
194
|
+
a.push(m);
|
|
195
|
+
const z = o(k, f);
|
|
196
|
+
for (let v = 0; v < z.length; ++v) {
|
|
197
|
+
const A = z[v];
|
|
198
|
+
a.push(y + A);
|
|
199
199
|
}
|
|
200
200
|
s = d + (s.length > 0 ? " " + s : s);
|
|
201
201
|
}
|
|
202
202
|
return s;
|
|
203
203
|
};
|
|
204
|
-
function
|
|
204
|
+
function Ri() {
|
|
205
205
|
let e = 0, t, r, i = "";
|
|
206
206
|
for (; e < arguments.length; )
|
|
207
|
-
(t = arguments[e++]) && (r =
|
|
207
|
+
(t = arguments[e++]) && (r = xt(t)) && (i && (i += " "), i += r);
|
|
208
208
|
return i;
|
|
209
209
|
}
|
|
210
|
-
const
|
|
210
|
+
const xt = (e) => {
|
|
211
211
|
if (typeof e == "string")
|
|
212
212
|
return e;
|
|
213
213
|
let t, r = "";
|
|
214
214
|
for (let i = 0; i < e.length; i++)
|
|
215
|
-
e[i] && (t =
|
|
215
|
+
e[i] && (t = xt(e[i])) && (r && (r += " "), r += t);
|
|
216
216
|
return r;
|
|
217
217
|
};
|
|
218
|
-
function
|
|
218
|
+
function Vi(e, ...t) {
|
|
219
219
|
let r, i, o, a = l;
|
|
220
220
|
function l(c) {
|
|
221
221
|
const d = t.reduce((g, p) => p(g), e());
|
|
222
|
-
return r =
|
|
222
|
+
return r = Li(d), i = r.cache.get, o = r.cache.set, a = s, s(c);
|
|
223
223
|
}
|
|
224
224
|
function s(c) {
|
|
225
225
|
const d = i(c);
|
|
226
226
|
if (d)
|
|
227
227
|
return d;
|
|
228
|
-
const g =
|
|
228
|
+
const g = Ei(c, r);
|
|
229
229
|
return o(c, g), g;
|
|
230
230
|
}
|
|
231
231
|
return function() {
|
|
232
|
-
return a(
|
|
232
|
+
return a(Ri.apply(null, arguments));
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
const
|
|
235
|
+
const N = (e) => {
|
|
236
236
|
const t = (r) => r[e] || [];
|
|
237
237
|
return t.isThemeGetter = !0, t;
|
|
238
|
-
},
|
|
239
|
-
const i =
|
|
238
|
+
}, bt = /^\[(?:([a-z-]+):)?(.+)\]$/i, Hi = /^\d+\/\d+$/, Di = /* @__PURE__ */ new Set(["px", "full", "screen"]), ji = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Pi = /\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$/, Oi = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, _i = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Ui = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Y = (e) => ne(e) || Di.has(e) || Hi.test(e), K = (e) => ae(e, "length", qi), ne = (e) => !!e && !Number.isNaN(Number(e)), Le = (e) => ae(e, "number", ne), ue = (e) => !!e && Number.isInteger(Number(e)), Bi = (e) => e.endsWith("%") && ne(e.slice(0, -1)), M = (e) => bt.test(e), J = (e) => ji.test(e), $i = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Fi = (e) => ae(e, $i, vt), Wi = (e) => ae(e, "position", vt), Gi = /* @__PURE__ */ new Set(["image", "url"]), Xi = (e) => ae(e, Gi, Ki), Yi = (e) => ae(e, "", Zi), he = () => !0, ae = (e, t, r) => {
|
|
239
|
+
const i = bt.exec(e);
|
|
240
240
|
return i ? i[1] ? typeof t == "string" ? i[1] === t : t.has(i[1]) : r(i[2]) : !1;
|
|
241
|
-
},
|
|
241
|
+
}, qi = (e) => (
|
|
242
242
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
243
243
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
244
244
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
245
|
-
|
|
246
|
-
),
|
|
247
|
-
const e =
|
|
245
|
+
Pi.test(e) && !Oi.test(e)
|
|
246
|
+
), vt = () => !1, Zi = (e) => _i.test(e), Ki = (e) => Ui.test(e), Ji = () => {
|
|
247
|
+
const e = N("colors"), t = N("spacing"), r = N("blur"), i = N("brightness"), o = N("borderColor"), a = N("borderRadius"), l = N("borderSpacing"), s = N("borderWidth"), c = N("contrast"), d = N("grayscale"), g = N("hueRotate"), p = N("invert"), h = N("gap"), b = N("gradientColorStops"), f = N("gradientColorStopPositions"), k = N("inset"), u = N("margin"), y = N("opacity"), m = N("padding"), z = N("saturate"), v = N("scale"), A = N("sepia"), w = N("skew"), L = N("space"), V = N("translate"), D = () => ["auto", "contain", "none"], j = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", M, t], T = () => [M, t], x = () => ["", Y, K], I = () => ["auto", ne, M], R = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], H = () => ["solid", "dashed", "dotted", "double", "none"], P = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], S = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], U = () => ["", "0", M], F = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ne, M];
|
|
248
248
|
return {
|
|
249
249
|
cacheSize: 500,
|
|
250
250
|
separator: ":",
|
|
251
251
|
theme: {
|
|
252
|
-
colors: [
|
|
253
|
-
spacing: [
|
|
254
|
-
blur: ["none", "", J,
|
|
252
|
+
colors: [he],
|
|
253
|
+
spacing: [Y, K],
|
|
254
|
+
blur: ["none", "", J, M],
|
|
255
255
|
brightness: W(),
|
|
256
256
|
borderColor: [e],
|
|
257
|
-
borderRadius: ["none", "", "full", J,
|
|
258
|
-
borderSpacing:
|
|
259
|
-
borderWidth:
|
|
257
|
+
borderRadius: ["none", "", "full", J, M],
|
|
258
|
+
borderSpacing: T(),
|
|
259
|
+
borderWidth: x(),
|
|
260
260
|
contrast: W(),
|
|
261
|
-
grayscale:
|
|
261
|
+
grayscale: U(),
|
|
262
262
|
hueRotate: W(),
|
|
263
|
-
invert:
|
|
264
|
-
gap:
|
|
263
|
+
invert: U(),
|
|
264
|
+
gap: T(),
|
|
265
265
|
gradientColorStops: [e],
|
|
266
|
-
gradientColorStopPositions: [
|
|
267
|
-
inset:
|
|
268
|
-
margin:
|
|
266
|
+
gradientColorStopPositions: [Bi, K],
|
|
267
|
+
inset: _(),
|
|
268
|
+
margin: _(),
|
|
269
269
|
opacity: W(),
|
|
270
|
-
padding:
|
|
270
|
+
padding: T(),
|
|
271
271
|
saturate: W(),
|
|
272
272
|
scale: W(),
|
|
273
|
-
sepia:
|
|
273
|
+
sepia: U(),
|
|
274
274
|
skew: W(),
|
|
275
|
-
space:
|
|
276
|
-
translate:
|
|
275
|
+
space: T(),
|
|
276
|
+
translate: T()
|
|
277
277
|
},
|
|
278
278
|
classGroups: {
|
|
279
279
|
// Layout
|
|
@@ -282,7 +282,7 @@ const V = (e) => {
|
|
|
282
282
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
283
283
|
*/
|
|
284
284
|
aspect: [{
|
|
285
|
-
aspect: ["auto", "square", "video",
|
|
285
|
+
aspect: ["auto", "square", "video", M]
|
|
286
286
|
}],
|
|
287
287
|
/**
|
|
288
288
|
* Container
|
|
@@ -301,14 +301,14 @@ const V = (e) => {
|
|
|
301
301
|
* @see https://tailwindcss.com/docs/break-after
|
|
302
302
|
*/
|
|
303
303
|
"break-after": [{
|
|
304
|
-
"break-after":
|
|
304
|
+
"break-after": F()
|
|
305
305
|
}],
|
|
306
306
|
/**
|
|
307
307
|
* Break Before
|
|
308
308
|
* @see https://tailwindcss.com/docs/break-before
|
|
309
309
|
*/
|
|
310
310
|
"break-before": [{
|
|
311
|
-
"break-before":
|
|
311
|
+
"break-before": F()
|
|
312
312
|
}],
|
|
313
313
|
/**
|
|
314
314
|
* Break Inside
|
|
@@ -367,49 +367,49 @@ const V = (e) => {
|
|
|
367
367
|
* @see https://tailwindcss.com/docs/object-position
|
|
368
368
|
*/
|
|
369
369
|
"object-position": [{
|
|
370
|
-
object: [...
|
|
370
|
+
object: [...R(), M]
|
|
371
371
|
}],
|
|
372
372
|
/**
|
|
373
373
|
* Overflow
|
|
374
374
|
* @see https://tailwindcss.com/docs/overflow
|
|
375
375
|
*/
|
|
376
376
|
overflow: [{
|
|
377
|
-
overflow:
|
|
377
|
+
overflow: j()
|
|
378
378
|
}],
|
|
379
379
|
/**
|
|
380
380
|
* Overflow X
|
|
381
381
|
* @see https://tailwindcss.com/docs/overflow
|
|
382
382
|
*/
|
|
383
383
|
"overflow-x": [{
|
|
384
|
-
"overflow-x":
|
|
384
|
+
"overflow-x": j()
|
|
385
385
|
}],
|
|
386
386
|
/**
|
|
387
387
|
* Overflow Y
|
|
388
388
|
* @see https://tailwindcss.com/docs/overflow
|
|
389
389
|
*/
|
|
390
390
|
"overflow-y": [{
|
|
391
|
-
"overflow-y":
|
|
391
|
+
"overflow-y": j()
|
|
392
392
|
}],
|
|
393
393
|
/**
|
|
394
394
|
* Overscroll Behavior
|
|
395
395
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
396
396
|
*/
|
|
397
397
|
overscroll: [{
|
|
398
|
-
overscroll:
|
|
398
|
+
overscroll: D()
|
|
399
399
|
}],
|
|
400
400
|
/**
|
|
401
401
|
* Overscroll Behavior X
|
|
402
402
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
403
403
|
*/
|
|
404
404
|
"overscroll-x": [{
|
|
405
|
-
"overscroll-x":
|
|
405
|
+
"overscroll-x": D()
|
|
406
406
|
}],
|
|
407
407
|
/**
|
|
408
408
|
* Overscroll Behavior Y
|
|
409
409
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
410
410
|
*/
|
|
411
411
|
"overscroll-y": [{
|
|
412
|
-
"overscroll-y":
|
|
412
|
+
"overscroll-y": D()
|
|
413
413
|
}],
|
|
414
414
|
/**
|
|
415
415
|
* Position
|
|
@@ -421,63 +421,63 @@ const V = (e) => {
|
|
|
421
421
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
422
422
|
*/
|
|
423
423
|
inset: [{
|
|
424
|
-
inset: [
|
|
424
|
+
inset: [k]
|
|
425
425
|
}],
|
|
426
426
|
/**
|
|
427
427
|
* Right / Left
|
|
428
428
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
429
429
|
*/
|
|
430
430
|
"inset-x": [{
|
|
431
|
-
"inset-x": [
|
|
431
|
+
"inset-x": [k]
|
|
432
432
|
}],
|
|
433
433
|
/**
|
|
434
434
|
* Top / Bottom
|
|
435
435
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
436
436
|
*/
|
|
437
437
|
"inset-y": [{
|
|
438
|
-
"inset-y": [
|
|
438
|
+
"inset-y": [k]
|
|
439
439
|
}],
|
|
440
440
|
/**
|
|
441
441
|
* Start
|
|
442
442
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
443
443
|
*/
|
|
444
444
|
start: [{
|
|
445
|
-
start: [
|
|
445
|
+
start: [k]
|
|
446
446
|
}],
|
|
447
447
|
/**
|
|
448
448
|
* End
|
|
449
449
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
450
450
|
*/
|
|
451
451
|
end: [{
|
|
452
|
-
end: [
|
|
452
|
+
end: [k]
|
|
453
453
|
}],
|
|
454
454
|
/**
|
|
455
455
|
* Top
|
|
456
456
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
457
457
|
*/
|
|
458
458
|
top: [{
|
|
459
|
-
top: [
|
|
459
|
+
top: [k]
|
|
460
460
|
}],
|
|
461
461
|
/**
|
|
462
462
|
* Right
|
|
463
463
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
464
464
|
*/
|
|
465
465
|
right: [{
|
|
466
|
-
right: [
|
|
466
|
+
right: [k]
|
|
467
467
|
}],
|
|
468
468
|
/**
|
|
469
469
|
* Bottom
|
|
470
470
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
471
471
|
*/
|
|
472
472
|
bottom: [{
|
|
473
|
-
bottom: [
|
|
473
|
+
bottom: [k]
|
|
474
474
|
}],
|
|
475
475
|
/**
|
|
476
476
|
* Left
|
|
477
477
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
478
478
|
*/
|
|
479
479
|
left: [{
|
|
480
|
-
left: [
|
|
480
|
+
left: [k]
|
|
481
481
|
}],
|
|
482
482
|
/**
|
|
483
483
|
* Visibility
|
|
@@ -489,7 +489,7 @@ const V = (e) => {
|
|
|
489
489
|
* @see https://tailwindcss.com/docs/z-index
|
|
490
490
|
*/
|
|
491
491
|
z: [{
|
|
492
|
-
z: ["auto",
|
|
492
|
+
z: ["auto", ue, M]
|
|
493
493
|
}],
|
|
494
494
|
// Flexbox and Grid
|
|
495
495
|
/**
|
|
@@ -497,7 +497,7 @@ const V = (e) => {
|
|
|
497
497
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
498
498
|
*/
|
|
499
499
|
basis: [{
|
|
500
|
-
basis:
|
|
500
|
+
basis: _()
|
|
501
501
|
}],
|
|
502
502
|
/**
|
|
503
503
|
* Flex Direction
|
|
@@ -518,35 +518,35 @@ const V = (e) => {
|
|
|
518
518
|
* @see https://tailwindcss.com/docs/flex
|
|
519
519
|
*/
|
|
520
520
|
flex: [{
|
|
521
|
-
flex: ["1", "auto", "initial", "none",
|
|
521
|
+
flex: ["1", "auto", "initial", "none", M]
|
|
522
522
|
}],
|
|
523
523
|
/**
|
|
524
524
|
* Flex Grow
|
|
525
525
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
526
526
|
*/
|
|
527
527
|
grow: [{
|
|
528
|
-
grow:
|
|
528
|
+
grow: U()
|
|
529
529
|
}],
|
|
530
530
|
/**
|
|
531
531
|
* Flex Shrink
|
|
532
532
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
533
533
|
*/
|
|
534
534
|
shrink: [{
|
|
535
|
-
shrink:
|
|
535
|
+
shrink: U()
|
|
536
536
|
}],
|
|
537
537
|
/**
|
|
538
538
|
* Order
|
|
539
539
|
* @see https://tailwindcss.com/docs/order
|
|
540
540
|
*/
|
|
541
541
|
order: [{
|
|
542
|
-
order: ["first", "last", "none",
|
|
542
|
+
order: ["first", "last", "none", ue, M]
|
|
543
543
|
}],
|
|
544
544
|
/**
|
|
545
545
|
* Grid Template Columns
|
|
546
546
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
547
547
|
*/
|
|
548
548
|
"grid-cols": [{
|
|
549
|
-
"grid-cols": [
|
|
549
|
+
"grid-cols": [he]
|
|
550
550
|
}],
|
|
551
551
|
/**
|
|
552
552
|
* Grid Column Start / End
|
|
@@ -554,29 +554,29 @@ const V = (e) => {
|
|
|
554
554
|
*/
|
|
555
555
|
"col-start-end": [{
|
|
556
556
|
col: ["auto", {
|
|
557
|
-
span: ["full",
|
|
558
|
-
},
|
|
557
|
+
span: ["full", ue, M]
|
|
558
|
+
}, M]
|
|
559
559
|
}],
|
|
560
560
|
/**
|
|
561
561
|
* Grid Column Start
|
|
562
562
|
* @see https://tailwindcss.com/docs/grid-column
|
|
563
563
|
*/
|
|
564
564
|
"col-start": [{
|
|
565
|
-
"col-start":
|
|
565
|
+
"col-start": I()
|
|
566
566
|
}],
|
|
567
567
|
/**
|
|
568
568
|
* Grid Column End
|
|
569
569
|
* @see https://tailwindcss.com/docs/grid-column
|
|
570
570
|
*/
|
|
571
571
|
"col-end": [{
|
|
572
|
-
"col-end":
|
|
572
|
+
"col-end": I()
|
|
573
573
|
}],
|
|
574
574
|
/**
|
|
575
575
|
* Grid Template Rows
|
|
576
576
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
577
577
|
*/
|
|
578
578
|
"grid-rows": [{
|
|
579
|
-
"grid-rows": [
|
|
579
|
+
"grid-rows": [he]
|
|
580
580
|
}],
|
|
581
581
|
/**
|
|
582
582
|
* Grid Row Start / End
|
|
@@ -584,22 +584,22 @@ const V = (e) => {
|
|
|
584
584
|
*/
|
|
585
585
|
"row-start-end": [{
|
|
586
586
|
row: ["auto", {
|
|
587
|
-
span: [
|
|
588
|
-
},
|
|
587
|
+
span: [ue, M]
|
|
588
|
+
}, M]
|
|
589
589
|
}],
|
|
590
590
|
/**
|
|
591
591
|
* Grid Row Start
|
|
592
592
|
* @see https://tailwindcss.com/docs/grid-row
|
|
593
593
|
*/
|
|
594
594
|
"row-start": [{
|
|
595
|
-
"row-start":
|
|
595
|
+
"row-start": I()
|
|
596
596
|
}],
|
|
597
597
|
/**
|
|
598
598
|
* Grid Row End
|
|
599
599
|
* @see https://tailwindcss.com/docs/grid-row
|
|
600
600
|
*/
|
|
601
601
|
"row-end": [{
|
|
602
|
-
"row-end":
|
|
602
|
+
"row-end": I()
|
|
603
603
|
}],
|
|
604
604
|
/**
|
|
605
605
|
* Grid Auto Flow
|
|
@@ -613,42 +613,42 @@ const V = (e) => {
|
|
|
613
613
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
614
614
|
*/
|
|
615
615
|
"auto-cols": [{
|
|
616
|
-
"auto-cols": ["auto", "min", "max", "fr",
|
|
616
|
+
"auto-cols": ["auto", "min", "max", "fr", M]
|
|
617
617
|
}],
|
|
618
618
|
/**
|
|
619
619
|
* Grid Auto Rows
|
|
620
620
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
621
621
|
*/
|
|
622
622
|
"auto-rows": [{
|
|
623
|
-
"auto-rows": ["auto", "min", "max", "fr",
|
|
623
|
+
"auto-rows": ["auto", "min", "max", "fr", M]
|
|
624
624
|
}],
|
|
625
625
|
/**
|
|
626
626
|
* Gap
|
|
627
627
|
* @see https://tailwindcss.com/docs/gap
|
|
628
628
|
*/
|
|
629
629
|
gap: [{
|
|
630
|
-
gap: [
|
|
630
|
+
gap: [h]
|
|
631
631
|
}],
|
|
632
632
|
/**
|
|
633
633
|
* Gap X
|
|
634
634
|
* @see https://tailwindcss.com/docs/gap
|
|
635
635
|
*/
|
|
636
636
|
"gap-x": [{
|
|
637
|
-
"gap-x": [
|
|
637
|
+
"gap-x": [h]
|
|
638
638
|
}],
|
|
639
639
|
/**
|
|
640
640
|
* Gap Y
|
|
641
641
|
* @see https://tailwindcss.com/docs/gap
|
|
642
642
|
*/
|
|
643
643
|
"gap-y": [{
|
|
644
|
-
"gap-y": [
|
|
644
|
+
"gap-y": [h]
|
|
645
645
|
}],
|
|
646
646
|
/**
|
|
647
647
|
* Justify Content
|
|
648
648
|
* @see https://tailwindcss.com/docs/justify-content
|
|
649
649
|
*/
|
|
650
650
|
"justify-content": [{
|
|
651
|
-
justify: ["normal", ...
|
|
651
|
+
justify: ["normal", ...S()]
|
|
652
652
|
}],
|
|
653
653
|
/**
|
|
654
654
|
* Justify Items
|
|
@@ -669,7 +669,7 @@ const V = (e) => {
|
|
|
669
669
|
* @see https://tailwindcss.com/docs/align-content
|
|
670
670
|
*/
|
|
671
671
|
"align-content": [{
|
|
672
|
-
content: ["normal", ...
|
|
672
|
+
content: ["normal", ...S(), "baseline"]
|
|
673
673
|
}],
|
|
674
674
|
/**
|
|
675
675
|
* Align Items
|
|
@@ -690,7 +690,7 @@ const V = (e) => {
|
|
|
690
690
|
* @see https://tailwindcss.com/docs/place-content
|
|
691
691
|
*/
|
|
692
692
|
"place-content": [{
|
|
693
|
-
"place-content": [...
|
|
693
|
+
"place-content": [...S(), "baseline"]
|
|
694
694
|
}],
|
|
695
695
|
/**
|
|
696
696
|
* Place Items
|
|
@@ -712,133 +712,133 @@ const V = (e) => {
|
|
|
712
712
|
* @see https://tailwindcss.com/docs/padding
|
|
713
713
|
*/
|
|
714
714
|
p: [{
|
|
715
|
-
p: [
|
|
715
|
+
p: [m]
|
|
716
716
|
}],
|
|
717
717
|
/**
|
|
718
718
|
* Padding X
|
|
719
719
|
* @see https://tailwindcss.com/docs/padding
|
|
720
720
|
*/
|
|
721
721
|
px: [{
|
|
722
|
-
px: [
|
|
722
|
+
px: [m]
|
|
723
723
|
}],
|
|
724
724
|
/**
|
|
725
725
|
* Padding Y
|
|
726
726
|
* @see https://tailwindcss.com/docs/padding
|
|
727
727
|
*/
|
|
728
728
|
py: [{
|
|
729
|
-
py: [
|
|
729
|
+
py: [m]
|
|
730
730
|
}],
|
|
731
731
|
/**
|
|
732
732
|
* Padding Start
|
|
733
733
|
* @see https://tailwindcss.com/docs/padding
|
|
734
734
|
*/
|
|
735
735
|
ps: [{
|
|
736
|
-
ps: [
|
|
736
|
+
ps: [m]
|
|
737
737
|
}],
|
|
738
738
|
/**
|
|
739
739
|
* Padding End
|
|
740
740
|
* @see https://tailwindcss.com/docs/padding
|
|
741
741
|
*/
|
|
742
742
|
pe: [{
|
|
743
|
-
pe: [
|
|
743
|
+
pe: [m]
|
|
744
744
|
}],
|
|
745
745
|
/**
|
|
746
746
|
* Padding Top
|
|
747
747
|
* @see https://tailwindcss.com/docs/padding
|
|
748
748
|
*/
|
|
749
749
|
pt: [{
|
|
750
|
-
pt: [
|
|
750
|
+
pt: [m]
|
|
751
751
|
}],
|
|
752
752
|
/**
|
|
753
753
|
* Padding Right
|
|
754
754
|
* @see https://tailwindcss.com/docs/padding
|
|
755
755
|
*/
|
|
756
756
|
pr: [{
|
|
757
|
-
pr: [
|
|
757
|
+
pr: [m]
|
|
758
758
|
}],
|
|
759
759
|
/**
|
|
760
760
|
* Padding Bottom
|
|
761
761
|
* @see https://tailwindcss.com/docs/padding
|
|
762
762
|
*/
|
|
763
763
|
pb: [{
|
|
764
|
-
pb: [
|
|
764
|
+
pb: [m]
|
|
765
765
|
}],
|
|
766
766
|
/**
|
|
767
767
|
* Padding Left
|
|
768
768
|
* @see https://tailwindcss.com/docs/padding
|
|
769
769
|
*/
|
|
770
770
|
pl: [{
|
|
771
|
-
pl: [
|
|
771
|
+
pl: [m]
|
|
772
772
|
}],
|
|
773
773
|
/**
|
|
774
774
|
* Margin
|
|
775
775
|
* @see https://tailwindcss.com/docs/margin
|
|
776
776
|
*/
|
|
777
777
|
m: [{
|
|
778
|
-
m: [
|
|
778
|
+
m: [u]
|
|
779
779
|
}],
|
|
780
780
|
/**
|
|
781
781
|
* Margin X
|
|
782
782
|
* @see https://tailwindcss.com/docs/margin
|
|
783
783
|
*/
|
|
784
784
|
mx: [{
|
|
785
|
-
mx: [
|
|
785
|
+
mx: [u]
|
|
786
786
|
}],
|
|
787
787
|
/**
|
|
788
788
|
* Margin Y
|
|
789
789
|
* @see https://tailwindcss.com/docs/margin
|
|
790
790
|
*/
|
|
791
791
|
my: [{
|
|
792
|
-
my: [
|
|
792
|
+
my: [u]
|
|
793
793
|
}],
|
|
794
794
|
/**
|
|
795
795
|
* Margin Start
|
|
796
796
|
* @see https://tailwindcss.com/docs/margin
|
|
797
797
|
*/
|
|
798
798
|
ms: [{
|
|
799
|
-
ms: [
|
|
799
|
+
ms: [u]
|
|
800
800
|
}],
|
|
801
801
|
/**
|
|
802
802
|
* Margin End
|
|
803
803
|
* @see https://tailwindcss.com/docs/margin
|
|
804
804
|
*/
|
|
805
805
|
me: [{
|
|
806
|
-
me: [
|
|
806
|
+
me: [u]
|
|
807
807
|
}],
|
|
808
808
|
/**
|
|
809
809
|
* Margin Top
|
|
810
810
|
* @see https://tailwindcss.com/docs/margin
|
|
811
811
|
*/
|
|
812
812
|
mt: [{
|
|
813
|
-
mt: [
|
|
813
|
+
mt: [u]
|
|
814
814
|
}],
|
|
815
815
|
/**
|
|
816
816
|
* Margin Right
|
|
817
817
|
* @see https://tailwindcss.com/docs/margin
|
|
818
818
|
*/
|
|
819
819
|
mr: [{
|
|
820
|
-
mr: [
|
|
820
|
+
mr: [u]
|
|
821
821
|
}],
|
|
822
822
|
/**
|
|
823
823
|
* Margin Bottom
|
|
824
824
|
* @see https://tailwindcss.com/docs/margin
|
|
825
825
|
*/
|
|
826
826
|
mb: [{
|
|
827
|
-
mb: [
|
|
827
|
+
mb: [u]
|
|
828
828
|
}],
|
|
829
829
|
/**
|
|
830
830
|
* Margin Left
|
|
831
831
|
* @see https://tailwindcss.com/docs/margin
|
|
832
832
|
*/
|
|
833
833
|
ml: [{
|
|
834
|
-
ml: [
|
|
834
|
+
ml: [u]
|
|
835
835
|
}],
|
|
836
836
|
/**
|
|
837
837
|
* Space Between X
|
|
838
838
|
* @see https://tailwindcss.com/docs/space
|
|
839
839
|
*/
|
|
840
840
|
"space-x": [{
|
|
841
|
-
"space-x": [
|
|
841
|
+
"space-x": [L]
|
|
842
842
|
}],
|
|
843
843
|
/**
|
|
844
844
|
* Space Between X Reverse
|
|
@@ -850,7 +850,7 @@ const V = (e) => {
|
|
|
850
850
|
* @see https://tailwindcss.com/docs/space
|
|
851
851
|
*/
|
|
852
852
|
"space-y": [{
|
|
853
|
-
"space-y": [
|
|
853
|
+
"space-y": [L]
|
|
854
854
|
}],
|
|
855
855
|
/**
|
|
856
856
|
* Space Between Y Reverse
|
|
@@ -863,21 +863,21 @@ const V = (e) => {
|
|
|
863
863
|
* @see https://tailwindcss.com/docs/width
|
|
864
864
|
*/
|
|
865
865
|
w: [{
|
|
866
|
-
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw",
|
|
866
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", M, t]
|
|
867
867
|
}],
|
|
868
868
|
/**
|
|
869
869
|
* Min-Width
|
|
870
870
|
* @see https://tailwindcss.com/docs/min-width
|
|
871
871
|
*/
|
|
872
872
|
"min-w": [{
|
|
873
|
-
"min-w": [
|
|
873
|
+
"min-w": [M, t, "min", "max", "fit"]
|
|
874
874
|
}],
|
|
875
875
|
/**
|
|
876
876
|
* Max-Width
|
|
877
877
|
* @see https://tailwindcss.com/docs/max-width
|
|
878
878
|
*/
|
|
879
879
|
"max-w": [{
|
|
880
|
-
"max-w": [
|
|
880
|
+
"max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
|
|
881
881
|
screen: [J]
|
|
882
882
|
}, J]
|
|
883
883
|
}],
|
|
@@ -886,28 +886,28 @@ const V = (e) => {
|
|
|
886
886
|
* @see https://tailwindcss.com/docs/height
|
|
887
887
|
*/
|
|
888
888
|
h: [{
|
|
889
|
-
h: [
|
|
889
|
+
h: [M, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
890
890
|
}],
|
|
891
891
|
/**
|
|
892
892
|
* Min-Height
|
|
893
893
|
* @see https://tailwindcss.com/docs/min-height
|
|
894
894
|
*/
|
|
895
895
|
"min-h": [{
|
|
896
|
-
"min-h": [
|
|
896
|
+
"min-h": [M, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
897
897
|
}],
|
|
898
898
|
/**
|
|
899
899
|
* Max-Height
|
|
900
900
|
* @see https://tailwindcss.com/docs/max-height
|
|
901
901
|
*/
|
|
902
902
|
"max-h": [{
|
|
903
|
-
"max-h": [
|
|
903
|
+
"max-h": [M, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
904
904
|
}],
|
|
905
905
|
/**
|
|
906
906
|
* Size
|
|
907
907
|
* @see https://tailwindcss.com/docs/size
|
|
908
908
|
*/
|
|
909
909
|
size: [{
|
|
910
|
-
size: [
|
|
910
|
+
size: [M, t, "auto", "min", "max", "fit"]
|
|
911
911
|
}],
|
|
912
912
|
// Typography
|
|
913
913
|
/**
|
|
@@ -932,14 +932,14 @@ const V = (e) => {
|
|
|
932
932
|
* @see https://tailwindcss.com/docs/font-weight
|
|
933
933
|
*/
|
|
934
934
|
"font-weight": [{
|
|
935
|
-
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black",
|
|
935
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Le]
|
|
936
936
|
}],
|
|
937
937
|
/**
|
|
938
938
|
* Font Family
|
|
939
939
|
* @see https://tailwindcss.com/docs/font-family
|
|
940
940
|
*/
|
|
941
941
|
"font-family": [{
|
|
942
|
-
font: [
|
|
942
|
+
font: [he]
|
|
943
943
|
}],
|
|
944
944
|
/**
|
|
945
945
|
* Font Variant Numeric
|
|
@@ -976,35 +976,35 @@ const V = (e) => {
|
|
|
976
976
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
977
977
|
*/
|
|
978
978
|
tracking: [{
|
|
979
|
-
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest",
|
|
979
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", M]
|
|
980
980
|
}],
|
|
981
981
|
/**
|
|
982
982
|
* Line Clamp
|
|
983
983
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
984
984
|
*/
|
|
985
985
|
"line-clamp": [{
|
|
986
|
-
"line-clamp": ["none",
|
|
986
|
+
"line-clamp": ["none", ne, Le]
|
|
987
987
|
}],
|
|
988
988
|
/**
|
|
989
989
|
* Line Height
|
|
990
990
|
* @see https://tailwindcss.com/docs/line-height
|
|
991
991
|
*/
|
|
992
992
|
leading: [{
|
|
993
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
993
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", Y, M]
|
|
994
994
|
}],
|
|
995
995
|
/**
|
|
996
996
|
* List Style Image
|
|
997
997
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
998
998
|
*/
|
|
999
999
|
"list-image": [{
|
|
1000
|
-
"list-image": ["none",
|
|
1000
|
+
"list-image": ["none", M]
|
|
1001
1001
|
}],
|
|
1002
1002
|
/**
|
|
1003
1003
|
* List Style Type
|
|
1004
1004
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
1005
1005
|
*/
|
|
1006
1006
|
"list-style-type": [{
|
|
1007
|
-
list: ["none", "disc", "decimal",
|
|
1007
|
+
list: ["none", "disc", "decimal", M]
|
|
1008
1008
|
}],
|
|
1009
1009
|
/**
|
|
1010
1010
|
* List Style Position
|
|
@@ -1026,7 +1026,7 @@ const V = (e) => {
|
|
|
1026
1026
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
1027
1027
|
*/
|
|
1028
1028
|
"placeholder-opacity": [{
|
|
1029
|
-
"placeholder-opacity": [
|
|
1029
|
+
"placeholder-opacity": [y]
|
|
1030
1030
|
}],
|
|
1031
1031
|
/**
|
|
1032
1032
|
* Text Alignment
|
|
@@ -1047,7 +1047,7 @@ const V = (e) => {
|
|
|
1047
1047
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
1048
1048
|
*/
|
|
1049
1049
|
"text-opacity": [{
|
|
1050
|
-
"text-opacity": [
|
|
1050
|
+
"text-opacity": [y]
|
|
1051
1051
|
}],
|
|
1052
1052
|
/**
|
|
1053
1053
|
* Text Decoration
|
|
@@ -1059,21 +1059,21 @@ const V = (e) => {
|
|
|
1059
1059
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1060
1060
|
*/
|
|
1061
1061
|
"text-decoration-style": [{
|
|
1062
|
-
decoration: [...
|
|
1062
|
+
decoration: [...H(), "wavy"]
|
|
1063
1063
|
}],
|
|
1064
1064
|
/**
|
|
1065
1065
|
* Text Decoration Thickness
|
|
1066
1066
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1067
1067
|
*/
|
|
1068
1068
|
"text-decoration-thickness": [{
|
|
1069
|
-
decoration: ["auto", "from-font",
|
|
1069
|
+
decoration: ["auto", "from-font", Y, K]
|
|
1070
1070
|
}],
|
|
1071
1071
|
/**
|
|
1072
1072
|
* Text Underline Offset
|
|
1073
1073
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1074
1074
|
*/
|
|
1075
1075
|
"underline-offset": [{
|
|
1076
|
-
"underline-offset": ["auto",
|
|
1076
|
+
"underline-offset": ["auto", Y, M]
|
|
1077
1077
|
}],
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Text Decoration Color
|
|
@@ -1104,14 +1104,14 @@ const V = (e) => {
|
|
|
1104
1104
|
* @see https://tailwindcss.com/docs/text-indent
|
|
1105
1105
|
*/
|
|
1106
1106
|
indent: [{
|
|
1107
|
-
indent:
|
|
1107
|
+
indent: T()
|
|
1108
1108
|
}],
|
|
1109
1109
|
/**
|
|
1110
1110
|
* Vertical Alignment
|
|
1111
1111
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
1112
1112
|
*/
|
|
1113
1113
|
"vertical-align": [{
|
|
1114
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
1114
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", M]
|
|
1115
1115
|
}],
|
|
1116
1116
|
/**
|
|
1117
1117
|
* Whitespace
|
|
@@ -1139,7 +1139,7 @@ const V = (e) => {
|
|
|
1139
1139
|
* @see https://tailwindcss.com/docs/content
|
|
1140
1140
|
*/
|
|
1141
1141
|
content: [{
|
|
1142
|
-
content: ["none",
|
|
1142
|
+
content: ["none", M]
|
|
1143
1143
|
}],
|
|
1144
1144
|
// Backgrounds
|
|
1145
1145
|
/**
|
|
@@ -1162,7 +1162,7 @@ const V = (e) => {
|
|
|
1162
1162
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
1163
1163
|
*/
|
|
1164
1164
|
"bg-opacity": [{
|
|
1165
|
-
"bg-opacity": [
|
|
1165
|
+
"bg-opacity": [y]
|
|
1166
1166
|
}],
|
|
1167
1167
|
/**
|
|
1168
1168
|
* Background Origin
|
|
@@ -1176,7 +1176,7 @@ const V = (e) => {
|
|
|
1176
1176
|
* @see https://tailwindcss.com/docs/background-position
|
|
1177
1177
|
*/
|
|
1178
1178
|
"bg-position": [{
|
|
1179
|
-
bg: [...
|
|
1179
|
+
bg: [...R(), Wi]
|
|
1180
1180
|
}],
|
|
1181
1181
|
/**
|
|
1182
1182
|
* Background Repeat
|
|
@@ -1192,7 +1192,7 @@ const V = (e) => {
|
|
|
1192
1192
|
* @see https://tailwindcss.com/docs/background-size
|
|
1193
1193
|
*/
|
|
1194
1194
|
"bg-size": [{
|
|
1195
|
-
bg: ["auto", "cover", "contain",
|
|
1195
|
+
bg: ["auto", "cover", "contain", Fi]
|
|
1196
1196
|
}],
|
|
1197
1197
|
/**
|
|
1198
1198
|
* Background Image
|
|
@@ -1201,7 +1201,7 @@ const V = (e) => {
|
|
|
1201
1201
|
"bg-image": [{
|
|
1202
1202
|
bg: ["none", {
|
|
1203
1203
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1204
|
-
},
|
|
1204
|
+
}, Xi]
|
|
1205
1205
|
}],
|
|
1206
1206
|
/**
|
|
1207
1207
|
* Background Color
|
|
@@ -1215,42 +1215,42 @@ const V = (e) => {
|
|
|
1215
1215
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1216
1216
|
*/
|
|
1217
1217
|
"gradient-from-pos": [{
|
|
1218
|
-
from: [
|
|
1218
|
+
from: [f]
|
|
1219
1219
|
}],
|
|
1220
1220
|
/**
|
|
1221
1221
|
* Gradient Color Stops Via Position
|
|
1222
1222
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1223
1223
|
*/
|
|
1224
1224
|
"gradient-via-pos": [{
|
|
1225
|
-
via: [
|
|
1225
|
+
via: [f]
|
|
1226
1226
|
}],
|
|
1227
1227
|
/**
|
|
1228
1228
|
* Gradient Color Stops To Position
|
|
1229
1229
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1230
1230
|
*/
|
|
1231
1231
|
"gradient-to-pos": [{
|
|
1232
|
-
to: [
|
|
1232
|
+
to: [f]
|
|
1233
1233
|
}],
|
|
1234
1234
|
/**
|
|
1235
1235
|
* Gradient Color Stops From
|
|
1236
1236
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1237
1237
|
*/
|
|
1238
1238
|
"gradient-from": [{
|
|
1239
|
-
from: [
|
|
1239
|
+
from: [b]
|
|
1240
1240
|
}],
|
|
1241
1241
|
/**
|
|
1242
1242
|
* Gradient Color Stops Via
|
|
1243
1243
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1244
1244
|
*/
|
|
1245
1245
|
"gradient-via": [{
|
|
1246
|
-
via: [
|
|
1246
|
+
via: [b]
|
|
1247
1247
|
}],
|
|
1248
1248
|
/**
|
|
1249
1249
|
* Gradient Color Stops To
|
|
1250
1250
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1251
1251
|
*/
|
|
1252
1252
|
"gradient-to": [{
|
|
1253
|
-
to: [
|
|
1253
|
+
to: [b]
|
|
1254
1254
|
}],
|
|
1255
1255
|
// Borders
|
|
1256
1256
|
/**
|
|
@@ -1426,14 +1426,14 @@ const V = (e) => {
|
|
|
1426
1426
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
1427
1427
|
*/
|
|
1428
1428
|
"border-opacity": [{
|
|
1429
|
-
"border-opacity": [
|
|
1429
|
+
"border-opacity": [y]
|
|
1430
1430
|
}],
|
|
1431
1431
|
/**
|
|
1432
1432
|
* Border Style
|
|
1433
1433
|
* @see https://tailwindcss.com/docs/border-style
|
|
1434
1434
|
*/
|
|
1435
1435
|
"border-style": [{
|
|
1436
|
-
border: [...
|
|
1436
|
+
border: [...H(), "hidden"]
|
|
1437
1437
|
}],
|
|
1438
1438
|
/**
|
|
1439
1439
|
* Divide Width X
|
|
@@ -1464,14 +1464,14 @@ const V = (e) => {
|
|
|
1464
1464
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
1465
1465
|
*/
|
|
1466
1466
|
"divide-opacity": [{
|
|
1467
|
-
"divide-opacity": [
|
|
1467
|
+
"divide-opacity": [y]
|
|
1468
1468
|
}],
|
|
1469
1469
|
/**
|
|
1470
1470
|
* Divide Style
|
|
1471
1471
|
* @see https://tailwindcss.com/docs/divide-style
|
|
1472
1472
|
*/
|
|
1473
1473
|
"divide-style": [{
|
|
1474
|
-
divide:
|
|
1474
|
+
divide: H()
|
|
1475
1475
|
}],
|
|
1476
1476
|
/**
|
|
1477
1477
|
* Border Color
|
|
@@ -1548,21 +1548,21 @@ const V = (e) => {
|
|
|
1548
1548
|
* @see https://tailwindcss.com/docs/outline-style
|
|
1549
1549
|
*/
|
|
1550
1550
|
"outline-style": [{
|
|
1551
|
-
outline: ["", ...
|
|
1551
|
+
outline: ["", ...H()]
|
|
1552
1552
|
}],
|
|
1553
1553
|
/**
|
|
1554
1554
|
* Outline Offset
|
|
1555
1555
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
1556
1556
|
*/
|
|
1557
1557
|
"outline-offset": [{
|
|
1558
|
-
"outline-offset": [
|
|
1558
|
+
"outline-offset": [Y, M]
|
|
1559
1559
|
}],
|
|
1560
1560
|
/**
|
|
1561
1561
|
* Outline Width
|
|
1562
1562
|
* @see https://tailwindcss.com/docs/outline-width
|
|
1563
1563
|
*/
|
|
1564
1564
|
"outline-w": [{
|
|
1565
|
-
outline: [
|
|
1565
|
+
outline: [Y, K]
|
|
1566
1566
|
}],
|
|
1567
1567
|
/**
|
|
1568
1568
|
* Outline Color
|
|
@@ -1576,7 +1576,7 @@ const V = (e) => {
|
|
|
1576
1576
|
* @see https://tailwindcss.com/docs/ring-width
|
|
1577
1577
|
*/
|
|
1578
1578
|
"ring-w": [{
|
|
1579
|
-
ring:
|
|
1579
|
+
ring: x()
|
|
1580
1580
|
}],
|
|
1581
1581
|
/**
|
|
1582
1582
|
* Ring Width Inset
|
|
@@ -1595,14 +1595,14 @@ const V = (e) => {
|
|
|
1595
1595
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
1596
1596
|
*/
|
|
1597
1597
|
"ring-opacity": [{
|
|
1598
|
-
"ring-opacity": [
|
|
1598
|
+
"ring-opacity": [y]
|
|
1599
1599
|
}],
|
|
1600
1600
|
/**
|
|
1601
1601
|
* Ring Offset Width
|
|
1602
1602
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
1603
1603
|
*/
|
|
1604
1604
|
"ring-offset-w": [{
|
|
1605
|
-
"ring-offset": [
|
|
1605
|
+
"ring-offset": [Y, K]
|
|
1606
1606
|
}],
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Ring Offset Color
|
|
@@ -1617,21 +1617,21 @@ const V = (e) => {
|
|
|
1617
1617
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
1618
1618
|
*/
|
|
1619
1619
|
shadow: [{
|
|
1620
|
-
shadow: ["", "inner", "none", J,
|
|
1620
|
+
shadow: ["", "inner", "none", J, Yi]
|
|
1621
1621
|
}],
|
|
1622
1622
|
/**
|
|
1623
1623
|
* Box Shadow Color
|
|
1624
1624
|
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
1625
1625
|
*/
|
|
1626
1626
|
"shadow-color": [{
|
|
1627
|
-
shadow: [
|
|
1627
|
+
shadow: [he]
|
|
1628
1628
|
}],
|
|
1629
1629
|
/**
|
|
1630
1630
|
* Opacity
|
|
1631
1631
|
* @see https://tailwindcss.com/docs/opacity
|
|
1632
1632
|
*/
|
|
1633
1633
|
opacity: [{
|
|
1634
|
-
opacity: [
|
|
1634
|
+
opacity: [y]
|
|
1635
1635
|
}],
|
|
1636
1636
|
/**
|
|
1637
1637
|
* Mix Blend Mode
|
|
@@ -1682,7 +1682,7 @@ const V = (e) => {
|
|
|
1682
1682
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
1683
1683
|
*/
|
|
1684
1684
|
"drop-shadow": [{
|
|
1685
|
-
"drop-shadow": ["", "none", J,
|
|
1685
|
+
"drop-shadow": ["", "none", J, M]
|
|
1686
1686
|
}],
|
|
1687
1687
|
/**
|
|
1688
1688
|
* Grayscale
|
|
@@ -1710,14 +1710,14 @@ const V = (e) => {
|
|
|
1710
1710
|
* @see https://tailwindcss.com/docs/saturate
|
|
1711
1711
|
*/
|
|
1712
1712
|
saturate: [{
|
|
1713
|
-
saturate: [
|
|
1713
|
+
saturate: [z]
|
|
1714
1714
|
}],
|
|
1715
1715
|
/**
|
|
1716
1716
|
* Sepia
|
|
1717
1717
|
* @see https://tailwindcss.com/docs/sepia
|
|
1718
1718
|
*/
|
|
1719
1719
|
sepia: [{
|
|
1720
|
-
sepia: [
|
|
1720
|
+
sepia: [A]
|
|
1721
1721
|
}],
|
|
1722
1722
|
/**
|
|
1723
1723
|
* Backdrop Filter
|
|
@@ -1774,21 +1774,21 @@ const V = (e) => {
|
|
|
1774
1774
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
1775
1775
|
*/
|
|
1776
1776
|
"backdrop-opacity": [{
|
|
1777
|
-
"backdrop-opacity": [
|
|
1777
|
+
"backdrop-opacity": [y]
|
|
1778
1778
|
}],
|
|
1779
1779
|
/**
|
|
1780
1780
|
* Backdrop Saturate
|
|
1781
1781
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
1782
1782
|
*/
|
|
1783
1783
|
"backdrop-saturate": [{
|
|
1784
|
-
"backdrop-saturate": [
|
|
1784
|
+
"backdrop-saturate": [z]
|
|
1785
1785
|
}],
|
|
1786
1786
|
/**
|
|
1787
1787
|
* Backdrop Sepia
|
|
1788
1788
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
1789
1789
|
*/
|
|
1790
1790
|
"backdrop-sepia": [{
|
|
1791
|
-
"backdrop-sepia": [
|
|
1791
|
+
"backdrop-sepia": [A]
|
|
1792
1792
|
}],
|
|
1793
1793
|
// Tables
|
|
1794
1794
|
/**
|
|
@@ -1839,7 +1839,7 @@ const V = (e) => {
|
|
|
1839
1839
|
* @see https://tailwindcss.com/docs/transition-property
|
|
1840
1840
|
*/
|
|
1841
1841
|
transition: [{
|
|
1842
|
-
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform",
|
|
1842
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", M]
|
|
1843
1843
|
}],
|
|
1844
1844
|
/**
|
|
1845
1845
|
* Transition Duration
|
|
@@ -1853,7 +1853,7 @@ const V = (e) => {
|
|
|
1853
1853
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
1854
1854
|
*/
|
|
1855
1855
|
ease: [{
|
|
1856
|
-
ease: ["linear", "in", "out", "in-out",
|
|
1856
|
+
ease: ["linear", "in", "out", "in-out", M]
|
|
1857
1857
|
}],
|
|
1858
1858
|
/**
|
|
1859
1859
|
* Transition Delay
|
|
@@ -1867,7 +1867,7 @@ const V = (e) => {
|
|
|
1867
1867
|
* @see https://tailwindcss.com/docs/animation
|
|
1868
1868
|
*/
|
|
1869
1869
|
animate: [{
|
|
1870
|
-
animate: ["none", "spin", "ping", "pulse", "bounce",
|
|
1870
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", M]
|
|
1871
1871
|
}],
|
|
1872
1872
|
// Transforms
|
|
1873
1873
|
/**
|
|
@@ -1882,63 +1882,63 @@ const V = (e) => {
|
|
|
1882
1882
|
* @see https://tailwindcss.com/docs/scale
|
|
1883
1883
|
*/
|
|
1884
1884
|
scale: [{
|
|
1885
|
-
scale: [
|
|
1885
|
+
scale: [v]
|
|
1886
1886
|
}],
|
|
1887
1887
|
/**
|
|
1888
1888
|
* Scale X
|
|
1889
1889
|
* @see https://tailwindcss.com/docs/scale
|
|
1890
1890
|
*/
|
|
1891
1891
|
"scale-x": [{
|
|
1892
|
-
"scale-x": [
|
|
1892
|
+
"scale-x": [v]
|
|
1893
1893
|
}],
|
|
1894
1894
|
/**
|
|
1895
1895
|
* Scale Y
|
|
1896
1896
|
* @see https://tailwindcss.com/docs/scale
|
|
1897
1897
|
*/
|
|
1898
1898
|
"scale-y": [{
|
|
1899
|
-
"scale-y": [
|
|
1899
|
+
"scale-y": [v]
|
|
1900
1900
|
}],
|
|
1901
1901
|
/**
|
|
1902
1902
|
* Rotate
|
|
1903
1903
|
* @see https://tailwindcss.com/docs/rotate
|
|
1904
1904
|
*/
|
|
1905
1905
|
rotate: [{
|
|
1906
|
-
rotate: [
|
|
1906
|
+
rotate: [ue, M]
|
|
1907
1907
|
}],
|
|
1908
1908
|
/**
|
|
1909
1909
|
* Translate X
|
|
1910
1910
|
* @see https://tailwindcss.com/docs/translate
|
|
1911
1911
|
*/
|
|
1912
1912
|
"translate-x": [{
|
|
1913
|
-
"translate-x": [
|
|
1913
|
+
"translate-x": [V]
|
|
1914
1914
|
}],
|
|
1915
1915
|
/**
|
|
1916
1916
|
* Translate Y
|
|
1917
1917
|
* @see https://tailwindcss.com/docs/translate
|
|
1918
1918
|
*/
|
|
1919
1919
|
"translate-y": [{
|
|
1920
|
-
"translate-y": [
|
|
1920
|
+
"translate-y": [V]
|
|
1921
1921
|
}],
|
|
1922
1922
|
/**
|
|
1923
1923
|
* Skew X
|
|
1924
1924
|
* @see https://tailwindcss.com/docs/skew
|
|
1925
1925
|
*/
|
|
1926
1926
|
"skew-x": [{
|
|
1927
|
-
"skew-x": [
|
|
1927
|
+
"skew-x": [w]
|
|
1928
1928
|
}],
|
|
1929
1929
|
/**
|
|
1930
1930
|
* Skew Y
|
|
1931
1931
|
* @see https://tailwindcss.com/docs/skew
|
|
1932
1932
|
*/
|
|
1933
1933
|
"skew-y": [{
|
|
1934
|
-
"skew-y": [
|
|
1934
|
+
"skew-y": [w]
|
|
1935
1935
|
}],
|
|
1936
1936
|
/**
|
|
1937
1937
|
* Transform Origin
|
|
1938
1938
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
1939
1939
|
*/
|
|
1940
1940
|
"transform-origin": [{
|
|
1941
|
-
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left",
|
|
1941
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", M]
|
|
1942
1942
|
}],
|
|
1943
1943
|
// Interactivity
|
|
1944
1944
|
/**
|
|
@@ -1960,7 +1960,7 @@ const V = (e) => {
|
|
|
1960
1960
|
* @see https://tailwindcss.com/docs/cursor
|
|
1961
1961
|
*/
|
|
1962
1962
|
cursor: [{
|
|
1963
|
-
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",
|
|
1963
|
+
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", M]
|
|
1964
1964
|
}],
|
|
1965
1965
|
/**
|
|
1966
1966
|
* Caret Color
|
|
@@ -1995,126 +1995,126 @@ const V = (e) => {
|
|
|
1995
1995
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
1996
1996
|
*/
|
|
1997
1997
|
"scroll-m": [{
|
|
1998
|
-
"scroll-m":
|
|
1998
|
+
"scroll-m": T()
|
|
1999
1999
|
}],
|
|
2000
2000
|
/**
|
|
2001
2001
|
* Scroll Margin X
|
|
2002
2002
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2003
2003
|
*/
|
|
2004
2004
|
"scroll-mx": [{
|
|
2005
|
-
"scroll-mx":
|
|
2005
|
+
"scroll-mx": T()
|
|
2006
2006
|
}],
|
|
2007
2007
|
/**
|
|
2008
2008
|
* Scroll Margin Y
|
|
2009
2009
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2010
2010
|
*/
|
|
2011
2011
|
"scroll-my": [{
|
|
2012
|
-
"scroll-my":
|
|
2012
|
+
"scroll-my": T()
|
|
2013
2013
|
}],
|
|
2014
2014
|
/**
|
|
2015
2015
|
* Scroll Margin Start
|
|
2016
2016
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2017
2017
|
*/
|
|
2018
2018
|
"scroll-ms": [{
|
|
2019
|
-
"scroll-ms":
|
|
2019
|
+
"scroll-ms": T()
|
|
2020
2020
|
}],
|
|
2021
2021
|
/**
|
|
2022
2022
|
* Scroll Margin End
|
|
2023
2023
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2024
2024
|
*/
|
|
2025
2025
|
"scroll-me": [{
|
|
2026
|
-
"scroll-me":
|
|
2026
|
+
"scroll-me": T()
|
|
2027
2027
|
}],
|
|
2028
2028
|
/**
|
|
2029
2029
|
* Scroll Margin Top
|
|
2030
2030
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2031
2031
|
*/
|
|
2032
2032
|
"scroll-mt": [{
|
|
2033
|
-
"scroll-mt":
|
|
2033
|
+
"scroll-mt": T()
|
|
2034
2034
|
}],
|
|
2035
2035
|
/**
|
|
2036
2036
|
* Scroll Margin Right
|
|
2037
2037
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2038
2038
|
*/
|
|
2039
2039
|
"scroll-mr": [{
|
|
2040
|
-
"scroll-mr":
|
|
2040
|
+
"scroll-mr": T()
|
|
2041
2041
|
}],
|
|
2042
2042
|
/**
|
|
2043
2043
|
* Scroll Margin Bottom
|
|
2044
2044
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2045
2045
|
*/
|
|
2046
2046
|
"scroll-mb": [{
|
|
2047
|
-
"scroll-mb":
|
|
2047
|
+
"scroll-mb": T()
|
|
2048
2048
|
}],
|
|
2049
2049
|
/**
|
|
2050
2050
|
* Scroll Margin Left
|
|
2051
2051
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2052
2052
|
*/
|
|
2053
2053
|
"scroll-ml": [{
|
|
2054
|
-
"scroll-ml":
|
|
2054
|
+
"scroll-ml": T()
|
|
2055
2055
|
}],
|
|
2056
2056
|
/**
|
|
2057
2057
|
* Scroll Padding
|
|
2058
2058
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2059
2059
|
*/
|
|
2060
2060
|
"scroll-p": [{
|
|
2061
|
-
"scroll-p":
|
|
2061
|
+
"scroll-p": T()
|
|
2062
2062
|
}],
|
|
2063
2063
|
/**
|
|
2064
2064
|
* Scroll Padding X
|
|
2065
2065
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2066
2066
|
*/
|
|
2067
2067
|
"scroll-px": [{
|
|
2068
|
-
"scroll-px":
|
|
2068
|
+
"scroll-px": T()
|
|
2069
2069
|
}],
|
|
2070
2070
|
/**
|
|
2071
2071
|
* Scroll Padding Y
|
|
2072
2072
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2073
2073
|
*/
|
|
2074
2074
|
"scroll-py": [{
|
|
2075
|
-
"scroll-py":
|
|
2075
|
+
"scroll-py": T()
|
|
2076
2076
|
}],
|
|
2077
2077
|
/**
|
|
2078
2078
|
* Scroll Padding Start
|
|
2079
2079
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2080
2080
|
*/
|
|
2081
2081
|
"scroll-ps": [{
|
|
2082
|
-
"scroll-ps":
|
|
2082
|
+
"scroll-ps": T()
|
|
2083
2083
|
}],
|
|
2084
2084
|
/**
|
|
2085
2085
|
* Scroll Padding End
|
|
2086
2086
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2087
2087
|
*/
|
|
2088
2088
|
"scroll-pe": [{
|
|
2089
|
-
"scroll-pe":
|
|
2089
|
+
"scroll-pe": T()
|
|
2090
2090
|
}],
|
|
2091
2091
|
/**
|
|
2092
2092
|
* Scroll Padding Top
|
|
2093
2093
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2094
2094
|
*/
|
|
2095
2095
|
"scroll-pt": [{
|
|
2096
|
-
"scroll-pt":
|
|
2096
|
+
"scroll-pt": T()
|
|
2097
2097
|
}],
|
|
2098
2098
|
/**
|
|
2099
2099
|
* Scroll Padding Right
|
|
2100
2100
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2101
2101
|
*/
|
|
2102
2102
|
"scroll-pr": [{
|
|
2103
|
-
"scroll-pr":
|
|
2103
|
+
"scroll-pr": T()
|
|
2104
2104
|
}],
|
|
2105
2105
|
/**
|
|
2106
2106
|
* Scroll Padding Bottom
|
|
2107
2107
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2108
2108
|
*/
|
|
2109
2109
|
"scroll-pb": [{
|
|
2110
|
-
"scroll-pb":
|
|
2110
|
+
"scroll-pb": T()
|
|
2111
2111
|
}],
|
|
2112
2112
|
/**
|
|
2113
2113
|
* Scroll Padding Left
|
|
2114
2114
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2115
2115
|
*/
|
|
2116
2116
|
"scroll-pl": [{
|
|
2117
|
-
"scroll-pl":
|
|
2117
|
+
"scroll-pl": T()
|
|
2118
2118
|
}],
|
|
2119
2119
|
/**
|
|
2120
2120
|
* Scroll Snap Align
|
|
@@ -2182,7 +2182,7 @@ const V = (e) => {
|
|
|
2182
2182
|
* @see https://tailwindcss.com/docs/will-change
|
|
2183
2183
|
*/
|
|
2184
2184
|
"will-change": [{
|
|
2185
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
2185
|
+
"will-change": ["auto", "scroll", "contents", "transform", M]
|
|
2186
2186
|
}],
|
|
2187
2187
|
// SVG
|
|
2188
2188
|
/**
|
|
@@ -2197,7 +2197,7 @@ const V = (e) => {
|
|
|
2197
2197
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
2198
2198
|
*/
|
|
2199
2199
|
"stroke-w": [{
|
|
2200
|
-
stroke: [
|
|
2200
|
+
stroke: [Y, K, Le]
|
|
2201
2201
|
}],
|
|
2202
2202
|
/**
|
|
2203
2203
|
* Stroke
|
|
@@ -2272,21 +2272,21 @@ const V = (e) => {
|
|
|
2272
2272
|
"font-size": ["leading"]
|
|
2273
2273
|
}
|
|
2274
2274
|
};
|
|
2275
|
-
},
|
|
2276
|
-
function
|
|
2277
|
-
return
|
|
2275
|
+
}, Qi = /* @__PURE__ */ Vi(Ji);
|
|
2276
|
+
function O(...e) {
|
|
2277
|
+
return Qi(ct(e));
|
|
2278
2278
|
}
|
|
2279
|
-
let
|
|
2280
|
-
function
|
|
2281
|
-
return
|
|
2282
|
-
}
|
|
2283
|
-
function Qi(e) {
|
|
2284
|
-
return `${e}`.toLowerCase() === "mod" ? Re() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Re() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Re() ? "⇧" : "Shift" : e;
|
|
2279
|
+
let Ne;
|
|
2280
|
+
function Ee() {
|
|
2281
|
+
return Ne === void 0 && (Ne = navigator.platform.includes("Mac")), Ne;
|
|
2285
2282
|
}
|
|
2286
2283
|
function en(e) {
|
|
2287
|
-
return e
|
|
2284
|
+
return `${e}`.toLowerCase() === "mod" ? Ee() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Ee() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Ee() ? "⇧" : "Shift" : e;
|
|
2288
2285
|
}
|
|
2289
|
-
|
|
2286
|
+
function tn(e) {
|
|
2287
|
+
return e.map(en).join(" ");
|
|
2288
|
+
}
|
|
2289
|
+
const wt = Q.forwardRef(
|
|
2290
2290
|
(e, t) => {
|
|
2291
2291
|
const {
|
|
2292
2292
|
icon: r = void 0,
|
|
@@ -2301,43 +2301,43 @@ const vt = Q.forwardRef(
|
|
|
2301
2301
|
action: d = void 0,
|
|
2302
2302
|
isActive: g = void 0,
|
|
2303
2303
|
children: p,
|
|
2304
|
-
asChild:
|
|
2305
|
-
upload:
|
|
2306
|
-
initialDisplayedColor:
|
|
2307
|
-
dataState:
|
|
2308
|
-
...
|
|
2309
|
-
} = e,
|
|
2304
|
+
asChild: h = !1,
|
|
2305
|
+
upload: b = !1,
|
|
2306
|
+
initialDisplayedColor: f = void 0,
|
|
2307
|
+
dataState: k = !1,
|
|
2308
|
+
...u
|
|
2309
|
+
} = e, y = yt[r], m = h ? ht : Ct, z = (v) => {
|
|
2310
2310
|
if (o) {
|
|
2311
|
-
|
|
2311
|
+
v.preventDefault();
|
|
2312
2312
|
return;
|
|
2313
2313
|
}
|
|
2314
|
-
d == null || d(
|
|
2314
|
+
d == null || d(v);
|
|
2315
2315
|
};
|
|
2316
|
-
return /* @__PURE__ */
|
|
2317
|
-
/* @__PURE__ */ n(
|
|
2318
|
-
|
|
2316
|
+
return /* @__PURE__ */ C(Ln, { children: [
|
|
2317
|
+
/* @__PURE__ */ n(Nn, { asChild: !0, children: /* @__PURE__ */ C(
|
|
2318
|
+
m,
|
|
2319
2319
|
{
|
|
2320
|
-
className:
|
|
2321
|
-
"data-state":
|
|
2320
|
+
className: O("richtext-h-[32px] richtext-w-[32px]", a),
|
|
2321
|
+
"data-state": k ? "on" : "off",
|
|
2322
2322
|
disabled: o,
|
|
2323
|
-
onClick:
|
|
2323
|
+
onClick: z,
|
|
2324
2324
|
ref: t,
|
|
2325
2325
|
size: "sm",
|
|
2326
|
-
...
|
|
2326
|
+
...u,
|
|
2327
2327
|
children: [
|
|
2328
|
-
|
|
2328
|
+
y && /* @__PURE__ */ n(y, { className: "richtext-size-4" }),
|
|
2329
2329
|
p
|
|
2330
2330
|
]
|
|
2331
2331
|
}
|
|
2332
2332
|
) }),
|
|
2333
|
-
i && /* @__PURE__ */ n(
|
|
2333
|
+
i && /* @__PURE__ */ n(kt, { ...c, className: "richtext-tooltip", children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
|
|
2334
2334
|
/* @__PURE__ */ n("div", { children: i }),
|
|
2335
|
-
!!(s != null && s.length) && /* @__PURE__ */ n("span", { children:
|
|
2335
|
+
!!(s != null && s.length) && /* @__PURE__ */ n("span", { children: tn(s) })
|
|
2336
2336
|
] }) })
|
|
2337
2337
|
] });
|
|
2338
2338
|
}
|
|
2339
2339
|
);
|
|
2340
|
-
function
|
|
2340
|
+
function rn(e) {
|
|
2341
2341
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2342
2342
|
"path",
|
|
2343
2343
|
{
|
|
@@ -2346,7 +2346,7 @@ function tn(e) {
|
|
|
2346
2346
|
}
|
|
2347
2347
|
) });
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2349
|
+
function nn(e) {
|
|
2350
2350
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2351
2351
|
"path",
|
|
2352
2352
|
{
|
|
@@ -2359,7 +2359,7 @@ function rn(e) {
|
|
|
2359
2359
|
}
|
|
2360
2360
|
) });
|
|
2361
2361
|
}
|
|
2362
|
-
function
|
|
2362
|
+
function on() {
|
|
2363
2363
|
return /* @__PURE__ */ n(
|
|
2364
2364
|
"svg",
|
|
2365
2365
|
{
|
|
@@ -2386,7 +2386,7 @@ function nn() {
|
|
|
2386
2386
|
}
|
|
2387
2387
|
);
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function an() {
|
|
2390
2390
|
return /* @__PURE__ */ n(
|
|
2391
2391
|
"svg",
|
|
2392
2392
|
{
|
|
@@ -2413,7 +2413,7 @@ function on() {
|
|
|
2413
2413
|
}
|
|
2414
2414
|
);
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2416
|
+
function sn(e) {
|
|
2417
2417
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2418
2418
|
"path",
|
|
2419
2419
|
{
|
|
@@ -2422,8 +2422,8 @@ function an(e) {
|
|
|
2422
2422
|
}
|
|
2423
2423
|
) });
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2426
|
-
const t =
|
|
2425
|
+
function Re(e) {
|
|
2426
|
+
const t = yt[e.name];
|
|
2427
2427
|
return t ? /* @__PURE__ */ n(
|
|
2428
2428
|
t,
|
|
2429
2429
|
{
|
|
@@ -2432,7 +2432,7 @@ function fe(e) {
|
|
|
2432
2432
|
}
|
|
2433
2433
|
) : null;
|
|
2434
2434
|
}
|
|
2435
|
-
function
|
|
2435
|
+
function ln(e) {
|
|
2436
2436
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2437
2437
|
"path",
|
|
2438
2438
|
{
|
|
@@ -2441,7 +2441,7 @@ function sn(e) {
|
|
|
2441
2441
|
}
|
|
2442
2442
|
) });
|
|
2443
2443
|
}
|
|
2444
|
-
function
|
|
2444
|
+
function cn(e) {
|
|
2445
2445
|
return /* @__PURE__ */ n(
|
|
2446
2446
|
"svg",
|
|
2447
2447
|
{
|
|
@@ -2466,10 +2466,10 @@ function ln(e) {
|
|
|
2466
2466
|
}
|
|
2467
2467
|
);
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2469
|
+
function dn(e) {
|
|
2470
2470
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M9 7v10h6v-2h-4V7z" }) });
|
|
2471
2471
|
}
|
|
2472
|
-
function
|
|
2472
|
+
function un(e) {
|
|
2473
2473
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2474
2474
|
"path",
|
|
2475
2475
|
{
|
|
@@ -2478,7 +2478,7 @@ function dn(e) {
|
|
|
2478
2478
|
}
|
|
2479
2479
|
) });
|
|
2480
2480
|
}
|
|
2481
|
-
function
|
|
2481
|
+
function hn(e) {
|
|
2482
2482
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2483
2483
|
"path",
|
|
2484
2484
|
{
|
|
@@ -2487,7 +2487,7 @@ function un(e) {
|
|
|
2487
2487
|
}
|
|
2488
2488
|
) });
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2490
|
+
function fn() {
|
|
2491
2491
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2492
2492
|
"path",
|
|
2493
2493
|
{
|
|
@@ -2496,7 +2496,7 @@ function hn() {
|
|
|
2496
2496
|
}
|
|
2497
2497
|
) });
|
|
2498
2498
|
}
|
|
2499
|
-
function
|
|
2499
|
+
function mn() {
|
|
2500
2500
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2501
2501
|
"path",
|
|
2502
2502
|
{
|
|
@@ -2509,7 +2509,7 @@ function fn() {
|
|
|
2509
2509
|
}
|
|
2510
2510
|
) });
|
|
2511
2511
|
}
|
|
2512
|
-
function
|
|
2512
|
+
function gn() {
|
|
2513
2513
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2514
2514
|
"path",
|
|
2515
2515
|
{
|
|
@@ -2522,7 +2522,7 @@ function mn() {
|
|
|
2522
2522
|
}
|
|
2523
2523
|
) });
|
|
2524
2524
|
}
|
|
2525
|
-
function
|
|
2525
|
+
function pn() {
|
|
2526
2526
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2527
2527
|
"path",
|
|
2528
2528
|
{
|
|
@@ -2535,7 +2535,7 @@ function gn() {
|
|
|
2535
2535
|
}
|
|
2536
2536
|
) });
|
|
2537
2537
|
}
|
|
2538
|
-
function
|
|
2538
|
+
function xn() {
|
|
2539
2539
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2540
2540
|
"path",
|
|
2541
2541
|
{
|
|
@@ -2544,8 +2544,8 @@ function pn() {
|
|
|
2544
2544
|
}
|
|
2545
2545
|
) });
|
|
2546
2546
|
}
|
|
2547
|
-
function
|
|
2548
|
-
return /* @__PURE__ */
|
|
2547
|
+
function bn() {
|
|
2548
|
+
return /* @__PURE__ */ C("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
|
|
2549
2549
|
/* @__PURE__ */ n(
|
|
2550
2550
|
"path",
|
|
2551
2551
|
{
|
|
@@ -2562,8 +2562,8 @@ function xn() {
|
|
|
2562
2562
|
)
|
|
2563
2563
|
] });
|
|
2564
2564
|
}
|
|
2565
|
-
function
|
|
2566
|
-
return /* @__PURE__ */
|
|
2565
|
+
function vn() {
|
|
2566
|
+
return /* @__PURE__ */ C(
|
|
2567
2567
|
"svg",
|
|
2568
2568
|
{
|
|
2569
2569
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2590,7 +2590,7 @@ function bn() {
|
|
|
2590
2590
|
}
|
|
2591
2591
|
);
|
|
2592
2592
|
}
|
|
2593
|
-
function
|
|
2593
|
+
function wn() {
|
|
2594
2594
|
return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 15 15", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n(
|
|
2595
2595
|
"path",
|
|
2596
2596
|
{
|
|
@@ -2599,8 +2599,8 @@ function vn() {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
) });
|
|
2601
2601
|
}
|
|
2602
|
-
function
|
|
2603
|
-
return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */
|
|
2602
|
+
function yn() {
|
|
2603
|
+
return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ C(
|
|
2604
2604
|
"g",
|
|
2605
2605
|
{
|
|
2606
2606
|
fill: "none",
|
|
@@ -2615,7 +2615,7 @@ function wn() {
|
|
|
2615
2615
|
}
|
|
2616
2616
|
) });
|
|
2617
2617
|
}
|
|
2618
|
-
function
|
|
2618
|
+
function Cn() {
|
|
2619
2619
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
2620
2620
|
"path",
|
|
2621
2621
|
{
|
|
@@ -2624,8 +2624,8 @@ function yn() {
|
|
|
2624
2624
|
}
|
|
2625
2625
|
) });
|
|
2626
2626
|
}
|
|
2627
|
-
function
|
|
2628
|
-
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */
|
|
2627
|
+
function kn() {
|
|
2628
|
+
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */ C("g", { fill: "none", stroke: "currentColor", strokeWidth: "4", children: [
|
|
2629
2629
|
/* @__PURE__ */ n("circle", { cx: "10", cy: "24", r: "4" }),
|
|
2630
2630
|
/* @__PURE__ */ n("circle", { cx: "38", cy: "10", r: "4" }),
|
|
2631
2631
|
/* @__PURE__ */ n("circle", { cx: "38", cy: "24", r: "4" }),
|
|
@@ -2633,7 +2633,7 @@ function Cn() {
|
|
|
2633
2633
|
/* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M34 38H22V10h12M14 24h20" })
|
|
2634
2634
|
] }) });
|
|
2635
2635
|
}
|
|
2636
|
-
function
|
|
2636
|
+
function Mn() {
|
|
2637
2637
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
2638
2638
|
"path",
|
|
2639
2639
|
{
|
|
@@ -2642,7 +2642,7 @@ function kn() {
|
|
|
2642
2642
|
}
|
|
2643
2643
|
) });
|
|
2644
2644
|
}
|
|
2645
|
-
function
|
|
2645
|
+
function In() {
|
|
2646
2646
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2647
2647
|
"path",
|
|
2648
2648
|
{
|
|
@@ -2656,7 +2656,7 @@ function Mn() {
|
|
|
2656
2656
|
}
|
|
2657
2657
|
) });
|
|
2658
2658
|
}
|
|
2659
|
-
function
|
|
2659
|
+
function Tn() {
|
|
2660
2660
|
return /* @__PURE__ */ n(
|
|
2661
2661
|
"svg",
|
|
2662
2662
|
{
|
|
@@ -2677,143 +2677,143 @@ function In() {
|
|
|
2677
2677
|
}
|
|
2678
2678
|
);
|
|
2679
2679
|
}
|
|
2680
|
-
const
|
|
2681
|
-
Bold:
|
|
2682
|
-
LoaderCircle:
|
|
2683
|
-
Italic:
|
|
2684
|
-
Underline:
|
|
2685
|
-
Quote:
|
|
2686
|
-
TextQuote:
|
|
2687
|
-
Strikethrough:
|
|
2688
|
-
Minus:
|
|
2689
|
-
Eraser:
|
|
2690
|
-
PaintRoller:
|
|
2691
|
-
Redo2:
|
|
2692
|
-
Undo2:
|
|
2693
|
-
AlignCenter:
|
|
2694
|
-
AlignJustify:
|
|
2695
|
-
AlignLeft:
|
|
2696
|
-
AlignRight:
|
|
2697
|
-
ChevronDown:
|
|
2698
|
-
Subscript:
|
|
2699
|
-
Superscript:
|
|
2700
|
-
Code:
|
|
2701
|
-
Code2:
|
|
2702
|
-
Type:
|
|
2703
|
-
IndentIncrease:
|
|
2704
|
-
IndentDecrease:
|
|
2705
|
-
List:
|
|
2706
|
-
ListOrdered:
|
|
2707
|
-
ListTodo:
|
|
2708
|
-
Link:
|
|
2680
|
+
const yt = {
|
|
2681
|
+
Bold: li,
|
|
2682
|
+
LoaderCircle: si,
|
|
2683
|
+
Italic: ai,
|
|
2684
|
+
Underline: oi,
|
|
2685
|
+
Quote: ni,
|
|
2686
|
+
TextQuote: nn,
|
|
2687
|
+
Strikethrough: ii,
|
|
2688
|
+
Minus: ri,
|
|
2689
|
+
Eraser: ti,
|
|
2690
|
+
PaintRoller: ei,
|
|
2691
|
+
Redo2: Qr,
|
|
2692
|
+
Undo2: Jr,
|
|
2693
|
+
AlignCenter: wi,
|
|
2694
|
+
AlignJustify: vi,
|
|
2695
|
+
AlignLeft: bi,
|
|
2696
|
+
AlignRight: xi,
|
|
2697
|
+
ChevronDown: Kr,
|
|
2698
|
+
Subscript: Zr,
|
|
2699
|
+
Superscript: qr,
|
|
2700
|
+
Code: Yr,
|
|
2701
|
+
Code2: Xr,
|
|
2702
|
+
Type: Gr,
|
|
2703
|
+
IndentIncrease: Wr,
|
|
2704
|
+
IndentDecrease: Fr,
|
|
2705
|
+
List: $r,
|
|
2706
|
+
ListOrdered: Br,
|
|
2707
|
+
ListTodo: Ur,
|
|
2708
|
+
Link: _r,
|
|
2709
2709
|
ImageUp: Or,
|
|
2710
|
-
Video:
|
|
2711
|
-
Maximize:
|
|
2712
|
-
Minimize:
|
|
2713
|
-
Table:
|
|
2714
|
-
Sparkles:
|
|
2715
|
-
Pencil:
|
|
2716
|
-
Unlink:
|
|
2710
|
+
Video: Pr,
|
|
2711
|
+
Maximize: jr,
|
|
2712
|
+
Minimize: Dr,
|
|
2713
|
+
Table: Hr,
|
|
2714
|
+
Sparkles: Vr,
|
|
2715
|
+
Pencil: Rr,
|
|
2716
|
+
Unlink: Er,
|
|
2717
2717
|
BetweenHorizonalEnd: Nr,
|
|
2718
|
-
BetweenHorizonalStart:
|
|
2719
|
-
BetweenVerticalStart:
|
|
2720
|
-
BetweenVerticalEnd:
|
|
2721
|
-
TableCellsMerge:
|
|
2722
|
-
TableCellsSplit:
|
|
2723
|
-
Trash2:
|
|
2724
|
-
Trash:
|
|
2718
|
+
BetweenHorizonalStart: Lr,
|
|
2719
|
+
BetweenVerticalStart: Ar,
|
|
2720
|
+
BetweenVerticalEnd: Sr,
|
|
2721
|
+
TableCellsMerge: zr,
|
|
2722
|
+
TableCellsSplit: Tr,
|
|
2723
|
+
Trash2: Ir,
|
|
2724
|
+
Trash: Mr,
|
|
2725
2725
|
Replace: Ye,
|
|
2726
|
-
ChevronsUpDown:
|
|
2727
|
-
LineHeight:
|
|
2728
|
-
Word:
|
|
2729
|
-
HeadingParagraph:
|
|
2730
|
-
Heading1:
|
|
2731
|
-
Heading2:
|
|
2732
|
-
Heading3:
|
|
2733
|
-
Heading4:
|
|
2734
|
-
Heading5:
|
|
2735
|
-
Heading6:
|
|
2726
|
+
ChevronsUpDown: kr,
|
|
2727
|
+
LineHeight: ln,
|
|
2728
|
+
Word: sn,
|
|
2729
|
+
HeadingParagraph: Cr,
|
|
2730
|
+
Heading1: yr,
|
|
2731
|
+
Heading2: wr,
|
|
2732
|
+
Heading3: vr,
|
|
2733
|
+
Heading4: br,
|
|
2734
|
+
Heading5: xr,
|
|
2735
|
+
Heading6: pr,
|
|
2736
2736
|
Columns2: qe,
|
|
2737
|
-
Columns3:
|
|
2738
|
-
Columns4:
|
|
2739
|
-
Plus:
|
|
2740
|
-
Grip:
|
|
2741
|
-
Copy:
|
|
2742
|
-
Clipboard:
|
|
2743
|
-
PanelLeft:
|
|
2744
|
-
PanelRight:
|
|
2737
|
+
Columns3: gr,
|
|
2738
|
+
Columns4: mr,
|
|
2739
|
+
Plus: fr,
|
|
2740
|
+
Grip: hr,
|
|
2741
|
+
Copy: ur,
|
|
2742
|
+
Clipboard: dr,
|
|
2743
|
+
PanelLeft: cr,
|
|
2744
|
+
PanelRight: lr,
|
|
2745
2745
|
Columns: qe,
|
|
2746
|
-
Iframe:
|
|
2747
|
-
MenuDown:
|
|
2748
|
-
SizeS:
|
|
2749
|
-
SizeM:
|
|
2750
|
-
SizeL:
|
|
2751
|
-
AspectRatio:
|
|
2752
|
-
Emoji:
|
|
2753
|
-
DeleteColumn:
|
|
2754
|
-
DeleteRow:
|
|
2746
|
+
Iframe: sr,
|
|
2747
|
+
MenuDown: cn,
|
|
2748
|
+
SizeS: hn,
|
|
2749
|
+
SizeM: un,
|
|
2750
|
+
SizeL: dn,
|
|
2751
|
+
AspectRatio: rn,
|
|
2752
|
+
Emoji: ar,
|
|
2753
|
+
DeleteColumn: on,
|
|
2754
|
+
DeleteRow: an,
|
|
2755
2755
|
SearchAndReplace: Ye,
|
|
2756
|
-
EmojiIcon:
|
|
2757
|
-
KatexIcon:
|
|
2758
|
-
ExportPdf:
|
|
2759
|
-
ExportWord:
|
|
2760
|
-
ImportWord:
|
|
2761
|
-
ColumnAddLeft:
|
|
2762
|
-
ColumnAddRight:
|
|
2763
|
-
BookMarked:
|
|
2764
|
-
Excalidraw:
|
|
2765
|
-
ZoomIn:
|
|
2766
|
-
ZoomOut:
|
|
2767
|
-
Settings:
|
|
2768
|
-
Eye:
|
|
2769
|
-
TextDirection:
|
|
2770
|
-
LeftToRight:
|
|
2771
|
-
RightToLeft:
|
|
2772
|
-
Attachment:
|
|
2773
|
-
GifIcon:
|
|
2774
|
-
ChevronUp:
|
|
2775
|
-
Crop:
|
|
2776
|
-
Mermaid:
|
|
2777
|
-
Twitter:
|
|
2778
|
-
CodeView:
|
|
2779
|
-
FlipX:
|
|
2780
|
-
FlipY:
|
|
2781
|
-
PencilRuler:
|
|
2782
|
-
WrapText:
|
|
2783
|
-
Loader:
|
|
2784
|
-
X:
|
|
2785
|
-
Html:
|
|
2786
|
-
ExternalLink:
|
|
2787
|
-
Callout:
|
|
2788
|
-
},
|
|
2756
|
+
EmojiIcon: or,
|
|
2757
|
+
KatexIcon: nr,
|
|
2758
|
+
ExportPdf: bn,
|
|
2759
|
+
ExportWord: vn,
|
|
2760
|
+
ImportWord: Tn,
|
|
2761
|
+
ColumnAddLeft: mn,
|
|
2762
|
+
ColumnAddRight: gn,
|
|
2763
|
+
BookMarked: ir,
|
|
2764
|
+
Excalidraw: xn,
|
|
2765
|
+
ZoomIn: rr,
|
|
2766
|
+
ZoomOut: tr,
|
|
2767
|
+
Settings: er,
|
|
2768
|
+
Eye: Qt,
|
|
2769
|
+
TextDirection: pn,
|
|
2770
|
+
LeftToRight: Cn,
|
|
2771
|
+
RightToLeft: Mn,
|
|
2772
|
+
Attachment: Jt,
|
|
2773
|
+
GifIcon: wn,
|
|
2774
|
+
ChevronUp: Kt,
|
|
2775
|
+
Crop: Zt,
|
|
2776
|
+
Mermaid: kn,
|
|
2777
|
+
Twitter: In,
|
|
2778
|
+
CodeView: fn,
|
|
2779
|
+
FlipX: qt,
|
|
2780
|
+
FlipY: Yt,
|
|
2781
|
+
PencilRuler: Xt,
|
|
2782
|
+
WrapText: Gt,
|
|
2783
|
+
Loader: Wt,
|
|
2784
|
+
X: lt,
|
|
2785
|
+
Html: yn,
|
|
2786
|
+
ExternalLink: Ft,
|
|
2787
|
+
Callout: $t
|
|
2788
|
+
}, tt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, rt = ct, Ue = (e, t) => (r) => {
|
|
2789
2789
|
var i;
|
|
2790
|
-
if ((t == null ? void 0 : t.variants) == null) return
|
|
2790
|
+
if ((t == null ? void 0 : t.variants) == null) return rt(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
|
|
2791
2791
|
const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((d) => {
|
|
2792
2792
|
const g = r == null ? void 0 : r[d], p = a == null ? void 0 : a[d];
|
|
2793
2793
|
if (g === null) return null;
|
|
2794
|
-
const
|
|
2795
|
-
return o[d][
|
|
2794
|
+
const h = tt(g) || tt(p);
|
|
2795
|
+
return o[d][h];
|
|
2796
2796
|
}), s = r && Object.entries(r).reduce((d, g) => {
|
|
2797
|
-
let [p,
|
|
2798
|
-
return
|
|
2797
|
+
let [p, h] = g;
|
|
2798
|
+
return h === void 0 || (d[p] = h), d;
|
|
2799
2799
|
}, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((d, g) => {
|
|
2800
|
-
let { class: p, className:
|
|
2801
|
-
return Object.entries(
|
|
2802
|
-
let [
|
|
2803
|
-
return Array.isArray(
|
|
2800
|
+
let { class: p, className: h, ...b } = g;
|
|
2801
|
+
return Object.entries(b).every((f) => {
|
|
2802
|
+
let [k, u] = f;
|
|
2803
|
+
return Array.isArray(u) ? u.includes({
|
|
2804
2804
|
...a,
|
|
2805
2805
|
...s
|
|
2806
|
-
}[
|
|
2806
|
+
}[k]) : {
|
|
2807
2807
|
...a,
|
|
2808
2808
|
...s
|
|
2809
|
-
}[
|
|
2809
|
+
}[k] === u;
|
|
2810
2810
|
}) ? [
|
|
2811
2811
|
...d,
|
|
2812
2812
|
p,
|
|
2813
|
-
|
|
2813
|
+
h
|
|
2814
2814
|
] : d;
|
|
2815
2815
|
}, []);
|
|
2816
|
-
return
|
|
2816
|
+
return rt(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
|
|
2817
2817
|
}, zn = Ue(
|
|
2818
2818
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
|
|
2819
2819
|
{
|
|
@@ -2838,17 +2838,17 @@ const wt = {
|
|
|
2838
2838
|
size: "default"
|
|
2839
2839
|
}
|
|
2840
2840
|
}
|
|
2841
|
-
),
|
|
2842
|
-
({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ?
|
|
2841
|
+
), G = B.forwardRef(
|
|
2842
|
+
({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? ht : "button", { className: O(zn({ variant: t, size: r, className: e })), ref: a, ...o })
|
|
2843
2843
|
);
|
|
2844
|
-
|
|
2845
|
-
const
|
|
2844
|
+
G.displayName = "Button";
|
|
2845
|
+
const re = B.forwardRef(
|
|
2846
2846
|
({ className: e, type: t, ...r }, i) => /* @__PURE__ */ n(
|
|
2847
2847
|
"input",
|
|
2848
2848
|
{
|
|
2849
2849
|
ref: i,
|
|
2850
2850
|
type: t,
|
|
2851
|
-
className:
|
|
2851
|
+
className: O(
|
|
2852
2852
|
"richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-text-foreground richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-1 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
|
|
2853
2853
|
e
|
|
2854
2854
|
),
|
|
@@ -2856,48 +2856,48 @@ const te = U.forwardRef(
|
|
|
2856
2856
|
}
|
|
2857
2857
|
)
|
|
2858
2858
|
);
|
|
2859
|
-
|
|
2860
|
-
const
|
|
2859
|
+
re.displayName = "Input";
|
|
2860
|
+
const Sn = Ue(
|
|
2861
2861
|
"richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
|
|
2862
|
-
), pe =
|
|
2863
|
-
pe.displayName =
|
|
2864
|
-
const
|
|
2865
|
-
|
|
2862
|
+
), pe = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(mt.Root, { className: O(Sn(), e), ref: r, ...t }));
|
|
2863
|
+
pe.displayName = mt.Root.displayName;
|
|
2864
|
+
const Se = ie.Root, ve = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2865
|
+
ie.List,
|
|
2866
2866
|
{
|
|
2867
2867
|
ref: r,
|
|
2868
|
-
className:
|
|
2868
|
+
className: O(
|
|
2869
2869
|
"richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",
|
|
2870
2870
|
e
|
|
2871
2871
|
),
|
|
2872
2872
|
...t
|
|
2873
2873
|
}
|
|
2874
2874
|
));
|
|
2875
|
-
ve.displayName =
|
|
2876
|
-
const q =
|
|
2877
|
-
|
|
2875
|
+
ve.displayName = ie.List.displayName;
|
|
2876
|
+
const q = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2877
|
+
ie.Trigger,
|
|
2878
2878
|
{
|
|
2879
2879
|
ref: r,
|
|
2880
|
-
className:
|
|
2880
|
+
className: O(
|
|
2881
2881
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",
|
|
2882
2882
|
e
|
|
2883
2883
|
),
|
|
2884
2884
|
...t
|
|
2885
2885
|
}
|
|
2886
2886
|
));
|
|
2887
|
-
q.displayName =
|
|
2888
|
-
const Z =
|
|
2889
|
-
|
|
2887
|
+
q.displayName = ie.Trigger.displayName;
|
|
2888
|
+
const Z = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2889
|
+
ie.Content,
|
|
2890
2890
|
{
|
|
2891
2891
|
ref: r,
|
|
2892
|
-
className:
|
|
2892
|
+
className: O(
|
|
2893
2893
|
"richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",
|
|
2894
2894
|
e
|
|
2895
2895
|
),
|
|
2896
2896
|
...t
|
|
2897
2897
|
}
|
|
2898
2898
|
));
|
|
2899
|
-
Z.displayName =
|
|
2900
|
-
const
|
|
2899
|
+
Z.displayName = ie.Content.displayName;
|
|
2900
|
+
const An = Ue(
|
|
2901
2901
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",
|
|
2902
2902
|
{
|
|
2903
2903
|
variants: {
|
|
@@ -2916,36 +2916,36 @@ const Sn = Ue(
|
|
|
2916
2916
|
size: "default"
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
|
-
),
|
|
2920
|
-
|
|
2919
|
+
), Ct = B.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
|
|
2920
|
+
ft.Root,
|
|
2921
2921
|
{
|
|
2922
2922
|
ref: o,
|
|
2923
|
-
className:
|
|
2923
|
+
className: O(An({ variant: t, size: r, className: e })),
|
|
2924
2924
|
...i
|
|
2925
2925
|
}
|
|
2926
2926
|
));
|
|
2927
|
-
|
|
2928
|
-
const
|
|
2927
|
+
Ct.displayName = ft.Root.displayName;
|
|
2928
|
+
const Go = be.Provider, Ln = be.Root, Nn = be.Trigger, kt = B.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
|
|
2929
2929
|
be.Content,
|
|
2930
2930
|
{
|
|
2931
2931
|
"data-richtext-portal": !0,
|
|
2932
2932
|
ref: i,
|
|
2933
2933
|
sideOffset: t,
|
|
2934
|
-
className:
|
|
2934
|
+
className: O(
|
|
2935
2935
|
"richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border-none richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
|
|
2936
2936
|
e
|
|
2937
2937
|
),
|
|
2938
2938
|
...r
|
|
2939
2939
|
}
|
|
2940
2940
|
));
|
|
2941
|
-
|
|
2942
|
-
const
|
|
2941
|
+
kt.displayName = be.Content.displayName;
|
|
2942
|
+
const En = 1, Rn = 1e6;
|
|
2943
2943
|
let Ve = 0;
|
|
2944
|
-
function
|
|
2944
|
+
function Vn() {
|
|
2945
2945
|
return Ve = (Ve + 1) % Number.MAX_SAFE_INTEGER, Ve.toString();
|
|
2946
2946
|
}
|
|
2947
2947
|
const He = /* @__PURE__ */ new Map();
|
|
2948
|
-
function
|
|
2948
|
+
function it(e) {
|
|
2949
2949
|
if (He.has(e))
|
|
2950
2950
|
return;
|
|
2951
2951
|
const t = setTimeout(() => {
|
|
@@ -2953,15 +2953,15 @@ function rt(e) {
|
|
|
2953
2953
|
type: "REMOVE_TOAST",
|
|
2954
2954
|
toastId: e
|
|
2955
2955
|
});
|
|
2956
|
-
},
|
|
2956
|
+
}, Rn);
|
|
2957
2957
|
He.set(e, t);
|
|
2958
2958
|
}
|
|
2959
|
-
function
|
|
2959
|
+
function Hn(e, t) {
|
|
2960
2960
|
switch (t.type) {
|
|
2961
2961
|
case "ADD_TOAST":
|
|
2962
2962
|
return {
|
|
2963
2963
|
...e,
|
|
2964
|
-
toasts: [t.toast, ...e.toasts].slice(0,
|
|
2964
|
+
toasts: [t.toast, ...e.toasts].slice(0, En)
|
|
2965
2965
|
};
|
|
2966
2966
|
case "UPDATE_TOAST":
|
|
2967
2967
|
return {
|
|
@@ -2970,8 +2970,8 @@ function Vn(e, t) {
|
|
|
2970
2970
|
};
|
|
2971
2971
|
case "DISMISS_TOAST": {
|
|
2972
2972
|
const { toastId: r } = t;
|
|
2973
|
-
return r ?
|
|
2974
|
-
|
|
2973
|
+
return r ? it(r) : e.toasts.forEach((i) => {
|
|
2974
|
+
it(i.id);
|
|
2975
2975
|
}), {
|
|
2976
2976
|
...e,
|
|
2977
2977
|
toasts: e.toasts.map(
|
|
@@ -2992,15 +2992,15 @@ function Vn(e, t) {
|
|
|
2992
2992
|
};
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
|
-
const
|
|
2996
|
-
let
|
|
2995
|
+
const Ce = [];
|
|
2996
|
+
let ke = { toasts: [] };
|
|
2997
2997
|
function me(e) {
|
|
2998
|
-
|
|
2999
|
-
t(
|
|
2998
|
+
ke = Hn(ke, e), Ce.forEach((t) => {
|
|
2999
|
+
t(ke);
|
|
3000
3000
|
});
|
|
3001
3001
|
}
|
|
3002
|
-
function
|
|
3003
|
-
const t =
|
|
3002
|
+
function Dn({ ...e }) {
|
|
3003
|
+
const t = Vn(), r = (o) => me({
|
|
3004
3004
|
type: "UPDATE_TOAST",
|
|
3005
3005
|
toast: { ...o, id: t }
|
|
3006
3006
|
}), i = () => me({ type: "DISMISS_TOAST", toastId: t });
|
|
@@ -3021,38 +3021,38 @@ function Hn({ ...e }) {
|
|
|
3021
3021
|
};
|
|
3022
3022
|
}
|
|
3023
3023
|
function Be() {
|
|
3024
|
-
const [e, t] =
|
|
3025
|
-
return
|
|
3026
|
-
const r =
|
|
3027
|
-
r > -1 &&
|
|
3024
|
+
const [e, t] = B.useState(ke);
|
|
3025
|
+
return B.useEffect(() => (Ce.push(t), () => {
|
|
3026
|
+
const r = Ce.indexOf(t);
|
|
3027
|
+
r > -1 && Ce.splice(r, 1);
|
|
3028
3028
|
}), [e]), {
|
|
3029
3029
|
...e,
|
|
3030
|
-
toast:
|
|
3030
|
+
toast: Dn,
|
|
3031
3031
|
dismiss: (r) => me({ type: "DISMISS_TOAST", toastId: r })
|
|
3032
3032
|
};
|
|
3033
3033
|
}
|
|
3034
|
-
const $e =
|
|
3035
|
-
|
|
3034
|
+
const $e = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3035
|
+
je.Root,
|
|
3036
3036
|
{
|
|
3037
3037
|
ref: r,
|
|
3038
|
-
className:
|
|
3038
|
+
className: O(
|
|
3039
3039
|
"!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-p-0 !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-1 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",
|
|
3040
3040
|
e
|
|
3041
3041
|
),
|
|
3042
3042
|
...t,
|
|
3043
3043
|
children: /* @__PURE__ */ n(
|
|
3044
|
-
|
|
3044
|
+
je.Indicator,
|
|
3045
3045
|
{
|
|
3046
|
-
className:
|
|
3046
|
+
className: O(
|
|
3047
3047
|
"!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"
|
|
3048
3048
|
),
|
|
3049
|
-
children: /* @__PURE__ */ n(
|
|
3049
|
+
children: /* @__PURE__ */ n(ci, { className: "!richtext-h-4 !richtext-w-4" })
|
|
3050
3050
|
}
|
|
3051
3051
|
)
|
|
3052
3052
|
}
|
|
3053
3053
|
));
|
|
3054
|
-
$e.displayName =
|
|
3055
|
-
function
|
|
3054
|
+
$e.displayName = je.Root.displayName;
|
|
3055
|
+
function jn(e) {
|
|
3056
3056
|
return e = e || /* @__PURE__ */ new Map(), {
|
|
3057
3057
|
/**
|
|
3058
3058
|
* A Map of event names to registered handler functions.
|
|
@@ -3099,57 +3099,57 @@ function Dn(e) {
|
|
|
3099
3099
|
}
|
|
3100
3100
|
};
|
|
3101
3101
|
}
|
|
3102
|
-
const Fe =
|
|
3103
|
-
function
|
|
3104
|
-
const r =
|
|
3102
|
+
const Fe = jn(), Mt = Q.createContext(Fe), Pn = () => Q.useContext(Mt);
|
|
3103
|
+
function It(e, t) {
|
|
3104
|
+
const r = Pn();
|
|
3105
3105
|
Q.useEffect(() => (t.map((i) => r.on(i, e)), () => {
|
|
3106
3106
|
t.map((i) => r.off(i, e));
|
|
3107
3107
|
}), [r, t, e]);
|
|
3108
3108
|
}
|
|
3109
|
-
const
|
|
3110
|
-
function
|
|
3111
|
-
return /* @__PURE__ */ n(
|
|
3109
|
+
const Xo = Fe.emit;
|
|
3110
|
+
function Yo({ children: e }) {
|
|
3111
|
+
return /* @__PURE__ */ n(Mt.Provider, { value: Fe, children: e });
|
|
3112
3112
|
}
|
|
3113
|
-
const we =
|
|
3114
|
-
|
|
3113
|
+
const we = X.Root, We = X.Trigger, On = X.Portal, Tt = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3114
|
+
X.Overlay,
|
|
3115
3115
|
{
|
|
3116
3116
|
ref: r,
|
|
3117
|
-
className:
|
|
3117
|
+
className: O(
|
|
3118
3118
|
"richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",
|
|
3119
3119
|
e
|
|
3120
3120
|
),
|
|
3121
3121
|
...t
|
|
3122
3122
|
}
|
|
3123
3123
|
));
|
|
3124
|
-
|
|
3125
|
-
const
|
|
3126
|
-
/* @__PURE__ */ n(
|
|
3127
|
-
/* @__PURE__ */
|
|
3128
|
-
|
|
3124
|
+
Tt.displayName = X.Overlay.displayName;
|
|
3125
|
+
const se = B.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ C(On, { "data-richtext-portal": !0, children: [
|
|
3126
|
+
/* @__PURE__ */ n(Tt, {}),
|
|
3127
|
+
/* @__PURE__ */ C(
|
|
3128
|
+
X.Content,
|
|
3129
3129
|
{
|
|
3130
3130
|
"data-richtext-portal": !0,
|
|
3131
3131
|
ref: i,
|
|
3132
|
-
className:
|
|
3132
|
+
className: O(
|
|
3133
3133
|
"richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border !richtext-border-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",
|
|
3134
3134
|
e
|
|
3135
3135
|
),
|
|
3136
3136
|
...r,
|
|
3137
3137
|
children: [
|
|
3138
3138
|
t,
|
|
3139
|
-
/* @__PURE__ */
|
|
3140
|
-
/* @__PURE__ */ n(
|
|
3139
|
+
/* @__PURE__ */ C(X.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
|
|
3140
|
+
/* @__PURE__ */ n(lt, { className: "richtext-size-4 richtext-text-accent-foreground" }),
|
|
3141
3141
|
/* @__PURE__ */ n("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
|
|
3142
3142
|
] })
|
|
3143
3143
|
]
|
|
3144
3144
|
}
|
|
3145
3145
|
)
|
|
3146
3146
|
] }));
|
|
3147
|
-
|
|
3148
|
-
function
|
|
3147
|
+
se.displayName = X.Content.displayName;
|
|
3148
|
+
function _n({ className: e, ...t }) {
|
|
3149
3149
|
return /* @__PURE__ */ n(
|
|
3150
3150
|
"div",
|
|
3151
3151
|
{
|
|
3152
|
-
className:
|
|
3152
|
+
className: O(
|
|
3153
3153
|
"richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",
|
|
3154
3154
|
e
|
|
3155
3155
|
),
|
|
@@ -3157,12 +3157,12 @@ function Pn({ className: e, ...t }) {
|
|
|
3157
3157
|
}
|
|
3158
3158
|
);
|
|
3159
3159
|
}
|
|
3160
|
-
|
|
3160
|
+
_n.displayName = "DialogHeader";
|
|
3161
3161
|
function zt({ className: e, ...t }) {
|
|
3162
3162
|
return /* @__PURE__ */ n(
|
|
3163
3163
|
"div",
|
|
3164
3164
|
{
|
|
3165
|
-
className:
|
|
3165
|
+
className: O(
|
|
3166
3166
|
"richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",
|
|
3167
3167
|
e
|
|
3168
3168
|
),
|
|
@@ -3171,28 +3171,28 @@ function zt({ className: e, ...t }) {
|
|
|
3171
3171
|
);
|
|
3172
3172
|
}
|
|
3173
3173
|
zt.displayName = "DialogFooter";
|
|
3174
|
-
const
|
|
3175
|
-
|
|
3174
|
+
const le = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3175
|
+
X.Title,
|
|
3176
3176
|
{
|
|
3177
3177
|
ref: r,
|
|
3178
|
-
className:
|
|
3178
|
+
className: O(
|
|
3179
3179
|
"richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight richtext-text-foreground",
|
|
3180
3180
|
e
|
|
3181
3181
|
),
|
|
3182
3182
|
...t
|
|
3183
3183
|
}
|
|
3184
3184
|
));
|
|
3185
|
-
|
|
3186
|
-
const
|
|
3187
|
-
|
|
3185
|
+
le.displayName = X.Title.displayName;
|
|
3186
|
+
const Un = B.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3187
|
+
X.Description,
|
|
3188
3188
|
{
|
|
3189
|
-
className:
|
|
3189
|
+
className: O("richtext-text-sm richtext-text-muted-foreground", e),
|
|
3190
3190
|
ref: r,
|
|
3191
3191
|
...t
|
|
3192
3192
|
}
|
|
3193
3193
|
));
|
|
3194
|
-
|
|
3195
|
-
var
|
|
3194
|
+
Un.displayName = X.Description.displayName;
|
|
3195
|
+
var Bn = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, $n = dt.create({
|
|
3196
3196
|
name: "image",
|
|
3197
3197
|
addOptions() {
|
|
3198
3198
|
return {
|
|
@@ -3236,7 +3236,7 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.cre
|
|
|
3236
3236
|
];
|
|
3237
3237
|
},
|
|
3238
3238
|
renderHTML({ HTMLAttributes: e }) {
|
|
3239
|
-
return ["img",
|
|
3239
|
+
return ["img", ut(this.options.HTMLAttributes, e)];
|
|
3240
3240
|
},
|
|
3241
3241
|
parseMarkdown: (e, t) => t.createNode("image", {
|
|
3242
3242
|
src: e.href,
|
|
@@ -3254,33 +3254,33 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.cre
|
|
|
3254
3254
|
const { directions: e, minWidth: t, minHeight: r, alwaysPreserveAspectRatio: i } = this.options.resize;
|
|
3255
3255
|
return ({ node: o, getPos: a, HTMLAttributes: l, editor: s }) => {
|
|
3256
3256
|
const c = document.createElement("img");
|
|
3257
|
-
Object.entries(l).forEach(([p,
|
|
3258
|
-
if (
|
|
3257
|
+
Object.entries(l).forEach(([p, h]) => {
|
|
3258
|
+
if (h != null)
|
|
3259
3259
|
switch (p) {
|
|
3260
3260
|
case "width":
|
|
3261
3261
|
case "height":
|
|
3262
3262
|
break;
|
|
3263
3263
|
default:
|
|
3264
|
-
c.setAttribute(p,
|
|
3264
|
+
c.setAttribute(p, h);
|
|
3265
3265
|
break;
|
|
3266
3266
|
}
|
|
3267
3267
|
}), c.src = l.src;
|
|
3268
|
-
const d = new
|
|
3268
|
+
const d = new ui({
|
|
3269
3269
|
element: c,
|
|
3270
3270
|
editor: s,
|
|
3271
3271
|
node: o,
|
|
3272
3272
|
getPos: a,
|
|
3273
|
-
onResize: (p,
|
|
3274
|
-
c.style.width = `${p}px`, c.style.height = `${
|
|
3273
|
+
onResize: (p, h) => {
|
|
3274
|
+
c.style.width = `${p}px`, c.style.height = `${h}px`;
|
|
3275
3275
|
},
|
|
3276
|
-
onCommit: (p,
|
|
3277
|
-
const
|
|
3278
|
-
|
|
3276
|
+
onCommit: (p, h) => {
|
|
3277
|
+
const b = a();
|
|
3278
|
+
b !== void 0 && this.editor.chain().setNodeSelection(b).updateAttributes(this.name, {
|
|
3279
3279
|
width: p,
|
|
3280
|
-
height:
|
|
3280
|
+
height: h
|
|
3281
3281
|
}).run();
|
|
3282
3282
|
},
|
|
3283
|
-
onUpdate: (p,
|
|
3283
|
+
onUpdate: (p, h, b) => p.type === o.type,
|
|
3284
3284
|
options: {
|
|
3285
3285
|
directions: e,
|
|
3286
3286
|
min: {
|
|
@@ -3305,8 +3305,8 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.cre
|
|
|
3305
3305
|
},
|
|
3306
3306
|
addInputRules() {
|
|
3307
3307
|
return [
|
|
3308
|
-
|
|
3309
|
-
find:
|
|
3308
|
+
di({
|
|
3309
|
+
find: Bn,
|
|
3310
3310
|
type: this.type,
|
|
3311
3311
|
getAttributes: (e) => {
|
|
3312
3312
|
const [, , t, r, i] = e;
|
|
@@ -3315,285 +3315,407 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.cre
|
|
|
3315
3315
|
})
|
|
3316
3316
|
];
|
|
3317
3317
|
}
|
|
3318
|
-
}),
|
|
3319
|
-
function
|
|
3320
|
-
var t =
|
|
3318
|
+
}), Fn = $n, Wn = typeof global == "object" && global && global.Object === Object && global, Gn = typeof self == "object" && self && self.Object === Object && self, St = Wn || Gn || Function("return this")(), Ie = St.Symbol, At = Object.prototype, Xn = At.hasOwnProperty, Yn = At.toString, fe = Ie ? Ie.toStringTag : void 0;
|
|
3319
|
+
function qn(e) {
|
|
3320
|
+
var t = Xn.call(e, fe), r = e[fe];
|
|
3321
3321
|
try {
|
|
3322
|
-
e[
|
|
3322
|
+
e[fe] = void 0;
|
|
3323
3323
|
var i = !0;
|
|
3324
3324
|
} catch {
|
|
3325
3325
|
}
|
|
3326
|
-
var o =
|
|
3327
|
-
return i && (t ? e[
|
|
3328
|
-
}
|
|
3329
|
-
var qn = Object.prototype, Zn = qn.toString;
|
|
3330
|
-
function Kn(e) {
|
|
3331
|
-
return Zn.call(e);
|
|
3326
|
+
var o = Yn.call(e);
|
|
3327
|
+
return i && (t ? e[fe] = r : delete e[fe]), o;
|
|
3332
3328
|
}
|
|
3333
|
-
var
|
|
3334
|
-
function
|
|
3335
|
-
return
|
|
3329
|
+
var Zn = Object.prototype, Kn = Zn.toString;
|
|
3330
|
+
function Jn(e) {
|
|
3331
|
+
return Kn.call(e);
|
|
3336
3332
|
}
|
|
3333
|
+
var Qn = "[object Null]", eo = "[object Undefined]", nt = Ie ? Ie.toStringTag : void 0;
|
|
3337
3334
|
function Lt(e) {
|
|
3335
|
+
return e == null ? e === void 0 ? eo : Qn : nt && nt in Object(e) ? qn(e) : Jn(e);
|
|
3336
|
+
}
|
|
3337
|
+
function Nt(e) {
|
|
3338
3338
|
return e != null && typeof e == "object";
|
|
3339
3339
|
}
|
|
3340
|
-
var
|
|
3341
|
-
function
|
|
3342
|
-
return typeof e == "symbol" ||
|
|
3340
|
+
var to = "[object Symbol]";
|
|
3341
|
+
function ro(e) {
|
|
3342
|
+
return typeof e == "symbol" || Nt(e) && Lt(e) == to;
|
|
3343
3343
|
}
|
|
3344
|
-
var
|
|
3345
|
-
function
|
|
3346
|
-
for (var t = e.length; t-- &&
|
|
3344
|
+
var io = /\s/;
|
|
3345
|
+
function no(e) {
|
|
3346
|
+
for (var t = e.length; t-- && io.test(e.charAt(t)); )
|
|
3347
3347
|
;
|
|
3348
3348
|
return t;
|
|
3349
3349
|
}
|
|
3350
|
-
var
|
|
3351
|
-
function
|
|
3352
|
-
return e && e.slice(0,
|
|
3350
|
+
var oo = /^\s+/;
|
|
3351
|
+
function ao(e) {
|
|
3352
|
+
return e && e.slice(0, no(e) + 1).replace(oo, "");
|
|
3353
3353
|
}
|
|
3354
3354
|
function Te(e) {
|
|
3355
3355
|
var t = typeof e;
|
|
3356
3356
|
return e != null && (t == "object" || t == "function");
|
|
3357
3357
|
}
|
|
3358
|
-
var
|
|
3358
|
+
var ot = NaN, so = /^[-+]0x[0-9a-f]+$/i, lo = /^0b[01]+$/i, co = /^0o[0-7]+$/i, uo = parseInt;
|
|
3359
3359
|
function ge(e) {
|
|
3360
3360
|
if (typeof e == "number")
|
|
3361
3361
|
return e;
|
|
3362
|
-
if (
|
|
3363
|
-
return
|
|
3362
|
+
if (ro(e))
|
|
3363
|
+
return ot;
|
|
3364
3364
|
if (Te(e)) {
|
|
3365
3365
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
3366
3366
|
e = Te(t) ? t + "" : t;
|
|
3367
3367
|
}
|
|
3368
3368
|
if (typeof e != "string")
|
|
3369
3369
|
return e === 0 ? e : +e;
|
|
3370
|
-
e =
|
|
3371
|
-
var r =
|
|
3372
|
-
return r ||
|
|
3370
|
+
e = ao(e);
|
|
3371
|
+
var r = lo.test(e);
|
|
3372
|
+
return r || co.test(e) ? uo(e.slice(2), r ? 2 : 8) : so.test(e) ? ot : +e;
|
|
3373
3373
|
}
|
|
3374
|
-
function
|
|
3374
|
+
function ho(e, t, r) {
|
|
3375
3375
|
return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e;
|
|
3376
3376
|
}
|
|
3377
|
-
function
|
|
3378
|
-
return r === void 0 && (r = t, t = void 0), r !== void 0 && (r = ge(r), r = r === r ? r : 0), t !== void 0 && (t = ge(t), t = t === t ? t : 0),
|
|
3377
|
+
function fo(e, t, r) {
|
|
3378
|
+
return r === void 0 && (r = t, t = void 0), r !== void 0 && (r = ge(r), r = r === r ? r : 0), t !== void 0 && (t = ge(t), t = t === t ? t : 0), ho(ge(e), t, r);
|
|
3379
3379
|
}
|
|
3380
3380
|
var De = function() {
|
|
3381
|
-
return
|
|
3382
|
-
},
|
|
3383
|
-
function
|
|
3384
|
-
var i, o, a, l, s, c, d = 0, g = !1, p = !1,
|
|
3381
|
+
return St.Date.now();
|
|
3382
|
+
}, mo = "Expected a function", go = Math.max, po = Math.min;
|
|
3383
|
+
function xo(e, t, r) {
|
|
3384
|
+
var i, o, a, l, s, c, d = 0, g = !1, p = !1, h = !0;
|
|
3385
3385
|
if (typeof e != "function")
|
|
3386
|
-
throw new TypeError(
|
|
3387
|
-
t = ge(t) || 0, Te(r) && (g = !!r.leading, p = "maxWait" in r, a = p ?
|
|
3388
|
-
function
|
|
3389
|
-
var
|
|
3390
|
-
return i = o = void 0, d =
|
|
3386
|
+
throw new TypeError(mo);
|
|
3387
|
+
t = ge(t) || 0, Te(r) && (g = !!r.leading, p = "maxWait" in r, a = p ? go(ge(r.maxWait) || 0, t) : a, h = "trailing" in r ? !!r.trailing : h);
|
|
3388
|
+
function b(w) {
|
|
3389
|
+
var L = i, V = o;
|
|
3390
|
+
return i = o = void 0, d = w, l = e.apply(V, L), l;
|
|
3391
3391
|
}
|
|
3392
|
-
function
|
|
3393
|
-
return d =
|
|
3392
|
+
function f(w) {
|
|
3393
|
+
return d = w, s = setTimeout(y, t), g ? b(w) : l;
|
|
3394
3394
|
}
|
|
3395
|
-
function
|
|
3396
|
-
var
|
|
3397
|
-
return p ?
|
|
3395
|
+
function k(w) {
|
|
3396
|
+
var L = w - c, V = w - d, D = t - L;
|
|
3397
|
+
return p ? po(D, a - V) : D;
|
|
3398
3398
|
}
|
|
3399
|
-
function
|
|
3400
|
-
var
|
|
3401
|
-
return c === void 0 ||
|
|
3399
|
+
function u(w) {
|
|
3400
|
+
var L = w - c, V = w - d;
|
|
3401
|
+
return c === void 0 || L >= t || L < 0 || p && V >= a;
|
|
3402
3402
|
}
|
|
3403
|
-
function
|
|
3404
|
-
var
|
|
3405
|
-
if (
|
|
3406
|
-
return
|
|
3407
|
-
s = setTimeout(
|
|
3403
|
+
function y() {
|
|
3404
|
+
var w = De();
|
|
3405
|
+
if (u(w))
|
|
3406
|
+
return m(w);
|
|
3407
|
+
s = setTimeout(y, k(w));
|
|
3408
3408
|
}
|
|
3409
|
-
function
|
|
3410
|
-
return s = void 0,
|
|
3409
|
+
function m(w) {
|
|
3410
|
+
return s = void 0, h && i ? b(w) : (i = o = void 0, l);
|
|
3411
3411
|
}
|
|
3412
|
-
function
|
|
3412
|
+
function z() {
|
|
3413
3413
|
s !== void 0 && clearTimeout(s), d = 0, i = c = o = s = void 0;
|
|
3414
3414
|
}
|
|
3415
|
-
function
|
|
3416
|
-
return s === void 0 ? l :
|
|
3415
|
+
function v() {
|
|
3416
|
+
return s === void 0 ? l : m(De());
|
|
3417
3417
|
}
|
|
3418
|
-
function
|
|
3419
|
-
var
|
|
3420
|
-
if (i = arguments, o = this, c =
|
|
3418
|
+
function A() {
|
|
3419
|
+
var w = De(), L = u(w);
|
|
3420
|
+
if (i = arguments, o = this, c = w, L) {
|
|
3421
3421
|
if (s === void 0)
|
|
3422
|
-
return
|
|
3422
|
+
return f(c);
|
|
3423
3423
|
if (p)
|
|
3424
|
-
return clearTimeout(s), s = setTimeout(
|
|
3424
|
+
return clearTimeout(s), s = setTimeout(y, t), b(c);
|
|
3425
3425
|
}
|
|
3426
|
-
return s === void 0 && (s = setTimeout(
|
|
3426
|
+
return s === void 0 && (s = setTimeout(y, t)), l;
|
|
3427
3427
|
}
|
|
3428
|
-
return
|
|
3428
|
+
return A.cancel = z, A.flush = v, A;
|
|
3429
3429
|
}
|
|
3430
|
-
var
|
|
3431
|
-
function
|
|
3432
|
-
return typeof e == "number" ||
|
|
3430
|
+
var bo = "[object Number]";
|
|
3431
|
+
function at(e) {
|
|
3432
|
+
return typeof e == "number" || Nt(e) && Lt(e) == bo;
|
|
3433
3433
|
}
|
|
3434
|
-
var
|
|
3435
|
-
function
|
|
3434
|
+
var vo = "Expected a function";
|
|
3435
|
+
function st(e, t, r) {
|
|
3436
3436
|
var i = !0, o = !0;
|
|
3437
3437
|
if (typeof e != "function")
|
|
3438
|
-
throw new TypeError(
|
|
3439
|
-
return Te(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o),
|
|
3438
|
+
throw new TypeError(vo);
|
|
3439
|
+
return Te(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), xo(e, t, {
|
|
3440
3440
|
leading: i,
|
|
3441
3441
|
maxWait: t,
|
|
3442
3442
|
trailing: o
|
|
3443
3443
|
});
|
|
3444
3444
|
}
|
|
3445
|
-
const
|
|
3445
|
+
const ye = {
|
|
3446
3446
|
TOP_LEFT: "tl",
|
|
3447
3447
|
TOP_RIGHT: "tr",
|
|
3448
3448
|
BOTTOM_LEFT: "bl",
|
|
3449
3449
|
BOTTOM_RIGHT: "br"
|
|
3450
3450
|
};
|
|
3451
|
-
function
|
|
3452
|
-
|
|
3451
|
+
function wo({
|
|
3452
|
+
src: e,
|
|
3453
|
+
style: t
|
|
3454
|
+
}) {
|
|
3455
|
+
return /* @__PURE__ */ C(
|
|
3456
|
+
"div",
|
|
3457
|
+
{
|
|
3458
|
+
style: {
|
|
3459
|
+
position: "relative",
|
|
3460
|
+
display: "inline-block",
|
|
3461
|
+
overflow: "hidden",
|
|
3462
|
+
borderRadius: 8,
|
|
3463
|
+
background: "hsl(var(--muted, 220 14% 96%))",
|
|
3464
|
+
minHeight: 120,
|
|
3465
|
+
minWidth: 180,
|
|
3466
|
+
...t
|
|
3467
|
+
},
|
|
3468
|
+
children: [
|
|
3469
|
+
e && /* @__PURE__ */ n(
|
|
3470
|
+
"img",
|
|
3471
|
+
{
|
|
3472
|
+
src: e,
|
|
3473
|
+
alt: "",
|
|
3474
|
+
"aria-hidden": !0,
|
|
3475
|
+
style: {
|
|
3476
|
+
display: "block",
|
|
3477
|
+
width: "100%",
|
|
3478
|
+
height: "100%",
|
|
3479
|
+
objectFit: "cover",
|
|
3480
|
+
filter: "blur(20px) saturate(0.5)",
|
|
3481
|
+
transform: "scale(1.1)",
|
|
3482
|
+
opacity: 0.5
|
|
3483
|
+
}
|
|
3484
|
+
}
|
|
3485
|
+
),
|
|
3486
|
+
/* @__PURE__ */ n(
|
|
3487
|
+
"div",
|
|
3488
|
+
{
|
|
3489
|
+
style: {
|
|
3490
|
+
position: "absolute",
|
|
3491
|
+
inset: 0,
|
|
3492
|
+
background: "linear-gradient(110deg, transparent 30%, hsl(var(--muted-foreground, 220 9% 46%) / 0.08) 50%, transparent 70%)",
|
|
3493
|
+
animation: "richtext-skeleton-shimmer 1.8s ease-in-out infinite"
|
|
3494
|
+
}
|
|
3495
|
+
}
|
|
3496
|
+
),
|
|
3497
|
+
/* @__PURE__ */ C(
|
|
3498
|
+
"div",
|
|
3499
|
+
{
|
|
3500
|
+
style: {
|
|
3501
|
+
position: "absolute",
|
|
3502
|
+
inset: 0,
|
|
3503
|
+
display: "flex",
|
|
3504
|
+
flexDirection: "column",
|
|
3505
|
+
alignItems: "center",
|
|
3506
|
+
justifyContent: "center",
|
|
3507
|
+
gap: 8,
|
|
3508
|
+
pointerEvents: "none"
|
|
3509
|
+
},
|
|
3510
|
+
children: [
|
|
3511
|
+
/* @__PURE__ */ n(
|
|
3512
|
+
"svg",
|
|
3513
|
+
{
|
|
3514
|
+
width: "28",
|
|
3515
|
+
height: "28",
|
|
3516
|
+
viewBox: "0 0 24 24",
|
|
3517
|
+
fill: "none",
|
|
3518
|
+
stroke: "currentColor",
|
|
3519
|
+
strokeWidth: "2",
|
|
3520
|
+
strokeLinecap: "round",
|
|
3521
|
+
strokeLinejoin: "round",
|
|
3522
|
+
style: {
|
|
3523
|
+
color: "hsl(var(--muted-foreground, 220 9% 46%))",
|
|
3524
|
+
animation: "richtext-skeleton-spin 1s linear infinite"
|
|
3525
|
+
},
|
|
3526
|
+
children: /* @__PURE__ */ n("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
3527
|
+
}
|
|
3528
|
+
),
|
|
3529
|
+
/* @__PURE__ */ n(
|
|
3530
|
+
"span",
|
|
3531
|
+
{
|
|
3532
|
+
style: {
|
|
3533
|
+
fontSize: 12,
|
|
3534
|
+
fontWeight: 500,
|
|
3535
|
+
color: "hsl(var(--muted-foreground, 220 9% 46%))",
|
|
3536
|
+
userSelect: "none"
|
|
3537
|
+
},
|
|
3538
|
+
children: "Uploading…"
|
|
3539
|
+
}
|
|
3540
|
+
)
|
|
3541
|
+
]
|
|
3542
|
+
}
|
|
3543
|
+
),
|
|
3544
|
+
/* @__PURE__ */ n("style", { children: `
|
|
3545
|
+
@keyframes richtext-skeleton-shimmer {
|
|
3546
|
+
0% { transform: translateX(-100%); }
|
|
3547
|
+
100% { transform: translateX(100%); }
|
|
3548
|
+
}
|
|
3549
|
+
@keyframes richtext-skeleton-spin {
|
|
3550
|
+
from { transform: rotate(0deg); }
|
|
3551
|
+
to { transform: rotate(360deg); }
|
|
3552
|
+
}
|
|
3553
|
+
` })
|
|
3554
|
+
]
|
|
3555
|
+
}
|
|
3556
|
+
);
|
|
3557
|
+
}
|
|
3558
|
+
function yo(e) {
|
|
3559
|
+
var D, j, _, T;
|
|
3453
3560
|
const [t, r] = E({
|
|
3454
|
-
width:
|
|
3455
|
-
height:
|
|
3561
|
+
width: Ke,
|
|
3562
|
+
height: Ke
|
|
3456
3563
|
}), [i, o] = E({
|
|
3457
3564
|
width: 0,
|
|
3458
3565
|
height: 0
|
|
3459
3566
|
}), [a] = E([
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3567
|
+
ye.TOP_LEFT,
|
|
3568
|
+
ye.TOP_RIGHT,
|
|
3569
|
+
ye.BOTTOM_LEFT,
|
|
3570
|
+
ye.BOTTOM_RIGHT
|
|
3464
3571
|
]), [l, s] = E(!1), [c, d] = E({
|
|
3465
3572
|
x: 0,
|
|
3466
3573
|
y: 0,
|
|
3467
3574
|
w: 0,
|
|
3468
3575
|
h: 0,
|
|
3469
3576
|
dir: ""
|
|
3470
|
-
}), { align: g, inline: p } = (
|
|
3577
|
+
}), { align: g, inline: p, uploading: h } = (D = e == null ? void 0 : e.node) == null ? void 0 : D.attrs, b = p && (g === "left" || g === "right"), f = $(() => {
|
|
3471
3578
|
var Xe;
|
|
3472
|
-
const { src:
|
|
3473
|
-
|
|
3474
|
-
const
|
|
3579
|
+
const { src: x, alt: I, width: R, height: H, flipX: P, flipY: S } = (Xe = e == null ? void 0 : e.node) == null ? void 0 : Xe.attrs, U = at(R) ? `${R}px` : R, F = at(H) ? `${H}px` : H, W = [];
|
|
3580
|
+
P && W.push("rotateX(180deg)"), S && W.push("rotateY(180deg)");
|
|
3581
|
+
const Ot = W.join(" ");
|
|
3475
3582
|
return {
|
|
3476
|
-
src:
|
|
3477
|
-
alt:
|
|
3583
|
+
src: x || void 0,
|
|
3584
|
+
alt: I || void 0,
|
|
3478
3585
|
style: {
|
|
3479
|
-
width:
|
|
3480
|
-
height:
|
|
3481
|
-
transform:
|
|
3482
|
-
...
|
|
3586
|
+
width: U || void 0,
|
|
3587
|
+
height: F || void 0,
|
|
3588
|
+
transform: Ot || "none",
|
|
3589
|
+
...b ? { float: g } : {}
|
|
3483
3590
|
}
|
|
3484
3591
|
};
|
|
3485
|
-
}, [(j = e == null ? void 0 : e.node) == null ? void 0 : j.attrs]),
|
|
3592
|
+
}, [(j = e == null ? void 0 : e.node) == null ? void 0 : j.attrs]), k = $(() => {
|
|
3486
3593
|
const {
|
|
3487
|
-
style: { width:
|
|
3488
|
-
} =
|
|
3489
|
-
return { width:
|
|
3490
|
-
}, [
|
|
3491
|
-
function
|
|
3594
|
+
style: { width: x }
|
|
3595
|
+
} = f;
|
|
3596
|
+
return { width: x === "100%" ? x : void 0 };
|
|
3597
|
+
}, [f]);
|
|
3598
|
+
function u(x) {
|
|
3492
3599
|
o({
|
|
3493
|
-
width:
|
|
3494
|
-
height:
|
|
3600
|
+
width: x.target.width,
|
|
3601
|
+
height: x.target.height
|
|
3495
3602
|
});
|
|
3496
3603
|
}
|
|
3497
|
-
function
|
|
3498
|
-
const { editor:
|
|
3499
|
-
|
|
3604
|
+
function y() {
|
|
3605
|
+
const { editor: x, getPos: I } = e;
|
|
3606
|
+
x.commands.setNodeSelection(I());
|
|
3500
3607
|
}
|
|
3501
|
-
const
|
|
3502
|
-
|
|
3503
|
-
const { editor:
|
|
3504
|
-
r((
|
|
3505
|
-
...
|
|
3506
|
-
width: Number.parseInt(
|
|
3608
|
+
const m = de(
|
|
3609
|
+
st(() => {
|
|
3610
|
+
const { editor: x } = e, { width: I } = getComputedStyle(x.view.dom);
|
|
3611
|
+
r((R) => ({
|
|
3612
|
+
...R,
|
|
3613
|
+
width: Number.parseInt(I, 10)
|
|
3507
3614
|
}));
|
|
3508
|
-
},
|
|
3615
|
+
}, Je),
|
|
3509
3616
|
[e == null ? void 0 : e.editor]
|
|
3510
3617
|
);
|
|
3511
|
-
function
|
|
3512
|
-
|
|
3513
|
-
const
|
|
3514
|
-
let
|
|
3515
|
-
const
|
|
3516
|
-
|
|
3517
|
-
x:
|
|
3518
|
-
y:
|
|
3519
|
-
w:
|
|
3520
|
-
h:
|
|
3521
|
-
dir:
|
|
3618
|
+
function z(x, I) {
|
|
3619
|
+
x.preventDefault(), x.stopPropagation();
|
|
3620
|
+
const R = i.width, H = i.height, P = R / H;
|
|
3621
|
+
let S = Number(e.node.attrs.width), U = Number(e.node.attrs.height);
|
|
3622
|
+
const F = t.width;
|
|
3623
|
+
S && !U ? (S = S > F ? F : S, U = Math.round(S / P)) : U && !S ? (S = Math.round(U * P), S = S > F ? F : S) : !S && !U ? (S = R > F ? F : R, U = Math.round(S / P)) : S = S > F ? F : S, s(!0), d({
|
|
3624
|
+
x: x.clientX,
|
|
3625
|
+
y: x.clientY,
|
|
3626
|
+
w: S,
|
|
3627
|
+
h: U,
|
|
3628
|
+
dir: I
|
|
3522
3629
|
});
|
|
3523
3630
|
}
|
|
3524
|
-
const
|
|
3525
|
-
|
|
3526
|
-
if (
|
|
3631
|
+
const v = de(
|
|
3632
|
+
st((x) => {
|
|
3633
|
+
if (x.preventDefault(), x.stopPropagation(), !l)
|
|
3527
3634
|
return;
|
|
3528
|
-
const { x:
|
|
3635
|
+
const { x: I, w: R, dir: H } = c, P = (x.clientX - I) * (/l/.test(H) ? -1 : 1), S = fo(R + P, gi, t.width);
|
|
3529
3636
|
e.updateAttributes({
|
|
3530
|
-
width:
|
|
3637
|
+
width: S,
|
|
3531
3638
|
height: null
|
|
3532
3639
|
});
|
|
3533
|
-
},
|
|
3640
|
+
}, Je),
|
|
3534
3641
|
[l, c, t, e.updateAttributes]
|
|
3535
|
-
),
|
|
3536
|
-
(
|
|
3537
|
-
|
|
3642
|
+
), A = de(
|
|
3643
|
+
(x) => {
|
|
3644
|
+
x.preventDefault(), x.stopPropagation(), l && (d({
|
|
3538
3645
|
x: 0,
|
|
3539
3646
|
y: 0,
|
|
3540
3647
|
w: 0,
|
|
3541
3648
|
h: 0,
|
|
3542
3649
|
dir: ""
|
|
3543
|
-
}), s(!1),
|
|
3650
|
+
}), s(!1), y());
|
|
3544
3651
|
},
|
|
3545
|
-
[l,
|
|
3546
|
-
),
|
|
3547
|
-
document == null || document.addEventListener("mousemove",
|
|
3548
|
-
}, [
|
|
3549
|
-
document == null || document.removeEventListener("mousemove",
|
|
3550
|
-
}, [
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
}), [l,
|
|
3554
|
-
const
|
|
3555
|
-
return
|
|
3556
|
-
|
|
3557
|
-
}), [e.editor.view.dom,
|
|
3558
|
-
|
|
3652
|
+
[l, y]
|
|
3653
|
+
), w = de(() => {
|
|
3654
|
+
document == null || document.addEventListener("mousemove", v, !0), document == null || document.addEventListener("mouseup", A, !0);
|
|
3655
|
+
}, [v, A]), L = de(() => {
|
|
3656
|
+
document == null || document.removeEventListener("mousemove", v, !0), document == null || document.removeEventListener("mouseup", A, !0);
|
|
3657
|
+
}, [v, A]);
|
|
3658
|
+
Me(() => (l ? w() : L(), () => {
|
|
3659
|
+
L();
|
|
3660
|
+
}), [l, w, L]);
|
|
3661
|
+
const V = $(() => new ResizeObserver(() => m()), [m]);
|
|
3662
|
+
return Me(() => (V.observe(e.editor.view.dom), () => {
|
|
3663
|
+
V.disconnect();
|
|
3664
|
+
}), [e.editor.view.dom, V]), h ? /* @__PURE__ */ n(
|
|
3665
|
+
Ze,
|
|
3666
|
+
{
|
|
3667
|
+
as: p ? "span" : "div",
|
|
3668
|
+
className: "image-view",
|
|
3669
|
+
style: {
|
|
3670
|
+
float: b ? g : void 0,
|
|
3671
|
+
margin: b ? g === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
|
|
3672
|
+
display: p ? "inline" : "block",
|
|
3673
|
+
textAlign: b ? void 0 : g,
|
|
3674
|
+
width: ((_ = f.style) == null ? void 0 : _.width) ?? "auto",
|
|
3675
|
+
...b ? {} : k
|
|
3676
|
+
},
|
|
3677
|
+
children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(wo, { src: f.src, style: f.style }) })
|
|
3678
|
+
}
|
|
3679
|
+
) : /* @__PURE__ */ n(
|
|
3680
|
+
Ze,
|
|
3559
3681
|
{
|
|
3560
3682
|
as: p ? "span" : "div",
|
|
3561
3683
|
className: "image-view",
|
|
3562
3684
|
style: {
|
|
3563
|
-
float:
|
|
3564
|
-
margin:
|
|
3685
|
+
float: b ? g : void 0,
|
|
3686
|
+
margin: b ? g === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
|
|
3565
3687
|
display: p ? "inline" : "block",
|
|
3566
|
-
textAlign:
|
|
3567
|
-
width: ((
|
|
3568
|
-
...
|
|
3688
|
+
textAlign: b ? void 0 : g,
|
|
3689
|
+
width: ((T = f.style) == null ? void 0 : T.width) ?? "auto",
|
|
3690
|
+
...b ? {} : k
|
|
3569
3691
|
},
|
|
3570
|
-
children: /* @__PURE__ */
|
|
3692
|
+
children: /* @__PURE__ */ C(
|
|
3571
3693
|
"div",
|
|
3572
3694
|
{
|
|
3573
3695
|
"data-drag-handle": !0,
|
|
3574
3696
|
draggable: "true",
|
|
3575
|
-
style:
|
|
3697
|
+
style: k,
|
|
3576
3698
|
className: `image-view__body ${e != null && e.selected ? "image-view__body--focused" : ""} ${l ? "image-view__body--resizing" : ""}`,
|
|
3577
3699
|
children: [
|
|
3578
3700
|
/* @__PURE__ */ n(
|
|
3579
3701
|
"img",
|
|
3580
3702
|
{
|
|
3581
|
-
alt:
|
|
3703
|
+
alt: f.alt,
|
|
3582
3704
|
className: "image-view__body__image block",
|
|
3583
3705
|
height: "auto",
|
|
3584
|
-
onClick:
|
|
3585
|
-
onLoad:
|
|
3586
|
-
src:
|
|
3587
|
-
style:
|
|
3706
|
+
onClick: y,
|
|
3707
|
+
onLoad: u,
|
|
3708
|
+
src: f.src,
|
|
3709
|
+
style: f.style
|
|
3588
3710
|
}
|
|
3589
3711
|
),
|
|
3590
|
-
(e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || l) && /* @__PURE__ */ n("div", { className: "image-resizer", children: a == null ? void 0 : a.map((
|
|
3712
|
+
(e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || l) && /* @__PURE__ */ n("div", { className: "image-resizer", children: a == null ? void 0 : a.map((x) => /* @__PURE__ */ n(
|
|
3591
3713
|
"span",
|
|
3592
3714
|
{
|
|
3593
|
-
className: `image-resizer__handler image-resizer__handler--${
|
|
3594
|
-
onMouseDown: (
|
|
3715
|
+
className: `image-resizer__handler image-resizer__handler--${x}`,
|
|
3716
|
+
onMouseDown: (I) => z(I, x)
|
|
3595
3717
|
},
|
|
3596
|
-
`image-dir-${
|
|
3718
|
+
`image-dir-${x}`
|
|
3597
3719
|
)) })
|
|
3598
3720
|
]
|
|
3599
3721
|
}
|
|
@@ -3601,12 +3723,12 @@ function vo(e) {
|
|
|
3601
3723
|
}
|
|
3602
3724
|
);
|
|
3603
3725
|
}
|
|
3604
|
-
function
|
|
3605
|
-
const { editor: t } =
|
|
3726
|
+
function Co(e) {
|
|
3727
|
+
const { editor: t } = hi(), r = B.useMemo(
|
|
3606
3728
|
() => t,
|
|
3607
3729
|
[e, t]
|
|
3608
3730
|
);
|
|
3609
|
-
return
|
|
3731
|
+
return fi({
|
|
3610
3732
|
editor: r,
|
|
3611
3733
|
selector(o) {
|
|
3612
3734
|
return o.editor ? {
|
|
@@ -3622,22 +3744,22 @@ function wo(e) {
|
|
|
3622
3744
|
}) || { editor: null };
|
|
3623
3745
|
}
|
|
3624
3746
|
function ee() {
|
|
3625
|
-
return
|
|
3747
|
+
return Co().editor;
|
|
3626
3748
|
}
|
|
3627
|
-
const
|
|
3628
|
-
function
|
|
3629
|
-
return
|
|
3749
|
+
const Et = _t(!1);
|
|
3750
|
+
function Rt() {
|
|
3751
|
+
return Ut(Et);
|
|
3630
3752
|
}
|
|
3631
|
-
function
|
|
3632
|
-
return
|
|
3753
|
+
function qo() {
|
|
3754
|
+
return Bt(Et);
|
|
3633
3755
|
}
|
|
3634
|
-
const
|
|
3635
|
-
function
|
|
3636
|
-
const t =
|
|
3756
|
+
const Vt = () => !1;
|
|
3757
|
+
function Zo(e = Vt) {
|
|
3758
|
+
const t = Rt(), [r, i] = E(() => {
|
|
3637
3759
|
const s = e();
|
|
3638
3760
|
return typeof s == "boolean" ? !s : s;
|
|
3639
3761
|
}), o = ee();
|
|
3640
|
-
|
|
3762
|
+
Me(() => {
|
|
3641
3763
|
if (!o || !e) return;
|
|
3642
3764
|
const s = () => {
|
|
3643
3765
|
const c = e();
|
|
@@ -3647,7 +3769,7 @@ function Xo(e = Rt) {
|
|
|
3647
3769
|
o.off("selectionUpdate", s), o.off("transaction", s);
|
|
3648
3770
|
};
|
|
3649
3771
|
}, [o, e]);
|
|
3650
|
-
const a =
|
|
3772
|
+
const a = $(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = $(() => !t || !o, [t, o]);
|
|
3651
3773
|
return {
|
|
3652
3774
|
disabled: a,
|
|
3653
3775
|
// can not action, opacity < 1
|
|
@@ -3656,9 +3778,9 @@ function Xo(e = Rt) {
|
|
|
3656
3778
|
editorDisabled: l
|
|
3657
3779
|
};
|
|
3658
3780
|
}
|
|
3659
|
-
function
|
|
3660
|
-
const t =
|
|
3661
|
-
|
|
3781
|
+
function Ae(e = Vt) {
|
|
3782
|
+
const t = Rt(), [r, i] = E({}), [o, a] = E(e()), l = ee();
|
|
3783
|
+
Me(() => {
|
|
3662
3784
|
if (!l || !e) return;
|
|
3663
3785
|
const d = () => {
|
|
3664
3786
|
a(e());
|
|
@@ -3667,7 +3789,7 @@ function Le(e = Rt) {
|
|
|
3667
3789
|
l.off("selectionUpdate", d);
|
|
3668
3790
|
};
|
|
3669
3791
|
}, [r, l, e]);
|
|
3670
|
-
const s =
|
|
3792
|
+
const s = $(() => !t || !l, [t, l]), c = $(() => !t || !l, [t, l]);
|
|
3671
3793
|
return {
|
|
3672
3794
|
disabled: s,
|
|
3673
3795
|
// can not action, opacity < 1
|
|
@@ -3678,44 +3800,44 @@ function Le(e = Rt) {
|
|
|
3678
3800
|
// force update
|
|
3679
3801
|
};
|
|
3680
3802
|
}
|
|
3681
|
-
function
|
|
3803
|
+
function ce(e) {
|
|
3682
3804
|
const t = ee();
|
|
3683
|
-
return
|
|
3805
|
+
return $(() => t ? t.extensionManager.extensions.find(
|
|
3684
3806
|
(i) => i.name === e
|
|
3685
3807
|
) : null, [t, e]);
|
|
3686
3808
|
}
|
|
3687
|
-
function
|
|
3809
|
+
function Ko(e, t, r) {
|
|
3688
3810
|
return e < t ? t : e > r ? r : e;
|
|
3689
3811
|
}
|
|
3690
|
-
const
|
|
3691
|
-
function
|
|
3812
|
+
const ko = (e) => typeof e == "number", Mo = (e) => typeof e == "string", Io = (e) => typeof e == "function";
|
|
3813
|
+
function To(e, t = "px") {
|
|
3692
3814
|
if (!e) return e;
|
|
3693
|
-
const r =
|
|
3815
|
+
const r = ko(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
|
|
3694
3816
|
return Number.isNaN(i) ? e : i + a;
|
|
3695
3817
|
}
|
|
3696
|
-
function
|
|
3818
|
+
function Jo(e, t) {
|
|
3697
3819
|
if (!e)
|
|
3698
3820
|
return !1;
|
|
3699
3821
|
const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
|
|
3700
3822
|
return !!r.find((o) => o.name === t);
|
|
3701
3823
|
}
|
|
3702
|
-
function
|
|
3703
|
-
return e.map((t) =>
|
|
3824
|
+
function Qo(e) {
|
|
3825
|
+
return e.map((t) => Mo(t) ? { value: t, name: t } : t);
|
|
3704
3826
|
}
|
|
3705
|
-
function
|
|
3706
|
-
const t = ee(), r =
|
|
3707
|
-
return
|
|
3827
|
+
function Ht(e) {
|
|
3828
|
+
const t = ee(), r = ce(e), { t: i } = oe();
|
|
3829
|
+
return $(() => {
|
|
3708
3830
|
if (!t || !r || !i)
|
|
3709
3831
|
return null;
|
|
3710
3832
|
const { button: o } = r.options;
|
|
3711
|
-
return !o || !
|
|
3833
|
+
return !o || !Io(o) ? null : o({
|
|
3712
3834
|
editor: t,
|
|
3713
3835
|
extension: r,
|
|
3714
3836
|
t: i
|
|
3715
3837
|
});
|
|
3716
3838
|
}, [t, r, i]);
|
|
3717
3839
|
}
|
|
3718
|
-
function
|
|
3840
|
+
function zo(e, t) {
|
|
3719
3841
|
const r = e.type, i = e.name.toLowerCase(), o = i.split(".").pop();
|
|
3720
3842
|
if (!o) return !1;
|
|
3721
3843
|
const l = r || {
|
|
@@ -3741,7 +3863,7 @@ function Io(e, t) {
|
|
|
3741
3863
|
function Ge(e, t) {
|
|
3742
3864
|
const { acceptMimes: r, maxSize: i, t: o, toast: a } = t, l = [];
|
|
3743
3865
|
return (Array.isArray(e) ? e : Object.values(e)).forEach((c) => {
|
|
3744
|
-
if (!
|
|
3866
|
+
if (!zo(c, r)) {
|
|
3745
3867
|
t.onError ? t.onError({
|
|
3746
3868
|
type: "type",
|
|
3747
3869
|
message: o("editor.upload.fileTypeNotSupported", {
|
|
@@ -3777,72 +3899,55 @@ function Ge(e, t) {
|
|
|
3777
3899
|
l.push(c);
|
|
3778
3900
|
}), l;
|
|
3779
3901
|
}
|
|
3780
|
-
function
|
|
3781
|
-
const { t: e } =
|
|
3782
|
-
|
|
3783
|
-
var
|
|
3784
|
-
const
|
|
3785
|
-
if (!r || r.isDestroyed ||
|
|
3786
|
-
|
|
3902
|
+
function ea() {
|
|
3903
|
+
const { t: e } = oe(), { toast: t } = Be(), r = ee(), i = Ht(ze.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = Ae(), [s, c] = E(!1), d = ce(ze.name), [g, p] = E(""), [h, b] = E(""), f = xe(null), k = (d == null ? void 0 : d.options.defaultInline) || !1, [u, y] = E(k), m = $(() => d == null ? void 0 : d.options, [d]);
|
|
3904
|
+
function z(w) {
|
|
3905
|
+
var _;
|
|
3906
|
+
const L = (_ = w == null ? void 0 : w.target) == null ? void 0 : _.files;
|
|
3907
|
+
if (!r || r.isDestroyed || L.length === 0) {
|
|
3908
|
+
w.target.value = "";
|
|
3787
3909
|
return;
|
|
3788
3910
|
}
|
|
3789
|
-
const
|
|
3911
|
+
const V = Ge(L, {
|
|
3790
3912
|
acceptMimes: m == null ? void 0 : m.acceptMimes,
|
|
3791
3913
|
maxSize: m == null ? void 0 : m.maxSize,
|
|
3792
3914
|
t: e,
|
|
3793
3915
|
toast: t,
|
|
3794
3916
|
onError: m.onError
|
|
3795
3917
|
});
|
|
3796
|
-
if (
|
|
3797
|
-
|
|
3918
|
+
if (V.length <= 0) {
|
|
3919
|
+
w.target.value = "";
|
|
3798
3920
|
return;
|
|
3799
3921
|
}
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
});
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
let C, M = "";
|
|
3816
|
-
if (m.upload) {
|
|
3817
|
-
const A = await m.upload(w);
|
|
3818
|
-
C = A.imageId, M = A.cdnUrl;
|
|
3819
|
-
} else
|
|
3820
|
-
M = URL.createObjectURL(w);
|
|
3821
|
-
r.chain().focus().setImageInline({ imageId: C, src: M, inline: h, alt: b }).run();
|
|
3922
|
+
c(!1);
|
|
3923
|
+
const D = h, j = u;
|
|
3924
|
+
if (b(""), y(k), m.upload) {
|
|
3925
|
+
const T = m != null && m.multiple ? V : [V[0]];
|
|
3926
|
+
for (const x of T)
|
|
3927
|
+
r.chain().focus().insertImagePlaceholder({
|
|
3928
|
+
file: x,
|
|
3929
|
+
inline: j,
|
|
3930
|
+
alt: D
|
|
3931
|
+
}).run();
|
|
3932
|
+
} else {
|
|
3933
|
+
const T = m != null && m.multiple ? V : [V[0]];
|
|
3934
|
+
for (const x of T) {
|
|
3935
|
+
const I = URL.createObjectURL(x);
|
|
3936
|
+
r.chain().focus().setImageInline({ src: I, inline: j, alt: D }).run();
|
|
3822
3937
|
}
|
|
3823
|
-
c(!1), z(""), S(x);
|
|
3824
|
-
} catch (w) {
|
|
3825
|
-
console.error("Error uploading image", w), m.onError ? m.onError({
|
|
3826
|
-
type: "upload",
|
|
3827
|
-
message: e("editor.upload.error")
|
|
3828
|
-
}) : t({
|
|
3829
|
-
variant: "destructive",
|
|
3830
|
-
title: e("editor.upload.error")
|
|
3831
|
-
});
|
|
3832
|
-
} finally {
|
|
3833
|
-
g(!1), N.target.value = "";
|
|
3834
3938
|
}
|
|
3939
|
+
w.target.value = "";
|
|
3835
3940
|
}
|
|
3836
|
-
function v(
|
|
3837
|
-
|
|
3941
|
+
function v(w) {
|
|
3942
|
+
w.preventDefault(), w.stopPropagation(), r.chain().focus().setImageInline({ src: g, inline: u, alt: h }).run(), c(!1), y(k), p(""), b("");
|
|
3838
3943
|
}
|
|
3839
|
-
function
|
|
3840
|
-
var
|
|
3841
|
-
|
|
3944
|
+
function A(w) {
|
|
3945
|
+
var L;
|
|
3946
|
+
w.preventDefault(), (L = f.current) == null || L.click();
|
|
3842
3947
|
}
|
|
3843
|
-
return i ? /* @__PURE__ */
|
|
3948
|
+
return i ? /* @__PURE__ */ C(we, { onOpenChange: c, open: s, children: [
|
|
3844
3949
|
/* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
|
|
3845
|
-
|
|
3950
|
+
wt,
|
|
3846
3951
|
{
|
|
3847
3952
|
disabled: l,
|
|
3848
3953
|
icon: o,
|
|
@@ -3852,72 +3957,62 @@ function Ko() {
|
|
|
3852
3957
|
}
|
|
3853
3958
|
}
|
|
3854
3959
|
) }),
|
|
3855
|
-
/* @__PURE__ */
|
|
3856
|
-
/* @__PURE__ */ n(
|
|
3857
|
-
/* @__PURE__ */
|
|
3858
|
-
|
|
3960
|
+
/* @__PURE__ */ C(se, { children: [
|
|
3961
|
+
/* @__PURE__ */ n(le, { children: e("editor.image.dialog.title") }),
|
|
3962
|
+
/* @__PURE__ */ C(
|
|
3963
|
+
Se,
|
|
3859
3964
|
{
|
|
3860
3965
|
activationMode: "manual",
|
|
3861
3966
|
defaultValue: m.resourceImage === "both" || m.resourceImage === "upload" ? "upload" : "link",
|
|
3862
3967
|
children: [
|
|
3863
|
-
m.resourceImage === "both" && /* @__PURE__ */
|
|
3968
|
+
m.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
3864
3969
|
/* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
|
|
3865
3970
|
/* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
|
|
3866
3971
|
] }),
|
|
3867
|
-
/* @__PURE__ */
|
|
3972
|
+
/* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
|
|
3868
3973
|
/* @__PURE__ */ n(
|
|
3869
3974
|
$e,
|
|
3870
3975
|
{
|
|
3871
|
-
checked:
|
|
3872
|
-
onCheckedChange: (
|
|
3873
|
-
|
|
3976
|
+
checked: u,
|
|
3977
|
+
onCheckedChange: (w) => {
|
|
3978
|
+
y(w);
|
|
3874
3979
|
}
|
|
3875
3980
|
}
|
|
3876
3981
|
),
|
|
3877
3982
|
/* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
|
|
3878
3983
|
] }),
|
|
3879
|
-
m.enableAlt && /* @__PURE__ */
|
|
3984
|
+
m.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
|
|
3880
3985
|
/* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
|
|
3881
3986
|
/* @__PURE__ */ n(
|
|
3882
|
-
|
|
3987
|
+
re,
|
|
3883
3988
|
{
|
|
3884
|
-
onChange: (
|
|
3989
|
+
onChange: (w) => b(w.target.value),
|
|
3885
3990
|
required: !0,
|
|
3886
3991
|
type: "text",
|
|
3887
|
-
value:
|
|
3992
|
+
value: h
|
|
3888
3993
|
}
|
|
3889
3994
|
)
|
|
3890
3995
|
] }),
|
|
3891
|
-
/* @__PURE__ */
|
|
3892
|
-
/* @__PURE__ */
|
|
3996
|
+
/* @__PURE__ */ C(Z, { value: "upload", children: [
|
|
3997
|
+
/* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
3893
3998
|
/* @__PURE__ */ n(
|
|
3894
|
-
|
|
3999
|
+
G,
|
|
3895
4000
|
{
|
|
3896
4001
|
className: "richtext-mt-1 richtext-w-full",
|
|
3897
|
-
|
|
3898
|
-
onClick: R,
|
|
4002
|
+
onClick: A,
|
|
3899
4003
|
size: "sm",
|
|
3900
|
-
children:
|
|
3901
|
-
e("editor.imageUpload.uploading"),
|
|
3902
|
-
/* @__PURE__ */ n(
|
|
3903
|
-
fe,
|
|
3904
|
-
{
|
|
3905
|
-
className: "richtext-ml-1 richtext-animate-spin",
|
|
3906
|
-
name: "Loader"
|
|
3907
|
-
}
|
|
3908
|
-
)
|
|
3909
|
-
] }) : e("editor.image.dialog.tab.upload")
|
|
4004
|
+
children: e("editor.image.dialog.tab.upload")
|
|
3910
4005
|
}
|
|
3911
4006
|
),
|
|
3912
4007
|
/* @__PURE__ */ n(
|
|
3913
|
-
|
|
4008
|
+
Dt,
|
|
3914
4009
|
{
|
|
3915
|
-
alt:
|
|
3916
|
-
disabled:
|
|
4010
|
+
alt: h,
|
|
4011
|
+
disabled: !1,
|
|
3917
4012
|
editor: r,
|
|
3918
|
-
imageInline:
|
|
4013
|
+
imageInline: u,
|
|
3919
4014
|
onClose: () => {
|
|
3920
|
-
|
|
4015
|
+
b("");
|
|
3921
4016
|
}
|
|
3922
4017
|
}
|
|
3923
4018
|
)
|
|
@@ -3927,34 +4022,34 @@ function Ko() {
|
|
|
3927
4022
|
{
|
|
3928
4023
|
accept: m.acceptMimes.join(",") || "image/*",
|
|
3929
4024
|
multiple: m.multiple,
|
|
3930
|
-
onChange:
|
|
4025
|
+
onChange: z,
|
|
3931
4026
|
ref: f,
|
|
3932
4027
|
style: { display: "none" },
|
|
3933
4028
|
type: "file"
|
|
3934
4029
|
}
|
|
3935
4030
|
)
|
|
3936
4031
|
] }),
|
|
3937
|
-
/* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: v, children: /* @__PURE__ */
|
|
4032
|
+
/* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: v, children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
3938
4033
|
/* @__PURE__ */ n(
|
|
3939
|
-
|
|
4034
|
+
re,
|
|
3940
4035
|
{
|
|
3941
4036
|
autoFocus: !0,
|
|
3942
|
-
onChange: (
|
|
4037
|
+
onChange: (w) => p(w.target.value),
|
|
3943
4038
|
placeholder: e("editor.image.dialog.placeholder"),
|
|
3944
4039
|
required: !0,
|
|
3945
4040
|
type: "url",
|
|
3946
|
-
value:
|
|
4041
|
+
value: g
|
|
3947
4042
|
}
|
|
3948
4043
|
),
|
|
3949
|
-
/* @__PURE__ */ n(
|
|
4044
|
+
/* @__PURE__ */ n(G, { type: "submit", children: e("editor.image.dialog.button.apply") })
|
|
3950
4045
|
] }) }) })
|
|
3951
4046
|
]
|
|
3952
4047
|
}
|
|
3953
4048
|
)
|
|
3954
4049
|
] })
|
|
3955
|
-
] }) : /* @__PURE__ */ n(
|
|
4050
|
+
] }) : /* @__PURE__ */ n(te, {});
|
|
3956
4051
|
}
|
|
3957
|
-
const
|
|
4052
|
+
const So = {
|
|
3958
4053
|
acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
|
|
3959
4054
|
maxSize: 1024 * 1024 * 5,
|
|
3960
4055
|
// 5MB
|
|
@@ -3962,7 +4057,7 @@ const zo = {
|
|
|
3962
4057
|
resourceImage: "both",
|
|
3963
4058
|
defaultInline: !1,
|
|
3964
4059
|
enableAlt: !0
|
|
3965
|
-
},
|
|
4060
|
+
}, ze = /* @__PURE__ */ Fn.extend({
|
|
3966
4061
|
group: "inline",
|
|
3967
4062
|
inline: !0,
|
|
3968
4063
|
defining: !0,
|
|
@@ -3971,7 +4066,7 @@ const zo = {
|
|
|
3971
4066
|
addOptions() {
|
|
3972
4067
|
var e;
|
|
3973
4068
|
return {
|
|
3974
|
-
...
|
|
4069
|
+
...So,
|
|
3975
4070
|
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
3976
4071
|
upload: () => Promise.reject("Image Upload Function"),
|
|
3977
4072
|
button: ({
|
|
@@ -3997,6 +4092,12 @@ const zo = {
|
|
|
3997
4092
|
var e;
|
|
3998
4093
|
return {
|
|
3999
4094
|
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
4095
|
+
uploading: {
|
|
4096
|
+
default: !1,
|
|
4097
|
+
// Transient attribute — never written to or read from HTML
|
|
4098
|
+
parseHTML: () => !1,
|
|
4099
|
+
renderHTML: () => ({})
|
|
4100
|
+
},
|
|
4000
4101
|
imageId: {
|
|
4001
4102
|
default: null,
|
|
4002
4103
|
parseHTML: (t) => t.getAttribute("data-image-id"),
|
|
@@ -4042,22 +4143,73 @@ const zo = {
|
|
|
4042
4143
|
};
|
|
4043
4144
|
},
|
|
4044
4145
|
addNodeView() {
|
|
4045
|
-
return
|
|
4146
|
+
return mi(yo);
|
|
4046
4147
|
},
|
|
4047
4148
|
addCommands() {
|
|
4048
|
-
var
|
|
4149
|
+
var r;
|
|
4150
|
+
const e = this.name, t = this.options;
|
|
4049
4151
|
return {
|
|
4050
|
-
...(
|
|
4051
|
-
setImageInline: (
|
|
4052
|
-
type:
|
|
4152
|
+
...(r = this.parent) == null ? void 0 : r.call(this),
|
|
4153
|
+
setImageInline: (i) => ({ commands: o }) => o.insertContent({
|
|
4154
|
+
type: e,
|
|
4053
4155
|
attrs: {
|
|
4054
|
-
...
|
|
4055
|
-
imageId:
|
|
4056
|
-
inline:
|
|
4156
|
+
...i,
|
|
4157
|
+
imageId: i.imageId ?? null,
|
|
4158
|
+
inline: i.inline ?? t.defaultInline
|
|
4057
4159
|
}
|
|
4058
4160
|
}),
|
|
4059
|
-
|
|
4060
|
-
|
|
4161
|
+
insertImagePlaceholder: ({
|
|
4162
|
+
file: i,
|
|
4163
|
+
inline: o,
|
|
4164
|
+
alt: a
|
|
4165
|
+
}) => ({ editor: l, commands: s }) => {
|
|
4166
|
+
const c = URL.createObjectURL(i);
|
|
4167
|
+
if (!s.insertContent({
|
|
4168
|
+
type: e,
|
|
4169
|
+
attrs: {
|
|
4170
|
+
src: c,
|
|
4171
|
+
alt: a ?? "",
|
|
4172
|
+
inline: o ?? t.defaultInline,
|
|
4173
|
+
uploading: !0,
|
|
4174
|
+
imageId: null
|
|
4175
|
+
}
|
|
4176
|
+
})) return !1;
|
|
4177
|
+
const g = t.upload;
|
|
4178
|
+
return g && g(i).then((p) => {
|
|
4179
|
+
const { doc: h } = l.state;
|
|
4180
|
+
let b = null;
|
|
4181
|
+
h.descendants((f, k) => {
|
|
4182
|
+
if (f.type.name === e && f.attrs.uploading === !0 && f.attrs.src === c)
|
|
4183
|
+
return b = k, !1;
|
|
4184
|
+
}), b !== null && l.view.dispatch(
|
|
4185
|
+
l.state.tr.setNodeMarkup(b, void 0, {
|
|
4186
|
+
...l.state.doc.nodeAt(b).attrs,
|
|
4187
|
+
src: p.cdnUrl,
|
|
4188
|
+
imageId: p.imageId,
|
|
4189
|
+
uploading: !1
|
|
4190
|
+
})
|
|
4191
|
+
), URL.revokeObjectURL(c);
|
|
4192
|
+
}).catch((p) => {
|
|
4193
|
+
console.error("Image upload failed", p);
|
|
4194
|
+
const { doc: h } = l.state;
|
|
4195
|
+
let b = null;
|
|
4196
|
+
if (h.descendants((f, k) => {
|
|
4197
|
+
if (f.type.name === e && f.attrs.uploading === !0 && f.attrs.src === c)
|
|
4198
|
+
return b = k, !1;
|
|
4199
|
+
}), b !== null) {
|
|
4200
|
+
const f = l.state.doc.nodeAt(b);
|
|
4201
|
+
f && l.view.dispatch(
|
|
4202
|
+
l.state.tr.delete(
|
|
4203
|
+
b,
|
|
4204
|
+
b + f.nodeSize
|
|
4205
|
+
)
|
|
4206
|
+
);
|
|
4207
|
+
}
|
|
4208
|
+
URL.revokeObjectURL(c);
|
|
4209
|
+
}), !0;
|
|
4210
|
+
},
|
|
4211
|
+
updateImage: (i) => ({ commands: o }) => o.updateAttributes(this.name, i),
|
|
4212
|
+
setAlignImage: (i) => ({ commands: o }) => o.updateAttributes(this.name, { align: i })
|
|
4061
4213
|
};
|
|
4062
4214
|
},
|
|
4063
4215
|
renderHTML({ HTMLAttributes: e }) {
|
|
@@ -4070,7 +4222,7 @@ const zo = {
|
|
|
4070
4222
|
},
|
|
4071
4223
|
[
|
|
4072
4224
|
"img",
|
|
4073
|
-
|
|
4225
|
+
ut(
|
|
4074
4226
|
{
|
|
4075
4227
|
height: "auto",
|
|
4076
4228
|
style: g
|
|
@@ -4177,19 +4329,19 @@ const zo = {
|
|
|
4177
4329
|
// ];
|
|
4178
4330
|
// },
|
|
4179
4331
|
});
|
|
4180
|
-
function
|
|
4332
|
+
function ta(e) {
|
|
4181
4333
|
return e.replace(/^.*\/|\..+$/g, "");
|
|
4182
4334
|
}
|
|
4183
|
-
function
|
|
4335
|
+
function ra(e) {
|
|
4184
4336
|
return e.split(".").pop();
|
|
4185
4337
|
}
|
|
4186
|
-
function
|
|
4338
|
+
function ia(e) {
|
|
4187
4339
|
return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
|
|
4188
4340
|
}
|
|
4189
|
-
function
|
|
4341
|
+
function na(e) {
|
|
4190
4342
|
return e ? e === "application/pdf" ? "pdf" : e.startsWith("application/") && [".document", "word"].some((t) => e.includes(t)) ? "word" : e.startsWith("application/") && ["presentation"].some((t) => e.includes(t)) ? "excel" : e.startsWith("application/") && ["sheet"].some((t) => e.includes(t)) ? "ppt" : e.startsWith("image") ? "image" : e.startsWith("audio") ? "audio" : e.startsWith("video") ? "video" : "file" : "file";
|
|
4191
4343
|
}
|
|
4192
|
-
function
|
|
4344
|
+
function Ao(e) {
|
|
4193
4345
|
return new Promise((t) => {
|
|
4194
4346
|
const r = new FileReader();
|
|
4195
4347
|
r.addEventListener(
|
|
@@ -4204,7 +4356,7 @@ function To(e) {
|
|
|
4204
4356
|
), r.readAsDataURL(e);
|
|
4205
4357
|
});
|
|
4206
4358
|
}
|
|
4207
|
-
function
|
|
4359
|
+
function Lo(e, t) {
|
|
4208
4360
|
const r = e.split(","), i = r[0].match(/:(.*?);/)[1], o = atob(r[r.length - 1]);
|
|
4209
4361
|
let a = o.length;
|
|
4210
4362
|
const l = new Uint8Array(a);
|
|
@@ -4212,146 +4364,170 @@ function So(e, t) {
|
|
|
4212
4364
|
l[a] = o.charCodeAt(a);
|
|
4213
4365
|
return new File([l], t, { type: i });
|
|
4214
4366
|
}
|
|
4215
|
-
function
|
|
4216
|
-
|
|
4217
|
-
|
|
4367
|
+
function Dt({
|
|
4368
|
+
editor: e,
|
|
4369
|
+
imageInline: t,
|
|
4370
|
+
onClose: r,
|
|
4371
|
+
disabled: i,
|
|
4372
|
+
alt: o
|
|
4373
|
+
}) {
|
|
4374
|
+
var _, T;
|
|
4375
|
+
const { t: a } = oe(), { toast: l } = Be(), [s, c] = E(!1), [d, g] = E(!1), p = Q.useRef(null), [h, b] = Q.useState(), [f, k] = Q.useState(""), u = xe(null), [y, m] = E({
|
|
4218
4376
|
src: "",
|
|
4219
4377
|
file: null
|
|
4220
|
-
}),
|
|
4221
|
-
function
|
|
4222
|
-
if (p.current &&
|
|
4223
|
-
const
|
|
4224
|
-
|
|
4378
|
+
}), z = ce(ze.name), v = $(() => (z == null ? void 0 : z.options) ?? {}, [z]);
|
|
4379
|
+
function A(x) {
|
|
4380
|
+
if (p.current && x.width && x.height) {
|
|
4381
|
+
const I = w(p.current, x);
|
|
4382
|
+
k(I);
|
|
4225
4383
|
}
|
|
4226
4384
|
}
|
|
4227
|
-
function
|
|
4228
|
-
const
|
|
4229
|
-
|
|
4230
|
-
const
|
|
4231
|
-
return
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4385
|
+
function w(x, I) {
|
|
4386
|
+
const R = document.createElement("canvas"), H = x.naturalWidth / x.width, P = x.naturalHeight / x.height;
|
|
4387
|
+
R.width = I.width * H, R.height = I.height * P;
|
|
4388
|
+
const S = R.getContext("2d");
|
|
4389
|
+
return S && (S.imageSmoothingEnabled = !1, S.drawImage(
|
|
4390
|
+
x,
|
|
4391
|
+
I.x * H,
|
|
4392
|
+
I.y * P,
|
|
4393
|
+
I.width * H,
|
|
4394
|
+
I.height * P,
|
|
4237
4395
|
0,
|
|
4238
4396
|
0,
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
)),
|
|
4397
|
+
I.width * H,
|
|
4398
|
+
I.height * P
|
|
4399
|
+
)), R.toDataURL("image/png", 1);
|
|
4242
4400
|
}
|
|
4243
|
-
const
|
|
4244
|
-
var
|
|
4245
|
-
if (
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
}
|
|
4401
|
+
const L = Q.useCallback(() => {
|
|
4402
|
+
var I;
|
|
4403
|
+
if (d) return;
|
|
4404
|
+
const x = Lo(
|
|
4405
|
+
f,
|
|
4406
|
+
((I = y == null ? void 0 : y.file) == null ? void 0 : I.name) || "image.png"
|
|
4407
|
+
);
|
|
4408
|
+
if (c(!1), m({
|
|
4409
|
+
src: "",
|
|
4410
|
+
file: null
|
|
4411
|
+
}), j(), r(), v.upload)
|
|
4412
|
+
e.chain().focus().insertImagePlaceholder({
|
|
4413
|
+
file: x,
|
|
4414
|
+
inline: t,
|
|
4415
|
+
alt: o
|
|
4416
|
+
}).run();
|
|
4417
|
+
else {
|
|
4418
|
+
const R = URL.createObjectURL(x);
|
|
4419
|
+
e.chain().focus().setImageInline({ src: R, inline: t, alt: o }).run();
|
|
4259
4420
|
}
|
|
4260
4421
|
}, [
|
|
4261
|
-
|
|
4422
|
+
f,
|
|
4262
4423
|
e,
|
|
4263
4424
|
t,
|
|
4264
4425
|
d,
|
|
4265
4426
|
r,
|
|
4266
|
-
(
|
|
4267
|
-
|
|
4427
|
+
(_ = y == null ? void 0 : y.file) == null ? void 0 : _.name,
|
|
4428
|
+
v,
|
|
4429
|
+
o
|
|
4268
4430
|
]);
|
|
4269
|
-
function
|
|
4270
|
-
var
|
|
4271
|
-
|
|
4431
|
+
function V(x) {
|
|
4432
|
+
var I;
|
|
4433
|
+
x.preventDefault(), (I = u.current) == null || I.click();
|
|
4272
4434
|
}
|
|
4273
|
-
const
|
|
4274
|
-
var
|
|
4275
|
-
const
|
|
4276
|
-
if (!e || e.isDestroyed ||
|
|
4277
|
-
|
|
4435
|
+
const D = async (x) => {
|
|
4436
|
+
var S;
|
|
4437
|
+
const I = (S = x == null ? void 0 : x.target) == null ? void 0 : S.files;
|
|
4438
|
+
if (!e || e.isDestroyed || I.length === 0) {
|
|
4439
|
+
x.target.value = "";
|
|
4278
4440
|
return;
|
|
4279
4441
|
}
|
|
4280
|
-
const
|
|
4281
|
-
acceptMimes:
|
|
4282
|
-
maxSize:
|
|
4442
|
+
const R = Ge(I, {
|
|
4443
|
+
acceptMimes: v == null ? void 0 : v.acceptMimes,
|
|
4444
|
+
maxSize: v == null ? void 0 : v.maxSize,
|
|
4283
4445
|
t: a,
|
|
4284
4446
|
toast: l,
|
|
4285
|
-
onError:
|
|
4447
|
+
onError: v.onError
|
|
4286
4448
|
});
|
|
4287
|
-
if (
|
|
4288
|
-
|
|
4449
|
+
if (R.length <= 0) {
|
|
4450
|
+
x.target.value = "";
|
|
4289
4451
|
return;
|
|
4290
4452
|
}
|
|
4291
|
-
const
|
|
4292
|
-
c(!0),
|
|
4453
|
+
const H = R[0], P = await Ao(H);
|
|
4454
|
+
c(!0), m({
|
|
4293
4455
|
src: P.src,
|
|
4294
|
-
file:
|
|
4456
|
+
file: H
|
|
4295
4457
|
});
|
|
4296
|
-
},
|
|
4297
|
-
|
|
4458
|
+
}, j = () => {
|
|
4459
|
+
u.current && (u.current.value = "");
|
|
4298
4460
|
};
|
|
4299
|
-
return /* @__PURE__ */
|
|
4461
|
+
return /* @__PURE__ */ C(te, { children: [
|
|
4300
4462
|
/* @__PURE__ */ n(
|
|
4301
|
-
|
|
4463
|
+
G,
|
|
4302
4464
|
{
|
|
4303
4465
|
className: "richtext-mt-1 richtext-w-full",
|
|
4304
4466
|
disabled: i,
|
|
4305
|
-
onClick:
|
|
4467
|
+
onClick: V,
|
|
4306
4468
|
size: "sm",
|
|
4307
4469
|
children: a("editor.image.dialog.tab.uploadCrop")
|
|
4308
4470
|
}
|
|
4309
4471
|
),
|
|
4310
|
-
/* @__PURE__ */
|
|
4472
|
+
/* @__PURE__ */ C(
|
|
4311
4473
|
we,
|
|
4312
4474
|
{
|
|
4313
4475
|
open: s,
|
|
4314
|
-
onOpenChange: (
|
|
4315
|
-
c(
|
|
4476
|
+
onOpenChange: (x) => {
|
|
4477
|
+
c(x), x || (m({ src: "", file: null }), j());
|
|
4316
4478
|
},
|
|
4317
4479
|
children: [
|
|
4318
4480
|
/* @__PURE__ */ n(We, {}),
|
|
4319
|
-
/* @__PURE__ */
|
|
4320
|
-
/* @__PURE__ */ n(
|
|
4321
|
-
/* @__PURE__ */ n("div", { children:
|
|
4322
|
-
|
|
4481
|
+
/* @__PURE__ */ C(se, { children: [
|
|
4482
|
+
/* @__PURE__ */ n(le, { children: a("editor.image.dialog.tab.uploadCrop") }),
|
|
4483
|
+
/* @__PURE__ */ n("div", { children: y.src && /* @__PURE__ */ n(
|
|
4484
|
+
yi,
|
|
4323
4485
|
{
|
|
4324
4486
|
className: "richtext-w-full",
|
|
4325
|
-
crop:
|
|
4326
|
-
onChange: (
|
|
4327
|
-
onComplete: (
|
|
4328
|
-
children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: p, src:
|
|
4487
|
+
crop: h,
|
|
4488
|
+
onChange: (x) => b(x),
|
|
4489
|
+
onComplete: (x) => A(x),
|
|
4490
|
+
children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: p, src: y.src })
|
|
4329
4491
|
}
|
|
4330
4492
|
) }),
|
|
4331
|
-
/* @__PURE__ */
|
|
4332
|
-
/* @__PURE__ */
|
|
4333
|
-
|
|
4493
|
+
/* @__PURE__ */ C(zt, { children: [
|
|
4494
|
+
/* @__PURE__ */ C(
|
|
4495
|
+
G,
|
|
4334
4496
|
{
|
|
4335
4497
|
disabled: d,
|
|
4336
4498
|
onClick: () => {
|
|
4337
|
-
c(!1),
|
|
4499
|
+
c(!1), m({
|
|
4338
4500
|
src: "",
|
|
4339
4501
|
file: null
|
|
4340
|
-
}),
|
|
4502
|
+
}), j();
|
|
4341
4503
|
},
|
|
4342
4504
|
children: [
|
|
4343
4505
|
a("editor.imageUpload.cancel"),
|
|
4344
|
-
/* @__PURE__ */ n(
|
|
4506
|
+
/* @__PURE__ */ n(Re, { className: "richtext-ml-1", name: "Trash2" })
|
|
4345
4507
|
]
|
|
4346
4508
|
}
|
|
4347
4509
|
),
|
|
4348
|
-
/* @__PURE__ */ n(
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4510
|
+
/* @__PURE__ */ n(
|
|
4511
|
+
G,
|
|
4512
|
+
{
|
|
4513
|
+
className: "richtext-w-fit",
|
|
4514
|
+
disabled: d || !h,
|
|
4515
|
+
onClick: L,
|
|
4516
|
+
children: d ? /* @__PURE__ */ C(te, { children: [
|
|
4517
|
+
a("editor.imageUpload.uploading"),
|
|
4518
|
+
/* @__PURE__ */ n(
|
|
4519
|
+
Re,
|
|
4520
|
+
{
|
|
4521
|
+
className: "richtext-ml-1 richtext-animate-spin",
|
|
4522
|
+
name: "Loader"
|
|
4523
|
+
}
|
|
4524
|
+
)
|
|
4525
|
+
] }) : /* @__PURE__ */ C(te, { children: [
|
|
4526
|
+
a("editor.imageUpload.crop"),
|
|
4527
|
+
/* @__PURE__ */ n(Re, { className: "richtext-ml-1", name: "Crop" })
|
|
4528
|
+
] })
|
|
4529
|
+
}
|
|
4530
|
+
)
|
|
4355
4531
|
] })
|
|
4356
4532
|
] })
|
|
4357
4533
|
]
|
|
@@ -4360,130 +4536,125 @@ function Ht({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
|
|
|
4360
4536
|
/* @__PURE__ */ n(
|
|
4361
4537
|
"input",
|
|
4362
4538
|
{
|
|
4363
|
-
accept: ((
|
|
4539
|
+
accept: ((T = v == null ? void 0 : v.acceptMimes) == null ? void 0 : T.join(",")) || "image/*",
|
|
4364
4540
|
multiple: !1,
|
|
4365
|
-
onChange:
|
|
4366
|
-
ref:
|
|
4541
|
+
onChange: D,
|
|
4542
|
+
ref: u,
|
|
4367
4543
|
style: { display: "none" },
|
|
4368
4544
|
type: "file"
|
|
4369
4545
|
}
|
|
4370
4546
|
)
|
|
4371
4547
|
] });
|
|
4372
4548
|
}
|
|
4373
|
-
const
|
|
4549
|
+
const jt = {
|
|
4374
4550
|
UPLOAD_IMAGE: (e) => `UPLOAD_IMAGE-${e}`,
|
|
4375
4551
|
UPLOAD_VIDEO: (e) => `UPLOAD_VIDEO-${e}`,
|
|
4376
4552
|
EXCALIDRAW: (e) => `EXCALIDRAW-${e}`
|
|
4377
4553
|
};
|
|
4378
4554
|
function No() {
|
|
4379
|
-
const { t: e } =
|
|
4380
|
-
|
|
4381
|
-
const
|
|
4382
|
-
|
|
4383
|
-
var
|
|
4384
|
-
const
|
|
4385
|
-
if (!r || r.isDestroyed ||
|
|
4555
|
+
const { t: e } = oe(), { toast: t } = Be(), r = ee(), { editorDisabled: i } = Ae(), [o, a] = E(!1), l = jt.UPLOAD_IMAGE(r.id);
|
|
4556
|
+
It(a, [l]);
|
|
4557
|
+
const s = ce(ze.name), [c, d] = E(""), [g, p] = E(""), h = xe(null), b = (s == null ? void 0 : s.options.defaultInline) || !1, [f, k] = E(b), u = $(() => s == null ? void 0 : s.options, [s]);
|
|
4558
|
+
function y(v) {
|
|
4559
|
+
var D;
|
|
4560
|
+
const A = (D = v == null ? void 0 : v.target) == null ? void 0 : D.files;
|
|
4561
|
+
if (!r || r.isDestroyed || A.length === 0) {
|
|
4386
4562
|
v.target.value = "";
|
|
4387
4563
|
return;
|
|
4388
4564
|
}
|
|
4389
|
-
const
|
|
4390
|
-
acceptMimes:
|
|
4391
|
-
maxSize:
|
|
4565
|
+
const w = Ge(A, {
|
|
4566
|
+
acceptMimes: u == null ? void 0 : u.acceptMimes,
|
|
4567
|
+
maxSize: u == null ? void 0 : u.maxSize,
|
|
4392
4568
|
t: e,
|
|
4393
4569
|
toast: t,
|
|
4394
|
-
onError:
|
|
4570
|
+
onError: u.onError
|
|
4395
4571
|
});
|
|
4396
|
-
if (
|
|
4572
|
+
if (w.length <= 0) {
|
|
4397
4573
|
v.target.value = "";
|
|
4398
4574
|
return;
|
|
4399
4575
|
}
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
});
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4576
|
+
a(!1);
|
|
4577
|
+
const L = g, V = f;
|
|
4578
|
+
if (p(""), k(b), u.upload) {
|
|
4579
|
+
const j = u != null && u.multiple ? w : [w[0]];
|
|
4580
|
+
for (const _ of j)
|
|
4581
|
+
r.chain().focus().insertImagePlaceholder({
|
|
4582
|
+
file: _,
|
|
4583
|
+
inline: V,
|
|
4584
|
+
alt: L
|
|
4585
|
+
}).run();
|
|
4586
|
+
} else {
|
|
4587
|
+
const j = u != null && u.multiple ? w : [w[0]];
|
|
4588
|
+
for (const _ of j) {
|
|
4589
|
+
const T = URL.createObjectURL(_);
|
|
4590
|
+
r.chain().focus().setImageInline({ src: T, inline: V, alt: L }).run();
|
|
4414
4591
|
}
|
|
4415
|
-
a(!1), k(""), x(z);
|
|
4416
|
-
} catch (D) {
|
|
4417
|
-
console.error("Error uploading image", D), h.onError ? h.onError({
|
|
4418
|
-
type: "upload",
|
|
4419
|
-
message: e("editor.upload.error")
|
|
4420
|
-
}) : t({
|
|
4421
|
-
variant: "destructive",
|
|
4422
|
-
title: e("editor.upload.error")
|
|
4423
|
-
});
|
|
4424
|
-
} finally {
|
|
4425
|
-
c(!1), v.target.value = "";
|
|
4426
4592
|
}
|
|
4593
|
+
v.target.value = "";
|
|
4427
4594
|
}
|
|
4428
4595
|
function m(v) {
|
|
4429
|
-
v.preventDefault(), v.stopPropagation(), r.chain().focus().setImageInline({ src:
|
|
4596
|
+
v.preventDefault(), v.stopPropagation(), r.chain().focus().setImageInline({ src: c, inline: f, alt: g }).run(), a(!1), k(b), d(""), p("");
|
|
4430
4597
|
}
|
|
4431
|
-
function
|
|
4432
|
-
var
|
|
4433
|
-
v.preventDefault(), (
|
|
4598
|
+
function z(v) {
|
|
4599
|
+
var A;
|
|
4600
|
+
v.preventDefault(), (A = h.current) == null || A.click();
|
|
4434
4601
|
}
|
|
4435
|
-
return i ? /* @__PURE__ */ n(
|
|
4436
|
-
/* @__PURE__ */ n(
|
|
4437
|
-
/* @__PURE__ */
|
|
4438
|
-
|
|
4602
|
+
return i ? /* @__PURE__ */ n(te, {}) : /* @__PURE__ */ n(we, { onOpenChange: a, open: o, children: /* @__PURE__ */ C(se, { children: [
|
|
4603
|
+
/* @__PURE__ */ n(le, { children: e("editor.image.dialog.title") }),
|
|
4604
|
+
/* @__PURE__ */ C(
|
|
4605
|
+
Se,
|
|
4439
4606
|
{
|
|
4440
4607
|
activationMode: "manual",
|
|
4441
|
-
defaultValue:
|
|
4608
|
+
defaultValue: u.resourceImage === "both" || u.resourceImage === "upload" ? "upload" : "link",
|
|
4442
4609
|
children: [
|
|
4443
|
-
|
|
4610
|
+
u.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
4444
4611
|
/* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
|
|
4445
4612
|
/* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
|
|
4446
4613
|
] }),
|
|
4447
|
-
/* @__PURE__ */
|
|
4614
|
+
/* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
|
|
4448
4615
|
/* @__PURE__ */ n(
|
|
4449
4616
|
$e,
|
|
4450
4617
|
{
|
|
4451
4618
|
checked: f,
|
|
4452
4619
|
onCheckedChange: (v) => {
|
|
4453
|
-
|
|
4620
|
+
k(v);
|
|
4454
4621
|
}
|
|
4455
4622
|
}
|
|
4456
4623
|
),
|
|
4457
4624
|
/* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
|
|
4458
4625
|
] }),
|
|
4459
|
-
|
|
4626
|
+
u.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
|
|
4460
4627
|
/* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
|
|
4461
|
-
/* @__PURE__ */ n(
|
|
4628
|
+
/* @__PURE__ */ n(
|
|
4629
|
+
re,
|
|
4630
|
+
{
|
|
4631
|
+
onChange: (v) => p(v.target.value),
|
|
4632
|
+
required: !0,
|
|
4633
|
+
type: "text",
|
|
4634
|
+
value: g
|
|
4635
|
+
}
|
|
4636
|
+
)
|
|
4462
4637
|
] }),
|
|
4463
|
-
/* @__PURE__ */
|
|
4464
|
-
/* @__PURE__ */
|
|
4638
|
+
/* @__PURE__ */ C(Z, { value: "upload", children: [
|
|
4639
|
+
/* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
4465
4640
|
/* @__PURE__ */ n(
|
|
4466
|
-
|
|
4641
|
+
G,
|
|
4467
4642
|
{
|
|
4468
4643
|
className: "richtext-mt-1 richtext-w-full",
|
|
4469
|
-
|
|
4470
|
-
onClick: H,
|
|
4644
|
+
onClick: z,
|
|
4471
4645
|
size: "sm",
|
|
4472
|
-
children:
|
|
4473
|
-
e("editor.imageUpload.uploading"),
|
|
4474
|
-
/* @__PURE__ */ n(fe, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
|
|
4475
|
-
] }) : e("editor.image.dialog.tab.upload")
|
|
4646
|
+
children: e("editor.image.dialog.tab.upload")
|
|
4476
4647
|
}
|
|
4477
4648
|
),
|
|
4478
4649
|
/* @__PURE__ */ n(
|
|
4479
|
-
|
|
4650
|
+
Dt,
|
|
4480
4651
|
{
|
|
4481
|
-
alt:
|
|
4482
|
-
disabled:
|
|
4652
|
+
alt: g,
|
|
4653
|
+
disabled: !1,
|
|
4483
4654
|
editor: r,
|
|
4484
4655
|
imageInline: f,
|
|
4485
4656
|
onClose: () => {
|
|
4486
|
-
|
|
4657
|
+
p("");
|
|
4487
4658
|
}
|
|
4488
4659
|
}
|
|
4489
4660
|
)
|
|
@@ -4491,35 +4662,35 @@ function No() {
|
|
|
4491
4662
|
/* @__PURE__ */ n(
|
|
4492
4663
|
"input",
|
|
4493
4664
|
{
|
|
4494
|
-
accept:
|
|
4495
|
-
multiple:
|
|
4496
|
-
onChange:
|
|
4497
|
-
ref:
|
|
4665
|
+
accept: u.acceptMimes.join(",") || "image/*",
|
|
4666
|
+
multiple: u.multiple,
|
|
4667
|
+
onChange: y,
|
|
4668
|
+
ref: h,
|
|
4498
4669
|
style: { display: "none" },
|
|
4499
4670
|
type: "file"
|
|
4500
4671
|
}
|
|
4501
4672
|
)
|
|
4502
4673
|
] }),
|
|
4503
|
-
/* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: m, children: /* @__PURE__ */
|
|
4674
|
+
/* @__PURE__ */ n(Z, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: m, children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
4504
4675
|
/* @__PURE__ */ n(
|
|
4505
|
-
|
|
4676
|
+
re,
|
|
4506
4677
|
{
|
|
4507
4678
|
autoFocus: !0,
|
|
4508
|
-
onChange: (v) =>
|
|
4679
|
+
onChange: (v) => d(v.target.value),
|
|
4509
4680
|
placeholder: e("editor.image.dialog.placeholder"),
|
|
4510
4681
|
required: !0,
|
|
4511
4682
|
type: "url",
|
|
4512
|
-
value:
|
|
4683
|
+
value: c
|
|
4513
4684
|
}
|
|
4514
4685
|
),
|
|
4515
|
-
/* @__PURE__ */ n(
|
|
4686
|
+
/* @__PURE__ */ n(G, { type: "submit", children: e("editor.image.dialog.button.apply") })
|
|
4516
4687
|
] }) }) })
|
|
4517
4688
|
]
|
|
4518
4689
|
}
|
|
4519
4690
|
)
|
|
4520
4691
|
] }) });
|
|
4521
4692
|
}
|
|
4522
|
-
function
|
|
4693
|
+
function Pt(e, t) {
|
|
4523
4694
|
let r;
|
|
4524
4695
|
try {
|
|
4525
4696
|
r = new URL(e);
|
|
@@ -4534,62 +4705,62 @@ function Ot(e, t) {
|
|
|
4534
4705
|
return r.hostname.includes(i);
|
|
4535
4706
|
});
|
|
4536
4707
|
}
|
|
4537
|
-
function
|
|
4538
|
-
const { t: e } =
|
|
4539
|
-
async function
|
|
4540
|
-
var
|
|
4541
|
-
const
|
|
4542
|
-
if (!t || t.isDestroyed ||
|
|
4708
|
+
function oa() {
|
|
4709
|
+
const { t: e } = oe(), t = ee(), r = Ht(Oe.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = Ae(), [l, s] = E(""), c = xe(null), [d, g] = E(""), [p, h] = E(!1), b = ce(Oe.name), f = $(() => (b == null ? void 0 : b.options) ?? {}, [b]);
|
|
4710
|
+
async function k(m) {
|
|
4711
|
+
var w;
|
|
4712
|
+
const z = (w = m == null ? void 0 : m.target) == null ? void 0 : w.files;
|
|
4713
|
+
if (!t || t.isDestroyed || z.length === 0)
|
|
4543
4714
|
return;
|
|
4544
|
-
const
|
|
4545
|
-
let
|
|
4546
|
-
|
|
4547
|
-
src:
|
|
4715
|
+
const v = z[0];
|
|
4716
|
+
let A = "";
|
|
4717
|
+
f.upload ? A = await f.upload(v) : A = URL.createObjectURL(v), t.chain().focus().setVideo({
|
|
4718
|
+
src: A,
|
|
4548
4719
|
width: "100%"
|
|
4549
|
-
}).run(),
|
|
4720
|
+
}).run(), h(!1);
|
|
4550
4721
|
}
|
|
4551
|
-
function
|
|
4552
|
-
|
|
4722
|
+
function u(m) {
|
|
4723
|
+
m.preventDefault(), m.stopPropagation(), l && (t.chain().focus().setVideo({
|
|
4553
4724
|
src: l,
|
|
4554
4725
|
width: "100%"
|
|
4555
|
-
}).run(),
|
|
4726
|
+
}).run(), h(!1), s(""));
|
|
4556
4727
|
}
|
|
4557
|
-
function
|
|
4558
|
-
var
|
|
4559
|
-
|
|
4728
|
+
function y(m) {
|
|
4729
|
+
var z;
|
|
4730
|
+
m.preventDefault(), (z = c.current) == null || z.click();
|
|
4560
4731
|
}
|
|
4561
|
-
return /* @__PURE__ */
|
|
4732
|
+
return /* @__PURE__ */ C(we, { onOpenChange: h, open: p, children: [
|
|
4562
4733
|
/* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
|
|
4563
|
-
|
|
4734
|
+
wt,
|
|
4564
4735
|
{
|
|
4565
4736
|
disabled: a,
|
|
4566
4737
|
icon: i,
|
|
4567
4738
|
tooltip: o,
|
|
4568
4739
|
action: () => {
|
|
4569
|
-
a ||
|
|
4740
|
+
a || h(!0);
|
|
4570
4741
|
}
|
|
4571
4742
|
}
|
|
4572
4743
|
) }),
|
|
4573
|
-
/* @__PURE__ */
|
|
4574
|
-
/* @__PURE__ */ n(
|
|
4575
|
-
/* @__PURE__ */
|
|
4576
|
-
|
|
4744
|
+
/* @__PURE__ */ C(se, { children: [
|
|
4745
|
+
/* @__PURE__ */ n(le, { children: e("editor.video.dialog.title") }),
|
|
4746
|
+
/* @__PURE__ */ C(
|
|
4747
|
+
Se,
|
|
4577
4748
|
{
|
|
4578
4749
|
activationMode: "manual",
|
|
4579
|
-
defaultValue: (
|
|
4750
|
+
defaultValue: (f == null ? void 0 : f.resourceVideo) === "both" || (f == null ? void 0 : f.resourceVideo) === "upload" ? "upload" : "link",
|
|
4580
4751
|
children: [
|
|
4581
|
-
/* @__PURE__ */
|
|
4582
|
-
((
|
|
4583
|
-
((
|
|
4752
|
+
/* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
4753
|
+
((f == null ? void 0 : f.resourceVideo) === "both" || (f == null ? void 0 : f.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
|
|
4754
|
+
((f == null ? void 0 : f.resourceVideo) === "both" || (f == null ? void 0 : f.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
|
|
4584
4755
|
] }),
|
|
4585
|
-
/* @__PURE__ */
|
|
4586
|
-
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(
|
|
4756
|
+
/* @__PURE__ */ C(Z, { value: "upload", children: [
|
|
4757
|
+
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(G, { className: "richtext-mt-1 richtext-w-full", onClick: y, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
|
|
4587
4758
|
/* @__PURE__ */ n(
|
|
4588
4759
|
"input",
|
|
4589
4760
|
{
|
|
4590
4761
|
accept: "video/*",
|
|
4591
4762
|
multiple: !0,
|
|
4592
|
-
onChange:
|
|
4763
|
+
onChange: k,
|
|
4593
4764
|
ref: c,
|
|
4594
4765
|
type: "file",
|
|
4595
4766
|
style: {
|
|
@@ -4598,26 +4769,26 @@ function ra() {
|
|
|
4598
4769
|
}
|
|
4599
4770
|
)
|
|
4600
4771
|
] }),
|
|
4601
|
-
/* @__PURE__ */
|
|
4602
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */
|
|
4772
|
+
/* @__PURE__ */ C(Z, { value: "link", children: [
|
|
4773
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
4603
4774
|
/* @__PURE__ */ n(
|
|
4604
|
-
|
|
4775
|
+
re,
|
|
4605
4776
|
{
|
|
4606
4777
|
autoFocus: !0,
|
|
4607
4778
|
placeholder: e("editor.video.dialog.placeholder"),
|
|
4608
4779
|
required: !0,
|
|
4609
4780
|
type: "url",
|
|
4610
4781
|
value: l,
|
|
4611
|
-
onBlur: (
|
|
4612
|
-
const
|
|
4613
|
-
|
|
4782
|
+
onBlur: (m) => {
|
|
4783
|
+
const z = m.target.value, v = f.videoProviders || ["."];
|
|
4784
|
+
z && !Pt(z, v) ? g("Invalid video URL") : g("");
|
|
4614
4785
|
},
|
|
4615
|
-
onChange: (
|
|
4616
|
-
s(
|
|
4786
|
+
onChange: (m) => {
|
|
4787
|
+
s(m.target.value);
|
|
4617
4788
|
}
|
|
4618
4789
|
}
|
|
4619
4790
|
),
|
|
4620
|
-
/* @__PURE__ */ n(
|
|
4791
|
+
/* @__PURE__ */ n(G, { onClick: u, type: "button", children: e("editor.video.dialog.button.apply") })
|
|
4621
4792
|
] }) }),
|
|
4622
4793
|
d && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: d })
|
|
4623
4794
|
] })
|
|
@@ -4627,7 +4798,7 @@ function ra() {
|
|
|
4627
4798
|
] })
|
|
4628
4799
|
] });
|
|
4629
4800
|
}
|
|
4630
|
-
function
|
|
4801
|
+
function Eo(e) {
|
|
4631
4802
|
e = e.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/");
|
|
4632
4803
|
const t = e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);
|
|
4633
4804
|
t && (e = `https://www.youtube.com/embed/${t[1]}`);
|
|
@@ -4638,7 +4809,7 @@ function Lo(e) {
|
|
|
4638
4809
|
}
|
|
4639
4810
|
return /^https?:\/\/www.bilibili.com\/video\/.*/i.test(e) && (e = e.replace(/\?.*$/, "").replace("https://www.bilibili.com/video/", "https://player.bilibili.com/player.html?bvid=")), e.includes("drive.google.com") && (e = e.replace("/view", "/preview")), e;
|
|
4640
4811
|
}
|
|
4641
|
-
const
|
|
4812
|
+
const Oe = /* @__PURE__ */ dt.create({
|
|
4642
4813
|
name: "video",
|
|
4643
4814
|
group: "block",
|
|
4644
4815
|
atom: !0,
|
|
@@ -4652,7 +4823,7 @@ const Pe = /* @__PURE__ */ ct.create({
|
|
|
4652
4823
|
upload: void 0,
|
|
4653
4824
|
frameborder: !1,
|
|
4654
4825
|
resourceVideo: "both",
|
|
4655
|
-
width:
|
|
4826
|
+
width: pi["size-medium"],
|
|
4656
4827
|
HTMLAttributes: {
|
|
4657
4828
|
class: "iframe-wrapper"
|
|
4658
4829
|
// style: 'display: flex;justify-content: center;',
|
|
@@ -4680,13 +4851,13 @@ const Pe = /* @__PURE__ */ ct.create({
|
|
|
4680
4851
|
src: {
|
|
4681
4852
|
default: null,
|
|
4682
4853
|
renderHTML: ({ src: e }) => ({
|
|
4683
|
-
src: e ?
|
|
4854
|
+
src: e ? Eo(e) : null
|
|
4684
4855
|
})
|
|
4685
4856
|
},
|
|
4686
4857
|
width: {
|
|
4687
4858
|
default: this.options.width,
|
|
4688
4859
|
renderHTML: ({ width: e }) => ({
|
|
4689
|
-
width:
|
|
4860
|
+
width: To(e)
|
|
4690
4861
|
})
|
|
4691
4862
|
},
|
|
4692
4863
|
frameborder: {
|
|
@@ -4735,52 +4906,52 @@ const Pe = /* @__PURE__ */ ct.create({
|
|
|
4735
4906
|
};
|
|
4736
4907
|
}
|
|
4737
4908
|
});
|
|
4738
|
-
function
|
|
4739
|
-
const { t: e } =
|
|
4740
|
-
|
|
4741
|
-
const
|
|
4742
|
-
async function
|
|
4743
|
-
var
|
|
4744
|
-
const
|
|
4745
|
-
if (!t || t.isDestroyed ||
|
|
4909
|
+
function Ro() {
|
|
4910
|
+
const { t: e } = oe(), t = ee(), { editorDisabled: r } = Ae(), [i, o] = E(""), a = xe(null), [l, s] = E(""), [c, d] = E(!1), g = ce(Oe.name), p = jt.UPLOAD_VIDEO(t.id);
|
|
4911
|
+
It(d, [p]);
|
|
4912
|
+
const h = $(() => (g == null ? void 0 : g.options) ?? {}, [g]);
|
|
4913
|
+
async function b(u) {
|
|
4914
|
+
var v;
|
|
4915
|
+
const y = (v = u == null ? void 0 : u.target) == null ? void 0 : v.files;
|
|
4916
|
+
if (!t || t.isDestroyed || y.length === 0)
|
|
4746
4917
|
return;
|
|
4747
|
-
const
|
|
4748
|
-
let
|
|
4749
|
-
|
|
4750
|
-
src:
|
|
4918
|
+
const m = y[0];
|
|
4919
|
+
let z = "";
|
|
4920
|
+
h.upload ? z = await h.upload(m) : z = URL.createObjectURL(m), t.chain().focus().setVideo({
|
|
4921
|
+
src: z,
|
|
4751
4922
|
width: "100%"
|
|
4752
4923
|
}).run(), d(!1);
|
|
4753
4924
|
}
|
|
4754
|
-
function
|
|
4755
|
-
|
|
4925
|
+
function f(u) {
|
|
4926
|
+
u.preventDefault(), u.stopPropagation(), i && (t.chain().focus().setVideo({
|
|
4756
4927
|
src: i,
|
|
4757
4928
|
width: "100%"
|
|
4758
4929
|
}).run(), d(!1), o(""));
|
|
4759
4930
|
}
|
|
4760
|
-
function
|
|
4761
|
-
var
|
|
4762
|
-
|
|
4931
|
+
function k(u) {
|
|
4932
|
+
var y;
|
|
4933
|
+
u.preventDefault(), (y = a.current) == null || y.click();
|
|
4763
4934
|
}
|
|
4764
|
-
return r ? /* @__PURE__ */ n(
|
|
4765
|
-
/* @__PURE__ */ n(
|
|
4766
|
-
/* @__PURE__ */
|
|
4767
|
-
|
|
4935
|
+
return r ? /* @__PURE__ */ n(te, {}) : /* @__PURE__ */ n(we, { onOpenChange: d, open: c, children: /* @__PURE__ */ C(se, { children: [
|
|
4936
|
+
/* @__PURE__ */ n(le, { children: e("editor.video.dialog.title") }),
|
|
4937
|
+
/* @__PURE__ */ C(
|
|
4938
|
+
Se,
|
|
4768
4939
|
{
|
|
4769
4940
|
activationMode: "manual",
|
|
4770
|
-
defaultValue: (
|
|
4941
|
+
defaultValue: (h == null ? void 0 : h.resourceVideo) === "both" || (h == null ? void 0 : h.resourceVideo) === "upload" ? "upload" : "link",
|
|
4771
4942
|
children: [
|
|
4772
|
-
/* @__PURE__ */
|
|
4773
|
-
((
|
|
4774
|
-
((
|
|
4943
|
+
/* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
4944
|
+
((h == null ? void 0 : h.resourceVideo) === "both" || (h == null ? void 0 : h.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
|
|
4945
|
+
((h == null ? void 0 : h.resourceVideo) === "both" || (h == null ? void 0 : h.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
|
|
4775
4946
|
] }),
|
|
4776
|
-
/* @__PURE__ */
|
|
4777
|
-
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(
|
|
4947
|
+
/* @__PURE__ */ C(Z, { value: "upload", children: [
|
|
4948
|
+
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(G, { className: "richtext-mt-1 richtext-w-full", onClick: k, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
|
|
4778
4949
|
/* @__PURE__ */ n(
|
|
4779
4950
|
"input",
|
|
4780
4951
|
{
|
|
4781
4952
|
accept: "video/*",
|
|
4782
4953
|
multiple: !0,
|
|
4783
|
-
onChange:
|
|
4954
|
+
onChange: b,
|
|
4784
4955
|
ref: a,
|
|
4785
4956
|
type: "file",
|
|
4786
4957
|
style: {
|
|
@@ -4789,26 +4960,26 @@ function Ao() {
|
|
|
4789
4960
|
}
|
|
4790
4961
|
)
|
|
4791
4962
|
] }),
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */
|
|
4963
|
+
/* @__PURE__ */ C(Z, { value: "link", children: [
|
|
4964
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
4794
4965
|
/* @__PURE__ */ n(
|
|
4795
|
-
|
|
4966
|
+
re,
|
|
4796
4967
|
{
|
|
4797
4968
|
autoFocus: !0,
|
|
4798
4969
|
placeholder: e("editor.video.dialog.placeholder"),
|
|
4799
4970
|
required: !0,
|
|
4800
4971
|
type: "url",
|
|
4801
4972
|
value: i,
|
|
4802
|
-
onBlur: (
|
|
4803
|
-
const
|
|
4804
|
-
|
|
4973
|
+
onBlur: (u) => {
|
|
4974
|
+
const y = u.target.value, m = h.videoProviders || ["."];
|
|
4975
|
+
y && !Pt(y, m) ? s("Invalid video URL") : s("");
|
|
4805
4976
|
},
|
|
4806
|
-
onChange: (
|
|
4807
|
-
o(
|
|
4977
|
+
onChange: (u) => {
|
|
4978
|
+
o(u.target.value);
|
|
4808
4979
|
}
|
|
4809
4980
|
}
|
|
4810
4981
|
),
|
|
4811
|
-
/* @__PURE__ */ n(
|
|
4982
|
+
/* @__PURE__ */ n(G, { onClick: f, type: "button", children: e("editor.video.dialog.button.apply") })
|
|
4812
4983
|
] }) }),
|
|
4813
4984
|
l && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: l })
|
|
4814
4985
|
] })
|
|
@@ -4817,67 +4988,67 @@ function Ao() {
|
|
|
4817
4988
|
)
|
|
4818
4989
|
] }) });
|
|
4819
4990
|
}
|
|
4820
|
-
function
|
|
4821
|
-
return /* @__PURE__ */
|
|
4991
|
+
function Vo() {
|
|
4992
|
+
return /* @__PURE__ */ C(te, { children: [
|
|
4822
4993
|
/* @__PURE__ */ n(No, {}),
|
|
4823
|
-
/* @__PURE__ */ n(
|
|
4994
|
+
/* @__PURE__ */ n(Ro, {})
|
|
4824
4995
|
] });
|
|
4825
4996
|
}
|
|
4826
|
-
process.env.NODE_ENV !== "production" && (
|
|
4997
|
+
process.env.NODE_ENV !== "production" && (Vo.displayName = "SlashDialogTrigger");
|
|
4827
4998
|
export {
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4999
|
+
ea as $,
|
|
5000
|
+
wt as A,
|
|
5001
|
+
G as B,
|
|
4831
5002
|
$e as C,
|
|
4832
5003
|
we as D,
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
5004
|
+
jt as E,
|
|
5005
|
+
st as F,
|
|
5006
|
+
fo as G,
|
|
5007
|
+
xo as H,
|
|
5008
|
+
Re as I,
|
|
5009
|
+
Fn as J,
|
|
5010
|
+
na as K,
|
|
4840
5011
|
pe as L,
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
5012
|
+
cn as M,
|
|
5013
|
+
vn as N,
|
|
5014
|
+
bn as O,
|
|
5015
|
+
ra as P,
|
|
5016
|
+
ta as Q,
|
|
5017
|
+
ia as R,
|
|
4847
5018
|
Ue as S,
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
5019
|
+
Ln as T,
|
|
5020
|
+
qo as U,
|
|
5021
|
+
Yo as V,
|
|
5022
|
+
Go as W,
|
|
5023
|
+
Vo as X,
|
|
5024
|
+
Lo as Y,
|
|
5025
|
+
_n as Z,
|
|
5026
|
+
Oe as _,
|
|
5027
|
+
Nn as a,
|
|
5028
|
+
oa as a0,
|
|
5029
|
+
kt as b,
|
|
5030
|
+
O as c,
|
|
5031
|
+
Ae as d,
|
|
5032
|
+
Zo as e,
|
|
5033
|
+
Qo as f,
|
|
5034
|
+
tn as g,
|
|
4864
5035
|
ee as h,
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
5036
|
+
yt as i,
|
|
5037
|
+
re as j,
|
|
5038
|
+
Ct as k,
|
|
5039
|
+
en as l,
|
|
4869
5040
|
We as m,
|
|
4870
|
-
|
|
4871
|
-
|
|
5041
|
+
se as n,
|
|
5042
|
+
le as o,
|
|
4872
5043
|
zt as p,
|
|
4873
|
-
|
|
5044
|
+
ce as q,
|
|
4874
5045
|
Be as r,
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
5046
|
+
Jo as s,
|
|
5047
|
+
ze as t,
|
|
5048
|
+
Ht as u,
|
|
5049
|
+
Xo as v,
|
|
5050
|
+
Rt as w,
|
|
5051
|
+
Ko as x,
|
|
5052
|
+
It as y,
|
|
4882
5053
|
at as z
|
|
4883
5054
|
};
|