@remotion/promo-pages 4.0.465 → 4.0.467
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/dist/Homepage.js +1801 -1310
- package/dist/design.js +852 -488
- package/dist/experts/experts-data.js +5 -16
- package/dist/experts.js +690 -326
- package/dist/homepage/Pricing.js +789 -425
- package/dist/prompts/PromptsGallery.js +753 -389
- package/dist/prompts/PromptsShow.js +910 -546
- package/dist/prompts/PromptsSubmit.js +931 -567
- package/dist/team.js +778 -414
- package/dist/template-modal-content.js +831 -467
- package/dist/templates.js +849 -485
- package/package.json +13 -13
- package/dist/prompts/PromptsShow.css +0 -2578
- package/dist/template-modal-content.css +0 -35
package/dist/design.js
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
3
1
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
-
for (let key of __getOwnPropNames(mod))
|
|
10
|
-
if (!__hasOwnProp.call(to, key))
|
|
11
|
-
__defProp(to, key, {
|
|
12
|
-
get: () => mod[key],
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
2
|
+
var __returnValue = (v) => v;
|
|
3
|
+
function __exportSetter(name, newValue) {
|
|
4
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
+
}
|
|
17
6
|
var __export = (target, all) => {
|
|
18
7
|
for (var name in all)
|
|
19
8
|
__defProp(target, name, {
|
|
20
9
|
get: all[name],
|
|
21
10
|
enumerable: true,
|
|
22
11
|
configurable: true,
|
|
23
|
-
set: (
|
|
12
|
+
set: __exportSetter.bind(all, name)
|
|
24
13
|
});
|
|
25
14
|
};
|
|
26
15
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -35,8 +24,8 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
35
24
|
// ../design/dist/esm/index.mjs
|
|
36
25
|
import * as React24 from "react";
|
|
37
26
|
import * as React3 from "react";
|
|
38
|
-
import { Fragment as Fragment2, jsx as
|
|
39
|
-
import React52, { useCallback as
|
|
27
|
+
import { Fragment as Fragment2, jsx as jsx39 } from "react/jsx-runtime";
|
|
28
|
+
import React52, { useCallback as useCallback25, useRef as useRef25, useState as useState22 } from "react";
|
|
40
29
|
|
|
41
30
|
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
42
31
|
function r(e) {
|
|
@@ -1378,7 +1367,7 @@ var getDefaultConfig = () => {
|
|
|
1378
1367
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1379
1368
|
|
|
1380
1369
|
// ../design/dist/esm/index.mjs
|
|
1381
|
-
import React33, { useEffect as
|
|
1370
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo40, useState as useState21 } from "react";
|
|
1382
1371
|
|
|
1383
1372
|
// ../paths/dist/esm/index.mjs
|
|
1384
1373
|
var cutLInstruction = ({
|
|
@@ -5883,84 +5872,97 @@ import {
|
|
|
5883
5872
|
} from "react";
|
|
5884
5873
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
5885
5874
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
5886
|
-
import { forwardRef as forwardRef10, useCallback as useCallback16, useState as useState16 } from "react";
|
|
5887
|
-
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
5888
5875
|
import {
|
|
5876
|
+
forwardRef as forwardRef10,
|
|
5889
5877
|
useCallback as useCallback17,
|
|
5878
|
+
useContext as useContext33,
|
|
5879
|
+
useEffect as useEffect16,
|
|
5880
|
+
useMemo as useMemo31,
|
|
5881
|
+
useState as useState16
|
|
5882
|
+
} from "react";
|
|
5883
|
+
import {
|
|
5884
|
+
useCallback as useCallback16,
|
|
5890
5885
|
useContext as useContext32,
|
|
5891
5886
|
useImperativeHandle as useImperativeHandle6,
|
|
5892
5887
|
useLayoutEffect as useLayoutEffect10,
|
|
5893
5888
|
useRef as useRef21
|
|
5894
5889
|
} from "react";
|
|
5890
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
5895
5891
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
5892
|
+
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
5893
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
5896
5894
|
import { createRef as createRef3 } from "react";
|
|
5897
5895
|
import React28 from "react";
|
|
5898
5896
|
import {
|
|
5899
|
-
useCallback as
|
|
5897
|
+
useCallback as useCallback19,
|
|
5900
5898
|
useImperativeHandle as useImperativeHandle7,
|
|
5901
|
-
useMemo as
|
|
5899
|
+
useMemo as useMemo322,
|
|
5902
5900
|
useRef as useRef22,
|
|
5903
|
-
useState as
|
|
5901
|
+
useState as useState18
|
|
5904
5902
|
} from "react";
|
|
5905
|
-
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
5906
|
-
import React29 from "react";
|
|
5907
|
-
import { useMemo as useMemo33 } from "react";
|
|
5908
|
-
import { createContext as createContext23, useContext as useContext33, useMemo as useMemo322 } from "react";
|
|
5909
5903
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
5904
|
+
import React29 from "react";
|
|
5905
|
+
import { useMemo as useMemo34 } from "react";
|
|
5906
|
+
import { createContext as createContext23, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
5910
5907
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5908
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
5911
5909
|
import React31 from "react";
|
|
5912
5910
|
import React32, { createContext as createContext24 } from "react";
|
|
5913
|
-
import { useCallback as
|
|
5911
|
+
import { useCallback as useCallback22 } from "react";
|
|
5914
5912
|
import {
|
|
5915
|
-
useCallback as
|
|
5916
|
-
useContext as
|
|
5917
|
-
useEffect as
|
|
5913
|
+
useCallback as useCallback20,
|
|
5914
|
+
useContext as useContext35,
|
|
5915
|
+
useEffect as useEffect17,
|
|
5918
5916
|
useLayoutEffect as useLayoutEffect11,
|
|
5919
|
-
useMemo as
|
|
5920
|
-
useState as
|
|
5917
|
+
useMemo as useMemo35,
|
|
5918
|
+
useState as useState19
|
|
5921
5919
|
} from "react";
|
|
5922
|
-
import { jsx as
|
|
5920
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5923
5921
|
import React34, {
|
|
5924
|
-
forwardRef as
|
|
5925
|
-
useContext as
|
|
5926
|
-
useEffect as
|
|
5922
|
+
forwardRef as forwardRef12,
|
|
5923
|
+
useContext as useContext36,
|
|
5924
|
+
useEffect as useEffect19,
|
|
5927
5925
|
useImperativeHandle as useImperativeHandle8,
|
|
5928
|
-
useMemo as
|
|
5926
|
+
useMemo as useMemo36,
|
|
5929
5927
|
useRef as useRef23,
|
|
5930
|
-
useState as
|
|
5931
|
-
useCallback as
|
|
5928
|
+
useState as useState20,
|
|
5929
|
+
useCallback as useCallback21
|
|
5932
5930
|
} from "react";
|
|
5933
|
-
import { useEffect as
|
|
5934
|
-
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5931
|
+
import { useEffect as useEffect18 } from "react";
|
|
5935
5932
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
5936
|
-
import React36, { useMemo as useMemo36 } from "react";
|
|
5937
5933
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
5938
|
-
import
|
|
5934
|
+
import React36, { useMemo as useMemo37 } from "react";
|
|
5935
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
5936
|
+
import { Children, forwardRef as forwardRef13, useMemo as useMemo38 } from "react";
|
|
5939
5937
|
import React37 from "react";
|
|
5940
5938
|
import React38, { createContext as createContext25 } from "react";
|
|
5941
|
-
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
5942
5939
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
5940
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
5943
5941
|
import React40 from "react";
|
|
5944
|
-
import { forwardRef as
|
|
5942
|
+
import { forwardRef as forwardRef15, useCallback as useCallback23, useContext as useContext38 } from "react";
|
|
5945
5943
|
import {
|
|
5946
|
-
forwardRef as
|
|
5947
|
-
useContext as
|
|
5948
|
-
useEffect as
|
|
5944
|
+
forwardRef as forwardRef14,
|
|
5945
|
+
useContext as useContext37,
|
|
5946
|
+
useEffect as useEffect20,
|
|
5949
5947
|
useImperativeHandle as useImperativeHandle9,
|
|
5950
5948
|
useLayoutEffect as useLayoutEffect12,
|
|
5951
|
-
useMemo as
|
|
5949
|
+
useMemo as useMemo39,
|
|
5952
5950
|
useRef as useRef24
|
|
5953
5951
|
} from "react";
|
|
5954
|
-
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
5955
5952
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
5953
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
5956
5954
|
var __defProp2 = Object.defineProperty;
|
|
5955
|
+
var __returnValue2 = (v) => v;
|
|
5956
|
+
function __exportSetter2(name, newValue) {
|
|
5957
|
+
this[name] = __returnValue2.bind(null, newValue);
|
|
5958
|
+
}
|
|
5957
5959
|
var __export2 = (target, all) => {
|
|
5958
5960
|
for (var name in all)
|
|
5959
5961
|
__defProp2(target, name, {
|
|
5960
5962
|
get: all[name],
|
|
5961
5963
|
enumerable: true,
|
|
5962
5964
|
configurable: true,
|
|
5963
|
-
set: (
|
|
5965
|
+
set: __exportSetter2.bind(all, name)
|
|
5964
5966
|
});
|
|
5965
5967
|
};
|
|
5966
5968
|
if (typeof createContext !== "function") {
|
|
@@ -7075,7 +7077,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
7075
7077
|
var addSequenceStackTraces = (component) => {
|
|
7076
7078
|
componentsToAddStacksTo.push(component);
|
|
7077
7079
|
};
|
|
7078
|
-
var VERSION = "4.0.
|
|
7080
|
+
var VERSION = "4.0.467";
|
|
7079
7081
|
var checkMultipleRemotionVersions = () => {
|
|
7080
7082
|
if (typeof globalThis === "undefined") {
|
|
7081
7083
|
return;
|
|
@@ -8123,6 +8125,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8123
8125
|
_remotionInternalEffects,
|
|
8124
8126
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
8125
8127
|
_remotionInternalStack: stack,
|
|
8128
|
+
_remotionInternalDocumentationLink: documentationLink,
|
|
8126
8129
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
8127
8130
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
8128
8131
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -8193,6 +8196,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8193
8196
|
const timelineClipName = useMemo14(() => {
|
|
8194
8197
|
return name ?? "";
|
|
8195
8198
|
}, [name]);
|
|
8199
|
+
const resolvedDocumentationLink = documentationLink ?? (name === undefined ? "https://www.remotion.dev/docs/sequence" : null);
|
|
8196
8200
|
const env = useRemotionEnvironment();
|
|
8197
8201
|
const inheritedStack = other?.stack ?? null;
|
|
8198
8202
|
const stackRef = useRef6(null);
|
|
@@ -8208,6 +8212,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8208
8212
|
controls: controls ?? null,
|
|
8209
8213
|
effects: _remotionInternalEffects ?? [],
|
|
8210
8214
|
displayName: timelineClipName,
|
|
8215
|
+
documentationLink: resolvedDocumentationLink,
|
|
8211
8216
|
duration: actualDurationInFrames,
|
|
8212
8217
|
from,
|
|
8213
8218
|
id,
|
|
@@ -8227,6 +8232,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8227
8232
|
controls: controls ?? null,
|
|
8228
8233
|
effects: _remotionInternalEffects ?? [],
|
|
8229
8234
|
displayName: timelineClipName,
|
|
8235
|
+
documentationLink: resolvedDocumentationLink,
|
|
8230
8236
|
doesVolumeChange: isMedia.data.doesVolumeChange,
|
|
8231
8237
|
duration: actualDurationInFrames,
|
|
8232
8238
|
from,
|
|
@@ -8254,6 +8260,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8254
8260
|
duration: actualDurationInFrames,
|
|
8255
8261
|
id,
|
|
8256
8262
|
displayName: timelineClipName,
|
|
8263
|
+
documentationLink: resolvedDocumentationLink,
|
|
8257
8264
|
parent: parentSequence?.id ?? null,
|
|
8258
8265
|
type: "sequence",
|
|
8259
8266
|
rootId,
|
|
@@ -8288,7 +8295,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8288
8295
|
env.isStudio,
|
|
8289
8296
|
controls,
|
|
8290
8297
|
_remotionInternalEffects,
|
|
8291
|
-
isMedia
|
|
8298
|
+
isMedia,
|
|
8299
|
+
resolvedDocumentationLink
|
|
8292
8300
|
]);
|
|
8293
8301
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
8294
8302
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -8391,6 +8399,54 @@ var SequenceRefForwardingFunction = (props, ref) => {
|
|
|
8391
8399
|
};
|
|
8392
8400
|
var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
8393
8401
|
var Sequence = wrapInSchema(SequenceInner, sequenceSchema);
|
|
8402
|
+
var calculateImageFit = (fit, imageSize, canvasSize) => {
|
|
8403
|
+
switch (fit) {
|
|
8404
|
+
case "fill": {
|
|
8405
|
+
return [
|
|
8406
|
+
0,
|
|
8407
|
+
0,
|
|
8408
|
+
imageSize.width,
|
|
8409
|
+
imageSize.height,
|
|
8410
|
+
0,
|
|
8411
|
+
0,
|
|
8412
|
+
canvasSize.width,
|
|
8413
|
+
canvasSize.height
|
|
8414
|
+
];
|
|
8415
|
+
}
|
|
8416
|
+
case "contain": {
|
|
8417
|
+
const ratio = Math.min(canvasSize.width / imageSize.width, canvasSize.height / imageSize.height);
|
|
8418
|
+
const centerX = (canvasSize.width - imageSize.width * ratio) / 2;
|
|
8419
|
+
const centerY = (canvasSize.height - imageSize.height * ratio) / 2;
|
|
8420
|
+
return [
|
|
8421
|
+
0,
|
|
8422
|
+
0,
|
|
8423
|
+
imageSize.width,
|
|
8424
|
+
imageSize.height,
|
|
8425
|
+
centerX,
|
|
8426
|
+
centerY,
|
|
8427
|
+
imageSize.width * ratio,
|
|
8428
|
+
imageSize.height * ratio
|
|
8429
|
+
];
|
|
8430
|
+
}
|
|
8431
|
+
case "cover": {
|
|
8432
|
+
const ratio = Math.max(canvasSize.width / imageSize.width, canvasSize.height / imageSize.height);
|
|
8433
|
+
const centerX = (canvasSize.width - imageSize.width * ratio) / 2;
|
|
8434
|
+
const centerY = (canvasSize.height - imageSize.height * ratio) / 2;
|
|
8435
|
+
return [
|
|
8436
|
+
0,
|
|
8437
|
+
0,
|
|
8438
|
+
imageSize.width,
|
|
8439
|
+
imageSize.height,
|
|
8440
|
+
centerX,
|
|
8441
|
+
centerY,
|
|
8442
|
+
imageSize.width * ratio,
|
|
8443
|
+
imageSize.height * ratio
|
|
8444
|
+
];
|
|
8445
|
+
}
|
|
8446
|
+
default:
|
|
8447
|
+
throw new Error("Unknown fit: " + fit);
|
|
8448
|
+
}
|
|
8449
|
+
};
|
|
8394
8450
|
var WEBGL_CONTEXT_DOCS_URL = "https://remotion.dev/docs/troubleshooting/webgl2-context";
|
|
8395
8451
|
var webGlContextErrorMessage = (versionLabel, effectName) => `Failed to acquire ${versionLabel} context for ${effectName}. ` + 'Pass --gl=angle when using the CLI, set chromiumOptions: { gl: "angle" } when using SSR APIs, ' + 'or set "OpenGL render backend" to "angle" in the Advanced section when rendering in the Studio. ' + `See ${WEBGL_CONTEXT_DOCS_URL}`;
|
|
8396
8452
|
var createWebGLContextError = (effectName) => new Error(webGlContextErrorMessage("WebGL", effectName));
|
|
@@ -8643,54 +8699,6 @@ var useEffectChainState = () => {
|
|
|
8643
8699
|
}
|
|
8644
8700
|
}), []);
|
|
8645
8701
|
};
|
|
8646
|
-
var calcArgs = (fit, frameSize, canvasSize) => {
|
|
8647
|
-
switch (fit) {
|
|
8648
|
-
case "fill": {
|
|
8649
|
-
return [
|
|
8650
|
-
0,
|
|
8651
|
-
0,
|
|
8652
|
-
frameSize.width,
|
|
8653
|
-
frameSize.height,
|
|
8654
|
-
0,
|
|
8655
|
-
0,
|
|
8656
|
-
canvasSize.width,
|
|
8657
|
-
canvasSize.height
|
|
8658
|
-
];
|
|
8659
|
-
}
|
|
8660
|
-
case "contain": {
|
|
8661
|
-
const ratio = Math.min(canvasSize.width / frameSize.width, canvasSize.height / frameSize.height);
|
|
8662
|
-
const centerX = (canvasSize.width - frameSize.width * ratio) / 2;
|
|
8663
|
-
const centerY = (canvasSize.height - frameSize.height * ratio) / 2;
|
|
8664
|
-
return [
|
|
8665
|
-
0,
|
|
8666
|
-
0,
|
|
8667
|
-
frameSize.width,
|
|
8668
|
-
frameSize.height,
|
|
8669
|
-
centerX,
|
|
8670
|
-
centerY,
|
|
8671
|
-
frameSize.width * ratio,
|
|
8672
|
-
frameSize.height * ratio
|
|
8673
|
-
];
|
|
8674
|
-
}
|
|
8675
|
-
case "cover": {
|
|
8676
|
-
const ratio = Math.max(canvasSize.width / frameSize.width, canvasSize.height / frameSize.height);
|
|
8677
|
-
const centerX = (canvasSize.width - frameSize.width * ratio) / 2;
|
|
8678
|
-
const centerY = (canvasSize.height - frameSize.height * ratio) / 2;
|
|
8679
|
-
return [
|
|
8680
|
-
0,
|
|
8681
|
-
0,
|
|
8682
|
-
frameSize.width,
|
|
8683
|
-
frameSize.height,
|
|
8684
|
-
centerX,
|
|
8685
|
-
centerY,
|
|
8686
|
-
frameSize.width * ratio,
|
|
8687
|
-
frameSize.height * ratio
|
|
8688
|
-
];
|
|
8689
|
-
}
|
|
8690
|
-
default:
|
|
8691
|
-
throw new Error("Unknown fit: " + fit);
|
|
8692
|
-
}
|
|
8693
|
-
};
|
|
8694
8702
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects }, ref) => {
|
|
8695
8703
|
const canvasRef = useRef8(null);
|
|
8696
8704
|
const chainState = useEffectChainState();
|
|
@@ -8700,7 +8708,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
8700
8708
|
}
|
|
8701
8709
|
return document.createElement("canvas");
|
|
8702
8710
|
}, []);
|
|
8703
|
-
const draw = useCallback6(
|
|
8711
|
+
const draw = useCallback6((imageData) => {
|
|
8704
8712
|
const canvas = canvasRef.current;
|
|
8705
8713
|
const canvasWidth = width ?? imageData.displayWidth;
|
|
8706
8714
|
const canvasHeight = height ?? imageData.displayHeight;
|
|
@@ -8716,7 +8724,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
8716
8724
|
if (!sourceCtx) {
|
|
8717
8725
|
throw new Error("Could not get 2d context for source canvas");
|
|
8718
8726
|
}
|
|
8719
|
-
sourceCtx.drawImage(imageData, ...
|
|
8727
|
+
sourceCtx.drawImage(imageData, ...calculateImageFit(fit, {
|
|
8720
8728
|
height: imageData.displayHeight,
|
|
8721
8729
|
width: imageData.displayWidth
|
|
8722
8730
|
}, {
|
|
@@ -9076,6 +9084,7 @@ var AnimatedImageInner = ({
|
|
|
9076
9084
|
layout: "none",
|
|
9077
9085
|
durationInFrames: resolvedDuration,
|
|
9078
9086
|
name: "<AnimatedImage>",
|
|
9087
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
9079
9088
|
_experimentalControls: controls,
|
|
9080
9089
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
9081
9090
|
...sequenceProps,
|
|
@@ -9229,6 +9238,7 @@ var SolidOuter = forwardRef5(({
|
|
|
9229
9238
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
9230
9239
|
durationInFrames,
|
|
9231
9240
|
name: name ?? "<Solid>",
|
|
9241
|
+
_remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/solid" : undefined,
|
|
9232
9242
|
...props,
|
|
9233
9243
|
children: /* @__PURE__ */ jsx14(SolidInner, {
|
|
9234
9244
|
ref,
|
|
@@ -9469,6 +9479,7 @@ var HtmlInCanvasInner = forwardRef6(({
|
|
|
9469
9479
|
return /* @__PURE__ */ jsx15(Sequence, {
|
|
9470
9480
|
durationInFrames: resolvedDuration,
|
|
9471
9481
|
name: name ?? "<HtmlInCanvas>",
|
|
9482
|
+
_remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/remotion/html-in-canvas" : undefined,
|
|
9472
9483
|
_experimentalControls: controls,
|
|
9473
9484
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
9474
9485
|
layout: "none",
|
|
@@ -9717,6 +9728,7 @@ var Loop = ({
|
|
|
9717
9728
|
durationInFrames,
|
|
9718
9729
|
from,
|
|
9719
9730
|
name: name ?? "<Loop>",
|
|
9731
|
+
_remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/loop" : undefined,
|
|
9720
9732
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
9721
9733
|
layout: props.layout,
|
|
9722
9734
|
style,
|
|
@@ -10220,9 +10232,43 @@ var useSingletonAudioContext = ({
|
|
|
10220
10232
|
gainNode.connect(audioContext.destination);
|
|
10221
10233
|
Log.trace({ logLevel, tag: "audio" }, "Creating new audio context");
|
|
10222
10234
|
audioContext.suspend();
|
|
10235
|
+
let transitionTarget = null;
|
|
10236
|
+
const getState = () => {
|
|
10237
|
+
const nativeState = audioContext.state;
|
|
10238
|
+
if (transitionTarget === "running" && nativeState !== "running") {
|
|
10239
|
+
return "suspended-to-running";
|
|
10240
|
+
}
|
|
10241
|
+
if (transitionTarget === "suspended" && nativeState !== "suspended") {
|
|
10242
|
+
return "running-to-suspended";
|
|
10243
|
+
}
|
|
10244
|
+
return nativeState;
|
|
10245
|
+
};
|
|
10246
|
+
const resume = () => {
|
|
10247
|
+
transitionTarget = "running";
|
|
10248
|
+
const promise = audioContext.resume();
|
|
10249
|
+
promise.finally(() => {
|
|
10250
|
+
if (transitionTarget === "running") {
|
|
10251
|
+
transitionTarget = null;
|
|
10252
|
+
}
|
|
10253
|
+
});
|
|
10254
|
+
return promise;
|
|
10255
|
+
};
|
|
10256
|
+
const suspend = () => {
|
|
10257
|
+
transitionTarget = "suspended";
|
|
10258
|
+
const promise = audioContext.suspend();
|
|
10259
|
+
promise.finally(() => {
|
|
10260
|
+
if (transitionTarget === "suspended") {
|
|
10261
|
+
transitionTarget = null;
|
|
10262
|
+
}
|
|
10263
|
+
});
|
|
10264
|
+
return promise;
|
|
10265
|
+
};
|
|
10223
10266
|
return {
|
|
10224
10267
|
audioContext,
|
|
10225
|
-
gainNode
|
|
10268
|
+
gainNode,
|
|
10269
|
+
getState,
|
|
10270
|
+
resume,
|
|
10271
|
+
suspend
|
|
10226
10272
|
};
|
|
10227
10273
|
}, [logLevel, latencyHint, env.isRendering, audioEnabled]);
|
|
10228
10274
|
return context;
|
|
@@ -10275,6 +10321,15 @@ var didPropChange = (key, newProp, prevProp) => {
|
|
|
10275
10321
|
};
|
|
10276
10322
|
var SharedAudioContext = createContext21(null);
|
|
10277
10323
|
var SharedAudioTagsContext = createContext21(null);
|
|
10324
|
+
var shouldSaveForLater = (state) => {
|
|
10325
|
+
if (state === "suspended" || state === "running-to-suspended" || state === "interrupted") {
|
|
10326
|
+
return true;
|
|
10327
|
+
}
|
|
10328
|
+
if (state === "running" || state === "suspended-to-running") {
|
|
10329
|
+
return false;
|
|
10330
|
+
}
|
|
10331
|
+
throw new Error(`Unexpected audio context state: ${state}`);
|
|
10332
|
+
};
|
|
10278
10333
|
var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled }) => {
|
|
10279
10334
|
const logLevel = useLogLevel();
|
|
10280
10335
|
const ctxAndGain = useSingletonAudioContext({
|
|
@@ -10310,7 +10365,6 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10310
10365
|
return ({
|
|
10311
10366
|
node,
|
|
10312
10367
|
mediaTimestamp,
|
|
10313
|
-
currentTime,
|
|
10314
10368
|
scheduledTime,
|
|
10315
10369
|
duration,
|
|
10316
10370
|
offset,
|
|
@@ -10319,7 +10373,14 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10319
10373
|
if (!ctxAndGain) {
|
|
10320
10374
|
throw new Error("Audio context not found");
|
|
10321
10375
|
}
|
|
10322
|
-
const
|
|
10376
|
+
const currentState = ctxAndGain.getState();
|
|
10377
|
+
if (currentState === "closed") {
|
|
10378
|
+
return {
|
|
10379
|
+
type: "not-started",
|
|
10380
|
+
reason: "audio context is closed"
|
|
10381
|
+
};
|
|
10382
|
+
}
|
|
10383
|
+
const saveForLater = shouldSaveForLater(currentState);
|
|
10323
10384
|
if (duration > 0) {
|
|
10324
10385
|
if (saveForLater) {
|
|
10325
10386
|
nodesToResume.current.set(node, {
|
|
@@ -10339,7 +10400,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10339
10400
|
const prev = prevEndTimes.current;
|
|
10340
10401
|
const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
|
|
10341
10402
|
const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
|
|
10342
|
-
Log.verbose({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s %s %s", scheduledMismatch ? "color: red; font-weight: bold" : "", scheduledTime.toFixed(4), "", scheduledEndTime.toFixed(4), mediaMismatch ? "color: red; font-weight: bold" : "", mediaTime.toFixed(4), "", mediaEndTime.toFixed(4), duration < 0 ? "color: red; font-weight: bold" : timeDiff < 0 ? "color: red; font-weight: bold" : "color: blue; font-weight: bold", duration < 0 ? "missed " + Math.abs(offset).toFixed(2) + "s" : Math.abs(timeDiff).toFixed(2) + (timeDiff < 0 ? " delay" : " ahead"), "", "current=" +
|
|
10403
|
+
Log.verbose({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s %s %s", scheduledMismatch ? "color: red; font-weight: bold" : "", scheduledTime.toFixed(4), "", scheduledEndTime.toFixed(4), mediaMismatch ? "color: red; font-weight: bold" : "", mediaTime.toFixed(4), "", mediaEndTime.toFixed(4), duration < 0 ? "color: red; font-weight: bold" : timeDiff < 0 ? "color: red; font-weight: bold" : "color: blue; font-weight: bold", duration < 0 ? "missed " + Math.abs(offset).toFixed(2) + "s" : Math.abs(timeDiff).toFixed(2) + (timeDiff < 0 ? " delay" : " ahead"), "", "current=" + ctxAndGain.audioContext.currentTime.toFixed(4), "offset=" + offset.toFixed(4), "latency=" + latency.toFixed(4), "state=" + ctxAndGain.audioContext.state, originalUnloopedMediaTimestamp !== mediaTime ? "original_ts=" + originalUnloopedMediaTimestamp.toFixed(4) : "", "action=" + (saveForLater ? "schedule" : "start"), "");
|
|
10343
10404
|
prev.scheduledEndTime = scheduledEndTime;
|
|
10344
10405
|
prev.mediaEndTime = mediaEndTime;
|
|
10345
10406
|
return duration > 0 ? {
|
|
@@ -10366,7 +10427,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10366
10427
|
node.start(r2.scheduledTime, r2.offset, r2.duration);
|
|
10367
10428
|
});
|
|
10368
10429
|
nodesToResume.current.clear();
|
|
10369
|
-
const resumePromise = ctxAndGain.
|
|
10430
|
+
const resumePromise = ctxAndGain.resume();
|
|
10370
10431
|
isResuming.current = new Promise((resolve) => {
|
|
10371
10432
|
waitUntilActuallyResumed(ctxAndGain.audioContext, logLevel).then(resolve);
|
|
10372
10433
|
resumePromise.catch((err) => {
|
|
@@ -10383,17 +10444,18 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10383
10444
|
}, []);
|
|
10384
10445
|
const suspend = useCallback10(() => {
|
|
10385
10446
|
if (!ctxAndGain) {
|
|
10386
|
-
return;
|
|
10447
|
+
return Promise.resolve();
|
|
10387
10448
|
}
|
|
10388
10449
|
if (!audioContextIsPlayingEventually.current) {
|
|
10389
|
-
return;
|
|
10450
|
+
return Promise.resolve();
|
|
10390
10451
|
}
|
|
10391
10452
|
audioContextIsPlayingEventually.current = false;
|
|
10392
|
-
ctxAndGain.
|
|
10453
|
+
return ctxAndGain.suspend();
|
|
10393
10454
|
}, [ctxAndGain]);
|
|
10394
10455
|
const audioContextValue = useMemo23(() => {
|
|
10395
10456
|
return {
|
|
10396
10457
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
10458
|
+
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
10397
10459
|
gainNode: ctxAndGain?.gainNode ?? null,
|
|
10398
10460
|
audioSyncAnchor,
|
|
10399
10461
|
audioSyncAnchorEmitter,
|
|
@@ -10885,7 +10947,8 @@ var getTimelineDuration = ({
|
|
|
10885
10947
|
trimAfter
|
|
10886
10948
|
});
|
|
10887
10949
|
if (parentSequenceDurationInFrames !== null) {
|
|
10888
|
-
|
|
10950
|
+
const cappedDuration = Math.min(parentSequenceDurationInFrames * playbackRate, mediaDuration);
|
|
10951
|
+
return Number(cappedDuration.toFixed(10));
|
|
10889
10952
|
}
|
|
10890
10953
|
return mediaDuration;
|
|
10891
10954
|
};
|
|
@@ -11004,7 +11067,8 @@ var useMediaInTimeline = ({
|
|
|
11004
11067
|
showInTimeline,
|
|
11005
11068
|
premountDisplay,
|
|
11006
11069
|
postmountDisplay,
|
|
11007
|
-
loopDisplay
|
|
11070
|
+
loopDisplay,
|
|
11071
|
+
documentationLink
|
|
11008
11072
|
}) => {
|
|
11009
11073
|
const parentSequence = useContext24(SequenceContext);
|
|
11010
11074
|
const startsAt = useMediaStartsAt();
|
|
@@ -11043,6 +11107,7 @@ var useMediaInTimeline = ({
|
|
|
11043
11107
|
from: 0,
|
|
11044
11108
|
parent: parentSequence?.id ?? null,
|
|
11045
11109
|
displayName: finalDisplayName,
|
|
11110
|
+
documentationLink,
|
|
11046
11111
|
rootId,
|
|
11047
11112
|
volume: volumes,
|
|
11048
11113
|
showInTimeline: true,
|
|
@@ -11078,6 +11143,7 @@ var useMediaInTimeline = ({
|
|
|
11078
11143
|
premountDisplay,
|
|
11079
11144
|
postmountDisplay,
|
|
11080
11145
|
loopDisplay,
|
|
11146
|
+
documentationLink,
|
|
11081
11147
|
rootId,
|
|
11082
11148
|
finalDisplayName,
|
|
11083
11149
|
isStudio
|
|
@@ -12161,7 +12227,8 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12161
12227
|
showInTimeline,
|
|
12162
12228
|
premountDisplay: sequenceContext?.premountDisplay ?? null,
|
|
12163
12229
|
postmountDisplay: sequenceContext?.postmountDisplay ?? null,
|
|
12164
|
-
loopDisplay: undefined
|
|
12230
|
+
loopDisplay: undefined,
|
|
12231
|
+
documentationLink: name === undefined ? "https://www.remotion.dev/docs/html5-audio" : null
|
|
12165
12232
|
});
|
|
12166
12233
|
useMediaPlayback({
|
|
12167
12234
|
mediaRef: audioRef,
|
|
@@ -12484,41 +12551,6 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
12484
12551
|
var Html5Audio = forwardRef9(AudioRefForwardingFunction);
|
|
12485
12552
|
addSequenceStackTraces(Html5Audio);
|
|
12486
12553
|
var Audio = Html5Audio;
|
|
12487
|
-
var kSplineTableSize = 11;
|
|
12488
|
-
var kSampleStepSize = 1 / (kSplineTableSize - 1);
|
|
12489
|
-
var IFrameRefForwarding = ({
|
|
12490
|
-
onLoad,
|
|
12491
|
-
onError,
|
|
12492
|
-
delayRenderRetries,
|
|
12493
|
-
delayRenderTimeoutInMilliseconds,
|
|
12494
|
-
...props2
|
|
12495
|
-
}, ref) => {
|
|
12496
|
-
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12497
|
-
const [handle] = useState16(() => delayRender2(`Loading <IFrame> with source ${props2.src}`, {
|
|
12498
|
-
retries: delayRenderRetries ?? undefined,
|
|
12499
|
-
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
12500
|
-
}));
|
|
12501
|
-
const didLoad = useCallback16((e) => {
|
|
12502
|
-
continueRender2(handle);
|
|
12503
|
-
onLoad?.(e);
|
|
12504
|
-
}, [handle, onLoad, continueRender2]);
|
|
12505
|
-
const didGetError = useCallback16((e) => {
|
|
12506
|
-
continueRender2(handle);
|
|
12507
|
-
if (onError) {
|
|
12508
|
-
onError(e);
|
|
12509
|
-
} else {
|
|
12510
|
-
console.error("Error loading iframe:", e, "Handle the event using the onError() prop to make this message disappear.");
|
|
12511
|
-
}
|
|
12512
|
-
}, [handle, onError, continueRender2]);
|
|
12513
|
-
return /* @__PURE__ */ jsx25("iframe", {
|
|
12514
|
-
referrerPolicy: "strict-origin-when-cross-origin",
|
|
12515
|
-
...props2,
|
|
12516
|
-
ref,
|
|
12517
|
-
onError: didGetError,
|
|
12518
|
-
onLoad: didLoad
|
|
12519
|
-
});
|
|
12520
|
-
};
|
|
12521
|
-
var IFrame = forwardRef10(IFrameRefForwarding);
|
|
12522
12554
|
function exponentialBackoff(errorCount) {
|
|
12523
12555
|
return 1000 * 2 ** (errorCount - 1);
|
|
12524
12556
|
}
|
|
@@ -12537,6 +12569,7 @@ var ImgContent = ({
|
|
|
12537
12569
|
delayRenderTimeoutInMilliseconds,
|
|
12538
12570
|
onImageFrame,
|
|
12539
12571
|
crossOrigin,
|
|
12572
|
+
decoding,
|
|
12540
12573
|
ref,
|
|
12541
12574
|
...props2
|
|
12542
12575
|
}) => {
|
|
@@ -12552,7 +12585,7 @@ var ImgContent = ({
|
|
|
12552
12585
|
return imageRef.current;
|
|
12553
12586
|
}, []);
|
|
12554
12587
|
const actualSrc = usePreload(src);
|
|
12555
|
-
const retryIn =
|
|
12588
|
+
const retryIn = useCallback16((timeout) => {
|
|
12556
12589
|
if (!imageRef.current) {
|
|
12557
12590
|
return;
|
|
12558
12591
|
}
|
|
@@ -12570,7 +12603,7 @@ var ImgContent = ({
|
|
|
12570
12603
|
}, timeout);
|
|
12571
12604
|
}, []);
|
|
12572
12605
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
12573
|
-
const didGetError =
|
|
12606
|
+
const didGetError = useCallback16((e) => {
|
|
12574
12607
|
if (!errors.current) {
|
|
12575
12608
|
return;
|
|
12576
12609
|
}
|
|
@@ -12658,18 +12691,18 @@ var ImgContent = ({
|
|
|
12658
12691
|
delayRender2
|
|
12659
12692
|
]);
|
|
12660
12693
|
}
|
|
12661
|
-
const { isClientSideRendering } = useRemotionEnvironment();
|
|
12694
|
+
const { isClientSideRendering, isRendering } = useRemotionEnvironment();
|
|
12662
12695
|
const crossOriginValue = getCrossOriginValue({
|
|
12663
12696
|
crossOrigin,
|
|
12664
12697
|
requestsVideoFrame: false,
|
|
12665
12698
|
isClientSideRendering
|
|
12666
12699
|
});
|
|
12667
|
-
return /* @__PURE__ */
|
|
12700
|
+
return /* @__PURE__ */ jsx25("img", {
|
|
12668
12701
|
...props2,
|
|
12669
12702
|
ref: imageRef,
|
|
12670
12703
|
crossOrigin: crossOriginValue,
|
|
12671
12704
|
onError: didGetError,
|
|
12672
|
-
decoding: "sync"
|
|
12705
|
+
decoding: isRendering ? "sync" : decoding
|
|
12673
12706
|
});
|
|
12674
12707
|
};
|
|
12675
12708
|
var ImgInner = ({
|
|
@@ -12686,17 +12719,18 @@ var ImgInner = ({
|
|
|
12686
12719
|
if (!src) {
|
|
12687
12720
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
12688
12721
|
}
|
|
12689
|
-
return /* @__PURE__ */
|
|
12722
|
+
return /* @__PURE__ */ jsx25(Sequence, {
|
|
12690
12723
|
layout: "none",
|
|
12691
12724
|
from: from ?? 0,
|
|
12692
12725
|
durationInFrames: durationInFrames ?? Infinity,
|
|
12693
12726
|
_remotionInternalStack: stack,
|
|
12727
|
+
_remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/img" : undefined,
|
|
12694
12728
|
_remotionInternalIsMedia: { type: "image", src },
|
|
12695
12729
|
name: name ?? "<Img>",
|
|
12696
12730
|
_experimentalControls: controls,
|
|
12697
12731
|
showInTimeline: showInTimeline ?? true,
|
|
12698
12732
|
hidden,
|
|
12699
|
-
children: /* @__PURE__ */
|
|
12733
|
+
children: /* @__PURE__ */ jsx25(ImgContent, {
|
|
12700
12734
|
src,
|
|
12701
12735
|
...props2
|
|
12702
12736
|
})
|
|
@@ -12708,6 +12742,331 @@ var imgSchema = {
|
|
|
12708
12742
|
};
|
|
12709
12743
|
var Img = wrapInSchema(ImgInner, imgSchema);
|
|
12710
12744
|
addSequenceStackTraces(Img);
|
|
12745
|
+
var canvasImageSchema = {
|
|
12746
|
+
fit: {
|
|
12747
|
+
type: "enum",
|
|
12748
|
+
default: "fill",
|
|
12749
|
+
description: "Fit",
|
|
12750
|
+
variants: {
|
|
12751
|
+
fill: {},
|
|
12752
|
+
contain: {},
|
|
12753
|
+
cover: {}
|
|
12754
|
+
}
|
|
12755
|
+
},
|
|
12756
|
+
...sequenceVisualStyleSchema,
|
|
12757
|
+
hidden: hiddenField
|
|
12758
|
+
};
|
|
12759
|
+
var makeAbortError = () => {
|
|
12760
|
+
if (typeof DOMException !== "undefined") {
|
|
12761
|
+
return new DOMException("Image loading was aborted", "AbortError");
|
|
12762
|
+
}
|
|
12763
|
+
const error2 = new Error("Image loading was aborted");
|
|
12764
|
+
error2.name = "AbortError";
|
|
12765
|
+
return error2;
|
|
12766
|
+
};
|
|
12767
|
+
var loadImage = ({
|
|
12768
|
+
src,
|
|
12769
|
+
signal
|
|
12770
|
+
}) => {
|
|
12771
|
+
return new Promise((resolve, reject) => {
|
|
12772
|
+
const image = new Image;
|
|
12773
|
+
let settled = false;
|
|
12774
|
+
function cleanup() {
|
|
12775
|
+
image.onload = null;
|
|
12776
|
+
image.onerror = null;
|
|
12777
|
+
}
|
|
12778
|
+
function settle(callback) {
|
|
12779
|
+
if (settled) {
|
|
12780
|
+
return;
|
|
12781
|
+
}
|
|
12782
|
+
settled = true;
|
|
12783
|
+
cleanup();
|
|
12784
|
+
callback();
|
|
12785
|
+
}
|
|
12786
|
+
function onAbort() {
|
|
12787
|
+
settle(() => reject(makeAbortError()));
|
|
12788
|
+
}
|
|
12789
|
+
image.onload = () => {
|
|
12790
|
+
Promise.resolve(image.decode?.()).catch(() => {
|
|
12791
|
+
return;
|
|
12792
|
+
}).then(() => {
|
|
12793
|
+
const imageWidth = image.naturalWidth || image.width;
|
|
12794
|
+
const imageHeight = image.naturalHeight || image.height;
|
|
12795
|
+
if (imageWidth <= 0 || imageHeight <= 0) {
|
|
12796
|
+
settle(() => reject(new Error(`Could not determine dimensions for <CanvasImage> with src="${truncateSrcForLabel(src)}"`)));
|
|
12797
|
+
return;
|
|
12798
|
+
}
|
|
12799
|
+
settle(() => resolve({ element: image, width: imageWidth, height: imageHeight }));
|
|
12800
|
+
});
|
|
12801
|
+
};
|
|
12802
|
+
image.onerror = () => {
|
|
12803
|
+
settle(() => reject(new Error(`Could not load <CanvasImage> with src="${truncateSrcForLabel(src)}"`)));
|
|
12804
|
+
};
|
|
12805
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
12806
|
+
if (signal.aborted) {
|
|
12807
|
+
onAbort();
|
|
12808
|
+
return;
|
|
12809
|
+
}
|
|
12810
|
+
image.crossOrigin = "anonymous";
|
|
12811
|
+
image.src = src;
|
|
12812
|
+
});
|
|
12813
|
+
};
|
|
12814
|
+
function exponentialBackoff2(errorCount) {
|
|
12815
|
+
return 1000 * 2 ** (errorCount - 1);
|
|
12816
|
+
}
|
|
12817
|
+
var CanvasImageContent = forwardRef10(({
|
|
12818
|
+
src,
|
|
12819
|
+
width,
|
|
12820
|
+
height,
|
|
12821
|
+
fit = "fill",
|
|
12822
|
+
effects,
|
|
12823
|
+
controls,
|
|
12824
|
+
onError,
|
|
12825
|
+
className,
|
|
12826
|
+
style,
|
|
12827
|
+
id,
|
|
12828
|
+
pauseWhenLoading,
|
|
12829
|
+
maxRetries = 2,
|
|
12830
|
+
delayRenderRetries,
|
|
12831
|
+
delayRenderTimeoutInMilliseconds
|
|
12832
|
+
}, ref) => {
|
|
12833
|
+
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
12834
|
+
const { delayPlayback } = useBufferState();
|
|
12835
|
+
const [outputCanvas, setOutputCanvas] = useState16(null);
|
|
12836
|
+
const actualSrc = usePreload(src);
|
|
12837
|
+
const chainState = useEffectChainState();
|
|
12838
|
+
const memoizedEffects = useMemoizedEffects({
|
|
12839
|
+
effects,
|
|
12840
|
+
overrideId: controls?.overrideId ?? null
|
|
12841
|
+
});
|
|
12842
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
12843
|
+
const sourceCanvas = useMemo31(() => {
|
|
12844
|
+
if (typeof document === "undefined") {
|
|
12845
|
+
return null;
|
|
12846
|
+
}
|
|
12847
|
+
return document.createElement("canvas");
|
|
12848
|
+
}, []);
|
|
12849
|
+
const canvasRef = useCallback17((canvas) => {
|
|
12850
|
+
setOutputCanvas(canvas);
|
|
12851
|
+
if (typeof ref === "function") {
|
|
12852
|
+
ref(canvas);
|
|
12853
|
+
} else if (ref) {
|
|
12854
|
+
ref.current = canvas;
|
|
12855
|
+
}
|
|
12856
|
+
}, [ref]);
|
|
12857
|
+
useEffect16(() => {
|
|
12858
|
+
if (!outputCanvas || !sourceCanvas) {
|
|
12859
|
+
return;
|
|
12860
|
+
}
|
|
12861
|
+
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
12862
|
+
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
12863
|
+
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
12864
|
+
retries: delayRenderRetries ?? undefined,
|
|
12865
|
+
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
12866
|
+
});
|
|
12867
|
+
const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
|
|
12868
|
+
return;
|
|
12869
|
+
};
|
|
12870
|
+
const controller = new AbortController;
|
|
12871
|
+
let cancelled = false;
|
|
12872
|
+
let continued = false;
|
|
12873
|
+
let errorCount = 0;
|
|
12874
|
+
let timeoutId = null;
|
|
12875
|
+
const continueRenderOnce = () => {
|
|
12876
|
+
if (continued) {
|
|
12877
|
+
return;
|
|
12878
|
+
}
|
|
12879
|
+
continued = true;
|
|
12880
|
+
unblock();
|
|
12881
|
+
continueRender2(handle);
|
|
12882
|
+
};
|
|
12883
|
+
const attemptLoad = () => {
|
|
12884
|
+
loadImage({ src: actualSrc, signal: controller.signal }).then((image) => {
|
|
12885
|
+
if (cancelled) {
|
|
12886
|
+
return;
|
|
12887
|
+
}
|
|
12888
|
+
const canvasWidth = width ?? image.width;
|
|
12889
|
+
const canvasHeight = height ?? image.height;
|
|
12890
|
+
const sourceContext = sourceCanvas.getContext("2d", {
|
|
12891
|
+
colorSpace: "srgb"
|
|
12892
|
+
});
|
|
12893
|
+
if (!sourceContext) {
|
|
12894
|
+
throw new Error("Could not get 2D context for <CanvasImage> source canvas");
|
|
12895
|
+
}
|
|
12896
|
+
sourceCanvas.width = canvasWidth;
|
|
12897
|
+
sourceCanvas.height = canvasHeight;
|
|
12898
|
+
outputCanvas.width = canvasWidth;
|
|
12899
|
+
outputCanvas.height = canvasHeight;
|
|
12900
|
+
sourceContext.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
12901
|
+
sourceContext.drawImage(image.element, ...calculateImageFit(fit, { width: image.width, height: image.height }, { width: canvasWidth, height: canvasHeight }));
|
|
12902
|
+
return runEffectChain({
|
|
12903
|
+
state: chainState.get(canvasWidth, canvasHeight),
|
|
12904
|
+
source: sourceCanvas,
|
|
12905
|
+
effects: memoizedEffects,
|
|
12906
|
+
output: outputCanvas,
|
|
12907
|
+
width: canvasWidth,
|
|
12908
|
+
height: canvasHeight
|
|
12909
|
+
});
|
|
12910
|
+
}).then((completed) => {
|
|
12911
|
+
if (completed && !cancelled) {
|
|
12912
|
+
continueRenderOnce();
|
|
12913
|
+
}
|
|
12914
|
+
}).catch((err) => {
|
|
12915
|
+
if (err.name === "AbortError") {
|
|
12916
|
+
continueRenderOnce();
|
|
12917
|
+
return;
|
|
12918
|
+
}
|
|
12919
|
+
errorCount++;
|
|
12920
|
+
if (errorCount <= maxRetries) {
|
|
12921
|
+
const backoff = exponentialBackoff2(errorCount);
|
|
12922
|
+
console.warn(`Could not load <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}", retrying in ${backoff}ms`);
|
|
12923
|
+
timeoutId = setTimeout(() => {
|
|
12924
|
+
if (!cancelled) {
|
|
12925
|
+
attemptLoad();
|
|
12926
|
+
}
|
|
12927
|
+
}, backoff);
|
|
12928
|
+
} else if (onError) {
|
|
12929
|
+
onError(err);
|
|
12930
|
+
continueRenderOnce();
|
|
12931
|
+
} else {
|
|
12932
|
+
cancelRender2(err);
|
|
12933
|
+
}
|
|
12934
|
+
});
|
|
12935
|
+
};
|
|
12936
|
+
attemptLoad();
|
|
12937
|
+
return () => {
|
|
12938
|
+
cancelled = true;
|
|
12939
|
+
if (timeoutId !== null) {
|
|
12940
|
+
clearTimeout(timeoutId);
|
|
12941
|
+
}
|
|
12942
|
+
controller.abort();
|
|
12943
|
+
continueRenderOnce();
|
|
12944
|
+
};
|
|
12945
|
+
}, [
|
|
12946
|
+
actualSrc,
|
|
12947
|
+
cancelRender2,
|
|
12948
|
+
chainState,
|
|
12949
|
+
continueRender2,
|
|
12950
|
+
delayPlayback,
|
|
12951
|
+
delayRender2,
|
|
12952
|
+
delayRenderRetries,
|
|
12953
|
+
delayRenderTimeoutInMilliseconds,
|
|
12954
|
+
fit,
|
|
12955
|
+
height,
|
|
12956
|
+
maxRetries,
|
|
12957
|
+
memoizedEffects,
|
|
12958
|
+
onError,
|
|
12959
|
+
outputCanvas,
|
|
12960
|
+
pauseWhenLoading,
|
|
12961
|
+
sequenceContext?.postmounting,
|
|
12962
|
+
sequenceContext?.premounting,
|
|
12963
|
+
sourceCanvas,
|
|
12964
|
+
width
|
|
12965
|
+
]);
|
|
12966
|
+
return /* @__PURE__ */ jsx26("canvas", {
|
|
12967
|
+
ref: canvasRef,
|
|
12968
|
+
width,
|
|
12969
|
+
height,
|
|
12970
|
+
className,
|
|
12971
|
+
style,
|
|
12972
|
+
id
|
|
12973
|
+
});
|
|
12974
|
+
});
|
|
12975
|
+
CanvasImageContent.displayName = "CanvasImageContent";
|
|
12976
|
+
var CanvasImageInner = forwardRef10(({
|
|
12977
|
+
src,
|
|
12978
|
+
width,
|
|
12979
|
+
height,
|
|
12980
|
+
fit,
|
|
12981
|
+
effects = [],
|
|
12982
|
+
className,
|
|
12983
|
+
style,
|
|
12984
|
+
id,
|
|
12985
|
+
onError,
|
|
12986
|
+
pauseWhenLoading,
|
|
12987
|
+
maxRetries,
|
|
12988
|
+
delayRenderRetries,
|
|
12989
|
+
delayRenderTimeoutInMilliseconds,
|
|
12990
|
+
durationInFrames,
|
|
12991
|
+
from,
|
|
12992
|
+
hidden,
|
|
12993
|
+
name,
|
|
12994
|
+
showInTimeline,
|
|
12995
|
+
stack,
|
|
12996
|
+
_experimentalControls: controls
|
|
12997
|
+
}, ref) => {
|
|
12998
|
+
if (!src) {
|
|
12999
|
+
throw new Error('No "src" prop was passed to <CanvasImage>.');
|
|
13000
|
+
}
|
|
13001
|
+
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
13002
|
+
return /* @__PURE__ */ jsx26(Sequence, {
|
|
13003
|
+
layout: "none",
|
|
13004
|
+
from: from ?? 0,
|
|
13005
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
13006
|
+
hidden,
|
|
13007
|
+
showInTimeline: showInTimeline ?? true,
|
|
13008
|
+
name: name ?? "<CanvasImage>",
|
|
13009
|
+
_experimentalControls: controls,
|
|
13010
|
+
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
13011
|
+
_remotionInternalIsMedia: { type: "image", src },
|
|
13012
|
+
_remotionInternalStack: stack,
|
|
13013
|
+
children: /* @__PURE__ */ jsx26(CanvasImageContent, {
|
|
13014
|
+
ref,
|
|
13015
|
+
src,
|
|
13016
|
+
width,
|
|
13017
|
+
height,
|
|
13018
|
+
fit,
|
|
13019
|
+
effects,
|
|
13020
|
+
controls,
|
|
13021
|
+
className,
|
|
13022
|
+
style,
|
|
13023
|
+
id,
|
|
13024
|
+
onError,
|
|
13025
|
+
pauseWhenLoading,
|
|
13026
|
+
maxRetries,
|
|
13027
|
+
delayRenderRetries,
|
|
13028
|
+
delayRenderTimeoutInMilliseconds
|
|
13029
|
+
})
|
|
13030
|
+
});
|
|
13031
|
+
});
|
|
13032
|
+
var CanvasImage = wrapInSchema(CanvasImageInner, canvasImageSchema);
|
|
13033
|
+
CanvasImage.displayName = "CanvasImage";
|
|
13034
|
+
addSequenceStackTraces(CanvasImage);
|
|
13035
|
+
var kSplineTableSize = 11;
|
|
13036
|
+
var kSampleStepSize = 1 / (kSplineTableSize - 1);
|
|
13037
|
+
var IFrameRefForwarding = ({
|
|
13038
|
+
onLoad,
|
|
13039
|
+
onError,
|
|
13040
|
+
delayRenderRetries,
|
|
13041
|
+
delayRenderTimeoutInMilliseconds,
|
|
13042
|
+
...props2
|
|
13043
|
+
}, ref) => {
|
|
13044
|
+
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
13045
|
+
const [handle] = useState17(() => delayRender2(`Loading <IFrame> with source ${props2.src}`, {
|
|
13046
|
+
retries: delayRenderRetries ?? undefined,
|
|
13047
|
+
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
13048
|
+
}));
|
|
13049
|
+
const didLoad = useCallback18((e) => {
|
|
13050
|
+
continueRender2(handle);
|
|
13051
|
+
onLoad?.(e);
|
|
13052
|
+
}, [handle, onLoad, continueRender2]);
|
|
13053
|
+
const didGetError = useCallback18((e) => {
|
|
13054
|
+
continueRender2(handle);
|
|
13055
|
+
if (onError) {
|
|
13056
|
+
onError(e);
|
|
13057
|
+
} else {
|
|
13058
|
+
console.error("Error loading iframe:", e, "Handle the event using the onError() prop to make this message disappear.");
|
|
13059
|
+
}
|
|
13060
|
+
}, [handle, onError, continueRender2]);
|
|
13061
|
+
return /* @__PURE__ */ jsx27("iframe", {
|
|
13062
|
+
referrerPolicy: "strict-origin-when-cross-origin",
|
|
13063
|
+
...props2,
|
|
13064
|
+
ref,
|
|
13065
|
+
onError: didGetError,
|
|
13066
|
+
onLoad: didLoad
|
|
13067
|
+
});
|
|
13068
|
+
};
|
|
13069
|
+
var IFrame = forwardRef11(IFrameRefForwarding);
|
|
12711
13070
|
var compositionsRef = React28.createRef();
|
|
12712
13071
|
var CompositionManagerProvider = ({
|
|
12713
13072
|
children,
|
|
@@ -12716,18 +13075,18 @@ var CompositionManagerProvider = ({
|
|
|
12716
13075
|
initialCompositions,
|
|
12717
13076
|
initialCanvasContent
|
|
12718
13077
|
}) => {
|
|
12719
|
-
const [folders, setFolders] =
|
|
12720
|
-
const [canvasContent, setCanvasContent] =
|
|
12721
|
-
const [compositions, setCompositions] =
|
|
13078
|
+
const [folders, setFolders] = useState18([]);
|
|
13079
|
+
const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
|
|
13080
|
+
const [compositions, setCompositions] = useState18(initialCompositions);
|
|
12722
13081
|
const currentcompositionsRef = useRef22(compositions);
|
|
12723
|
-
const updateCompositions =
|
|
13082
|
+
const updateCompositions = useCallback19((updateComps) => {
|
|
12724
13083
|
setCompositions((comps) => {
|
|
12725
13084
|
const updated = updateComps(comps);
|
|
12726
13085
|
currentcompositionsRef.current = updated;
|
|
12727
13086
|
return updated;
|
|
12728
13087
|
});
|
|
12729
13088
|
}, []);
|
|
12730
|
-
const registerComposition =
|
|
13089
|
+
const registerComposition = useCallback19((comp) => {
|
|
12731
13090
|
updateCompositions((comps) => {
|
|
12732
13091
|
if (comps.find((c2) => c2.id === comp.id)) {
|
|
12733
13092
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
@@ -12735,12 +13094,12 @@ var CompositionManagerProvider = ({
|
|
|
12735
13094
|
return [...comps, comp];
|
|
12736
13095
|
});
|
|
12737
13096
|
}, [updateCompositions]);
|
|
12738
|
-
const unregisterComposition =
|
|
13097
|
+
const unregisterComposition = useCallback19((id) => {
|
|
12739
13098
|
setCompositions((comps) => {
|
|
12740
13099
|
return comps.filter((c2) => c2.id !== id);
|
|
12741
13100
|
});
|
|
12742
13101
|
}, []);
|
|
12743
|
-
const registerFolder =
|
|
13102
|
+
const registerFolder = useCallback19((name, parent, nonce) => {
|
|
12744
13103
|
setFolders((prevFolders) => {
|
|
12745
13104
|
return [
|
|
12746
13105
|
...prevFolders,
|
|
@@ -12752,7 +13111,7 @@ var CompositionManagerProvider = ({
|
|
|
12752
13111
|
];
|
|
12753
13112
|
});
|
|
12754
13113
|
}, []);
|
|
12755
|
-
const unregisterFolder =
|
|
13114
|
+
const unregisterFolder = useCallback19((name, parent) => {
|
|
12756
13115
|
setFolders((prevFolders) => {
|
|
12757
13116
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
12758
13117
|
});
|
|
@@ -12762,7 +13121,7 @@ var CompositionManagerProvider = ({
|
|
|
12762
13121
|
getCompositions: () => currentcompositionsRef.current
|
|
12763
13122
|
};
|
|
12764
13123
|
}, []);
|
|
12765
|
-
const compositionManagerSetters =
|
|
13124
|
+
const compositionManagerSetters = useMemo322(() => {
|
|
12766
13125
|
return {
|
|
12767
13126
|
registerComposition,
|
|
12768
13127
|
unregisterComposition,
|
|
@@ -12778,7 +13137,7 @@ var CompositionManagerProvider = ({
|
|
|
12778
13137
|
unregisterFolder,
|
|
12779
13138
|
onlyRenderComposition
|
|
12780
13139
|
]);
|
|
12781
|
-
const compositionManagerContextValue =
|
|
13140
|
+
const compositionManagerContextValue = useMemo322(() => {
|
|
12782
13141
|
return {
|
|
12783
13142
|
compositions,
|
|
12784
13143
|
folders,
|
|
@@ -12786,9 +13145,9 @@ var CompositionManagerProvider = ({
|
|
|
12786
13145
|
canvasContent
|
|
12787
13146
|
};
|
|
12788
13147
|
}, [compositions, folders, currentCompositionMetadata, canvasContent]);
|
|
12789
|
-
return /* @__PURE__ */
|
|
13148
|
+
return /* @__PURE__ */ jsx28(CompositionManager.Provider, {
|
|
12790
13149
|
value: compositionManagerContextValue,
|
|
12791
|
-
children: /* @__PURE__ */
|
|
13150
|
+
children: /* @__PURE__ */ jsx28(CompositionSetters.Provider, {
|
|
12792
13151
|
value: compositionManagerSetters,
|
|
12793
13152
|
children
|
|
12794
13153
|
})
|
|
@@ -12861,6 +13220,7 @@ var createEffect = (definition) => {
|
|
|
12861
13220
|
const { calculateKey: userCalculateKey, validateParams } = definition;
|
|
12862
13221
|
const widened = {
|
|
12863
13222
|
...definition,
|
|
13223
|
+
documentationLink: definition.documentationLink ?? null,
|
|
12864
13224
|
calculateKey: (params) => {
|
|
12865
13225
|
const disabled = params.disabled ?? false;
|
|
12866
13226
|
return `${userCalculateKey(params)}-disabled-${disabled}`;
|
|
@@ -12905,7 +13265,7 @@ var waitForRoot = (fn) => {
|
|
|
12905
13265
|
};
|
|
12906
13266
|
var MediaEnabledContext = createContext23(null);
|
|
12907
13267
|
var useVideoEnabled = () => {
|
|
12908
|
-
const context =
|
|
13268
|
+
const context = useContext34(MediaEnabledContext);
|
|
12909
13269
|
if (!context) {
|
|
12910
13270
|
return window.remotion_videoEnabled;
|
|
12911
13271
|
}
|
|
@@ -12915,7 +13275,7 @@ var useVideoEnabled = () => {
|
|
|
12915
13275
|
return context.videoEnabled;
|
|
12916
13276
|
};
|
|
12917
13277
|
var useAudioEnabled = () => {
|
|
12918
|
-
const context =
|
|
13278
|
+
const context = useContext34(MediaEnabledContext);
|
|
12919
13279
|
if (!context) {
|
|
12920
13280
|
return window.remotion_audioEnabled;
|
|
12921
13281
|
}
|
|
@@ -12929,8 +13289,8 @@ var MediaEnabledProvider = ({
|
|
|
12929
13289
|
videoEnabled,
|
|
12930
13290
|
audioEnabled
|
|
12931
13291
|
}) => {
|
|
12932
|
-
const value =
|
|
12933
|
-
return /* @__PURE__ */
|
|
13292
|
+
const value = useMemo33(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
13293
|
+
return /* @__PURE__ */ jsx29(MediaEnabledContext.Provider, {
|
|
12934
13294
|
value,
|
|
12935
13295
|
children
|
|
12936
13296
|
});
|
|
@@ -12944,33 +13304,33 @@ var RemotionRootContexts = ({
|
|
|
12944
13304
|
audioEnabled,
|
|
12945
13305
|
frameState
|
|
12946
13306
|
}) => {
|
|
12947
|
-
const nonceContext =
|
|
13307
|
+
const nonceContext = useMemo34(() => {
|
|
12948
13308
|
let counter = 0;
|
|
12949
13309
|
return {
|
|
12950
13310
|
getNonce: () => counter++
|
|
12951
13311
|
};
|
|
12952
13312
|
}, []);
|
|
12953
|
-
const logging =
|
|
13313
|
+
const logging = useMemo34(() => {
|
|
12954
13314
|
return { logLevel, mountTime: Date.now() };
|
|
12955
13315
|
}, [logLevel]);
|
|
12956
|
-
return /* @__PURE__ */
|
|
13316
|
+
return /* @__PURE__ */ jsx30(LogLevelContext.Provider, {
|
|
12957
13317
|
value: logging,
|
|
12958
|
-
children: /* @__PURE__ */
|
|
13318
|
+
children: /* @__PURE__ */ jsx30(NonceContext.Provider, {
|
|
12959
13319
|
value: nonceContext,
|
|
12960
|
-
children: /* @__PURE__ */
|
|
13320
|
+
children: /* @__PURE__ */ jsx30(TimelineContextProvider, {
|
|
12961
13321
|
frameState,
|
|
12962
|
-
children: /* @__PURE__ */
|
|
13322
|
+
children: /* @__PURE__ */ jsx30(MediaEnabledProvider, {
|
|
12963
13323
|
videoEnabled,
|
|
12964
13324
|
audioEnabled,
|
|
12965
|
-
children: /* @__PURE__ */
|
|
12966
|
-
children: /* @__PURE__ */
|
|
12967
|
-
children: /* @__PURE__ */
|
|
12968
|
-
children: /* @__PURE__ */
|
|
12969
|
-
children: /* @__PURE__ */
|
|
12970
|
-
children: /* @__PURE__ */
|
|
13325
|
+
children: /* @__PURE__ */ jsx30(EditorPropsProvider, {
|
|
13326
|
+
children: /* @__PURE__ */ jsx30(PrefetchProvider, {
|
|
13327
|
+
children: /* @__PURE__ */ jsx30(SequenceManagerProvider, {
|
|
13328
|
+
children: /* @__PURE__ */ jsx30(DurationsContextProvider, {
|
|
13329
|
+
children: /* @__PURE__ */ jsx30(BufferingProvider, {
|
|
13330
|
+
children: /* @__PURE__ */ jsx30(SharedAudioContextProvider, {
|
|
12971
13331
|
audioLatencyHint,
|
|
12972
13332
|
audioEnabled,
|
|
12973
|
-
children: /* @__PURE__ */
|
|
13333
|
+
children: /* @__PURE__ */ jsx30(SharedAudioTagsContextProvider, {
|
|
12974
13334
|
numberOfAudioTags,
|
|
12975
13335
|
children
|
|
12976
13336
|
})
|
|
@@ -13238,13 +13598,13 @@ var OffthreadVideoForRendering = ({
|
|
|
13238
13598
|
const frame = useCurrentFrame();
|
|
13239
13599
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
13240
13600
|
const videoConfig = useUnsafeVideoConfig();
|
|
13241
|
-
const sequenceContext =
|
|
13601
|
+
const sequenceContext = useContext35(SequenceContext);
|
|
13242
13602
|
const mediaStartsAt = useMediaStartsAt();
|
|
13243
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
13603
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
|
|
13244
13604
|
if (!src) {
|
|
13245
13605
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
13246
13606
|
}
|
|
13247
|
-
const id =
|
|
13607
|
+
const id = useMemo35(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
13248
13608
|
src,
|
|
13249
13609
|
sequenceContext?.cumulatedFrom,
|
|
13250
13610
|
sequenceContext?.relativeFrom,
|
|
@@ -13259,7 +13619,7 @@ var OffthreadVideoForRendering = ({
|
|
|
13259
13619
|
mediaVolume: 1
|
|
13260
13620
|
});
|
|
13261
13621
|
warnAboutTooHighVolume(volume);
|
|
13262
|
-
|
|
13622
|
+
useEffect17(() => {
|
|
13263
13623
|
if (!src) {
|
|
13264
13624
|
throw new Error("No src passed");
|
|
13265
13625
|
}
|
|
@@ -13299,14 +13659,14 @@ var OffthreadVideoForRendering = ({
|
|
|
13299
13659
|
sequenceContext?.relativeFrom,
|
|
13300
13660
|
audioStreamIndex
|
|
13301
13661
|
]);
|
|
13302
|
-
const currentTime =
|
|
13662
|
+
const currentTime = useMemo35(() => {
|
|
13303
13663
|
return getExpectedMediaFrameUncorrected({
|
|
13304
13664
|
frame,
|
|
13305
13665
|
playbackRate: playbackRate || 1,
|
|
13306
13666
|
startFrom: -mediaStartsAt
|
|
13307
13667
|
}) / videoConfig.fps;
|
|
13308
13668
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
13309
|
-
const actualSrc =
|
|
13669
|
+
const actualSrc = useMemo35(() => {
|
|
13310
13670
|
return getOffthreadVideoSource({
|
|
13311
13671
|
src,
|
|
13312
13672
|
currentTime,
|
|
@@ -13314,7 +13674,7 @@ var OffthreadVideoForRendering = ({
|
|
|
13314
13674
|
toneMapped
|
|
13315
13675
|
});
|
|
13316
13676
|
}, [toneMapped, currentTime, src, transparent]);
|
|
13317
|
-
const [imageSrc, setImageSrc] =
|
|
13677
|
+
const [imageSrc, setImageSrc] = useState19(null);
|
|
13318
13678
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
13319
13679
|
useLayoutEffect11(() => {
|
|
13320
13680
|
if (!window.remotion_videoEnabled) {
|
|
@@ -13387,17 +13747,17 @@ var OffthreadVideoForRendering = ({
|
|
|
13387
13747
|
continueRender2,
|
|
13388
13748
|
delayRender2
|
|
13389
13749
|
]);
|
|
13390
|
-
const onErr =
|
|
13750
|
+
const onErr = useCallback20(() => {
|
|
13391
13751
|
if (onError) {
|
|
13392
13752
|
onError?.(new Error("Failed to load image with src " + imageSrc));
|
|
13393
13753
|
} else {
|
|
13394
13754
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
13395
13755
|
}
|
|
13396
13756
|
}, [imageSrc, onError]);
|
|
13397
|
-
const className =
|
|
13757
|
+
const className = useMemo35(() => {
|
|
13398
13758
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy2).join(" ");
|
|
13399
13759
|
}, [props2.className]);
|
|
13400
|
-
const onImageFrame =
|
|
13760
|
+
const onImageFrame = useCallback20((img) => {
|
|
13401
13761
|
if (onVideoFrame) {
|
|
13402
13762
|
onVideoFrame(img);
|
|
13403
13763
|
}
|
|
@@ -13406,7 +13766,7 @@ var OffthreadVideoForRendering = ({
|
|
|
13406
13766
|
return null;
|
|
13407
13767
|
}
|
|
13408
13768
|
continueRender2(imageSrc.handle);
|
|
13409
|
-
return /* @__PURE__ */
|
|
13769
|
+
return /* @__PURE__ */ jsx31(Img, {
|
|
13410
13770
|
src: imageSrc.src,
|
|
13411
13771
|
delayRenderRetries,
|
|
13412
13772
|
delayRenderTimeoutInMilliseconds,
|
|
@@ -13420,7 +13780,7 @@ var useEmitVideoFrame = ({
|
|
|
13420
13780
|
ref,
|
|
13421
13781
|
onVideoFrame
|
|
13422
13782
|
}) => {
|
|
13423
|
-
|
|
13783
|
+
useEffect18(() => {
|
|
13424
13784
|
const { current } = ref;
|
|
13425
13785
|
if (!current) {
|
|
13426
13786
|
return;
|
|
@@ -13452,12 +13812,12 @@ class MediaPlaybackError extends Error {
|
|
|
13452
13812
|
}
|
|
13453
13813
|
}
|
|
13454
13814
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
13455
|
-
const context =
|
|
13815
|
+
const context = useContext36(SharedAudioContext);
|
|
13456
13816
|
if (!context) {
|
|
13457
13817
|
throw new Error("SharedAudioContext not found");
|
|
13458
13818
|
}
|
|
13459
13819
|
const videoRef = useRef23(null);
|
|
13460
|
-
const sharedSource =
|
|
13820
|
+
const sharedSource = useMemo36(() => {
|
|
13461
13821
|
if (!context.audioContext) {
|
|
13462
13822
|
return null;
|
|
13463
13823
|
}
|
|
@@ -13509,10 +13869,10 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13509
13869
|
}
|
|
13510
13870
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
13511
13871
|
const { fps, durationInFrames } = useVideoConfig();
|
|
13512
|
-
const parentSequence =
|
|
13872
|
+
const parentSequence = useContext36(SequenceContext);
|
|
13513
13873
|
const logLevel = useLogLevel();
|
|
13514
13874
|
const mountTime = useMountTime();
|
|
13515
|
-
const [timelineId] =
|
|
13875
|
+
const [timelineId] = useState20(() => String(Math.random()));
|
|
13516
13876
|
if (typeof acceptableTimeShift !== "undefined") {
|
|
13517
13877
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
13518
13878
|
}
|
|
@@ -13524,7 +13884,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13524
13884
|
mediaVolume
|
|
13525
13885
|
});
|
|
13526
13886
|
warnAboutTooHighVolume(userPreferredVolume);
|
|
13527
|
-
const getStack =
|
|
13887
|
+
const getStack = useCallback21(() => {
|
|
13528
13888
|
return _remotionInternalStack ?? null;
|
|
13529
13889
|
}, [_remotionInternalStack]);
|
|
13530
13890
|
useMediaInTimeline({
|
|
@@ -13539,7 +13899,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13539
13899
|
showInTimeline,
|
|
13540
13900
|
premountDisplay: parentSequence?.premountDisplay ?? null,
|
|
13541
13901
|
postmountDisplay: parentSequence?.postmountDisplay ?? null,
|
|
13542
|
-
loopDisplay: undefined
|
|
13902
|
+
loopDisplay: undefined,
|
|
13903
|
+
documentationLink: name === undefined ? onlyWarnForMediaSeekingError ? "https://www.remotion.dev/docs/offthreadvideo" : "https://www.remotion.dev/docs/html5-video" : null
|
|
13543
13904
|
});
|
|
13544
13905
|
useMediaPlayback({
|
|
13545
13906
|
mediaRef: videoRef,
|
|
@@ -13581,13 +13942,13 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13581
13942
|
useImperativeHandle8(ref, () => {
|
|
13582
13943
|
return videoRef.current;
|
|
13583
13944
|
}, []);
|
|
13584
|
-
|
|
13945
|
+
useState20(() => playbackLogging({
|
|
13585
13946
|
logLevel,
|
|
13586
13947
|
message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
13587
13948
|
tag: "video",
|
|
13588
13949
|
mountTime
|
|
13589
13950
|
}));
|
|
13590
|
-
|
|
13951
|
+
useEffect19(() => {
|
|
13591
13952
|
const { current } = videoRef;
|
|
13592
13953
|
if (!current) {
|
|
13593
13954
|
return;
|
|
@@ -13630,7 +13991,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13630
13991
|
const currentOnDurationCallback = useRef23(onDuration);
|
|
13631
13992
|
currentOnDurationCallback.current = onDuration;
|
|
13632
13993
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
13633
|
-
|
|
13994
|
+
useEffect19(() => {
|
|
13634
13995
|
const { current } = videoRef;
|
|
13635
13996
|
if (!current) {
|
|
13636
13997
|
return;
|
|
@@ -13647,7 +14008,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13647
14008
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
13648
14009
|
};
|
|
13649
14010
|
}, [src]);
|
|
13650
|
-
|
|
14011
|
+
useEffect19(() => {
|
|
13651
14012
|
const { current } = videoRef;
|
|
13652
14013
|
if (!current) {
|
|
13653
14014
|
return;
|
|
@@ -13658,7 +14019,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13658
14019
|
current.preload = "auto";
|
|
13659
14020
|
}
|
|
13660
14021
|
}, []);
|
|
13661
|
-
const actualStyle =
|
|
14022
|
+
const actualStyle = useMemo36(() => {
|
|
13662
14023
|
return {
|
|
13663
14024
|
...style
|
|
13664
14025
|
};
|
|
@@ -13668,7 +14029,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13668
14029
|
requestsVideoFrame: Boolean(onVideoFrame),
|
|
13669
14030
|
isClientSideRendering: false
|
|
13670
14031
|
});
|
|
13671
|
-
return /* @__PURE__ */
|
|
14032
|
+
return /* @__PURE__ */ jsx322("video", {
|
|
13672
14033
|
ref: videoRef,
|
|
13673
14034
|
muted: muted || mediaMuted || userPreferredVolume <= 0,
|
|
13674
14035
|
playsInline: true,
|
|
@@ -13680,7 +14041,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13680
14041
|
...nativeProps
|
|
13681
14042
|
});
|
|
13682
14043
|
};
|
|
13683
|
-
var VideoForPreview =
|
|
14044
|
+
var VideoForPreview = forwardRef12(VideoForDevelopmentRefForwardingFunction);
|
|
13684
14045
|
var InnerOffthreadVideo = (props2) => {
|
|
13685
14046
|
const {
|
|
13686
14047
|
startFrom,
|
|
@@ -13697,7 +14058,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
13697
14058
|
if (environment.isClientSideRendering) {
|
|
13698
14059
|
throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
13699
14060
|
}
|
|
13700
|
-
const onDuration =
|
|
14061
|
+
const onDuration = useCallback22(() => {
|
|
13701
14062
|
return;
|
|
13702
14063
|
}, []);
|
|
13703
14064
|
if (typeof props2.src !== "string") {
|
|
@@ -13711,13 +14072,13 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
13711
14072
|
trimAfter
|
|
13712
14073
|
});
|
|
13713
14074
|
if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
|
|
13714
|
-
return /* @__PURE__ */
|
|
14075
|
+
return /* @__PURE__ */ jsx33(Sequence, {
|
|
13715
14076
|
layout: "none",
|
|
13716
14077
|
from: 0 - (trimBeforeValue ?? 0),
|
|
13717
14078
|
showInTimeline: false,
|
|
13718
14079
|
durationInFrames: trimAfterValue,
|
|
13719
14080
|
name,
|
|
13720
|
-
children: /* @__PURE__ */
|
|
14081
|
+
children: /* @__PURE__ */ jsx33(InnerOffthreadVideo, {
|
|
13721
14082
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
13722
14083
|
...otherProps,
|
|
13723
14084
|
trimAfter: undefined,
|
|
@@ -13732,7 +14093,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
13732
14093
|
}
|
|
13733
14094
|
validateMediaProps(props2, "Video");
|
|
13734
14095
|
if (environment.isRendering) {
|
|
13735
|
-
return /* @__PURE__ */
|
|
14096
|
+
return /* @__PURE__ */ jsx33(OffthreadVideoForRendering, {
|
|
13736
14097
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
13737
14098
|
...otherProps,
|
|
13738
14099
|
trimAfter: undefined,
|
|
@@ -13754,7 +14115,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
13754
14115
|
delayRenderTimeoutInMilliseconds,
|
|
13755
14116
|
...propsForPreview
|
|
13756
14117
|
} = otherProps;
|
|
13757
|
-
return /* @__PURE__ */
|
|
14118
|
+
return /* @__PURE__ */ jsx33(VideoForPreview, {
|
|
13758
14119
|
_remotionInternalStack: stack ?? null,
|
|
13759
14120
|
onDuration,
|
|
13760
14121
|
onlyWarnForMediaSeekingError: true,
|
|
@@ -13804,7 +14165,7 @@ var OffthreadVideo = ({
|
|
|
13804
14165
|
if (imageFormat) {
|
|
13805
14166
|
throw new TypeError(`The \`<OffthreadVideo>\` tag does no longer accept \`imageFormat\`. Use the \`transparent\` prop if you want to render a transparent video.`);
|
|
13806
14167
|
}
|
|
13807
|
-
return /* @__PURE__ */
|
|
14168
|
+
return /* @__PURE__ */ jsx33(InnerOffthreadVideo, {
|
|
13808
14169
|
acceptableTimeShiftInSeconds,
|
|
13809
14170
|
allowAmplificationDuringRender: allowAmplificationDuringRender ?? true,
|
|
13810
14171
|
audioStreamIndex: audioStreamIndex ?? 0,
|
|
@@ -13853,7 +14214,7 @@ function useRemotionContexts() {
|
|
|
13853
14214
|
const sequenceManagerContext = React36.useContext(SequenceManager);
|
|
13854
14215
|
const bufferManagerContext = React36.useContext(BufferingContextReact);
|
|
13855
14216
|
const logLevelContext = React36.useContext(LogLevelContext);
|
|
13856
|
-
return
|
|
14217
|
+
return useMemo37(() => ({
|
|
13857
14218
|
compositionManagerCtx,
|
|
13858
14219
|
timelineContext,
|
|
13859
14220
|
setTimelineContext,
|
|
@@ -13883,29 +14244,29 @@ function useRemotionContexts() {
|
|
|
13883
14244
|
}
|
|
13884
14245
|
var RemotionContextProvider = (props2) => {
|
|
13885
14246
|
const { children, contexts } = props2;
|
|
13886
|
-
return /* @__PURE__ */
|
|
14247
|
+
return /* @__PURE__ */ jsx34(LogLevelContext.Provider, {
|
|
13887
14248
|
value: contexts.logLevelContext,
|
|
13888
|
-
children: /* @__PURE__ */
|
|
14249
|
+
children: /* @__PURE__ */ jsx34(CanUseRemotionHooks.Provider, {
|
|
13889
14250
|
value: contexts.canUseRemotionHooksContext,
|
|
13890
|
-
children: /* @__PURE__ */
|
|
14251
|
+
children: /* @__PURE__ */ jsx34(NonceContext.Provider, {
|
|
13891
14252
|
value: contexts.nonceContext,
|
|
13892
|
-
children: /* @__PURE__ */
|
|
14253
|
+
children: /* @__PURE__ */ jsx34(PreloadContext.Provider, {
|
|
13893
14254
|
value: contexts.preloadContext,
|
|
13894
|
-
children: /* @__PURE__ */
|
|
14255
|
+
children: /* @__PURE__ */ jsx34(CompositionManager.Provider, {
|
|
13895
14256
|
value: contexts.compositionManagerCtx,
|
|
13896
|
-
children: /* @__PURE__ */
|
|
14257
|
+
children: /* @__PURE__ */ jsx34(SequenceManager.Provider, {
|
|
13897
14258
|
value: contexts.sequenceManagerContext,
|
|
13898
|
-
children: /* @__PURE__ */
|
|
14259
|
+
children: /* @__PURE__ */ jsx34(RenderAssetManager.Provider, {
|
|
13899
14260
|
value: contexts.renderAssetManagerContext,
|
|
13900
|
-
children: /* @__PURE__ */
|
|
14261
|
+
children: /* @__PURE__ */ jsx34(ResolveCompositionContext.Provider, {
|
|
13901
14262
|
value: contexts.resolveCompositionContext,
|
|
13902
|
-
children: /* @__PURE__ */
|
|
14263
|
+
children: /* @__PURE__ */ jsx34(TimelineContext.Provider, {
|
|
13903
14264
|
value: contexts.timelineContext,
|
|
13904
|
-
children: /* @__PURE__ */
|
|
14265
|
+
children: /* @__PURE__ */ jsx34(SetTimelineContext.Provider, {
|
|
13905
14266
|
value: contexts.setTimelineContext,
|
|
13906
|
-
children: /* @__PURE__ */
|
|
14267
|
+
children: /* @__PURE__ */ jsx34(SequenceContext.Provider, {
|
|
13907
14268
|
value: contexts.sequenceContext,
|
|
13908
|
-
children: /* @__PURE__ */
|
|
14269
|
+
children: /* @__PURE__ */ jsx34(BufferingContextReact.Provider, {
|
|
13909
14270
|
value: contexts.bufferManagerContext,
|
|
13910
14271
|
children
|
|
13911
14272
|
})
|
|
@@ -13930,6 +14291,7 @@ var Internals = {
|
|
|
13930
14291
|
useAbsoluteTimelinePosition,
|
|
13931
14292
|
evaluateVolume,
|
|
13932
14293
|
getAbsoluteSrc,
|
|
14294
|
+
getAssetDisplayName,
|
|
13933
14295
|
Timeline: exports_timeline_position_state,
|
|
13934
14296
|
validateMediaTrimProps,
|
|
13935
14297
|
validateMediaProps,
|
|
@@ -14090,13 +14452,13 @@ var flattenChildren = (children) => {
|
|
|
14090
14452
|
};
|
|
14091
14453
|
var IsInsideSeriesContext = createContext25(false);
|
|
14092
14454
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
14093
|
-
return /* @__PURE__ */
|
|
14455
|
+
return /* @__PURE__ */ jsx35(IsInsideSeriesContext.Provider, {
|
|
14094
14456
|
value: true,
|
|
14095
14457
|
children
|
|
14096
14458
|
});
|
|
14097
14459
|
};
|
|
14098
14460
|
var IsNotInsideSeriesProvider = ({ children }) => {
|
|
14099
|
-
return /* @__PURE__ */
|
|
14461
|
+
return /* @__PURE__ */ jsx35(IsInsideSeriesContext.Provider, {
|
|
14100
14462
|
value: false,
|
|
14101
14463
|
children
|
|
14102
14464
|
});
|
|
@@ -14109,13 +14471,13 @@ var useRequireToBeInsideSeries = () => {
|
|
|
14109
14471
|
};
|
|
14110
14472
|
var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
14111
14473
|
useRequireToBeInsideSeries();
|
|
14112
|
-
return /* @__PURE__ */
|
|
14474
|
+
return /* @__PURE__ */ jsx36(IsNotInsideSeriesProvider, {
|
|
14113
14475
|
children
|
|
14114
14476
|
});
|
|
14115
14477
|
};
|
|
14116
|
-
var SeriesSequence =
|
|
14478
|
+
var SeriesSequence = forwardRef13(SeriesSequenceRefForwardingFunction);
|
|
14117
14479
|
var SeriesInner = (props2) => {
|
|
14118
|
-
const childrenValue =
|
|
14480
|
+
const childrenValue = useMemo38(() => {
|
|
14119
14481
|
let startFrame = 0;
|
|
14120
14482
|
const flattenedChildren = flattenChildren(props2.children);
|
|
14121
14483
|
return Children.map(flattenedChildren, (child, i) => {
|
|
@@ -14156,8 +14518,9 @@ var SeriesInner = (props2) => {
|
|
|
14156
14518
|
}
|
|
14157
14519
|
const currentStartFrame = startFrame + offset;
|
|
14158
14520
|
startFrame += durationInFramesProp + offset;
|
|
14159
|
-
return /* @__PURE__ */
|
|
14521
|
+
return /* @__PURE__ */ jsx36(Sequence, {
|
|
14160
14522
|
name: name || "<Series.Sequence>",
|
|
14523
|
+
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
14161
14524
|
from: currentStartFrame,
|
|
14162
14525
|
durationInFrames: durationInFramesProp,
|
|
14163
14526
|
...passedProps,
|
|
@@ -14166,10 +14529,11 @@ var SeriesInner = (props2) => {
|
|
|
14166
14529
|
});
|
|
14167
14530
|
});
|
|
14168
14531
|
}, [props2.children]);
|
|
14169
|
-
return /* @__PURE__ */
|
|
14170
|
-
children: /* @__PURE__ */
|
|
14532
|
+
return /* @__PURE__ */ jsx36(IsInsideSeriesContainer, {
|
|
14533
|
+
children: /* @__PURE__ */ jsx36(Sequence, {
|
|
14171
14534
|
layout: "none",
|
|
14172
14535
|
name: "<Series>",
|
|
14536
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/series",
|
|
14173
14537
|
...props2,
|
|
14174
14538
|
children: childrenValue
|
|
14175
14539
|
})
|
|
@@ -14646,14 +15010,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14646
15010
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
14647
15011
|
const videoConfig = useUnsafeVideoConfig();
|
|
14648
15012
|
const videoRef = useRef24(null);
|
|
14649
|
-
const sequenceContext =
|
|
15013
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
14650
15014
|
const mediaStartsAt = useMediaStartsAt();
|
|
14651
15015
|
const environment = useRemotionEnvironment();
|
|
14652
15016
|
const logLevel = useLogLevel();
|
|
14653
15017
|
const mountTime = useMountTime();
|
|
14654
15018
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
14655
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
14656
|
-
const id =
|
|
15019
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
15020
|
+
const id = useMemo39(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
14657
15021
|
props2.src,
|
|
14658
15022
|
sequenceContext?.cumulatedFrom,
|
|
14659
15023
|
sequenceContext?.relativeFrom,
|
|
@@ -14668,7 +15032,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14668
15032
|
mediaVolume: 1
|
|
14669
15033
|
});
|
|
14670
15034
|
warnAboutTooHighVolume(volume);
|
|
14671
|
-
|
|
15035
|
+
useEffect20(() => {
|
|
14672
15036
|
if (!props2.src) {
|
|
14673
15037
|
throw new Error("No src passed");
|
|
14674
15038
|
}
|
|
@@ -14711,7 +15075,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14711
15075
|
useImperativeHandle9(ref, () => {
|
|
14712
15076
|
return videoRef.current;
|
|
14713
15077
|
}, []);
|
|
14714
|
-
|
|
15078
|
+
useEffect20(() => {
|
|
14715
15079
|
if (!window.remotion_videoEnabled) {
|
|
14716
15080
|
return;
|
|
14717
15081
|
}
|
|
@@ -14835,13 +15199,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14835
15199
|
delayRender2
|
|
14836
15200
|
]);
|
|
14837
15201
|
}
|
|
14838
|
-
return /* @__PURE__ */
|
|
15202
|
+
return /* @__PURE__ */ jsx37("video", {
|
|
14839
15203
|
ref: videoRef,
|
|
14840
15204
|
disableRemotePlayback: true,
|
|
14841
15205
|
...props2
|
|
14842
15206
|
});
|
|
14843
15207
|
};
|
|
14844
|
-
var VideoForRendering =
|
|
15208
|
+
var VideoForRendering = forwardRef14(VideoForRenderingForwardFunction);
|
|
14845
15209
|
var VideoForwardingFunction = (props2, ref) => {
|
|
14846
15210
|
const {
|
|
14847
15211
|
startFrom,
|
|
@@ -14862,7 +15226,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14862
15226
|
if (environment.isClientSideRendering) {
|
|
14863
15227
|
throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
14864
15228
|
}
|
|
14865
|
-
const { durations, setDurations } =
|
|
15229
|
+
const { durations, setDurations } = useContext38(DurationsContext);
|
|
14866
15230
|
if (typeof ref === "string") {
|
|
14867
15231
|
throw new Error("string refs are not supported");
|
|
14868
15232
|
}
|
|
@@ -14870,10 +15234,10 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14870
15234
|
throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
|
|
14871
15235
|
}
|
|
14872
15236
|
const preloadedSrc = usePreload(props2.src);
|
|
14873
|
-
const onDuration =
|
|
15237
|
+
const onDuration = useCallback23((src, durationInSeconds) => {
|
|
14874
15238
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
14875
15239
|
}, [setDurations]);
|
|
14876
|
-
const onVideoFrame =
|
|
15240
|
+
const onVideoFrame = useCallback23(() => {}, []);
|
|
14877
15241
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
|
|
14878
15242
|
validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
|
|
14879
15243
|
const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
|
|
@@ -14884,7 +15248,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14884
15248
|
});
|
|
14885
15249
|
if (loop && durationFetched !== undefined) {
|
|
14886
15250
|
if (!Number.isFinite(durationFetched)) {
|
|
14887
|
-
return /* @__PURE__ */
|
|
15251
|
+
return /* @__PURE__ */ jsx38(Html5Video, {
|
|
14888
15252
|
...propsOtherThanLoop,
|
|
14889
15253
|
ref,
|
|
14890
15254
|
stack,
|
|
@@ -14892,7 +15256,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14892
15256
|
});
|
|
14893
15257
|
}
|
|
14894
15258
|
const mediaDuration = durationFetched * fps;
|
|
14895
|
-
return /* @__PURE__ */
|
|
15259
|
+
return /* @__PURE__ */ jsx38(Loop, {
|
|
14896
15260
|
durationInFrames: calculateMediaDuration({
|
|
14897
15261
|
trimAfter: trimAfterValue,
|
|
14898
15262
|
mediaDurationInFrames: mediaDuration,
|
|
@@ -14902,7 +15266,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14902
15266
|
layout: "none",
|
|
14903
15267
|
name,
|
|
14904
15268
|
showInTimeline: false,
|
|
14905
|
-
children: /* @__PURE__ */
|
|
15269
|
+
children: /* @__PURE__ */ jsx38(Html5Video, {
|
|
14906
15270
|
...propsOtherThanLoop,
|
|
14907
15271
|
ref,
|
|
14908
15272
|
stack,
|
|
@@ -14911,13 +15275,13 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14911
15275
|
});
|
|
14912
15276
|
}
|
|
14913
15277
|
if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
|
|
14914
|
-
return /* @__PURE__ */
|
|
15278
|
+
return /* @__PURE__ */ jsx38(Sequence, {
|
|
14915
15279
|
layout: "none",
|
|
14916
15280
|
from: 0 - (trimBeforeValue ?? 0),
|
|
14917
15281
|
showInTimeline: false,
|
|
14918
15282
|
durationInFrames: trimAfterValue === undefined ? undefined : trimAfterValue / (props2.playbackRate ?? 1),
|
|
14919
15283
|
name,
|
|
14920
|
-
children: /* @__PURE__ */
|
|
15284
|
+
children: /* @__PURE__ */ jsx38(Html5Video, {
|
|
14921
15285
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
14922
15286
|
...otherProps,
|
|
14923
15287
|
ref,
|
|
@@ -14931,14 +15295,14 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14931
15295
|
volume: props2.volume
|
|
14932
15296
|
}, "Html5Video");
|
|
14933
15297
|
if (environment.isRendering) {
|
|
14934
|
-
return /* @__PURE__ */
|
|
15298
|
+
return /* @__PURE__ */ jsx38(VideoForRendering, {
|
|
14935
15299
|
onDuration,
|
|
14936
15300
|
onVideoFrame: onVideoFrame ?? null,
|
|
14937
15301
|
...otherProps,
|
|
14938
15302
|
ref
|
|
14939
15303
|
});
|
|
14940
15304
|
}
|
|
14941
|
-
return /* @__PURE__ */
|
|
15305
|
+
return /* @__PURE__ */ jsx38(VideoForPreview, {
|
|
14942
15306
|
onlyWarnForMediaSeekingError: false,
|
|
14943
15307
|
...otherProps,
|
|
14944
15308
|
ref,
|
|
@@ -14951,7 +15315,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14951
15315
|
onAutoPlayError: onAutoPlayError ?? undefined
|
|
14952
15316
|
});
|
|
14953
15317
|
};
|
|
14954
|
-
var Html5Video =
|
|
15318
|
+
var Html5Video = forwardRef15(VideoForwardingFunction);
|
|
14955
15319
|
addSequenceStackTraces(Html5Video);
|
|
14956
15320
|
checkMultipleRemotionVersions();
|
|
14957
15321
|
var proxyObj = {};
|
|
@@ -14980,7 +15344,7 @@ addSequenceStackTraces(Composition);
|
|
|
14980
15344
|
|
|
14981
15345
|
// ../design/dist/esm/index.mjs
|
|
14982
15346
|
import { jsx as jsx210, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
14983
|
-
import { jsx as
|
|
15347
|
+
import { jsx as jsx310, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
14984
15348
|
import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef26 } from "react";
|
|
14985
15349
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
14986
15350
|
import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
@@ -15033,8 +15397,8 @@ import * as React282 from "react";
|
|
|
15033
15397
|
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
15034
15398
|
import * as React35 from "react";
|
|
15035
15399
|
import * as React312 from "react";
|
|
15036
|
-
import { useState as useState112 } from "react";
|
|
15037
15400
|
import * as React292 from "react";
|
|
15401
|
+
import { useState as useState112 } from "react";
|
|
15038
15402
|
import * as React30 from "react";
|
|
15039
15403
|
import * as React342 from "react";
|
|
15040
15404
|
import * as React332 from "react";
|
|
@@ -15136,9 +15500,9 @@ function createSlot(ownerName) {
|
|
|
15136
15500
|
return child;
|
|
15137
15501
|
}
|
|
15138
15502
|
});
|
|
15139
|
-
return /* @__PURE__ */
|
|
15503
|
+
return /* @__PURE__ */ jsx39(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
15140
15504
|
}
|
|
15141
|
-
return /* @__PURE__ */
|
|
15505
|
+
return /* @__PURE__ */ jsx39(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
15142
15506
|
});
|
|
15143
15507
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
15144
15508
|
return Slot2;
|
|
@@ -15166,7 +15530,7 @@ function createSlotClone(ownerName) {
|
|
|
15166
15530
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
15167
15531
|
function createSlottable(ownerName) {
|
|
15168
15532
|
const Slottable2 = ({ children }) => {
|
|
15169
|
-
return /* @__PURE__ */
|
|
15533
|
+
return /* @__PURE__ */ jsx39(Fragment2, { children });
|
|
15170
15534
|
};
|
|
15171
15535
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
15172
15536
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -15235,8 +15599,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
15235
15599
|
progress: 0,
|
|
15236
15600
|
isActive: false
|
|
15237
15601
|
});
|
|
15238
|
-
const eventTarget =
|
|
15239
|
-
|
|
15602
|
+
const eventTarget = useMemo40(() => new EventTarget, []);
|
|
15603
|
+
useEffect21(() => {
|
|
15240
15604
|
if (disabled) {
|
|
15241
15605
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
15242
15606
|
} else {
|
|
@@ -15382,8 +15746,8 @@ var getAngle = (ref, coordinates) => {
|
|
|
15382
15746
|
};
|
|
15383
15747
|
var lastCoordinates = null;
|
|
15384
15748
|
var useMousePosition = (ref) => {
|
|
15385
|
-
const [angle, setAngle] =
|
|
15386
|
-
|
|
15749
|
+
const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
|
|
15750
|
+
useEffect21(() => {
|
|
15387
15751
|
const element = ref.current;
|
|
15388
15752
|
if (!element) {
|
|
15389
15753
|
return;
|
|
@@ -15467,7 +15831,7 @@ var Outer = ({
|
|
|
15467
15831
|
className: "relative",
|
|
15468
15832
|
style: { width, height },
|
|
15469
15833
|
children: [
|
|
15470
|
-
/* @__PURE__ */
|
|
15834
|
+
/* @__PURE__ */ jsx310("svg", {
|
|
15471
15835
|
viewBox,
|
|
15472
15836
|
style: {
|
|
15473
15837
|
overflow: "visible",
|
|
@@ -15478,11 +15842,11 @@ var Outer = ({
|
|
|
15478
15842
|
left: 0
|
|
15479
15843
|
},
|
|
15480
15844
|
pointerEvents: "none",
|
|
15481
|
-
children: /* @__PURE__ */
|
|
15845
|
+
children: /* @__PURE__ */ jsx310(Faces, {
|
|
15482
15846
|
elements: inbetween
|
|
15483
15847
|
})
|
|
15484
15848
|
}),
|
|
15485
|
-
/* @__PURE__ */
|
|
15849
|
+
/* @__PURE__ */ jsx310("div", {
|
|
15486
15850
|
style: {
|
|
15487
15851
|
transform: makeMatrix3dTransform(frontFace),
|
|
15488
15852
|
width,
|
|
@@ -15551,7 +15915,7 @@ var Button = ({
|
|
|
15551
15915
|
const [dimensions, setDimensions] = useState22(null);
|
|
15552
15916
|
const ref = useRef25(null);
|
|
15553
15917
|
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
|
|
15554
|
-
const onPointerEnter =
|
|
15918
|
+
const onPointerEnter = useCallback25((e) => {
|
|
15555
15919
|
if (e.pointerType !== "mouse") {
|
|
15556
15920
|
return;
|
|
15557
15921
|
}
|
|
@@ -15588,7 +15952,7 @@ var Button = ({
|
|
|
15588
15952
|
const isDisabled = disabled || loading;
|
|
15589
15953
|
const isAnchor = !asChild && "href" in rest && rest.href !== undefined;
|
|
15590
15954
|
const sharedClasses = cn("text-text", "inline-flex", "justify-center", "bg-button-bg", "items-center", "font-brand", "border-solid", "text-[1em]", "rounded-lg", "border-black", "border-2", "border-b-4", "cursor-pointer", "px-4", "h-12", "flex-row", "items-center", "relative", "overflow-hidden", isDisabled && "cursor-default opacity-50", className);
|
|
15591
|
-
const preventInteraction =
|
|
15955
|
+
const preventInteraction = useCallback25((e) => {
|
|
15592
15956
|
e.preventDefault();
|
|
15593
15957
|
e.stopPropagation();
|
|
15594
15958
|
}, []);
|
|
@@ -18789,7 +19153,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
18789
19153
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
18790
19154
|
};
|
|
18791
19155
|
var __assign = function() {
|
|
18792
|
-
__assign = Object.assign || function
|
|
19156
|
+
__assign = Object.assign || function __assign2(t) {
|
|
18793
19157
|
for (var s, i = 1, n = arguments.length;i < n; i++) {
|
|
18794
19158
|
s = arguments[i];
|
|
18795
19159
|
for (var p in s)
|
|
@@ -20576,17 +20940,17 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
20576
20940
|
let defaultContexts = [];
|
|
20577
20941
|
function createContext32(rootComponentName, defaultContext) {
|
|
20578
20942
|
const BaseContext = React382.createContext(defaultContext);
|
|
20579
|
-
const
|
|
20943
|
+
const index3 = defaultContexts.length;
|
|
20580
20944
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
20581
20945
|
const Provider = (props) => {
|
|
20582
20946
|
const { scope, children, ...context } = props;
|
|
20583
|
-
const Context = scope?.[scopeName]?.[
|
|
20947
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
|
20584
20948
|
const value = React382.useMemo(() => context, Object.values(context));
|
|
20585
20949
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
20586
20950
|
};
|
|
20587
20951
|
Provider.displayName = rootComponentName + "Provider";
|
|
20588
20952
|
function useContext222(consumerName, scope) {
|
|
20589
|
-
const Context = scope?.[scopeName]?.[
|
|
20953
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
|
20590
20954
|
const context = React382.useContext(Context);
|
|
20591
20955
|
if (context)
|
|
20592
20956
|
return context;
|
|
@@ -20783,10 +21147,10 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20783
21147
|
super.set(key, value);
|
|
20784
21148
|
return this;
|
|
20785
21149
|
}
|
|
20786
|
-
insert(
|
|
21150
|
+
insert(index3, key, value) {
|
|
20787
21151
|
const has = this.has(key);
|
|
20788
21152
|
const length2 = this.#keys.length;
|
|
20789
|
-
const relativeIndex = toSafeInteger(
|
|
21153
|
+
const relativeIndex = toSafeInteger(index3);
|
|
20790
21154
|
let actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
|
|
20791
21155
|
const safeIndex = actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
|
|
20792
21156
|
if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
|
|
@@ -20824,39 +21188,39 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20824
21188
|
}
|
|
20825
21189
|
return this;
|
|
20826
21190
|
}
|
|
20827
|
-
with(
|
|
21191
|
+
with(index3, key, value) {
|
|
20828
21192
|
const copy = new _OrderedDict(this);
|
|
20829
|
-
copy.insert(
|
|
21193
|
+
copy.insert(index3, key, value);
|
|
20830
21194
|
return copy;
|
|
20831
21195
|
}
|
|
20832
21196
|
before(key) {
|
|
20833
|
-
const
|
|
20834
|
-
if (
|
|
21197
|
+
const index3 = this.#keys.indexOf(key) - 1;
|
|
21198
|
+
if (index3 < 0) {
|
|
20835
21199
|
return;
|
|
20836
21200
|
}
|
|
20837
|
-
return this.entryAt(
|
|
21201
|
+
return this.entryAt(index3);
|
|
20838
21202
|
}
|
|
20839
21203
|
setBefore(key, newKey, value) {
|
|
20840
|
-
const
|
|
20841
|
-
if (
|
|
21204
|
+
const index3 = this.#keys.indexOf(key);
|
|
21205
|
+
if (index3 === -1) {
|
|
20842
21206
|
return this;
|
|
20843
21207
|
}
|
|
20844
|
-
return this.insert(
|
|
21208
|
+
return this.insert(index3, newKey, value);
|
|
20845
21209
|
}
|
|
20846
21210
|
after(key) {
|
|
20847
|
-
let
|
|
20848
|
-
|
|
20849
|
-
if (
|
|
21211
|
+
let index3 = this.#keys.indexOf(key);
|
|
21212
|
+
index3 = index3 === -1 || index3 === this.size - 1 ? -1 : index3 + 1;
|
|
21213
|
+
if (index3 === -1) {
|
|
20850
21214
|
return;
|
|
20851
21215
|
}
|
|
20852
|
-
return this.entryAt(
|
|
21216
|
+
return this.entryAt(index3);
|
|
20853
21217
|
}
|
|
20854
21218
|
setAfter(key, newKey, value) {
|
|
20855
|
-
const
|
|
20856
|
-
if (
|
|
21219
|
+
const index3 = this.#keys.indexOf(key);
|
|
21220
|
+
if (index3 === -1) {
|
|
20857
21221
|
return this;
|
|
20858
21222
|
}
|
|
20859
|
-
return this.insert(
|
|
21223
|
+
return this.insert(index3 + 1, newKey, value);
|
|
20860
21224
|
}
|
|
20861
21225
|
first() {
|
|
20862
21226
|
return this.entryAt(0);
|
|
@@ -20875,21 +21239,21 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20875
21239
|
}
|
|
20876
21240
|
return deleted;
|
|
20877
21241
|
}
|
|
20878
|
-
deleteAt(
|
|
20879
|
-
const key = this.keyAt(
|
|
21242
|
+
deleteAt(index3) {
|
|
21243
|
+
const key = this.keyAt(index3);
|
|
20880
21244
|
if (key !== undefined) {
|
|
20881
21245
|
return this.delete(key);
|
|
20882
21246
|
}
|
|
20883
21247
|
return false;
|
|
20884
21248
|
}
|
|
20885
|
-
at(
|
|
20886
|
-
const key = at(this.#keys,
|
|
21249
|
+
at(index3) {
|
|
21250
|
+
const key = at(this.#keys, index3);
|
|
20887
21251
|
if (key !== undefined) {
|
|
20888
21252
|
return this.get(key);
|
|
20889
21253
|
}
|
|
20890
21254
|
}
|
|
20891
|
-
entryAt(
|
|
20892
|
-
const key = at(this.#keys,
|
|
21255
|
+
entryAt(index3) {
|
|
21256
|
+
const key = at(this.#keys, index3);
|
|
20893
21257
|
if (key !== undefined) {
|
|
20894
21258
|
return [key, this.get(key)];
|
|
20895
21259
|
}
|
|
@@ -20897,15 +21261,15 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20897
21261
|
indexOf(key) {
|
|
20898
21262
|
return this.#keys.indexOf(key);
|
|
20899
21263
|
}
|
|
20900
|
-
keyAt(
|
|
20901
|
-
return at(this.#keys,
|
|
21264
|
+
keyAt(index3) {
|
|
21265
|
+
return at(this.#keys, index3);
|
|
20902
21266
|
}
|
|
20903
21267
|
from(key, offset4) {
|
|
20904
|
-
const
|
|
20905
|
-
if (
|
|
21268
|
+
const index3 = this.indexOf(key);
|
|
21269
|
+
if (index3 === -1) {
|
|
20906
21270
|
return;
|
|
20907
21271
|
}
|
|
20908
|
-
let dest =
|
|
21272
|
+
let dest = index3 + offset4;
|
|
20909
21273
|
if (dest < 0)
|
|
20910
21274
|
dest = 0;
|
|
20911
21275
|
if (dest >= this.size)
|
|
@@ -20913,11 +21277,11 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20913
21277
|
return this.at(dest);
|
|
20914
21278
|
}
|
|
20915
21279
|
keyFrom(key, offset4) {
|
|
20916
|
-
const
|
|
20917
|
-
if (
|
|
21280
|
+
const index3 = this.indexOf(key);
|
|
21281
|
+
if (index3 === -1) {
|
|
20918
21282
|
return;
|
|
20919
21283
|
}
|
|
20920
|
-
let dest =
|
|
21284
|
+
let dest = index3 + offset4;
|
|
20921
21285
|
if (dest < 0)
|
|
20922
21286
|
dest = 0;
|
|
20923
21287
|
if (dest >= this.size)
|
|
@@ -20925,68 +21289,68 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20925
21289
|
return this.keyAt(dest);
|
|
20926
21290
|
}
|
|
20927
21291
|
find(predicate, thisArg) {
|
|
20928
|
-
let
|
|
21292
|
+
let index3 = 0;
|
|
20929
21293
|
for (const entry of this) {
|
|
20930
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
21294
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
20931
21295
|
return entry;
|
|
20932
21296
|
}
|
|
20933
|
-
|
|
21297
|
+
index3++;
|
|
20934
21298
|
}
|
|
20935
21299
|
return;
|
|
20936
21300
|
}
|
|
20937
21301
|
findIndex(predicate, thisArg) {
|
|
20938
|
-
let
|
|
21302
|
+
let index3 = 0;
|
|
20939
21303
|
for (const entry of this) {
|
|
20940
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
20941
|
-
return
|
|
21304
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
21305
|
+
return index3;
|
|
20942
21306
|
}
|
|
20943
|
-
|
|
21307
|
+
index3++;
|
|
20944
21308
|
}
|
|
20945
21309
|
return -1;
|
|
20946
21310
|
}
|
|
20947
21311
|
filter(predicate, thisArg) {
|
|
20948
21312
|
const entries = [];
|
|
20949
|
-
let
|
|
21313
|
+
let index3 = 0;
|
|
20950
21314
|
for (const entry of this) {
|
|
20951
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
21315
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
20952
21316
|
entries.push(entry);
|
|
20953
21317
|
}
|
|
20954
|
-
|
|
21318
|
+
index3++;
|
|
20955
21319
|
}
|
|
20956
21320
|
return new _OrderedDict(entries);
|
|
20957
21321
|
}
|
|
20958
21322
|
map(callbackfn, thisArg) {
|
|
20959
21323
|
const entries = [];
|
|
20960
|
-
let
|
|
21324
|
+
let index3 = 0;
|
|
20961
21325
|
for (const entry of this) {
|
|
20962
|
-
entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry,
|
|
20963
|
-
|
|
21326
|
+
entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index3, this])]);
|
|
21327
|
+
index3++;
|
|
20964
21328
|
}
|
|
20965
21329
|
return new _OrderedDict(entries);
|
|
20966
21330
|
}
|
|
20967
21331
|
reduce(...args) {
|
|
20968
21332
|
const [callbackfn, initialValue] = args;
|
|
20969
|
-
let
|
|
21333
|
+
let index3 = 0;
|
|
20970
21334
|
let accumulator = initialValue ?? this.at(0);
|
|
20971
21335
|
for (const entry of this) {
|
|
20972
|
-
if (
|
|
21336
|
+
if (index3 === 0 && args.length === 1) {
|
|
20973
21337
|
accumulator = entry;
|
|
20974
21338
|
} else {
|
|
20975
|
-
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry,
|
|
21339
|
+
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
|
|
20976
21340
|
}
|
|
20977
|
-
|
|
21341
|
+
index3++;
|
|
20978
21342
|
}
|
|
20979
21343
|
return accumulator;
|
|
20980
21344
|
}
|
|
20981
21345
|
reduceRight(...args) {
|
|
20982
21346
|
const [callbackfn, initialValue] = args;
|
|
20983
21347
|
let accumulator = initialValue ?? this.at(-1);
|
|
20984
|
-
for (let
|
|
20985
|
-
const entry = this.at(
|
|
20986
|
-
if (
|
|
21348
|
+
for (let index3 = this.size - 1;index3 >= 0; index3--) {
|
|
21349
|
+
const entry = this.at(index3);
|
|
21350
|
+
if (index3 === this.size - 1 && args.length === 1) {
|
|
20987
21351
|
accumulator = entry;
|
|
20988
21352
|
} else {
|
|
20989
|
-
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry,
|
|
21353
|
+
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
|
|
20990
21354
|
}
|
|
20991
21355
|
}
|
|
20992
21356
|
return accumulator;
|
|
@@ -20997,8 +21361,8 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20997
21361
|
}
|
|
20998
21362
|
toReversed() {
|
|
20999
21363
|
const reversed = new _OrderedDict;
|
|
21000
|
-
for (let
|
|
21001
|
-
const key = this.keyAt(
|
|
21364
|
+
for (let index3 = this.size - 1;index3 >= 0; index3--) {
|
|
21365
|
+
const key = this.keyAt(index3);
|
|
21002
21366
|
const element = this.get(key);
|
|
21003
21367
|
reversed.set(key, element);
|
|
21004
21368
|
}
|
|
@@ -21021,44 +21385,44 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
21021
21385
|
if (end !== undefined && end > 0) {
|
|
21022
21386
|
stop = end - 1;
|
|
21023
21387
|
}
|
|
21024
|
-
for (let
|
|
21025
|
-
const key = this.keyAt(
|
|
21388
|
+
for (let index3 = start;index3 <= stop; index3++) {
|
|
21389
|
+
const key = this.keyAt(index3);
|
|
21026
21390
|
const element = this.get(key);
|
|
21027
21391
|
result.set(key, element);
|
|
21028
21392
|
}
|
|
21029
21393
|
return result;
|
|
21030
21394
|
}
|
|
21031
21395
|
every(predicate, thisArg) {
|
|
21032
|
-
let
|
|
21396
|
+
let index3 = 0;
|
|
21033
21397
|
for (const entry of this) {
|
|
21034
|
-
if (!Reflect.apply(predicate, thisArg, [entry,
|
|
21398
|
+
if (!Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
21035
21399
|
return false;
|
|
21036
21400
|
}
|
|
21037
|
-
|
|
21401
|
+
index3++;
|
|
21038
21402
|
}
|
|
21039
21403
|
return true;
|
|
21040
21404
|
}
|
|
21041
21405
|
some(predicate, thisArg) {
|
|
21042
|
-
let
|
|
21406
|
+
let index3 = 0;
|
|
21043
21407
|
for (const entry of this) {
|
|
21044
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
21408
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
21045
21409
|
return true;
|
|
21046
21410
|
}
|
|
21047
|
-
|
|
21411
|
+
index3++;
|
|
21048
21412
|
}
|
|
21049
21413
|
return false;
|
|
21050
21414
|
}
|
|
21051
21415
|
};
|
|
21052
|
-
function at(array,
|
|
21416
|
+
function at(array, index3) {
|
|
21053
21417
|
if ("at" in Array.prototype) {
|
|
21054
|
-
return Array.prototype.at.call(array,
|
|
21418
|
+
return Array.prototype.at.call(array, index3);
|
|
21055
21419
|
}
|
|
21056
|
-
const actualIndex = toSafeIndex(array,
|
|
21420
|
+
const actualIndex = toSafeIndex(array, index3);
|
|
21057
21421
|
return actualIndex === -1 ? undefined : array[actualIndex];
|
|
21058
21422
|
}
|
|
21059
|
-
function toSafeIndex(array,
|
|
21423
|
+
function toSafeIndex(array, index3) {
|
|
21060
21424
|
const length2 = array.length;
|
|
21061
|
-
const relativeIndex = toSafeInteger(
|
|
21425
|
+
const relativeIndex = toSafeInteger(index3);
|
|
21062
21426
|
const actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
|
|
21063
21427
|
return actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
|
|
21064
21428
|
}
|
|
@@ -21110,7 +21474,7 @@ var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
|
21110
21474
|
Node2.displayName = `Primitive.${node}`;
|
|
21111
21475
|
return { ...primitive, [node]: Node2 };
|
|
21112
21476
|
}, {});
|
|
21113
|
-
function
|
|
21477
|
+
function useCallbackRef4(callback) {
|
|
21114
21478
|
const callbackRef = React44.useRef(callback);
|
|
21115
21479
|
React44.useEffect(() => {
|
|
21116
21480
|
callbackRef.current = callback;
|
|
@@ -21214,7 +21578,7 @@ var RovingFocusGroupImpl = React47.forwardRef((props, forwardedRef) => {
|
|
|
21214
21578
|
caller: GROUP_NAME2
|
|
21215
21579
|
});
|
|
21216
21580
|
const [isTabbingBackOut, setIsTabbingBackOut] = React47.useState(false);
|
|
21217
|
-
const handleEntryFocus =
|
|
21581
|
+
const handleEntryFocus = useCallbackRef4(onEntryFocus);
|
|
21218
21582
|
const getItems = useCollection2(__scopeRovingFocusGroup);
|
|
21219
21583
|
const isClickFocusRef = React47.useRef(false);
|
|
21220
21584
|
const [focusableItemsCount, setFocusableItemsCount] = React47.useState(0);
|
|
@@ -21367,7 +21731,7 @@ function focusFirst2(candidates, preventScroll = false) {
|
|
|
21367
21731
|
}
|
|
21368
21732
|
}
|
|
21369
21733
|
function wrapArray2(array, startIndex) {
|
|
21370
|
-
return array.map((_,
|
|
21734
|
+
return array.map((_, index3) => array[(startIndex + index3) % array.length]);
|
|
21371
21735
|
}
|
|
21372
21736
|
var Root3 = RovingFocusGroup;
|
|
21373
21737
|
var Item2 = RovingFocusGroupItem;
|
|
@@ -21682,11 +22046,11 @@ var Triangle2 = (props) => {
|
|
|
21682
22046
|
};
|
|
21683
22047
|
|
|
21684
22048
|
// src/components/design.tsx
|
|
21685
|
-
import { useCallback as
|
|
22049
|
+
import { useCallback as useCallback36, useState as useState39 } from "react";
|
|
21686
22050
|
|
|
21687
22051
|
// src/components/ManageTeamMembers.tsx
|
|
21688
|
-
import React53, { useCallback as
|
|
21689
|
-
import { jsx as
|
|
22052
|
+
import React53, { useCallback as useCallback35, useState as useState38 } from "react";
|
|
22053
|
+
import { jsx as jsx41, jsxs as jsxs6, Fragment as Fragment9 } from "react/jsx-runtime";
|
|
21690
22054
|
function generateId() {
|
|
21691
22055
|
return Math.random().toString(36).substr(2, 9);
|
|
21692
22056
|
}
|
|
@@ -21698,26 +22062,26 @@ var Row = ({ value, onChange, onDelete, disableDelete }) => {
|
|
|
21698
22062
|
return /* @__PURE__ */ jsxs6("div", {
|
|
21699
22063
|
className: "flex flex-row gap-2 items-center",
|
|
21700
22064
|
children: [
|
|
21701
|
-
/* @__PURE__ */
|
|
22065
|
+
/* @__PURE__ */ jsx41(Input, {
|
|
21702
22066
|
placeholder: "Enter username",
|
|
21703
22067
|
className: "w-full block flex-1",
|
|
21704
22068
|
value,
|
|
21705
22069
|
onChange: (e) => onChange(e.target.value)
|
|
21706
22070
|
}),
|
|
21707
|
-
/* @__PURE__ */
|
|
22071
|
+
/* @__PURE__ */ jsx41(Button, {
|
|
21708
22072
|
className: "hover:text-white hover:bg-warn transition-colors w-10 h-10 p-0 rounded-full",
|
|
21709
22073
|
onClick: onDelete,
|
|
21710
22074
|
type: "button",
|
|
21711
22075
|
disabled: disableDelete,
|
|
21712
22076
|
"aria-label": "Delete member",
|
|
21713
22077
|
depth: 0.5,
|
|
21714
|
-
children: /* @__PURE__ */
|
|
22078
|
+
children: /* @__PURE__ */ jsx41("svg", {
|
|
21715
22079
|
width: "16",
|
|
21716
22080
|
height: "16",
|
|
21717
22081
|
viewBox: "0 0 10 10",
|
|
21718
22082
|
fill: "none",
|
|
21719
22083
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21720
|
-
children: /* @__PURE__ */
|
|
22084
|
+
children: /* @__PURE__ */ jsx41("path", {
|
|
21721
22085
|
d: "M1 1L9 9M1 9L9 1",
|
|
21722
22086
|
stroke: "currentColor",
|
|
21723
22087
|
strokeWidth: "1.5",
|
|
@@ -21729,9 +22093,9 @@ var Row = ({ value, onChange, onDelete, disableDelete }) => {
|
|
|
21729
22093
|
});
|
|
21730
22094
|
};
|
|
21731
22095
|
var ManageTeamMembers = () => {
|
|
21732
|
-
const [members, setMembers] =
|
|
22096
|
+
const [members, setMembers] = useState38(initialMembers);
|
|
21733
22097
|
const displayedMembers = [...members, { id: "NEW", name: "" }];
|
|
21734
|
-
const updateMember =
|
|
22098
|
+
const updateMember = useCallback35((idx, value) => {
|
|
21735
22099
|
if (idx === members.length) {
|
|
21736
22100
|
if (value.trim() !== "") {
|
|
21737
22101
|
setMembers((prev) => [...prev, { id: generateId(), name: value }]);
|
|
@@ -21740,11 +22104,11 @@ var ManageTeamMembers = () => {
|
|
|
21740
22104
|
setMembers((prev) => prev.map((m, i) => i === idx ? { ...m, name: value } : m));
|
|
21741
22105
|
}
|
|
21742
22106
|
}, [members.length]);
|
|
21743
|
-
const deleteMember =
|
|
22107
|
+
const deleteMember = useCallback35((idx) => {
|
|
21744
22108
|
setMembers((prev) => prev.filter((_, i) => i !== idx));
|
|
21745
22109
|
}, []);
|
|
21746
|
-
const [loading, setLoading] =
|
|
21747
|
-
const save =
|
|
22110
|
+
const [loading, setLoading] = useState38(false);
|
|
22111
|
+
const save = useCallback35(() => {
|
|
21748
22112
|
setLoading(true);
|
|
21749
22113
|
setTimeout(() => {
|
|
21750
22114
|
setLoading(false);
|
|
@@ -21752,32 +22116,32 @@ var ManageTeamMembers = () => {
|
|
|
21752
22116
|
}, []);
|
|
21753
22117
|
return /* @__PURE__ */ jsxs6(Fragment9, {
|
|
21754
22118
|
children: [
|
|
21755
|
-
/* @__PURE__ */
|
|
22119
|
+
/* @__PURE__ */ jsx41("h2", {
|
|
21756
22120
|
children: "Manage team members"
|
|
21757
22121
|
}),
|
|
21758
|
-
/* @__PURE__ */
|
|
22122
|
+
/* @__PURE__ */ jsx41("p", {
|
|
21759
22123
|
className: "font-brand",
|
|
21760
22124
|
children: "Add a new team member to your team."
|
|
21761
22125
|
}),
|
|
21762
22126
|
displayedMembers.map((member, idx) => /* @__PURE__ */ jsxs6(React53.Fragment, {
|
|
21763
22127
|
children: [
|
|
21764
|
-
/* @__PURE__ */
|
|
22128
|
+
/* @__PURE__ */ jsx41(Row, {
|
|
21765
22129
|
value: member.name,
|
|
21766
22130
|
onChange: (val) => updateMember(idx, val),
|
|
21767
22131
|
onDelete: idx < members.length ? () => deleteMember(idx) : undefined,
|
|
21768
22132
|
disableDelete: idx >= members.length
|
|
21769
22133
|
}),
|
|
21770
|
-
/* @__PURE__ */
|
|
22134
|
+
/* @__PURE__ */ jsx41("div", {
|
|
21771
22135
|
className: "h-2"
|
|
21772
22136
|
})
|
|
21773
22137
|
]
|
|
21774
22138
|
}, idx)),
|
|
21775
|
-
/* @__PURE__ */
|
|
22139
|
+
/* @__PURE__ */ jsx41("div", {
|
|
21776
22140
|
className: "h-4"
|
|
21777
22141
|
}),
|
|
21778
|
-
/* @__PURE__ */
|
|
22142
|
+
/* @__PURE__ */ jsx41("div", {
|
|
21779
22143
|
className: "flex flex-row justify-end",
|
|
21780
|
-
children: /* @__PURE__ */
|
|
22144
|
+
children: /* @__PURE__ */ jsx41(Button, {
|
|
21781
22145
|
className: "bg-brand text-white",
|
|
21782
22146
|
loading,
|
|
21783
22147
|
onClick: save,
|
|
@@ -21789,67 +22153,67 @@ var ManageTeamMembers = () => {
|
|
|
21789
22153
|
};
|
|
21790
22154
|
|
|
21791
22155
|
// src/components/design.tsx
|
|
21792
|
-
import { jsx as
|
|
22156
|
+
import { jsx as jsx44, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
21793
22157
|
var Explainer = ({ children }) => {
|
|
21794
|
-
return /* @__PURE__ */
|
|
21795
|
-
children: /* @__PURE__ */
|
|
22158
|
+
return /* @__PURE__ */ jsx44("div", {
|
|
22159
|
+
children: /* @__PURE__ */ jsx44("div", {
|
|
21796
22160
|
className: "text-gray-500 font-brand text-sm mb-2",
|
|
21797
22161
|
children
|
|
21798
22162
|
})
|
|
21799
22163
|
});
|
|
21800
22164
|
};
|
|
21801
22165
|
var DesignPage = () => {
|
|
21802
|
-
const [count4, setCount] =
|
|
21803
|
-
const [active, setActive] =
|
|
21804
|
-
const [submitButtonActive, setSubmitButtonActive] =
|
|
21805
|
-
const [submitButtonPrimaryActive, setSubmitButtonPrimaryActive] =
|
|
21806
|
-
const onClick =
|
|
22166
|
+
const [count4, setCount] = useState39(10);
|
|
22167
|
+
const [active, setActive] = useState39(false);
|
|
22168
|
+
const [submitButtonActive, setSubmitButtonActive] = useState39(true);
|
|
22169
|
+
const [submitButtonPrimaryActive, setSubmitButtonPrimaryActive] = useState39(true);
|
|
22170
|
+
const onClick = useCallback36(() => {
|
|
21807
22171
|
setSubmitButtonActive(false);
|
|
21808
22172
|
setTimeout(() => {
|
|
21809
22173
|
setSubmitButtonActive(true);
|
|
21810
22174
|
}, 1000);
|
|
21811
22175
|
}, []);
|
|
21812
|
-
const onClickPrimary =
|
|
22176
|
+
const onClickPrimary = useCallback36(() => {
|
|
21813
22177
|
setSubmitButtonPrimaryActive(false);
|
|
21814
22178
|
setTimeout(() => {
|
|
21815
22179
|
setSubmitButtonPrimaryActive(true);
|
|
21816
22180
|
}, 1000);
|
|
21817
22181
|
}, []);
|
|
21818
|
-
const [saving, setSaving] =
|
|
21819
|
-
const save =
|
|
22182
|
+
const [saving, setSaving] = useState39(false);
|
|
22183
|
+
const save = useCallback36(() => {
|
|
21820
22184
|
setSaving(true);
|
|
21821
22185
|
setTimeout(() => {
|
|
21822
22186
|
setSaving(false);
|
|
21823
22187
|
}, 1000);
|
|
21824
22188
|
}, []);
|
|
21825
|
-
return /* @__PURE__ */
|
|
22189
|
+
return /* @__PURE__ */ jsx44("div", {
|
|
21826
22190
|
className: "bg-[var(--background)] relative",
|
|
21827
22191
|
children: /* @__PURE__ */ jsxs8("div", {
|
|
21828
22192
|
className: "max-w-[800px] mx-auto pt-10 pb-10 px-4",
|
|
21829
22193
|
children: [
|
|
21830
|
-
/* @__PURE__ */
|
|
22194
|
+
/* @__PURE__ */ jsx44("h1", {
|
|
21831
22195
|
children: "@remotion/design"
|
|
21832
22196
|
}),
|
|
21833
|
-
/* @__PURE__ */
|
|
22197
|
+
/* @__PURE__ */ jsx44("a", {
|
|
21834
22198
|
href: "https://github.com/remotion-dev/remotion/blob/main/packages/promo-pages/src/components/design.tsx",
|
|
21835
22199
|
className: "font-brand text-brand",
|
|
21836
22200
|
target: "_blank",
|
|
21837
22201
|
children: "View source"
|
|
21838
22202
|
}),
|
|
21839
|
-
/* @__PURE__ */
|
|
21840
|
-
/* @__PURE__ */
|
|
21841
|
-
/* @__PURE__ */
|
|
22203
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22204
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22205
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
21842
22206
|
className: "text-brand",
|
|
21843
22207
|
children: "<Button />"
|
|
21844
22208
|
}),
|
|
21845
|
-
/* @__PURE__ */
|
|
22209
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21846
22210
|
children: "Button with label"
|
|
21847
22211
|
}),
|
|
21848
|
-
/* @__PURE__ */
|
|
22212
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21849
22213
|
children: "Click me"
|
|
21850
22214
|
}),
|
|
21851
|
-
/* @__PURE__ */
|
|
21852
|
-
/* @__PURE__ */
|
|
22215
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22216
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21853
22217
|
children: "Disabled"
|
|
21854
22218
|
}),
|
|
21855
22219
|
/* @__PURE__ */ jsxs8(Button, {
|
|
@@ -21859,101 +22223,101 @@ var DesignPage = () => {
|
|
|
21859
22223
|
" click me"
|
|
21860
22224
|
]
|
|
21861
22225
|
}),
|
|
21862
|
-
/* @__PURE__ */
|
|
21863
|
-
/* @__PURE__ */
|
|
22226
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22227
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21864
22228
|
children: "Primary"
|
|
21865
22229
|
}),
|
|
21866
|
-
/* @__PURE__ */
|
|
22230
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21867
22231
|
className: "bg-brand text-white",
|
|
21868
22232
|
children: "Primary"
|
|
21869
22233
|
}),
|
|
21870
|
-
/* @__PURE__ */
|
|
21871
|
-
/* @__PURE__ */
|
|
22234
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22235
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21872
22236
|
children: "Click to disable"
|
|
21873
22237
|
}),
|
|
21874
|
-
/* @__PURE__ */
|
|
22238
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21875
22239
|
onClick,
|
|
21876
22240
|
loading: !submitButtonActive,
|
|
21877
22241
|
children: "Submit"
|
|
21878
22242
|
}),
|
|
21879
|
-
/* @__PURE__ */
|
|
21880
|
-
/* @__PURE__ */
|
|
22243
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22244
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21881
22245
|
children: "Click to disable (primary)"
|
|
21882
22246
|
}),
|
|
21883
|
-
/* @__PURE__ */
|
|
22247
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21884
22248
|
onClick: onClickPrimary,
|
|
21885
22249
|
className: "bg-brand text-white",
|
|
21886
22250
|
loading: !submitButtonPrimaryActive,
|
|
21887
22251
|
children: "Submit"
|
|
21888
22252
|
}),
|
|
21889
|
-
/* @__PURE__ */
|
|
21890
|
-
/* @__PURE__ */
|
|
22253
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22254
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21891
22255
|
children: "Loading state"
|
|
21892
22256
|
}),
|
|
21893
|
-
/* @__PURE__ */
|
|
22257
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21894
22258
|
onClick,
|
|
21895
22259
|
loading: true,
|
|
21896
22260
|
children: "Loading"
|
|
21897
22261
|
}),
|
|
21898
|
-
/* @__PURE__ */
|
|
21899
|
-
/* @__PURE__ */
|
|
22262
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22263
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21900
22264
|
children: "Loading state (primary)"
|
|
21901
22265
|
}),
|
|
21902
|
-
/* @__PURE__ */
|
|
22266
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21903
22267
|
onClick,
|
|
21904
22268
|
className: "bg-brand text-white",
|
|
21905
22269
|
loading: true,
|
|
21906
22270
|
children: "Loading"
|
|
21907
22271
|
}),
|
|
21908
|
-
/* @__PURE__ */
|
|
21909
|
-
/* @__PURE__ */
|
|
22272
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22273
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21910
22274
|
children: "Rounded"
|
|
21911
22275
|
}),
|
|
21912
|
-
/* @__PURE__ */
|
|
22276
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21913
22277
|
className: "rounded-full",
|
|
21914
22278
|
children: "Rounded"
|
|
21915
22279
|
}),
|
|
21916
|
-
/* @__PURE__ */
|
|
21917
|
-
/* @__PURE__ */
|
|
22280
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22281
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21918
22282
|
children: "Full width"
|
|
21919
22283
|
}),
|
|
21920
|
-
/* @__PURE__ */
|
|
22284
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21921
22285
|
className: "w-full",
|
|
21922
22286
|
children: "Choose a template"
|
|
21923
22287
|
}),
|
|
21924
|
-
/* @__PURE__ */
|
|
21925
|
-
/* @__PURE__ */
|
|
22288
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22289
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21926
22290
|
children: "Full width rounded"
|
|
21927
22291
|
}),
|
|
21928
|
-
/* @__PURE__ */
|
|
22292
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21929
22293
|
className: "w-full rounded-full",
|
|
21930
22294
|
children: "Fully rounded"
|
|
21931
22295
|
}),
|
|
21932
|
-
/* @__PURE__ */
|
|
22296
|
+
/* @__PURE__ */ jsx44("div", {
|
|
21933
22297
|
className: "h-8"
|
|
21934
22298
|
}),
|
|
21935
|
-
/* @__PURE__ */
|
|
22299
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21936
22300
|
children: "Circular"
|
|
21937
22301
|
}),
|
|
21938
|
-
/* @__PURE__ */
|
|
22302
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21939
22303
|
className: "rounded-full bg-brand w-12 h-12"
|
|
21940
22304
|
}),
|
|
21941
|
-
/* @__PURE__ */
|
|
22305
|
+
/* @__PURE__ */ jsx44("div", {
|
|
21942
22306
|
className: "h-8"
|
|
21943
22307
|
}),
|
|
21944
|
-
/* @__PURE__ */
|
|
22308
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21945
22309
|
children: "Remove"
|
|
21946
22310
|
}),
|
|
21947
|
-
/* @__PURE__ */
|
|
22311
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21948
22312
|
className: "hover:text-white hover:bg-warn transition-colors w-10 h-10 p-0 rounded-full",
|
|
21949
22313
|
depth: 0.5,
|
|
21950
|
-
children: /* @__PURE__ */
|
|
22314
|
+
children: /* @__PURE__ */ jsx44("svg", {
|
|
21951
22315
|
width: "16",
|
|
21952
22316
|
height: "16",
|
|
21953
22317
|
viewBox: "0 0 10 10",
|
|
21954
22318
|
fill: "none",
|
|
21955
22319
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21956
|
-
children: /* @__PURE__ */
|
|
22320
|
+
children: /* @__PURE__ */ jsx44("path", {
|
|
21957
22321
|
d: "M1 1L9 9M1 9L9 1",
|
|
21958
22322
|
stroke: "currentColor",
|
|
21959
22323
|
strokeWidth: "1.5",
|
|
@@ -21961,56 +22325,56 @@ var DesignPage = () => {
|
|
|
21961
22325
|
})
|
|
21962
22326
|
})
|
|
21963
22327
|
}),
|
|
21964
|
-
/* @__PURE__ */
|
|
22328
|
+
/* @__PURE__ */ jsx44("div", {
|
|
21965
22329
|
className: "h-8"
|
|
21966
22330
|
}),
|
|
21967
|
-
/* @__PURE__ */
|
|
22331
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21968
22332
|
children: "Link button"
|
|
21969
22333
|
}),
|
|
21970
|
-
/* @__PURE__ */
|
|
22334
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21971
22335
|
href: "/design",
|
|
21972
22336
|
children: "Link button"
|
|
21973
22337
|
}),
|
|
21974
|
-
/* @__PURE__ */
|
|
22338
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
21975
22339
|
/* @__PURE__ */ jsxs8(Explainer, {
|
|
21976
22340
|
children: [
|
|
21977
22341
|
"Link button with ",
|
|
21978
|
-
/* @__PURE__ */
|
|
22342
|
+
/* @__PURE__ */ jsx44("code", {
|
|
21979
22343
|
children: "<span>"
|
|
21980
22344
|
})
|
|
21981
22345
|
]
|
|
21982
22346
|
}),
|
|
21983
|
-
/* @__PURE__ */
|
|
22347
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21984
22348
|
href: "/design",
|
|
21985
|
-
children: /* @__PURE__ */
|
|
22349
|
+
children: /* @__PURE__ */ jsx44("span", {
|
|
21986
22350
|
children: "Link button with span child"
|
|
21987
22351
|
})
|
|
21988
22352
|
}),
|
|
21989
|
-
/* @__PURE__ */
|
|
21990
|
-
/* @__PURE__ */
|
|
22353
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22354
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21991
22355
|
children: "External link button"
|
|
21992
22356
|
}),
|
|
21993
|
-
/* @__PURE__ */
|
|
22357
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21994
22358
|
href: "https://github.com/remotion-dev/remotion",
|
|
21995
22359
|
target: "_blank",
|
|
21996
22360
|
children: "GitHub"
|
|
21997
22361
|
}),
|
|
21998
|
-
/* @__PURE__ */
|
|
22362
|
+
/* @__PURE__ */ jsx44("div", {
|
|
21999
22363
|
className: "h-8"
|
|
22000
22364
|
}),
|
|
22001
|
-
/* @__PURE__ */
|
|
22365
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
22002
22366
|
children: "Remove (small)"
|
|
22003
22367
|
}),
|
|
22004
|
-
/* @__PURE__ */
|
|
22368
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
22005
22369
|
className: "hover:text-white hover:bg-warn transition-colors w-6 h-6 p-0 rounded-full",
|
|
22006
22370
|
depth: 0.5,
|
|
22007
|
-
children: /* @__PURE__ */
|
|
22371
|
+
children: /* @__PURE__ */ jsx44("svg", {
|
|
22008
22372
|
width: "10",
|
|
22009
22373
|
height: "10",
|
|
22010
22374
|
viewBox: "0 0 10 10",
|
|
22011
22375
|
fill: "none",
|
|
22012
22376
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22013
|
-
children: /* @__PURE__ */
|
|
22377
|
+
children: /* @__PURE__ */ jsx44("path", {
|
|
22014
22378
|
d: "M1 1L9 9M1 9L9 1",
|
|
22015
22379
|
stroke: "currentColor",
|
|
22016
22380
|
strokeWidth: "1.5",
|
|
@@ -22018,74 +22382,74 @@ var DesignPage = () => {
|
|
|
22018
22382
|
})
|
|
22019
22383
|
})
|
|
22020
22384
|
}),
|
|
22021
|
-
/* @__PURE__ */
|
|
22385
|
+
/* @__PURE__ */ jsx44("div", {
|
|
22022
22386
|
className: "h-8"
|
|
22023
22387
|
}),
|
|
22024
|
-
/* @__PURE__ */
|
|
22388
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22025
22389
|
className: "text-brand",
|
|
22026
22390
|
children: "<Counter />"
|
|
22027
22391
|
}),
|
|
22028
|
-
/* @__PURE__ */
|
|
22392
|
+
/* @__PURE__ */ jsx44(Counter, {
|
|
22029
22393
|
count: count4,
|
|
22030
22394
|
setCount,
|
|
22031
22395
|
minCount: 1,
|
|
22032
22396
|
step: 1,
|
|
22033
22397
|
incrementStep: 1
|
|
22034
22398
|
}),
|
|
22035
|
-
/* @__PURE__ */
|
|
22399
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22036
22400
|
" ",
|
|
22037
|
-
/* @__PURE__ */
|
|
22401
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22038
22402
|
className: "text-brand",
|
|
22039
22403
|
children: "<Switch />"
|
|
22040
22404
|
}),
|
|
22041
|
-
/* @__PURE__ */
|
|
22405
|
+
/* @__PURE__ */ jsx44(Switch, {
|
|
22042
22406
|
active,
|
|
22043
22407
|
onToggle: () => setActive((e) => !e)
|
|
22044
22408
|
}),
|
|
22045
|
-
/* @__PURE__ */
|
|
22409
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22046
22410
|
" ",
|
|
22047
|
-
/* @__PURE__ */
|
|
22411
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22048
22412
|
className: "text-brand",
|
|
22049
22413
|
children: "<Card />"
|
|
22050
22414
|
}),
|
|
22051
22415
|
/* @__PURE__ */ jsxs8(Card, {
|
|
22052
22416
|
className: "px-4 py-4",
|
|
22053
22417
|
children: [
|
|
22054
|
-
/* @__PURE__ */
|
|
22418
|
+
/* @__PURE__ */ jsx44("h3", {
|
|
22055
22419
|
className: "text-text",
|
|
22056
22420
|
children: "Card"
|
|
22057
22421
|
}),
|
|
22058
|
-
/* @__PURE__ */
|
|
22422
|
+
/* @__PURE__ */ jsx44("div", {
|
|
22059
22423
|
className: "text-gray-500",
|
|
22060
22424
|
children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
|
22061
22425
|
})
|
|
22062
22426
|
]
|
|
22063
22427
|
}),
|
|
22064
|
-
/* @__PURE__ */
|
|
22065
|
-
/* @__PURE__ */
|
|
22428
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22429
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22066
22430
|
className: "text-brand",
|
|
22067
22431
|
children: "<Select />"
|
|
22068
22432
|
}),
|
|
22069
22433
|
/* @__PURE__ */ jsxs8(Select2, {
|
|
22070
22434
|
defaultValue: "option1",
|
|
22071
22435
|
children: [
|
|
22072
|
-
/* @__PURE__ */
|
|
22436
|
+
/* @__PURE__ */ jsx44(SelectTrigger2, {
|
|
22073
22437
|
style: { width: "200px" },
|
|
22074
|
-
children: /* @__PURE__ */
|
|
22438
|
+
children: /* @__PURE__ */ jsx44(SelectValue2, {
|
|
22075
22439
|
placeholder: "Select an option"
|
|
22076
22440
|
})
|
|
22077
22441
|
}),
|
|
22078
22442
|
/* @__PURE__ */ jsxs8(SelectContent2, {
|
|
22079
22443
|
children: [
|
|
22080
|
-
/* @__PURE__ */
|
|
22444
|
+
/* @__PURE__ */ jsx44(SelectItem2, {
|
|
22081
22445
|
value: "option1",
|
|
22082
22446
|
children: "Option 1"
|
|
22083
22447
|
}),
|
|
22084
|
-
/* @__PURE__ */
|
|
22448
|
+
/* @__PURE__ */ jsx44(SelectItem2, {
|
|
22085
22449
|
value: "option2",
|
|
22086
22450
|
children: "Option 2"
|
|
22087
22451
|
}),
|
|
22088
|
-
/* @__PURE__ */
|
|
22452
|
+
/* @__PURE__ */ jsx44(SelectItem2, {
|
|
22089
22453
|
value: "option3",
|
|
22090
22454
|
children: "Option 3"
|
|
22091
22455
|
})
|
|
@@ -22093,8 +22457,8 @@ var DesignPage = () => {
|
|
|
22093
22457
|
})
|
|
22094
22458
|
]
|
|
22095
22459
|
}),
|
|
22096
|
-
/* @__PURE__ */
|
|
22097
|
-
/* @__PURE__ */
|
|
22460
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22461
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22098
22462
|
className: "text-brand",
|
|
22099
22463
|
children: "<Tabs />"
|
|
22100
22464
|
}),
|
|
@@ -22103,63 +22467,63 @@ var DesignPage = () => {
|
|
|
22103
22467
|
children: [
|
|
22104
22468
|
/* @__PURE__ */ jsxs8(TabsList2, {
|
|
22105
22469
|
children: [
|
|
22106
|
-
/* @__PURE__ */
|
|
22470
|
+
/* @__PURE__ */ jsx44(TabsTrigger2, {
|
|
22107
22471
|
value: "tab1",
|
|
22108
22472
|
children: "Tab 1"
|
|
22109
22473
|
}),
|
|
22110
|
-
/* @__PURE__ */
|
|
22474
|
+
/* @__PURE__ */ jsx44(TabsTrigger2, {
|
|
22111
22475
|
value: "tab2",
|
|
22112
22476
|
children: "Tab 2"
|
|
22113
22477
|
}),
|
|
22114
|
-
/* @__PURE__ */
|
|
22478
|
+
/* @__PURE__ */ jsx44(TabsTrigger2, {
|
|
22115
22479
|
value: "tab3",
|
|
22116
22480
|
children: "Tab 3"
|
|
22117
22481
|
})
|
|
22118
22482
|
]
|
|
22119
22483
|
}),
|
|
22120
|
-
/* @__PURE__ */
|
|
22484
|
+
/* @__PURE__ */ jsx44(TabsContent2, {
|
|
22121
22485
|
value: "tab1",
|
|
22122
|
-
children: /* @__PURE__ */
|
|
22486
|
+
children: /* @__PURE__ */ jsx44("div", {
|
|
22123
22487
|
className: "font-brand",
|
|
22124
22488
|
children: "Content for Tab 1"
|
|
22125
22489
|
})
|
|
22126
22490
|
}),
|
|
22127
|
-
/* @__PURE__ */
|
|
22491
|
+
/* @__PURE__ */ jsx44(TabsContent2, {
|
|
22128
22492
|
value: "tab2",
|
|
22129
|
-
children: /* @__PURE__ */
|
|
22493
|
+
children: /* @__PURE__ */ jsx44("div", {
|
|
22130
22494
|
className: "font-brand",
|
|
22131
22495
|
children: "Content for Tab 2"
|
|
22132
22496
|
})
|
|
22133
22497
|
}),
|
|
22134
|
-
/* @__PURE__ */
|
|
22498
|
+
/* @__PURE__ */ jsx44(TabsContent2, {
|
|
22135
22499
|
value: "tab3",
|
|
22136
|
-
children: /* @__PURE__ */
|
|
22500
|
+
children: /* @__PURE__ */ jsx44("div", {
|
|
22137
22501
|
className: "font-brand",
|
|
22138
22502
|
children: "Content for Tab 3"
|
|
22139
22503
|
})
|
|
22140
22504
|
})
|
|
22141
22505
|
]
|
|
22142
22506
|
}),
|
|
22143
|
-
/* @__PURE__ */
|
|
22144
|
-
/* @__PURE__ */
|
|
22507
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22508
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22145
22509
|
className: "text-brand",
|
|
22146
22510
|
children: "<Input />"
|
|
22147
22511
|
}),
|
|
22148
|
-
/* @__PURE__ */
|
|
22512
|
+
/* @__PURE__ */ jsx44(Input, {
|
|
22149
22513
|
placeholder: "Enter your email"
|
|
22150
22514
|
}),
|
|
22151
|
-
/* @__PURE__ */
|
|
22152
|
-
/* @__PURE__ */
|
|
22153
|
-
/* @__PURE__ */
|
|
22515
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22516
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22517
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22154
22518
|
className: "text-brand",
|
|
22155
22519
|
children: "<Textarea />"
|
|
22156
22520
|
}),
|
|
22157
|
-
/* @__PURE__ */
|
|
22521
|
+
/* @__PURE__ */ jsx44(Textarea, {
|
|
22158
22522
|
placeholder: "Enter your message"
|
|
22159
22523
|
}),
|
|
22160
|
-
/* @__PURE__ */
|
|
22161
|
-
/* @__PURE__ */
|
|
22162
|
-
/* @__PURE__ */
|
|
22524
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22525
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22526
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22163
22527
|
className: "text-brand",
|
|
22164
22528
|
children: "<InlineCode />"
|
|
22165
22529
|
}),
|
|
@@ -22167,18 +22531,18 @@ var DesignPage = () => {
|
|
|
22167
22531
|
className: "font-brand",
|
|
22168
22532
|
children: [
|
|
22169
22533
|
"Use ",
|
|
22170
|
-
/* @__PURE__ */
|
|
22534
|
+
/* @__PURE__ */ jsx44(InlineCode, {
|
|
22171
22535
|
children: "useCurrentFrame()"
|
|
22172
22536
|
}),
|
|
22173
22537
|
" to get the current frame and ",
|
|
22174
|
-
/* @__PURE__ */
|
|
22538
|
+
/* @__PURE__ */ jsx44(InlineCode, {
|
|
22175
22539
|
children: "useVideoConfig()"
|
|
22176
22540
|
}),
|
|
22177
22541
|
" to get the video configuration."
|
|
22178
22542
|
]
|
|
22179
22543
|
}),
|
|
22180
|
-
/* @__PURE__ */
|
|
22181
|
-
/* @__PURE__ */
|
|
22544
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22545
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22182
22546
|
className: "text-brand",
|
|
22183
22547
|
children: "<Link />"
|
|
22184
22548
|
}),
|
|
@@ -22187,7 +22551,7 @@ var DesignPage = () => {
|
|
|
22187
22551
|
children: [
|
|
22188
22552
|
"See the",
|
|
22189
22553
|
" ",
|
|
22190
|
-
/* @__PURE__ */
|
|
22554
|
+
/* @__PURE__ */ jsx44(Link, {
|
|
22191
22555
|
href: "https://www.remotion.dev/docs",
|
|
22192
22556
|
target: "_blank",
|
|
22193
22557
|
rel: "noopener noreferrer",
|
|
@@ -22197,38 +22561,38 @@ var DesignPage = () => {
|
|
|
22197
22561
|
"for more information."
|
|
22198
22562
|
]
|
|
22199
22563
|
}),
|
|
22200
|
-
/* @__PURE__ */
|
|
22201
|
-
/* @__PURE__ */
|
|
22202
|
-
/* @__PURE__ */
|
|
22564
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22565
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22566
|
+
/* @__PURE__ */ jsx44("h1", {
|
|
22203
22567
|
children: "Example form set"
|
|
22204
22568
|
}),
|
|
22205
|
-
/* @__PURE__ */
|
|
22206
|
-
/* @__PURE__ */
|
|
22569
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22570
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22207
22571
|
children: "Change email"
|
|
22208
22572
|
}),
|
|
22209
|
-
/* @__PURE__ */
|
|
22573
|
+
/* @__PURE__ */ jsx44("p", {
|
|
22210
22574
|
className: "font-brand",
|
|
22211
22575
|
children: "A email will be sent to the new email address. You will need to click on the link in the email to confirm the change."
|
|
22212
22576
|
}),
|
|
22213
|
-
/* @__PURE__ */
|
|
22577
|
+
/* @__PURE__ */ jsx44(Input, {
|
|
22214
22578
|
placeholder: "Enter your email",
|
|
22215
22579
|
className: "w-full block"
|
|
22216
22580
|
}),
|
|
22217
|
-
/* @__PURE__ */
|
|
22581
|
+
/* @__PURE__ */ jsx44("div", {
|
|
22218
22582
|
className: "h-2"
|
|
22219
22583
|
}),
|
|
22220
|
-
/* @__PURE__ */
|
|
22584
|
+
/* @__PURE__ */ jsx44("div", {
|
|
22221
22585
|
className: "flex flex-row justify-end",
|
|
22222
|
-
children: /* @__PURE__ */
|
|
22586
|
+
children: /* @__PURE__ */ jsx44(Button, {
|
|
22223
22587
|
className: "bg-brand text-white",
|
|
22224
22588
|
loading: saving,
|
|
22225
22589
|
onClick: save,
|
|
22226
22590
|
children: "Change"
|
|
22227
22591
|
})
|
|
22228
22592
|
}),
|
|
22229
|
-
/* @__PURE__ */
|
|
22230
|
-
/* @__PURE__ */
|
|
22231
|
-
/* @__PURE__ */
|
|
22593
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22594
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22595
|
+
/* @__PURE__ */ jsx44(ManageTeamMembers, {})
|
|
22232
22596
|
]
|
|
22233
22597
|
})
|
|
22234
22598
|
});
|