remotion 3.0.0-lambda.2 → 3.0.0-lambda.203

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.
Files changed (107) hide show
  1. package/coverage/coverage-summary.json +58 -55
  2. package/dist/CompositionManager.d.ts +3 -1
  3. package/dist/CompositionManager.d.ts.map +1 -1
  4. package/dist/CompositionManager.js.map +1 -1
  5. package/dist/RemotionRoot.d.ts.map +1 -1
  6. package/dist/RemotionRoot.js +6 -1
  7. package/dist/RemotionRoot.js.map +1 -1
  8. package/dist/audio/Audio.d.ts +1 -1
  9. package/dist/audio/AudioForDevelopment.d.ts +1 -1
  10. package/dist/audio/AudioForRendering.d.ts +1 -1
  11. package/dist/audio/AudioForRendering.d.ts.map +1 -1
  12. package/dist/audio/AudioForRendering.js +0 -2
  13. package/dist/audio/AudioForRendering.js.map +1 -1
  14. package/dist/config/concurrent-mode.d.ts +6 -0
  15. package/dist/config/concurrent-mode.d.ts.map +1 -0
  16. package/dist/config/concurrent-mode.js +17 -0
  17. package/dist/config/concurrent-mode.js.map +1 -0
  18. package/dist/config/crf.d.ts +1 -1
  19. package/dist/config/crf.d.ts.map +1 -1
  20. package/dist/config/crf.js +6 -0
  21. package/dist/config/crf.js.map +1 -1
  22. package/dist/config/ffmpeg-executable.d.ts +4 -0
  23. package/dist/config/ffmpeg-executable.d.ts.map +1 -0
  24. package/dist/config/ffmpeg-executable.js +13 -0
  25. package/dist/config/ffmpeg-executable.js.map +1 -0
  26. package/dist/config/image-format.d.ts +1 -1
  27. package/dist/config/index.d.ts +9 -3
  28. package/dist/config/index.d.ts.map +1 -1
  29. package/dist/config/index.js +6 -0
  30. package/dist/config/index.js.map +1 -1
  31. package/dist/config/input-props.d.ts.map +1 -1
  32. package/dist/config/input-props.js +14 -0
  33. package/dist/config/input-props.js.map +1 -1
  34. package/dist/config/log.d.ts +2 -1
  35. package/dist/config/log.d.ts.map +1 -1
  36. package/dist/config/log.js +5 -4
  37. package/dist/config/log.js.map +1 -1
  38. package/dist/config/overwrite.d.ts +1 -0
  39. package/dist/config/overwrite.d.ts.map +1 -1
  40. package/dist/config/overwrite.js +3 -2
  41. package/dist/config/overwrite.js.map +1 -1
  42. package/dist/config/parallel-encoding.d.ts +3 -0
  43. package/dist/config/parallel-encoding.d.ts.map +1 -0
  44. package/dist/config/parallel-encoding.js +14 -0
  45. package/dist/config/parallel-encoding.js.map +1 -0
  46. package/dist/internals.d.ts +12 -10
  47. package/dist/internals.d.ts.map +1 -1
  48. package/dist/internals.js +4 -0
  49. package/dist/internals.js.map +1 -1
  50. package/dist/interpolate.d.ts.map +1 -1
  51. package/dist/interpolate.js +9 -5
  52. package/dist/interpolate.js.map +1 -1
  53. package/dist/timeline-position-state.d.ts +6 -2
  54. package/dist/timeline-position-state.d.ts.map +1 -1
  55. package/dist/timeline-position-state.js +9 -2
  56. package/dist/timeline-position-state.js.map +1 -1
  57. package/dist/use-media-in-timeline.d.ts.map +1 -1
  58. package/dist/use-media-in-timeline.js +17 -1
  59. package/dist/use-media-in-timeline.js.map +1 -1
  60. package/dist/use-media-playback.d.ts +1 -1
  61. package/dist/use-media-playback.d.ts.map +1 -1
  62. package/dist/use-media-playback.js +9 -3
  63. package/dist/use-media-playback.js.map +1 -1
  64. package/dist/use-unsafe-video-config.d.ts.map +1 -1
  65. package/dist/use-unsafe-video-config.js +2 -1
  66. package/dist/use-unsafe-video-config.js.map +1 -1
  67. package/dist/video/Video.d.ts +1 -1
  68. package/dist/video/VideoForDevelopment.d.ts +1 -1
  69. package/dist/video/VideoForRendering.d.ts +1 -1
  70. package/dist/video/VideoForRendering.d.ts.map +1 -1
  71. package/dist/video/VideoForRendering.js +1 -3
  72. package/dist/video/VideoForRendering.js.map +1 -1
  73. package/dist/video-config.d.ts +1 -0
  74. package/dist/video-config.d.ts.map +1 -1
  75. package/package.json +3 -3
  76. package/dist/component-type.d.ts +0 -1
  77. package/dist/component-type.d.ts.map +0 -1
  78. package/dist/component-type.js +0 -2
  79. package/dist/component-type.js.map +0 -1
  80. package/dist/serie/flatten-children.d.ts +0 -3
  81. package/dist/serie/flatten-children.d.ts.map +0 -1
  82. package/dist/serie/flatten-children.js +0 -19
  83. package/dist/serie/flatten-children.js.map +0 -1
  84. package/dist/serie/index.d.ts +0 -12
  85. package/dist/serie/index.d.ts.map +0 -1
  86. package/dist/serie/index.js +0 -55
  87. package/dist/serie/index.js.map +0 -1
  88. package/dist/setup-environment.d.ts +0 -6
  89. package/dist/setup-environment.d.ts.map +0 -1
  90. package/dist/setup-environment.js +0 -47
  91. package/dist/setup-environment.js.map +0 -1
  92. package/dist/stagger/index.d.ts +0 -10
  93. package/dist/stagger/index.d.ts.map +0 -1
  94. package/dist/stagger/index.js +0 -54
  95. package/dist/stagger/index.js.map +0 -1
  96. package/dist/use-current-src.d.ts +0 -3
  97. package/dist/use-current-src.d.ts.map +0 -1
  98. package/dist/use-current-src.js +0 -23
  99. package/dist/use-current-src.js.map +0 -1
  100. package/dist/use-current-time.d.ts +0 -2
  101. package/dist/use-current-time.d.ts.map +0 -1
  102. package/dist/use-current-time.js +0 -12
  103. package/dist/use-current-time.js.map +0 -1
  104. package/dist/use-time.d.ts +0 -2
  105. package/dist/use-time.d.ts.map +0 -1
  106. package/dist/use-time.js +0 -15
  107. package/dist/use-time.js.map +0 -1
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StaggerChild = exports.Stagger = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const sequencing_1 = require("../sequencing");
7
- const validate_duration_in_frames_1 = require("../validation/validate-duration-in-frames");
8
- const StaggerChild = ({ children }) => {
9
- // eslint-disable-next-line react/jsx-no-useless-fragment
10
- return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: children }, void 0);
11
- };
12
- exports.StaggerChild = StaggerChild;
13
- const Stagger = ({ children }) => {
14
- const childrenValue = react_1.useMemo(() => {
15
- let startFrame = 0;
16
- return react_1.Children.map(children, (child, i) => {
17
- var _a;
18
- const castedChild = child;
19
- if (typeof castedChild === 'string') {
20
- if (castedChild.trim() === '') {
21
- return null;
22
- }
23
- throw new TypeError(`The <Stagger> component only accepts a list of <StaggerChild /> components as it's children, but you passed a string "${castedChild}"`);
24
- }
25
- if (castedChild.type !== StaggerChild) {
26
- throw new TypeError("The <Stagger> component only accepts a list of <StaggerChild /> components as it's children");
27
- }
28
- const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
29
- if (!castedChild || !castedChild.props.children) {
30
- throw new TypeError(`A <StaggerChild /> component (${debugInfo}) doesn't have any children.`);
31
- }
32
- const durationInFramesProp = castedChild.props.durationInFrames;
33
- const { durationInFrames, children: _children, ...passedProps } = castedChild.props;
34
- validate_duration_in_frames_1.validateDurationInFrames(durationInFramesProp, `<StaggerChild />`);
35
- const offset = (_a = castedChild.props.offset) !== null && _a !== void 0 ? _a : 0;
36
- if (Number.isNaN(offset)) {
37
- throw new TypeError(`The "offset" property of a <StaggerChild /> must not be NaN, but got NaN (${debugInfo}).`);
38
- }
39
- if (!Number.isFinite(offset)) {
40
- throw new TypeError(`The "offset" property of a <StaggerChild /> must be finite, but got ${offset} (${debugInfo}).`);
41
- }
42
- if (offset % 1 !== 0) {
43
- throw new TypeError(`The "offset" property of a <StaggerChild /> must be finite, but got ${offset} (${debugInfo}).`);
44
- }
45
- const currentStartFrame = startFrame + offset;
46
- startFrame += durationInFramesProp + offset;
47
- return (jsx_runtime_1.jsx(sequencing_1.Sequence, Object.assign({ from: currentStartFrame, durationInFrames: durationInFramesProp }, passedProps, { children: child }), void 0));
48
- });
49
- }, [children]);
50
- /* eslint-disable react/jsx-no-useless-fragment */
51
- return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: childrenValue }, void 0);
52
- };
53
- exports.Stagger = Stagger;
54
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["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B,EAAE,kBAAkB,CAAC,CAAC;YACnE,MAAM,MAAM,SAAG,WAAW,CAAC,KAAK,CAAC,MAAM,mCAAI,CAAC,CAAC;YAC7C,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;gBACzB,MAAM,IAAI,SAAS,CAClB,6EAA6E,SAAS,IAAI,CAC1F,CAAC;aACF;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gBAC7B,MAAM,IAAI,SAAS,CAClB,uEAAuE,MAAM,KAAK,SAAS,IAAI,CAC/F,CAAC;aACF;YAED,IAAI,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;gBACrB,MAAM,IAAI,SAAS,CAClB,uEAAuE,MAAM,KAAK,SAAS,IAAI,CAC/F,CAAC;aACF;YAED,MAAM,iBAAiB,GAAG,UAAU,GAAG,MAAM,CAAC;YAC9C,UAAU,IAAI,oBAAoB,GAAG,MAAM,CAAC;YAC5C,OAAO,CACN,kBAAC,qBAAQ,kBACR,IAAI,EAAE,iBAAiB,EACvB,gBAAgB,EAAE,oBAAoB,IAClC,WAAW,cAEd,KAAK,YACI,CACX,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,kDAAkD;IAClD,OAAO,sDAAG,aAAa,WAAI,CAAC;AAC7B,CAAC,CAAC;AAEM,0BAAO"}
@@ -1,3 +0,0 @@
1
- import { RefObject } from 'react';
2
- export declare const useCurrentSrc: (mediaElement: RefObject<HTMLAudioElement | HTMLVideoElement>) => string | null;
3
- //# sourceMappingURL=use-current-src.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-current-src.d.ts","sourceRoot":"","sources":["../src/use-current-src.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAsB,MAAM,OAAO,CAAC;AAErD,eAAO,MAAM,aAAa,iBACX,UAAU,gBAAgB,GAAG,gBAAgB,CAAC,kBAuB5D,CAAC"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useCurrentSrc = void 0;
4
- const react_1 = require("react");
5
- const useCurrentSrc = (mediaElement) => {
6
- var _a, _b;
7
- const currentSrc = (_b = (_a = mediaElement.current) === null || _a === void 0 ? void 0 : _a.currentSrc) !== null && _b !== void 0 ? _b : null;
8
- const [currentCurrentSrc, setCurrentCurrentSrc] = (0, react_1.useState)(currentSrc !== null && currentSrc !== void 0 ? currentSrc : null);
9
- (0, react_1.useEffect)(() => {
10
- const check = () => {
11
- if (currentCurrentSrc !== currentSrc) {
12
- setCurrentCurrentSrc(currentSrc);
13
- }
14
- };
15
- const interval = setInterval(check, 100);
16
- return () => {
17
- clearInterval(interval);
18
- };
19
- }, [currentCurrentSrc, currentSrc]);
20
- return currentCurrentSrc;
21
- };
22
- exports.useCurrentSrc = useCurrentSrc;
23
- //# sourceMappingURL=use-current-src.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-current-src.js","sourceRoot":"","sources":["../src/use-current-src.ts"],"names":[],"mappings":";;;AAAA,iCAAqD;AAE9C,MAAM,aAAa,GAAG,CAC5B,YAA4D,EAC3D,EAAE;;IACH,MAAM,UAAU,GAAG,MAAA,MAAA,YAAY,CAAC,OAAO,0CAAE,UAAU,mCAAI,IAAI,CAAC;IAE5D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EACzD,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,IAAI,CAClB,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACd,MAAM,KAAK,GAAG,GAAG,EAAE;YAClB,IAAI,iBAAiB,KAAK,UAAU,EAAE;gBACrC,oBAAoB,CAAC,UAAU,CAAC,CAAC;aACjC;QACF,CAAC,CAAC;QAEF,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEzC,OAAO,GAAG,EAAE;YACX,aAAa,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC;IAEpC,OAAO,iBAAiB,CAAC;AAC1B,CAAC,CAAC;AAxBW,QAAA,aAAa,iBAwBxB"}
@@ -1,2 +0,0 @@
1
- export declare const useCurrentTime: () => number;
2
- //# sourceMappingURL=use-current-time.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-current-time.d.ts","sourceRoot":"","sources":["../src/use-current-time.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,QAAO,MAKjC,CAAC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useCurrentTime = void 0;
4
- const use_frame_1 = require("./use-frame");
5
- const use_video_config_1 = require("./use-video-config");
6
- const useCurrentTime = () => {
7
- const { fps } = (0, use_video_config_1.useVideoConfig)();
8
- const currentFrame = (0, use_frame_1.useCurrentFrame)();
9
- return 1000 * (currentFrame / fps);
10
- };
11
- exports.useCurrentTime = useCurrentTime;
12
- //# sourceMappingURL=use-current-time.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-current-time.js","sourceRoot":"","sources":["../src/use-current-time.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAC5C,yDAAkD;AAE3C,MAAM,cAAc,GAAG,GAAW,EAAE;IAC1C,MAAM,EAAC,GAAG,EAAC,GAAG,IAAA,iCAAc,GAAE,CAAC;IAC/B,MAAM,YAAY,GAAG,IAAA,2BAAe,GAAE,CAAC;IAEvC,OAAO,IAAI,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC;AACpC,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB"}
@@ -1,2 +0,0 @@
1
- export declare const useCurrentTime: () => number;
2
- //# sourceMappingURL=use-time.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-time.d.ts","sourceRoot":"","sources":["../src/use-time.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,QAAO,MASjC,CAAC"}
package/dist/use-time.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useCurrentTime = void 0;
4
- const use_frame_1 = require("./use-frame");
5
- const use_video_1 = require("./use-video");
6
- const useCurrentTime = () => {
7
- const video = (0, use_video_1.useVideo)();
8
- const currentFrame = (0, use_frame_1.useCurrentFrame)();
9
- if ((video === null || video === void 0 ? void 0 : video.fps) && currentFrame) {
10
- return 1000 * (currentFrame / video.fps);
11
- }
12
- return 0;
13
- };
14
- exports.useCurrentTime = useCurrentTime;
15
- //# sourceMappingURL=use-time.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-time.js","sourceRoot":"","sources":["../src/use-time.ts"],"names":[],"mappings":";;;AAAA,2CAA8C;AAC9C,2CAAuC;AAEhC,MAAM,cAAc,GAAG,GAAW,EAAE;IACzC,MAAM,KAAK,GAAG,IAAA,oBAAQ,GAAE,CAAC;IACzB,MAAM,YAAY,GAAG,IAAA,2BAAe,GAAE,CAAC;IAErC,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,KAAI,YAAY,EAAE;QAC9B,OAAO,IAAI,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;KAC1C;IAED,OAAO,CAAC,CAAC;AACb,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB"}