melies-video-editor 0.1.2 → 0.1.3
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.cjs +8 -8
- package/dist/index.js +1417 -1297
- package/dist/style.css +1 -1
- package/dist/types/App.d.ts +17 -1
- package/dist/types/dev/DevRoot.d.ts +4 -0
- package/dist/types/dev/HostApp.d.ts +6 -1
- package/dist/types/dev/opfs.d.ts +23 -0
- package/dist/types/mediaCache.d.ts +9 -0
- package/package.json +1 -1
package/dist/types/App.d.ts
CHANGED
|
@@ -5,6 +5,22 @@ export type MeliesVideoEditorProps = {
|
|
|
5
5
|
* When omitted or empty, the footage bin will be empty.
|
|
6
6
|
*/
|
|
7
7
|
footageUrls?: string[];
|
|
8
|
+
/**
|
|
9
|
+
* Local Files to show in the footage bin.
|
|
10
|
+
*
|
|
11
|
+
* This is ideal for OPFS (Base44 can load from OPFS and pass `File`s here).
|
|
12
|
+
*/
|
|
13
|
+
footageFiles?: File[];
|
|
14
|
+
/**
|
|
15
|
+
* Handle-like objects (e.g. `FileSystemFileHandle`) that can yield `File`s.
|
|
16
|
+
*
|
|
17
|
+
* We intentionally avoid depending on `FileSystemFileHandle` directly so
|
|
18
|
+
* consumers without that DOM lib type can still compile.
|
|
19
|
+
*/
|
|
20
|
+
footageFileHandles?: Array<{
|
|
21
|
+
getFile: () => Promise<File>;
|
|
22
|
+
name?: string;
|
|
23
|
+
}>;
|
|
8
24
|
/**
|
|
9
25
|
* When true, automatically place `footageUrls` onto the timeline on first initialization
|
|
10
26
|
* (one after another, starting at t=0).
|
|
@@ -13,5 +29,5 @@ export type MeliesVideoEditorProps = {
|
|
|
13
29
|
*/
|
|
14
30
|
autoPlaceFootage?: boolean;
|
|
15
31
|
};
|
|
16
|
-
declare const MeliesVideoEditor: ({ footageUrls, autoPlaceFootage }: MeliesVideoEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare const MeliesVideoEditor: ({ footageUrls, footageFiles, footageFileHandles, autoPlaceFootage, }: MeliesVideoEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
33
|
export default MeliesVideoEditor;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
export default function HostApp({ footageUrls }: {
|
|
1
|
+
export default function HostApp({ footageUrls, footageFiles, footageFileHandles, }: {
|
|
2
2
|
footageUrls?: string[];
|
|
3
|
+
footageFiles?: File[];
|
|
4
|
+
footageFileHandles?: Array<{
|
|
5
|
+
getFile: () => Promise<File>;
|
|
6
|
+
name?: string;
|
|
7
|
+
}>;
|
|
3
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type OpfsRoot = FileSystemDirectoryHandle;
|
|
2
|
+
type Maybe<T> = T | null | undefined;
|
|
3
|
+
export declare const ensureOpfsRoot: () => Promise<OpfsRoot>;
|
|
4
|
+
export declare const ensureDir: (root: OpfsRoot, path: string) => Promise<FileSystemDirectoryHandle>;
|
|
5
|
+
export declare const writeBlobToOpfs: (opts: {
|
|
6
|
+
root: OpfsRoot;
|
|
7
|
+
dirPath: string;
|
|
8
|
+
fileName: string;
|
|
9
|
+
blob: Blob;
|
|
10
|
+
}) => Promise<{
|
|
11
|
+
fileHandle: FileSystemFileHandle;
|
|
12
|
+
path: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const clearDir: (opts: {
|
|
15
|
+
root: OpfsRoot;
|
|
16
|
+
dirPath: string;
|
|
17
|
+
}) => Promise<void>;
|
|
18
|
+
export declare const listFiles: (opts: {
|
|
19
|
+
root: OpfsRoot;
|
|
20
|
+
dirPath: string;
|
|
21
|
+
}) => Promise<FileSystemFileHandle[]>;
|
|
22
|
+
export declare const getFileFromPublicUrl: (url: string, fallbackName?: Maybe<string>) => Promise<File>;
|
|
23
|
+
export {};
|
|
@@ -3,6 +3,15 @@ declare const guessKind: (src: string) => MediaKind;
|
|
|
3
3
|
declare class MediaCache {
|
|
4
4
|
private blobUrlBySrc;
|
|
5
5
|
private pendingBySrc;
|
|
6
|
+
private metaBySrc;
|
|
7
|
+
registerSrcMeta(src: string, meta: {
|
|
8
|
+
name?: string;
|
|
9
|
+
mimeType?: string;
|
|
10
|
+
}): void;
|
|
11
|
+
getSrcMeta(src: string): {
|
|
12
|
+
name?: string;
|
|
13
|
+
mimeType?: string;
|
|
14
|
+
} | undefined;
|
|
6
15
|
/**
|
|
7
16
|
* Preloads a URL into memory and returns a blob: URL.
|
|
8
17
|
* Useful to avoid runtime buffering/stalls when seeking frequently.
|