@scaleflex/uploader 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/success-card.d.ts +4 -0
- package/dist/components/success-card.d.ts.map +1 -1
- package/dist/define.cjs +1 -1
- package/dist/define.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{provider-browser-DbjyF_Ou.cjs → provider-browser-YA7MCWl4.cjs} +1 -1
- package/dist/{provider-browser-CMbbN8PZ.js → provider-browser-ZgbnfTHX.js} +1 -1
- package/dist/{search-provider-browser-KQs6JI8u.cjs → search-provider-browser-C0yqcOmH.cjs} +1 -1
- package/dist/{search-provider-browser-9oZjABnB.js → search-provider-browser-Dywv08pq.js} +1 -1
- package/dist/{sfx-uploader-DXyLpoIJ.cjs → sfx-uploader-D1QE07Cn.cjs} +248 -77
- package/dist/{sfx-uploader-DTfESjzm.js → sfx-uploader-DfRa5s6H.js} +365 -167
- package/dist/sfx-uploader.d.ts +3 -0
- package/dist/sfx-uploader.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LitElement as P, css as S, svg as
|
|
2
|
-
import { property as b, state as
|
|
1
|
+
import { LitElement as P, css as S, svg as M, html as l, nothing as p, render as ke } from "lit";
|
|
2
|
+
import { property as b, state as g, query as Fe } from "lit/decorators.js";
|
|
3
3
|
import { unsafeSVG as F } from "lit/directives/unsafe-svg.js";
|
|
4
|
-
import { unsafeHTML as
|
|
5
|
-
class
|
|
4
|
+
import { unsafeHTML as T } from "lit/directives/unsafe-html.js";
|
|
5
|
+
class je {
|
|
6
6
|
constructor(e) {
|
|
7
7
|
this.listeners = /* @__PURE__ */ new Set(), this._notifying = !1, this._pendingState = null, this.state = e;
|
|
8
8
|
}
|
|
@@ -49,8 +49,8 @@ function Ce(a, e) {
|
|
|
49
49
|
const i = new Map(t);
|
|
50
50
|
i.delete(e), a.setState({ files: i });
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return new
|
|
52
|
+
function Oe() {
|
|
53
|
+
return new je({
|
|
54
54
|
files: /* @__PURE__ */ new Map(),
|
|
55
55
|
queueConfig: {
|
|
56
56
|
concurrency: 3,
|
|
@@ -79,7 +79,7 @@ function je() {
|
|
|
79
79
|
isUploading: !1
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
class
|
|
82
|
+
class Me {
|
|
83
83
|
constructor(e, t) {
|
|
84
84
|
this.host = e, this.store = t, e.addController(this);
|
|
85
85
|
}
|
|
@@ -99,7 +99,7 @@ class Te {
|
|
|
99
99
|
(e = this.unsubscribe) == null || e.call(this);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Te(a, e) {
|
|
103
103
|
const t = new XMLHttpRequest();
|
|
104
104
|
let i = !1;
|
|
105
105
|
const o = `${e.apiBase.replace(/\/+$/, "")}/v4/files?folder=${encodeURIComponent(e.folder)}`;
|
|
@@ -255,8 +255,8 @@ async function Le(a, e, t, i, r, o = !1) {
|
|
|
255
255
|
if (u.status === 401)
|
|
256
256
|
throw new le();
|
|
257
257
|
if (!u.ok) {
|
|
258
|
-
const
|
|
259
|
-
throw new Error((
|
|
258
|
+
const h = await u.json().catch(() => null);
|
|
259
|
+
throw new Error((h == null ? void 0 : h.message) || `Companion upload failed (HTTP ${u.status})`);
|
|
260
260
|
}
|
|
261
261
|
return u.json();
|
|
262
262
|
}
|
|
@@ -295,18 +295,18 @@ function Ie(a, e) {
|
|
|
295
295
|
metadata: Object.keys(n).length > 0 ? n : void 0
|
|
296
296
|
}, d).then((c) => {
|
|
297
297
|
if (i) return;
|
|
298
|
-
const
|
|
298
|
+
const h = `${Ae(t.companionUrl)}/api/${c.token}`;
|
|
299
299
|
try {
|
|
300
|
-
r = new WebSocket(
|
|
300
|
+
r = new WebSocket(h);
|
|
301
301
|
} catch {
|
|
302
302
|
e.onError(new Error("Failed to connect to upload progress channel"));
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
r.onmessage = (
|
|
305
|
+
r.onmessage = (x) => {
|
|
306
306
|
var f, m, _;
|
|
307
307
|
if (!i)
|
|
308
308
|
try {
|
|
309
|
-
const w = JSON.parse(
|
|
309
|
+
const w = JSON.parse(x.data);
|
|
310
310
|
switch (w.action) {
|
|
311
311
|
case "progress": {
|
|
312
312
|
const y = w.payload, k = y.bytesUploaded ?? 0, D = y.bytesTotal ?? (t.size || 1);
|
|
@@ -466,17 +466,17 @@ class He {
|
|
|
466
466
|
onComplete: (d) => this.handleComplete(e.id, d),
|
|
467
467
|
onError: (d) => this.handleError(e.id, d)
|
|
468
468
|
}, s = (d, c) => {
|
|
469
|
-
const u = Date.now(),
|
|
470
|
-
if (
|
|
471
|
-
const f = (d - t) /
|
|
469
|
+
const u = Date.now(), h = (u - i) / 1e3;
|
|
470
|
+
if (h > 0) {
|
|
471
|
+
const f = (d - t) / h;
|
|
472
472
|
r = r === 0 ? f : 0.3 * f + 0.7 * r;
|
|
473
473
|
}
|
|
474
474
|
t = d, i = u;
|
|
475
|
-
const
|
|
476
|
-
z(this.store, e.id, { progress:
|
|
475
|
+
const x = c > 0 ? Math.min(d / c * 100, 100) : 0;
|
|
476
|
+
z(this.store, e.id, { progress: x, bytesUploaded: d, speed: r }), this.updateTotalProgress();
|
|
477
477
|
};
|
|
478
478
|
let n;
|
|
479
|
-
e.remoteInfo ? n = Ie(e, { ...o, onProgress: s }) : e.remoteUrl ? n = Be(e, o) : n =
|
|
479
|
+
e.remoteInfo ? n = Ie(e, { ...o, onProgress: s }) : e.remoteUrl ? n = Be(e, o) : n = Te(e, { ...o, onProgress: s }), this.activeUploads.set(e.id, n);
|
|
480
480
|
}
|
|
481
481
|
handleComplete(e, t) {
|
|
482
482
|
this.activeUploads.delete(e), z(this.store, e, {
|
|
@@ -790,7 +790,7 @@ const et = '<rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21
|
|
|
790
790
|
${this.sources.map(
|
|
791
791
|
(e) => l`
|
|
792
792
|
<button @click=${() => this._handleClick(e)}>
|
|
793
|
-
${e.brandHtml ?
|
|
793
|
+
${e.brandHtml ? T(e.brandHtml) : M`<svg viewBox="0 0 24 24" class=${e.fillIcon ? "fill-icon" : ""}>${F(e.icon)}</svg>`}
|
|
794
794
|
${e.label}
|
|
795
795
|
</button>
|
|
796
796
|
`
|
|
@@ -875,7 +875,7 @@ let ae = fe;
|
|
|
875
875
|
Qe([
|
|
876
876
|
b({ type: Array })
|
|
877
877
|
], ae.prototype, "sources");
|
|
878
|
-
var ot = Object.defineProperty,
|
|
878
|
+
var ot = Object.defineProperty, j = (a, e, t, i) => {
|
|
879
879
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
880
880
|
(s = a[o]) && (r = s(e, t, r) || r);
|
|
881
881
|
return r && ot(e, t, r), r;
|
|
@@ -953,8 +953,8 @@ const Ue = 3, ue = class ue extends P {
|
|
|
953
953
|
}
|
|
954
954
|
/** Position the fixed dropdown, choosing above or below based on available space. */
|
|
955
955
|
_positionDropdown() {
|
|
956
|
-
var
|
|
957
|
-
const e = (
|
|
956
|
+
var h, x;
|
|
957
|
+
const e = (h = this.shadowRoot) == null ? void 0 : h.querySelector(".more-wrap > button"), t = (x = this.shadowRoot) == null ? void 0 : x.querySelector(".more-dropdown");
|
|
958
958
|
if (!e || !t) return;
|
|
959
959
|
const i = e.getBoundingClientRect(), r = 8, o = t.scrollHeight, s = t.offsetWidth, n = i.top, d = window.innerHeight - i.bottom;
|
|
960
960
|
n >= o + r || n > d ? (t.classList.add("above"), t.classList.remove("below"), t.style.top = `${i.top - o - r}px`) : (t.classList.add("below"), t.classList.remove("above"), t.style.top = `${i.bottom + r}px`);
|
|
@@ -985,8 +985,8 @@ const Ue = 3, ue = class ue extends P {
|
|
|
985
985
|
t.stopPropagation(), this._onSourceIconClick(e);
|
|
986
986
|
}}
|
|
987
987
|
>
|
|
988
|
-
${e.brandHtml ?
|
|
989
|
-
${
|
|
988
|
+
${e.brandHtml ? T(e.brandHtml) : l`<span class="pill-ico" style=${e.iconColor ? `color:${e.iconColor}` : ""}>
|
|
989
|
+
${M`<svg viewBox="0 0 24 24" class=${e.fillIcon ? "fill-icon" : ""}>${F(e.icon)}</svg>`}
|
|
990
990
|
</span>`}
|
|
991
991
|
${e.label}
|
|
992
992
|
</button>
|
|
@@ -1001,8 +1001,8 @@ const Ue = 3, ue = class ue extends P {
|
|
|
1001
1001
|
t.stopPropagation(), this._onSourceIconClick(e);
|
|
1002
1002
|
}}
|
|
1003
1003
|
>
|
|
1004
|
-
${e.brandHtml ? l`<span class="card-ico">${
|
|
1005
|
-
${
|
|
1004
|
+
${e.brandHtml ? l`<span class="card-ico">${T(e.brandHtml)}</span>` : l`<span class="card-ico" style=${e.iconColor ? `color:${e.iconColor}` : ""}>
|
|
1005
|
+
${M`<svg viewBox="0 0 24 24" class=${e.fillIcon ? "fill-icon" : ""}>${F(e.icon)}</svg>`}
|
|
1006
1006
|
</span>`}
|
|
1007
1007
|
<span class="card-label">${e.label}</span>
|
|
1008
1008
|
</button>
|
|
@@ -1026,7 +1026,7 @@ const Ue = 3, ue = class ue extends P {
|
|
|
1026
1026
|
(t) => l`
|
|
1027
1027
|
<button class="more-item" @click=${(i) => this._onMoreItemClick(t, i)}>
|
|
1028
1028
|
<div class="more-item-ico">
|
|
1029
|
-
${t.brandHtml ?
|
|
1029
|
+
${t.brandHtml ? T(t.brandHtml) : t.iconColor ? l`<svg viewBox="0 0 24 24" style="color:${t.iconColor}">${F(t.icon)}</svg>` : M`<svg viewBox="0 0 24 24">${F(t.icon)}</svg>`}
|
|
1030
1030
|
</div>
|
|
1031
1031
|
${t.label}
|
|
1032
1032
|
</button>
|
|
@@ -1048,7 +1048,7 @@ const Ue = 3, ue = class ue extends P {
|
|
|
1048
1048
|
(t) => l`
|
|
1049
1049
|
<button class="more-item" @click=${(i) => this._onMoreItemClick(t, i)}>
|
|
1050
1050
|
<div class="more-item-ico">
|
|
1051
|
-
${t.brandHtml ?
|
|
1051
|
+
${t.brandHtml ? T(t.brandHtml) : t.iconColor ? l`<svg viewBox="0 0 24 24" style="color:${t.iconColor}">${F(t.icon)}</svg>` : M`<svg viewBox="0 0 24 24">${F(t.icon)}</svg>`}
|
|
1052
1052
|
</div>
|
|
1053
1053
|
${t.label}
|
|
1054
1054
|
</button>
|
|
@@ -1123,7 +1123,7 @@ const Ue = 3, ue = class ue extends P {
|
|
|
1123
1123
|
o.stopPropagation(), this._onSourceIconClick(r);
|
|
1124
1124
|
}}
|
|
1125
1125
|
>
|
|
1126
|
-
${r.brandHtml ?
|
|
1126
|
+
${r.brandHtml ? T(r.brandHtml) : M`<svg viewBox="0 0 24 24" class=${r.fillIcon ? "fill-icon" : ""}>${F(r.icon)}</svg>`}
|
|
1127
1127
|
</button>
|
|
1128
1128
|
`
|
|
1129
1129
|
)}
|
|
@@ -1925,34 +1925,34 @@ ue.styles = S`
|
|
|
1925
1925
|
}
|
|
1926
1926
|
`;
|
|
1927
1927
|
let U = ue;
|
|
1928
|
-
|
|
1928
|
+
j([
|
|
1929
1929
|
b({ type: Boolean, reflect: !0 })
|
|
1930
1930
|
], U.prototype, "compact");
|
|
1931
|
-
|
|
1931
|
+
j([
|
|
1932
1932
|
b({ type: Boolean, attribute: "external-drag-over" })
|
|
1933
1933
|
], U.prototype, "externalDragOver");
|
|
1934
|
-
|
|
1934
|
+
j([
|
|
1935
1935
|
b({ type: String })
|
|
1936
1936
|
], U.prototype, "accept");
|
|
1937
|
-
|
|
1937
|
+
j([
|
|
1938
1938
|
b({ type: Array })
|
|
1939
1939
|
], U.prototype, "sources");
|
|
1940
|
-
|
|
1940
|
+
j([
|
|
1941
1941
|
b({ type: String, attribute: "sources-layout" })
|
|
1942
1942
|
], U.prototype, "sourcesLayout");
|
|
1943
|
-
|
|
1944
|
-
|
|
1943
|
+
j([
|
|
1944
|
+
g()
|
|
1945
1945
|
], U.prototype, "_dragOver");
|
|
1946
|
-
|
|
1947
|
-
|
|
1946
|
+
j([
|
|
1947
|
+
g()
|
|
1948
1948
|
], U.prototype, "_moreOpen");
|
|
1949
|
-
|
|
1950
|
-
|
|
1949
|
+
j([
|
|
1950
|
+
g()
|
|
1951
1951
|
], U.prototype, "_visiblePills");
|
|
1952
|
-
|
|
1952
|
+
j([
|
|
1953
1953
|
Fe(".ripple")
|
|
1954
1954
|
], U.prototype, "_rippleEl");
|
|
1955
|
-
|
|
1955
|
+
j([
|
|
1956
1956
|
Fe('input[type="file"]')
|
|
1957
1957
|
], U.prototype, "fileInput");
|
|
1958
1958
|
const he = class he extends P {
|
|
@@ -2050,7 +2050,7 @@ const xe = class xe extends P {
|
|
|
2050
2050
|
title=${r.label}
|
|
2051
2051
|
@click=${(o) => this._onSourceClick(o, r)}
|
|
2052
2052
|
>
|
|
2053
|
-
${r.brandHtml ?
|
|
2053
|
+
${r.brandHtml ? T(r.brandHtml) : M`<svg viewBox="0 0 24 24" class=${r.fillIcon ? "fill-icon" : ""}>${F(r.icon)}</svg>`}
|
|
2054
2054
|
</button>
|
|
2055
2055
|
`)}
|
|
2056
2056
|
${i.length > 0 ? l`
|
|
@@ -2064,7 +2064,7 @@ const xe = class xe extends P {
|
|
|
2064
2064
|
@click=${(o) => this._onMoreSourceClick(o, r)}
|
|
2065
2065
|
>
|
|
2066
2066
|
<span class="more-dropdown-ico" style=${r.iconColor && !r.brandHtml ? `color:${r.iconColor}` : ""}>
|
|
2067
|
-
${r.brandHtml ?
|
|
2067
|
+
${r.brandHtml ? T(r.brandHtml) : M`<svg viewBox="0 0 24 24" class=${r.fillIcon ? "fill-icon" : ""}>${F(r.icon)}</svg>`}
|
|
2068
2068
|
</span>
|
|
2069
2069
|
${r.label}
|
|
2070
2070
|
</button>
|
|
@@ -2123,7 +2123,7 @@ xe.styles = S`
|
|
|
2123
2123
|
display: grid;
|
|
2124
2124
|
grid-template-columns: repeat(auto-fill, minmax(var(--sfx-up-grid-min, max(24%, 140px)), 1fr));
|
|
2125
2125
|
gap: 12px;
|
|
2126
|
-
padding:
|
|
2126
|
+
padding: 0 12px 16px 16px;
|
|
2127
2127
|
}
|
|
2128
2128
|
|
|
2129
2129
|
@media (max-width: 480px) {
|
|
@@ -2406,7 +2406,7 @@ Z([
|
|
|
2406
2406
|
b({ type: String })
|
|
2407
2407
|
], B.prototype, "accept");
|
|
2408
2408
|
Z([
|
|
2409
|
-
|
|
2409
|
+
g()
|
|
2410
2410
|
], B.prototype, "_moreOpen");
|
|
2411
2411
|
var at = Object.defineProperty, nt = (a, e, t, i) => {
|
|
2412
2412
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
@@ -3021,9 +3021,27 @@ const Pe = 7, ve = class ve extends P {
|
|
|
3021
3021
|
new CustomEvent("primary-action", { bubbles: !0, composed: !0 })
|
|
3022
3022
|
);
|
|
3023
3023
|
}
|
|
3024
|
+
_retryFile(e) {
|
|
3025
|
+
this.dispatchEvent(
|
|
3026
|
+
new CustomEvent("file-retry", { bubbles: !0, composed: !0, detail: { fileId: e } })
|
|
3027
|
+
);
|
|
3028
|
+
}
|
|
3029
|
+
_retryAll() {
|
|
3030
|
+
this.dispatchEvent(
|
|
3031
|
+
new CustomEvent("retry-all", { bubbles: !0, composed: !0 })
|
|
3032
|
+
);
|
|
3033
|
+
}
|
|
3034
|
+
_close() {
|
|
3035
|
+
this.dispatchEvent(
|
|
3036
|
+
new CustomEvent("close-uploader", { bubbles: !0, composed: !0 })
|
|
3037
|
+
);
|
|
3038
|
+
}
|
|
3024
3039
|
render() {
|
|
3025
3040
|
const e = this.thumbnails.slice(0, Pe), t = this.thumbnails.length - Pe, i = this.fileCount > 0, r = this.failedFiles.length > 0, o = r && !i;
|
|
3026
3041
|
return l`
|
|
3042
|
+
<button class="close-btn" title="Close" @click=${this._close}>
|
|
3043
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
3044
|
+
</button>
|
|
3027
3045
|
<div class="card" role="status" aria-live="polite">
|
|
3028
3046
|
<div class="icon ${o ? "error" : r ? "warning" : ""}">
|
|
3029
3047
|
${o ? l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -3057,6 +3075,9 @@ const Pe = 7, ve = class ve extends P {
|
|
|
3057
3075
|
<div class="failed-name">${s.name}</div>
|
|
3058
3076
|
<div class="failed-reason">${s.error}</div>
|
|
3059
3077
|
</div>
|
|
3078
|
+
<button class="failed-retry" title="Retry" @click=${() => this._retryFile(s.id)}>
|
|
3079
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 2v6h-6"/><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M3 22v-6h6"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/></svg>
|
|
3080
|
+
</button>
|
|
3060
3081
|
</div>
|
|
3061
3082
|
`)}
|
|
3062
3083
|
</div>
|
|
@@ -3064,6 +3085,7 @@ const Pe = 7, ve = class ve extends P {
|
|
|
3064
3085
|
|
|
3065
3086
|
<div class="actions">
|
|
3066
3087
|
<button class="btn-ghost" @click=${this._uploadMore}>Upload more</button>
|
|
3088
|
+
${r ? l`<button class="btn-retry-all" @click=${this._retryAll}>Retry all (${this.failedFiles.length})</button>` : p}
|
|
3067
3089
|
<button class="btn-primary" @click=${this._primaryAction}>${this.primaryLabel}</button>
|
|
3068
3090
|
</div>
|
|
3069
3091
|
</div>
|
|
@@ -3076,7 +3098,9 @@ ve.styles = [J, G, S`
|
|
|
3076
3098
|
flex: 1;
|
|
3077
3099
|
justify-content: center;
|
|
3078
3100
|
align-items: center;
|
|
3079
|
-
padding
|
|
3101
|
+
padding: 24px 0;
|
|
3102
|
+
position: relative;
|
|
3103
|
+
overflow-y: auto;
|
|
3080
3104
|
}
|
|
3081
3105
|
|
|
3082
3106
|
.card {
|
|
@@ -3191,20 +3215,43 @@ ve.styles = [J, G, S`
|
|
|
3191
3215
|
/* --- Failed files list --- */
|
|
3192
3216
|
.failed-list {
|
|
3193
3217
|
width: 100%;
|
|
3194
|
-
max-width:
|
|
3218
|
+
max-width: 400px;
|
|
3219
|
+
max-height: 200px;
|
|
3195
3220
|
margin-bottom: 20px;
|
|
3196
3221
|
border-radius: 8px;
|
|
3197
3222
|
border: 1px solid var(--sfx-up-border, #e8eaed);
|
|
3198
|
-
overflow:
|
|
3223
|
+
overflow-y: auto;
|
|
3224
|
+
overflow-x: hidden;
|
|
3225
|
+
scrollbar-width: thin;
|
|
3226
|
+
scrollbar-color: rgba(0,0,0,0.15) transparent;
|
|
3227
|
+
}
|
|
3228
|
+
|
|
3229
|
+
.failed-list::-webkit-scrollbar {
|
|
3230
|
+
width: 6px;
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
.failed-list::-webkit-scrollbar-track {
|
|
3234
|
+
background: transparent;
|
|
3235
|
+
margin: 6px 0;
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
.failed-list::-webkit-scrollbar-thumb {
|
|
3239
|
+
background: rgba(0,0,0,0.15);
|
|
3240
|
+
border-radius: 3px;
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
.failed-list::-webkit-scrollbar-thumb:hover {
|
|
3244
|
+
background: rgba(0,0,0,0.25);
|
|
3199
3245
|
}
|
|
3200
3246
|
|
|
3201
3247
|
.failed-item {
|
|
3202
3248
|
display: flex;
|
|
3203
|
-
align-items:
|
|
3249
|
+
align-items: center;
|
|
3204
3250
|
gap: 8px;
|
|
3205
3251
|
padding: 8px 12px;
|
|
3206
|
-
border-bottom: 1px solid var(--sfx-up-border, #f1f5f9);
|
|
3207
3252
|
text-align: left;
|
|
3253
|
+
border-bottom: 1px solid var(--sfx-up-border, #f1f5f9);
|
|
3254
|
+
margin-right: 8px;
|
|
3208
3255
|
}
|
|
3209
3256
|
|
|
3210
3257
|
.failed-item:last-child {
|
|
@@ -3239,6 +3286,62 @@ ve.styles = [J, G, S`
|
|
|
3239
3286
|
line-height: 1.4;
|
|
3240
3287
|
}
|
|
3241
3288
|
|
|
3289
|
+
.failed-retry {
|
|
3290
|
+
width: 24px;
|
|
3291
|
+
height: 24px;
|
|
3292
|
+
border: none;
|
|
3293
|
+
background: none;
|
|
3294
|
+
color: var(--sfx-up-primary, #2563eb);
|
|
3295
|
+
cursor: pointer;
|
|
3296
|
+
padding: 4px;
|
|
3297
|
+
flex-shrink: 0;
|
|
3298
|
+
display: flex;
|
|
3299
|
+
align-items: center;
|
|
3300
|
+
justify-content: center;
|
|
3301
|
+
border-radius: 4px;
|
|
3302
|
+
margin-top: -2px;
|
|
3303
|
+
}
|
|
3304
|
+
|
|
3305
|
+
.failed-retry svg { width: 14px; height: 14px; }
|
|
3306
|
+
|
|
3307
|
+
.failed-retry:hover { background: var(--sfx-up-surface, #f8fafc); color: var(--sfx-up-primary-hover, #1d4ed8); }
|
|
3308
|
+
|
|
3309
|
+
.close-btn {
|
|
3310
|
+
position: absolute;
|
|
3311
|
+
top: 12px;
|
|
3312
|
+
right: 12px;
|
|
3313
|
+
width: 28px;
|
|
3314
|
+
height: 28px;
|
|
3315
|
+
border: none;
|
|
3316
|
+
background: none;
|
|
3317
|
+
color: var(--sfx-up-text-muted, #94a3b8);
|
|
3318
|
+
cursor: pointer;
|
|
3319
|
+
display: flex;
|
|
3320
|
+
align-items: center;
|
|
3321
|
+
justify-content: center;
|
|
3322
|
+
border-radius: 6px;
|
|
3323
|
+
padding: 0;
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
.close-btn svg { width: 16px; height: 16px; }
|
|
3327
|
+
|
|
3328
|
+
.close-btn:hover { background: var(--sfx-up-surface, #f8fafc); color: var(--sfx-up-text, #1e293b); }
|
|
3329
|
+
|
|
3330
|
+
.btn-retry-all {
|
|
3331
|
+
padding: 8px 18px;
|
|
3332
|
+
border-radius: 8px;
|
|
3333
|
+
font-size: 13px;
|
|
3334
|
+
font-weight: 500;
|
|
3335
|
+
border: 1px solid var(--sfx-up-primary, #2563eb);
|
|
3336
|
+
background: #fff;
|
|
3337
|
+
color: var(--sfx-up-primary, #2563eb);
|
|
3338
|
+
cursor: pointer;
|
|
3339
|
+
}
|
|
3340
|
+
|
|
3341
|
+
.btn-retry-all:hover {
|
|
3342
|
+
background: var(--sfx-up-primary-bg, #eff6ff);
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3242
3345
|
@keyframes fadeUp {
|
|
3243
3346
|
from {
|
|
3244
3347
|
opacity: 0;
|
|
@@ -3541,28 +3644,28 @@ be.styles = [J, G, S`
|
|
|
3541
3644
|
.btn-spin { animation: none; }
|
|
3542
3645
|
}
|
|
3543
3646
|
`];
|
|
3544
|
-
let
|
|
3647
|
+
let O = be;
|
|
3545
3648
|
A([
|
|
3546
3649
|
b({ type: String })
|
|
3547
|
-
],
|
|
3650
|
+
], O.prototype, "uploadState");
|
|
3548
3651
|
A([
|
|
3549
3652
|
b({ type: Number })
|
|
3550
|
-
],
|
|
3653
|
+
], O.prototype, "fileCount");
|
|
3551
3654
|
A([
|
|
3552
3655
|
b({ type: Number })
|
|
3553
|
-
],
|
|
3656
|
+
], O.prototype, "totalSize");
|
|
3554
3657
|
A([
|
|
3555
3658
|
b({ type: Number })
|
|
3556
|
-
],
|
|
3659
|
+
], O.prototype, "failedCount");
|
|
3557
3660
|
A([
|
|
3558
3661
|
b({ type: Boolean })
|
|
3559
|
-
],
|
|
3662
|
+
], O.prototype, "showFillMetadata");
|
|
3560
3663
|
A([
|
|
3561
3664
|
b({ type: Number })
|
|
3562
|
-
],
|
|
3665
|
+
], O.prototype, "completedCount");
|
|
3563
3666
|
A([
|
|
3564
3667
|
b({ type: Number })
|
|
3565
|
-
],
|
|
3668
|
+
], O.prototype, "uploadProgress");
|
|
3566
3669
|
const ct = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
3567
3670
|
function ce(a, e) {
|
|
3568
3671
|
return (t) => {
|
|
@@ -3869,13 +3972,13 @@ me.styles = [J, G, S`
|
|
|
3869
3972
|
`];
|
|
3870
3973
|
let W = me;
|
|
3871
3974
|
pe([
|
|
3872
|
-
|
|
3975
|
+
g()
|
|
3873
3976
|
], W.prototype, "_url");
|
|
3874
3977
|
pe([
|
|
3875
|
-
|
|
3978
|
+
g()
|
|
3876
3979
|
], W.prototype, "_name");
|
|
3877
3980
|
pe([
|
|
3878
|
-
|
|
3981
|
+
g()
|
|
3879
3982
|
], W.prototype, "_error");
|
|
3880
3983
|
var ft = Object.defineProperty, re = (a, e, t, i) => {
|
|
3881
3984
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
@@ -4043,16 +4146,16 @@ we.styles = [J, G, S`
|
|
|
4043
4146
|
`];
|
|
4044
4147
|
let q = we;
|
|
4045
4148
|
re([
|
|
4046
|
-
|
|
4149
|
+
g()
|
|
4047
4150
|
], q.prototype, "_stream");
|
|
4048
4151
|
re([
|
|
4049
|
-
|
|
4152
|
+
g()
|
|
4050
4153
|
], q.prototype, "_error");
|
|
4051
4154
|
re([
|
|
4052
|
-
|
|
4155
|
+
g()
|
|
4053
4156
|
], q.prototype, "_captured");
|
|
4054
4157
|
re([
|
|
4055
|
-
|
|
4158
|
+
g()
|
|
4056
4159
|
], q.prototype, "_previewUrl");
|
|
4057
4160
|
var ut = Object.defineProperty, ee = (a, e, t, i) => {
|
|
4058
4161
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
@@ -4259,19 +4362,19 @@ ye.styles = [J, G, S`
|
|
|
4259
4362
|
`];
|
|
4260
4363
|
let L = ye;
|
|
4261
4364
|
ee([
|
|
4262
|
-
|
|
4365
|
+
g()
|
|
4263
4366
|
], L.prototype, "_stream");
|
|
4264
4367
|
ee([
|
|
4265
|
-
|
|
4368
|
+
g()
|
|
4266
4369
|
], L.prototype, "_recording");
|
|
4267
4370
|
ee([
|
|
4268
|
-
|
|
4371
|
+
g()
|
|
4269
4372
|
], L.prototype, "_error");
|
|
4270
4373
|
ee([
|
|
4271
|
-
|
|
4374
|
+
g()
|
|
4272
4375
|
], L.prototype, "_recordedBlob");
|
|
4273
4376
|
ee([
|
|
4274
|
-
|
|
4377
|
+
g()
|
|
4275
4378
|
], L.prototype, "_previewUrl");
|
|
4276
4379
|
var ht = Object.defineProperty, $ = (a, e, t, i) => {
|
|
4277
4380
|
for (var r = void 0, o = a.length - 1, s; o >= 0; o--)
|
|
@@ -4319,17 +4422,17 @@ const C = (E = class extends P {
|
|
|
4319
4422
|
if ((((o = (r = this.config) == null ? void 0 : r.connectors) == null ? void 0 : o.providers) ?? []).includes(e)) {
|
|
4320
4423
|
if (De.has(e)) {
|
|
4321
4424
|
if (!customElements.get("sfx-search-provider-browser")) {
|
|
4322
|
-
const { SfxSearchProviderBrowser: n } = await import("./search-provider-browser-
|
|
4425
|
+
const { SfxSearchProviderBrowser: n } = await import("./search-provider-browser-Dywv08pq.js");
|
|
4323
4426
|
customElements.define("sfx-search-provider-browser", n);
|
|
4324
4427
|
}
|
|
4325
4428
|
} else if (!customElements.get("sfx-provider-browser")) {
|
|
4326
|
-
const { SfxProviderBrowser: n } = await import("./provider-browser-
|
|
4429
|
+
const { SfxProviderBrowser: n } = await import("./provider-browser-ZgbnfTHX.js");
|
|
4327
4430
|
customElements.define("sfx-provider-browser", n);
|
|
4328
4431
|
}
|
|
4329
4432
|
this._activeConnector = e;
|
|
4330
4433
|
}
|
|
4331
4434
|
}, this._onUrlSubmit = (e) => {
|
|
4332
|
-
var u,
|
|
4435
|
+
var u, h, x;
|
|
4333
4436
|
this._showUrlDialog = !1;
|
|
4334
4437
|
const { url: t, name: i } = e.detail, r = (u = this.config) == null ? void 0 : u.callbacks, o = We(i), s = o.startsWith("image/"), n = this._store.getState(), d = se({ name: i, size: 0, type: o }, n.restrictions, n.files);
|
|
4335
4438
|
if (d) {
|
|
@@ -4354,7 +4457,7 @@ const C = (E = class extends P {
|
|
|
4354
4457
|
tags: [],
|
|
4355
4458
|
remoteInfo: null
|
|
4356
4459
|
};
|
|
4357
|
-
I(this._store, f), this._dispatchPublic(v.FILE_REJECTED, { file: f, reason: d }), (
|
|
4460
|
+
I(this._store, f), this._dispatchPublic(v.FILE_REJECTED, { file: f, reason: d }), (h = r == null ? void 0 : r.onFileRejected) == null || h.call(r, f, d);
|
|
4358
4461
|
return;
|
|
4359
4462
|
}
|
|
4360
4463
|
const c = {
|
|
@@ -4378,7 +4481,7 @@ const C = (E = class extends P {
|
|
|
4378
4481
|
tags: [],
|
|
4379
4482
|
remoteInfo: null
|
|
4380
4483
|
};
|
|
4381
|
-
I(this._store, c), this._dispatchPublic(v.FILE_ADDED, { file: c }), (
|
|
4484
|
+
I(this._store, c), this._dispatchPublic(v.FILE_ADDED, { file: c }), (x = r == null ? void 0 : r.onFileAdded) == null || x.call(r, c), this._store.getState().queueConfig.autoProceed && this.upload();
|
|
4382
4485
|
}, this._onUrlCancel = () => {
|
|
4383
4486
|
this._showUrlDialog = !1;
|
|
4384
4487
|
}, this._onCameraCapture = (e) => {
|
|
@@ -4510,15 +4613,21 @@ const C = (E = class extends P {
|
|
|
4510
4613
|
}, this._onInlineDismiss = () => {
|
|
4511
4614
|
var e, t, i;
|
|
4512
4615
|
(i = (t = (e = this.config) == null ? void 0 : e.callbacks) == null ? void 0 : t.onCancel) == null || i.call(t), this._dispatchPublic(v.CANCEL, {});
|
|
4616
|
+
}, this._onSuccessCardClose = () => {
|
|
4617
|
+
var e, t, i, r;
|
|
4618
|
+
((e = this.config) == null ? void 0 : e.mode) === "inline" ? (this._dispatchPublic(v.COMPLETE_ACTION, {}), (r = (i = (t = this.config) == null ? void 0 : t.callbacks) == null ? void 0 : i.onCompleteAction) == null || r.call(i), this._onClearAll()) : this._onModalDismiss();
|
|
4513
4619
|
}, this._onModalDismiss = () => {
|
|
4514
|
-
var e, t, i;
|
|
4515
|
-
(
|
|
4620
|
+
var e, t, i, r;
|
|
4621
|
+
this._phase === "uploading" && ((e = this._engine) == null || e.cancelAll()), (r = (i = (t = this.config) == null ? void 0 : t.callbacks) == null ? void 0 : i.onCancel) == null || r.call(i), this._dispatchPublic(v.CANCEL, {}), this.close();
|
|
4516
4622
|
}, this._onMinimize = () => {
|
|
4517
4623
|
this._isMinimized = !0, this._isPillExpanded = !0, this.requestUpdate();
|
|
4518
4624
|
}, this._onPillClick = () => {
|
|
4519
4625
|
this._isPillExpanded = !this._isPillExpanded, this.requestUpdate();
|
|
4520
|
-
}, this.
|
|
4626
|
+
}, this._onPillExpand = () => {
|
|
4521
4627
|
this._isMinimized = !1, this._isPillExpanded = !1, this._isOpen = !0, this.requestUpdate();
|
|
4628
|
+
}, this._onPillDismiss = () => {
|
|
4629
|
+
var e, t, i, r;
|
|
4630
|
+
this._isMinimized = !1, this._isPillExpanded = !1, this._phase === "uploading" && ((e = this._engine) == null || e.cancelAll()), (r = (i = (t = this.config) == null ? void 0 : t.callbacks) == null ? void 0 : i.onCancel) == null || r.call(i), this._dispatchPublic(v.CANCEL, {}), this.close();
|
|
4522
4631
|
}, this._onModalBackdropClick = (e) => {
|
|
4523
4632
|
e.target === e.currentTarget && this._onModalDismiss();
|
|
4524
4633
|
}, this._onBodyDragEnter = (e) => {
|
|
@@ -4567,7 +4676,7 @@ const C = (E = class extends P {
|
|
|
4567
4676
|
(Math.abs(i) > 3 || Math.abs(r) > 3) && (this._fsDragDidMove = !0), this._fsPanX = this._fsPanStartX + i, this._fsPanY = this._fsPanStartY + r, this.requestUpdate(), e.preventDefault();
|
|
4568
4677
|
}, this._onFsClose = (e) => {
|
|
4569
4678
|
e == null || e.stopPropagation(), this._fullscreenPreviewUrl = null, this._fullscreenVideoFile = null, this._fullscreenZoomed = !1, this._fsPanX = 0, this._fsPanY = 0;
|
|
4570
|
-
}, this._store =
|
|
4679
|
+
}, this._store = Oe(), this._storeCtrl = new Me(this, this._store);
|
|
4571
4680
|
}
|
|
4572
4681
|
// --- Public API ---
|
|
4573
4682
|
/** Open the uploader (modal mode). */
|
|
@@ -4582,13 +4691,13 @@ const C = (E = class extends P {
|
|
|
4582
4691
|
}
|
|
4583
4692
|
/** Start uploading all queued files. */
|
|
4584
4693
|
upload() {
|
|
4585
|
-
var r, o, s, n, d;
|
|
4694
|
+
var r, o, s, n, d, c, u;
|
|
4586
4695
|
if (this._ensureEngine(), !this._engine) {
|
|
4587
4696
|
console.warn("[sfx-uploader] Cannot upload: auth not resolved yet");
|
|
4588
4697
|
return;
|
|
4589
4698
|
}
|
|
4590
4699
|
const e = [...this._store.getState().files.values()].filter(
|
|
4591
|
-
(
|
|
4700
|
+
(h) => h.status === "idle" || h.status === "queued"
|
|
4592
4701
|
);
|
|
4593
4702
|
if ((o = (r = this.config) == null ? void 0 : r.callbacks) != null && o.onBeforeUpload && this.config.callbacks.onBeforeUpload(e) === !1)
|
|
4594
4703
|
return;
|
|
@@ -4598,7 +4707,7 @@ const C = (E = class extends P {
|
|
|
4598
4707
|
cancelable: !0,
|
|
4599
4708
|
detail: { files: e }
|
|
4600
4709
|
});
|
|
4601
|
-
this.dispatchEvent(t) && (this._dispatchPublic(v.UPLOAD_STARTED, { files: e }), (d = (n = (s = this.config) == null ? void 0 : s.callbacks) == null ? void 0 : n.onUploadStarted) == null || d.call(n, e), this._engine.uploadAll());
|
|
4710
|
+
this.dispatchEvent(t) && (this._dispatchPublic(v.UPLOAD_STARTED, { files: e }), (d = (n = (s = this.config) == null ? void 0 : s.callbacks) == null ? void 0 : n.onUploadStarted) == null || d.call(n, e), this._engine.uploadAll(), (c = this.config) != null && c.minimizeOnUpload && ((u = this.config) == null ? void 0 : u.mode) !== "inline" && (this._isMinimized = !0, this._isPillExpanded = !0, this.requestUpdate()));
|
|
4602
4711
|
}
|
|
4603
4712
|
/** Programmatically add files. */
|
|
4604
4713
|
addFiles(e) {
|
|
@@ -4670,13 +4779,14 @@ const C = (E = class extends P {
|
|
|
4670
4779
|
if (document.querySelector("style[data-sfx-upload-float-styles]")) return;
|
|
4671
4780
|
const e = document.createElement("style");
|
|
4672
4781
|
e.setAttribute("data-sfx-upload-float-styles", ""), e.textContent = `
|
|
4673
|
-
[data-sfx-upload-float] .upload-float { position:fixed; bottom:24px; right:24px; z-index:10000; width:
|
|
4782
|
+
[data-sfx-upload-float] .upload-float { position:fixed; bottom:24px; right:24px; z-index:10000; width:470px; border-radius:12px; background:#fff; box-shadow:0 8px 32px rgba(0,0,0,0.12),0 2px 8px rgba(0,0,0,0.06); overflow:hidden; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; animation:sfxFloatIn .3s ease both; }
|
|
4674
4783
|
[data-sfx-upload-float] .float-header { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid #e8edf5; }
|
|
4675
4784
|
[data-sfx-upload-float] .float-header-left { display:flex; align-items:center; gap:8px; }
|
|
4676
4785
|
[data-sfx-upload-float] .float-icon { width:28px; height:28px; border-radius:6px; background:#eff6ff; color:#2563eb; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
|
|
4677
4786
|
[data-sfx-upload-float] .float-icon svg { width:14px; height:14px; }
|
|
4678
4787
|
[data-sfx-upload-float] .float-icon.done { background:#f0fdf4; color:#22c55e; }
|
|
4679
4788
|
[data-sfx-upload-float] .float-icon.warn { background:#fffbeb; color:#f59e0b; }
|
|
4789
|
+
[data-sfx-upload-float] .float-icon.error { background:#fef2f2; color:#ef4444; }
|
|
4680
4790
|
[data-sfx-upload-float] .float-title { font-size:13px; font-weight:600; color:#1e293b; }
|
|
4681
4791
|
[data-sfx-upload-float] .float-subtitle { font-size:11px; color:#94a3b8; }
|
|
4682
4792
|
[data-sfx-upload-float] .float-actions { display:flex; gap:4px; }
|
|
@@ -4689,29 +4799,39 @@ const C = (E = class extends P {
|
|
|
4689
4799
|
[data-sfx-upload-float] .float-progress-pct { font-size:12px; font-weight:600; color:#2563eb; }
|
|
4690
4800
|
[data-sfx-upload-float] .float-progress-pct.done { color:#22c55e; }
|
|
4691
4801
|
[data-sfx-upload-float] .float-progress-pct.warn { color:#f59e0b; }
|
|
4802
|
+
[data-sfx-upload-float] .float-progress-pct.error { color:#ef4444; }
|
|
4692
4803
|
[data-sfx-upload-float] .float-bar { height:4px; background:#e8edf5; border-radius:2px; overflow:hidden; }
|
|
4693
4804
|
[data-sfx-upload-float] .float-bar-fill { height:100%; background:#2563eb; border-radius:2px; transition:width .3s ease; }
|
|
4694
4805
|
[data-sfx-upload-float] .float-bar-fill.done { background:#22c55e; }
|
|
4695
4806
|
[data-sfx-upload-float] .float-bar-fill.warn { background:#f59e0b; }
|
|
4807
|
+
[data-sfx-upload-float] .float-bar-fill.error { background:#ef4444; }
|
|
4696
4808
|
[data-sfx-upload-float] .float-items { max-height:200px; overflow-y:auto; }
|
|
4697
|
-
[data-sfx-upload-float] .float-item { display:flex; align-items:center; gap:10px; padding:8px 14px; border-bottom:1px solid #f1f5f9; }
|
|
4809
|
+
[data-sfx-upload-float] .float-item { display:flex; align-items:center; gap:10px; padding:8px 14px; border-bottom:1px solid #f1f5f9; overflow:hidden; }
|
|
4698
4810
|
[data-sfx-upload-float] .float-item:last-child { border-bottom:none; }
|
|
4699
4811
|
[data-sfx-upload-float] .float-item-thumb { width:32px; height:32px; border-radius:6px; background:#f8fafc; display:flex; align-items:center; justify-content:center; color:#94a3b8; flex-shrink:0; }
|
|
4700
4812
|
[data-sfx-upload-float] .float-item-thumb svg { width:16px; height:16px; }
|
|
4701
|
-
[data-sfx-upload-float] .float-item-info { flex:1; min-width:0; }
|
|
4813
|
+
[data-sfx-upload-float] .float-item-info { flex:1; min-width:0; overflow:hidden; }
|
|
4702
4814
|
[data-sfx-upload-float] .float-item-name { font-size:12px; font-weight:500; color:#1e293b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
|
4703
4815
|
[data-sfx-upload-float] .float-item-size { font-size:11px; color:#94a3b8; }
|
|
4704
4816
|
[data-sfx-upload-float] .float-item-done { width:18px; height:18px; border-radius:50%; background:#f0fdf4; color:#22c55e; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
|
|
4705
4817
|
[data-sfx-upload-float] .float-item-done svg { width:12px; height:12px; }
|
|
4706
4818
|
[data-sfx-upload-float] .float-item-spinner { width:16px; height:16px; border:2px solid #e8edf5; border-top-color:#2563eb; border-radius:50%; animation:sfxSpin .8s linear infinite; flex-shrink:0; }
|
|
4707
|
-
[data-sfx-upload-float] .float-item-
|
|
4708
|
-
[data-sfx-upload-float] .float-
|
|
4819
|
+
[data-sfx-upload-float] .float-item-status { display:flex; flex-direction:row; align-items:center; gap:4px; flex-shrink:0; }
|
|
4820
|
+
[data-sfx-upload-float] .float-item-error-wrap { position:relative; display:flex; align-items:center; flex-shrink:0; }
|
|
4821
|
+
[data-sfx-upload-float] .float-item-error-icon { width:16px; height:16px; color:#ef4444; flex-shrink:0; cursor:pointer; }
|
|
4822
|
+
[data-sfx-upload-float] .float-item-tooltip { display:none; position:absolute; right:calc(100% + 8px); top:50%; transform:translateY(-50%); background:#fff; color:#1e293b; font-size:11px; padding:6px 10px; border-radius:6px; white-space:nowrap; pointer-events:none; z-index:10; box-shadow:0 2px 12px rgba(0,0,0,0.12),0 1px 4px rgba(0,0,0,0.08); }
|
|
4823
|
+
[data-sfx-upload-float] .float-item-error-wrap:hover .float-item-tooltip { display:block; }
|
|
4824
|
+
[data-sfx-upload-float] .float-item-retry { width:24px; height:24px; border:none; background:none; color:#2563eb; cursor:pointer; padding:4px; flex-shrink:0; display:flex; align-items:center; justify-content:center; border-radius:4px; }
|
|
4825
|
+
[data-sfx-upload-float] .float-item-retry svg { width:14px; height:14px; }
|
|
4826
|
+
[data-sfx-upload-float] .float-item-retry:hover { background:#f1f5f9; color:#1d4ed8; }
|
|
4827
|
+
[data-sfx-upload-float] .float-collapsed { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; width:470px; border-radius:12px; }
|
|
4709
4828
|
[data-sfx-upload-float] .float-collapsed-left { display:flex; align-items:center; gap:8px; }
|
|
4710
4829
|
[data-sfx-upload-float] .float-collapsed-spinner { width:18px; height:18px; border:2.5px solid #e8edf5; border-top-color:#2563eb; border-radius:50%; animation:sfxSpin .8s linear infinite; flex-shrink:0; }
|
|
4711
4830
|
[data-sfx-upload-float] .float-collapsed-icon { width:18px; height:18px; flex-shrink:0; }
|
|
4712
4831
|
[data-sfx-upload-float] .float-collapsed-icon svg { width:18px; height:18px; }
|
|
4713
4832
|
[data-sfx-upload-float] .float-collapsed-icon.done { color:#22c55e; }
|
|
4714
4833
|
[data-sfx-upload-float] .float-collapsed-icon.warn { color:#f59e0b; }
|
|
4834
|
+
[data-sfx-upload-float] .float-collapsed-icon.error { color:#ef4444; }
|
|
4715
4835
|
[data-sfx-upload-float] .float-collapsed-text { font-size:13px; font-weight:500; color:#1e293b; white-space:nowrap; }
|
|
4716
4836
|
[data-sfx-upload-float] .float-collapsed-pct { font-size:13px; font-weight:600; color:#2563eb; }
|
|
4717
4837
|
[data-sfx-upload-float] .float-collapsed-actions { display:flex; gap:4px; }
|
|
@@ -4794,12 +4914,12 @@ const C = (E = class extends P {
|
|
|
4794
4914
|
* for file status transitions.
|
|
4795
4915
|
*/
|
|
4796
4916
|
_onStoreChange() {
|
|
4797
|
-
var r, o, s, n, d, c, u,
|
|
4917
|
+
var r, o, s, n, d, c, u, h;
|
|
4798
4918
|
const e = this._store.getState(), t = this._prevStoreState;
|
|
4799
4919
|
if (this._prevStoreState = e, !t) return;
|
|
4800
4920
|
const i = (r = this.config) == null ? void 0 : r.callbacks;
|
|
4801
|
-
for (const [
|
|
4802
|
-
const m = t.files.get(
|
|
4921
|
+
for (const [x, f] of e.files) {
|
|
4922
|
+
const m = t.files.get(x);
|
|
4803
4923
|
if (m) {
|
|
4804
4924
|
if (m.status !== f.status)
|
|
4805
4925
|
switch (f.status) {
|
|
@@ -4822,19 +4942,19 @@ const C = (E = class extends P {
|
|
|
4822
4942
|
}
|
|
4823
4943
|
}
|
|
4824
4944
|
if (e.totalProgress !== t.totalProgress || e.totalSpeed !== t.totalSpeed) {
|
|
4825
|
-
const
|
|
4945
|
+
const x = e.totalSpeed > 0 ? (e.totalBytes - e.totalBytesUploaded) / e.totalSpeed : 0;
|
|
4826
4946
|
this._dispatchPublic(v.TOTAL_PROGRESS, {
|
|
4827
4947
|
percentage: e.totalProgress,
|
|
4828
4948
|
speed: e.totalSpeed,
|
|
4829
|
-
eta:
|
|
4830
|
-
}), (c = i == null ? void 0 : i.onTotalProgress) == null || c.call(i, e.totalProgress, e.totalSpeed,
|
|
4949
|
+
eta: x
|
|
4950
|
+
}), (c = i == null ? void 0 : i.onTotalProgress) == null || c.call(i, e.totalProgress, e.totalSpeed, x);
|
|
4831
4951
|
}
|
|
4832
4952
|
if (t.isUploading && !e.isUploading) {
|
|
4833
|
-
const
|
|
4834
|
-
if (!
|
|
4835
|
-
const m =
|
|
4953
|
+
const x = [...e.files.values()];
|
|
4954
|
+
if (!x.some((m) => m.status === "cancelled")) {
|
|
4955
|
+
const m = x.filter((y) => y.status === "complete"), _ = x.filter((y) => y.status === "failed" || y.status === "error");
|
|
4836
4956
|
this._dispatchPublic(v.ALL_COMPLETE, { successful: m, failed: _ }), (u = i == null ? void 0 : i.onAllComplete) == null || u.call(i, m, _);
|
|
4837
|
-
const w = (
|
|
4957
|
+
const w = (h = this.config) == null ? void 0 : h.closeOnComplete;
|
|
4838
4958
|
if (w) {
|
|
4839
4959
|
const y = typeof w == "number" ? w : 1500;
|
|
4840
4960
|
this._closeOnCompleteTimer = setTimeout(() => {
|
|
@@ -4877,7 +4997,7 @@ const C = (E = class extends P {
|
|
|
4877
4997
|
for (const n of e) {
|
|
4878
4998
|
const d = this._store.getState(), c = Ze(n, d.restrictions, d.files);
|
|
4879
4999
|
if (c) {
|
|
4880
|
-
const
|
|
5000
|
+
const x = n.type.startsWith("image/") ? URL.createObjectURL(n) : null, f = {
|
|
4881
5001
|
id: H(),
|
|
4882
5002
|
status: "rejected",
|
|
4883
5003
|
file: n,
|
|
@@ -4885,7 +5005,7 @@ const C = (E = class extends P {
|
|
|
4885
5005
|
name: n.name,
|
|
4886
5006
|
size: n.size,
|
|
4887
5007
|
type: n.type,
|
|
4888
|
-
previewUrl:
|
|
5008
|
+
previewUrl: x,
|
|
4889
5009
|
duration: null,
|
|
4890
5010
|
progress: 0,
|
|
4891
5011
|
speed: 0,
|
|
@@ -4912,7 +5032,7 @@ const C = (E = class extends P {
|
|
|
4912
5032
|
}
|
|
4913
5033
|
let u = null;
|
|
4914
5034
|
n.type.startsWith("image/") && (u = URL.createObjectURL(n));
|
|
4915
|
-
const
|
|
5035
|
+
const h = {
|
|
4916
5036
|
id: H(),
|
|
4917
5037
|
status: "idle",
|
|
4918
5038
|
file: n,
|
|
@@ -4933,26 +5053,26 @@ const C = (E = class extends P {
|
|
|
4933
5053
|
tags: [],
|
|
4934
5054
|
remoteInfo: null
|
|
4935
5055
|
};
|
|
4936
|
-
if (I(this._store,
|
|
5056
|
+
if (I(this._store, h), this._dispatchPublic(v.FILE_ADDED, { file: h }), (s = t == null ? void 0 : t.onFileAdded) == null || s.call(t, h), n.type.startsWith("video/")) {
|
|
4937
5057
|
Ke(n).then((f) => {
|
|
4938
5058
|
if (!f) return;
|
|
4939
|
-
const m = this._store.getState(), _ = m.files.get(
|
|
5059
|
+
const m = this._store.getState(), _ = m.files.get(h.id);
|
|
4940
5060
|
if (_) {
|
|
4941
5061
|
const w = new Map(m.files);
|
|
4942
|
-
w.set(
|
|
5062
|
+
w.set(h.id, { ..._, previewUrl: f }), this._store.setState({ files: w });
|
|
4943
5063
|
} else
|
|
4944
5064
|
URL.revokeObjectURL(f);
|
|
4945
5065
|
});
|
|
4946
|
-
const
|
|
4947
|
-
|
|
4948
|
-
URL.revokeObjectURL(
|
|
4949
|
-
},
|
|
4950
|
-
const f =
|
|
4951
|
-
if (URL.revokeObjectURL(
|
|
4952
|
-
const m = this._store.getState(), _ = m.files.get(
|
|
5066
|
+
const x = document.createElement("video");
|
|
5067
|
+
x.preload = "metadata", x.src = URL.createObjectURL(n), x.onerror = () => {
|
|
5068
|
+
URL.revokeObjectURL(x.src);
|
|
5069
|
+
}, x.onloadedmetadata = () => {
|
|
5070
|
+
const f = x.duration;
|
|
5071
|
+
if (URL.revokeObjectURL(x.src), !isFinite(f)) return;
|
|
5072
|
+
const m = this._store.getState(), _ = m.files.get(h.id);
|
|
4953
5073
|
if (_) {
|
|
4954
5074
|
const w = new Map(m.files);
|
|
4955
|
-
w.set(
|
|
5075
|
+
w.set(h.id, { ..._, duration: f }), this._store.setState({ files: w });
|
|
4956
5076
|
}
|
|
4957
5077
|
};
|
|
4958
5078
|
}
|
|
@@ -5000,7 +5120,7 @@ const C = (E = class extends P {
|
|
|
5000
5120
|
var s, n;
|
|
5001
5121
|
if (this._phase === "complete") return p;
|
|
5002
5122
|
if (this._phase === "uploading") {
|
|
5003
|
-
const d = this._storeCtrl.state, c = [...d.files.values()], u = c.filter((
|
|
5123
|
+
const d = this._storeCtrl.state, c = [...d.files.values()], u = c.filter((x) => x.status === "complete").length, h = d.totalSpeed > 0 ? (d.totalBytes - d.totalBytesUploaded) / d.totalSpeed : 0;
|
|
5004
5124
|
return l`
|
|
5005
5125
|
<div class="header upload-header">
|
|
5006
5126
|
<div class="float-header-left">
|
|
@@ -5009,7 +5129,7 @@ const C = (E = class extends P {
|
|
|
5009
5129
|
</div>
|
|
5010
5130
|
<div>
|
|
5011
5131
|
<div class="float-title">Uploading ${c.length} ${c.length === 1 ? "file" : "files"}</div>
|
|
5012
|
-
<div class="float-subtitle">${u} of ${c.length}${
|
|
5132
|
+
<div class="float-subtitle">${u} of ${c.length}${h > 0 ? ` · ~${ie(h)} left` : ""}</div>
|
|
5013
5133
|
</div>
|
|
5014
5134
|
</div>
|
|
5015
5135
|
</div>
|
|
@@ -5073,15 +5193,18 @@ const C = (E = class extends P {
|
|
|
5073
5193
|
return this._isPillExpanded === !1 ? l`
|
|
5074
5194
|
<div class="upload-float float-collapsed">
|
|
5075
5195
|
<div class="float-collapsed-left">
|
|
5076
|
-
${r ? s > 0 ? l`<div class="float-collapsed-icon warn"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></div>` : l`<div class="float-collapsed-icon done"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg></div>` : l`<div class="float-collapsed-spinner"></div>`}
|
|
5077
|
-
<span class="float-collapsed-text">${r ? s > 0 ?
|
|
5196
|
+
${r ? s > 0 ? o > 0 ? l`<div class="float-collapsed-icon warn"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg></div>` : l`<div class="float-collapsed-icon error"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg></div>` : l`<div class="float-collapsed-icon done"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg></div>` : l`<div class="float-collapsed-spinner"></div>`}
|
|
5197
|
+
<span class="float-collapsed-text">${r ? s > 0 ? o > 0 ? "Partially uploaded" : "Upload failed" : "Upload complete" : `Uploading ${e.length} ${e.length === 1 ? "file" : "files"}`}</span>
|
|
5078
5198
|
${r ? p : l`<span class="float-collapsed-pct">${i}%</span>`}
|
|
5079
5199
|
</div>
|
|
5080
5200
|
<div class="float-collapsed-actions">
|
|
5201
|
+
<button title="Open uploader" @click=${this._onPillExpand}>
|
|
5202
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>
|
|
5203
|
+
</button>
|
|
5081
5204
|
<button title="Expand" @click=${this._onPillClick}>
|
|
5082
5205
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="18 15 12 9 6 15"/></svg>
|
|
5083
5206
|
</button>
|
|
5084
|
-
<button title="
|
|
5207
|
+
<button title="Close" @click=${this._onPillDismiss}>
|
|
5085
5208
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
5086
5209
|
</button>
|
|
5087
5210
|
</div>
|
|
@@ -5090,19 +5213,22 @@ const C = (E = class extends P {
|
|
|
5090
5213
|
<div class="upload-float">
|
|
5091
5214
|
<div class="float-header">
|
|
5092
5215
|
<div class="float-header-left">
|
|
5093
|
-
<div class="float-icon ${r ? s > 0 ? "warn" : "done" : ""}">
|
|
5094
|
-
${r ? s > 0 ? l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><polyline points="16 16 12 12 8 16"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.39 18.39A5 5 0 0018 9h-1.26A8 8 0 103 16.3"/></svg>`}
|
|
5216
|
+
<div class="float-icon ${r ? s > 0 ? o > 0 ? "warn" : "error" : "done" : ""}">
|
|
5217
|
+
${r ? s > 0 ? o > 0 ? l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg>` : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><polyline points="16 16 12 12 8 16"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.39 18.39A5 5 0 0018 9h-1.26A8 8 0 103 16.3"/></svg>`}
|
|
5095
5218
|
</div>
|
|
5096
5219
|
<div>
|
|
5097
|
-
<div class="float-title">${r ? s > 0 ?
|
|
5220
|
+
<div class="float-title">${r ? s > 0 ? o > 0 ? "Partially uploaded" : "Upload failed" : "Upload complete" : `Uploading ${e.length} ${e.length === 1 ? "file" : "files"}`}</div>
|
|
5098
5221
|
<div class="float-subtitle">${r ? `${o} ${o === 1 ? "file" : "files"} uploaded${s > 0 ? `, ${s} failed` : ""}` : `${o} of ${e.length}${n > 0 ? ` · ~${ie(n)} left` : ""}`}</div>
|
|
5099
5222
|
</div>
|
|
5100
5223
|
</div>
|
|
5101
5224
|
<div class="float-actions">
|
|
5225
|
+
<button title="Expand" @click=${this._onPillExpand}>
|
|
5226
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>
|
|
5227
|
+
</button>
|
|
5102
5228
|
<button title="Collapse" @click=${this._onPillClick}>
|
|
5103
5229
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="6 9 12 15 18 9"/></svg>
|
|
5104
5230
|
</button>
|
|
5105
|
-
<button title="
|
|
5231
|
+
<button title="Close" @click=${this._onPillDismiss}>
|
|
5106
5232
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
|
5107
5233
|
</button>
|
|
5108
5234
|
</div>
|
|
@@ -5110,25 +5236,38 @@ const C = (E = class extends P {
|
|
|
5110
5236
|
<div class="float-progress">
|
|
5111
5237
|
<div class="float-progress-top">
|
|
5112
5238
|
<span class="float-progress-label">Overall progress</span>
|
|
5113
|
-
<span class="float-progress-pct ${r ? s > 0 ? "warn" : "done" : ""}">${r ? "Done" : `${i}%`}</span>
|
|
5239
|
+
<span class="float-progress-pct ${r ? s > 0 ? o > 0 ? "warn" : "error" : "done" : ""}">${r ? "Done" : `${i}%`}</span>
|
|
5114
5240
|
</div>
|
|
5115
|
-
<div class="float-bar"><div class="float-bar-fill ${r ? s > 0 ? "warn" : "done" : ""}" style="width:${r ? 100 : i}%"></div></div>
|
|
5241
|
+
<div class="float-bar"><div class="float-bar-fill ${r ? s > 0 ? o > 0 ? "warn" : "error" : "done" : ""}" style="width:${r ? 100 : i}%"></div></div>
|
|
5116
5242
|
</div>
|
|
5117
5243
|
<div class="float-items">
|
|
5118
|
-
${e.map((d) =>
|
|
5244
|
+
${e.map((d) => {
|
|
5245
|
+
const c = d.status === "failed" || d.status === "error";
|
|
5246
|
+
return l`
|
|
5119
5247
|
<div class="float-item">
|
|
5120
|
-
<div class="float-item-thumb">
|
|
5121
|
-
|
|
5248
|
+
<div class="float-item-thumb" style=${d.previewUrl ? `background-image:url(${d.previewUrl});background-size:cover;background-position:center` : ""}>
|
|
5249
|
+
${d.previewUrl ? p : l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`}
|
|
5122
5250
|
</div>
|
|
5123
5251
|
<div class="float-item-info">
|
|
5124
5252
|
<div class="float-item-name">${d.name}</div>
|
|
5125
5253
|
<div class="float-item-size">${Y(d.size)}</div>
|
|
5126
5254
|
</div>
|
|
5127
5255
|
<div class="float-item-status">
|
|
5128
|
-
${d.status === "complete" ? l`<div class="float-item-done"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg></div>` :
|
|
5256
|
+
${d.status === "complete" ? l`<div class="float-item-done"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="20 6 9 17 4 12"/></svg></div>` : c ? l`
|
|
5257
|
+
<div class="float-item-error-wrap">
|
|
5258
|
+
<svg class="float-item-error-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
|
|
5259
|
+
<span class="float-item-tooltip">${d.error || "Upload failed"}</span>
|
|
5260
|
+
</div>
|
|
5261
|
+
<button class="float-item-retry" @click=${() => {
|
|
5262
|
+
var u;
|
|
5263
|
+
this._ensureEngine(), (u = this._engine) == null || u.retryFile(d.id);
|
|
5264
|
+
}}>
|
|
5265
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 2v6h-6"/><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M3 22v-6h6"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/></svg>
|
|
5266
|
+
</button>` : l`<div class="float-item-spinner"></div>`}
|
|
5129
5267
|
</div>
|
|
5130
5268
|
</div>
|
|
5131
|
-
|
|
5269
|
+
`;
|
|
5270
|
+
})}
|
|
5132
5271
|
</div>
|
|
5133
5272
|
</div>
|
|
5134
5273
|
`;
|
|
@@ -5304,7 +5443,10 @@ const C = (E = class extends P {
|
|
|
5304
5443
|
.fileCount=${t.filter((c) => c.status === "complete").length}
|
|
5305
5444
|
.totalSize=${t.filter((c) => c.status === "complete").reduce((c, u) => c + (u.size || 0), 0)}
|
|
5306
5445
|
.thumbnails=${t.filter((c) => c.status === "complete" && c.previewUrl).map((c) => c.previewUrl)}
|
|
5307
|
-
.failedFiles=${t.filter((c) => c.status === "failed").map((c) => ({ name: c.name, error: c.error || "Upload failed" }))}
|
|
5446
|
+
.failedFiles=${t.filter((c) => c.status === "failed").map((c) => ({ id: c.id, name: c.name, error: c.error || "Upload failed" }))}
|
|
5447
|
+
@close-uploader=${this._onSuccessCardClose}
|
|
5448
|
+
@file-retry=${this._onFileRetry}
|
|
5449
|
+
@retry-all=${this._onRetryAll}
|
|
5308
5450
|
></sfx-success-card>
|
|
5309
5451
|
` : i === "uploading" ? this._renderUploadOverlay(t) : l`
|
|
5310
5452
|
${o ? p : l`<sfx-drop-zone
|
|
@@ -5727,19 +5869,11 @@ const C = (E = class extends P {
|
|
|
5727
5869
|
}
|
|
5728
5870
|
|
|
5729
5871
|
.preview-layout .file-grid-side::after {
|
|
5730
|
-
|
|
5731
|
-
position: absolute;
|
|
5732
|
-
top: 0;
|
|
5733
|
-
bottom: 0;
|
|
5734
|
-
right: 14px;
|
|
5735
|
-
width: 1px;
|
|
5736
|
-
background: var(--sfx-up-border, #e8edf5);
|
|
5737
|
-
pointer-events: none;
|
|
5738
|
-
z-index: 3;
|
|
5872
|
+
display: none;
|
|
5739
5873
|
}
|
|
5740
5874
|
|
|
5741
5875
|
.preview-layout sfx-file-list {
|
|
5742
|
-
padding-right:
|
|
5876
|
+
padding-right: 6px;
|
|
5743
5877
|
--sfx-scrollbar-w: 14px;
|
|
5744
5878
|
--sfx-scrollbar-inset-left: 2px;
|
|
5745
5879
|
--sfx-scrollbar-inset-right: 6px;
|
|
@@ -6030,6 +6164,7 @@ const C = (E = class extends P {
|
|
|
6030
6164
|
flex: 1;
|
|
6031
6165
|
gap: 8px;
|
|
6032
6166
|
padding: 32px 24px;
|
|
6167
|
+
position: relative;
|
|
6033
6168
|
animation: fadeUp 0.3s ease both;
|
|
6034
6169
|
}
|
|
6035
6170
|
|
|
@@ -6134,7 +6269,7 @@ const C = (E = class extends P {
|
|
|
6134
6269
|
bottom: 24px;
|
|
6135
6270
|
right: 24px;
|
|
6136
6271
|
z-index: 10000;
|
|
6137
|
-
width:
|
|
6272
|
+
width: 470px;
|
|
6138
6273
|
border-radius: 12px;
|
|
6139
6274
|
background: var(--sfx-up-bg, #fff);
|
|
6140
6275
|
box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
|
|
@@ -6176,6 +6311,11 @@ const C = (E = class extends P {
|
|
|
6176
6311
|
color: #22c55e;
|
|
6177
6312
|
}
|
|
6178
6313
|
|
|
6314
|
+
.float-icon.error {
|
|
6315
|
+
background: #fef2f2;
|
|
6316
|
+
color: #ef4444;
|
|
6317
|
+
}
|
|
6318
|
+
|
|
6179
6319
|
.float-title {
|
|
6180
6320
|
font-size: 13px;
|
|
6181
6321
|
font-weight: 600;
|
|
@@ -6237,9 +6377,9 @@ const C = (E = class extends P {
|
|
|
6237
6377
|
color: var(--sfx-up-primary, #2563eb);
|
|
6238
6378
|
}
|
|
6239
6379
|
|
|
6240
|
-
.float-progress-pct.done {
|
|
6241
|
-
|
|
6242
|
-
}
|
|
6380
|
+
.float-progress-pct.done { color: #22c55e; }
|
|
6381
|
+
.float-progress-pct.warn { color: #f59e0b; }
|
|
6382
|
+
.float-progress-pct.error { color: #ef4444; }
|
|
6243
6383
|
|
|
6244
6384
|
.float-bar {
|
|
6245
6385
|
height: 4px;
|
|
@@ -6255,13 +6395,14 @@ const C = (E = class extends P {
|
|
|
6255
6395
|
transition: width 0.3s ease;
|
|
6256
6396
|
}
|
|
6257
6397
|
|
|
6258
|
-
.float-bar-fill.done {
|
|
6259
|
-
|
|
6260
|
-
}
|
|
6398
|
+
.float-bar-fill.done { background: #22c55e; }
|
|
6399
|
+
.float-bar-fill.warn { background: #f59e0b; }
|
|
6400
|
+
.float-bar-fill.error { background: #ef4444; }
|
|
6261
6401
|
|
|
6262
6402
|
.float-items {
|
|
6263
6403
|
max-height: 200px;
|
|
6264
6404
|
overflow-y: auto;
|
|
6405
|
+
overflow-x: hidden;
|
|
6265
6406
|
scrollbar-width: thin;
|
|
6266
6407
|
scrollbar-color: rgba(0,0,0,0.1) transparent;
|
|
6267
6408
|
}
|
|
@@ -6272,6 +6413,7 @@ const C = (E = class extends P {
|
|
|
6272
6413
|
gap: 10px;
|
|
6273
6414
|
padding: 8px 14px;
|
|
6274
6415
|
border-bottom: 1px solid #f1f5f9;
|
|
6416
|
+
overflow: hidden;
|
|
6275
6417
|
}
|
|
6276
6418
|
|
|
6277
6419
|
.float-item:last-child { border-bottom: none; }
|
|
@@ -6290,7 +6432,7 @@ const C = (E = class extends P {
|
|
|
6290
6432
|
|
|
6291
6433
|
.float-item-thumb svg { width: 16px; height: 16px; }
|
|
6292
6434
|
|
|
6293
|
-
.float-item-info { flex: 1; min-width: 0; }
|
|
6435
|
+
.float-item-info { flex: 1; min-width: 0; overflow: hidden; }
|
|
6294
6436
|
|
|
6295
6437
|
.float-item-name {
|
|
6296
6438
|
font-size: 12px;
|
|
@@ -6330,13 +6472,69 @@ const C = (E = class extends P {
|
|
|
6330
6472
|
flex-shrink: 0;
|
|
6331
6473
|
}
|
|
6332
6474
|
|
|
6333
|
-
.float-item-error {
|
|
6334
|
-
|
|
6475
|
+
.float-item-error-wrap {
|
|
6476
|
+
position: relative;
|
|
6477
|
+
display: flex;
|
|
6478
|
+
align-items: center;
|
|
6479
|
+
flex-shrink: 0;
|
|
6480
|
+
}
|
|
6481
|
+
|
|
6482
|
+
.float-item-error-icon {
|
|
6335
6483
|
width: 16px;
|
|
6336
6484
|
height: 16px;
|
|
6485
|
+
color: #ef4444;
|
|
6486
|
+
flex-shrink: 0;
|
|
6487
|
+
cursor: pointer;
|
|
6488
|
+
}
|
|
6489
|
+
|
|
6490
|
+
.float-item-tooltip {
|
|
6491
|
+
display: none;
|
|
6492
|
+
position: absolute;
|
|
6493
|
+
right: calc(100% + 8px);
|
|
6494
|
+
top: 50%;
|
|
6495
|
+
transform: translateY(-50%);
|
|
6496
|
+
background: #fff;
|
|
6497
|
+
color: #1e293b;
|
|
6498
|
+
font-size: 11px;
|
|
6499
|
+
padding: 6px 10px;
|
|
6500
|
+
border-radius: 6px;
|
|
6501
|
+
white-space: nowrap;
|
|
6502
|
+
pointer-events: none;
|
|
6503
|
+
z-index: 10;
|
|
6504
|
+
box-shadow: 0 2px 12px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
|
|
6505
|
+
}
|
|
6506
|
+
|
|
6507
|
+
.float-item-error-wrap:hover .float-item-tooltip {
|
|
6508
|
+
display: block;
|
|
6509
|
+
}
|
|
6510
|
+
|
|
6511
|
+
.float-item-status {
|
|
6512
|
+
display: flex;
|
|
6513
|
+
flex-direction: row;
|
|
6514
|
+
align-items: center;
|
|
6515
|
+
gap: 4px;
|
|
6516
|
+
flex-shrink: 0;
|
|
6517
|
+
}
|
|
6518
|
+
|
|
6519
|
+
.float-item-retry {
|
|
6520
|
+
width: 24px;
|
|
6521
|
+
height: 24px;
|
|
6522
|
+
border: none;
|
|
6523
|
+
background: none;
|
|
6524
|
+
color: var(--sfx-up-primary, #2563eb);
|
|
6525
|
+
cursor: pointer;
|
|
6526
|
+
padding: 4px;
|
|
6337
6527
|
flex-shrink: 0;
|
|
6528
|
+
display: flex;
|
|
6529
|
+
align-items: center;
|
|
6530
|
+
justify-content: center;
|
|
6531
|
+
border-radius: 4px;
|
|
6338
6532
|
}
|
|
6339
6533
|
|
|
6534
|
+
.float-item-retry svg { width: 16px; height: 16px; }
|
|
6535
|
+
|
|
6536
|
+
.float-item-retry:hover { background: var(--sfx-up-surface, #f8fafc); color: var(--sfx-up-primary-hover, #1d4ed8); }
|
|
6537
|
+
|
|
6340
6538
|
@keyframes floatSlideIn {
|
|
6341
6539
|
from { opacity: 0; transform: translateY(20px); }
|
|
6342
6540
|
to { opacity: 1; transform: translateY(0); }
|
|
@@ -6604,50 +6802,50 @@ $([
|
|
|
6604
6802
|
b({ attribute: !1 })
|
|
6605
6803
|
], C.prototype, "config");
|
|
6606
6804
|
$([
|
|
6607
|
-
|
|
6805
|
+
g()
|
|
6608
6806
|
], C.prototype, "_isOpen");
|
|
6609
6807
|
$([
|
|
6610
|
-
|
|
6808
|
+
g()
|
|
6611
6809
|
], C.prototype, "_activeConnector");
|
|
6612
6810
|
$([
|
|
6613
|
-
|
|
6811
|
+
g()
|
|
6614
6812
|
], C.prototype, "_showUrlDialog");
|
|
6615
6813
|
$([
|
|
6616
|
-
|
|
6814
|
+
g()
|
|
6617
6815
|
], C.prototype, "_showCameraDialog");
|
|
6618
6816
|
$([
|
|
6619
|
-
|
|
6817
|
+
g()
|
|
6620
6818
|
], C.prototype, "_showScreenCastDialog");
|
|
6621
6819
|
$([
|
|
6622
|
-
|
|
6820
|
+
g()
|
|
6623
6821
|
], C.prototype, "_previewFileId");
|
|
6624
6822
|
$([
|
|
6625
|
-
|
|
6823
|
+
g()
|
|
6626
6824
|
], C.prototype, "_previewDims");
|
|
6627
6825
|
$([
|
|
6628
|
-
|
|
6826
|
+
g()
|
|
6629
6827
|
], C.prototype, "_fullscreenPreviewUrl");
|
|
6630
6828
|
$([
|
|
6631
|
-
|
|
6829
|
+
g()
|
|
6632
6830
|
], C.prototype, "_fullscreenVideoFile");
|
|
6633
6831
|
$([
|
|
6634
|
-
|
|
6832
|
+
g()
|
|
6635
6833
|
], C.prototype, "_fullscreenZoomed");
|
|
6636
6834
|
$([
|
|
6637
|
-
|
|
6835
|
+
g()
|
|
6638
6836
|
], C.prototype, "_bodyDragOver");
|
|
6639
6837
|
$([
|
|
6640
|
-
|
|
6838
|
+
g()
|
|
6641
6839
|
], C.prototype, "_isMinimized");
|
|
6642
6840
|
$([
|
|
6643
|
-
|
|
6841
|
+
g()
|
|
6644
6842
|
], C.prototype, "_isPillExpanded");
|
|
6645
6843
|
let Ct = C;
|
|
6646
6844
|
export {
|
|
6647
6845
|
le as A,
|
|
6648
6846
|
X as C,
|
|
6649
6847
|
v as P,
|
|
6650
|
-
|
|
6848
|
+
O as S,
|
|
6651
6849
|
He as U,
|
|
6652
6850
|
U as a,
|
|
6653
6851
|
ne as b,
|
|
@@ -6656,9 +6854,9 @@ export {
|
|
|
6656
6854
|
ae as e,
|
|
6657
6855
|
R as f,
|
|
6658
6856
|
Ct as g,
|
|
6659
|
-
|
|
6857
|
+
je as h,
|
|
6660
6858
|
oe as i,
|
|
6661
|
-
|
|
6859
|
+
Oe as j,
|
|
6662
6860
|
Ye as k,
|
|
6663
6861
|
de as l,
|
|
6664
6862
|
Je as m,
|