@remotion/bundler 4.0.502 → 4.0.504

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.
@@ -128,7 +128,6 @@ exports.injectCSS = injectCSS;
128
128
 
129
129
  .__remotion-timeline-slider {
130
130
  appearance: none;
131
- width: 100px;
132
131
  border-radius: 3px;
133
132
  height: 6px;
134
133
  background-color: rgba(255, 255, 255, 0.1);
@@ -10,11 +10,32 @@ const remotion_1 = require("remotion");
10
10
  const componentsToAddStacksTo = remotion_1.Internals.getComponentsToAddStacksTo();
11
11
  const sequenceComponent = remotion_1.Internals.getSequenceComponent();
12
12
  const internalStackProp = remotion_1.Internals.REMOTION_INTERNAL_STACK_PROP;
13
+ const studioOriginalSourcePrefix = 'studio-original://';
13
14
  const originalCreateElement = react_1.default.createElement;
14
15
  const originalJsx = jsx_runtime_1.default.jsx;
15
16
  const originalJsxs = jsx_runtime_1.default.jsxs;
16
17
  const originalJsxDev = jsx_dev_runtime_1.default.jsxDEV;
17
- const enableProxy = (api, isCreateElement) => {
18
+ const getSourceFileName = (fileName) => {
19
+ if (typeof window === 'undefined' || !window.remotion_cwd) {
20
+ return fileName;
21
+ }
22
+ const normalizedFileName = fileName.replaceAll('\\', '/');
23
+ const normalizedRoot = window.remotion_cwd
24
+ .replaceAll('\\', '/')
25
+ .replace(/\/+$/, '');
26
+ const shouldCompareCaseInsensitive = /^[a-z]:\//i.test(normalizedFileName) || /^[a-z]:\//i.test(normalizedRoot);
27
+ const comparableFileName = shouldCompareCaseInsensitive
28
+ ? normalizedFileName.toLowerCase()
29
+ : normalizedFileName;
30
+ const comparableRoot = shouldCompareCaseInsensitive
31
+ ? normalizedRoot.toLowerCase()
32
+ : normalizedRoot;
33
+ if (!comparableFileName.startsWith(`${comparableRoot}/`)) {
34
+ return normalizedFileName;
35
+ }
36
+ return `./${normalizedFileName.slice(normalizedRoot.length + 1)}`;
37
+ };
38
+ const enableProxy = (api, isCreateElement, sourceArgumentIndex) => {
18
39
  return new Proxy(api, {
19
40
  apply(target, thisArg, argArray) {
20
41
  if (componentsToAddStacksTo.includes(argArray[0])) {
@@ -24,11 +45,18 @@ const enableProxy = (api, isCreateElement) => {
24
45
  ? props === null || props === void 0 ? void 0 : props.children
25
46
  : rest
26
47
  : props === null || props === void 0 ? void 0 : props.children;
48
+ const source = sourceArgumentIndex === null ? null : argArray[sourceArgumentIndex];
49
+ const stack = source &&
50
+ typeof source.fileName === 'string' &&
51
+ typeof source.lineNumber === 'number' &&
52
+ typeof source.columnNumber === 'number'
53
+ ? `Error\n at remotionOriginalSource (${studioOriginalSourcePrefix}${encodeURIComponent(getSourceFileName(source.fileName))}:${source.lineNumber}:${source.columnNumber})`
54
+ : new Error().stack;
27
55
  const newProps = (props === null || props === void 0 ? void 0 : props[internalStackProp])
28
56
  ? { ...props }
29
57
  : {
30
58
  ...(props !== null && props !== void 0 ? props : {}),
31
- [internalStackProp]: new Error().stack,
59
+ [internalStackProp]: stack,
32
60
  };
33
61
  if (first === sequenceComponent) {
34
62
  newProps._remotionInternalSingleChildComponent =
@@ -40,7 +68,7 @@ const enableProxy = (api, isCreateElement) => {
40
68
  },
41
69
  });
42
70
  };
43
- react_1.default.createElement = enableProxy(originalCreateElement, true);
44
- jsx_runtime_1.default.jsx = enableProxy(originalJsx, false);
45
- jsx_runtime_1.default.jsxs = enableProxy(originalJsxs, false);
46
- jsx_dev_runtime_1.default.jsxDEV = enableProxy(originalJsxDev, false);
71
+ react_1.default.createElement = enableProxy(originalCreateElement, true, null);
72
+ jsx_runtime_1.default.jsx = enableProxy(originalJsx, false, null);
73
+ jsx_runtime_1.default.jsxs = enableProxy(originalJsxs, false, null);
74
+ jsx_dev_runtime_1.default.jsxDEV = enableProxy(originalJsxDev, false, 4);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/bundler"
4
4
  },
5
5
  "name": "@remotion/bundler",
6
- "version": "4.0.502",
6
+ "version": "4.0.504",
7
7
  "description": "Bundle Remotion compositions using Webpack",
8
8
  "main": "dist/index.js",
9
9
  "bugs": {
@@ -24,11 +24,11 @@
24
24
  "css-loader": "7.1.4",
25
25
  "esbuild": "0.28.1",
26
26
  "react-refresh": "0.18.0",
27
- "remotion": "4.0.502",
28
- "@remotion/studio": "4.0.502",
29
- "@remotion/studio-shared": "4.0.502",
30
- "@remotion/timeline-utils": "4.0.502",
31
- "@remotion/media-parser": "4.0.502",
27
+ "remotion": "4.0.504",
28
+ "@remotion/studio": "4.0.504",
29
+ "@remotion/studio-shared": "4.0.504",
30
+ "@remotion/timeline-utils": "4.0.504",
31
+ "@remotion/media-parser": "4.0.504",
32
32
  "style-loader": "4.0.0",
33
33
  "webpack": "5.105.0"
34
34
  },
@@ -39,7 +39,7 @@
39
39
  "devDependencies": {
40
40
  "react": "19.2.3",
41
41
  "react-dom": "19.2.3",
42
- "@remotion/eslint-config-internal": "4.0.502",
42
+ "@remotion/eslint-config-internal": "4.0.504",
43
43
  "eslint": "9.19.0",
44
44
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
45
45
  },