@remotion/promo-pages 4.0.466 → 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 +1776 -1306
- package/dist/design.js +829 -484
- package/dist/experts/experts-data.js +5 -16
- package/dist/experts.js +667 -322
- package/dist/homepage/Pricing.js +766 -421
- package/dist/prompts/PromptsGallery.js +730 -385
- package/dist/prompts/PromptsShow.js +887 -542
- package/dist/prompts/PromptsSubmit.js +908 -563
- package/dist/team.js +755 -410
- package/dist/template-modal-content.js +808 -463
- package/dist/templates.js +826 -481
- 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;
|
|
@@ -8397,6 +8399,54 @@ var SequenceRefForwardingFunction = (props, ref) => {
|
|
|
8397
8399
|
};
|
|
8398
8400
|
var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
8399
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
|
+
};
|
|
8400
8450
|
var WEBGL_CONTEXT_DOCS_URL = "https://remotion.dev/docs/troubleshooting/webgl2-context";
|
|
8401
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}`;
|
|
8402
8452
|
var createWebGLContextError = (effectName) => new Error(webGlContextErrorMessage("WebGL", effectName));
|
|
@@ -8649,54 +8699,6 @@ var useEffectChainState = () => {
|
|
|
8649
8699
|
}
|
|
8650
8700
|
}), []);
|
|
8651
8701
|
};
|
|
8652
|
-
var calcArgs = (fit, frameSize, canvasSize) => {
|
|
8653
|
-
switch (fit) {
|
|
8654
|
-
case "fill": {
|
|
8655
|
-
return [
|
|
8656
|
-
0,
|
|
8657
|
-
0,
|
|
8658
|
-
frameSize.width,
|
|
8659
|
-
frameSize.height,
|
|
8660
|
-
0,
|
|
8661
|
-
0,
|
|
8662
|
-
canvasSize.width,
|
|
8663
|
-
canvasSize.height
|
|
8664
|
-
];
|
|
8665
|
-
}
|
|
8666
|
-
case "contain": {
|
|
8667
|
-
const ratio = Math.min(canvasSize.width / frameSize.width, canvasSize.height / frameSize.height);
|
|
8668
|
-
const centerX = (canvasSize.width - frameSize.width * ratio) / 2;
|
|
8669
|
-
const centerY = (canvasSize.height - frameSize.height * ratio) / 2;
|
|
8670
|
-
return [
|
|
8671
|
-
0,
|
|
8672
|
-
0,
|
|
8673
|
-
frameSize.width,
|
|
8674
|
-
frameSize.height,
|
|
8675
|
-
centerX,
|
|
8676
|
-
centerY,
|
|
8677
|
-
frameSize.width * ratio,
|
|
8678
|
-
frameSize.height * ratio
|
|
8679
|
-
];
|
|
8680
|
-
}
|
|
8681
|
-
case "cover": {
|
|
8682
|
-
const ratio = Math.max(canvasSize.width / frameSize.width, canvasSize.height / frameSize.height);
|
|
8683
|
-
const centerX = (canvasSize.width - frameSize.width * ratio) / 2;
|
|
8684
|
-
const centerY = (canvasSize.height - frameSize.height * ratio) / 2;
|
|
8685
|
-
return [
|
|
8686
|
-
0,
|
|
8687
|
-
0,
|
|
8688
|
-
frameSize.width,
|
|
8689
|
-
frameSize.height,
|
|
8690
|
-
centerX,
|
|
8691
|
-
centerY,
|
|
8692
|
-
frameSize.width * ratio,
|
|
8693
|
-
frameSize.height * ratio
|
|
8694
|
-
];
|
|
8695
|
-
}
|
|
8696
|
-
default:
|
|
8697
|
-
throw new Error("Unknown fit: " + fit);
|
|
8698
|
-
}
|
|
8699
|
-
};
|
|
8700
8702
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects }, ref) => {
|
|
8701
8703
|
const canvasRef = useRef8(null);
|
|
8702
8704
|
const chainState = useEffectChainState();
|
|
@@ -8706,7 +8708,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
8706
8708
|
}
|
|
8707
8709
|
return document.createElement("canvas");
|
|
8708
8710
|
}, []);
|
|
8709
|
-
const draw = useCallback6(
|
|
8711
|
+
const draw = useCallback6((imageData) => {
|
|
8710
8712
|
const canvas = canvasRef.current;
|
|
8711
8713
|
const canvasWidth = width ?? imageData.displayWidth;
|
|
8712
8714
|
const canvasHeight = height ?? imageData.displayHeight;
|
|
@@ -8722,7 +8724,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
8722
8724
|
if (!sourceCtx) {
|
|
8723
8725
|
throw new Error("Could not get 2d context for source canvas");
|
|
8724
8726
|
}
|
|
8725
|
-
sourceCtx.drawImage(imageData, ...
|
|
8727
|
+
sourceCtx.drawImage(imageData, ...calculateImageFit(fit, {
|
|
8726
8728
|
height: imageData.displayHeight,
|
|
8727
8729
|
width: imageData.displayWidth
|
|
8728
8730
|
}, {
|
|
@@ -10230,9 +10232,43 @@ var useSingletonAudioContext = ({
|
|
|
10230
10232
|
gainNode.connect(audioContext.destination);
|
|
10231
10233
|
Log.trace({ logLevel, tag: "audio" }, "Creating new audio context");
|
|
10232
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
|
+
};
|
|
10233
10266
|
return {
|
|
10234
10267
|
audioContext,
|
|
10235
|
-
gainNode
|
|
10268
|
+
gainNode,
|
|
10269
|
+
getState,
|
|
10270
|
+
resume,
|
|
10271
|
+
suspend
|
|
10236
10272
|
};
|
|
10237
10273
|
}, [logLevel, latencyHint, env.isRendering, audioEnabled]);
|
|
10238
10274
|
return context;
|
|
@@ -10285,6 +10321,15 @@ var didPropChange = (key, newProp, prevProp) => {
|
|
|
10285
10321
|
};
|
|
10286
10322
|
var SharedAudioContext = createContext21(null);
|
|
10287
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
|
+
};
|
|
10288
10333
|
var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled }) => {
|
|
10289
10334
|
const logLevel = useLogLevel();
|
|
10290
10335
|
const ctxAndGain = useSingletonAudioContext({
|
|
@@ -10320,7 +10365,6 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10320
10365
|
return ({
|
|
10321
10366
|
node,
|
|
10322
10367
|
mediaTimestamp,
|
|
10323
|
-
currentTime,
|
|
10324
10368
|
scheduledTime,
|
|
10325
10369
|
duration,
|
|
10326
10370
|
offset,
|
|
@@ -10329,7 +10373,14 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10329
10373
|
if (!ctxAndGain) {
|
|
10330
10374
|
throw new Error("Audio context not found");
|
|
10331
10375
|
}
|
|
10332
|
-
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);
|
|
10333
10384
|
if (duration > 0) {
|
|
10334
10385
|
if (saveForLater) {
|
|
10335
10386
|
nodesToResume.current.set(node, {
|
|
@@ -10349,7 +10400,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10349
10400
|
const prev = prevEndTimes.current;
|
|
10350
10401
|
const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
|
|
10351
10402
|
const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
|
|
10352
|
-
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"), "");
|
|
10353
10404
|
prev.scheduledEndTime = scheduledEndTime;
|
|
10354
10405
|
prev.mediaEndTime = mediaEndTime;
|
|
10355
10406
|
return duration > 0 ? {
|
|
@@ -10376,7 +10427,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10376
10427
|
node.start(r2.scheduledTime, r2.offset, r2.duration);
|
|
10377
10428
|
});
|
|
10378
10429
|
nodesToResume.current.clear();
|
|
10379
|
-
const resumePromise = ctxAndGain.
|
|
10430
|
+
const resumePromise = ctxAndGain.resume();
|
|
10380
10431
|
isResuming.current = new Promise((resolve) => {
|
|
10381
10432
|
waitUntilActuallyResumed(ctxAndGain.audioContext, logLevel).then(resolve);
|
|
10382
10433
|
resumePromise.catch((err) => {
|
|
@@ -10393,17 +10444,18 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
10393
10444
|
}, []);
|
|
10394
10445
|
const suspend = useCallback10(() => {
|
|
10395
10446
|
if (!ctxAndGain) {
|
|
10396
|
-
return;
|
|
10447
|
+
return Promise.resolve();
|
|
10397
10448
|
}
|
|
10398
10449
|
if (!audioContextIsPlayingEventually.current) {
|
|
10399
|
-
return;
|
|
10450
|
+
return Promise.resolve();
|
|
10400
10451
|
}
|
|
10401
10452
|
audioContextIsPlayingEventually.current = false;
|
|
10402
|
-
ctxAndGain.
|
|
10453
|
+
return ctxAndGain.suspend();
|
|
10403
10454
|
}, [ctxAndGain]);
|
|
10404
10455
|
const audioContextValue = useMemo23(() => {
|
|
10405
10456
|
return {
|
|
10406
10457
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
10458
|
+
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
10407
10459
|
gainNode: ctxAndGain?.gainNode ?? null,
|
|
10408
10460
|
audioSyncAnchor,
|
|
10409
10461
|
audioSyncAnchorEmitter,
|
|
@@ -10895,7 +10947,8 @@ var getTimelineDuration = ({
|
|
|
10895
10947
|
trimAfter
|
|
10896
10948
|
});
|
|
10897
10949
|
if (parentSequenceDurationInFrames !== null) {
|
|
10898
|
-
|
|
10950
|
+
const cappedDuration = Math.min(parentSequenceDurationInFrames * playbackRate, mediaDuration);
|
|
10951
|
+
return Number(cappedDuration.toFixed(10));
|
|
10899
10952
|
}
|
|
10900
10953
|
return mediaDuration;
|
|
10901
10954
|
};
|
|
@@ -12498,41 +12551,6 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
12498
12551
|
var Html5Audio = forwardRef9(AudioRefForwardingFunction);
|
|
12499
12552
|
addSequenceStackTraces(Html5Audio);
|
|
12500
12553
|
var Audio = Html5Audio;
|
|
12501
|
-
var kSplineTableSize = 11;
|
|
12502
|
-
var kSampleStepSize = 1 / (kSplineTableSize - 1);
|
|
12503
|
-
var IFrameRefForwarding = ({
|
|
12504
|
-
onLoad,
|
|
12505
|
-
onError,
|
|
12506
|
-
delayRenderRetries,
|
|
12507
|
-
delayRenderTimeoutInMilliseconds,
|
|
12508
|
-
...props2
|
|
12509
|
-
}, ref) => {
|
|
12510
|
-
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12511
|
-
const [handle] = useState16(() => delayRender2(`Loading <IFrame> with source ${props2.src}`, {
|
|
12512
|
-
retries: delayRenderRetries ?? undefined,
|
|
12513
|
-
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
12514
|
-
}));
|
|
12515
|
-
const didLoad = useCallback16((e) => {
|
|
12516
|
-
continueRender2(handle);
|
|
12517
|
-
onLoad?.(e);
|
|
12518
|
-
}, [handle, onLoad, continueRender2]);
|
|
12519
|
-
const didGetError = useCallback16((e) => {
|
|
12520
|
-
continueRender2(handle);
|
|
12521
|
-
if (onError) {
|
|
12522
|
-
onError(e);
|
|
12523
|
-
} else {
|
|
12524
|
-
console.error("Error loading iframe:", e, "Handle the event using the onError() prop to make this message disappear.");
|
|
12525
|
-
}
|
|
12526
|
-
}, [handle, onError, continueRender2]);
|
|
12527
|
-
return /* @__PURE__ */ jsx25("iframe", {
|
|
12528
|
-
referrerPolicy: "strict-origin-when-cross-origin",
|
|
12529
|
-
...props2,
|
|
12530
|
-
ref,
|
|
12531
|
-
onError: didGetError,
|
|
12532
|
-
onLoad: didLoad
|
|
12533
|
-
});
|
|
12534
|
-
};
|
|
12535
|
-
var IFrame = forwardRef10(IFrameRefForwarding);
|
|
12536
12554
|
function exponentialBackoff(errorCount) {
|
|
12537
12555
|
return 1000 * 2 ** (errorCount - 1);
|
|
12538
12556
|
}
|
|
@@ -12551,6 +12569,7 @@ var ImgContent = ({
|
|
|
12551
12569
|
delayRenderTimeoutInMilliseconds,
|
|
12552
12570
|
onImageFrame,
|
|
12553
12571
|
crossOrigin,
|
|
12572
|
+
decoding,
|
|
12554
12573
|
ref,
|
|
12555
12574
|
...props2
|
|
12556
12575
|
}) => {
|
|
@@ -12566,7 +12585,7 @@ var ImgContent = ({
|
|
|
12566
12585
|
return imageRef.current;
|
|
12567
12586
|
}, []);
|
|
12568
12587
|
const actualSrc = usePreload(src);
|
|
12569
|
-
const retryIn =
|
|
12588
|
+
const retryIn = useCallback16((timeout) => {
|
|
12570
12589
|
if (!imageRef.current) {
|
|
12571
12590
|
return;
|
|
12572
12591
|
}
|
|
@@ -12584,7 +12603,7 @@ var ImgContent = ({
|
|
|
12584
12603
|
}, timeout);
|
|
12585
12604
|
}, []);
|
|
12586
12605
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
12587
|
-
const didGetError =
|
|
12606
|
+
const didGetError = useCallback16((e) => {
|
|
12588
12607
|
if (!errors.current) {
|
|
12589
12608
|
return;
|
|
12590
12609
|
}
|
|
@@ -12672,18 +12691,18 @@ var ImgContent = ({
|
|
|
12672
12691
|
delayRender2
|
|
12673
12692
|
]);
|
|
12674
12693
|
}
|
|
12675
|
-
const { isClientSideRendering } = useRemotionEnvironment();
|
|
12694
|
+
const { isClientSideRendering, isRendering } = useRemotionEnvironment();
|
|
12676
12695
|
const crossOriginValue = getCrossOriginValue({
|
|
12677
12696
|
crossOrigin,
|
|
12678
12697
|
requestsVideoFrame: false,
|
|
12679
12698
|
isClientSideRendering
|
|
12680
12699
|
});
|
|
12681
|
-
return /* @__PURE__ */
|
|
12700
|
+
return /* @__PURE__ */ jsx25("img", {
|
|
12682
12701
|
...props2,
|
|
12683
12702
|
ref: imageRef,
|
|
12684
12703
|
crossOrigin: crossOriginValue,
|
|
12685
12704
|
onError: didGetError,
|
|
12686
|
-
decoding: "sync"
|
|
12705
|
+
decoding: isRendering ? "sync" : decoding
|
|
12687
12706
|
});
|
|
12688
12707
|
};
|
|
12689
12708
|
var ImgInner = ({
|
|
@@ -12700,7 +12719,7 @@ var ImgInner = ({
|
|
|
12700
12719
|
if (!src) {
|
|
12701
12720
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
12702
12721
|
}
|
|
12703
|
-
return /* @__PURE__ */
|
|
12722
|
+
return /* @__PURE__ */ jsx25(Sequence, {
|
|
12704
12723
|
layout: "none",
|
|
12705
12724
|
from: from ?? 0,
|
|
12706
12725
|
durationInFrames: durationInFrames ?? Infinity,
|
|
@@ -12711,7 +12730,7 @@ var ImgInner = ({
|
|
|
12711
12730
|
_experimentalControls: controls,
|
|
12712
12731
|
showInTimeline: showInTimeline ?? true,
|
|
12713
12732
|
hidden,
|
|
12714
|
-
children: /* @__PURE__ */
|
|
12733
|
+
children: /* @__PURE__ */ jsx25(ImgContent, {
|
|
12715
12734
|
src,
|
|
12716
12735
|
...props2
|
|
12717
12736
|
})
|
|
@@ -12723,6 +12742,331 @@ var imgSchema = {
|
|
|
12723
12742
|
};
|
|
12724
12743
|
var Img = wrapInSchema(ImgInner, imgSchema);
|
|
12725
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);
|
|
12726
13070
|
var compositionsRef = React28.createRef();
|
|
12727
13071
|
var CompositionManagerProvider = ({
|
|
12728
13072
|
children,
|
|
@@ -12731,18 +13075,18 @@ var CompositionManagerProvider = ({
|
|
|
12731
13075
|
initialCompositions,
|
|
12732
13076
|
initialCanvasContent
|
|
12733
13077
|
}) => {
|
|
12734
|
-
const [folders, setFolders] =
|
|
12735
|
-
const [canvasContent, setCanvasContent] =
|
|
12736
|
-
const [compositions, setCompositions] =
|
|
13078
|
+
const [folders, setFolders] = useState18([]);
|
|
13079
|
+
const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
|
|
13080
|
+
const [compositions, setCompositions] = useState18(initialCompositions);
|
|
12737
13081
|
const currentcompositionsRef = useRef22(compositions);
|
|
12738
|
-
const updateCompositions =
|
|
13082
|
+
const updateCompositions = useCallback19((updateComps) => {
|
|
12739
13083
|
setCompositions((comps) => {
|
|
12740
13084
|
const updated = updateComps(comps);
|
|
12741
13085
|
currentcompositionsRef.current = updated;
|
|
12742
13086
|
return updated;
|
|
12743
13087
|
});
|
|
12744
13088
|
}, []);
|
|
12745
|
-
const registerComposition =
|
|
13089
|
+
const registerComposition = useCallback19((comp) => {
|
|
12746
13090
|
updateCompositions((comps) => {
|
|
12747
13091
|
if (comps.find((c2) => c2.id === comp.id)) {
|
|
12748
13092
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
@@ -12750,12 +13094,12 @@ var CompositionManagerProvider = ({
|
|
|
12750
13094
|
return [...comps, comp];
|
|
12751
13095
|
});
|
|
12752
13096
|
}, [updateCompositions]);
|
|
12753
|
-
const unregisterComposition =
|
|
13097
|
+
const unregisterComposition = useCallback19((id) => {
|
|
12754
13098
|
setCompositions((comps) => {
|
|
12755
13099
|
return comps.filter((c2) => c2.id !== id);
|
|
12756
13100
|
});
|
|
12757
13101
|
}, []);
|
|
12758
|
-
const registerFolder =
|
|
13102
|
+
const registerFolder = useCallback19((name, parent, nonce) => {
|
|
12759
13103
|
setFolders((prevFolders) => {
|
|
12760
13104
|
return [
|
|
12761
13105
|
...prevFolders,
|
|
@@ -12767,7 +13111,7 @@ var CompositionManagerProvider = ({
|
|
|
12767
13111
|
];
|
|
12768
13112
|
});
|
|
12769
13113
|
}, []);
|
|
12770
|
-
const unregisterFolder =
|
|
13114
|
+
const unregisterFolder = useCallback19((name, parent) => {
|
|
12771
13115
|
setFolders((prevFolders) => {
|
|
12772
13116
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
12773
13117
|
});
|
|
@@ -12777,7 +13121,7 @@ var CompositionManagerProvider = ({
|
|
|
12777
13121
|
getCompositions: () => currentcompositionsRef.current
|
|
12778
13122
|
};
|
|
12779
13123
|
}, []);
|
|
12780
|
-
const compositionManagerSetters =
|
|
13124
|
+
const compositionManagerSetters = useMemo322(() => {
|
|
12781
13125
|
return {
|
|
12782
13126
|
registerComposition,
|
|
12783
13127
|
unregisterComposition,
|
|
@@ -12793,7 +13137,7 @@ var CompositionManagerProvider = ({
|
|
|
12793
13137
|
unregisterFolder,
|
|
12794
13138
|
onlyRenderComposition
|
|
12795
13139
|
]);
|
|
12796
|
-
const compositionManagerContextValue =
|
|
13140
|
+
const compositionManagerContextValue = useMemo322(() => {
|
|
12797
13141
|
return {
|
|
12798
13142
|
compositions,
|
|
12799
13143
|
folders,
|
|
@@ -12801,9 +13145,9 @@ var CompositionManagerProvider = ({
|
|
|
12801
13145
|
canvasContent
|
|
12802
13146
|
};
|
|
12803
13147
|
}, [compositions, folders, currentCompositionMetadata, canvasContent]);
|
|
12804
|
-
return /* @__PURE__ */
|
|
13148
|
+
return /* @__PURE__ */ jsx28(CompositionManager.Provider, {
|
|
12805
13149
|
value: compositionManagerContextValue,
|
|
12806
|
-
children: /* @__PURE__ */
|
|
13150
|
+
children: /* @__PURE__ */ jsx28(CompositionSetters.Provider, {
|
|
12807
13151
|
value: compositionManagerSetters,
|
|
12808
13152
|
children
|
|
12809
13153
|
})
|
|
@@ -12921,7 +13265,7 @@ var waitForRoot = (fn) => {
|
|
|
12921
13265
|
};
|
|
12922
13266
|
var MediaEnabledContext = createContext23(null);
|
|
12923
13267
|
var useVideoEnabled = () => {
|
|
12924
|
-
const context =
|
|
13268
|
+
const context = useContext34(MediaEnabledContext);
|
|
12925
13269
|
if (!context) {
|
|
12926
13270
|
return window.remotion_videoEnabled;
|
|
12927
13271
|
}
|
|
@@ -12931,7 +13275,7 @@ var useVideoEnabled = () => {
|
|
|
12931
13275
|
return context.videoEnabled;
|
|
12932
13276
|
};
|
|
12933
13277
|
var useAudioEnabled = () => {
|
|
12934
|
-
const context =
|
|
13278
|
+
const context = useContext34(MediaEnabledContext);
|
|
12935
13279
|
if (!context) {
|
|
12936
13280
|
return window.remotion_audioEnabled;
|
|
12937
13281
|
}
|
|
@@ -12945,8 +13289,8 @@ var MediaEnabledProvider = ({
|
|
|
12945
13289
|
videoEnabled,
|
|
12946
13290
|
audioEnabled
|
|
12947
13291
|
}) => {
|
|
12948
|
-
const value =
|
|
12949
|
-
return /* @__PURE__ */
|
|
13292
|
+
const value = useMemo33(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
13293
|
+
return /* @__PURE__ */ jsx29(MediaEnabledContext.Provider, {
|
|
12950
13294
|
value,
|
|
12951
13295
|
children
|
|
12952
13296
|
});
|
|
@@ -12960,33 +13304,33 @@ var RemotionRootContexts = ({
|
|
|
12960
13304
|
audioEnabled,
|
|
12961
13305
|
frameState
|
|
12962
13306
|
}) => {
|
|
12963
|
-
const nonceContext =
|
|
13307
|
+
const nonceContext = useMemo34(() => {
|
|
12964
13308
|
let counter = 0;
|
|
12965
13309
|
return {
|
|
12966
13310
|
getNonce: () => counter++
|
|
12967
13311
|
};
|
|
12968
13312
|
}, []);
|
|
12969
|
-
const logging =
|
|
13313
|
+
const logging = useMemo34(() => {
|
|
12970
13314
|
return { logLevel, mountTime: Date.now() };
|
|
12971
13315
|
}, [logLevel]);
|
|
12972
|
-
return /* @__PURE__ */
|
|
13316
|
+
return /* @__PURE__ */ jsx30(LogLevelContext.Provider, {
|
|
12973
13317
|
value: logging,
|
|
12974
|
-
children: /* @__PURE__ */
|
|
13318
|
+
children: /* @__PURE__ */ jsx30(NonceContext.Provider, {
|
|
12975
13319
|
value: nonceContext,
|
|
12976
|
-
children: /* @__PURE__ */
|
|
13320
|
+
children: /* @__PURE__ */ jsx30(TimelineContextProvider, {
|
|
12977
13321
|
frameState,
|
|
12978
|
-
children: /* @__PURE__ */
|
|
13322
|
+
children: /* @__PURE__ */ jsx30(MediaEnabledProvider, {
|
|
12979
13323
|
videoEnabled,
|
|
12980
13324
|
audioEnabled,
|
|
12981
|
-
children: /* @__PURE__ */
|
|
12982
|
-
children: /* @__PURE__ */
|
|
12983
|
-
children: /* @__PURE__ */
|
|
12984
|
-
children: /* @__PURE__ */
|
|
12985
|
-
children: /* @__PURE__ */
|
|
12986
|
-
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, {
|
|
12987
13331
|
audioLatencyHint,
|
|
12988
13332
|
audioEnabled,
|
|
12989
|
-
children: /* @__PURE__ */
|
|
13333
|
+
children: /* @__PURE__ */ jsx30(SharedAudioTagsContextProvider, {
|
|
12990
13334
|
numberOfAudioTags,
|
|
12991
13335
|
children
|
|
12992
13336
|
})
|
|
@@ -13254,13 +13598,13 @@ var OffthreadVideoForRendering = ({
|
|
|
13254
13598
|
const frame = useCurrentFrame();
|
|
13255
13599
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
13256
13600
|
const videoConfig = useUnsafeVideoConfig();
|
|
13257
|
-
const sequenceContext =
|
|
13601
|
+
const sequenceContext = useContext35(SequenceContext);
|
|
13258
13602
|
const mediaStartsAt = useMediaStartsAt();
|
|
13259
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
13603
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
|
|
13260
13604
|
if (!src) {
|
|
13261
13605
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
13262
13606
|
}
|
|
13263
|
-
const id =
|
|
13607
|
+
const id = useMemo35(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
13264
13608
|
src,
|
|
13265
13609
|
sequenceContext?.cumulatedFrom,
|
|
13266
13610
|
sequenceContext?.relativeFrom,
|
|
@@ -13275,7 +13619,7 @@ var OffthreadVideoForRendering = ({
|
|
|
13275
13619
|
mediaVolume: 1
|
|
13276
13620
|
});
|
|
13277
13621
|
warnAboutTooHighVolume(volume);
|
|
13278
|
-
|
|
13622
|
+
useEffect17(() => {
|
|
13279
13623
|
if (!src) {
|
|
13280
13624
|
throw new Error("No src passed");
|
|
13281
13625
|
}
|
|
@@ -13315,14 +13659,14 @@ var OffthreadVideoForRendering = ({
|
|
|
13315
13659
|
sequenceContext?.relativeFrom,
|
|
13316
13660
|
audioStreamIndex
|
|
13317
13661
|
]);
|
|
13318
|
-
const currentTime =
|
|
13662
|
+
const currentTime = useMemo35(() => {
|
|
13319
13663
|
return getExpectedMediaFrameUncorrected({
|
|
13320
13664
|
frame,
|
|
13321
13665
|
playbackRate: playbackRate || 1,
|
|
13322
13666
|
startFrom: -mediaStartsAt
|
|
13323
13667
|
}) / videoConfig.fps;
|
|
13324
13668
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
13325
|
-
const actualSrc =
|
|
13669
|
+
const actualSrc = useMemo35(() => {
|
|
13326
13670
|
return getOffthreadVideoSource({
|
|
13327
13671
|
src,
|
|
13328
13672
|
currentTime,
|
|
@@ -13330,7 +13674,7 @@ var OffthreadVideoForRendering = ({
|
|
|
13330
13674
|
toneMapped
|
|
13331
13675
|
});
|
|
13332
13676
|
}, [toneMapped, currentTime, src, transparent]);
|
|
13333
|
-
const [imageSrc, setImageSrc] =
|
|
13677
|
+
const [imageSrc, setImageSrc] = useState19(null);
|
|
13334
13678
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
13335
13679
|
useLayoutEffect11(() => {
|
|
13336
13680
|
if (!window.remotion_videoEnabled) {
|
|
@@ -13403,17 +13747,17 @@ var OffthreadVideoForRendering = ({
|
|
|
13403
13747
|
continueRender2,
|
|
13404
13748
|
delayRender2
|
|
13405
13749
|
]);
|
|
13406
|
-
const onErr =
|
|
13750
|
+
const onErr = useCallback20(() => {
|
|
13407
13751
|
if (onError) {
|
|
13408
13752
|
onError?.(new Error("Failed to load image with src " + imageSrc));
|
|
13409
13753
|
} else {
|
|
13410
13754
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
13411
13755
|
}
|
|
13412
13756
|
}, [imageSrc, onError]);
|
|
13413
|
-
const className =
|
|
13757
|
+
const className = useMemo35(() => {
|
|
13414
13758
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy2).join(" ");
|
|
13415
13759
|
}, [props2.className]);
|
|
13416
|
-
const onImageFrame =
|
|
13760
|
+
const onImageFrame = useCallback20((img) => {
|
|
13417
13761
|
if (onVideoFrame) {
|
|
13418
13762
|
onVideoFrame(img);
|
|
13419
13763
|
}
|
|
@@ -13422,7 +13766,7 @@ var OffthreadVideoForRendering = ({
|
|
|
13422
13766
|
return null;
|
|
13423
13767
|
}
|
|
13424
13768
|
continueRender2(imageSrc.handle);
|
|
13425
|
-
return /* @__PURE__ */
|
|
13769
|
+
return /* @__PURE__ */ jsx31(Img, {
|
|
13426
13770
|
src: imageSrc.src,
|
|
13427
13771
|
delayRenderRetries,
|
|
13428
13772
|
delayRenderTimeoutInMilliseconds,
|
|
@@ -13436,7 +13780,7 @@ var useEmitVideoFrame = ({
|
|
|
13436
13780
|
ref,
|
|
13437
13781
|
onVideoFrame
|
|
13438
13782
|
}) => {
|
|
13439
|
-
|
|
13783
|
+
useEffect18(() => {
|
|
13440
13784
|
const { current } = ref;
|
|
13441
13785
|
if (!current) {
|
|
13442
13786
|
return;
|
|
@@ -13468,12 +13812,12 @@ class MediaPlaybackError extends Error {
|
|
|
13468
13812
|
}
|
|
13469
13813
|
}
|
|
13470
13814
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
13471
|
-
const context =
|
|
13815
|
+
const context = useContext36(SharedAudioContext);
|
|
13472
13816
|
if (!context) {
|
|
13473
13817
|
throw new Error("SharedAudioContext not found");
|
|
13474
13818
|
}
|
|
13475
13819
|
const videoRef = useRef23(null);
|
|
13476
|
-
const sharedSource =
|
|
13820
|
+
const sharedSource = useMemo36(() => {
|
|
13477
13821
|
if (!context.audioContext) {
|
|
13478
13822
|
return null;
|
|
13479
13823
|
}
|
|
@@ -13525,10 +13869,10 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13525
13869
|
}
|
|
13526
13870
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
13527
13871
|
const { fps, durationInFrames } = useVideoConfig();
|
|
13528
|
-
const parentSequence =
|
|
13872
|
+
const parentSequence = useContext36(SequenceContext);
|
|
13529
13873
|
const logLevel = useLogLevel();
|
|
13530
13874
|
const mountTime = useMountTime();
|
|
13531
|
-
const [timelineId] =
|
|
13875
|
+
const [timelineId] = useState20(() => String(Math.random()));
|
|
13532
13876
|
if (typeof acceptableTimeShift !== "undefined") {
|
|
13533
13877
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
13534
13878
|
}
|
|
@@ -13540,7 +13884,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13540
13884
|
mediaVolume
|
|
13541
13885
|
});
|
|
13542
13886
|
warnAboutTooHighVolume(userPreferredVolume);
|
|
13543
|
-
const getStack =
|
|
13887
|
+
const getStack = useCallback21(() => {
|
|
13544
13888
|
return _remotionInternalStack ?? null;
|
|
13545
13889
|
}, [_remotionInternalStack]);
|
|
13546
13890
|
useMediaInTimeline({
|
|
@@ -13598,13 +13942,13 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13598
13942
|
useImperativeHandle8(ref, () => {
|
|
13599
13943
|
return videoRef.current;
|
|
13600
13944
|
}, []);
|
|
13601
|
-
|
|
13945
|
+
useState20(() => playbackLogging({
|
|
13602
13946
|
logLevel,
|
|
13603
13947
|
message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
13604
13948
|
tag: "video",
|
|
13605
13949
|
mountTime
|
|
13606
13950
|
}));
|
|
13607
|
-
|
|
13951
|
+
useEffect19(() => {
|
|
13608
13952
|
const { current } = videoRef;
|
|
13609
13953
|
if (!current) {
|
|
13610
13954
|
return;
|
|
@@ -13647,7 +13991,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13647
13991
|
const currentOnDurationCallback = useRef23(onDuration);
|
|
13648
13992
|
currentOnDurationCallback.current = onDuration;
|
|
13649
13993
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
13650
|
-
|
|
13994
|
+
useEffect19(() => {
|
|
13651
13995
|
const { current } = videoRef;
|
|
13652
13996
|
if (!current) {
|
|
13653
13997
|
return;
|
|
@@ -13664,7 +14008,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13664
14008
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
13665
14009
|
};
|
|
13666
14010
|
}, [src]);
|
|
13667
|
-
|
|
14011
|
+
useEffect19(() => {
|
|
13668
14012
|
const { current } = videoRef;
|
|
13669
14013
|
if (!current) {
|
|
13670
14014
|
return;
|
|
@@ -13675,7 +14019,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13675
14019
|
current.preload = "auto";
|
|
13676
14020
|
}
|
|
13677
14021
|
}, []);
|
|
13678
|
-
const actualStyle =
|
|
14022
|
+
const actualStyle = useMemo36(() => {
|
|
13679
14023
|
return {
|
|
13680
14024
|
...style
|
|
13681
14025
|
};
|
|
@@ -13685,7 +14029,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13685
14029
|
requestsVideoFrame: Boolean(onVideoFrame),
|
|
13686
14030
|
isClientSideRendering: false
|
|
13687
14031
|
});
|
|
13688
|
-
return /* @__PURE__ */
|
|
14032
|
+
return /* @__PURE__ */ jsx322("video", {
|
|
13689
14033
|
ref: videoRef,
|
|
13690
14034
|
muted: muted || mediaMuted || userPreferredVolume <= 0,
|
|
13691
14035
|
playsInline: true,
|
|
@@ -13697,7 +14041,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13697
14041
|
...nativeProps
|
|
13698
14042
|
});
|
|
13699
14043
|
};
|
|
13700
|
-
var VideoForPreview =
|
|
14044
|
+
var VideoForPreview = forwardRef12(VideoForDevelopmentRefForwardingFunction);
|
|
13701
14045
|
var InnerOffthreadVideo = (props2) => {
|
|
13702
14046
|
const {
|
|
13703
14047
|
startFrom,
|
|
@@ -13714,7 +14058,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
13714
14058
|
if (environment.isClientSideRendering) {
|
|
13715
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");
|
|
13716
14060
|
}
|
|
13717
|
-
const onDuration =
|
|
14061
|
+
const onDuration = useCallback22(() => {
|
|
13718
14062
|
return;
|
|
13719
14063
|
}, []);
|
|
13720
14064
|
if (typeof props2.src !== "string") {
|
|
@@ -13728,13 +14072,13 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
13728
14072
|
trimAfter
|
|
13729
14073
|
});
|
|
13730
14074
|
if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
|
|
13731
|
-
return /* @__PURE__ */
|
|
14075
|
+
return /* @__PURE__ */ jsx33(Sequence, {
|
|
13732
14076
|
layout: "none",
|
|
13733
14077
|
from: 0 - (trimBeforeValue ?? 0),
|
|
13734
14078
|
showInTimeline: false,
|
|
13735
14079
|
durationInFrames: trimAfterValue,
|
|
13736
14080
|
name,
|
|
13737
|
-
children: /* @__PURE__ */
|
|
14081
|
+
children: /* @__PURE__ */ jsx33(InnerOffthreadVideo, {
|
|
13738
14082
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
13739
14083
|
...otherProps,
|
|
13740
14084
|
trimAfter: undefined,
|
|
@@ -13749,7 +14093,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
13749
14093
|
}
|
|
13750
14094
|
validateMediaProps(props2, "Video");
|
|
13751
14095
|
if (environment.isRendering) {
|
|
13752
|
-
return /* @__PURE__ */
|
|
14096
|
+
return /* @__PURE__ */ jsx33(OffthreadVideoForRendering, {
|
|
13753
14097
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
13754
14098
|
...otherProps,
|
|
13755
14099
|
trimAfter: undefined,
|
|
@@ -13771,7 +14115,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
13771
14115
|
delayRenderTimeoutInMilliseconds,
|
|
13772
14116
|
...propsForPreview
|
|
13773
14117
|
} = otherProps;
|
|
13774
|
-
return /* @__PURE__ */
|
|
14118
|
+
return /* @__PURE__ */ jsx33(VideoForPreview, {
|
|
13775
14119
|
_remotionInternalStack: stack ?? null,
|
|
13776
14120
|
onDuration,
|
|
13777
14121
|
onlyWarnForMediaSeekingError: true,
|
|
@@ -13821,7 +14165,7 @@ var OffthreadVideo = ({
|
|
|
13821
14165
|
if (imageFormat) {
|
|
13822
14166
|
throw new TypeError(`The \`<OffthreadVideo>\` tag does no longer accept \`imageFormat\`. Use the \`transparent\` prop if you want to render a transparent video.`);
|
|
13823
14167
|
}
|
|
13824
|
-
return /* @__PURE__ */
|
|
14168
|
+
return /* @__PURE__ */ jsx33(InnerOffthreadVideo, {
|
|
13825
14169
|
acceptableTimeShiftInSeconds,
|
|
13826
14170
|
allowAmplificationDuringRender: allowAmplificationDuringRender ?? true,
|
|
13827
14171
|
audioStreamIndex: audioStreamIndex ?? 0,
|
|
@@ -13870,7 +14214,7 @@ function useRemotionContexts() {
|
|
|
13870
14214
|
const sequenceManagerContext = React36.useContext(SequenceManager);
|
|
13871
14215
|
const bufferManagerContext = React36.useContext(BufferingContextReact);
|
|
13872
14216
|
const logLevelContext = React36.useContext(LogLevelContext);
|
|
13873
|
-
return
|
|
14217
|
+
return useMemo37(() => ({
|
|
13874
14218
|
compositionManagerCtx,
|
|
13875
14219
|
timelineContext,
|
|
13876
14220
|
setTimelineContext,
|
|
@@ -13900,29 +14244,29 @@ function useRemotionContexts() {
|
|
|
13900
14244
|
}
|
|
13901
14245
|
var RemotionContextProvider = (props2) => {
|
|
13902
14246
|
const { children, contexts } = props2;
|
|
13903
|
-
return /* @__PURE__ */
|
|
14247
|
+
return /* @__PURE__ */ jsx34(LogLevelContext.Provider, {
|
|
13904
14248
|
value: contexts.logLevelContext,
|
|
13905
|
-
children: /* @__PURE__ */
|
|
14249
|
+
children: /* @__PURE__ */ jsx34(CanUseRemotionHooks.Provider, {
|
|
13906
14250
|
value: contexts.canUseRemotionHooksContext,
|
|
13907
|
-
children: /* @__PURE__ */
|
|
14251
|
+
children: /* @__PURE__ */ jsx34(NonceContext.Provider, {
|
|
13908
14252
|
value: contexts.nonceContext,
|
|
13909
|
-
children: /* @__PURE__ */
|
|
14253
|
+
children: /* @__PURE__ */ jsx34(PreloadContext.Provider, {
|
|
13910
14254
|
value: contexts.preloadContext,
|
|
13911
|
-
children: /* @__PURE__ */
|
|
14255
|
+
children: /* @__PURE__ */ jsx34(CompositionManager.Provider, {
|
|
13912
14256
|
value: contexts.compositionManagerCtx,
|
|
13913
|
-
children: /* @__PURE__ */
|
|
14257
|
+
children: /* @__PURE__ */ jsx34(SequenceManager.Provider, {
|
|
13914
14258
|
value: contexts.sequenceManagerContext,
|
|
13915
|
-
children: /* @__PURE__ */
|
|
14259
|
+
children: /* @__PURE__ */ jsx34(RenderAssetManager.Provider, {
|
|
13916
14260
|
value: contexts.renderAssetManagerContext,
|
|
13917
|
-
children: /* @__PURE__ */
|
|
14261
|
+
children: /* @__PURE__ */ jsx34(ResolveCompositionContext.Provider, {
|
|
13918
14262
|
value: contexts.resolveCompositionContext,
|
|
13919
|
-
children: /* @__PURE__ */
|
|
14263
|
+
children: /* @__PURE__ */ jsx34(TimelineContext.Provider, {
|
|
13920
14264
|
value: contexts.timelineContext,
|
|
13921
|
-
children: /* @__PURE__ */
|
|
14265
|
+
children: /* @__PURE__ */ jsx34(SetTimelineContext.Provider, {
|
|
13922
14266
|
value: contexts.setTimelineContext,
|
|
13923
|
-
children: /* @__PURE__ */
|
|
14267
|
+
children: /* @__PURE__ */ jsx34(SequenceContext.Provider, {
|
|
13924
14268
|
value: contexts.sequenceContext,
|
|
13925
|
-
children: /* @__PURE__ */
|
|
14269
|
+
children: /* @__PURE__ */ jsx34(BufferingContextReact.Provider, {
|
|
13926
14270
|
value: contexts.bufferManagerContext,
|
|
13927
14271
|
children
|
|
13928
14272
|
})
|
|
@@ -13947,6 +14291,7 @@ var Internals = {
|
|
|
13947
14291
|
useAbsoluteTimelinePosition,
|
|
13948
14292
|
evaluateVolume,
|
|
13949
14293
|
getAbsoluteSrc,
|
|
14294
|
+
getAssetDisplayName,
|
|
13950
14295
|
Timeline: exports_timeline_position_state,
|
|
13951
14296
|
validateMediaTrimProps,
|
|
13952
14297
|
validateMediaProps,
|
|
@@ -14107,13 +14452,13 @@ var flattenChildren = (children) => {
|
|
|
14107
14452
|
};
|
|
14108
14453
|
var IsInsideSeriesContext = createContext25(false);
|
|
14109
14454
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
14110
|
-
return /* @__PURE__ */
|
|
14455
|
+
return /* @__PURE__ */ jsx35(IsInsideSeriesContext.Provider, {
|
|
14111
14456
|
value: true,
|
|
14112
14457
|
children
|
|
14113
14458
|
});
|
|
14114
14459
|
};
|
|
14115
14460
|
var IsNotInsideSeriesProvider = ({ children }) => {
|
|
14116
|
-
return /* @__PURE__ */
|
|
14461
|
+
return /* @__PURE__ */ jsx35(IsInsideSeriesContext.Provider, {
|
|
14117
14462
|
value: false,
|
|
14118
14463
|
children
|
|
14119
14464
|
});
|
|
@@ -14126,13 +14471,13 @@ var useRequireToBeInsideSeries = () => {
|
|
|
14126
14471
|
};
|
|
14127
14472
|
var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
14128
14473
|
useRequireToBeInsideSeries();
|
|
14129
|
-
return /* @__PURE__ */
|
|
14474
|
+
return /* @__PURE__ */ jsx36(IsNotInsideSeriesProvider, {
|
|
14130
14475
|
children
|
|
14131
14476
|
});
|
|
14132
14477
|
};
|
|
14133
|
-
var SeriesSequence =
|
|
14478
|
+
var SeriesSequence = forwardRef13(SeriesSequenceRefForwardingFunction);
|
|
14134
14479
|
var SeriesInner = (props2) => {
|
|
14135
|
-
const childrenValue =
|
|
14480
|
+
const childrenValue = useMemo38(() => {
|
|
14136
14481
|
let startFrame = 0;
|
|
14137
14482
|
const flattenedChildren = flattenChildren(props2.children);
|
|
14138
14483
|
return Children.map(flattenedChildren, (child, i) => {
|
|
@@ -14173,7 +14518,7 @@ var SeriesInner = (props2) => {
|
|
|
14173
14518
|
}
|
|
14174
14519
|
const currentStartFrame = startFrame + offset;
|
|
14175
14520
|
startFrame += durationInFramesProp + offset;
|
|
14176
|
-
return /* @__PURE__ */
|
|
14521
|
+
return /* @__PURE__ */ jsx36(Sequence, {
|
|
14177
14522
|
name: name || "<Series.Sequence>",
|
|
14178
14523
|
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
14179
14524
|
from: currentStartFrame,
|
|
@@ -14184,8 +14529,8 @@ var SeriesInner = (props2) => {
|
|
|
14184
14529
|
});
|
|
14185
14530
|
});
|
|
14186
14531
|
}, [props2.children]);
|
|
14187
|
-
return /* @__PURE__ */
|
|
14188
|
-
children: /* @__PURE__ */
|
|
14532
|
+
return /* @__PURE__ */ jsx36(IsInsideSeriesContainer, {
|
|
14533
|
+
children: /* @__PURE__ */ jsx36(Sequence, {
|
|
14189
14534
|
layout: "none",
|
|
14190
14535
|
name: "<Series>",
|
|
14191
14536
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/series",
|
|
@@ -14665,14 +15010,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14665
15010
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
14666
15011
|
const videoConfig = useUnsafeVideoConfig();
|
|
14667
15012
|
const videoRef = useRef24(null);
|
|
14668
|
-
const sequenceContext =
|
|
15013
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
14669
15014
|
const mediaStartsAt = useMediaStartsAt();
|
|
14670
15015
|
const environment = useRemotionEnvironment();
|
|
14671
15016
|
const logLevel = useLogLevel();
|
|
14672
15017
|
const mountTime = useMountTime();
|
|
14673
15018
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
14674
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
14675
|
-
const id =
|
|
15019
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
15020
|
+
const id = useMemo39(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
14676
15021
|
props2.src,
|
|
14677
15022
|
sequenceContext?.cumulatedFrom,
|
|
14678
15023
|
sequenceContext?.relativeFrom,
|
|
@@ -14687,7 +15032,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14687
15032
|
mediaVolume: 1
|
|
14688
15033
|
});
|
|
14689
15034
|
warnAboutTooHighVolume(volume);
|
|
14690
|
-
|
|
15035
|
+
useEffect20(() => {
|
|
14691
15036
|
if (!props2.src) {
|
|
14692
15037
|
throw new Error("No src passed");
|
|
14693
15038
|
}
|
|
@@ -14730,7 +15075,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14730
15075
|
useImperativeHandle9(ref, () => {
|
|
14731
15076
|
return videoRef.current;
|
|
14732
15077
|
}, []);
|
|
14733
|
-
|
|
15078
|
+
useEffect20(() => {
|
|
14734
15079
|
if (!window.remotion_videoEnabled) {
|
|
14735
15080
|
return;
|
|
14736
15081
|
}
|
|
@@ -14854,13 +15199,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14854
15199
|
delayRender2
|
|
14855
15200
|
]);
|
|
14856
15201
|
}
|
|
14857
|
-
return /* @__PURE__ */
|
|
15202
|
+
return /* @__PURE__ */ jsx37("video", {
|
|
14858
15203
|
ref: videoRef,
|
|
14859
15204
|
disableRemotePlayback: true,
|
|
14860
15205
|
...props2
|
|
14861
15206
|
});
|
|
14862
15207
|
};
|
|
14863
|
-
var VideoForRendering =
|
|
15208
|
+
var VideoForRendering = forwardRef14(VideoForRenderingForwardFunction);
|
|
14864
15209
|
var VideoForwardingFunction = (props2, ref) => {
|
|
14865
15210
|
const {
|
|
14866
15211
|
startFrom,
|
|
@@ -14881,7 +15226,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14881
15226
|
if (environment.isClientSideRendering) {
|
|
14882
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");
|
|
14883
15228
|
}
|
|
14884
|
-
const { durations, setDurations } =
|
|
15229
|
+
const { durations, setDurations } = useContext38(DurationsContext);
|
|
14885
15230
|
if (typeof ref === "string") {
|
|
14886
15231
|
throw new Error("string refs are not supported");
|
|
14887
15232
|
}
|
|
@@ -14889,10 +15234,10 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14889
15234
|
throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
|
|
14890
15235
|
}
|
|
14891
15236
|
const preloadedSrc = usePreload(props2.src);
|
|
14892
|
-
const onDuration =
|
|
15237
|
+
const onDuration = useCallback23((src, durationInSeconds) => {
|
|
14893
15238
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
14894
15239
|
}, [setDurations]);
|
|
14895
|
-
const onVideoFrame =
|
|
15240
|
+
const onVideoFrame = useCallback23(() => {}, []);
|
|
14896
15241
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
|
|
14897
15242
|
validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
|
|
14898
15243
|
const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
|
|
@@ -14903,7 +15248,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14903
15248
|
});
|
|
14904
15249
|
if (loop && durationFetched !== undefined) {
|
|
14905
15250
|
if (!Number.isFinite(durationFetched)) {
|
|
14906
|
-
return /* @__PURE__ */
|
|
15251
|
+
return /* @__PURE__ */ jsx38(Html5Video, {
|
|
14907
15252
|
...propsOtherThanLoop,
|
|
14908
15253
|
ref,
|
|
14909
15254
|
stack,
|
|
@@ -14911,7 +15256,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14911
15256
|
});
|
|
14912
15257
|
}
|
|
14913
15258
|
const mediaDuration = durationFetched * fps;
|
|
14914
|
-
return /* @__PURE__ */
|
|
15259
|
+
return /* @__PURE__ */ jsx38(Loop, {
|
|
14915
15260
|
durationInFrames: calculateMediaDuration({
|
|
14916
15261
|
trimAfter: trimAfterValue,
|
|
14917
15262
|
mediaDurationInFrames: mediaDuration,
|
|
@@ -14921,7 +15266,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14921
15266
|
layout: "none",
|
|
14922
15267
|
name,
|
|
14923
15268
|
showInTimeline: false,
|
|
14924
|
-
children: /* @__PURE__ */
|
|
15269
|
+
children: /* @__PURE__ */ jsx38(Html5Video, {
|
|
14925
15270
|
...propsOtherThanLoop,
|
|
14926
15271
|
ref,
|
|
14927
15272
|
stack,
|
|
@@ -14930,13 +15275,13 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14930
15275
|
});
|
|
14931
15276
|
}
|
|
14932
15277
|
if (typeof trimBeforeValue !== "undefined" || typeof trimAfterValue !== "undefined") {
|
|
14933
|
-
return /* @__PURE__ */
|
|
15278
|
+
return /* @__PURE__ */ jsx38(Sequence, {
|
|
14934
15279
|
layout: "none",
|
|
14935
15280
|
from: 0 - (trimBeforeValue ?? 0),
|
|
14936
15281
|
showInTimeline: false,
|
|
14937
15282
|
durationInFrames: trimAfterValue === undefined ? undefined : trimAfterValue / (props2.playbackRate ?? 1),
|
|
14938
15283
|
name,
|
|
14939
|
-
children: /* @__PURE__ */
|
|
15284
|
+
children: /* @__PURE__ */ jsx38(Html5Video, {
|
|
14940
15285
|
pauseWhenBuffering: pauseWhenBuffering ?? false,
|
|
14941
15286
|
...otherProps,
|
|
14942
15287
|
ref,
|
|
@@ -14950,14 +15295,14 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14950
15295
|
volume: props2.volume
|
|
14951
15296
|
}, "Html5Video");
|
|
14952
15297
|
if (environment.isRendering) {
|
|
14953
|
-
return /* @__PURE__ */
|
|
15298
|
+
return /* @__PURE__ */ jsx38(VideoForRendering, {
|
|
14954
15299
|
onDuration,
|
|
14955
15300
|
onVideoFrame: onVideoFrame ?? null,
|
|
14956
15301
|
...otherProps,
|
|
14957
15302
|
ref
|
|
14958
15303
|
});
|
|
14959
15304
|
}
|
|
14960
|
-
return /* @__PURE__ */
|
|
15305
|
+
return /* @__PURE__ */ jsx38(VideoForPreview, {
|
|
14961
15306
|
onlyWarnForMediaSeekingError: false,
|
|
14962
15307
|
...otherProps,
|
|
14963
15308
|
ref,
|
|
@@ -14970,7 +15315,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14970
15315
|
onAutoPlayError: onAutoPlayError ?? undefined
|
|
14971
15316
|
});
|
|
14972
15317
|
};
|
|
14973
|
-
var Html5Video =
|
|
15318
|
+
var Html5Video = forwardRef15(VideoForwardingFunction);
|
|
14974
15319
|
addSequenceStackTraces(Html5Video);
|
|
14975
15320
|
checkMultipleRemotionVersions();
|
|
14976
15321
|
var proxyObj = {};
|
|
@@ -14999,7 +15344,7 @@ addSequenceStackTraces(Composition);
|
|
|
14999
15344
|
|
|
15000
15345
|
// ../design/dist/esm/index.mjs
|
|
15001
15346
|
import { jsx as jsx210, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
15002
|
-
import { jsx as
|
|
15347
|
+
import { jsx as jsx310, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
15003
15348
|
import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef26 } from "react";
|
|
15004
15349
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
15005
15350
|
import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
@@ -15052,8 +15397,8 @@ import * as React282 from "react";
|
|
|
15052
15397
|
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
15053
15398
|
import * as React35 from "react";
|
|
15054
15399
|
import * as React312 from "react";
|
|
15055
|
-
import { useState as useState112 } from "react";
|
|
15056
15400
|
import * as React292 from "react";
|
|
15401
|
+
import { useState as useState112 } from "react";
|
|
15057
15402
|
import * as React30 from "react";
|
|
15058
15403
|
import * as React342 from "react";
|
|
15059
15404
|
import * as React332 from "react";
|
|
@@ -15155,9 +15500,9 @@ function createSlot(ownerName) {
|
|
|
15155
15500
|
return child;
|
|
15156
15501
|
}
|
|
15157
15502
|
});
|
|
15158
|
-
return /* @__PURE__ */
|
|
15503
|
+
return /* @__PURE__ */ jsx39(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
15159
15504
|
}
|
|
15160
|
-
return /* @__PURE__ */
|
|
15505
|
+
return /* @__PURE__ */ jsx39(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
15161
15506
|
});
|
|
15162
15507
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
15163
15508
|
return Slot2;
|
|
@@ -15185,7 +15530,7 @@ function createSlotClone(ownerName) {
|
|
|
15185
15530
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
15186
15531
|
function createSlottable(ownerName) {
|
|
15187
15532
|
const Slottable2 = ({ children }) => {
|
|
15188
|
-
return /* @__PURE__ */
|
|
15533
|
+
return /* @__PURE__ */ jsx39(Fragment2, { children });
|
|
15189
15534
|
};
|
|
15190
15535
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
15191
15536
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -15254,8 +15599,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
15254
15599
|
progress: 0,
|
|
15255
15600
|
isActive: false
|
|
15256
15601
|
});
|
|
15257
|
-
const eventTarget =
|
|
15258
|
-
|
|
15602
|
+
const eventTarget = useMemo40(() => new EventTarget, []);
|
|
15603
|
+
useEffect21(() => {
|
|
15259
15604
|
if (disabled) {
|
|
15260
15605
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
15261
15606
|
} else {
|
|
@@ -15401,8 +15746,8 @@ var getAngle = (ref, coordinates) => {
|
|
|
15401
15746
|
};
|
|
15402
15747
|
var lastCoordinates = null;
|
|
15403
15748
|
var useMousePosition = (ref) => {
|
|
15404
|
-
const [angle, setAngle] =
|
|
15405
|
-
|
|
15749
|
+
const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
|
|
15750
|
+
useEffect21(() => {
|
|
15406
15751
|
const element = ref.current;
|
|
15407
15752
|
if (!element) {
|
|
15408
15753
|
return;
|
|
@@ -15486,7 +15831,7 @@ var Outer = ({
|
|
|
15486
15831
|
className: "relative",
|
|
15487
15832
|
style: { width, height },
|
|
15488
15833
|
children: [
|
|
15489
|
-
/* @__PURE__ */
|
|
15834
|
+
/* @__PURE__ */ jsx310("svg", {
|
|
15490
15835
|
viewBox,
|
|
15491
15836
|
style: {
|
|
15492
15837
|
overflow: "visible",
|
|
@@ -15497,11 +15842,11 @@ var Outer = ({
|
|
|
15497
15842
|
left: 0
|
|
15498
15843
|
},
|
|
15499
15844
|
pointerEvents: "none",
|
|
15500
|
-
children: /* @__PURE__ */
|
|
15845
|
+
children: /* @__PURE__ */ jsx310(Faces, {
|
|
15501
15846
|
elements: inbetween
|
|
15502
15847
|
})
|
|
15503
15848
|
}),
|
|
15504
|
-
/* @__PURE__ */
|
|
15849
|
+
/* @__PURE__ */ jsx310("div", {
|
|
15505
15850
|
style: {
|
|
15506
15851
|
transform: makeMatrix3dTransform(frontFace),
|
|
15507
15852
|
width,
|
|
@@ -15570,7 +15915,7 @@ var Button = ({
|
|
|
15570
15915
|
const [dimensions, setDimensions] = useState22(null);
|
|
15571
15916
|
const ref = useRef25(null);
|
|
15572
15917
|
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
|
|
15573
|
-
const onPointerEnter =
|
|
15918
|
+
const onPointerEnter = useCallback25((e) => {
|
|
15574
15919
|
if (e.pointerType !== "mouse") {
|
|
15575
15920
|
return;
|
|
15576
15921
|
}
|
|
@@ -15607,7 +15952,7 @@ var Button = ({
|
|
|
15607
15952
|
const isDisabled = disabled || loading;
|
|
15608
15953
|
const isAnchor = !asChild && "href" in rest && rest.href !== undefined;
|
|
15609
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);
|
|
15610
|
-
const preventInteraction =
|
|
15955
|
+
const preventInteraction = useCallback25((e) => {
|
|
15611
15956
|
e.preventDefault();
|
|
15612
15957
|
e.stopPropagation();
|
|
15613
15958
|
}, []);
|
|
@@ -18808,7 +19153,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
18808
19153
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
18809
19154
|
};
|
|
18810
19155
|
var __assign = function() {
|
|
18811
|
-
__assign = Object.assign || function
|
|
19156
|
+
__assign = Object.assign || function __assign2(t) {
|
|
18812
19157
|
for (var s, i = 1, n = arguments.length;i < n; i++) {
|
|
18813
19158
|
s = arguments[i];
|
|
18814
19159
|
for (var p in s)
|
|
@@ -20595,17 +20940,17 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
20595
20940
|
let defaultContexts = [];
|
|
20596
20941
|
function createContext32(rootComponentName, defaultContext) {
|
|
20597
20942
|
const BaseContext = React382.createContext(defaultContext);
|
|
20598
|
-
const
|
|
20943
|
+
const index3 = defaultContexts.length;
|
|
20599
20944
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
20600
20945
|
const Provider = (props) => {
|
|
20601
20946
|
const { scope, children, ...context } = props;
|
|
20602
|
-
const Context = scope?.[scopeName]?.[
|
|
20947
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
|
20603
20948
|
const value = React382.useMemo(() => context, Object.values(context));
|
|
20604
20949
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
20605
20950
|
};
|
|
20606
20951
|
Provider.displayName = rootComponentName + "Provider";
|
|
20607
20952
|
function useContext222(consumerName, scope) {
|
|
20608
|
-
const Context = scope?.[scopeName]?.[
|
|
20953
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
|
20609
20954
|
const context = React382.useContext(Context);
|
|
20610
20955
|
if (context)
|
|
20611
20956
|
return context;
|
|
@@ -20802,10 +21147,10 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20802
21147
|
super.set(key, value);
|
|
20803
21148
|
return this;
|
|
20804
21149
|
}
|
|
20805
|
-
insert(
|
|
21150
|
+
insert(index3, key, value) {
|
|
20806
21151
|
const has = this.has(key);
|
|
20807
21152
|
const length2 = this.#keys.length;
|
|
20808
|
-
const relativeIndex = toSafeInteger(
|
|
21153
|
+
const relativeIndex = toSafeInteger(index3);
|
|
20809
21154
|
let actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
|
|
20810
21155
|
const safeIndex = actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
|
|
20811
21156
|
if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
|
|
@@ -20843,39 +21188,39 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20843
21188
|
}
|
|
20844
21189
|
return this;
|
|
20845
21190
|
}
|
|
20846
|
-
with(
|
|
21191
|
+
with(index3, key, value) {
|
|
20847
21192
|
const copy = new _OrderedDict(this);
|
|
20848
|
-
copy.insert(
|
|
21193
|
+
copy.insert(index3, key, value);
|
|
20849
21194
|
return copy;
|
|
20850
21195
|
}
|
|
20851
21196
|
before(key) {
|
|
20852
|
-
const
|
|
20853
|
-
if (
|
|
21197
|
+
const index3 = this.#keys.indexOf(key) - 1;
|
|
21198
|
+
if (index3 < 0) {
|
|
20854
21199
|
return;
|
|
20855
21200
|
}
|
|
20856
|
-
return this.entryAt(
|
|
21201
|
+
return this.entryAt(index3);
|
|
20857
21202
|
}
|
|
20858
21203
|
setBefore(key, newKey, value) {
|
|
20859
|
-
const
|
|
20860
|
-
if (
|
|
21204
|
+
const index3 = this.#keys.indexOf(key);
|
|
21205
|
+
if (index3 === -1) {
|
|
20861
21206
|
return this;
|
|
20862
21207
|
}
|
|
20863
|
-
return this.insert(
|
|
21208
|
+
return this.insert(index3, newKey, value);
|
|
20864
21209
|
}
|
|
20865
21210
|
after(key) {
|
|
20866
|
-
let
|
|
20867
|
-
|
|
20868
|
-
if (
|
|
21211
|
+
let index3 = this.#keys.indexOf(key);
|
|
21212
|
+
index3 = index3 === -1 || index3 === this.size - 1 ? -1 : index3 + 1;
|
|
21213
|
+
if (index3 === -1) {
|
|
20869
21214
|
return;
|
|
20870
21215
|
}
|
|
20871
|
-
return this.entryAt(
|
|
21216
|
+
return this.entryAt(index3);
|
|
20872
21217
|
}
|
|
20873
21218
|
setAfter(key, newKey, value) {
|
|
20874
|
-
const
|
|
20875
|
-
if (
|
|
21219
|
+
const index3 = this.#keys.indexOf(key);
|
|
21220
|
+
if (index3 === -1) {
|
|
20876
21221
|
return this;
|
|
20877
21222
|
}
|
|
20878
|
-
return this.insert(
|
|
21223
|
+
return this.insert(index3 + 1, newKey, value);
|
|
20879
21224
|
}
|
|
20880
21225
|
first() {
|
|
20881
21226
|
return this.entryAt(0);
|
|
@@ -20894,21 +21239,21 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20894
21239
|
}
|
|
20895
21240
|
return deleted;
|
|
20896
21241
|
}
|
|
20897
|
-
deleteAt(
|
|
20898
|
-
const key = this.keyAt(
|
|
21242
|
+
deleteAt(index3) {
|
|
21243
|
+
const key = this.keyAt(index3);
|
|
20899
21244
|
if (key !== undefined) {
|
|
20900
21245
|
return this.delete(key);
|
|
20901
21246
|
}
|
|
20902
21247
|
return false;
|
|
20903
21248
|
}
|
|
20904
|
-
at(
|
|
20905
|
-
const key = at(this.#keys,
|
|
21249
|
+
at(index3) {
|
|
21250
|
+
const key = at(this.#keys, index3);
|
|
20906
21251
|
if (key !== undefined) {
|
|
20907
21252
|
return this.get(key);
|
|
20908
21253
|
}
|
|
20909
21254
|
}
|
|
20910
|
-
entryAt(
|
|
20911
|
-
const key = at(this.#keys,
|
|
21255
|
+
entryAt(index3) {
|
|
21256
|
+
const key = at(this.#keys, index3);
|
|
20912
21257
|
if (key !== undefined) {
|
|
20913
21258
|
return [key, this.get(key)];
|
|
20914
21259
|
}
|
|
@@ -20916,15 +21261,15 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20916
21261
|
indexOf(key) {
|
|
20917
21262
|
return this.#keys.indexOf(key);
|
|
20918
21263
|
}
|
|
20919
|
-
keyAt(
|
|
20920
|
-
return at(this.#keys,
|
|
21264
|
+
keyAt(index3) {
|
|
21265
|
+
return at(this.#keys, index3);
|
|
20921
21266
|
}
|
|
20922
21267
|
from(key, offset4) {
|
|
20923
|
-
const
|
|
20924
|
-
if (
|
|
21268
|
+
const index3 = this.indexOf(key);
|
|
21269
|
+
if (index3 === -1) {
|
|
20925
21270
|
return;
|
|
20926
21271
|
}
|
|
20927
|
-
let dest =
|
|
21272
|
+
let dest = index3 + offset4;
|
|
20928
21273
|
if (dest < 0)
|
|
20929
21274
|
dest = 0;
|
|
20930
21275
|
if (dest >= this.size)
|
|
@@ -20932,11 +21277,11 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20932
21277
|
return this.at(dest);
|
|
20933
21278
|
}
|
|
20934
21279
|
keyFrom(key, offset4) {
|
|
20935
|
-
const
|
|
20936
|
-
if (
|
|
21280
|
+
const index3 = this.indexOf(key);
|
|
21281
|
+
if (index3 === -1) {
|
|
20937
21282
|
return;
|
|
20938
21283
|
}
|
|
20939
|
-
let dest =
|
|
21284
|
+
let dest = index3 + offset4;
|
|
20940
21285
|
if (dest < 0)
|
|
20941
21286
|
dest = 0;
|
|
20942
21287
|
if (dest >= this.size)
|
|
@@ -20944,68 +21289,68 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
20944
21289
|
return this.keyAt(dest);
|
|
20945
21290
|
}
|
|
20946
21291
|
find(predicate, thisArg) {
|
|
20947
|
-
let
|
|
21292
|
+
let index3 = 0;
|
|
20948
21293
|
for (const entry of this) {
|
|
20949
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
21294
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
20950
21295
|
return entry;
|
|
20951
21296
|
}
|
|
20952
|
-
|
|
21297
|
+
index3++;
|
|
20953
21298
|
}
|
|
20954
21299
|
return;
|
|
20955
21300
|
}
|
|
20956
21301
|
findIndex(predicate, thisArg) {
|
|
20957
|
-
let
|
|
21302
|
+
let index3 = 0;
|
|
20958
21303
|
for (const entry of this) {
|
|
20959
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
20960
|
-
return
|
|
21304
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
21305
|
+
return index3;
|
|
20961
21306
|
}
|
|
20962
|
-
|
|
21307
|
+
index3++;
|
|
20963
21308
|
}
|
|
20964
21309
|
return -1;
|
|
20965
21310
|
}
|
|
20966
21311
|
filter(predicate, thisArg) {
|
|
20967
21312
|
const entries = [];
|
|
20968
|
-
let
|
|
21313
|
+
let index3 = 0;
|
|
20969
21314
|
for (const entry of this) {
|
|
20970
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
21315
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
20971
21316
|
entries.push(entry);
|
|
20972
21317
|
}
|
|
20973
|
-
|
|
21318
|
+
index3++;
|
|
20974
21319
|
}
|
|
20975
21320
|
return new _OrderedDict(entries);
|
|
20976
21321
|
}
|
|
20977
21322
|
map(callbackfn, thisArg) {
|
|
20978
21323
|
const entries = [];
|
|
20979
|
-
let
|
|
21324
|
+
let index3 = 0;
|
|
20980
21325
|
for (const entry of this) {
|
|
20981
|
-
entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry,
|
|
20982
|
-
|
|
21326
|
+
entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index3, this])]);
|
|
21327
|
+
index3++;
|
|
20983
21328
|
}
|
|
20984
21329
|
return new _OrderedDict(entries);
|
|
20985
21330
|
}
|
|
20986
21331
|
reduce(...args) {
|
|
20987
21332
|
const [callbackfn, initialValue] = args;
|
|
20988
|
-
let
|
|
21333
|
+
let index3 = 0;
|
|
20989
21334
|
let accumulator = initialValue ?? this.at(0);
|
|
20990
21335
|
for (const entry of this) {
|
|
20991
|
-
if (
|
|
21336
|
+
if (index3 === 0 && args.length === 1) {
|
|
20992
21337
|
accumulator = entry;
|
|
20993
21338
|
} else {
|
|
20994
|
-
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry,
|
|
21339
|
+
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
|
|
20995
21340
|
}
|
|
20996
|
-
|
|
21341
|
+
index3++;
|
|
20997
21342
|
}
|
|
20998
21343
|
return accumulator;
|
|
20999
21344
|
}
|
|
21000
21345
|
reduceRight(...args) {
|
|
21001
21346
|
const [callbackfn, initialValue] = args;
|
|
21002
21347
|
let accumulator = initialValue ?? this.at(-1);
|
|
21003
|
-
for (let
|
|
21004
|
-
const entry = this.at(
|
|
21005
|
-
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) {
|
|
21006
21351
|
accumulator = entry;
|
|
21007
21352
|
} else {
|
|
21008
|
-
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry,
|
|
21353
|
+
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
|
|
21009
21354
|
}
|
|
21010
21355
|
}
|
|
21011
21356
|
return accumulator;
|
|
@@ -21016,8 +21361,8 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
21016
21361
|
}
|
|
21017
21362
|
toReversed() {
|
|
21018
21363
|
const reversed = new _OrderedDict;
|
|
21019
|
-
for (let
|
|
21020
|
-
const key = this.keyAt(
|
|
21364
|
+
for (let index3 = this.size - 1;index3 >= 0; index3--) {
|
|
21365
|
+
const key = this.keyAt(index3);
|
|
21021
21366
|
const element = this.get(key);
|
|
21022
21367
|
reversed.set(key, element);
|
|
21023
21368
|
}
|
|
@@ -21040,44 +21385,44 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
21040
21385
|
if (end !== undefined && end > 0) {
|
|
21041
21386
|
stop = end - 1;
|
|
21042
21387
|
}
|
|
21043
|
-
for (let
|
|
21044
|
-
const key = this.keyAt(
|
|
21388
|
+
for (let index3 = start;index3 <= stop; index3++) {
|
|
21389
|
+
const key = this.keyAt(index3);
|
|
21045
21390
|
const element = this.get(key);
|
|
21046
21391
|
result.set(key, element);
|
|
21047
21392
|
}
|
|
21048
21393
|
return result;
|
|
21049
21394
|
}
|
|
21050
21395
|
every(predicate, thisArg) {
|
|
21051
|
-
let
|
|
21396
|
+
let index3 = 0;
|
|
21052
21397
|
for (const entry of this) {
|
|
21053
|
-
if (!Reflect.apply(predicate, thisArg, [entry,
|
|
21398
|
+
if (!Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
21054
21399
|
return false;
|
|
21055
21400
|
}
|
|
21056
|
-
|
|
21401
|
+
index3++;
|
|
21057
21402
|
}
|
|
21058
21403
|
return true;
|
|
21059
21404
|
}
|
|
21060
21405
|
some(predicate, thisArg) {
|
|
21061
|
-
let
|
|
21406
|
+
let index3 = 0;
|
|
21062
21407
|
for (const entry of this) {
|
|
21063
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
21408
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
21064
21409
|
return true;
|
|
21065
21410
|
}
|
|
21066
|
-
|
|
21411
|
+
index3++;
|
|
21067
21412
|
}
|
|
21068
21413
|
return false;
|
|
21069
21414
|
}
|
|
21070
21415
|
};
|
|
21071
|
-
function at(array,
|
|
21416
|
+
function at(array, index3) {
|
|
21072
21417
|
if ("at" in Array.prototype) {
|
|
21073
|
-
return Array.prototype.at.call(array,
|
|
21418
|
+
return Array.prototype.at.call(array, index3);
|
|
21074
21419
|
}
|
|
21075
|
-
const actualIndex = toSafeIndex(array,
|
|
21420
|
+
const actualIndex = toSafeIndex(array, index3);
|
|
21076
21421
|
return actualIndex === -1 ? undefined : array[actualIndex];
|
|
21077
21422
|
}
|
|
21078
|
-
function toSafeIndex(array,
|
|
21423
|
+
function toSafeIndex(array, index3) {
|
|
21079
21424
|
const length2 = array.length;
|
|
21080
|
-
const relativeIndex = toSafeInteger(
|
|
21425
|
+
const relativeIndex = toSafeInteger(index3);
|
|
21081
21426
|
const actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
|
|
21082
21427
|
return actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
|
|
21083
21428
|
}
|
|
@@ -21129,7 +21474,7 @@ var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
|
21129
21474
|
Node2.displayName = `Primitive.${node}`;
|
|
21130
21475
|
return { ...primitive, [node]: Node2 };
|
|
21131
21476
|
}, {});
|
|
21132
|
-
function
|
|
21477
|
+
function useCallbackRef4(callback) {
|
|
21133
21478
|
const callbackRef = React44.useRef(callback);
|
|
21134
21479
|
React44.useEffect(() => {
|
|
21135
21480
|
callbackRef.current = callback;
|
|
@@ -21233,7 +21578,7 @@ var RovingFocusGroupImpl = React47.forwardRef((props, forwardedRef) => {
|
|
|
21233
21578
|
caller: GROUP_NAME2
|
|
21234
21579
|
});
|
|
21235
21580
|
const [isTabbingBackOut, setIsTabbingBackOut] = React47.useState(false);
|
|
21236
|
-
const handleEntryFocus =
|
|
21581
|
+
const handleEntryFocus = useCallbackRef4(onEntryFocus);
|
|
21237
21582
|
const getItems = useCollection2(__scopeRovingFocusGroup);
|
|
21238
21583
|
const isClickFocusRef = React47.useRef(false);
|
|
21239
21584
|
const [focusableItemsCount, setFocusableItemsCount] = React47.useState(0);
|
|
@@ -21386,7 +21731,7 @@ function focusFirst2(candidates, preventScroll = false) {
|
|
|
21386
21731
|
}
|
|
21387
21732
|
}
|
|
21388
21733
|
function wrapArray2(array, startIndex) {
|
|
21389
|
-
return array.map((_,
|
|
21734
|
+
return array.map((_, index3) => array[(startIndex + index3) % array.length]);
|
|
21390
21735
|
}
|
|
21391
21736
|
var Root3 = RovingFocusGroup;
|
|
21392
21737
|
var Item2 = RovingFocusGroupItem;
|
|
@@ -21701,11 +22046,11 @@ var Triangle2 = (props) => {
|
|
|
21701
22046
|
};
|
|
21702
22047
|
|
|
21703
22048
|
// src/components/design.tsx
|
|
21704
|
-
import { useCallback as
|
|
22049
|
+
import { useCallback as useCallback36, useState as useState39 } from "react";
|
|
21705
22050
|
|
|
21706
22051
|
// src/components/ManageTeamMembers.tsx
|
|
21707
|
-
import React53, { useCallback as
|
|
21708
|
-
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";
|
|
21709
22054
|
function generateId() {
|
|
21710
22055
|
return Math.random().toString(36).substr(2, 9);
|
|
21711
22056
|
}
|
|
@@ -21717,26 +22062,26 @@ var Row = ({ value, onChange, onDelete, disableDelete }) => {
|
|
|
21717
22062
|
return /* @__PURE__ */ jsxs6("div", {
|
|
21718
22063
|
className: "flex flex-row gap-2 items-center",
|
|
21719
22064
|
children: [
|
|
21720
|
-
/* @__PURE__ */
|
|
22065
|
+
/* @__PURE__ */ jsx41(Input, {
|
|
21721
22066
|
placeholder: "Enter username",
|
|
21722
22067
|
className: "w-full block flex-1",
|
|
21723
22068
|
value,
|
|
21724
22069
|
onChange: (e) => onChange(e.target.value)
|
|
21725
22070
|
}),
|
|
21726
|
-
/* @__PURE__ */
|
|
22071
|
+
/* @__PURE__ */ jsx41(Button, {
|
|
21727
22072
|
className: "hover:text-white hover:bg-warn transition-colors w-10 h-10 p-0 rounded-full",
|
|
21728
22073
|
onClick: onDelete,
|
|
21729
22074
|
type: "button",
|
|
21730
22075
|
disabled: disableDelete,
|
|
21731
22076
|
"aria-label": "Delete member",
|
|
21732
22077
|
depth: 0.5,
|
|
21733
|
-
children: /* @__PURE__ */
|
|
22078
|
+
children: /* @__PURE__ */ jsx41("svg", {
|
|
21734
22079
|
width: "16",
|
|
21735
22080
|
height: "16",
|
|
21736
22081
|
viewBox: "0 0 10 10",
|
|
21737
22082
|
fill: "none",
|
|
21738
22083
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21739
|
-
children: /* @__PURE__ */
|
|
22084
|
+
children: /* @__PURE__ */ jsx41("path", {
|
|
21740
22085
|
d: "M1 1L9 9M1 9L9 1",
|
|
21741
22086
|
stroke: "currentColor",
|
|
21742
22087
|
strokeWidth: "1.5",
|
|
@@ -21748,9 +22093,9 @@ var Row = ({ value, onChange, onDelete, disableDelete }) => {
|
|
|
21748
22093
|
});
|
|
21749
22094
|
};
|
|
21750
22095
|
var ManageTeamMembers = () => {
|
|
21751
|
-
const [members, setMembers] =
|
|
22096
|
+
const [members, setMembers] = useState38(initialMembers);
|
|
21752
22097
|
const displayedMembers = [...members, { id: "NEW", name: "" }];
|
|
21753
|
-
const updateMember =
|
|
22098
|
+
const updateMember = useCallback35((idx, value) => {
|
|
21754
22099
|
if (idx === members.length) {
|
|
21755
22100
|
if (value.trim() !== "") {
|
|
21756
22101
|
setMembers((prev) => [...prev, { id: generateId(), name: value }]);
|
|
@@ -21759,11 +22104,11 @@ var ManageTeamMembers = () => {
|
|
|
21759
22104
|
setMembers((prev) => prev.map((m, i) => i === idx ? { ...m, name: value } : m));
|
|
21760
22105
|
}
|
|
21761
22106
|
}, [members.length]);
|
|
21762
|
-
const deleteMember =
|
|
22107
|
+
const deleteMember = useCallback35((idx) => {
|
|
21763
22108
|
setMembers((prev) => prev.filter((_, i) => i !== idx));
|
|
21764
22109
|
}, []);
|
|
21765
|
-
const [loading, setLoading] =
|
|
21766
|
-
const save =
|
|
22110
|
+
const [loading, setLoading] = useState38(false);
|
|
22111
|
+
const save = useCallback35(() => {
|
|
21767
22112
|
setLoading(true);
|
|
21768
22113
|
setTimeout(() => {
|
|
21769
22114
|
setLoading(false);
|
|
@@ -21771,32 +22116,32 @@ var ManageTeamMembers = () => {
|
|
|
21771
22116
|
}, []);
|
|
21772
22117
|
return /* @__PURE__ */ jsxs6(Fragment9, {
|
|
21773
22118
|
children: [
|
|
21774
|
-
/* @__PURE__ */
|
|
22119
|
+
/* @__PURE__ */ jsx41("h2", {
|
|
21775
22120
|
children: "Manage team members"
|
|
21776
22121
|
}),
|
|
21777
|
-
/* @__PURE__ */
|
|
22122
|
+
/* @__PURE__ */ jsx41("p", {
|
|
21778
22123
|
className: "font-brand",
|
|
21779
22124
|
children: "Add a new team member to your team."
|
|
21780
22125
|
}),
|
|
21781
22126
|
displayedMembers.map((member, idx) => /* @__PURE__ */ jsxs6(React53.Fragment, {
|
|
21782
22127
|
children: [
|
|
21783
|
-
/* @__PURE__ */
|
|
22128
|
+
/* @__PURE__ */ jsx41(Row, {
|
|
21784
22129
|
value: member.name,
|
|
21785
22130
|
onChange: (val) => updateMember(idx, val),
|
|
21786
22131
|
onDelete: idx < members.length ? () => deleteMember(idx) : undefined,
|
|
21787
22132
|
disableDelete: idx >= members.length
|
|
21788
22133
|
}),
|
|
21789
|
-
/* @__PURE__ */
|
|
22134
|
+
/* @__PURE__ */ jsx41("div", {
|
|
21790
22135
|
className: "h-2"
|
|
21791
22136
|
})
|
|
21792
22137
|
]
|
|
21793
22138
|
}, idx)),
|
|
21794
|
-
/* @__PURE__ */
|
|
22139
|
+
/* @__PURE__ */ jsx41("div", {
|
|
21795
22140
|
className: "h-4"
|
|
21796
22141
|
}),
|
|
21797
|
-
/* @__PURE__ */
|
|
22142
|
+
/* @__PURE__ */ jsx41("div", {
|
|
21798
22143
|
className: "flex flex-row justify-end",
|
|
21799
|
-
children: /* @__PURE__ */
|
|
22144
|
+
children: /* @__PURE__ */ jsx41(Button, {
|
|
21800
22145
|
className: "bg-brand text-white",
|
|
21801
22146
|
loading,
|
|
21802
22147
|
onClick: save,
|
|
@@ -21808,67 +22153,67 @@ var ManageTeamMembers = () => {
|
|
|
21808
22153
|
};
|
|
21809
22154
|
|
|
21810
22155
|
// src/components/design.tsx
|
|
21811
|
-
import { jsx as
|
|
22156
|
+
import { jsx as jsx44, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
21812
22157
|
var Explainer = ({ children }) => {
|
|
21813
|
-
return /* @__PURE__ */
|
|
21814
|
-
children: /* @__PURE__ */
|
|
22158
|
+
return /* @__PURE__ */ jsx44("div", {
|
|
22159
|
+
children: /* @__PURE__ */ jsx44("div", {
|
|
21815
22160
|
className: "text-gray-500 font-brand text-sm mb-2",
|
|
21816
22161
|
children
|
|
21817
22162
|
})
|
|
21818
22163
|
});
|
|
21819
22164
|
};
|
|
21820
22165
|
var DesignPage = () => {
|
|
21821
|
-
const [count4, setCount] =
|
|
21822
|
-
const [active, setActive] =
|
|
21823
|
-
const [submitButtonActive, setSubmitButtonActive] =
|
|
21824
|
-
const [submitButtonPrimaryActive, setSubmitButtonPrimaryActive] =
|
|
21825
|
-
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(() => {
|
|
21826
22171
|
setSubmitButtonActive(false);
|
|
21827
22172
|
setTimeout(() => {
|
|
21828
22173
|
setSubmitButtonActive(true);
|
|
21829
22174
|
}, 1000);
|
|
21830
22175
|
}, []);
|
|
21831
|
-
const onClickPrimary =
|
|
22176
|
+
const onClickPrimary = useCallback36(() => {
|
|
21832
22177
|
setSubmitButtonPrimaryActive(false);
|
|
21833
22178
|
setTimeout(() => {
|
|
21834
22179
|
setSubmitButtonPrimaryActive(true);
|
|
21835
22180
|
}, 1000);
|
|
21836
22181
|
}, []);
|
|
21837
|
-
const [saving, setSaving] =
|
|
21838
|
-
const save =
|
|
22182
|
+
const [saving, setSaving] = useState39(false);
|
|
22183
|
+
const save = useCallback36(() => {
|
|
21839
22184
|
setSaving(true);
|
|
21840
22185
|
setTimeout(() => {
|
|
21841
22186
|
setSaving(false);
|
|
21842
22187
|
}, 1000);
|
|
21843
22188
|
}, []);
|
|
21844
|
-
return /* @__PURE__ */
|
|
22189
|
+
return /* @__PURE__ */ jsx44("div", {
|
|
21845
22190
|
className: "bg-[var(--background)] relative",
|
|
21846
22191
|
children: /* @__PURE__ */ jsxs8("div", {
|
|
21847
22192
|
className: "max-w-[800px] mx-auto pt-10 pb-10 px-4",
|
|
21848
22193
|
children: [
|
|
21849
|
-
/* @__PURE__ */
|
|
22194
|
+
/* @__PURE__ */ jsx44("h1", {
|
|
21850
22195
|
children: "@remotion/design"
|
|
21851
22196
|
}),
|
|
21852
|
-
/* @__PURE__ */
|
|
22197
|
+
/* @__PURE__ */ jsx44("a", {
|
|
21853
22198
|
href: "https://github.com/remotion-dev/remotion/blob/main/packages/promo-pages/src/components/design.tsx",
|
|
21854
22199
|
className: "font-brand text-brand",
|
|
21855
22200
|
target: "_blank",
|
|
21856
22201
|
children: "View source"
|
|
21857
22202
|
}),
|
|
21858
|
-
/* @__PURE__ */
|
|
21859
|
-
/* @__PURE__ */
|
|
21860
|
-
/* @__PURE__ */
|
|
22203
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22204
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22205
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
21861
22206
|
className: "text-brand",
|
|
21862
22207
|
children: "<Button />"
|
|
21863
22208
|
}),
|
|
21864
|
-
/* @__PURE__ */
|
|
22209
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21865
22210
|
children: "Button with label"
|
|
21866
22211
|
}),
|
|
21867
|
-
/* @__PURE__ */
|
|
22212
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21868
22213
|
children: "Click me"
|
|
21869
22214
|
}),
|
|
21870
|
-
/* @__PURE__ */
|
|
21871
|
-
/* @__PURE__ */
|
|
22215
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22216
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21872
22217
|
children: "Disabled"
|
|
21873
22218
|
}),
|
|
21874
22219
|
/* @__PURE__ */ jsxs8(Button, {
|
|
@@ -21878,101 +22223,101 @@ var DesignPage = () => {
|
|
|
21878
22223
|
" click me"
|
|
21879
22224
|
]
|
|
21880
22225
|
}),
|
|
21881
|
-
/* @__PURE__ */
|
|
21882
|
-
/* @__PURE__ */
|
|
22226
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22227
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21883
22228
|
children: "Primary"
|
|
21884
22229
|
}),
|
|
21885
|
-
/* @__PURE__ */
|
|
22230
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21886
22231
|
className: "bg-brand text-white",
|
|
21887
22232
|
children: "Primary"
|
|
21888
22233
|
}),
|
|
21889
|
-
/* @__PURE__ */
|
|
21890
|
-
/* @__PURE__ */
|
|
22234
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22235
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21891
22236
|
children: "Click to disable"
|
|
21892
22237
|
}),
|
|
21893
|
-
/* @__PURE__ */
|
|
22238
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21894
22239
|
onClick,
|
|
21895
22240
|
loading: !submitButtonActive,
|
|
21896
22241
|
children: "Submit"
|
|
21897
22242
|
}),
|
|
21898
|
-
/* @__PURE__ */
|
|
21899
|
-
/* @__PURE__ */
|
|
22243
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22244
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21900
22245
|
children: "Click to disable (primary)"
|
|
21901
22246
|
}),
|
|
21902
|
-
/* @__PURE__ */
|
|
22247
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21903
22248
|
onClick: onClickPrimary,
|
|
21904
22249
|
className: "bg-brand text-white",
|
|
21905
22250
|
loading: !submitButtonPrimaryActive,
|
|
21906
22251
|
children: "Submit"
|
|
21907
22252
|
}),
|
|
21908
|
-
/* @__PURE__ */
|
|
21909
|
-
/* @__PURE__ */
|
|
22253
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22254
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21910
22255
|
children: "Loading state"
|
|
21911
22256
|
}),
|
|
21912
|
-
/* @__PURE__ */
|
|
22257
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21913
22258
|
onClick,
|
|
21914
22259
|
loading: true,
|
|
21915
22260
|
children: "Loading"
|
|
21916
22261
|
}),
|
|
21917
|
-
/* @__PURE__ */
|
|
21918
|
-
/* @__PURE__ */
|
|
22262
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22263
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21919
22264
|
children: "Loading state (primary)"
|
|
21920
22265
|
}),
|
|
21921
|
-
/* @__PURE__ */
|
|
22266
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21922
22267
|
onClick,
|
|
21923
22268
|
className: "bg-brand text-white",
|
|
21924
22269
|
loading: true,
|
|
21925
22270
|
children: "Loading"
|
|
21926
22271
|
}),
|
|
21927
|
-
/* @__PURE__ */
|
|
21928
|
-
/* @__PURE__ */
|
|
22272
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22273
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21929
22274
|
children: "Rounded"
|
|
21930
22275
|
}),
|
|
21931
|
-
/* @__PURE__ */
|
|
22276
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21932
22277
|
className: "rounded-full",
|
|
21933
22278
|
children: "Rounded"
|
|
21934
22279
|
}),
|
|
21935
|
-
/* @__PURE__ */
|
|
21936
|
-
/* @__PURE__ */
|
|
22280
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22281
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21937
22282
|
children: "Full width"
|
|
21938
22283
|
}),
|
|
21939
|
-
/* @__PURE__ */
|
|
22284
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21940
22285
|
className: "w-full",
|
|
21941
22286
|
children: "Choose a template"
|
|
21942
22287
|
}),
|
|
21943
|
-
/* @__PURE__ */
|
|
21944
|
-
/* @__PURE__ */
|
|
22288
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22289
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21945
22290
|
children: "Full width rounded"
|
|
21946
22291
|
}),
|
|
21947
|
-
/* @__PURE__ */
|
|
22292
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21948
22293
|
className: "w-full rounded-full",
|
|
21949
22294
|
children: "Fully rounded"
|
|
21950
22295
|
}),
|
|
21951
|
-
/* @__PURE__ */
|
|
22296
|
+
/* @__PURE__ */ jsx44("div", {
|
|
21952
22297
|
className: "h-8"
|
|
21953
22298
|
}),
|
|
21954
|
-
/* @__PURE__ */
|
|
22299
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21955
22300
|
children: "Circular"
|
|
21956
22301
|
}),
|
|
21957
|
-
/* @__PURE__ */
|
|
22302
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21958
22303
|
className: "rounded-full bg-brand w-12 h-12"
|
|
21959
22304
|
}),
|
|
21960
|
-
/* @__PURE__ */
|
|
22305
|
+
/* @__PURE__ */ jsx44("div", {
|
|
21961
22306
|
className: "h-8"
|
|
21962
22307
|
}),
|
|
21963
|
-
/* @__PURE__ */
|
|
22308
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21964
22309
|
children: "Remove"
|
|
21965
22310
|
}),
|
|
21966
|
-
/* @__PURE__ */
|
|
22311
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21967
22312
|
className: "hover:text-white hover:bg-warn transition-colors w-10 h-10 p-0 rounded-full",
|
|
21968
22313
|
depth: 0.5,
|
|
21969
|
-
children: /* @__PURE__ */
|
|
22314
|
+
children: /* @__PURE__ */ jsx44("svg", {
|
|
21970
22315
|
width: "16",
|
|
21971
22316
|
height: "16",
|
|
21972
22317
|
viewBox: "0 0 10 10",
|
|
21973
22318
|
fill: "none",
|
|
21974
22319
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21975
|
-
children: /* @__PURE__ */
|
|
22320
|
+
children: /* @__PURE__ */ jsx44("path", {
|
|
21976
22321
|
d: "M1 1L9 9M1 9L9 1",
|
|
21977
22322
|
stroke: "currentColor",
|
|
21978
22323
|
strokeWidth: "1.5",
|
|
@@ -21980,56 +22325,56 @@ var DesignPage = () => {
|
|
|
21980
22325
|
})
|
|
21981
22326
|
})
|
|
21982
22327
|
}),
|
|
21983
|
-
/* @__PURE__ */
|
|
22328
|
+
/* @__PURE__ */ jsx44("div", {
|
|
21984
22329
|
className: "h-8"
|
|
21985
22330
|
}),
|
|
21986
|
-
/* @__PURE__ */
|
|
22331
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
21987
22332
|
children: "Link button"
|
|
21988
22333
|
}),
|
|
21989
|
-
/* @__PURE__ */
|
|
22334
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
21990
22335
|
href: "/design",
|
|
21991
22336
|
children: "Link button"
|
|
21992
22337
|
}),
|
|
21993
|
-
/* @__PURE__ */
|
|
22338
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
21994
22339
|
/* @__PURE__ */ jsxs8(Explainer, {
|
|
21995
22340
|
children: [
|
|
21996
22341
|
"Link button with ",
|
|
21997
|
-
/* @__PURE__ */
|
|
22342
|
+
/* @__PURE__ */ jsx44("code", {
|
|
21998
22343
|
children: "<span>"
|
|
21999
22344
|
})
|
|
22000
22345
|
]
|
|
22001
22346
|
}),
|
|
22002
|
-
/* @__PURE__ */
|
|
22347
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
22003
22348
|
href: "/design",
|
|
22004
|
-
children: /* @__PURE__ */
|
|
22349
|
+
children: /* @__PURE__ */ jsx44("span", {
|
|
22005
22350
|
children: "Link button with span child"
|
|
22006
22351
|
})
|
|
22007
22352
|
}),
|
|
22008
|
-
/* @__PURE__ */
|
|
22009
|
-
/* @__PURE__ */
|
|
22353
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22354
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
22010
22355
|
children: "External link button"
|
|
22011
22356
|
}),
|
|
22012
|
-
/* @__PURE__ */
|
|
22357
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
22013
22358
|
href: "https://github.com/remotion-dev/remotion",
|
|
22014
22359
|
target: "_blank",
|
|
22015
22360
|
children: "GitHub"
|
|
22016
22361
|
}),
|
|
22017
|
-
/* @__PURE__ */
|
|
22362
|
+
/* @__PURE__ */ jsx44("div", {
|
|
22018
22363
|
className: "h-8"
|
|
22019
22364
|
}),
|
|
22020
|
-
/* @__PURE__ */
|
|
22365
|
+
/* @__PURE__ */ jsx44(Explainer, {
|
|
22021
22366
|
children: "Remove (small)"
|
|
22022
22367
|
}),
|
|
22023
|
-
/* @__PURE__ */
|
|
22368
|
+
/* @__PURE__ */ jsx44(Button, {
|
|
22024
22369
|
className: "hover:text-white hover:bg-warn transition-colors w-6 h-6 p-0 rounded-full",
|
|
22025
22370
|
depth: 0.5,
|
|
22026
|
-
children: /* @__PURE__ */
|
|
22371
|
+
children: /* @__PURE__ */ jsx44("svg", {
|
|
22027
22372
|
width: "10",
|
|
22028
22373
|
height: "10",
|
|
22029
22374
|
viewBox: "0 0 10 10",
|
|
22030
22375
|
fill: "none",
|
|
22031
22376
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22032
|
-
children: /* @__PURE__ */
|
|
22377
|
+
children: /* @__PURE__ */ jsx44("path", {
|
|
22033
22378
|
d: "M1 1L9 9M1 9L9 1",
|
|
22034
22379
|
stroke: "currentColor",
|
|
22035
22380
|
strokeWidth: "1.5",
|
|
@@ -22037,74 +22382,74 @@ var DesignPage = () => {
|
|
|
22037
22382
|
})
|
|
22038
22383
|
})
|
|
22039
22384
|
}),
|
|
22040
|
-
/* @__PURE__ */
|
|
22385
|
+
/* @__PURE__ */ jsx44("div", {
|
|
22041
22386
|
className: "h-8"
|
|
22042
22387
|
}),
|
|
22043
|
-
/* @__PURE__ */
|
|
22388
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22044
22389
|
className: "text-brand",
|
|
22045
22390
|
children: "<Counter />"
|
|
22046
22391
|
}),
|
|
22047
|
-
/* @__PURE__ */
|
|
22392
|
+
/* @__PURE__ */ jsx44(Counter, {
|
|
22048
22393
|
count: count4,
|
|
22049
22394
|
setCount,
|
|
22050
22395
|
minCount: 1,
|
|
22051
22396
|
step: 1,
|
|
22052
22397
|
incrementStep: 1
|
|
22053
22398
|
}),
|
|
22054
|
-
/* @__PURE__ */
|
|
22399
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22055
22400
|
" ",
|
|
22056
|
-
/* @__PURE__ */
|
|
22401
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22057
22402
|
className: "text-brand",
|
|
22058
22403
|
children: "<Switch />"
|
|
22059
22404
|
}),
|
|
22060
|
-
/* @__PURE__ */
|
|
22405
|
+
/* @__PURE__ */ jsx44(Switch, {
|
|
22061
22406
|
active,
|
|
22062
22407
|
onToggle: () => setActive((e) => !e)
|
|
22063
22408
|
}),
|
|
22064
|
-
/* @__PURE__ */
|
|
22409
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22065
22410
|
" ",
|
|
22066
|
-
/* @__PURE__ */
|
|
22411
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22067
22412
|
className: "text-brand",
|
|
22068
22413
|
children: "<Card />"
|
|
22069
22414
|
}),
|
|
22070
22415
|
/* @__PURE__ */ jsxs8(Card, {
|
|
22071
22416
|
className: "px-4 py-4",
|
|
22072
22417
|
children: [
|
|
22073
|
-
/* @__PURE__ */
|
|
22418
|
+
/* @__PURE__ */ jsx44("h3", {
|
|
22074
22419
|
className: "text-text",
|
|
22075
22420
|
children: "Card"
|
|
22076
22421
|
}),
|
|
22077
|
-
/* @__PURE__ */
|
|
22422
|
+
/* @__PURE__ */ jsx44("div", {
|
|
22078
22423
|
className: "text-gray-500",
|
|
22079
22424
|
children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
|
22080
22425
|
})
|
|
22081
22426
|
]
|
|
22082
22427
|
}),
|
|
22083
|
-
/* @__PURE__ */
|
|
22084
|
-
/* @__PURE__ */
|
|
22428
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22429
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22085
22430
|
className: "text-brand",
|
|
22086
22431
|
children: "<Select />"
|
|
22087
22432
|
}),
|
|
22088
22433
|
/* @__PURE__ */ jsxs8(Select2, {
|
|
22089
22434
|
defaultValue: "option1",
|
|
22090
22435
|
children: [
|
|
22091
|
-
/* @__PURE__ */
|
|
22436
|
+
/* @__PURE__ */ jsx44(SelectTrigger2, {
|
|
22092
22437
|
style: { width: "200px" },
|
|
22093
|
-
children: /* @__PURE__ */
|
|
22438
|
+
children: /* @__PURE__ */ jsx44(SelectValue2, {
|
|
22094
22439
|
placeholder: "Select an option"
|
|
22095
22440
|
})
|
|
22096
22441
|
}),
|
|
22097
22442
|
/* @__PURE__ */ jsxs8(SelectContent2, {
|
|
22098
22443
|
children: [
|
|
22099
|
-
/* @__PURE__ */
|
|
22444
|
+
/* @__PURE__ */ jsx44(SelectItem2, {
|
|
22100
22445
|
value: "option1",
|
|
22101
22446
|
children: "Option 1"
|
|
22102
22447
|
}),
|
|
22103
|
-
/* @__PURE__ */
|
|
22448
|
+
/* @__PURE__ */ jsx44(SelectItem2, {
|
|
22104
22449
|
value: "option2",
|
|
22105
22450
|
children: "Option 2"
|
|
22106
22451
|
}),
|
|
22107
|
-
/* @__PURE__ */
|
|
22452
|
+
/* @__PURE__ */ jsx44(SelectItem2, {
|
|
22108
22453
|
value: "option3",
|
|
22109
22454
|
children: "Option 3"
|
|
22110
22455
|
})
|
|
@@ -22112,8 +22457,8 @@ var DesignPage = () => {
|
|
|
22112
22457
|
})
|
|
22113
22458
|
]
|
|
22114
22459
|
}),
|
|
22115
|
-
/* @__PURE__ */
|
|
22116
|
-
/* @__PURE__ */
|
|
22460
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22461
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22117
22462
|
className: "text-brand",
|
|
22118
22463
|
children: "<Tabs />"
|
|
22119
22464
|
}),
|
|
@@ -22122,63 +22467,63 @@ var DesignPage = () => {
|
|
|
22122
22467
|
children: [
|
|
22123
22468
|
/* @__PURE__ */ jsxs8(TabsList2, {
|
|
22124
22469
|
children: [
|
|
22125
|
-
/* @__PURE__ */
|
|
22470
|
+
/* @__PURE__ */ jsx44(TabsTrigger2, {
|
|
22126
22471
|
value: "tab1",
|
|
22127
22472
|
children: "Tab 1"
|
|
22128
22473
|
}),
|
|
22129
|
-
/* @__PURE__ */
|
|
22474
|
+
/* @__PURE__ */ jsx44(TabsTrigger2, {
|
|
22130
22475
|
value: "tab2",
|
|
22131
22476
|
children: "Tab 2"
|
|
22132
22477
|
}),
|
|
22133
|
-
/* @__PURE__ */
|
|
22478
|
+
/* @__PURE__ */ jsx44(TabsTrigger2, {
|
|
22134
22479
|
value: "tab3",
|
|
22135
22480
|
children: "Tab 3"
|
|
22136
22481
|
})
|
|
22137
22482
|
]
|
|
22138
22483
|
}),
|
|
22139
|
-
/* @__PURE__ */
|
|
22484
|
+
/* @__PURE__ */ jsx44(TabsContent2, {
|
|
22140
22485
|
value: "tab1",
|
|
22141
|
-
children: /* @__PURE__ */
|
|
22486
|
+
children: /* @__PURE__ */ jsx44("div", {
|
|
22142
22487
|
className: "font-brand",
|
|
22143
22488
|
children: "Content for Tab 1"
|
|
22144
22489
|
})
|
|
22145
22490
|
}),
|
|
22146
|
-
/* @__PURE__ */
|
|
22491
|
+
/* @__PURE__ */ jsx44(TabsContent2, {
|
|
22147
22492
|
value: "tab2",
|
|
22148
|
-
children: /* @__PURE__ */
|
|
22493
|
+
children: /* @__PURE__ */ jsx44("div", {
|
|
22149
22494
|
className: "font-brand",
|
|
22150
22495
|
children: "Content for Tab 2"
|
|
22151
22496
|
})
|
|
22152
22497
|
}),
|
|
22153
|
-
/* @__PURE__ */
|
|
22498
|
+
/* @__PURE__ */ jsx44(TabsContent2, {
|
|
22154
22499
|
value: "tab3",
|
|
22155
|
-
children: /* @__PURE__ */
|
|
22500
|
+
children: /* @__PURE__ */ jsx44("div", {
|
|
22156
22501
|
className: "font-brand",
|
|
22157
22502
|
children: "Content for Tab 3"
|
|
22158
22503
|
})
|
|
22159
22504
|
})
|
|
22160
22505
|
]
|
|
22161
22506
|
}),
|
|
22162
|
-
/* @__PURE__ */
|
|
22163
|
-
/* @__PURE__ */
|
|
22507
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22508
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22164
22509
|
className: "text-brand",
|
|
22165
22510
|
children: "<Input />"
|
|
22166
22511
|
}),
|
|
22167
|
-
/* @__PURE__ */
|
|
22512
|
+
/* @__PURE__ */ jsx44(Input, {
|
|
22168
22513
|
placeholder: "Enter your email"
|
|
22169
22514
|
}),
|
|
22170
|
-
/* @__PURE__ */
|
|
22171
|
-
/* @__PURE__ */
|
|
22172
|
-
/* @__PURE__ */
|
|
22515
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22516
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22517
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22173
22518
|
className: "text-brand",
|
|
22174
22519
|
children: "<Textarea />"
|
|
22175
22520
|
}),
|
|
22176
|
-
/* @__PURE__ */
|
|
22521
|
+
/* @__PURE__ */ jsx44(Textarea, {
|
|
22177
22522
|
placeholder: "Enter your message"
|
|
22178
22523
|
}),
|
|
22179
|
-
/* @__PURE__ */
|
|
22180
|
-
/* @__PURE__ */
|
|
22181
|
-
/* @__PURE__ */
|
|
22524
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22525
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22526
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22182
22527
|
className: "text-brand",
|
|
22183
22528
|
children: "<InlineCode />"
|
|
22184
22529
|
}),
|
|
@@ -22186,18 +22531,18 @@ var DesignPage = () => {
|
|
|
22186
22531
|
className: "font-brand",
|
|
22187
22532
|
children: [
|
|
22188
22533
|
"Use ",
|
|
22189
|
-
/* @__PURE__ */
|
|
22534
|
+
/* @__PURE__ */ jsx44(InlineCode, {
|
|
22190
22535
|
children: "useCurrentFrame()"
|
|
22191
22536
|
}),
|
|
22192
22537
|
" to get the current frame and ",
|
|
22193
|
-
/* @__PURE__ */
|
|
22538
|
+
/* @__PURE__ */ jsx44(InlineCode, {
|
|
22194
22539
|
children: "useVideoConfig()"
|
|
22195
22540
|
}),
|
|
22196
22541
|
" to get the video configuration."
|
|
22197
22542
|
]
|
|
22198
22543
|
}),
|
|
22199
|
-
/* @__PURE__ */
|
|
22200
|
-
/* @__PURE__ */
|
|
22544
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22545
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22201
22546
|
className: "text-brand",
|
|
22202
22547
|
children: "<Link />"
|
|
22203
22548
|
}),
|
|
@@ -22206,7 +22551,7 @@ var DesignPage = () => {
|
|
|
22206
22551
|
children: [
|
|
22207
22552
|
"See the",
|
|
22208
22553
|
" ",
|
|
22209
|
-
/* @__PURE__ */
|
|
22554
|
+
/* @__PURE__ */ jsx44(Link, {
|
|
22210
22555
|
href: "https://www.remotion.dev/docs",
|
|
22211
22556
|
target: "_blank",
|
|
22212
22557
|
rel: "noopener noreferrer",
|
|
@@ -22216,38 +22561,38 @@ var DesignPage = () => {
|
|
|
22216
22561
|
"for more information."
|
|
22217
22562
|
]
|
|
22218
22563
|
}),
|
|
22219
|
-
/* @__PURE__ */
|
|
22220
|
-
/* @__PURE__ */
|
|
22221
|
-
/* @__PURE__ */
|
|
22564
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22565
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22566
|
+
/* @__PURE__ */ jsx44("h1", {
|
|
22222
22567
|
children: "Example form set"
|
|
22223
22568
|
}),
|
|
22224
|
-
/* @__PURE__ */
|
|
22225
|
-
/* @__PURE__ */
|
|
22569
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22570
|
+
/* @__PURE__ */ jsx44("h2", {
|
|
22226
22571
|
children: "Change email"
|
|
22227
22572
|
}),
|
|
22228
|
-
/* @__PURE__ */
|
|
22573
|
+
/* @__PURE__ */ jsx44("p", {
|
|
22229
22574
|
className: "font-brand",
|
|
22230
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."
|
|
22231
22576
|
}),
|
|
22232
|
-
/* @__PURE__ */
|
|
22577
|
+
/* @__PURE__ */ jsx44(Input, {
|
|
22233
22578
|
placeholder: "Enter your email",
|
|
22234
22579
|
className: "w-full block"
|
|
22235
22580
|
}),
|
|
22236
|
-
/* @__PURE__ */
|
|
22581
|
+
/* @__PURE__ */ jsx44("div", {
|
|
22237
22582
|
className: "h-2"
|
|
22238
22583
|
}),
|
|
22239
|
-
/* @__PURE__ */
|
|
22584
|
+
/* @__PURE__ */ jsx44("div", {
|
|
22240
22585
|
className: "flex flex-row justify-end",
|
|
22241
|
-
children: /* @__PURE__ */
|
|
22586
|
+
children: /* @__PURE__ */ jsx44(Button, {
|
|
22242
22587
|
className: "bg-brand text-white",
|
|
22243
22588
|
loading: saving,
|
|
22244
22589
|
onClick: save,
|
|
22245
22590
|
children: "Change"
|
|
22246
22591
|
})
|
|
22247
22592
|
}),
|
|
22248
|
-
/* @__PURE__ */
|
|
22249
|
-
/* @__PURE__ */
|
|
22250
|
-
/* @__PURE__ */
|
|
22593
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22594
|
+
/* @__PURE__ */ jsx44("br", {}),
|
|
22595
|
+
/* @__PURE__ */ jsx44(ManageTeamMembers, {})
|
|
22251
22596
|
]
|
|
22252
22597
|
})
|
|
22253
22598
|
});
|