@salina-app/media-editor 0.0.13 → 0.0.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.
@@ -0,0 +1,10 @@
1
+ import { AxiosRequestHeaders, ResponseType } from 'axios';
2
+ export interface IAxios<P, B> {
3
+ url: string;
4
+ params?: P;
5
+ body?: B;
6
+ data?: B;
7
+ headers?: AxiosRequestHeaders;
8
+ responseType?: ResponseType;
9
+ onUploadProgress?: (progressEvent: any) => void;
10
+ }
@@ -0,0 +1,28 @@
1
+ import { IResponse } from './IResponse';
2
+ import { ITranscript } from './ITranscript';
3
+ export type IMergedPayload = {
4
+ title: string;
5
+ access_token: string;
6
+ };
7
+ export type IMerged = {
8
+ _id: string;
9
+ title: string;
10
+ type: string;
11
+ sources: string[];
12
+ segment_type: string | null;
13
+ file_path: string;
14
+ partial: boolean | null;
15
+ is_done: boolean;
16
+ process_status: string | null;
17
+ redirect_url: string | null;
18
+ transcription: ITranscript[] | null;
19
+ clip_datetime: string | null;
20
+ created_by: string | null;
21
+ updated_by: string | null;
22
+ date_created: string;
23
+ date_updated: string;
24
+ error_message?: string;
25
+ };
26
+ export type IMergedResponse = IResponse & {
27
+ data: IMerged[];
28
+ };
@@ -7,6 +7,7 @@ export type ITrimmedPayload = {
7
7
  };
8
8
  export type ITrimmed = {
9
9
  _id: string;
10
+ article_obj_id: string | null;
10
11
  title: string;
11
12
  type: string;
12
13
  sources: ISource[];
@@ -22,12 +23,13 @@ export type ITrimmed = {
22
23
  created_by: string | null;
23
24
  updated_by: string | null;
24
25
  date_created: string;
25
- date_updated: string;
26
+ date_updated: string | null;
26
27
  id: string;
27
28
  timestamp_one: string;
28
29
  timestamp_two: string;
29
30
  segment: string;
30
31
  end_timestamp_drag?: any;
32
+ data_status?: string;
31
33
  };
32
34
  export type ITrimmedResponse = IResponse & {
33
35
  data: ITrimmed[];
@@ -0,0 +1,6 @@
1
+ export interface IVideoMetadata {
2
+ videoTitle: string;
3
+ videoLink: string;
4
+ trimmed: boolean;
5
+ fileType: string;
6
+ }
package/dist/main.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import { default as Button, buttonVariants } from './components/ui/button';
2
2
  import { default as Player } from './components/customs/Player/Player';
3
3
  import { default as Timeline } from './components/customs/Timeline/Timeline';
4
+ import { Toaster } from './components/ui/toaster';
4
5
  import { useFocusTrimmedClipStore } from './zustand/focusTrimmedClip';
5
6
  import { useTimelineStore } from './zustand/TimelineStore';
6
7
  import { useVideoPlayerStore } from './zustand/videoPlayerStore';
7
- export { Button, buttonVariants, Player, Timeline, useFocusTrimmedClipStore, useTimelineStore, useVideoPlayerStore, };
8
+ import { useKeyboardShortcuts } from './hooks/useKeyboardShortcuts';
9
+ export { Button, buttonVariants, Player, Timeline, useFocusTrimmedClipStore, useTimelineStore, useVideoPlayerStore, useKeyboardShortcuts, Toaster, };
@@ -1,5 +1,7 @@
1
1
  import { default as Timeline } from '../components/customs/Timeline/Timeline';
2
+ import { ITrimmed } from '../lib/typings/ITrimmed';
2
3
  import { Meta, StoryObj } from '@storybook/react';
4
+ import { IVideoMetadata } from '../lib/typings/IVideoMetadata';
3
5
  declare const meta: Meta<typeof Timeline>;
4
6
  export default meta;
5
7
  type Story = StoryObj<StoryProps>;
@@ -7,5 +9,11 @@ interface StoryProps {
7
9
  src: string;
8
10
  audioSrc: string;
9
11
  thumbnails: string[];
12
+ trimmedClips: ITrimmed[];
13
+ mainFilePath: string;
14
+ path: string;
15
+ userToken: string;
16
+ videoMetadata: IVideoMetadata;
10
17
  }
11
- export declare const PepitoManaloto: Story;
18
+ export declare const Trimming: Story;
19
+ export declare const Merge: Story;
@@ -0,0 +1,13 @@
1
+ type IAlertDialog = {
2
+ isOpen: boolean;
3
+ title: string;
4
+ description: string;
5
+ variant: 'default' | 'destructive';
6
+ onConfirm: () => void;
7
+ };
8
+ type AlertDialogStore = {
9
+ alertDialog: IAlertDialog;
10
+ setAlertDialog: (alertDialog: IAlertDialog) => void;
11
+ };
12
+ export declare const useAlertDialogStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AlertDialogStore>>;
13
+ export {};
@@ -0,0 +1,15 @@
1
+ import { IMerged } from '../lib/typings/IMerged';
2
+ type ToMergeInfoType = {
3
+ name: string;
4
+ path: string;
5
+ };
6
+ type MergeStore = {
7
+ toMergeInfo: ToMergeInfoType[];
8
+ setToMergeInfo: (toMergeInfo: ToMergeInfoType[]) => void;
9
+ mergingInfo: IMerged | null;
10
+ setMergingInfo: (mergingInfo: IMerged | null) => void;
11
+ mergedSelectedInfo: IMerged | null;
12
+ setMergedSelectedInfo: (mergedSelectedInfo: IMerged | null) => void;
13
+ };
14
+ export declare const useMergeStore: import('zustand').UseBoundStore<import('zustand').StoreApi<MergeStore>>;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ITrimmed } from '../lib/typings/ITrimmed';
2
+ type TrimmedClipsStore = {
3
+ trimmedClips: ITrimmed[];
4
+ setTrimmedClips: (trimmedClips: ITrimmed[]) => void;
5
+ };
6
+ export declare const useTrimmedClipsStore: import('zustand').UseBoundStore<import('zustand').StoreApi<TrimmedClipsStore>>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ITrimmerStamp } from '../lib/typings/ITrimmed';
2
+ type TrimmerStampStore = {
3
+ trimmerStamp: ITrimmerStamp;
4
+ setTrimmerStamp: (trimmerStamp: ITrimmerStamp) => void;
5
+ };
6
+ export declare const useTrimmerStampStore: import('zustand').UseBoundStore<import('zustand').StoreApi<TrimmerStampStore>>;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { IVideoMetadata } from '../lib/typings/IVideoMetadata';
2
+ type VideoMetadataStore = {
3
+ videoMetadata: IVideoMetadata;
4
+ setVideoMetadata: (videoMetadata: IVideoMetadata) => void;
5
+ resetVideoMetaData: () => void;
6
+ };
7
+ export declare const videoMetadataInitialState: IVideoMetadata;
8
+ export declare const useVideoMetadataStore: import('zustand').UseBoundStore<import('zustand').StoreApi<VideoMetadataStore>>;
9
+ export {};
@@ -20,7 +20,7 @@ interface VideoPlayerState {
20
20
  videoIsReady: boolean;
21
21
  setVideoIsReady: (value: boolean) => void;
22
22
  playerRef: any | null;
23
- setPlayerRef: (playerRef: any | null) => void;
23
+ setPlayerRef: (playerRef: any) => void;
24
24
  activeTranscript: string | undefined;
25
25
  setActiveTranscript: (value: string) => void;
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salina-app/media-editor",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/main.d.ts",
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@iconify/react": "^5.2.0",
25
+ "@radix-ui/react-alert-dialog": "^1.1.4",
25
26
  "@radix-ui/react-dialog": "^1.1.4",
26
27
  "@radix-ui/react-icons": "^1.3.2",
27
28
  "@radix-ui/react-slot": "^1.1.1",
@@ -32,6 +33,7 @@
32
33
  "clsx": "^2.1.1",
33
34
  "date-fns": "^4.1.0",
34
35
  "framer-motion": "^11.15.0",
36
+ "jwt-encode": "^1.0.1",
35
37
  "lucide-react": "^0.469.0",
36
38
  "react": "^18.3.1",
37
39
  "react-dom": "^18.3.1",
@@ -54,6 +56,7 @@
54
56
  "@storybook/react": "8.4.7",
55
57
  "@storybook/react-vite": "8.4.7",
56
58
  "@storybook/test": "8.4.7",
59
+ "@types/jwt-encode": "^1.0.3",
57
60
  "@types/node": "^22.10.5",
58
61
  "@types/react": "^18.3.18",
59
62
  "@types/react-dom": "^18.3.5",