@remotion/studio 4.0.341 → 4.0.345
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/.turbo/turbo-make.log +2 -2
- package/dist/esm/chunk-d0p54vwb.js +46760 -0
- package/dist/esm/chunk-m9qs9w1e.js +46761 -0
- package/dist/esm/chunk-z55bp9m5.js +46774 -0
- package/dist/esm/index.mjs +7 -7
- package/dist/esm/internals.mjs +45 -31
- package/dist/esm/previewEntry.mjs +45 -31
- package/dist/esm/renderEntry.mjs +16 -14
- package/dist/helpers/use-keybinding.js +5 -0
- package/dist/renderEntry.js +6 -5
- package/dist/visual-controls/VisualControls.js +3 -2
- package/package.json +11 -11
- package/tsconfig.tsbuildinfo +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -474,7 +474,7 @@ var updateDefaultProps = ({
|
|
|
474
474
|
}));
|
|
475
475
|
};
|
|
476
476
|
// src/api/visual-control.ts
|
|
477
|
-
import { getRemotionEnvironment as
|
|
477
|
+
import { getRemotionEnvironment as getRemotionEnvironment5 } from "remotion";
|
|
478
478
|
|
|
479
479
|
// src/visual-controls/VisualControls.tsx
|
|
480
480
|
import {
|
|
@@ -487,7 +487,7 @@ import {
|
|
|
487
487
|
useRef,
|
|
488
488
|
useState
|
|
489
489
|
} from "react";
|
|
490
|
-
import {
|
|
490
|
+
import { useRemotionEnvironment } from "remotion";
|
|
491
491
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
492
492
|
var VisualControlsTabActivatedContext = createContext(false);
|
|
493
493
|
var VisualControlsContext = createContext({
|
|
@@ -508,7 +508,7 @@ var SetVisualControlsContext = createContext({
|
|
|
508
508
|
|
|
509
509
|
// src/api/visual-control.ts
|
|
510
510
|
var visualControl = (key, value, schema) => {
|
|
511
|
-
if (
|
|
511
|
+
if (getRemotionEnvironment5().isRendering) {
|
|
512
512
|
return value;
|
|
513
513
|
}
|
|
514
514
|
if (!visualControlRef.current) {
|
|
@@ -517,10 +517,10 @@ var visualControl = (key, value, schema) => {
|
|
|
517
517
|
return visualControlRef.current.globalVisualControl(key, value, schema);
|
|
518
518
|
};
|
|
519
519
|
// src/api/watch-public-folder.ts
|
|
520
|
-
import { getRemotionEnvironment as
|
|
520
|
+
import { getRemotionEnvironment as getRemotionEnvironment6 } from "remotion";
|
|
521
521
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
522
522
|
var watchPublicFolder = (callback) => {
|
|
523
|
-
if (!
|
|
523
|
+
if (!getRemotionEnvironment6().isStudio) {
|
|
524
524
|
console.warn("The watchPublicFolder() API is only available while using the Remotion Studio.");
|
|
525
525
|
return { cancel: () => {
|
|
526
526
|
return;
|
|
@@ -539,9 +539,9 @@ var watchPublicFolder = (callback) => {
|
|
|
539
539
|
return { cancel };
|
|
540
540
|
};
|
|
541
541
|
// src/api/watch-static-file.ts
|
|
542
|
-
import { getRemotionEnvironment as
|
|
542
|
+
import { getRemotionEnvironment as getRemotionEnvironment7 } from "remotion";
|
|
543
543
|
var watchStaticFile = (fileName, callback) => {
|
|
544
|
-
if (!
|
|
544
|
+
if (!getRemotionEnvironment7().isStudio) {
|
|
545
545
|
console.warn("watchStaticFile() is only available while using the Remotion Studio.");
|
|
546
546
|
return { cancel: () => {
|
|
547
547
|
return;
|
package/dist/esm/internals.mjs
CHANGED
|
@@ -689,6 +689,9 @@ var useKeybinding = () => {
|
|
|
689
689
|
}
|
|
690
690
|
const listener = (e) => {
|
|
691
691
|
const commandKey = window.navigator.platform.startsWith("Mac") ? e.metaKey : e.ctrlKey;
|
|
692
|
+
if (!e.key) {
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
692
695
|
if (e.key.toLowerCase() === options.key.toLowerCase() && options.commandCtrlKey === commandKey) {
|
|
693
696
|
if (!options.triggerIfInputFieldFocused) {
|
|
694
697
|
const { activeElement } = document;
|
|
@@ -10125,7 +10128,7 @@ import {
|
|
|
10125
10128
|
useRef as useRef22,
|
|
10126
10129
|
useState as useState36
|
|
10127
10130
|
} from "react";
|
|
10128
|
-
import {
|
|
10131
|
+
import { useRemotionEnvironment } from "remotion";
|
|
10129
10132
|
|
|
10130
10133
|
// src/api/get-zod-schema-from-primitive.ts
|
|
10131
10134
|
var getZodSchemaFromPrimitive = (value, z) => {
|
|
@@ -10254,9 +10257,10 @@ var VisualControlsProvider = ({ children }) => {
|
|
|
10254
10257
|
}, []);
|
|
10255
10258
|
const z = useZodIfPossible();
|
|
10256
10259
|
const changedRef = useRef22(false);
|
|
10260
|
+
const env = useRemotionEnvironment();
|
|
10257
10261
|
const visualControl = useCallback41(function(key, value, schema) {
|
|
10258
10262
|
if (handles && false) {}
|
|
10259
|
-
if (!
|
|
10263
|
+
if (!env.isStudio) {
|
|
10260
10264
|
return value;
|
|
10261
10265
|
}
|
|
10262
10266
|
if (!z) {
|
|
@@ -10271,7 +10275,7 @@ var VisualControlsProvider = ({ children }) => {
|
|
|
10271
10275
|
changedRef.current = true;
|
|
10272
10276
|
}
|
|
10273
10277
|
return currentValue;
|
|
10274
|
-
}, [setControl, handles, z]);
|
|
10278
|
+
}, [setControl, handles, z, env.isStudio]);
|
|
10275
10279
|
const updateHandles = useCallback41(() => {
|
|
10276
10280
|
setHandles(() => {
|
|
10277
10281
|
return imperativeHandles.current;
|
|
@@ -10329,7 +10333,7 @@ import React61, { useCallback as useCallback44, useContext as useContext33 } fro
|
|
|
10329
10333
|
import { Internals as Internals28 } from "remotion";
|
|
10330
10334
|
|
|
10331
10335
|
// src/api/save-default-props.ts
|
|
10332
|
-
import { getRemotionEnvironment as
|
|
10336
|
+
import { getRemotionEnvironment as getRemotionEnvironment3 } from "remotion";
|
|
10333
10337
|
|
|
10334
10338
|
// src/components/RenderModal/SchemaEditor/extract-enum-json-paths.ts
|
|
10335
10339
|
var extractEnumJsonPaths = ({
|
|
@@ -10522,9 +10526,9 @@ var extractEnumJsonPaths = ({
|
|
|
10522
10526
|
};
|
|
10523
10527
|
|
|
10524
10528
|
// src/api/helpers/calc-new-props.ts
|
|
10525
|
-
import { Internals as Internals27, getRemotionEnvironment as
|
|
10529
|
+
import { Internals as Internals27, getRemotionEnvironment as getRemotionEnvironment2 } from "remotion";
|
|
10526
10530
|
var calcNewProps = (compositionId, defaultProps) => {
|
|
10527
|
-
if (!
|
|
10531
|
+
if (!getRemotionEnvironment2().isStudio) {
|
|
10528
10532
|
throw new Error("saveDefaultProps can only be called in the Remotion Studio.");
|
|
10529
10533
|
}
|
|
10530
10534
|
const { compositionsRef, editorPropsProviderRef } = Internals27;
|
|
@@ -10559,7 +10563,7 @@ var saveDefaultProps = async ({
|
|
|
10559
10563
|
compositionId,
|
|
10560
10564
|
defaultProps
|
|
10561
10565
|
}) => {
|
|
10562
|
-
if (!
|
|
10566
|
+
if (!getRemotionEnvironment3().isStudio) {
|
|
10563
10567
|
throw new Error("saveDefaultProps() is only available in the Studio");
|
|
10564
10568
|
}
|
|
10565
10569
|
if (window.remotion_isReadOnlyStudio) {
|
|
@@ -17815,27 +17819,36 @@ var renderMediaOnWeb = async ({
|
|
|
17815
17819
|
}
|
|
17816
17820
|
};
|
|
17817
17821
|
const root = ReactDOM8.createRoot(div);
|
|
17818
|
-
root.render(/* @__PURE__ */ jsx174(Internals44.
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
|
|
17822
|
-
|
|
17823
|
-
|
|
17824
|
-
|
|
17825
|
-
fps,
|
|
17826
|
-
height,
|
|
17827
|
-
width,
|
|
17828
|
-
defaultCodec: null,
|
|
17829
|
-
defaultOutName: null,
|
|
17830
|
-
defaultVideoImageFormat: null,
|
|
17831
|
-
defaultPixelFormat: null
|
|
17822
|
+
root.render(/* @__PURE__ */ jsx174(Internals44.RemotionEnvironmentContext, {
|
|
17823
|
+
value: {
|
|
17824
|
+
isStudio: false,
|
|
17825
|
+
isRendering: true,
|
|
17826
|
+
isPlayer: false,
|
|
17827
|
+
isReadOnlyStudio: false,
|
|
17828
|
+
isClientSideRendering: true
|
|
17832
17829
|
},
|
|
17833
|
-
|
|
17834
|
-
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
|
|
17830
|
+
children: /* @__PURE__ */ jsx174(Internals44.RemotionRoot, {
|
|
17831
|
+
logLevel: "info",
|
|
17832
|
+
numberOfAudioTags: 0,
|
|
17833
|
+
onlyRenderComposition: null,
|
|
17834
|
+
currentCompositionMetadata: {
|
|
17835
|
+
props: {},
|
|
17836
|
+
durationInFrames,
|
|
17837
|
+
fps,
|
|
17838
|
+
height,
|
|
17839
|
+
width,
|
|
17840
|
+
defaultCodec: null,
|
|
17841
|
+
defaultOutName: null,
|
|
17842
|
+
defaultVideoImageFormat: null,
|
|
17843
|
+
defaultPixelFormat: null
|
|
17844
|
+
},
|
|
17845
|
+
audioLatencyHint: "interactive",
|
|
17846
|
+
children: /* @__PURE__ */ jsx174(Internals44.CanUseRemotionHooks, {
|
|
17847
|
+
value: true,
|
|
17848
|
+
children: /* @__PURE__ */ jsx174(Internals44.CompositionManager.Provider, {
|
|
17849
|
+
value: compositionManagerContext,
|
|
17850
|
+
children: /* @__PURE__ */ jsx174(Component, {})
|
|
17851
|
+
})
|
|
17839
17852
|
})
|
|
17840
17853
|
})
|
|
17841
17854
|
}));
|
|
@@ -35300,7 +35313,8 @@ var parseList = ({
|
|
|
35300
35313
|
const startOffset = iterator.counter.getOffset();
|
|
35301
35314
|
const type = iterator.getByteString(4, false);
|
|
35302
35315
|
if (type !== "INFO") {
|
|
35303
|
-
|
|
35316
|
+
iterator.discard(ckSize - 4);
|
|
35317
|
+
return Promise.resolve(null);
|
|
35304
35318
|
}
|
|
35305
35319
|
const metadata = [];
|
|
35306
35320
|
const remainingBytes = () => ckSize - (iterator.counter.getOffset() - startOffset);
|
|
@@ -35384,7 +35398,7 @@ var parseWav = (state) => {
|
|
|
35384
35398
|
if (type === "id3") {
|
|
35385
35399
|
return parseId32({ state });
|
|
35386
35400
|
}
|
|
35387
|
-
if (type === "junk" || type === "fllr" || type === "bext") {
|
|
35401
|
+
if (type === "junk" || type === "fllr" || type === "bext" || type === "cue") {
|
|
35388
35402
|
return parseJunk({ state });
|
|
35389
35403
|
}
|
|
35390
35404
|
if (type === "fact") {
|
|
@@ -38955,9 +38969,9 @@ import React142, { useCallback as useCallback100, useContext as useContext71, us
|
|
|
38955
38969
|
import { VERSION as VERSION2 } from "remotion";
|
|
38956
38970
|
|
|
38957
38971
|
// src/api/install-package.ts
|
|
38958
|
-
import { getRemotionEnvironment as
|
|
38972
|
+
import { getRemotionEnvironment as getRemotionEnvironment4 } from "remotion";
|
|
38959
38973
|
var installPackages = (packageNames) => {
|
|
38960
|
-
if (!
|
|
38974
|
+
if (!getRemotionEnvironment4().isStudio) {
|
|
38961
38975
|
throw new Error("installPackages() is only available in the Studio");
|
|
38962
38976
|
}
|
|
38963
38977
|
if (window.remotion_isReadOnlyStudio) {
|
|
@@ -694,6 +694,9 @@ var useKeybinding = () => {
|
|
|
694
694
|
}
|
|
695
695
|
const listener = (e) => {
|
|
696
696
|
const commandKey = window.navigator.platform.startsWith("Mac") ? e.metaKey : e.ctrlKey;
|
|
697
|
+
if (!e.key) {
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
697
700
|
if (e.key.toLowerCase() === options.key.toLowerCase() && options.commandCtrlKey === commandKey) {
|
|
698
701
|
if (!options.triggerIfInputFieldFocused) {
|
|
699
702
|
const { activeElement } = document;
|
|
@@ -10405,7 +10408,7 @@ import {
|
|
|
10405
10408
|
useRef as useRef22,
|
|
10406
10409
|
useState as useState37
|
|
10407
10410
|
} from "react";
|
|
10408
|
-
import {
|
|
10411
|
+
import { useRemotionEnvironment } from "remotion";
|
|
10409
10412
|
|
|
10410
10413
|
// src/api/get-zod-schema-from-primitive.ts
|
|
10411
10414
|
var getZodSchemaFromPrimitive = (value, z) => {
|
|
@@ -10534,9 +10537,10 @@ var VisualControlsProvider = ({ children }) => {
|
|
|
10534
10537
|
}, []);
|
|
10535
10538
|
const z = useZodIfPossible();
|
|
10536
10539
|
const changedRef = useRef22(false);
|
|
10540
|
+
const env = useRemotionEnvironment();
|
|
10537
10541
|
const visualControl = useCallback42(function(key, value, schema) {
|
|
10538
10542
|
if (handles && false) {}
|
|
10539
|
-
if (!
|
|
10543
|
+
if (!env.isStudio) {
|
|
10540
10544
|
return value;
|
|
10541
10545
|
}
|
|
10542
10546
|
if (!z) {
|
|
@@ -10551,7 +10555,7 @@ var VisualControlsProvider = ({ children }) => {
|
|
|
10551
10555
|
changedRef.current = true;
|
|
10552
10556
|
}
|
|
10553
10557
|
return currentValue;
|
|
10554
|
-
}, [setControl, handles, z]);
|
|
10558
|
+
}, [setControl, handles, z, env.isStudio]);
|
|
10555
10559
|
const updateHandles = useCallback42(() => {
|
|
10556
10560
|
setHandles(() => {
|
|
10557
10561
|
return imperativeHandles.current;
|
|
@@ -10609,7 +10613,7 @@ import React62, { useCallback as useCallback45, useContext as useContext33 } fro
|
|
|
10609
10613
|
import { Internals as Internals28 } from "remotion";
|
|
10610
10614
|
|
|
10611
10615
|
// src/api/save-default-props.ts
|
|
10612
|
-
import { getRemotionEnvironment as
|
|
10616
|
+
import { getRemotionEnvironment as getRemotionEnvironment3 } from "remotion";
|
|
10613
10617
|
|
|
10614
10618
|
// src/components/RenderModal/SchemaEditor/extract-enum-json-paths.ts
|
|
10615
10619
|
var extractEnumJsonPaths = ({
|
|
@@ -10802,9 +10806,9 @@ var extractEnumJsonPaths = ({
|
|
|
10802
10806
|
};
|
|
10803
10807
|
|
|
10804
10808
|
// src/api/helpers/calc-new-props.ts
|
|
10805
|
-
import { Internals as Internals27, getRemotionEnvironment as
|
|
10809
|
+
import { Internals as Internals27, getRemotionEnvironment as getRemotionEnvironment2 } from "remotion";
|
|
10806
10810
|
var calcNewProps = (compositionId, defaultProps) => {
|
|
10807
|
-
if (!
|
|
10811
|
+
if (!getRemotionEnvironment2().isStudio) {
|
|
10808
10812
|
throw new Error("saveDefaultProps can only be called in the Remotion Studio.");
|
|
10809
10813
|
}
|
|
10810
10814
|
const { compositionsRef, editorPropsProviderRef } = Internals27;
|
|
@@ -10839,7 +10843,7 @@ var saveDefaultProps = async ({
|
|
|
10839
10843
|
compositionId,
|
|
10840
10844
|
defaultProps
|
|
10841
10845
|
}) => {
|
|
10842
|
-
if (!
|
|
10846
|
+
if (!getRemotionEnvironment3().isStudio) {
|
|
10843
10847
|
throw new Error("saveDefaultProps() is only available in the Studio");
|
|
10844
10848
|
}
|
|
10845
10849
|
if (window.remotion_isReadOnlyStudio) {
|
|
@@ -18095,27 +18099,36 @@ var renderMediaOnWeb = async ({
|
|
|
18095
18099
|
}
|
|
18096
18100
|
};
|
|
18097
18101
|
const root = ReactDOM8.createRoot(div);
|
|
18098
|
-
root.render(/* @__PURE__ */ jsx175(Internals44.
|
|
18099
|
-
|
|
18100
|
-
|
|
18101
|
-
|
|
18102
|
-
|
|
18103
|
-
|
|
18104
|
-
|
|
18105
|
-
fps,
|
|
18106
|
-
height,
|
|
18107
|
-
width,
|
|
18108
|
-
defaultCodec: null,
|
|
18109
|
-
defaultOutName: null,
|
|
18110
|
-
defaultVideoImageFormat: null,
|
|
18111
|
-
defaultPixelFormat: null
|
|
18102
|
+
root.render(/* @__PURE__ */ jsx175(Internals44.RemotionEnvironmentContext, {
|
|
18103
|
+
value: {
|
|
18104
|
+
isStudio: false,
|
|
18105
|
+
isRendering: true,
|
|
18106
|
+
isPlayer: false,
|
|
18107
|
+
isReadOnlyStudio: false,
|
|
18108
|
+
isClientSideRendering: true
|
|
18112
18109
|
},
|
|
18113
|
-
|
|
18114
|
-
|
|
18115
|
-
|
|
18116
|
-
|
|
18117
|
-
|
|
18118
|
-
|
|
18110
|
+
children: /* @__PURE__ */ jsx175(Internals44.RemotionRoot, {
|
|
18111
|
+
logLevel: "info",
|
|
18112
|
+
numberOfAudioTags: 0,
|
|
18113
|
+
onlyRenderComposition: null,
|
|
18114
|
+
currentCompositionMetadata: {
|
|
18115
|
+
props: {},
|
|
18116
|
+
durationInFrames,
|
|
18117
|
+
fps,
|
|
18118
|
+
height,
|
|
18119
|
+
width,
|
|
18120
|
+
defaultCodec: null,
|
|
18121
|
+
defaultOutName: null,
|
|
18122
|
+
defaultVideoImageFormat: null,
|
|
18123
|
+
defaultPixelFormat: null
|
|
18124
|
+
},
|
|
18125
|
+
audioLatencyHint: "interactive",
|
|
18126
|
+
children: /* @__PURE__ */ jsx175(Internals44.CanUseRemotionHooks, {
|
|
18127
|
+
value: true,
|
|
18128
|
+
children: /* @__PURE__ */ jsx175(Internals44.CompositionManager.Provider, {
|
|
18129
|
+
value: compositionManagerContext,
|
|
18130
|
+
children: /* @__PURE__ */ jsx175(Component, {})
|
|
18131
|
+
})
|
|
18119
18132
|
})
|
|
18120
18133
|
})
|
|
18121
18134
|
}));
|
|
@@ -35580,7 +35593,8 @@ var parseList = ({
|
|
|
35580
35593
|
const startOffset = iterator.counter.getOffset();
|
|
35581
35594
|
const type = iterator.getByteString(4, false);
|
|
35582
35595
|
if (type !== "INFO") {
|
|
35583
|
-
|
|
35596
|
+
iterator.discard(ckSize - 4);
|
|
35597
|
+
return Promise.resolve(null);
|
|
35584
35598
|
}
|
|
35585
35599
|
const metadata = [];
|
|
35586
35600
|
const remainingBytes = () => ckSize - (iterator.counter.getOffset() - startOffset);
|
|
@@ -35664,7 +35678,7 @@ var parseWav = (state) => {
|
|
|
35664
35678
|
if (type === "id3") {
|
|
35665
35679
|
return parseId32({ state });
|
|
35666
35680
|
}
|
|
35667
|
-
if (type === "junk" || type === "fllr" || type === "bext") {
|
|
35681
|
+
if (type === "junk" || type === "fllr" || type === "bext" || type === "cue") {
|
|
35668
35682
|
return parseJunk({ state });
|
|
35669
35683
|
}
|
|
35670
35684
|
if (type === "fact") {
|
|
@@ -39235,9 +39249,9 @@ import React143, { useCallback as useCallback101, useContext as useContext71, us
|
|
|
39235
39249
|
import { VERSION as VERSION2 } from "remotion";
|
|
39236
39250
|
|
|
39237
39251
|
// src/api/install-package.ts
|
|
39238
|
-
import { getRemotionEnvironment as
|
|
39252
|
+
import { getRemotionEnvironment as getRemotionEnvironment4 } from "remotion";
|
|
39239
39253
|
var installPackages = (packageNames) => {
|
|
39240
|
-
if (!
|
|
39254
|
+
if (!getRemotionEnvironment4().isStudio) {
|
|
39241
39255
|
throw new Error("installPackages() is only available in the Studio");
|
|
39242
39256
|
}
|
|
39243
39257
|
if (window.remotion_isReadOnlyStudio) {
|
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -8,11 +8,12 @@ import { useContext, useEffect, useRef, useState } from "react";
|
|
|
8
8
|
import ReactDOM from "react-dom/client";
|
|
9
9
|
import {
|
|
10
10
|
AbsoluteFill,
|
|
11
|
-
continueRender,
|
|
12
|
-
delayRender,
|
|
13
11
|
getInputProps,
|
|
14
12
|
getRemotionEnvironment,
|
|
15
|
-
|
|
13
|
+
continueRender as globalContinueRender,
|
|
14
|
+
delayRender as globalDelayRender,
|
|
15
|
+
Internals,
|
|
16
|
+
useDelayRender
|
|
16
17
|
} from "remotion";
|
|
17
18
|
import { NoReactInternals } from "remotion/no-react";
|
|
18
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -69,10 +70,11 @@ var GetVideoComposition = ({ state }) => {
|
|
|
69
70
|
const { compositions, currentCompositionMetadata, canvasContent } = useContext(Internals.CompositionManager);
|
|
70
71
|
const { setCanvasContent } = useContext(Internals.CompositionSetters);
|
|
71
72
|
const portalContainer = useRef(null);
|
|
73
|
+
const { delayRender, continueRender } = useDelayRender();
|
|
72
74
|
const [handle] = useState(() => delayRender(`Waiting for Composition "${state.compositionName}"`));
|
|
73
75
|
useEffect(() => {
|
|
74
76
|
return () => continueRender(handle);
|
|
75
|
-
}, [handle]);
|
|
77
|
+
}, [handle, continueRender]);
|
|
76
78
|
useEffect(() => {
|
|
77
79
|
if (compositions.length === 0) {
|
|
78
80
|
return;
|
|
@@ -99,7 +101,7 @@ var GetVideoComposition = ({ state }) => {
|
|
|
99
101
|
return () => {
|
|
100
102
|
current.removeChild(Internals.portalNode());
|
|
101
103
|
};
|
|
102
|
-
}, [canvasContent, handle]);
|
|
104
|
+
}, [canvasContent, handle, continueRender]);
|
|
103
105
|
if (!currentCompositionMetadata) {
|
|
104
106
|
return null;
|
|
105
107
|
}
|
|
@@ -115,7 +117,7 @@ var GetVideoComposition = ({ state }) => {
|
|
|
115
117
|
});
|
|
116
118
|
};
|
|
117
119
|
var DEFAULT_ROOT_COMPONENT_TIMEOUT = 1e4;
|
|
118
|
-
var waitForRootHandle =
|
|
120
|
+
var waitForRootHandle = globalDelayRender("Loading root component - See https://remotion.dev/docs/troubleshooting/loading-root-component if you experience a timeout", {
|
|
119
121
|
timeoutInMilliseconds: typeof window === "undefined" ? DEFAULT_ROOT_COMPONENT_TIMEOUT : window.remotion_puppeteerTimeout ?? DEFAULT_ROOT_COMPONENT_TIMEOUT
|
|
120
122
|
});
|
|
121
123
|
var videoContainer = document.getElementById("video-container");
|
|
@@ -183,7 +185,7 @@ var renderContent = (Root) => {
|
|
|
183
185
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
184
186
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
185
187
|
}));
|
|
186
|
-
import("./chunk-
|
|
188
|
+
import("./chunk-z55bp9m5.js").then(({ StudioInternals }) => {
|
|
187
189
|
renderToDOM(/* @__PURE__ */ jsx(StudioInternals.Studio, {
|
|
188
190
|
readOnly: true,
|
|
189
191
|
rootComponent: Root
|
|
@@ -200,15 +202,15 @@ var renderContent = (Root) => {
|
|
|
200
202
|
};
|
|
201
203
|
Internals.waitForRoot((Root) => {
|
|
202
204
|
renderContent(Root);
|
|
203
|
-
|
|
205
|
+
globalContinueRender(waitForRootHandle);
|
|
204
206
|
});
|
|
205
207
|
var setBundleModeAndUpdate = (state) => {
|
|
206
208
|
setBundleMode(state);
|
|
207
|
-
const delay =
|
|
209
|
+
const delay = globalDelayRender("Waiting for root component to load - See https://remotion.dev/docs/troubleshooting/loading-root-component if you experience a timeout");
|
|
208
210
|
Internals.waitForRoot((Root) => {
|
|
209
211
|
renderContent(Root);
|
|
210
212
|
requestAnimationFrame(() => {
|
|
211
|
-
|
|
213
|
+
globalContinueRender(delay);
|
|
212
214
|
});
|
|
213
215
|
});
|
|
214
216
|
};
|
|
@@ -239,7 +241,7 @@ if (typeof window !== "undefined") {
|
|
|
239
241
|
const compositions = getUnevaluatedComps();
|
|
240
242
|
const inputProps = typeof window === "undefined" || getRemotionEnvironment().isPlayer ? {} : getInputProps() ?? {};
|
|
241
243
|
return Promise.all(compositions.map(async (c) => {
|
|
242
|
-
const handle =
|
|
244
|
+
const handle = globalDelayRender(`Running calculateMetadata() for composition ${c.id}. If you didn't want to evaluate this composition, use "selectComposition()" instead of "getCompositions()"`);
|
|
243
245
|
const originalProps = {
|
|
244
246
|
...c.defaultProps ?? {},
|
|
245
247
|
...inputProps ?? {}
|
|
@@ -256,7 +258,7 @@ if (typeof window !== "undefined") {
|
|
|
256
258
|
compositionId: c.id
|
|
257
259
|
});
|
|
258
260
|
const resolved = await Promise.resolve(comp);
|
|
259
|
-
|
|
261
|
+
globalContinueRender(handle);
|
|
260
262
|
const { props, defaultProps, ...data } = resolved;
|
|
261
263
|
return {
|
|
262
264
|
...data,
|
|
@@ -283,7 +285,7 @@ if (typeof window !== "undefined") {
|
|
|
283
285
|
throw new Error(`Could not find composition with ID ${compId}. Available compositions: ${compositions.map((c) => c.id).join(", ")}`);
|
|
284
286
|
}
|
|
285
287
|
const abortController = new AbortController;
|
|
286
|
-
const handle =
|
|
288
|
+
const handle = globalDelayRender(`Running the calculateMetadata() function for composition ${compId}`);
|
|
287
289
|
const inputProps = typeof window === "undefined" || getRemotionEnvironment().isPlayer ? {} : getInputProps() ?? {};
|
|
288
290
|
const originalProps = {
|
|
289
291
|
...selectedComp.defaultProps ?? {},
|
|
@@ -300,7 +302,7 @@ if (typeof window !== "undefined") {
|
|
|
300
302
|
defaultProps: selectedComp.defaultProps ?? {},
|
|
301
303
|
compositionId: selectedComp.id
|
|
302
304
|
}));
|
|
303
|
-
|
|
305
|
+
globalContinueRender(handle);
|
|
304
306
|
const { props, defaultProps, ...data } = prom;
|
|
305
307
|
return {
|
|
306
308
|
...data,
|
|
@@ -31,6 +31,11 @@ const useKeybinding = () => {
|
|
|
31
31
|
const commandKey = window.navigator.platform.startsWith('Mac')
|
|
32
32
|
? e.metaKey
|
|
33
33
|
: e.ctrlKey;
|
|
34
|
+
// Apparently, e.key can be undefined in Edge:
|
|
35
|
+
// https://github.com/remotion-dev/remotion/issues/5637
|
|
36
|
+
if (!e.key) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
34
39
|
if (e.key.toLowerCase() === options.key.toLowerCase() &&
|
|
35
40
|
options.commandCtrlKey === commandKey) {
|
|
36
41
|
if (!options.triggerIfInputFieldFocused) {
|
package/dist/renderEntry.js
CHANGED
|
@@ -101,10 +101,11 @@ const GetVideoComposition = ({ state }) => {
|
|
|
101
101
|
const { compositions, currentCompositionMetadata, canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
102
102
|
const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
|
|
103
103
|
const portalContainer = (0, react_1.useRef)(null);
|
|
104
|
-
const
|
|
104
|
+
const { delayRender, continueRender } = (0, remotion_1.useDelayRender)();
|
|
105
|
+
const [handle] = (0, react_1.useState)(() => delayRender(`Waiting for Composition "${state.compositionName}"`));
|
|
105
106
|
(0, react_1.useEffect)(() => {
|
|
106
|
-
return () =>
|
|
107
|
-
}, [handle]);
|
|
107
|
+
return () => continueRender(handle);
|
|
108
|
+
}, [handle, continueRender]);
|
|
108
109
|
(0, react_1.useEffect)(() => {
|
|
109
110
|
if (compositions.length === 0) {
|
|
110
111
|
return;
|
|
@@ -129,11 +130,11 @@ const GetVideoComposition = ({ state }) => {
|
|
|
129
130
|
throw new Error('portal did not render');
|
|
130
131
|
}
|
|
131
132
|
current.appendChild(remotion_1.Internals.portalNode());
|
|
132
|
-
|
|
133
|
+
continueRender(handle);
|
|
133
134
|
return () => {
|
|
134
135
|
current.removeChild(remotion_1.Internals.portalNode());
|
|
135
136
|
};
|
|
136
|
-
}, [canvasContent, handle]);
|
|
137
|
+
}, [canvasContent, handle, continueRender]);
|
|
137
138
|
if (!currentCompositionMetadata) {
|
|
138
139
|
return null;
|
|
139
140
|
}
|
|
@@ -55,6 +55,7 @@ const VisualControlsProvider = ({ children }) => {
|
|
|
55
55
|
}, []);
|
|
56
56
|
const z = (0, get_zod_if_possible_1.useZodIfPossible)();
|
|
57
57
|
const changedRef = (0, react_1.useRef)(false);
|
|
58
|
+
const env = (0, remotion_1.useRemotionEnvironment)();
|
|
58
59
|
const visualControl = (0, react_1.useCallback)(
|
|
59
60
|
// eslint-disable-next-line prefer-arrow-callback
|
|
60
61
|
function (key, value, schema) {
|
|
@@ -62,7 +63,7 @@ const VisualControlsProvider = ({ children }) => {
|
|
|
62
63
|
if (handles && false) {
|
|
63
64
|
/** Intentional: State is managed imperatively */
|
|
64
65
|
}
|
|
65
|
-
if (!
|
|
66
|
+
if (!env.isStudio) {
|
|
66
67
|
return value;
|
|
67
68
|
}
|
|
68
69
|
if (!z) {
|
|
@@ -77,7 +78,7 @@ const VisualControlsProvider = ({ children }) => {
|
|
|
77
78
|
changedRef.current = true;
|
|
78
79
|
}
|
|
79
80
|
return currentValue;
|
|
80
|
-
}, [setControl, handles, z]);
|
|
81
|
+
}, [setControl, handles, z, env.isStudio]);
|
|
81
82
|
const updateHandles = (0, react_1.useCallback)(() => {
|
|
82
83
|
setHandles(() => {
|
|
83
84
|
return imperativeHandles.current;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.345",
|
|
7
7
|
"description": "APIs for interacting with the Remotion Studio",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -23,22 +23,22 @@
|
|
|
23
23
|
"source-map": "0.7.3",
|
|
24
24
|
"open": "^8.4.2",
|
|
25
25
|
"zod": "3.22.3",
|
|
26
|
-
"
|
|
27
|
-
"remotion": "4.0.
|
|
28
|
-
"@remotion/
|
|
29
|
-
"@remotion/media-
|
|
30
|
-
"@remotion/
|
|
31
|
-
"@remotion/
|
|
32
|
-
"@remotion/webcodecs": "4.0.
|
|
33
|
-
"@remotion/zod-types": "4.0.
|
|
34
|
-
"@remotion/renderer": "4.0.
|
|
26
|
+
"remotion": "4.0.345",
|
|
27
|
+
"@remotion/player": "4.0.345",
|
|
28
|
+
"@remotion/renderer": "4.0.345",
|
|
29
|
+
"@remotion/media-utils": "4.0.345",
|
|
30
|
+
"@remotion/studio-shared": "4.0.345",
|
|
31
|
+
"@remotion/media-parser": "4.0.345",
|
|
32
|
+
"@remotion/webcodecs": "4.0.345",
|
|
33
|
+
"@remotion/zod-types": "4.0.345",
|
|
34
|
+
"@remotion/web-renderer": "4.0.345"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"react": "19.0.0",
|
|
38
38
|
"react-dom": "19.0.0",
|
|
39
39
|
"@types/semver": "^7.3.4",
|
|
40
40
|
"eslint": "9.19.0",
|
|
41
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
41
|
+
"@remotion/eslint-config-internal": "4.0.345"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|