remotion 4.0.115 → 4.0.116

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.
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.115";
1
+ export declare const VERSION = "4.0.116";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Automatically generated on publish
5
- exports.VERSION = '4.0.115';
5
+ exports.VERSION = '4.0.116';
@@ -17,12 +17,18 @@ const watchStaticFile = (fileName, callback) => {
17
17
  console.warn('The API is only available while using the Remotion Studio.');
18
18
  return { cancel: () => undefined };
19
19
  }
20
- let prevFileData = window.remotion_staticFiles.find((file) => file.name === fileName);
20
+ const withoutStaticBase = fileName.startsWith(window.remotion_staticBase)
21
+ ? fileName.replace(window.remotion_staticBase, '')
22
+ : fileName;
23
+ const withoutLeadingSlash = withoutStaticBase.startsWith('/')
24
+ ? withoutStaticBase.slice(1)
25
+ : withoutStaticBase;
26
+ let prevFileData = window.remotion_staticFiles.find((file) => file.name === withoutLeadingSlash);
21
27
  // Check if the specified static file has updated or deleted
22
28
  const checkFile = (event) => {
23
29
  const staticFiles = event.detail.files;
24
30
  // Check for user specified file
25
- const newFileData = staticFiles.find((file) => file.name === fileName);
31
+ const newFileData = staticFiles.find((file) => file.name === withoutLeadingSlash);
26
32
  if (!newFileData) {
27
33
  // File is deleted
28
34
  if (prevFileData !== undefined) {
@@ -105,7 +105,7 @@ function truthy(value) {
105
105
  }
106
106
 
107
107
  // Automatically generated on publish
108
- const VERSION = '4.0.115';
108
+ const VERSION = '4.0.116';
109
109
 
110
110
  const checkMultipleRemotionVersions = () => {
111
111
  if (typeof globalThis === 'undefined') {
@@ -4142,12 +4142,18 @@ const watchStaticFile = (fileName, callback) => {
4142
4142
  console.warn('The API is only available while using the Remotion Studio.');
4143
4143
  return { cancel: () => undefined };
4144
4144
  }
4145
- let prevFileData = window.remotion_staticFiles.find((file) => file.name === fileName);
4145
+ const withoutStaticBase = fileName.startsWith(window.remotion_staticBase)
4146
+ ? fileName.replace(window.remotion_staticBase, '')
4147
+ : fileName;
4148
+ const withoutLeadingSlash = withoutStaticBase.startsWith('/')
4149
+ ? withoutStaticBase.slice(1)
4150
+ : withoutStaticBase;
4151
+ let prevFileData = window.remotion_staticFiles.find((file) => file.name === withoutLeadingSlash);
4146
4152
  // Check if the specified static file has updated or deleted
4147
4153
  const checkFile = (event) => {
4148
4154
  const staticFiles = event.detail.files;
4149
4155
  // Check for user specified file
4150
- const newFileData = staticFiles.find((file) => file.name === fileName);
4156
+ const newFileData = staticFiles.find((file) => file.name === withoutLeadingSlash);
4151
4157
  if (!newFileData) {
4152
4158
  // File is deleted
4153
4159
  if (prevFileData !== undefined) {
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.115';
2
+ const VERSION = '4.0.116';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.115",
3
+ "version": "4.0.116",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",