reactjs-tiptap-editor 0.2.29 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionMenuButton-Bycn676n.js +33 -0
- package/lib/ActionMenuButton-CpFNwSUZ.cjs +1 -0
- package/lib/Attachment.cjs +19 -0
- package/lib/Attachment.d.cts +344 -0
- package/lib/Attachment.d.ts +344 -0
- package/lib/Attachment.js +259 -0
- package/lib/Blockquote.cjs +1 -0
- package/lib/Blockquote.d.cts +343 -0
- package/lib/Blockquote.d.ts +343 -0
- package/lib/Blockquote.js +65 -0
- package/lib/Bold.cjs +1 -0
- package/lib/Bold.d.cts +343 -0
- package/lib/Bold.d.ts +343 -0
- package/lib/Bold.js +90 -0
- package/lib/BulletList.cjs +1 -0
- package/lib/BulletList.d.cts +343 -0
- package/lib/BulletList.d.ts +343 -0
- package/lib/BulletList.js +72 -0
- package/lib/Clear.cjs +1 -0
- package/lib/Clear.d.cts +342 -0
- package/lib/Clear.d.ts +342 -0
- package/lib/Clear.js +23 -0
- package/lib/Code.cjs +1 -0
- package/lib/Code.d.cts +343 -0
- package/lib/Code.d.ts +343 -0
- package/lib/Code.js +70 -0
- package/lib/CodeBlock.cjs +39 -0
- package/lib/CodeBlock.d.cts +352 -0
- package/lib/CodeBlock.d.ts +352 -0
- package/lib/CodeBlock.js +3639 -0
- package/lib/Color.cjs +1 -0
- package/lib/Color.d.cts +350 -0
- package/lib/Color.d.ts +350 -0
- package/lib/Color.js +141 -0
- package/lib/Document.cjs +1 -0
- package/lib/Document.d.cts +272 -0
- package/lib/Document.d.ts +272 -0
- package/lib/Document.js +13 -0
- package/lib/Drawer-BZadE1gM.js +1367 -0
- package/lib/Drawer-rwnFvgZR.cjs +1 -0
- package/lib/Drawer.cjs +1 -0
- package/lib/Drawer.d.cts +344 -0
- package/lib/Drawer.d.ts +344 -0
- package/lib/Drawer.js +7 -0
- package/lib/Emoji.cjs +1 -0
- package/lib/Emoji.d.cts +277 -0
- package/lib/Emoji.d.ts +277 -0
- package/lib/Emoji.js +2168 -0
- package/lib/Excalidraw-B2414Smc.js +651 -0
- package/lib/Excalidraw-D21vMFe0.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -0
- package/lib/Excalidraw.d.cts +278 -0
- package/lib/Excalidraw.d.ts +278 -0
- package/lib/Excalidraw.js +6 -0
- package/lib/ExportPdf.cjs +15 -0
- package/lib/ExportPdf.d.cts +270 -0
- package/lib/ExportPdf.d.ts +270 -0
- package/lib/ExportPdf.js +67 -0
- package/lib/ExportWord.cjs +1 -0
- package/lib/ExportWord.d.cts +341 -0
- package/lib/ExportWord.d.ts +341 -0
- package/lib/ExportWord.js +72 -0
- package/lib/FontFamily.cjs +1 -0
- package/lib/FontFamily.d.cts +354 -0
- package/lib/FontFamily.d.ts +354 -0
- package/lib/FontFamily.js +136 -0
- package/lib/FontSize.cjs +1 -0
- package/lib/FontSize.d.cts +359 -0
- package/lib/FontSize.d.ts +359 -0
- package/lib/FontSize.js +110 -0
- package/lib/FormatPainter.cjs +1 -0
- package/lib/FormatPainter.d.cts +353 -0
- package/lib/FormatPainter.d.ts +353 -0
- package/lib/FormatPainter.js +74 -0
- package/lib/Heading.cjs +1 -0
- package/lib/Heading.d.cts +343 -0
- package/lib/Heading.d.ts +343 -0
- package/lib/Heading.js +147 -0
- package/lib/Highlight.cjs +1 -0
- package/lib/Highlight.d.cts +344 -0
- package/lib/Highlight.d.ts +344 -0
- package/lib/Highlight.js +85 -0
- package/lib/History.cjs +1 -0
- package/lib/History.d.cts +343 -0
- package/lib/History.d.ts +343 -0
- package/lib/History.js +431 -0
- package/lib/HorizontalRule.cjs +1 -0
- package/lib/HorizontalRule.d.cts +343 -0
- package/lib/HorizontalRule.d.ts +343 -0
- package/lib/HorizontalRule.js +87 -0
- package/lib/Iframe.cjs +1 -0
- package/lib/Iframe.d.cts +277 -0
- package/lib/Iframe.d.ts +277 -0
- package/lib/Iframe.js +6 -0
- package/lib/Image.cjs +1 -0
- package/lib/Image.d.cts +370 -0
- package/lib/Image.d.ts +370 -0
- package/lib/Image.js +7 -0
- package/lib/ImageGif.cjs +1 -0
- package/lib/ImageGif.d.cts +292 -0
- package/lib/ImageGif.d.ts +292 -0
- package/lib/ImageGif.js +7 -0
- package/lib/ImportWord.cjs +231 -0
- package/lib/ImportWord.d.cts +353 -0
- package/lib/ImportWord.d.ts +353 -0
- package/lib/ImportWord.js +16620 -0
- package/lib/Indent.cjs +1 -0
- package/lib/Indent.d.cts +344 -0
- package/lib/Indent.d.ts +344 -0
- package/lib/Indent.js +78 -0
- package/lib/Italic.cjs +1 -0
- package/lib/Italic.d.cts +343 -0
- package/lib/Italic.d.ts +343 -0
- package/lib/Italic.js +91 -0
- package/lib/Katex.cjs +1 -0
- package/lib/Katex.d.cts +279 -0
- package/lib/Katex.d.ts +279 -0
- package/lib/Katex.js +197 -0
- package/lib/LineHeight.cjs +1 -0
- package/lib/LineHeight.d.cts +347 -0
- package/lib/LineHeight.d.ts +347 -0
- package/lib/LineHeight.js +137 -0
- package/lib/Link.cjs +5 -0
- package/lib/Link.d.cts +343 -0
- package/lib/Link.d.ts +343 -0
- package/lib/Link.js +1048 -0
- package/lib/ListItem.cjs +1 -0
- package/lib/ListItem.d.cts +269 -0
- package/lib/ListItem.d.ts +269 -0
- package/lib/ListItem.js +33 -0
- package/lib/Mention.cjs +1 -0
- package/lib/Mention.d.cts +272 -0
- package/lib/Mention.d.ts +272 -0
- package/lib/Mention.js +233 -0
- package/lib/Mermaid.cjs +2 -0
- package/lib/Mermaid.d.cts +344 -0
- package/lib/Mermaid.d.ts +344 -0
- package/lib/Mermaid.js +390 -0
- package/lib/MoreMark.cjs +1 -0
- package/lib/MoreMark.d.cts +355 -0
- package/lib/MoreMark.d.ts +355 -0
- package/lib/MoreMark.js +95 -0
- package/lib/MultiColumn.cjs +1 -0
- package/lib/MultiColumn.d.cts +277 -0
- package/lib/MultiColumn.d.ts +277 -0
- package/lib/MultiColumn.js +8 -0
- package/lib/OrderedList.cjs +1 -0
- package/lib/OrderedList.d.cts +343 -0
- package/lib/OrderedList.d.ts +343 -0
- package/lib/OrderedList.js +90 -0
- package/lib/RichTextEditor-Cy9XKEI5.js +11178 -0
- package/lib/RichTextEditor-DkpDEr5U.cjs +137 -0
- package/lib/SearchAndReplace.cjs +1 -0
- package/lib/SearchAndReplace.d.cts +358 -0
- package/lib/SearchAndReplace.d.ts +358 -0
- package/lib/SearchAndReplace.js +339 -0
- package/lib/Selection.cjs +1 -0
- package/lib/Selection.d.cts +272 -0
- package/lib/Selection.d.ts +272 -0
- package/lib/Selection.js +25 -0
- package/lib/SlashCommand.cjs +1 -0
- package/lib/SlashCommand.d.cts +299 -0
- package/lib/SlashCommand.d.ts +299 -0
- package/lib/SlashCommand.js +369 -0
- package/lib/Strike.cjs +1 -0
- package/lib/Strike.d.cts +343 -0
- package/lib/Strike.d.ts +343 -0
- package/lib/Strike.js +80 -0
- package/lib/SubAndSuperScript.cjs +1 -0
- package/lib/SubAndSuperScript.d.cts +358 -0
- package/lib/SubAndSuperScript.d.ts +358 -0
- package/lib/SubAndSuperScript.js +41 -0
- package/lib/Table.cjs +1 -0
- package/lib/Table.d.cts +366 -0
- package/lib/Table.d.ts +366 -0
- package/lib/Table.js +2165 -0
- package/lib/TableOfContent.cjs +1 -0
- package/lib/TableOfContent.d.cts +274 -0
- package/lib/TableOfContent.d.ts +274 -0
- package/lib/TableOfContent.js +184 -0
- package/lib/TaskList.cjs +1 -0
- package/lib/TaskList.d.cts +349 -0
- package/lib/TaskList.d.ts +349 -0
- package/lib/TaskList.js +175 -0
- package/lib/TextAlign.cjs +1 -0
- package/lib/TextAlign.d.cts +353 -0
- package/lib/TextAlign.d.ts +353 -0
- package/lib/TextAlign.js +165 -0
- package/lib/TextBubble.cjs +1 -0
- package/lib/TextBubble.d.cts +343 -0
- package/lib/TextBubble.d.ts +343 -0
- package/lib/TextBubble.js +131 -0
- package/lib/TextDirection.cjs +1 -0
- package/lib/TextDirection.d.cts +270 -0
- package/lib/TextDirection.d.ts +270 -0
- package/lib/TextDirection.js +142 -0
- package/lib/TextUnderline.cjs +1 -0
- package/lib/TextUnderline.d.cts +343 -0
- package/lib/TextUnderline.d.ts +343 -0
- package/lib/TextUnderline.js +61 -0
- package/lib/TrailingNode.cjs +1 -0
- package/lib/TrailingNode.d.cts +280 -0
- package/lib/TrailingNode.d.ts +280 -0
- package/lib/TrailingNode.js +41 -0
- package/lib/Twitter-B_tSItrW.js +1743 -0
- package/lib/Twitter-CfDC4bFV.cjs +17 -0
- package/lib/Twitter.cjs +1 -0
- package/lib/Twitter.d.cts +295 -0
- package/lib/Twitter.d.ts +295 -0
- package/lib/Twitter.js +6 -0
- package/lib/Video.cjs +1 -0
- package/lib/Video.d.cts +371 -0
- package/lib/Video.d.ts +371 -0
- package/lib/Video.js +6 -0
- package/lib/bubble-extra.cjs +2 -0
- package/lib/bubble-extra.d.cts +294 -0
- package/lib/bubble-extra.d.ts +294 -0
- package/lib/bubble-extra.js +623 -0
- package/lib/dom-dataset-CAXnsjYE.cjs +33 -0
- package/lib/dom-dataset-CJ7GyQ2E.js +999 -0
- package/lib/index-COecBbaE.cjs +89 -0
- package/lib/index-ClFtfQ0J.cjs +1 -0
- package/lib/index-CvYIX2-x.js +129 -0
- package/lib/index-CySbCeQd.cjs +1 -0
- package/lib/{index-CO-iymkb.js → index-D9llIWB5.js} +442 -101
- package/lib/index-DXBa3JBo.js +46 -0
- package/lib/index-DjP7Onch.cjs +1 -0
- package/lib/index-Drmyqk9P.js +12322 -0
- package/lib/index-DuhDIOel.js +76 -0
- package/lib/index-LbrE7K9i.cjs +1 -0
- package/lib/index.cjs +2 -1
- package/lib/index.d.cts +290 -108
- package/lib/index.d.ts +290 -108
- package/lib/index.js +587 -13
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +108 -108
- package/lib/locale-bundle.d.ts +108 -108
- package/lib/locale-bundle.js +1 -1
- package/lib/shortId-Bfj8TyNr.cjs +2 -0
- package/lib/shortId-WJVkrvml.js +30 -0
- package/lib/style.css +1 -1
- package/lib/textarea-B45fP3gP.cjs +1 -0
- package/lib/textarea-DXTdXr2y.js +20 -0
- package/package.json +678 -15
- package/lib/RichTextEditor-Ce2IeNE6.js +0 -8265
- package/lib/RichTextEditor-hDDApaDD.cjs +0 -136
- package/lib/extension-bundle.cjs +0 -33
- package/lib/extension-bundle.d.cts +0 -951
- package/lib/extension-bundle.d.ts +0 -951
- package/lib/extension-bundle.js +0 -5982
- package/lib/index-CJ6Hb9MN.cjs +0 -1
- package/lib/tiptap-DOP8lVCQ.js +0 -5950
- package/lib/tiptap-Dq62HiQ9.cjs +0 -113
- package/lib/vendor-BbgkyoD-.js +0 -40297
- package/lib/vendor-DdwtMmSr.cjs +0 -302
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { useMemo as
|
|
5
|
-
|
|
6
|
-
const h = "en", b = 200, E = b - 80, L = 20, S = 1e5, w = 16, B = 10, R = 10, I = 2, W = [
|
|
1
|
+
var D = Object.defineProperty;
|
|
2
|
+
var S = (t, o, n) => o in t ? D(t, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[o] = n;
|
|
3
|
+
var F = (t, o, n) => S(t, typeof o != "symbol" ? o + "" : o, n);
|
|
4
|
+
import { useSyncExternalStore as y, useMemo as E, useEffect as L } from "react";
|
|
5
|
+
const w = "en", B = 200, it = B - 80, rt = 20, lt = 1e5, dt = 16, at = 10, nt = 10, st = 2, pt = [
|
|
7
6
|
"#000000",
|
|
8
7
|
"#262626",
|
|
9
8
|
"#595959",
|
|
@@ -74,7 +73,7 @@ const h = "en", b = 200, E = b - 80, L = 20, S = 1e5, w = 16, B = 10, R = 10, I
|
|
|
74
73
|
"#061178",
|
|
75
74
|
"#22075E",
|
|
76
75
|
"#780650"
|
|
77
|
-
],
|
|
76
|
+
], ut = [
|
|
78
77
|
"Inter",
|
|
79
78
|
"Comic Sans MS, Comic Sans",
|
|
80
79
|
"serif",
|
|
@@ -90,7 +89,7 @@ const h = "en", b = 200, E = b - 80, L = 20, S = 1e5, w = 16, B = 10, R = 10, I
|
|
|
90
89
|
"Lucida Console",
|
|
91
90
|
"Monaco",
|
|
92
91
|
"monospace"
|
|
93
|
-
],
|
|
92
|
+
], gt = [
|
|
94
93
|
"10px",
|
|
95
94
|
"11px",
|
|
96
95
|
"12px",
|
|
@@ -105,9 +104,9 @@ const h = "en", b = 200, E = b - 80, L = 20, S = 1e5, w = 16, B = 10, R = 10, I
|
|
|
105
104
|
"36px",
|
|
106
105
|
"48px",
|
|
107
106
|
"72px"
|
|
108
|
-
],
|
|
109
|
-
var
|
|
110
|
-
const
|
|
107
|
+
], mt = "default";
|
|
108
|
+
var R = /* @__PURE__ */ ((t) => (t[t["size-small"] = 200] = "size-small", t[t["size-medium"] = 500] = "size-medium", t["size-large"] = "100%", t))(R || {}), I = /* @__PURE__ */ ((t) => (t[t["size-small"] = 480] = "size-small", t[t["size-medium"] = 640] = "size-medium", t["size-large"] = "100%", t))(I || {});
|
|
109
|
+
const ct = ["100%", "115%", "150%", "200%", "250%", "300%"], ht = "1", ft = [
|
|
111
110
|
"bold",
|
|
112
111
|
"italic",
|
|
113
112
|
"underline",
|
|
@@ -118,7 +117,348 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
|
|
|
118
117
|
"color",
|
|
119
118
|
"highlight",
|
|
120
119
|
"textAlign"
|
|
121
|
-
]
|
|
120
|
+
];
|
|
121
|
+
function W({
|
|
122
|
+
updateComputed: t,
|
|
123
|
+
notifyEffect: o
|
|
124
|
+
}) {
|
|
125
|
+
let n, s;
|
|
126
|
+
return {
|
|
127
|
+
/**
|
|
128
|
+
* Links a given dependency and subscriber if they are not already linked.
|
|
129
|
+
*
|
|
130
|
+
* @param dep - The dependency to be linked.
|
|
131
|
+
* @param sub - The subscriber that depends on this dependency.
|
|
132
|
+
* @returns The newly created link object if the two are not already linked; otherwise `undefined`.
|
|
133
|
+
*/
|
|
134
|
+
link(e, i) {
|
|
135
|
+
const r = i.depsTail;
|
|
136
|
+
if (r !== void 0 && r.dep === e)
|
|
137
|
+
return;
|
|
138
|
+
const d = r !== void 0 ? r.nextDep : i.deps;
|
|
139
|
+
if (d !== void 0 && d.dep === e) {
|
|
140
|
+
i.depsTail = d;
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const l = e.subsTail;
|
|
144
|
+
if (!(l !== void 0 && l.sub === i && h(l, i)))
|
|
145
|
+
return p(e, i, d, r);
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* Traverses and marks subscribers starting from the provided link.
|
|
149
|
+
*
|
|
150
|
+
* It sets flags (e.g., Dirty, PendingComputed, PendingEffect) on each subscriber
|
|
151
|
+
* to indicate which ones require re-computation or effect processing.
|
|
152
|
+
* This function should be called after a signal's value changes.
|
|
153
|
+
*
|
|
154
|
+
* @param link - The starting link from which propagation begins.
|
|
155
|
+
*/
|
|
156
|
+
propagate(e) {
|
|
157
|
+
let i = 32, r = e, d = 0;
|
|
158
|
+
t: do {
|
|
159
|
+
const l = e.sub, a = l.flags;
|
|
160
|
+
if (!(a & 244) && (l.flags = a | i | 8, !0) || a & 16 && !(a & 4) && (l.flags = a & -17 | i | 8, !0) || !(a & 224) && h(e, l) && (l.flags = a | 16 | i | 8, l.subs !== void 0)) {
|
|
161
|
+
const g = l.subs;
|
|
162
|
+
if (g !== void 0) {
|
|
163
|
+
g.nextSub !== void 0 ? (g.prevSub = r, e = r = g, i = 64, ++d) : (e = g, i = a & 2 ? 128 : 64);
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
a & 2 && (s !== void 0 ? s.depsTail.nextDep = l.deps : n = l, s = l);
|
|
167
|
+
} else a & (4 | i) ? !(a & i) && a & 224 && h(e, l) && (l.flags = a | i) : (l.flags = a | i | 8, (a & 10) === 2 && (s !== void 0 ? s.depsTail.nextDep = l.deps : n = l, s = l));
|
|
168
|
+
if ((e = r.nextSub) !== void 0) {
|
|
169
|
+
r = e, i = d ? 64 : 32;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
for (; d; ) {
|
|
173
|
+
--d;
|
|
174
|
+
const x = r.dep.subs;
|
|
175
|
+
if (r = x.prevSub, x.prevSub = void 0, (e = r.nextSub) !== void 0) {
|
|
176
|
+
r = e, i = d ? 64 : 32;
|
|
177
|
+
continue t;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
break;
|
|
181
|
+
} while (!0);
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* Prepares the given subscriber to track new dependencies.
|
|
185
|
+
*
|
|
186
|
+
* It resets the subscriber's internal pointers (e.g., depsTail) and
|
|
187
|
+
* sets its flags to indicate it is now tracking dependency links.
|
|
188
|
+
*
|
|
189
|
+
* @param sub - The subscriber to start tracking.
|
|
190
|
+
*/
|
|
191
|
+
startTracking(e) {
|
|
192
|
+
e.depsTail = void 0, e.flags = e.flags & -249 | 4;
|
|
193
|
+
},
|
|
194
|
+
/**
|
|
195
|
+
* Concludes tracking of dependencies for the specified subscriber.
|
|
196
|
+
*
|
|
197
|
+
* It clears or unlinks any tracked dependency information, then
|
|
198
|
+
* updates the subscriber's flags to indicate tracking is complete.
|
|
199
|
+
*
|
|
200
|
+
* @param sub - The subscriber whose tracking is ending.
|
|
201
|
+
*/
|
|
202
|
+
endTracking(e) {
|
|
203
|
+
const i = e.depsTail;
|
|
204
|
+
if (i !== void 0) {
|
|
205
|
+
const r = i.nextDep;
|
|
206
|
+
r !== void 0 && (T(r), i.nextDep = void 0);
|
|
207
|
+
} else e.deps !== void 0 && (T(e.deps), e.deps = void 0);
|
|
208
|
+
e.flags &= -5;
|
|
209
|
+
},
|
|
210
|
+
/**
|
|
211
|
+
* Updates the dirty flag for the given subscriber based on its dependencies.
|
|
212
|
+
*
|
|
213
|
+
* If the subscriber has any pending computeds, this function sets the Dirty flag
|
|
214
|
+
* and returns `true`. Otherwise, it clears the PendingComputed flag and returns `false`.
|
|
215
|
+
*
|
|
216
|
+
* @param sub - The subscriber to update.
|
|
217
|
+
* @param flags - The current flag set for this subscriber.
|
|
218
|
+
* @returns `true` if the subscriber is marked as Dirty; otherwise `false`.
|
|
219
|
+
*/
|
|
220
|
+
updateDirtyFlag(e, i) {
|
|
221
|
+
return v(e.deps) ? (e.flags = i | 32, !0) : (e.flags = i & -65, !1);
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* Updates the computed subscriber if necessary before its value is accessed.
|
|
225
|
+
*
|
|
226
|
+
* If the subscriber is marked Dirty or PendingComputed, this function runs
|
|
227
|
+
* the provided updateComputed logic and triggers a shallowPropagate for any
|
|
228
|
+
* downstream subscribers if an actual update occurs.
|
|
229
|
+
*
|
|
230
|
+
* @param computed - The computed subscriber to update.
|
|
231
|
+
* @param flags - The current flag set for this subscriber.
|
|
232
|
+
*/
|
|
233
|
+
processComputedUpdate(e, i) {
|
|
234
|
+
if ((i & 32 || (v(e.deps) || (e.flags = i & -65, !1))) && t(e)) {
|
|
235
|
+
const r = e.subs;
|
|
236
|
+
r !== void 0 && c(r);
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
/**
|
|
240
|
+
* Ensures all pending internal effects for the given subscriber are processed.
|
|
241
|
+
*
|
|
242
|
+
* This should be called after an effect decides not to re-run itself but may still
|
|
243
|
+
* have dependencies flagged with PendingEffect. If the subscriber is flagged with
|
|
244
|
+
* PendingEffect, this function clears that flag and invokes `notifyEffect` on any
|
|
245
|
+
* related dependencies marked as Effect and Propagated, processing pending effects.
|
|
246
|
+
*
|
|
247
|
+
* @param sub - The subscriber which may have pending effects.
|
|
248
|
+
* @param flags - The current flags on the subscriber to check.
|
|
249
|
+
*/
|
|
250
|
+
processPendingInnerEffects(e, i) {
|
|
251
|
+
if (i & 128) {
|
|
252
|
+
e.flags = i & -129;
|
|
253
|
+
let r = e.deps;
|
|
254
|
+
do {
|
|
255
|
+
const d = r.dep;
|
|
256
|
+
"flags" in d && d.flags & 2 && d.flags & 224 && o(d), r = r.nextDep;
|
|
257
|
+
} while (r !== void 0);
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
/**
|
|
261
|
+
* Processes queued effect notifications after a batch operation finishes.
|
|
262
|
+
*
|
|
263
|
+
* Iterates through all queued effects, calling notifyEffect on each.
|
|
264
|
+
* If an effect remains partially handled, its flags are updated, and future
|
|
265
|
+
* notifications may be triggered until fully handled.
|
|
266
|
+
*/
|
|
267
|
+
processEffectNotifications() {
|
|
268
|
+
for (; n !== void 0; ) {
|
|
269
|
+
const e = n, i = e.depsTail, r = i.nextDep;
|
|
270
|
+
r !== void 0 ? (i.nextDep = void 0, n = r.sub) : (n = void 0, s = void 0), o(e) || (e.flags &= -9);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
function p(e, i, r, d) {
|
|
275
|
+
const l = {
|
|
276
|
+
dep: e,
|
|
277
|
+
sub: i,
|
|
278
|
+
nextDep: r,
|
|
279
|
+
prevSub: void 0,
|
|
280
|
+
nextSub: void 0
|
|
281
|
+
};
|
|
282
|
+
if (d === void 0 ? i.deps = l : d.nextDep = l, e.subs === void 0)
|
|
283
|
+
e.subs = l;
|
|
284
|
+
else {
|
|
285
|
+
const a = e.subsTail;
|
|
286
|
+
l.prevSub = a, a.nextSub = l;
|
|
287
|
+
}
|
|
288
|
+
return i.depsTail = l, e.subsTail = l, l;
|
|
289
|
+
}
|
|
290
|
+
function v(e) {
|
|
291
|
+
let i = 0, r;
|
|
292
|
+
t: do {
|
|
293
|
+
r = !1;
|
|
294
|
+
const d = e.dep;
|
|
295
|
+
if ("flags" in d) {
|
|
296
|
+
const l = d.flags;
|
|
297
|
+
if ((l & 33) === 33) {
|
|
298
|
+
if (t(d)) {
|
|
299
|
+
const a = d.subs;
|
|
300
|
+
a.nextSub !== void 0 && c(a), r = !0;
|
|
301
|
+
}
|
|
302
|
+
} else if ((l & 65) === 65) {
|
|
303
|
+
const a = d.subs;
|
|
304
|
+
a.nextSub !== void 0 && (a.prevSub = e), e = d.deps, ++i;
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
if (!r && e.nextDep !== void 0) {
|
|
309
|
+
e = e.nextDep;
|
|
310
|
+
continue;
|
|
311
|
+
}
|
|
312
|
+
if (i) {
|
|
313
|
+
let l = e.sub;
|
|
314
|
+
do {
|
|
315
|
+
--i;
|
|
316
|
+
const a = l.subs;
|
|
317
|
+
if (r) {
|
|
318
|
+
if (t(l)) {
|
|
319
|
+
(e = a.prevSub) !== void 0 ? (a.prevSub = void 0, c(l.subs), l = e.sub) : l = a.sub;
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
} else
|
|
323
|
+
l.flags &= -65;
|
|
324
|
+
if ((e = a.prevSub) !== void 0) {
|
|
325
|
+
if (a.prevSub = void 0, e.nextDep !== void 0) {
|
|
326
|
+
e = e.nextDep;
|
|
327
|
+
continue t;
|
|
328
|
+
}
|
|
329
|
+
l = e.sub;
|
|
330
|
+
} else {
|
|
331
|
+
if ((e = a.nextDep) !== void 0)
|
|
332
|
+
continue t;
|
|
333
|
+
l = a.sub;
|
|
334
|
+
}
|
|
335
|
+
r = !1;
|
|
336
|
+
} while (i);
|
|
337
|
+
}
|
|
338
|
+
return r;
|
|
339
|
+
} while (!0);
|
|
340
|
+
}
|
|
341
|
+
function c(e) {
|
|
342
|
+
do {
|
|
343
|
+
const i = e.sub, r = i.flags;
|
|
344
|
+
(r & 96) === 64 && (i.flags = r | 32 | 8, (r & 10) === 2 && (s !== void 0 ? s.depsTail.nextDep = i.deps : n = i, s = i)), e = e.nextSub;
|
|
345
|
+
} while (e !== void 0);
|
|
346
|
+
}
|
|
347
|
+
function h(e, i) {
|
|
348
|
+
const r = i.depsTail;
|
|
349
|
+
if (r !== void 0) {
|
|
350
|
+
let d = i.deps;
|
|
351
|
+
do {
|
|
352
|
+
if (d === e)
|
|
353
|
+
return !0;
|
|
354
|
+
if (d === r)
|
|
355
|
+
break;
|
|
356
|
+
d = d.nextDep;
|
|
357
|
+
} while (d !== void 0);
|
|
358
|
+
}
|
|
359
|
+
return !1;
|
|
360
|
+
}
|
|
361
|
+
function T(e) {
|
|
362
|
+
do {
|
|
363
|
+
const i = e.dep, r = e.nextDep, d = e.nextSub, l = e.prevSub;
|
|
364
|
+
if (d !== void 0 ? d.prevSub = l : i.subsTail = l, l !== void 0 ? l.nextSub = d : i.subs = d, i.subs === void 0 && "deps" in i) {
|
|
365
|
+
const a = i.flags;
|
|
366
|
+
a & 32 || (i.flags = a | 32);
|
|
367
|
+
const g = i.deps;
|
|
368
|
+
if (g !== void 0) {
|
|
369
|
+
e = g, i.depsTail.nextDep = r, i.deps = void 0, i.depsTail = void 0;
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
e = r;
|
|
374
|
+
} while (e !== void 0);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
var {
|
|
378
|
+
link: C,
|
|
379
|
+
propagate: N,
|
|
380
|
+
updateDirtyFlag: P,
|
|
381
|
+
startTracking: b,
|
|
382
|
+
endTracking: k,
|
|
383
|
+
processEffectNotifications: U,
|
|
384
|
+
processComputedUpdate: bt,
|
|
385
|
+
processPendingInnerEffects: _
|
|
386
|
+
} = W({
|
|
387
|
+
updateComputed(t) {
|
|
388
|
+
const o = u;
|
|
389
|
+
u = t, b(t);
|
|
390
|
+
try {
|
|
391
|
+
const n = t.currentValue, s = t.getter(n);
|
|
392
|
+
return n !== s ? (t.currentValue = s, !0) : !1;
|
|
393
|
+
} finally {
|
|
394
|
+
u = o, k(t);
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
notifyEffect(t) {
|
|
398
|
+
return "isScope" in t ? H(t) : q(t);
|
|
399
|
+
}
|
|
400
|
+
}), u;
|
|
401
|
+
function j(t) {
|
|
402
|
+
return K.bind({
|
|
403
|
+
currentValue: t,
|
|
404
|
+
subs: void 0,
|
|
405
|
+
subsTail: void 0
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
function M(t) {
|
|
409
|
+
const o = {
|
|
410
|
+
fn: t,
|
|
411
|
+
subs: void 0,
|
|
412
|
+
subsTail: void 0,
|
|
413
|
+
deps: void 0,
|
|
414
|
+
depsTail: void 0,
|
|
415
|
+
flags: 2
|
|
416
|
+
/* Effect */
|
|
417
|
+
};
|
|
418
|
+
return u !== void 0 && C(o, u), z(o), O.bind(o);
|
|
419
|
+
}
|
|
420
|
+
function z(t) {
|
|
421
|
+
const o = u;
|
|
422
|
+
u = t, b(t);
|
|
423
|
+
try {
|
|
424
|
+
t.fn();
|
|
425
|
+
} finally {
|
|
426
|
+
u = o, k(t);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function q(t) {
|
|
430
|
+
const o = t.flags;
|
|
431
|
+
return o & 32 || o & 64 && P(t, o) ? z(t) : _(t, t.flags), !0;
|
|
432
|
+
}
|
|
433
|
+
function H(t) {
|
|
434
|
+
return t.flags & 128 ? (_(t, t.flags), !0) : !1;
|
|
435
|
+
}
|
|
436
|
+
function K(...t) {
|
|
437
|
+
if (t.length) {
|
|
438
|
+
if (this.currentValue !== (this.currentValue = t[0])) {
|
|
439
|
+
const o = this.subs;
|
|
440
|
+
o !== void 0 && (N(o), U());
|
|
441
|
+
}
|
|
442
|
+
} else
|
|
443
|
+
return u !== void 0 && C(this, u), this.currentValue;
|
|
444
|
+
}
|
|
445
|
+
function O() {
|
|
446
|
+
b(this), k(this);
|
|
447
|
+
}
|
|
448
|
+
function G(t) {
|
|
449
|
+
return j(t);
|
|
450
|
+
}
|
|
451
|
+
function V(t) {
|
|
452
|
+
return [y((o) => {
|
|
453
|
+
let n = M(() => {
|
|
454
|
+
t(), o();
|
|
455
|
+
});
|
|
456
|
+
return () => n();
|
|
457
|
+
}, () => t(), () => t()), (o) => {
|
|
458
|
+
t(typeof o == "function" ? o(t()) : o);
|
|
459
|
+
}];
|
|
460
|
+
}
|
|
461
|
+
const X = {
|
|
122
462
|
"editor.remove": "Remove",
|
|
123
463
|
"editor.copy": "Copy",
|
|
124
464
|
"editor.words": "WORDS",
|
|
@@ -288,7 +628,7 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
|
|
|
288
628
|
"editor.twitter.tooltip": "Twitter",
|
|
289
629
|
"editor.tooltip.flipX": "Flip Horizontal",
|
|
290
630
|
"editor.tooltip.flipY": "Flip Vertical"
|
|
291
|
-
},
|
|
631
|
+
}, $ = {
|
|
292
632
|
"editor.remove": "Remover",
|
|
293
633
|
"editor.copy": "Copiar",
|
|
294
634
|
"editor.words": "PALAVRAS",
|
|
@@ -458,7 +798,7 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
|
|
|
458
798
|
"editor.twitter.tooltip": "Twitter",
|
|
459
799
|
"editor.tooltip.flipX": "Inverter Horizontal",
|
|
460
800
|
"editor.tooltip.flipY": "Inverter Vertical"
|
|
461
|
-
},
|
|
801
|
+
}, Y = {
|
|
462
802
|
"editor.remove": "Xóa",
|
|
463
803
|
"editor.copy": "Sao chép",
|
|
464
804
|
"editor.words": "TỪ",
|
|
@@ -628,7 +968,7 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
|
|
|
628
968
|
"editor.twitter.tooltip": "Twitter",
|
|
629
969
|
"editor.tooltip.flipX": "Lật Ngang",
|
|
630
970
|
"editor.tooltip.flipY": "Lật Dọc"
|
|
631
|
-
},
|
|
971
|
+
}, J = {
|
|
632
972
|
"editor.remove": "移除",
|
|
633
973
|
"editor.copy": "复制",
|
|
634
974
|
"editor.words": "字数",
|
|
@@ -798,7 +1138,7 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
|
|
|
798
1138
|
"editor.twitter.tooltip": "Twitter",
|
|
799
1139
|
"editor.tooltip.flipX": "水平翻转",
|
|
800
1140
|
"editor.tooltip.flipY": "垂直翻转"
|
|
801
|
-
},
|
|
1141
|
+
}, Q = {
|
|
802
1142
|
"editor.remove": "Eltávolítás",
|
|
803
1143
|
"editor.copy": "Másolás",
|
|
804
1144
|
"editor.words": "SZAVAK",
|
|
@@ -969,12 +1309,12 @@ const N = ["100%", "115%", "150%", "200%", "250%", "300%"], M = "1", H = [
|
|
|
969
1309
|
"editor.tooltip.flipX": "Vízszintes tükrözés",
|
|
970
1310
|
"editor.tooltip.flipY": "Függőleges tükrözés"
|
|
971
1311
|
};
|
|
972
|
-
function
|
|
973
|
-
return
|
|
1312
|
+
function Z(t) {
|
|
1313
|
+
return t = t || /* @__PURE__ */ new Map(), {
|
|
974
1314
|
/**
|
|
975
1315
|
* A Map of event names to registered handler functions.
|
|
976
1316
|
*/
|
|
977
|
-
all:
|
|
1317
|
+
all: t,
|
|
978
1318
|
/**
|
|
979
1319
|
* Register an event handler for the given type.
|
|
980
1320
|
* @param {string|symbol} type Type of event to listen for, or `'*'` for all events
|
|
@@ -982,9 +1322,9 @@ function v(e) {
|
|
|
982
1322
|
* @memberOf mitt
|
|
983
1323
|
*/
|
|
984
1324
|
//@ts-expect-error
|
|
985
|
-
on(
|
|
986
|
-
const
|
|
987
|
-
|
|
1325
|
+
on(o, n) {
|
|
1326
|
+
const s = t.get(o);
|
|
1327
|
+
s ? s.push(n) : t.set(o, [n]);
|
|
988
1328
|
},
|
|
989
1329
|
/**
|
|
990
1330
|
* Remove an event handler for the given type.
|
|
@@ -994,9 +1334,9 @@ function v(e) {
|
|
|
994
1334
|
* @memberOf mitt
|
|
995
1335
|
*/
|
|
996
1336
|
//@ts-expect-error
|
|
997
|
-
off(
|
|
998
|
-
const
|
|
999
|
-
|
|
1337
|
+
off(o, n) {
|
|
1338
|
+
const s = t.get(o);
|
|
1339
|
+
s && (n ? s.splice(s.indexOf(n) >>> 0, 1) : t.set(o, []));
|
|
1000
1340
|
},
|
|
1001
1341
|
/**
|
|
1002
1342
|
* Invoke all handlers for the given type.
|
|
@@ -1008,126 +1348,127 @@ function v(e) {
|
|
|
1008
1348
|
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
1009
1349
|
* @memberOf mitt
|
|
1010
1350
|
*/
|
|
1011
|
-
emit(
|
|
1012
|
-
let
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
}),
|
|
1016
|
-
|
|
1351
|
+
emit(o, n) {
|
|
1352
|
+
let s = t.get(o);
|
|
1353
|
+
s && [...s].map((p) => {
|
|
1354
|
+
p(n);
|
|
1355
|
+
}), s = t.get("*"), s && [...s].map((p) => {
|
|
1356
|
+
p(o, n);
|
|
1017
1357
|
});
|
|
1018
1358
|
}
|
|
1019
1359
|
};
|
|
1020
1360
|
}
|
|
1021
|
-
const
|
|
1022
|
-
lang:
|
|
1361
|
+
const m = {
|
|
1362
|
+
lang: w,
|
|
1023
1363
|
message: {
|
|
1024
|
-
en:
|
|
1025
|
-
hu_HU:
|
|
1026
|
-
vi:
|
|
1027
|
-
zh_CN:
|
|
1028
|
-
pt_BR:
|
|
1364
|
+
en: X,
|
|
1365
|
+
hu_HU: Q,
|
|
1366
|
+
vi: Y,
|
|
1367
|
+
zh_CN: J,
|
|
1368
|
+
pt_BR: $
|
|
1029
1369
|
}
|
|
1030
1370
|
};
|
|
1031
|
-
class
|
|
1371
|
+
class tt {
|
|
1032
1372
|
constructor() {
|
|
1033
|
-
|
|
1034
|
-
this.emitter =
|
|
1373
|
+
F(this, "emitter");
|
|
1374
|
+
this.emitter = Z();
|
|
1035
1375
|
}
|
|
1036
1376
|
// Getter and setter for current language
|
|
1037
1377
|
get lang() {
|
|
1038
|
-
return
|
|
1378
|
+
return m.lang;
|
|
1039
1379
|
}
|
|
1040
|
-
set lang(
|
|
1041
|
-
if (!this.isLangSupported(
|
|
1380
|
+
set lang(o) {
|
|
1381
|
+
if (!this.isLangSupported(o)) {
|
|
1042
1382
|
console.warn(
|
|
1043
|
-
`Can't find the current language "${
|
|
1383
|
+
`Can't find the current language "${o}", Using language "${m.lang}" by default`
|
|
1044
1384
|
);
|
|
1045
1385
|
return;
|
|
1046
1386
|
}
|
|
1047
|
-
|
|
1387
|
+
m.lang = o, this.emitter.emit("lang", o);
|
|
1048
1388
|
}
|
|
1049
1389
|
// Getter and setter for messages
|
|
1050
1390
|
get message() {
|
|
1051
|
-
return
|
|
1391
|
+
return m.message;
|
|
1052
1392
|
}
|
|
1053
|
-
set message(
|
|
1054
|
-
|
|
1393
|
+
set message(o) {
|
|
1394
|
+
m.message = o;
|
|
1055
1395
|
}
|
|
1056
1396
|
// Load messages for a specific language
|
|
1057
|
-
loadLangMessage(
|
|
1058
|
-
return this.message[
|
|
1397
|
+
loadLangMessage(o) {
|
|
1398
|
+
return this.message[o];
|
|
1059
1399
|
}
|
|
1060
1400
|
// Check if a language is supported
|
|
1061
|
-
isLangSupported(
|
|
1062
|
-
return Object.keys(this.message).includes(
|
|
1401
|
+
isLangSupported(o) {
|
|
1402
|
+
return Object.keys(this.message).includes(o);
|
|
1063
1403
|
}
|
|
1064
1404
|
// Set the current language
|
|
1065
|
-
setLang(
|
|
1066
|
-
this.lang =
|
|
1405
|
+
setLang(o) {
|
|
1406
|
+
this.lang = o;
|
|
1067
1407
|
}
|
|
1068
1408
|
// Register a language change watcher
|
|
1069
|
-
registerWatchLang(
|
|
1070
|
-
return this.emitter.on("lang",
|
|
1409
|
+
registerWatchLang(o) {
|
|
1410
|
+
return this.emitter.on("lang", o), {
|
|
1071
1411
|
unsubscribe: () => {
|
|
1072
|
-
this.emitter.off("lang",
|
|
1412
|
+
this.emitter.off("lang", o);
|
|
1073
1413
|
}
|
|
1074
1414
|
};
|
|
1075
1415
|
}
|
|
1076
1416
|
// Set messages for a specific language
|
|
1077
|
-
setMessage(
|
|
1078
|
-
this.message[
|
|
1417
|
+
setMessage(o, n) {
|
|
1418
|
+
this.message[o] = n;
|
|
1079
1419
|
}
|
|
1080
1420
|
// Build a translation function for a given language
|
|
1081
|
-
buildLocalesHandler(
|
|
1082
|
-
|
|
1083
|
-
const
|
|
1084
|
-
return function(
|
|
1085
|
-
return
|
|
1421
|
+
buildLocalesHandler(o) {
|
|
1422
|
+
o || (o = this.lang);
|
|
1423
|
+
const n = this.loadLangMessage(o);
|
|
1424
|
+
return function(p) {
|
|
1425
|
+
return n[p] || p;
|
|
1086
1426
|
};
|
|
1087
1427
|
}
|
|
1088
1428
|
}
|
|
1089
|
-
const
|
|
1090
|
-
function
|
|
1091
|
-
const [
|
|
1092
|
-
return
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1429
|
+
const f = new tt(), A = G(m.lang);
|
|
1430
|
+
function kt() {
|
|
1431
|
+
const [t, o] = V(A), n = E(() => f.buildLocalesHandler(t), [t]);
|
|
1432
|
+
return L(() => {
|
|
1433
|
+
const s = f.registerWatchLang((p) => {
|
|
1434
|
+
o(p);
|
|
1095
1435
|
});
|
|
1096
1436
|
return () => {
|
|
1097
|
-
|
|
1437
|
+
s.unsubscribe();
|
|
1098
1438
|
};
|
|
1099
1439
|
}, []), {
|
|
1100
|
-
lang:
|
|
1101
|
-
t:
|
|
1440
|
+
lang: t,
|
|
1441
|
+
t: n
|
|
1102
1442
|
};
|
|
1103
1443
|
}
|
|
1104
|
-
const
|
|
1105
|
-
t: (
|
|
1444
|
+
const vt = {
|
|
1445
|
+
t: (t) => f.buildLocalesHandler(A())(t)
|
|
1106
1446
|
};
|
|
1107
1447
|
export {
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
E,
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1448
|
+
ft as B,
|
|
1449
|
+
pt as C,
|
|
1450
|
+
gt as D,
|
|
1451
|
+
it as E,
|
|
1452
|
+
lt as I,
|
|
1453
|
+
nt as T,
|
|
1454
|
+
I as V,
|
|
1455
|
+
X as a,
|
|
1456
|
+
Q as b,
|
|
1457
|
+
Y as c,
|
|
1458
|
+
J as d,
|
|
1459
|
+
$ as e,
|
|
1460
|
+
mt as f,
|
|
1461
|
+
ut as g,
|
|
1462
|
+
ht as h,
|
|
1463
|
+
ct as i,
|
|
1464
|
+
rt as j,
|
|
1465
|
+
dt as k,
|
|
1466
|
+
f as l,
|
|
1467
|
+
vt as m,
|
|
1468
|
+
Z as n,
|
|
1469
|
+
at as o,
|
|
1470
|
+
st as p,
|
|
1471
|
+
R as q,
|
|
1472
|
+
G as r,
|
|
1473
|
+
kt as u
|
|
1133
1474
|
};
|