@emailmaker/filemanager 0.10.103 → 1.1.70

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.
Files changed (37) hide show
  1. package/.build-meta.json +5 -0
  2. package/assets/image-editor/fonts/Rubik-Black.woff2 +0 -0
  3. package/assets/image-editor/fonts/Rubik-Bold.woff2 +0 -0
  4. package/assets/image-editor/fonts/Rubik-Light.woff2 +0 -0
  5. package/assets/image-editor/fonts/Rubik-Regular.woff2 +0 -0
  6. package/assets/image-editor/fonts/caveat-v23-cyrillic_latin-regular.woff2 +0 -0
  7. package/assets/image-editor/fonts/commissioner-v24-cyrillic_latin-regular.woff2 +0 -0
  8. package/assets/image-editor/fonts/inter-v20-cyrillic_latin-regular.woff2 +0 -0
  9. package/assets/image-editor/fonts/oswald-v57-cyrillic_latin-regular.woff2 +0 -0
  10. package/assets/image-editor/fonts/pacifico-v23-cyrillic_latin-regular.woff2 +0 -0
  11. package/assets/image-editor/fonts/playfair-display-v40-cyrillic_latin-regular.woff2 +0 -0
  12. package/components/PixieEditor/PixieEditor.d.ts +1 -2
  13. package/components/PixieEditor/index.d.ts +4 -1
  14. package/core.d.ts +21 -0
  15. package/core.esm.js +2727 -0
  16. package/core.js +2 -0
  17. package/{file-manager-IconsTab-Cv51TWYV.js → file-manager-IconsTab-pUKiId5k.js} +527 -519
  18. package/{file-manager-ImageCodeGenerator-DroVucLL.js → file-manager-ImageCodeGenerator-sUlzbDys.js} +118 -118
  19. package/{file-manager-JsBarcode-Cji_rnaG.js → file-manager-JsBarcode-CyaffT5b.js} +28 -29
  20. package/file-manager-PixieEditor-Doy__jUq.js +597 -0
  21. package/{file-manager-browser-CweGvoKm.js → file-manager-browser-DDyRNDQk.js} +4 -4
  22. package/{file-manager-hooks-Dg-OcR_x.js → file-manager-hooks-vqT-4jeg.js} +2593 -2397
  23. package/{file-manager-rolldown-runtime-DtPi1Y-2.js → file-manager-rolldown-runtime-DAVfCfog.js} +11 -4
  24. package/file-manager-urls-DN9gaYil.js +37 -0
  25. package/{file-manager-useMediaListEngine-ByGmaaib.js → file-manager-useMediaListEngine-BitrHuUM.js} +6 -6
  26. package/file-manager.css +1 -1
  27. package/file-manager.d.ts +2 -20
  28. package/file-manager.esm.js +2382 -3049
  29. package/file-manager.js +11 -11
  30. package/notification.d.ts +4 -4
  31. package/package.json +24 -1
  32. package/utils/iconCssVars.d.ts +12 -0
  33. package/utils/pixieEditorConfig.d.ts +38 -0
  34. package/utils/pixieEditorConfig.test.d.ts +1 -0
  35. package/utils/svgToPng.test.d.ts +1 -0
  36. package/utils/urlNormalization.d.ts +9 -0
  37. package/utils/urlNormalization.test.d.ts +1 -0
@@ -0,0 +1,597 @@
1
+ import { B as e, C as t, G as n, I as r, M as i, N as a, Q as o, T as s, X as c, _ as l, f as u, nt as ee, ut as d, w as f } from "./file-manager-hooks-vqT-4jeg.js";
2
+ import { i as p, t as te } from "./file-manager-urls-DN9gaYil.js";
3
+ import m from "react";
4
+ import { Button as h, Modal as ne } from "antd";
5
+ import { jsx as g, jsxs as re } from "react/jsx-runtime";
6
+ import { CloseOutlined as ie, HistoryOutlined as ae } from "@ant-design/icons";
7
+ import { Pixie as _ } from "pixie";
8
+ //#region packages/file-manager/src/components/PixieEditor/backgroundColor.ts
9
+ function v(e, t, n, r, i, a) {
10
+ if (t.type === "linear") {
11
+ let i = e.createLinearGradient(n + t.coords.x1, r + t.coords.y1, n + t.coords.x2, r + t.coords.y2);
12
+ return t.colorStops.forEach((e) => i.addColorStop(e.offset, e.color)), i;
13
+ }
14
+ if (t.type === "radial") {
15
+ let i = e.createRadialGradient(n + t.coords.x1, r + t.coords.y1, t.coords.r1 ?? 0, n + t.coords.x2, r + t.coords.y2, t.coords.r2 ?? 0);
16
+ return t.colorStops.forEach((e) => i.addColorStop(e.offset, e.color)), i;
17
+ }
18
+ throw Error("Unknown gradient type");
19
+ }
20
+ function y(e) {
21
+ if (!this.backgroundColor) return;
22
+ let t = this._getNonTransformedDimensions(), n = -t.x / 2, r = -t.y / 2, i = t.x, a = t.y, o = this.backgroundColor;
23
+ if (typeof o == "string" || o instanceof CanvasGradient || o instanceof CanvasPattern) e.fillStyle = o, e.fillRect(n, r, i, a);
24
+ else if (typeof o == "object" && "type" in o && (o.type === "linear" || o.type === "radial")) e.fillStyle = v(e, o, n, r, i, a), e.fillRect(n, r, i, a);
25
+ else if ("source" in o && (o.source instanceof HTMLImageElement || o.source instanceof HTMLCanvasElement)) if (o.repeat) {
26
+ let t = e.createPattern(o.source, o.repeat);
27
+ t && (e.fillStyle = t, e.fillRect(n, r, i, a));
28
+ } else e.drawImage(o.source, n, r, i, a);
29
+ this._removeShadow(e);
30
+ }
31
+ function b(e) {
32
+ if (!e.fabric) {
33
+ console.warn("Pixie fabric instance is not available");
34
+ return;
35
+ }
36
+ e.fabric.on("object:added", (e) => {
37
+ let t = e.target;
38
+ t && t.name === "text" && (t._renderBackground = y);
39
+ });
40
+ }
41
+ //#endregion
42
+ //#region packages/file-manager/src/components/PixieEditor/PixieController.tsx
43
+ var x = "fm-pixie-editor", S = new class {
44
+ constructor() {
45
+ this._container = document.createElement("div"), this._instance = null, this._container.classList.add(x), this._container.style.width = "100%", this._container.style.height = "85vh", this._container.style.minHeight = "400px";
46
+ }
47
+ get className() {
48
+ return `.${x}`;
49
+ }
50
+ get canvas() {
51
+ return this._instance?.state.canvasRef?.current;
52
+ }
53
+ get tools() {
54
+ return this._instance?.tools;
55
+ }
56
+ isLoaded() {
57
+ return !!this._instance;
58
+ }
59
+ async _setConfig(e) {
60
+ this._instance ? await this._instance.resetEditor(e) : this._instance = await _.init({
61
+ ...e,
62
+ selector: this.className
63
+ }), b(this._instance);
64
+ }
65
+ async show(e, t, n = t.firstChild) {
66
+ t.insertBefore(this._container, n), await this._setConfig(e), this._instance.open();
67
+ }
68
+ close() {
69
+ this._container.parentNode?.removeChild(this._container);
70
+ }
71
+ }(), C = (e, t = "image/png") => fetch(`data:${t};base64,${e}`).then((e) => e.blob());
72
+ function oe(e, t) {
73
+ if (e === "json") return new Blob([t], { type: "application/json" });
74
+ if (e === "svg") return new Blob([t], { type: "image/svg+xml" });
75
+ let n = `image/${e}`;
76
+ if (t.startsWith("data:")) {
77
+ let e = c(t);
78
+ return e && e.startsWith("image/") && (n = e), C(t.replace(/data:image\/[^;]+;base64,/, ""), o(n));
79
+ }
80
+ return C(t, o(n));
81
+ }
82
+ function w(e) {
83
+ return new Promise((t, n) => {
84
+ let r = new FileReader();
85
+ r.onload = () => t(r.result), r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to convert blob to data URL")), r.readAsDataURL(e);
86
+ });
87
+ }
88
+ var T = ({ visible: c, onClose: _, file: v, onSave: y, onSaveCopy: b }) => {
89
+ let { t: x } = n(), C = m.useRef(null), T = r(), se = u(), { options: E, actions: ce } = e(), { i18n: D } = n(), { config: O } = E, { setCurrentMenuFile: k } = ce, { getFileData: A, resolveFileForEditByUrl: j } = se, [M, N] = m.useState(!1), [P, F] = m.useState(null), [I, L] = m.useState(""), [R, z] = m.useState(!1), [B, V] = m.useState(!1), [H, U] = m.useState(null), W = m.useRef(!1), G = m.useRef(void 0), K = m.useRef(void 0), q = m.useRef("saveCopy"), J = m.useRef(void 0);
90
+ G.current = y, K.current = b, m.useEffect(() => {
91
+ v && !W.current && (async () => {
92
+ if (J.current !== v) {
93
+ if (typeof v == "object") {
94
+ U(v);
95
+ return;
96
+ }
97
+ J.current = v, N(!0);
98
+ try {
99
+ if (v.startsWith("data:")) U({
100
+ thumbnail: v,
101
+ saveWithoutFolder: !0
102
+ });
103
+ else {
104
+ let e = await j(v);
105
+ J.current === v && U(e);
106
+ }
107
+ } catch (e) {
108
+ console.error("Failed to load file for editor:", e), J.current === v && (J.current = null), _?.();
109
+ } finally {
110
+ N(!1);
111
+ }
112
+ }
113
+ })();
114
+ }, [
115
+ v,
116
+ _,
117
+ j
118
+ ]);
119
+ let Y = m.useCallback(async (e) => {
120
+ try {
121
+ if (typeof e.thumbnail == "string" && e.thumbnail.startsWith("data:")) return e.thumbnail;
122
+ let t = await A(e.id, !0);
123
+ if (!t) throw Error(x("Error loading image"));
124
+ return new Promise((e) => {
125
+ let n = new FileReader();
126
+ n.onload = () => e(n.result), n.readAsDataURL(t);
127
+ });
128
+ } catch (e) {
129
+ throw console.error("Error getting the image data:", e), e;
130
+ }
131
+ }, [A, x]);
132
+ m.useEffect(() => {
133
+ if (!P && c && H) {
134
+ let e = !1;
135
+ return (async () => {
136
+ N(!0);
137
+ try {
138
+ let t = await Y(H);
139
+ if (!t || typeof t != "string" || t.trim() === "") throw Error("Invalid image data: empty or null");
140
+ if (!t.startsWith("data:")) throw Error("Invalid image data: not a valid data URL");
141
+ let n = t.match(/^data:([^;]+);base64,(.+)$/);
142
+ if (!n) throw Error("Invalid image data: malformed data URL format");
143
+ let [, r, i] = n;
144
+ if (!r.startsWith("image/")) throw Error(`Invalid image data: unsupported MIME type ${r}`);
145
+ if (i.length < 10) throw Error("Invalid image data: base64 content too short");
146
+ if (!/^[A-Za-z0-9+/]+=*$/.test(i)) throw Error("Invalid image data: corrupted base64 content");
147
+ if (!e) {
148
+ F(t);
149
+ let e = f(H, "image/png");
150
+ L(e.mimeType);
151
+ }
152
+ } catch (t) {
153
+ e || (T.error({
154
+ id: "IMAGE_DOWNLOAD_FAILED",
155
+ innerException: t,
156
+ message: x("Error loading image"),
157
+ placement: "bottomRight",
158
+ data: {
159
+ itemId: H?.id ?? void 0,
160
+ itemName: H?.name ?? void 0,
161
+ folderId: H?.folderId ?? null,
162
+ thumbnail: H?.thumbnail
163
+ }
164
+ }), _?.());
165
+ } finally {
166
+ N(!1);
167
+ }
168
+ })(), () => {
169
+ e = !0;
170
+ };
171
+ }
172
+ }, [
173
+ H,
174
+ Y,
175
+ P,
176
+ _,
177
+ x,
178
+ c
179
+ ]);
180
+ let X = m.useCallback(async (e, t, n) => {
181
+ let r = await oe(n, e), i = o(r.type || `image/${n}`), a = O?.compessorUrl ?? O?.compressorUrl;
182
+ if (i.startsWith("image/")) try {
183
+ let e = await l(new File([r], t, { type: i }), {
184
+ maxSizeMB: O?.compressMaxSize,
185
+ maxWidthOrHeight: O?.compressMaxWidthOrHeight,
186
+ mimeType: i,
187
+ fileName: t,
188
+ libURL: a,
189
+ enableCompression: s(O, i)
190
+ });
191
+ r = e, i = e.type;
192
+ } catch (e) {
193
+ console.warn("Image preparation failed, using original:", e);
194
+ }
195
+ return {
196
+ blob: r,
197
+ mimeType: i,
198
+ thumbnailDataUrl: await w(r)
199
+ };
200
+ }, [O]), Z = m.useCallback(async (e, t, n, r) => {
201
+ let o = r === "save" ? G.current : K.current;
202
+ if (!H || !o) return;
203
+ let s = typeof H == "object" && H ? H : null, c = null;
204
+ try {
205
+ N(!0);
206
+ let { blob: i, mimeType: a, thumbnailDataUrl: s } = await X(e, t, n), l = {
207
+ ...H,
208
+ thumbnail: s,
209
+ size: i.size,
210
+ date: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
211
+ type: a,
212
+ folderId: H.folderId || "",
213
+ name: H.name || t,
214
+ extension: H.extension || (H.name || t).split(".").pop()?.toLowerCase() || ""
215
+ };
216
+ c = l;
217
+ let u = await o(l, {
218
+ blob: i,
219
+ mimeType: a,
220
+ thumbnail: s,
221
+ mode: r
222
+ });
223
+ if (u) return N(!1), u;
224
+ throw Error(x(r === "saveCopy" ? "Failed to save image copy" : "Failed to save changes"));
225
+ } catch (e) {
226
+ console.error("Error saving:", e);
227
+ let n = c ?? s;
228
+ if (!e?.notificationShown) {
229
+ let o = i(e), s = a(o?.code, x) ?? o?.message ?? x(r === "saveCopy" ? "Failed to save image copy" : "Error saving image");
230
+ T.error({
231
+ id: r === "saveCopy" ? "IMAGE_SAVE_COPY_FAILED" : "IMAGE_SAVE_FAILED",
232
+ message: s,
233
+ placement: "bottomRight",
234
+ data: {
235
+ itemId: n?.id ?? void 0,
236
+ itemName: n?.name ?? t,
237
+ folderId: n?.folderId ?? null,
238
+ thumbnail: n?.thumbnail
239
+ },
240
+ innerException: e
241
+ });
242
+ }
243
+ N(!1);
244
+ }
245
+ }, [
246
+ H,
247
+ T,
248
+ X,
249
+ x
250
+ ]), Q = m.useCallback(async (e) => {
251
+ if (!S.isLoaded() || !H) {
252
+ console.error("❌ Pixie instance or file is missing");
253
+ return;
254
+ }
255
+ q.current = e;
256
+ let n = H.name || "edited-image", r = f(H, I);
257
+ try {
258
+ await S.tools?.export.save(n.replace(/\.[^/.]+$/, ""), r.pixieFormat, t.QUALITY);
259
+ } catch (t) {
260
+ console.error("🎨 Error saving through the button:", t);
261
+ try {
262
+ let t = S.canvas, i = t ? t.toDataURL(r.mimeType) : null;
263
+ i && await Z(i, n, r.extension, e);
264
+ } catch (e) {
265
+ console.error("🎨 Alternative method also did not work:", e);
266
+ }
267
+ }
268
+ }, [
269
+ H,
270
+ I,
271
+ Z
272
+ ]), $ = m.useCallback(async () => {
273
+ if (!(!P || !c || !R || W.current)) try {
274
+ W.current = !0;
275
+ let e = C.current, n = 0;
276
+ for (; n < 20 && (e.clientWidth === 0 || e.clientHeight === 0);) await new Promise((e) => setTimeout(e, 50)), n++;
277
+ let r = O?.locale ? O?.locale.replace("_", "-") : "en", i = matchMedia("(prefers-color-scheme: dark)").matches ? ee : d, a = O?.theme === "system" ? i : O?.theme, o = (O?.locale || D.language || "en").split("-")[0].split("_")[0], s = (D.getResourceBundle(o, "translation") || {}).pixie || {}, c = (e) => e.split(" ").map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" "), l = {};
278
+ Object.entries(s).forEach(([e, t]) => {
279
+ let n = c(e);
280
+ l[n] = t, l[e] = t;
281
+ });
282
+ let u = { [r]: l }, p = f(H, I), m = {
283
+ selector: "#pixie-editor",
284
+ baseUrl: te(O?.baseUrl || "", O?.assetsUrl || "assets/image-editor"),
285
+ image: P,
286
+ activeLanguage: r,
287
+ languages: u,
288
+ ui: {
289
+ activeTheme: a,
290
+ mode: "inline",
291
+ forceOverlayModeOnMobile: !1,
292
+ visible: !0,
293
+ menubar: {
294
+ replaceDefaultItems: !0,
295
+ position: "top",
296
+ items: [
297
+ {
298
+ type: "undoWidget",
299
+ align: "left"
300
+ },
301
+ {
302
+ type: "zoomWidget",
303
+ align: "center",
304
+ desktopOnly: !0
305
+ },
306
+ {
307
+ type: "button",
308
+ align: "right",
309
+ desktopOnly: !0,
310
+ icon: () => /* @__PURE__ */ g(ae, { style: { fontSize: 20 } }),
311
+ action: (e) => {
312
+ e.togglePanel("history");
313
+ }
314
+ },
315
+ {
316
+ type: "button",
317
+ icon: () => /* @__PURE__ */ g(ie, { style: { fontSize: 20 } }),
318
+ align: "right",
319
+ desktopOnly: !0,
320
+ action: _
321
+ }
322
+ ]
323
+ },
324
+ nav: { position: "top" }
325
+ },
326
+ tools: {
327
+ export: {
328
+ defaultFormat: p.pixieFormat,
329
+ defaultQuality: t.QUALITY,
330
+ defaultName: H?.name?.replace(/\.[^/.]+$/, "") || "image"
331
+ },
332
+ text: {
333
+ replaceDefaultItems: !0,
334
+ defaultText: "Handwriting",
335
+ items: [
336
+ {
337
+ family: "Inter",
338
+ src: "fonts/inter-v20-cyrillic_latin-regular.woff2"
339
+ },
340
+ {
341
+ family: "Commissioner",
342
+ src: "fonts/commissioner-v24-cyrillic_latin-regular.woff2"
343
+ },
344
+ {
345
+ family: "Montserrat Light",
346
+ src: "fonts/Montserrat-Light.woff2"
347
+ },
348
+ {
349
+ family: "Montserrat Regular",
350
+ src: "fonts/Montserrat-Regular.woff2"
351
+ },
352
+ {
353
+ family: "Montserrat Bold",
354
+ src: "fonts/Montserrat-Bold.woff2"
355
+ },
356
+ {
357
+ family: "Montserrat Black",
358
+ src: "fonts/Montserrat-Black.woff2"
359
+ },
360
+ {
361
+ family: "Roboto Light",
362
+ src: "fonts/Roboto-Light.woff2"
363
+ },
364
+ {
365
+ family: "Roboto Regular",
366
+ src: "fonts/Roboto-Regular.woff2"
367
+ },
368
+ {
369
+ family: "Roboto Bold",
370
+ src: "fonts/Roboto-Bold.woff2"
371
+ },
372
+ {
373
+ family: "Roboto Black",
374
+ src: "fonts/Roboto-Black.woff2"
375
+ },
376
+ {
377
+ family: "Lato Light",
378
+ src: "fonts/Lato-Light.woff2"
379
+ },
380
+ {
381
+ family: "Lato Regular",
382
+ src: "fonts/Lato-Regular.woff2"
383
+ },
384
+ {
385
+ family: "Lato Bold",
386
+ src: "fonts/Lato-Bold.woff2"
387
+ },
388
+ {
389
+ family: "Lato Black",
390
+ src: "fonts/Lato-Black.woff2"
391
+ },
392
+ {
393
+ family: "Rubik Light",
394
+ src: "fonts/Rubik-Light.woff2"
395
+ },
396
+ {
397
+ family: "Rubik Regular",
398
+ src: "fonts/Rubik-Regular.woff2"
399
+ },
400
+ {
401
+ family: "Rubik Bold",
402
+ src: "fonts/Rubik-Bold.woff2"
403
+ },
404
+ {
405
+ family: "Rubik Black",
406
+ src: "fonts/Rubik-Black.woff2"
407
+ },
408
+ {
409
+ family: "Bebas Neue Light",
410
+ src: "fonts/BebasNeueLight.woff2"
411
+ },
412
+ {
413
+ family: "Bebas Neue Regular",
414
+ src: "fonts/BebasNeueRegular.woff2"
415
+ },
416
+ {
417
+ family: "Bebas Neue Book",
418
+ src: "fonts/BebasNeueBook.woff2"
419
+ },
420
+ {
421
+ family: "Bebas Neue Bold",
422
+ src: "fonts/BebasNeueBold.woff2"
423
+ },
424
+ {
425
+ family: "Fira Sans",
426
+ src: "fonts/fira-sans-v11-latin-ext_latin_cyrillic-regular.woff2"
427
+ },
428
+ {
429
+ family: "Lobster",
430
+ src: "fonts/Lobster.woff2"
431
+ },
432
+ {
433
+ family: "Pacifico",
434
+ src: "fonts/pacifico-v23-cyrillic_latin-regular.woff2"
435
+ },
436
+ {
437
+ family: "Playfair Display",
438
+ src: "fonts/playfair-display-v40-cyrillic_latin-regular.woff2"
439
+ },
440
+ {
441
+ family: "Oswald",
442
+ src: "fonts/oswald-v57-cyrillic_latin-regular.woff2"
443
+ },
444
+ {
445
+ family: "Caveat",
446
+ src: "fonts/caveat-v23-cyrillic_latin-regular.woff2"
447
+ }
448
+ ]
449
+ }
450
+ },
451
+ onSave: async function(e, t, n) {
452
+ try {
453
+ return N(!0), await Z(e, t, n, q.current);
454
+ } catch (e) {
455
+ throw console.error("🎨 PIXIE onSave ERROR:", e), N(!1), e;
456
+ }
457
+ }
458
+ };
459
+ try {
460
+ V(!1), await S.show(m, C.current);
461
+ let e = S.canvas;
462
+ e && e.focus(), V(!0), N(!1);
463
+ } catch (e) {
464
+ console.error("init pixie failed:", e);
465
+ }
466
+ } catch (e) {
467
+ console.error("Error initializing Pixie:", e), T.error({
468
+ id: "EDITOR_INIT_FAILED",
469
+ message: x("Error initializing editor"),
470
+ placement: "bottomRight",
471
+ innerException: e
472
+ }), W.current = !1, _?.();
473
+ }
474
+ }, [
475
+ H,
476
+ I,
477
+ P,
478
+ c,
479
+ R,
480
+ O?.locale,
481
+ O?.theme,
482
+ O?.baseUrl,
483
+ O?.assetsUrl,
484
+ _,
485
+ Z,
486
+ T,
487
+ D,
488
+ x
489
+ ]);
490
+ m.useEffect(() => {
491
+ c && P && R && $();
492
+ }, [
493
+ c,
494
+ P,
495
+ R,
496
+ $
497
+ ]), m.useEffect(() => {
498
+ if (!c) {
499
+ try {
500
+ S.close();
501
+ } catch (e) {
502
+ console.warn("Error closing Pixie:", e);
503
+ }
504
+ N(!1), F(null), L(""), W.current = !1, z(!1), V(!1);
505
+ }
506
+ return () => {
507
+ try {
508
+ S.close();
509
+ } catch (e) {
510
+ console.warn("Error closing Pixie when unmounting:", e);
511
+ }
512
+ };
513
+ }, [c]);
514
+ let le = !!H?.id && O?.features?.enableUpdateFile !== !1;
515
+ return /* @__PURE__ */ g(ne, {
516
+ title: H?.name ? x("Editing: {{name}}", { name: H.name }) : x("Editing image"),
517
+ open: c,
518
+ closeIcon: null,
519
+ onCancel: _,
520
+ afterOpenChange: (e) => z(e),
521
+ forceRender: !0,
522
+ width: "100vw",
523
+ getContainer: E.getModalContainer,
524
+ style: {
525
+ top: 0,
526
+ height: "100vh",
527
+ maxWidth: "none",
528
+ padding: 10
529
+ },
530
+ styles: { body: {
531
+ height: "85vh",
532
+ padding: 0
533
+ } },
534
+ footer: [
535
+ /* @__PURE__ */ g(h, {
536
+ onClick: _,
537
+ disabled: !R || M,
538
+ children: x("Cancel")
539
+ }, "cancel"),
540
+ /* @__PURE__ */ g(h, {
541
+ type: "primary",
542
+ onClick: () => Q("saveCopy"),
543
+ loading: M,
544
+ children: x("Save as copy and choose")
545
+ }, "save-copy"),
546
+ ...le ? [/* @__PURE__ */ g(h, {
547
+ type: "primary",
548
+ onClick: () => Q("save"),
549
+ loading: M,
550
+ children: x("Save and choose")
551
+ }, "save")] : []
552
+ ],
553
+ mask: { closable: !1 },
554
+ destroyOnHidden: !1,
555
+ afterClose: () => {
556
+ k && k("");
557
+ },
558
+ children: /* @__PURE__ */ re("div", {
559
+ ref: C,
560
+ style: {
561
+ position: "relative",
562
+ width: "100%",
563
+ height: "100%"
564
+ },
565
+ children: [c && !B ? /* @__PURE__ */ g("div", {
566
+ style: {
567
+ position: "absolute",
568
+ inset: 0,
569
+ display: "flex",
570
+ alignItems: "center",
571
+ justifyContent: "center",
572
+ background: "rgba(255,255,255,0.45)",
573
+ backdropFilter: "blur(1px)",
574
+ pointerEvents: "all",
575
+ zIndex: 10
576
+ },
577
+ children: /* @__PURE__ */ g("span", {
578
+ style: {
579
+ fontSize: 14,
580
+ color: "#555"
581
+ },
582
+ children: x("Loading editor...")
583
+ })
584
+ }) : null, M && B && /* @__PURE__ */ g(p, { style: {
585
+ position: "absolute",
586
+ top: 0,
587
+ background: "var(--em-colorBgLayout)",
588
+ zIndex: 100,
589
+ opacity: .7
590
+ } })]
591
+ })
592
+ });
593
+ };
594
+ //#endregion
595
+ export { T as PixieEditor };
596
+
597
+ //# sourceMappingURL=file-manager-PixieEditor-Doy__jUq.js.map
@@ -1,4 +1,4 @@
1
- import { t as e } from "./file-manager-rolldown-runtime-DtPi1Y-2.js";
1
+ import { t as e } from "./file-manager-rolldown-runtime-DAVfCfog.js";
2
2
  //#region node_modules/qrcode/lib/can-promise.js
3
3
  var t = /* @__PURE__ */ e(((e, t) => {
4
4
  t.exports = function() {
@@ -793,7 +793,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
793
793
  })), b = /* @__PURE__ */ e(((e, t) => {
794
794
  var n = h();
795
795
  function r(e) {
796
- this.mode = n.BYTE, this.data = typeof e == "string" ? new TextEncoder().encode(e) : new Uint8Array(e);
796
+ this.mode = n.BYTE, typeof e == "string" ? this.data = new TextEncoder().encode(e) : this.data = new Uint8Array(e);
797
797
  }
798
798
  r.getBitsLength = function(e) {
799
799
  return e * 8;
@@ -1120,7 +1120,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1120
1120
  };
1121
1121
  }
1122
1122
  e.getOptions = function(e) {
1123
- e ||= {}, e.color || (e.color = {});
1123
+ e ||= {}, e.color ||= {};
1124
1124
  let n = e.margin === void 0 || e.margin === null || e.margin < 0 ? 4 : e.margin, r = e.width && e.width >= 21 ? e.width : void 0, i = e.scale || 4;
1125
1125
  return {
1126
1126
  width: r,
@@ -1226,4 +1226,4 @@ var t = /* @__PURE__ */ e(((e, t) => {
1226
1226
  //#endregion
1227
1227
  export default O();
1228
1228
 
1229
- //# sourceMappingURL=file-manager-browser-CweGvoKm.js.map
1229
+ //# sourceMappingURL=file-manager-browser-DDyRNDQk.js.map