remotion 4.0.288 → 4.0.290
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/cjs/Artifact.d.ts +6 -2
- package/dist/cjs/Artifact.js +13 -2
- package/dist/cjs/CompositionManager.d.ts +10 -3
- package/dist/cjs/validation/validate-artifact.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +16 -3
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/Artifact.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
declare const ArtifactThumbnail: unique symbol;
|
|
2
3
|
export declare const Artifact: React.FC<{
|
|
3
4
|
readonly filename: string;
|
|
4
|
-
readonly content: string | Uint8Array;
|
|
5
|
-
}
|
|
5
|
+
readonly content: string | Uint8Array | typeof ArtifactThumbnail;
|
|
6
|
+
}> & {
|
|
7
|
+
Thumbnail: typeof ArtifactThumbnail;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
package/dist/cjs/Artifact.js
CHANGED
|
@@ -5,6 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const RenderAssetManager_1 = require("./RenderAssetManager");
|
|
6
6
|
const get_remotion_environment_1 = require("./get-remotion-environment");
|
|
7
7
|
const use_current_frame_1 = require("./use-current-frame");
|
|
8
|
+
const ArtifactThumbnail = Symbol('Thumbnail');
|
|
8
9
|
const Artifact = ({ filename, content }) => {
|
|
9
10
|
const { registerRenderAsset, unregisterRenderAsset } = (0, react_1.useContext)(RenderAssetManager_1.RenderAssetManager);
|
|
10
11
|
const [env] = (0, react_1.useState)(() => (0, get_remotion_environment_1.getRemotionEnvironment)());
|
|
@@ -23,7 +24,16 @@ const Artifact = ({ filename, content }) => {
|
|
|
23
24
|
content: btoa(new TextDecoder('utf8').decode(content)),
|
|
24
25
|
filename,
|
|
25
26
|
frame,
|
|
26
|
-
|
|
27
|
+
contentType: 'binary',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
else if (content === ArtifactThumbnail) {
|
|
31
|
+
registerRenderAsset({
|
|
32
|
+
type: 'artifact',
|
|
33
|
+
id,
|
|
34
|
+
filename,
|
|
35
|
+
frame,
|
|
36
|
+
contentType: 'thumbnail',
|
|
27
37
|
});
|
|
28
38
|
}
|
|
29
39
|
else {
|
|
@@ -33,7 +43,7 @@ const Artifact = ({ filename, content }) => {
|
|
|
33
43
|
content,
|
|
34
44
|
filename,
|
|
35
45
|
frame,
|
|
36
|
-
|
|
46
|
+
contentType: 'text',
|
|
37
47
|
});
|
|
38
48
|
}
|
|
39
49
|
return () => {
|
|
@@ -51,3 +61,4 @@ const Artifact = ({ filename, content }) => {
|
|
|
51
61
|
return null;
|
|
52
62
|
};
|
|
53
63
|
exports.Artifact = Artifact;
|
|
64
|
+
exports.Artifact.Thumbnail = ArtifactThumbnail;
|
|
@@ -67,14 +67,21 @@ export type AudioOrVideoAsset = {
|
|
|
67
67
|
toneFrequency: number | null;
|
|
68
68
|
audioStartFrame: number;
|
|
69
69
|
};
|
|
70
|
+
type DiscriminatedArtifact = {
|
|
71
|
+
contentType: 'binary';
|
|
72
|
+
content: string;
|
|
73
|
+
} | {
|
|
74
|
+
contentType: 'text';
|
|
75
|
+
content: string;
|
|
76
|
+
} | {
|
|
77
|
+
contentType: 'thumbnail';
|
|
78
|
+
};
|
|
70
79
|
export type ArtifactAsset = {
|
|
71
80
|
type: 'artifact';
|
|
72
81
|
id: string;
|
|
73
82
|
filename: string;
|
|
74
|
-
content: string | Uint8Array;
|
|
75
83
|
frame: number;
|
|
76
|
-
|
|
77
|
-
};
|
|
84
|
+
} & DiscriminatedArtifact;
|
|
78
85
|
export type TRenderAsset = AudioOrVideoAsset | ArtifactAsset;
|
|
79
86
|
export declare const compositionsRef: React.RefObject<{
|
|
80
87
|
getCompositions: () => AnyComposition[];
|
|
@@ -27,6 +27,9 @@ const validateRenderAsset = (artifact) => {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
(0, exports.validateArtifactFilename)(artifact.filename);
|
|
30
|
+
if (artifact.contentType === 'thumbnail') {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
30
33
|
validateContent(artifact.content);
|
|
31
34
|
};
|
|
32
35
|
exports.validateRenderAsset = validateRenderAsset;
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -104,7 +104,7 @@ function truthy(value) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
// src/version.ts
|
|
107
|
-
var VERSION = "4.0.
|
|
107
|
+
var VERSION = "4.0.290";
|
|
108
108
|
|
|
109
109
|
// src/multiple-versions-warning.ts
|
|
110
110
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -1973,6 +1973,9 @@ var validateRenderAsset = (artifact) => {
|
|
|
1973
1973
|
return;
|
|
1974
1974
|
}
|
|
1975
1975
|
validateArtifactFilename(artifact.filename);
|
|
1976
|
+
if (artifact.contentType === "thumbnail") {
|
|
1977
|
+
return;
|
|
1978
|
+
}
|
|
1976
1979
|
validateContent(artifact.content);
|
|
1977
1980
|
};
|
|
1978
1981
|
|
|
@@ -2022,6 +2025,7 @@ var RenderAssetManagerProvider = ({ children }) => {
|
|
|
2022
2025
|
};
|
|
2023
2026
|
|
|
2024
2027
|
// src/Artifact.tsx
|
|
2028
|
+
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
2025
2029
|
var Artifact = ({ filename, content }) => {
|
|
2026
2030
|
const { registerRenderAsset, unregisterRenderAsset } = useContext11(RenderAssetManager);
|
|
2027
2031
|
const [env] = useState7(() => getRemotionEnvironment());
|
|
@@ -2040,7 +2044,15 @@ var Artifact = ({ filename, content }) => {
|
|
|
2040
2044
|
content: btoa(new TextDecoder("utf8").decode(content)),
|
|
2041
2045
|
filename,
|
|
2042
2046
|
frame,
|
|
2043
|
-
|
|
2047
|
+
contentType: "binary"
|
|
2048
|
+
});
|
|
2049
|
+
} else if (content === ArtifactThumbnail) {
|
|
2050
|
+
registerRenderAsset({
|
|
2051
|
+
type: "artifact",
|
|
2052
|
+
id,
|
|
2053
|
+
filename,
|
|
2054
|
+
frame,
|
|
2055
|
+
contentType: "thumbnail"
|
|
2044
2056
|
});
|
|
2045
2057
|
} else {
|
|
2046
2058
|
registerRenderAsset({
|
|
@@ -2049,7 +2061,7 @@ var Artifact = ({ filename, content }) => {
|
|
|
2049
2061
|
content,
|
|
2050
2062
|
filename,
|
|
2051
2063
|
frame,
|
|
2052
|
-
|
|
2064
|
+
contentType: "text"
|
|
2053
2065
|
});
|
|
2054
2066
|
}
|
|
2055
2067
|
return () => {
|
|
@@ -2066,6 +2078,7 @@ var Artifact = ({ filename, content }) => {
|
|
|
2066
2078
|
]);
|
|
2067
2079
|
return null;
|
|
2068
2080
|
};
|
|
2081
|
+
Artifact.Thumbnail = ArtifactThumbnail;
|
|
2069
2082
|
// src/audio/Audio.tsx
|
|
2070
2083
|
import { forwardRef as forwardRef6, useCallback as useCallback11, useContext as useContext23 } from "react";
|
|
2071
2084
|
|
package/dist/esm/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
|
|
4
4
|
},
|
|
5
5
|
"name": "remotion",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.290",
|
|
7
7
|
"description": "Make videos programmatically",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"webpack": "5.96.1",
|
|
29
29
|
"zod": "3.22.3",
|
|
30
30
|
"eslint": "9.19.0",
|
|
31
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
31
|
+
"@remotion/eslint-config-internal": "4.0.290"
|
|
32
32
|
},
|
|
33
33
|
"keywords": [
|
|
34
34
|
"remotion",
|