@salina-app/media-editor 0.2.13 → 0.2.15

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, path, original_title, endpoint, fromMain, fromUpload, reloadTriggerMain, userToken, onFileClick, }: SubDirectoryListProps) => import("react/jsx-runtime").JSX.Element>;
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
- path: n,
76418
- original_title: r,
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: n,
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 = n.split("/")[2], qe = e.replace(new RegExp(Ce.replace(/\s+/g, "_"), "g"), "").split(".")[0], Xe = await S({
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(n), q(""), _(), G({
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
- originalTitle: r
76462
+ original_title: n
76463
76463
  });
76464
76464
  } catch (Te) {
76465
76465
  console.log(Te), Te.response.data.detail === "401: Invalid Access Token" && Wo({
@@ -76486,7 +76486,7 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
76486
76486
  if (t && ne) {
76487
76487
  re(!0);
76488
76488
  try {
76489
- const Q = await b(n);
76489
+ const Q = await b(r);
76490
76490
  ve(U8(Q.data.files));
76491
76491
  } catch (Q) {
76492
76492
  console.error("Error reloading directory:", Q);
@@ -76504,16 +76504,16 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
76504
76504
  type: "button",
76505
76505
  className: ct(
76506
76506
  "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 === n && "bg-primary-500 text-white",
76507
+ X === r && "bg-primary-500 text-white",
76508
76508
  a ? "w-[60%] min-w-min" : "w-full"
76509
76509
  ),
76510
76510
  onClick: async () => {
76511
76511
  if (l) return;
76512
76512
  A(!1);
76513
- const Q = n.lastIndexOf("/"), Te = `${n.substring(0, Q)}/${e}`, Ce = `${m}/stream/video?file=${Te}`;
76513
+ const Q = r.lastIndexOf("/"), Te = `${r.substring(0, Q)}/${e}`, Ce = `${m}/stream/video?file=${Te}`;
76514
76514
  W.videoLink !== Ce && setTimeout(() => {
76515
76515
  ge(
76516
- `${n.substring(0, n.lastIndexOf("/"))}`,
76516
+ `${r.substring(0, r.lastIndexOf("/"))}`,
76517
76517
  Ce
76518
76518
  );
76519
76519
  }, 50);
@@ -76523,14 +76523,14 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
76523
76523
  b0e,
76524
76524
  {
76525
76525
  fileName: e,
76526
- filePath: n,
76526
+ filePath: r,
76527
76527
  mainFilePath: X
76528
76528
  }
76529
76529
  ),
76530
76530
  /* @__PURE__ */ z(
76531
76531
  "div",
76532
76532
  {
76533
- title: r || e,
76533
+ title: n || e,
76534
76534
  style: { wordWrap: "break-word" },
76535
76535
  className: ct(e.includes("Merge") ? "w-[150px]" : "truncate"),
76536
76536
  children: e.includes("Merge") ? e : $j(e)
@@ -76562,7 +76562,7 @@ const y0e = ({ className: t }) => /* @__PURE__ */ ut(
76562
76562
  type: "button",
76563
76563
  className: "flex h-auto min-h-[32px] w-full cursor-pointer flex-row flex-wrap items-center text-left text-sm",
76564
76564
  onClick: () => {
76565
- ie(n), l && n.split("/").length === 6 && j(n);
76565
+ ie(r), l && r.split("/").length === 6 && j(r);
76566
76566
  },
76567
76567
  children: [
76568
76568
  /* @__PURE__ */ z(
@@ -3,5 +3,5 @@ export interface IVideoMetadata {
3
3
  videoLink: string;
4
4
  trimmed: boolean;
5
5
  fileType: string;
6
- originalTitle?: string;
6
+ original_title?: string;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salina-app/media-editor",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/main.d.ts",