@salina-app/media-editor 0.2.14 → 0.2.16
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.
|
@@ -8,5 +8,5 @@ type SubDirectoryListProps = IDirectory & {
|
|
|
8
8
|
onTokenError?: () => void;
|
|
9
9
|
onFileClick?: (url?: string) => Promise<void>;
|
|
10
10
|
};
|
|
11
|
-
declare const _default: import('react').MemoExoticComponent<({ is_directory, name,
|
|
11
|
+
declare const _default: import('react').MemoExoticComponent<({ is_directory, name, original_title, path, endpoint, fromMain, fromUpload, reloadTriggerMain, userToken, onFileClick, }: SubDirectoryListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
12
|
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -76414,8 +76414,8 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
|
|
|
76414
76414
|
}, jj = ({
|
|
76415
76415
|
is_directory: t,
|
|
76416
76416
|
name: e,
|
|
76417
|
-
|
|
76418
|
-
|
|
76417
|
+
original_title: n = "",
|
|
76418
|
+
path: r,
|
|
76419
76419
|
endpoint: i,
|
|
76420
76420
|
fromMain: a,
|
|
76421
76421
|
fromUpload: l,
|
|
@@ -76442,24 +76442,24 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
|
|
|
76442
76442
|
if ($(""), !Q.includes("merged")) {
|
|
76443
76443
|
E([]), P([]), M("");
|
|
76444
76444
|
const Te = await x({
|
|
76445
|
-
source:
|
|
76445
|
+
source: r,
|
|
76446
76446
|
access_token: h
|
|
76447
76447
|
});
|
|
76448
76448
|
Te.status || Te.success ? I(Te.data.files) : I([]), B(null);
|
|
76449
76449
|
}
|
|
76450
76450
|
if (e.includes("Merge") || Q.includes("merged")) {
|
|
76451
|
-
const Ce =
|
|
76451
|
+
const Ce = r.split("/")[2], qe = e.replace(new RegExp(Ce.replace(/\s+/g, "_"), "g"), "").split(".")[0], Xe = await S({
|
|
76452
76452
|
title: `${Ce}${qe}`,
|
|
76453
76453
|
access_token: h
|
|
76454
76454
|
});
|
|
76455
76455
|
M(Xe.data[0]._id), B(Xe.data[0]), Xe.data.length && Xe.data[0].transcription ? P(Xe.data[0].transcription) : P([]), E([]);
|
|
76456
76456
|
}
|
|
76457
|
-
await (p == null ? void 0 : p(ue)), j(
|
|
76457
|
+
await (p == null ? void 0 : p(ue)), j(r), q(""), _(), G({
|
|
76458
76458
|
videoTitle: e,
|
|
76459
76459
|
videoLink: ue,
|
|
76460
76460
|
trimmed: !1,
|
|
76461
76461
|
fileType: "raw",
|
|
76462
|
-
original_title:
|
|
76462
|
+
original_title: n
|
|
76463
76463
|
});
|
|
76464
76464
|
} catch (Te) {
|
|
76465
76465
|
console.log(Te), Te.response.data.detail === "401: Invalid Access Token" && Wo({
|
|
@@ -76470,12 +76470,13 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
|
|
|
76470
76470
|
}
|
|
76471
76471
|
}, ie = async (Q) => {
|
|
76472
76472
|
if (ne)
|
|
76473
|
-
ce(!1);
|
|
76473
|
+
ce(!1), X === Q && j("");
|
|
76474
76474
|
else {
|
|
76475
76475
|
re(!0);
|
|
76476
76476
|
try {
|
|
76477
|
+
X && X !== Q && j("");
|
|
76477
76478
|
const ue = await b(i + Q);
|
|
76478
|
-
ve(U8(ue.data.files)), ce(!0);
|
|
76479
|
+
ve(U8(ue.data.files)), ce(!0), j(Q);
|
|
76479
76480
|
} catch (ue) {
|
|
76480
76481
|
console.log(ue);
|
|
76481
76482
|
} finally {
|
|
@@ -76486,7 +76487,7 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
|
|
|
76486
76487
|
if (t && ne) {
|
|
76487
76488
|
re(!0);
|
|
76488
76489
|
try {
|
|
76489
|
-
const Q = await b(
|
|
76490
|
+
const Q = await b(r);
|
|
76490
76491
|
ve(U8(Q.data.files));
|
|
76491
76492
|
} catch (Q) {
|
|
76492
76493
|
console.error("Error reloading directory:", Q);
|
|
@@ -76504,16 +76505,16 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
|
|
|
76504
76505
|
type: "button",
|
|
76505
76506
|
className: ct(
|
|
76506
76507
|
"group flex h-auto w-full cursor-pointer gap-[5px] rounded-md bg-transparent px-[8px] py-[2px] text-left text-sm hover:bg-primary-500/90 hover:text-white",
|
|
76507
|
-
X ===
|
|
76508
|
+
X === r && "bg-primary-500 text-white",
|
|
76508
76509
|
a ? "w-[60%] min-w-min" : "w-full"
|
|
76509
76510
|
),
|
|
76510
76511
|
onClick: async () => {
|
|
76511
76512
|
if (l) return;
|
|
76512
76513
|
A(!1);
|
|
76513
|
-
const Q =
|
|
76514
|
+
const Q = r.lastIndexOf("/"), Te = `${r.substring(0, Q)}/${e}`, Ce = `${m}/stream/video?file=${Te}`;
|
|
76514
76515
|
W.videoLink !== Ce && setTimeout(() => {
|
|
76515
76516
|
ge(
|
|
76516
|
-
`${
|
|
76517
|
+
`${r.substring(0, r.lastIndexOf("/"))}`,
|
|
76517
76518
|
Ce
|
|
76518
76519
|
);
|
|
76519
76520
|
}, 50);
|
|
@@ -76523,14 +76524,14 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
|
|
|
76523
76524
|
b0e,
|
|
76524
76525
|
{
|
|
76525
76526
|
fileName: e,
|
|
76526
|
-
filePath:
|
|
76527
|
+
filePath: r,
|
|
76527
76528
|
mainFilePath: X
|
|
76528
76529
|
}
|
|
76529
76530
|
),
|
|
76530
76531
|
/* @__PURE__ */ z(
|
|
76531
76532
|
"div",
|
|
76532
76533
|
{
|
|
76533
|
-
title:
|
|
76534
|
+
title: n || e,
|
|
76534
76535
|
style: { wordWrap: "break-word" },
|
|
76535
76536
|
className: ct(e.includes("Merge") ? "w-[150px]" : "truncate"),
|
|
76536
76537
|
children: e.includes("Merge") ? e : $j(e)
|
|
@@ -76555,14 +76556,14 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
|
|
|
76555
76556
|
t ? "flex" : "hidden"
|
|
76556
76557
|
),
|
|
76557
76558
|
children: [
|
|
76558
|
-
/* @__PURE__ */ z("div", { className: "flex flex-row items-center", children: /* @__PURE__ */ z(p0e, { color:
|
|
76559
|
+
/* @__PURE__ */ z("div", { className: "flex flex-row items-center", children: /* @__PURE__ */ z(p0e, { color: X === r ? "#E05044" : "" }) }),
|
|
76559
76560
|
/* @__PURE__ */ ut(
|
|
76560
76561
|
"button",
|
|
76561
76562
|
{
|
|
76562
76563
|
type: "button",
|
|
76563
76564
|
className: "flex h-auto min-h-[32px] w-full cursor-pointer flex-row flex-wrap items-center text-left text-sm",
|
|
76564
76565
|
onClick: () => {
|
|
76565
|
-
ie(
|
|
76566
|
+
ie(r);
|
|
76566
76567
|
},
|
|
76567
76568
|
children: [
|
|
76568
76569
|
/* @__PURE__ */ z(
|
|
@@ -76570,7 +76571,7 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
|
|
|
76570
76571
|
{
|
|
76571
76572
|
className: ct(
|
|
76572
76573
|
"max-w-[170px]",
|
|
76573
|
-
|
|
76574
|
+
X === r && "text-primary-500"
|
|
76574
76575
|
),
|
|
76575
76576
|
children: e
|
|
76576
76577
|
}
|