remotion 3.3.77 → 3.3.79

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.
@@ -182,6 +182,7 @@ const SharedAudioContextProvider = ({ children, numberOfAudioTags }) => {
182
182
  };
183
183
  exports.SharedAudioContextProvider = SharedAudioContextProvider;
184
184
  const useSharedAudio = (aud, audioId) => {
185
+ var _a;
185
186
  const ctx = (0, react_1.useContext)(exports.SharedAudioContext);
186
187
  /**
187
188
  * We work around this in React 18 so an audio tag will only register itself once
@@ -201,8 +202,10 @@ const useSharedAudio = (aud, audioId) => {
201
202
  * Effects in React 18 fire twice, and we are looking for a way to only fire it once.
202
203
  * - useInsertionEffect only fires once. If it's available we are in React 18.
203
204
  * - useLayoutEffect only fires once in React 17.
205
+ *
206
+ * Need to import it from React to fix React 17 ESM support.
204
207
  */
205
- const effectToUse = react_1.useInsertionEffect !== null && react_1.useInsertionEffect !== void 0 ? react_1.useInsertionEffect : react_1.useLayoutEffect;
208
+ const effectToUse = (_a = react_1.default.useInsertionEffect) !== null && _a !== void 0 ? _a : react_1.default.useLayoutEffect;
206
209
  if (typeof document !== 'undefined') {
207
210
  effectToUse(() => {
208
211
  if (ctx && ctx.numberOfAudioTags > 0) {
@@ -1 +1 @@
1
- export declare const VERSION = "3.3.77";
1
+ export declare const VERSION = "3.3.79";
@@ -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 = '3.3.77';
5
+ exports.VERSION = '3.3.79';
@@ -1,4 +1,4 @@
1
- import React, { createContext, useState, useMemo, useLayoutEffect, useContext, useEffect, forwardRef, useRef, useCallback, useImperativeHandle, Children, isValidElement, useReducer, createRef, useInsertionEffect, Suspense } from 'react';
1
+ import React, { createContext, useState, useMemo, useLayoutEffect, useContext, useEffect, forwardRef, useRef, useCallback, useImperativeHandle, Children, isValidElement, useReducer, createRef, Suspense } from 'react';
2
2
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
3
  import { createPortal } from 'react-dom';
4
4
 
@@ -58,7 +58,7 @@ function truthy(value) {
58
58
  }
59
59
 
60
60
  // Automatically generated on publish
61
- const VERSION = '3.3.77';
61
+ const VERSION = '3.3.79';
62
62
 
63
63
  const checkMultipleRemotionVersions = () => {
64
64
  if (typeof globalThis === 'undefined') {
@@ -1539,6 +1539,7 @@ const SharedAudioContextProvider = ({ children, numberOfAudioTags }) => {
1539
1539
  }), children] }));
1540
1540
  };
1541
1541
  const useSharedAudio = (aud, audioId) => {
1542
+ var _a;
1542
1543
  const ctx = useContext(SharedAudioContext);
1543
1544
  /**
1544
1545
  * We work around this in React 18 so an audio tag will only register itself once
@@ -1558,8 +1559,10 @@ const useSharedAudio = (aud, audioId) => {
1558
1559
  * Effects in React 18 fire twice, and we are looking for a way to only fire it once.
1559
1560
  * - useInsertionEffect only fires once. If it's available we are in React 18.
1560
1561
  * - useLayoutEffect only fires once in React 17.
1562
+ *
1563
+ * Need to import it from React to fix React 17 ESM support.
1561
1564
  */
1562
- const effectToUse = useInsertionEffect !== null && useInsertionEffect !== void 0 ? useInsertionEffect : useLayoutEffect;
1565
+ const effectToUse = (_a = React.useInsertionEffect) !== null && _a !== void 0 ? _a : React.useLayoutEffect;
1563
1566
  if (typeof document !== 'undefined') {
1564
1567
  effectToUse(() => {
1565
1568
  if (ctx && ctx.numberOfAudioTags > 0) {
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '3.3.77';
2
+ const VERSION = '3.3.79';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "3.3.77",
3
+ "version": "3.3.79",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "rollup": "^2.70.1",
37
37
  "typescript": "^4.7.0",
38
38
  "vitest": "0.24.3",
39
- "webpack": "5.74.0"
39
+ "webpack": "5.76.1"
40
40
  },
41
41
  "keywords": [
42
42
  "remotion",