@qingwu-ui/ai-editor 0.9.0-beta.7 → 0.9.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1779,19 +1779,19 @@ function en({ editor: e, onClose: t }) {
|
|
|
1779
1779
|
from: 0,
|
|
1780
1780
|
to: 0,
|
|
1781
1781
|
empty: !0
|
|
1782
|
-
}), g = w(null), _ = b(async (e) => {
|
|
1782
|
+
}), g = w(null), _ = w(null), v = w(!0), y = b(async (e) => {
|
|
1783
1783
|
if (r(e), d(null), e !== "zap") {
|
|
1784
|
-
await
|
|
1784
|
+
await C(e);
|
|
1785
1785
|
return;
|
|
1786
1786
|
}
|
|
1787
1787
|
setTimeout(() => g.current?.focus(), 100);
|
|
1788
|
-
}, [e]),
|
|
1788
|
+
}, [e]), C = b(async (t) => {
|
|
1789
1789
|
let n = e.state.selection;
|
|
1790
1790
|
h.current = {
|
|
1791
1791
|
from: n.from,
|
|
1792
1792
|
to: n.to,
|
|
1793
1793
|
empty: n.empty
|
|
1794
|
-
}, l(!0), s(""), d(null);
|
|
1794
|
+
}, l(!0), s(""), v.current = !0, d(null);
|
|
1795
1795
|
try {
|
|
1796
1796
|
let r = ft(), a = n.empty ? e.state.doc.textContent : e.state.doc.textBetween(n.from, n.to), o = [];
|
|
1797
1797
|
for await (let e of r.stream({
|
|
@@ -1804,12 +1804,25 @@ function en({ editor: e, onClose: t }) {
|
|
|
1804
1804
|
} finally {
|
|
1805
1805
|
l(!1);
|
|
1806
1806
|
}
|
|
1807
|
-
}, [e, i])
|
|
1807
|
+
}, [e, i]);
|
|
1808
|
+
x(() => {
|
|
1809
|
+
let e = _.current;
|
|
1810
|
+
if (!e) return;
|
|
1811
|
+
let t = () => {
|
|
1812
|
+
let t = e.scrollHeight - e.scrollTop - e.clientHeight < 24;
|
|
1813
|
+
v.current = t;
|
|
1814
|
+
};
|
|
1815
|
+
return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
|
|
1816
|
+
}, [!!o]), S(() => {
|
|
1817
|
+
let e = _.current;
|
|
1818
|
+
!e || !v.current || (e.scrollTop = e.scrollHeight);
|
|
1819
|
+
}, [o]);
|
|
1820
|
+
let k = b((t, n, r) => {
|
|
1808
1821
|
let i = new Set(Xt(e, r.from, r.to).map((e) => e.src));
|
|
1809
1822
|
t === "replaceAll" ? Qt(e, n) : $t(e, n, "replace", h.current);
|
|
1810
1823
|
let a = Zt(e);
|
|
1811
1824
|
Wt(e, [...i].filter((e) => !a.has(e)));
|
|
1812
|
-
}, [e]),
|
|
1825
|
+
}, [e]), A = b((n) => {
|
|
1813
1826
|
if (n === "below") {
|
|
1814
1827
|
$t(e, o, "below", h.current), t();
|
|
1815
1828
|
return;
|
|
@@ -1828,13 +1841,13 @@ function en({ editor: e, onClose: t }) {
|
|
|
1828
1841
|
});
|
|
1829
1842
|
return;
|
|
1830
1843
|
}
|
|
1831
|
-
|
|
1844
|
+
k(n, o, i), t();
|
|
1832
1845
|
}, [
|
|
1833
1846
|
e,
|
|
1834
1847
|
o,
|
|
1835
|
-
|
|
1848
|
+
k,
|
|
1836
1849
|
t
|
|
1837
|
-
]),
|
|
1850
|
+
]), j = b(() => {
|
|
1838
1851
|
if (!p) return;
|
|
1839
1852
|
let { position: n } = p, r = n === "replaceAll" ? {
|
|
1840
1853
|
from: 0,
|
|
@@ -1843,17 +1856,17 @@ function en({ editor: e, onClose: t }) {
|
|
|
1843
1856
|
from: h.current.from,
|
|
1844
1857
|
to: h.current.to
|
|
1845
1858
|
};
|
|
1846
|
-
|
|
1859
|
+
k(n, o, r), m(null), t();
|
|
1847
1860
|
}, [
|
|
1848
1861
|
p,
|
|
1849
1862
|
e,
|
|
1850
1863
|
o,
|
|
1851
|
-
|
|
1864
|
+
k,
|
|
1852
1865
|
t
|
|
1853
|
-
]),
|
|
1866
|
+
]), M = b(() => {
|
|
1854
1867
|
s(""), r(null), d(null);
|
|
1855
|
-
}, []),
|
|
1856
|
-
for (let e of p?.willRemove ?? [])
|
|
1868
|
+
}, []), N = {};
|
|
1869
|
+
for (let e of p?.willRemove ?? []) N[e.type] = (N[e.type] ?? 0) + 1;
|
|
1857
1870
|
return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O("div", {
|
|
1858
1871
|
className: "ai-selector w-full flex-1 min-h-0 flex flex-col",
|
|
1859
1872
|
children: [
|
|
@@ -1876,7 +1889,7 @@ function en({ editor: e, onClose: t }) {
|
|
|
1876
1889
|
children: Kt.map(({ mode: e, labelKey: t, descKey: r, icon: i }) => /* @__PURE__ */ O("button", {
|
|
1877
1890
|
type: "button",
|
|
1878
1891
|
className: `flex flex-col items-center gap-1 px-1 py-2 rounded-xl border transition-colors ${n === e ? "border-primary/40 bg-primary/10 text-primary" : "border-default-200 text-default-600 hover:bg-default-100 hover:text-default-900"}`,
|
|
1879
|
-
onClick: () =>
|
|
1892
|
+
onClick: () => y(e),
|
|
1880
1893
|
title: f(r),
|
|
1881
1894
|
children: [/* @__PURE__ */ D("span", {
|
|
1882
1895
|
className: "text-base leading-none",
|
|
@@ -1901,7 +1914,7 @@ function en({ editor: e, onClose: t }) {
|
|
|
1901
1914
|
value: i,
|
|
1902
1915
|
onChange: (e) => a(e.target.value),
|
|
1903
1916
|
onKeyDown: (e) => {
|
|
1904
|
-
e.key === "Enter" && i.trim() &&
|
|
1917
|
+
e.key === "Enter" && i.trim() && C("zap");
|
|
1905
1918
|
}
|
|
1906
1919
|
}), /* @__PURE__ */ O("div", {
|
|
1907
1920
|
className: "flex gap-2 mt-2",
|
|
@@ -1909,7 +1922,7 @@ function en({ editor: e, onClose: t }) {
|
|
|
1909
1922
|
type: "button",
|
|
1910
1923
|
className: "px-3 py-1.5 text-xs bg-primary text-white rounded-lg disabled:opacity-50",
|
|
1911
1924
|
disabled: !i.trim(),
|
|
1912
|
-
onClick: () =>
|
|
1925
|
+
onClick: () => C("zap"),
|
|
1913
1926
|
children: f("editor.ai.confirm")
|
|
1914
1927
|
}), /* @__PURE__ */ D("button", {
|
|
1915
1928
|
type: "button",
|
|
@@ -1929,6 +1942,7 @@ function en({ editor: e, onClose: t }) {
|
|
|
1929
1942
|
}), f("editor.ai.thinking")]
|
|
1930
1943
|
}),
|
|
1931
1944
|
o && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O("div", {
|
|
1945
|
+
ref: _,
|
|
1932
1946
|
className: "flex-1 min-h-0 overflow-y-auto text-sm whitespace-pre-wrap text-default-700 mb-3",
|
|
1933
1947
|
children: [o, c && /* @__PURE__ */ D("span", {
|
|
1934
1948
|
className: "animate-pulse",
|
|
@@ -1940,24 +1954,24 @@ function en({ editor: e, onClose: t }) {
|
|
|
1940
1954
|
h.current.empty ? /* @__PURE__ */ D("button", {
|
|
1941
1955
|
type: "button",
|
|
1942
1956
|
className: "px-3 py-1.5 text-xs bg-primary text-white rounded-lg",
|
|
1943
|
-
onClick: () =>
|
|
1957
|
+
onClick: () => A("replaceAll"),
|
|
1944
1958
|
children: f("editor.ai.replaceAll")
|
|
1945
1959
|
}) : /* @__PURE__ */ D("button", {
|
|
1946
1960
|
type: "button",
|
|
1947
1961
|
className: "px-3 py-1.5 text-xs bg-primary text-white rounded-lg",
|
|
1948
|
-
onClick: () =>
|
|
1962
|
+
onClick: () => A("replace"),
|
|
1949
1963
|
children: f("editor.ai.replace")
|
|
1950
1964
|
}),
|
|
1951
1965
|
/* @__PURE__ */ D("button", {
|
|
1952
1966
|
type: "button",
|
|
1953
1967
|
className: "px-3 py-1.5 text-xs border border-default-200 rounded-lg hover:bg-default-100",
|
|
1954
|
-
onClick: () =>
|
|
1968
|
+
onClick: () => A("below"),
|
|
1955
1969
|
children: f("editor.ai.insert")
|
|
1956
1970
|
}),
|
|
1957
1971
|
/* @__PURE__ */ D("button", {
|
|
1958
1972
|
type: "button",
|
|
1959
1973
|
className: "px-3 py-1.5 text-xs text-danger",
|
|
1960
|
-
onClick:
|
|
1974
|
+
onClick: M,
|
|
1961
1975
|
children: f("editor.ai.discard")
|
|
1962
1976
|
})
|
|
1963
1977
|
]
|
|
@@ -2007,12 +2021,12 @@ function en({ editor: e, onClose: t }) {
|
|
|
2007
2021
|
children: [/* @__PURE__ */ D("p", {
|
|
2008
2022
|
className: "mb-2",
|
|
2009
2023
|
children: p.position === "replaceAll" ? f("editor.ai.replaceAllText") : f("editor.ai.replaceText")
|
|
2010
|
-
}), Object.keys(
|
|
2024
|
+
}), Object.keys(N).length > 0 && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("p", {
|
|
2011
2025
|
className: "text-xs text-default-500",
|
|
2012
2026
|
children: f("editor.ai.removeNodes")
|
|
2013
2027
|
}), /* @__PURE__ */ D("ul", {
|
|
2014
2028
|
className: "mt-1 space-y-0.5",
|
|
2015
|
-
children: Object.entries(
|
|
2029
|
+
children: Object.entries(N).map(([e, t]) => /* @__PURE__ */ O("li", {
|
|
2016
2030
|
className: "text-sm text-default-700",
|
|
2017
2031
|
children: [
|
|
2018
2032
|
f(Jt[e] ?? e),
|
|
@@ -2037,7 +2051,7 @@ function en({ editor: e, onClose: t }) {
|
|
|
2037
2051
|
}), /* @__PURE__ */ D("button", {
|
|
2038
2052
|
type: "button",
|
|
2039
2053
|
className: "qed-btn qed-btn--primary",
|
|
2040
|
-
onClick:
|
|
2054
|
+
onClick: j,
|
|
2041
2055
|
children: f("editor.ai.confirmReplace")
|
|
2042
2056
|
})]
|
|
2043
2057
|
})
|
|
@@ -3577,7 +3591,7 @@ function Ln(e) {
|
|
|
3577
3591
|
return n ? n[0] : e;
|
|
3578
3592
|
}
|
|
3579
3593
|
function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
3580
|
-
let r = e.attrs.src || "", i = e.attrs.source || "unknown", a = i === "unknown" ? In(r) : i, [o, s] = T(!1), [c, l] = T(!1), u = n?.isEditable ?? !0,
|
|
3594
|
+
let r = e.attrs.src || "", i = e.attrs.source || "unknown", a = i === "unknown" ? In(r) : i, [o, s] = T(!1), [c, l] = T(!1), [u, d] = T(!1), f = n?.isEditable ?? !0, p = /* @__PURE__ */ D(hn, {
|
|
3581
3595
|
open: o,
|
|
3582
3596
|
title: "确认删除视频",
|
|
3583
3597
|
message: "此操作将同时删除对象存储中的文件,不可撤销。",
|
|
@@ -3590,45 +3604,45 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3590
3604
|
} catch {}
|
|
3591
3605
|
$(!1), await new Promise((e) => setTimeout(e, 300)), t();
|
|
3592
3606
|
}
|
|
3593
|
-
}), [
|
|
3594
|
-
let e =
|
|
3607
|
+
}), [m, h] = T(""), g = w(null), _ = w(null), v = w(null), y = w(null), S = w(null), C = w(0), k = b(() => {
|
|
3608
|
+
let e = v.current;
|
|
3595
3609
|
e && (e.style.position = "", e.style.inset = "", e.style.zIndex = "", e.style.borderRadius = "", document.body.style.overflow = "");
|
|
3596
|
-
}, []), C = b(() => {
|
|
3597
|
-
document.fullscreenElement && document.exitFullscreen?.(), S();
|
|
3598
|
-
}, [S]), E = b(() => {
|
|
3599
|
-
let e = g.current;
|
|
3600
|
-
e && (e.style.position === "fixed" ? S() : (e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "99999", e.style.borderRadius = "0", document.body.style.overflow = "hidden"));
|
|
3601
|
-
}, [S]), k = b(() => {
|
|
3602
|
-
y.current = window.scrollY, _.current?.requestFullscreen?.();
|
|
3603
3610
|
}, []), A = b(() => {
|
|
3604
|
-
|
|
3605
|
-
|
|
3611
|
+
document.fullscreenElement && document.exitFullscreen?.(), k();
|
|
3612
|
+
}, [k]), j = b(() => {
|
|
3613
|
+
let e = v.current;
|
|
3614
|
+
e && (e.style.position === "fixed" ? k() : (e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "99999", e.style.borderRadius = "0", document.body.style.overflow = "hidden"));
|
|
3615
|
+
}, [k]), M = b(() => {
|
|
3616
|
+
C.current = window.scrollY, y.current?.requestFullscreen?.();
|
|
3617
|
+
}, []), N = b(() => {
|
|
3618
|
+
let e = _.current?.closest(".video-embed--direct") || _.current;
|
|
3619
|
+
e && (C.current = window.scrollY, e.requestFullscreen?.());
|
|
3606
3620
|
}, []);
|
|
3607
3621
|
if (x(() => {
|
|
3608
3622
|
let e = () => {
|
|
3609
|
-
document.fullscreenElement || requestAnimationFrame(() => window.scrollTo(0,
|
|
3623
|
+
document.fullscreenElement || requestAnimationFrame(() => window.scrollTo(0, C.current));
|
|
3610
3624
|
};
|
|
3611
3625
|
return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
|
|
3612
3626
|
}, []), x(() => {
|
|
3613
3627
|
if (a !== "direct" || !r) {
|
|
3614
|
-
|
|
3628
|
+
h("");
|
|
3615
3629
|
return;
|
|
3616
3630
|
}
|
|
3617
3631
|
let e = !1;
|
|
3618
3632
|
return l(!0), (async () => {
|
|
3619
3633
|
try {
|
|
3620
3634
|
if (r.includes("?X-Amz-") || r.startsWith("blob:") || r.startsWith("data:")) {
|
|
3621
|
-
|
|
3635
|
+
h(r);
|
|
3622
3636
|
return;
|
|
3623
3637
|
}
|
|
3624
3638
|
let { signPreviewUrlHeaders: t } = await import("./signed-fetch-CPPWCUUS.js").then((e) => e.i), n = await t(r);
|
|
3625
3639
|
if (!n) {
|
|
3626
|
-
|
|
3640
|
+
h(r);
|
|
3627
3641
|
return;
|
|
3628
3642
|
}
|
|
3629
3643
|
let i = await fetch(r, { headers: n });
|
|
3630
3644
|
if (!i.ok) {
|
|
3631
|
-
|
|
3645
|
+
h(r);
|
|
3632
3646
|
return;
|
|
3633
3647
|
}
|
|
3634
3648
|
let a = URL.createObjectURL(await i.blob());
|
|
@@ -3636,24 +3650,28 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3636
3650
|
URL.revokeObjectURL(a);
|
|
3637
3651
|
return;
|
|
3638
3652
|
}
|
|
3639
|
-
|
|
3653
|
+
S.current && URL.revokeObjectURL(S.current), S.current = a, h(a);
|
|
3640
3654
|
} catch {
|
|
3641
|
-
e ||
|
|
3655
|
+
e || h(r);
|
|
3642
3656
|
}
|
|
3643
3657
|
})(), () => {
|
|
3644
|
-
e = !0,
|
|
3658
|
+
e = !0, S.current &&= (URL.revokeObjectURL(S.current), null);
|
|
3645
3659
|
};
|
|
3646
3660
|
}, [a, r]), x(() => {
|
|
3647
|
-
if (a !== "direct" || !
|
|
3661
|
+
if (a !== "direct" || !m) return;
|
|
3648
3662
|
let e = !1;
|
|
3649
|
-
|
|
3650
|
-
|
|
3663
|
+
l(!0), d(!1);
|
|
3664
|
+
let t = _.current, n = (t) => {
|
|
3665
|
+
let n = t.target;
|
|
3666
|
+
n?.error && n.error.code === 4 && !e && d(!0);
|
|
3667
|
+
};
|
|
3668
|
+
return t?.addEventListener("error", n, !0), (async () => {
|
|
3651
3669
|
if (t) try {
|
|
3652
3670
|
let [{ default: n }] = await Promise.all([import("xgplayer")]);
|
|
3653
|
-
if (e || !
|
|
3654
|
-
|
|
3671
|
+
if (e || !_.current) return;
|
|
3672
|
+
g.current?.destroy(), t.replaceChildren(), g.current = new n({
|
|
3655
3673
|
el: t,
|
|
3656
|
-
url:
|
|
3674
|
+
url: m,
|
|
3657
3675
|
width: "100%",
|
|
3658
3676
|
height: 450,
|
|
3659
3677
|
fluid: !0,
|
|
@@ -3670,19 +3688,21 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3670
3688
|
2
|
|
3671
3689
|
],
|
|
3672
3690
|
lang: "zh-cn"
|
|
3673
|
-
}), t.__xgplayer =
|
|
3691
|
+
}), t.__xgplayer = g.current;
|
|
3674
3692
|
let r = () => {
|
|
3675
3693
|
e || l(!1);
|
|
3676
3694
|
};
|
|
3677
3695
|
try {
|
|
3678
|
-
|
|
3696
|
+
g.current?.once?.("loadeddata", r), g.current?.once?.("canplay", r);
|
|
3679
3697
|
} catch {}
|
|
3680
3698
|
window.setTimeout(r, 2500);
|
|
3681
3699
|
} catch {}
|
|
3682
3700
|
})(), () => {
|
|
3683
|
-
e = !0, l(!1),
|
|
3701
|
+
e = !0, t?.removeEventListener("error", n, !0), l(!1), g.current?.destroy(), g.current = null, _.current && (_.current.__xgplayer = null);
|
|
3684
3702
|
};
|
|
3685
|
-
}, [a,
|
|
3703
|
+
}, [a, m]), x(() => {
|
|
3704
|
+
u && (g.current?.destroy(), g.current = null);
|
|
3705
|
+
}, [u]), a === "bilibili") {
|
|
3686
3706
|
let e = Ln(r);
|
|
3687
3707
|
return /* @__PURE__ */ O(te, {
|
|
3688
3708
|
as: "div",
|
|
@@ -3690,7 +3710,7 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3690
3710
|
style: { margin: "1rem 0" },
|
|
3691
3711
|
contentEditable: !1,
|
|
3692
3712
|
children: [/* @__PURE__ */ O("div", {
|
|
3693
|
-
ref:
|
|
3713
|
+
ref: v,
|
|
3694
3714
|
style: {
|
|
3695
3715
|
borderRadius: 12,
|
|
3696
3716
|
overflow: "hidden"
|
|
@@ -3702,7 +3722,7 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3702
3722
|
type: "button",
|
|
3703
3723
|
className: "video-fs-btn",
|
|
3704
3724
|
title: "宽屏",
|
|
3705
|
-
onClick:
|
|
3725
|
+
onClick: A,
|
|
3706
3726
|
children: /* @__PURE__ */ D("svg", {
|
|
3707
3727
|
width: "12",
|
|
3708
3728
|
height: "12",
|
|
@@ -3721,7 +3741,7 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3721
3741
|
type: "button",
|
|
3722
3742
|
className: "video-fs-btn",
|
|
3723
3743
|
title: "网页全屏",
|
|
3724
|
-
onClick:
|
|
3744
|
+
onClick: j,
|
|
3725
3745
|
children: /* @__PURE__ */ D("svg", {
|
|
3726
3746
|
width: "12",
|
|
3727
3747
|
height: "12",
|
|
@@ -3740,7 +3760,7 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3740
3760
|
type: "button",
|
|
3741
3761
|
className: "video-fs-btn",
|
|
3742
3762
|
title: "全屏",
|
|
3743
|
-
onClick:
|
|
3763
|
+
onClick: M,
|
|
3744
3764
|
children: /* @__PURE__ */ D("svg", {
|
|
3745
3765
|
width: "12",
|
|
3746
3766
|
height: "12",
|
|
@@ -3755,7 +3775,7 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3755
3775
|
})
|
|
3756
3776
|
})
|
|
3757
3777
|
}),
|
|
3758
|
-
|
|
3778
|
+
f && /* @__PURE__ */ D("button", {
|
|
3759
3779
|
type: "button",
|
|
3760
3780
|
className: "video-fs-btn video-fs-btn--del",
|
|
3761
3781
|
title: "删除",
|
|
@@ -3783,7 +3803,7 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3783
3803
|
paddingTop: "56.25%"
|
|
3784
3804
|
},
|
|
3785
3805
|
children: /* @__PURE__ */ D("iframe", {
|
|
3786
|
-
ref:
|
|
3806
|
+
ref: y,
|
|
3787
3807
|
src: `https://player.bilibili.com/player.html?bvid=${e}&page=1&high_quality=1`,
|
|
3788
3808
|
style: {
|
|
3789
3809
|
position: "absolute",
|
|
@@ -3799,7 +3819,7 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3799
3819
|
referrerPolicy: "no-referrer-when-downgrade"
|
|
3800
3820
|
})
|
|
3801
3821
|
})]
|
|
3802
|
-
}),
|
|
3822
|
+
}), p]
|
|
3803
3823
|
});
|
|
3804
3824
|
}
|
|
3805
3825
|
return a === "xiaohongshu" ? /* @__PURE__ */ O(te, {
|
|
@@ -3860,7 +3880,7 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3860
3880
|
contentEditable: !1,
|
|
3861
3881
|
onKeyDown: (e) => e.stopPropagation(),
|
|
3862
3882
|
children: [
|
|
3863
|
-
|
|
3883
|
+
f && /* @__PURE__ */ O("div", {
|
|
3864
3884
|
className: "video-fs-controls",
|
|
3865
3885
|
children: [/* @__PURE__ */ D("button", {
|
|
3866
3886
|
type: "button",
|
|
@@ -3886,7 +3906,7 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3886
3906
|
type: "button",
|
|
3887
3907
|
className: "video-fs-btn",
|
|
3888
3908
|
title: "全屏",
|
|
3889
|
-
onClick:
|
|
3909
|
+
onClick: N,
|
|
3890
3910
|
children: /* @__PURE__ */ D("svg", {
|
|
3891
3911
|
width: "12",
|
|
3892
3912
|
height: "12",
|
|
@@ -3902,14 +3922,69 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3902
3922
|
})
|
|
3903
3923
|
})]
|
|
3904
3924
|
}),
|
|
3905
|
-
/* @__PURE__ */
|
|
3925
|
+
/* @__PURE__ */ D("div", {
|
|
3906
3926
|
style: {
|
|
3907
3927
|
position: "relative",
|
|
3908
3928
|
width: "100%",
|
|
3909
3929
|
background: "#000"
|
|
3910
3930
|
},
|
|
3911
|
-
children:
|
|
3912
|
-
|
|
3931
|
+
children: u ? /* @__PURE__ */ O("div", {
|
|
3932
|
+
style: {
|
|
3933
|
+
minHeight: 260,
|
|
3934
|
+
display: "flex",
|
|
3935
|
+
flexDirection: "column",
|
|
3936
|
+
alignItems: "center",
|
|
3937
|
+
justifyContent: "center",
|
|
3938
|
+
gap: "0.5rem",
|
|
3939
|
+
padding: "1.25rem",
|
|
3940
|
+
textAlign: "center",
|
|
3941
|
+
color: "#fff"
|
|
3942
|
+
},
|
|
3943
|
+
children: [
|
|
3944
|
+
/* @__PURE__ */ O("svg", {
|
|
3945
|
+
width: "36",
|
|
3946
|
+
height: "36",
|
|
3947
|
+
viewBox: "0 0 24 24",
|
|
3948
|
+
fill: "none",
|
|
3949
|
+
stroke: "currentColor",
|
|
3950
|
+
strokeWidth: "1.6",
|
|
3951
|
+
strokeLinecap: "round",
|
|
3952
|
+
strokeLinejoin: "round",
|
|
3953
|
+
style: { opacity: .6 },
|
|
3954
|
+
children: [
|
|
3955
|
+
/* @__PURE__ */ D("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
3956
|
+
/* @__PURE__ */ D("line", {
|
|
3957
|
+
x1: "12",
|
|
3958
|
+
y1: "9",
|
|
3959
|
+
x2: "12",
|
|
3960
|
+
y2: "13"
|
|
3961
|
+
}),
|
|
3962
|
+
/* @__PURE__ */ D("line", {
|
|
3963
|
+
x1: "12",
|
|
3964
|
+
y1: "17",
|
|
3965
|
+
x2: "12.01",
|
|
3966
|
+
y2: "17"
|
|
3967
|
+
})
|
|
3968
|
+
]
|
|
3969
|
+
}),
|
|
3970
|
+
/* @__PURE__ */ D("div", {
|
|
3971
|
+
style: {
|
|
3972
|
+
fontSize: 14,
|
|
3973
|
+
fontWeight: 500
|
|
3974
|
+
},
|
|
3975
|
+
children: "视频编码不受当前浏览器支持(HEVC/H.265 常见)"
|
|
3976
|
+
}),
|
|
3977
|
+
/* @__PURE__ */ D("div", {
|
|
3978
|
+
style: {
|
|
3979
|
+
fontSize: 12,
|
|
3980
|
+
opacity: .7,
|
|
3981
|
+
lineHeight: 1.5
|
|
3982
|
+
},
|
|
3983
|
+
children: "请安装「HEVC 视频扩展」,或将视频转码为 H.264 后重新上传"
|
|
3984
|
+
})
|
|
3985
|
+
]
|
|
3986
|
+
}) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", {
|
|
3987
|
+
ref: _,
|
|
3913
3988
|
style: {
|
|
3914
3989
|
width: "100%",
|
|
3915
3990
|
minHeight: 260
|
|
@@ -3917,9 +3992,9 @@ function Rn({ node: e, deleteNode: t, editor: n }) {
|
|
|
3917
3992
|
}), c && /* @__PURE__ */ D("div", {
|
|
3918
3993
|
className: "xg-loading-overlay",
|
|
3919
3994
|
children: /* @__PURE__ */ D("span", { className: "xg-loading-spinner" })
|
|
3920
|
-
})]
|
|
3995
|
+
})] })
|
|
3921
3996
|
}),
|
|
3922
|
-
|
|
3997
|
+
p
|
|
3923
3998
|
]
|
|
3924
3999
|
});
|
|
3925
4000
|
}
|