@remotion/promo-pages 4.0.494 → 4.0.495
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 +494 -354
- package/dist/design.js +284 -220
- package/dist/experts.js +281 -217
- package/dist/homepage/Pricing.js +291 -227
- package/dist/prompts/PromptsGallery.js +284 -220
- package/dist/prompts/PromptsShow.js +308 -244
- package/dist/prompts/PromptsSubmit.js +284 -220
- package/dist/team.js +284 -220
- package/dist/template-modal-content.js +286 -222
- package/dist/templates.js +284 -220
- package/package.json +13 -13
package/dist/team.js
CHANGED
|
@@ -1559,7 +1559,7 @@ var getDefaultConfig = () => {
|
|
|
1559
1559
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1560
1560
|
|
|
1561
1561
|
// ../design/dist/esm/index.mjs
|
|
1562
|
-
import React33, { useEffect as useEffect21, useMemo as
|
|
1562
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo43, useState as useState23 } from "react";
|
|
1563
1563
|
|
|
1564
1564
|
// ../paths/dist/esm/index.mjs
|
|
1565
1565
|
var cutLInstruction = ({
|
|
@@ -4356,9 +4356,9 @@ import React9 from "react";
|
|
|
4356
4356
|
import {
|
|
4357
4357
|
forwardRef as forwardRef3,
|
|
4358
4358
|
useCallback as useCallback6,
|
|
4359
|
-
useContext as
|
|
4359
|
+
useContext as useContext18,
|
|
4360
4360
|
useEffect as useEffect3,
|
|
4361
|
-
useMemo as
|
|
4361
|
+
useMemo as useMemo15,
|
|
4362
4362
|
useRef as useRef6,
|
|
4363
4363
|
useState as useState5
|
|
4364
4364
|
} from "react";
|
|
@@ -4377,13 +4377,14 @@ import { useContext as useContext11 } from "react";
|
|
|
4377
4377
|
import { useContext as useContext13 } from "react";
|
|
4378
4378
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
4379
4379
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4380
|
-
import { createContext as createContext14 } from "react";
|
|
4381
4380
|
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
4382
4381
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4383
|
-
import React13, { createContext as
|
|
4382
|
+
import React13, { createContext as createContext14 } from "react";
|
|
4384
4383
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4385
|
-
import
|
|
4386
|
-
import {
|
|
4384
|
+
import { useContext as useContext15, useMemo as useMemo13 } from "react";
|
|
4385
|
+
import { createContext as createContext15 } from "react";
|
|
4386
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext17, useMemo as useMemo14, useState as useState4 } from "react";
|
|
4387
|
+
import { useContext as useContext16, useRef as useRef5 } from "react";
|
|
4387
4388
|
import { createContext as createContext16 } from "react";
|
|
4388
4389
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
4389
4390
|
import {
|
|
@@ -4394,70 +4395,70 @@ import {
|
|
|
4394
4395
|
useRef as useRef9,
|
|
4395
4396
|
useState as useState6
|
|
4396
4397
|
} from "react";
|
|
4397
|
-
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as
|
|
4398
|
-
import { useEffect as useEffect4, useMemo as
|
|
4398
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo17, useRef as useRef8 } from "react";
|
|
4399
|
+
import { useEffect as useEffect4, useMemo as useMemo16, useRef as useRef7 } from "react";
|
|
4399
4400
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4400
4401
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4401
|
-
import { useContext as
|
|
4402
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
4402
4403
|
import {
|
|
4403
4404
|
createContext as createContext17,
|
|
4404
4405
|
useCallback as useCallback8,
|
|
4405
4406
|
useImperativeHandle as useImperativeHandle3,
|
|
4406
4407
|
useLayoutEffect as useLayoutEffect3,
|
|
4407
|
-
useMemo as
|
|
4408
|
+
useMemo as useMemo18,
|
|
4408
4409
|
useRef as useRef10,
|
|
4409
4410
|
useState as useState7
|
|
4410
4411
|
} from "react";
|
|
4411
4412
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4412
|
-
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as
|
|
4413
|
-
import React17, { createContext as createContext18, useMemo as
|
|
4413
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext31 } from "react";
|
|
4414
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
4414
4415
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
4415
|
-
import { useContext as
|
|
4416
|
+
import { useContext as useContext20 } from "react";
|
|
4416
4417
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
4417
4418
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
4418
|
-
import { createContext as createContext20, useMemo as
|
|
4419
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
4419
4420
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4420
4421
|
import { useCallback as useCallback13 } from "react";
|
|
4421
4422
|
import React23, {
|
|
4422
4423
|
forwardRef as forwardRef5,
|
|
4423
|
-
useContext as
|
|
4424
|
+
useContext as useContext29,
|
|
4424
4425
|
useEffect as useEffect14,
|
|
4425
4426
|
useImperativeHandle as useImperativeHandle4,
|
|
4426
|
-
useMemo as
|
|
4427
|
+
useMemo as useMemo28,
|
|
4427
4428
|
useRef as useRef19,
|
|
4428
4429
|
useState as useState14
|
|
4429
4430
|
} from "react";
|
|
4430
|
-
import { useContext as
|
|
4431
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
4431
4432
|
import React20, {
|
|
4432
4433
|
createContext as createContext21,
|
|
4433
4434
|
createRef as createRef2,
|
|
4434
4435
|
useCallback as useCallback9,
|
|
4435
|
-
useContext as
|
|
4436
|
+
useContext as useContext21,
|
|
4436
4437
|
useEffect as useEffect7,
|
|
4437
|
-
useMemo as
|
|
4438
|
+
useMemo as useMemo22,
|
|
4438
4439
|
useRef as useRef12,
|
|
4439
4440
|
useState as useState10
|
|
4440
4441
|
} from "react";
|
|
4441
|
-
import { useMemo as
|
|
4442
|
+
import { useMemo as useMemo21, useRef as useRef11 } from "react";
|
|
4442
4443
|
import { jsx as jsx19, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4443
4444
|
import { useRef as useRef13 } from "react";
|
|
4444
|
-
import { useContext as
|
|
4445
|
-
import { useContext as
|
|
4445
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState11 } from "react";
|
|
4446
|
+
import { useContext as useContext23 } from "react";
|
|
4446
4447
|
import {
|
|
4447
4448
|
useCallback as useCallback12,
|
|
4448
|
-
useContext as
|
|
4449
|
+
useContext as useContext27,
|
|
4449
4450
|
useEffect as useEffect12,
|
|
4450
4451
|
useLayoutEffect as useLayoutEffect7,
|
|
4451
4452
|
useRef as useRef18
|
|
4452
4453
|
} from "react";
|
|
4453
|
-
import { useCallback as useCallback11, useMemo as
|
|
4454
|
-
import { useContext as
|
|
4454
|
+
import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef16 } from "react";
|
|
4455
|
+
import { useContext as useContext26, useMemo as useMemo25 } from "react";
|
|
4455
4456
|
import React21, {
|
|
4456
4457
|
useCallback as useCallback10,
|
|
4457
|
-
useContext as
|
|
4458
|
+
useContext as useContext25,
|
|
4458
4459
|
useEffect as useEffect9,
|
|
4459
4460
|
useLayoutEffect as useLayoutEffect6,
|
|
4460
|
-
useMemo as
|
|
4461
|
+
useMemo as useMemo24,
|
|
4461
4462
|
useRef as useRef15,
|
|
4462
4463
|
useState as useState12
|
|
4463
4464
|
} from "react";
|
|
@@ -4466,15 +4467,15 @@ import React22 from "react";
|
|
|
4466
4467
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
4467
4468
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
4468
4469
|
import { useEffect as useEffect13 } from "react";
|
|
4469
|
-
import { createContext as createContext22, useContext as
|
|
4470
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
|
|
4470
4471
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
4471
4472
|
import {
|
|
4472
4473
|
forwardRef as forwardRef6,
|
|
4473
|
-
useContext as
|
|
4474
|
+
useContext as useContext30,
|
|
4474
4475
|
useEffect as useEffect15,
|
|
4475
4476
|
useImperativeHandle as useImperativeHandle5,
|
|
4476
4477
|
useLayoutEffect as useLayoutEffect8,
|
|
4477
|
-
useMemo as
|
|
4478
|
+
useMemo as useMemo29,
|
|
4478
4479
|
useRef as useRef20
|
|
4479
4480
|
} from "react";
|
|
4480
4481
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
@@ -4484,7 +4485,7 @@ import {
|
|
|
4484
4485
|
useCallback as useCallback15,
|
|
4485
4486
|
useEffect as useEffect16,
|
|
4486
4487
|
useImperativeHandle as useImperativeHandle6,
|
|
4487
|
-
useMemo as
|
|
4488
|
+
useMemo as useMemo30,
|
|
4488
4489
|
useRef as useRef21,
|
|
4489
4490
|
useState as useState15
|
|
4490
4491
|
} from "react";
|
|
@@ -4493,19 +4494,19 @@ import {
|
|
|
4493
4494
|
createContext as createContext23,
|
|
4494
4495
|
forwardRef as forwardRef9,
|
|
4495
4496
|
useCallback as useCallback16,
|
|
4496
|
-
useContext as
|
|
4497
|
+
useContext as useContext32,
|
|
4497
4498
|
useLayoutEffect as useLayoutEffect9,
|
|
4498
|
-
useMemo as
|
|
4499
|
+
useMemo as useMemo31,
|
|
4499
4500
|
useRef as useRef22
|
|
4500
4501
|
} from "react";
|
|
4501
4502
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4502
4503
|
import {
|
|
4503
4504
|
forwardRef as forwardRef10,
|
|
4504
4505
|
useCallback as useCallback17,
|
|
4505
|
-
useContext as
|
|
4506
|
+
useContext as useContext33,
|
|
4506
4507
|
useImperativeHandle as useImperativeHandle7,
|
|
4507
4508
|
useLayoutEffect as useLayoutEffect10,
|
|
4508
|
-
useMemo as
|
|
4509
|
+
useMemo as useMemo32,
|
|
4509
4510
|
useRef as useRef23,
|
|
4510
4511
|
useState as useState16
|
|
4511
4512
|
} from "react";
|
|
@@ -4514,7 +4515,7 @@ import { forwardRef as forwardRef11, useCallback as useCallback18, useState as u
|
|
|
4514
4515
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
4515
4516
|
import {
|
|
4516
4517
|
useCallback as useCallback19,
|
|
4517
|
-
useContext as
|
|
4518
|
+
useContext as useContext34,
|
|
4518
4519
|
useLayoutEffect as useLayoutEffect11,
|
|
4519
4520
|
useRef as useRef24,
|
|
4520
4521
|
useState as useState18
|
|
@@ -4527,59 +4528,59 @@ import React31 from "react";
|
|
|
4527
4528
|
import {
|
|
4528
4529
|
useCallback as useCallback21,
|
|
4529
4530
|
useImperativeHandle as useImperativeHandle8,
|
|
4530
|
-
useMemo as
|
|
4531
|
+
useMemo as useMemo33,
|
|
4531
4532
|
useRef as useRef26,
|
|
4532
4533
|
useState as useState19
|
|
4533
4534
|
} from "react";
|
|
4534
4535
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4535
4536
|
import React32 from "react";
|
|
4536
|
-
import { useMemo as
|
|
4537
|
-
import { createContext as createContext24, useContext as
|
|
4537
|
+
import { useMemo as useMemo35 } from "react";
|
|
4538
|
+
import { createContext as createContext24, useContext as useContext35, useMemo as useMemo34 } from "react";
|
|
4538
4539
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4539
4540
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
4540
4541
|
import React34 from "react";
|
|
4541
4542
|
import React35, { createContext as createContext25 } from "react";
|
|
4542
|
-
import React36, { useContext as
|
|
4543
|
+
import React36, { useContext as useContext36 } from "react";
|
|
4543
4544
|
import { useCallback as useCallback24 } from "react";
|
|
4544
4545
|
import {
|
|
4545
4546
|
useCallback as useCallback22,
|
|
4546
|
-
useContext as
|
|
4547
|
+
useContext as useContext37,
|
|
4547
4548
|
useEffect as useEffect17,
|
|
4548
4549
|
useLayoutEffect as useLayoutEffect12,
|
|
4549
|
-
useMemo as
|
|
4550
|
+
useMemo as useMemo36,
|
|
4550
4551
|
useState as useState20
|
|
4551
4552
|
} from "react";
|
|
4552
4553
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4553
4554
|
import React38, {
|
|
4554
4555
|
forwardRef as forwardRef13,
|
|
4555
4556
|
useCallback as useCallback23,
|
|
4556
|
-
useContext as
|
|
4557
|
+
useContext as useContext38,
|
|
4557
4558
|
useEffect as useEffect19,
|
|
4558
4559
|
useImperativeHandle as useImperativeHandle9,
|
|
4559
|
-
useMemo as
|
|
4560
|
+
useMemo as useMemo37,
|
|
4560
4561
|
useRef as useRef27,
|
|
4561
4562
|
useState as useState21
|
|
4562
4563
|
} from "react";
|
|
4563
4564
|
import { useEffect as useEffect18 } from "react";
|
|
4564
4565
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4565
4566
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4566
|
-
import React40, { useMemo as
|
|
4567
|
+
import React40, { useMemo as useMemo38 } from "react";
|
|
4567
4568
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4568
4569
|
import React42, {
|
|
4569
4570
|
forwardRef as forwardRef14,
|
|
4570
|
-
useMemo as
|
|
4571
|
+
useMemo as useMemo39
|
|
4571
4572
|
} from "react";
|
|
4572
4573
|
import React41 from "react";
|
|
4573
4574
|
import { jsx as jsx37, jsxs as jsxs32, Fragment } from "react/jsx-runtime";
|
|
4574
4575
|
import React43 from "react";
|
|
4575
|
-
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
|
|
4576
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext40 } from "react";
|
|
4576
4577
|
import {
|
|
4577
4578
|
forwardRef as forwardRef15,
|
|
4578
|
-
useContext as
|
|
4579
|
+
useContext as useContext39,
|
|
4579
4580
|
useEffect as useEffect20,
|
|
4580
4581
|
useImperativeHandle as useImperativeHandle10,
|
|
4581
4582
|
useLayoutEffect as useLayoutEffect13,
|
|
4582
|
-
useMemo as
|
|
4583
|
+
useMemo as useMemo40,
|
|
4583
4584
|
useRef as useRef28
|
|
4584
4585
|
} from "react";
|
|
4585
4586
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
@@ -5770,7 +5771,7 @@ var getSingleChildComponent = (children) => {
|
|
|
5770
5771
|
}
|
|
5771
5772
|
return child.type;
|
|
5772
5773
|
};
|
|
5773
|
-
var VERSION = "4.0.
|
|
5774
|
+
var VERSION = "4.0.495";
|
|
5774
5775
|
var checkMultipleRemotionVersions = () => {
|
|
5775
5776
|
if (typeof globalThis === "undefined") {
|
|
5776
5777
|
return;
|
|
@@ -6263,15 +6264,19 @@ var premountSchema = {
|
|
|
6263
6264
|
description: "Premount For",
|
|
6264
6265
|
min: 0,
|
|
6265
6266
|
step: 1,
|
|
6266
|
-
hiddenFromList: false
|
|
6267
|
+
hiddenFromList: false,
|
|
6268
|
+
keyframable: false
|
|
6267
6269
|
},
|
|
6268
6270
|
postmountFor: {
|
|
6269
6271
|
type: "number",
|
|
6270
6272
|
default: 0,
|
|
6271
6273
|
min: 0,
|
|
6272
6274
|
step: 1,
|
|
6273
|
-
hiddenFromList: true
|
|
6274
|
-
|
|
6275
|
+
hiddenFromList: true,
|
|
6276
|
+
keyframable: false
|
|
6277
|
+
}
|
|
6278
|
+
};
|
|
6279
|
+
var premountStyleSchema = {
|
|
6275
6280
|
styleWhilePremounted: {
|
|
6276
6281
|
type: "hidden"
|
|
6277
6282
|
},
|
|
@@ -6279,10 +6284,13 @@ var premountSchema = {
|
|
|
6279
6284
|
type: "hidden"
|
|
6280
6285
|
}
|
|
6281
6286
|
};
|
|
6282
|
-
var sequencePremountSchema =
|
|
6287
|
+
var sequencePremountSchema = {
|
|
6288
|
+
...premountSchema,
|
|
6289
|
+
...premountStyleSchema
|
|
6290
|
+
};
|
|
6283
6291
|
var sequenceStyleSchema = {
|
|
6284
6292
|
...transformSchema,
|
|
6285
|
-
...
|
|
6293
|
+
...sequencePremountSchema
|
|
6286
6294
|
};
|
|
6287
6295
|
var hiddenField = {
|
|
6288
6296
|
type: "boolean",
|
|
@@ -6367,9 +6375,6 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6367
6375
|
default: "none"
|
|
6368
6376
|
}
|
|
6369
6377
|
};
|
|
6370
|
-
var PremountContext = createContext14({
|
|
6371
|
-
premountFramesRemaining: 0
|
|
6372
|
-
});
|
|
6373
6378
|
var SequenceManager = React12.createContext({
|
|
6374
6379
|
registerSequence: () => {
|
|
6375
6380
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -6549,7 +6554,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
6549
6554
|
})
|
|
6550
6555
|
});
|
|
6551
6556
|
};
|
|
6552
|
-
var IsInsideSeriesContext =
|
|
6557
|
+
var IsInsideSeriesContext = createContext14(false);
|
|
6553
6558
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
6554
6559
|
return /* @__PURE__ */ jsx11(IsInsideSeriesContext.Provider, {
|
|
6555
6560
|
value: true,
|
|
@@ -6568,7 +6573,61 @@ var useRequireToBeInsideSeries = () => {
|
|
|
6568
6573
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6569
6574
|
}
|
|
6570
6575
|
};
|
|
6576
|
+
var PremountContext = createContext15({
|
|
6577
|
+
premountFramesRemaining: 0
|
|
6578
|
+
});
|
|
6571
6579
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
6580
|
+
var usePremounting = ({
|
|
6581
|
+
from,
|
|
6582
|
+
durationInFrames,
|
|
6583
|
+
premountFor,
|
|
6584
|
+
postmountFor,
|
|
6585
|
+
style,
|
|
6586
|
+
styleWhilePremounted,
|
|
6587
|
+
styleWhilePostmounted,
|
|
6588
|
+
hideWhilePremounted
|
|
6589
|
+
}) => {
|
|
6590
|
+
const parentPremountContext = useContext15(PremountContext);
|
|
6591
|
+
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
6592
|
+
const environment = useRemotionEnvironment();
|
|
6593
|
+
const { fps } = useVideoConfig();
|
|
6594
|
+
const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? premountFor ?? fps : premountFor ?? 0;
|
|
6595
|
+
const effectivePostmountFor = postmountFor ?? 0;
|
|
6596
|
+
const endThreshold = Math.ceil(from + durationInFrames - 1);
|
|
6597
|
+
const premountingActive = !environment.isRendering && frame < from && frame >= from - effectivePremountFor;
|
|
6598
|
+
const postmountingActive = !environment.isRendering && frame > endThreshold && frame <= endThreshold + effectivePostmountFor;
|
|
6599
|
+
const isPremountingOrPostmounting = premountingActive || postmountingActive;
|
|
6600
|
+
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
6601
|
+
const premountingStyle = useMemo13(() => {
|
|
6602
|
+
if (!isPremountingOrPostmounting) {
|
|
6603
|
+
return style;
|
|
6604
|
+
}
|
|
6605
|
+
return {
|
|
6606
|
+
...style,
|
|
6607
|
+
...hideWhilePremounted === "opacity" ? { opacity: 0 } : { display: "none" },
|
|
6608
|
+
pointerEvents: "none",
|
|
6609
|
+
...premountingActive ? styleWhilePremounted : {},
|
|
6610
|
+
...postmountingActive ? styleWhilePostmounted : {}
|
|
6611
|
+
};
|
|
6612
|
+
}, [
|
|
6613
|
+
isPremountingOrPostmounting,
|
|
6614
|
+
hideWhilePremounted,
|
|
6615
|
+
postmountingActive,
|
|
6616
|
+
premountingActive,
|
|
6617
|
+
style,
|
|
6618
|
+
styleWhilePostmounted,
|
|
6619
|
+
styleWhilePremounted
|
|
6620
|
+
]);
|
|
6621
|
+
return {
|
|
6622
|
+
effectivePremountFor,
|
|
6623
|
+
effectivePostmountFor,
|
|
6624
|
+
premountingActive,
|
|
6625
|
+
postmountingActive,
|
|
6626
|
+
isPremountingOrPostmounting,
|
|
6627
|
+
freezeFrame,
|
|
6628
|
+
premountingStyle
|
|
6629
|
+
};
|
|
6630
|
+
};
|
|
6572
6631
|
var deleteNestedKey = (obj, keysToRemove) => {
|
|
6573
6632
|
for (const key of keysToRemove) {
|
|
6574
6633
|
const parts = key.split(".");
|
|
@@ -8392,10 +8451,10 @@ var useMemoizedEffects = ({
|
|
|
8392
8451
|
overrideId
|
|
8393
8452
|
}) => {
|
|
8394
8453
|
const previousRef = useRef5(null);
|
|
8395
|
-
const { propStatuses } =
|
|
8396
|
-
const { getEffectDragOverrides } =
|
|
8454
|
+
const { propStatuses } = useContext16(VisualModePropStatusesContext);
|
|
8455
|
+
const { getEffectDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
8397
8456
|
const frame = useCurrentFrame();
|
|
8398
|
-
const { overrideIdToNodePathMappings } =
|
|
8457
|
+
const { overrideIdToNodePathMappings } = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
8399
8458
|
const previous = previousRef.current;
|
|
8400
8459
|
const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
|
|
8401
8460
|
const resolved = effects.map((descriptor, index) => {
|
|
@@ -8739,9 +8798,9 @@ var withInteractivitySchema = ({
|
|
|
8739
8798
|
ref
|
|
8740
8799
|
});
|
|
8741
8800
|
}
|
|
8742
|
-
const { propStatuses } =
|
|
8743
|
-
const { getDragOverrides } =
|
|
8744
|
-
const nodePathMapping =
|
|
8801
|
+
const { propStatuses } = useContext17(VisualModePropStatusesContext);
|
|
8802
|
+
const { getDragOverrides } = useContext17(VisualModeDragOverridesContext);
|
|
8803
|
+
const nodePathMapping = useContext17(OverrideIdsToNodePathsGettersContext);
|
|
8745
8804
|
const frame = useCurrentFrame();
|
|
8746
8805
|
if (props.controls) {
|
|
8747
8806
|
return React14.createElement(Component, {
|
|
@@ -8768,8 +8827,8 @@ var withInteractivitySchema = ({
|
|
|
8768
8827
|
key,
|
|
8769
8828
|
props
|
|
8770
8829
|
}));
|
|
8771
|
-
const currentRuntimeValueDotNotation =
|
|
8772
|
-
const controls =
|
|
8830
|
+
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
|
|
8831
|
+
const controls = useMemo14(() => {
|
|
8773
8832
|
return {
|
|
8774
8833
|
schema: schemaWithSequenceName,
|
|
8775
8834
|
currentRuntimeValueDotNotation,
|
|
@@ -8779,7 +8838,7 @@ var withInteractivitySchema = ({
|
|
|
8779
8838
|
componentName
|
|
8780
8839
|
};
|
|
8781
8840
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
8782
|
-
const { merged: valuesDotNotation, propsToDelete } =
|
|
8841
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
8783
8842
|
return computeEffectiveSchemaValuesDotNotation({
|
|
8784
8843
|
schema: schemaWithSequenceName,
|
|
8785
8844
|
currentValue: currentRuntimeValueDotNotation,
|
|
@@ -8837,7 +8896,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8837
8896
|
}, ref) => {
|
|
8838
8897
|
const { layout = "absolute-fill" } = other;
|
|
8839
8898
|
const [id] = useState5(() => String(Math.random()));
|
|
8840
|
-
const parentSequence =
|
|
8899
|
+
const parentSequence = useContext18(SequenceContext);
|
|
8841
8900
|
const { rootId } = useTimelineContext();
|
|
8842
8901
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
8843
8902
|
const nonce = useNonce();
|
|
@@ -8888,13 +8947,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8888
8947
|
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
|
|
8889
8948
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
|
|
8890
8949
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
8891
|
-
const { registerSequence, unregisterSequence } =
|
|
8950
|
+
const { registerSequence, unregisterSequence } = useContext18(SequenceManager);
|
|
8892
8951
|
const wrapperRefForOutline = useRef6(null);
|
|
8893
8952
|
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
8894
|
-
const premounting =
|
|
8953
|
+
const premounting = useMemo15(() => {
|
|
8895
8954
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
8896
8955
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
8897
|
-
const postmounting =
|
|
8956
|
+
const postmounting = useMemo15(() => {
|
|
8898
8957
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
8899
8958
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
8900
8959
|
const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
|
|
@@ -8902,7 +8961,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8902
8961
|
const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
|
|
8903
8962
|
const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
|
|
8904
8963
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
8905
|
-
const contextValue =
|
|
8964
|
+
const contextValue = useMemo15(() => {
|
|
8906
8965
|
return {
|
|
8907
8966
|
absoluteFrom,
|
|
8908
8967
|
cumulatedFrom,
|
|
@@ -8933,12 +8992,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8933
8992
|
postmountDisplay,
|
|
8934
8993
|
cumulatedNegativeFrom
|
|
8935
8994
|
]);
|
|
8936
|
-
const timelineClipName =
|
|
8995
|
+
const timelineClipName = useMemo15(() => {
|
|
8937
8996
|
return name ?? "";
|
|
8938
8997
|
}, [name]);
|
|
8939
8998
|
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
8940
8999
|
const env = useRemotionEnvironment();
|
|
8941
|
-
const isInsideSeries =
|
|
9000
|
+
const isInsideSeries = useContext18(IsInsideSeriesContext);
|
|
8942
9001
|
const inheritedStack = other?.stack ?? null;
|
|
8943
9002
|
const stackRef = useRef6(null);
|
|
8944
9003
|
stackRef.current = stack ?? inheritedStack;
|
|
@@ -9086,7 +9145,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
9086
9145
|
ref.current = node;
|
|
9087
9146
|
}
|
|
9088
9147
|
}, [ref]);
|
|
9089
|
-
const defaultStyle =
|
|
9148
|
+
const defaultStyle = useMemo15(() => {
|
|
9090
9149
|
return {
|
|
9091
9150
|
flexDirection: undefined,
|
|
9092
9151
|
...width ? { width } : {},
|
|
@@ -9112,8 +9171,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
9112
9171
|
};
|
|
9113
9172
|
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
9114
9173
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
9115
|
-
const parentPremountContext = useContext17(PremountContext);
|
|
9116
|
-
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
9117
9174
|
if (props.layout === "none") {
|
|
9118
9175
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
9119
9176
|
}
|
|
@@ -9127,34 +9184,30 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
9127
9184
|
styleWhilePostmounted,
|
|
9128
9185
|
...otherProps
|
|
9129
9186
|
} = props;
|
|
9130
|
-
const
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
9134
|
-
const isFreezingActive = premountingActive || postmountingActive;
|
|
9135
|
-
const style = useMemo14(() => {
|
|
9136
|
-
return {
|
|
9137
|
-
...passedStyle,
|
|
9138
|
-
opacity: premountingActive || postmountingActive ? 0 : passedStyle?.opacity,
|
|
9139
|
-
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
9140
|
-
...premountingActive ? styleWhilePremounted : {},
|
|
9141
|
-
...postmountingActive ? styleWhilePostmounted : {}
|
|
9142
|
-
};
|
|
9143
|
-
}, [
|
|
9144
|
-
passedStyle,
|
|
9145
|
-
premountingActive,
|
|
9187
|
+
const {
|
|
9188
|
+
freezeFrame,
|
|
9189
|
+
isPremountingOrPostmounting,
|
|
9146
9190
|
postmountingActive,
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9191
|
+
premountingActive,
|
|
9192
|
+
premountingStyle
|
|
9193
|
+
} = usePremounting({
|
|
9194
|
+
from,
|
|
9195
|
+
durationInFrames,
|
|
9196
|
+
premountFor,
|
|
9197
|
+
postmountFor,
|
|
9198
|
+
style: passedStyle ?? null,
|
|
9199
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
9200
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
9201
|
+
hideWhilePremounted: "opacity"
|
|
9202
|
+
});
|
|
9150
9203
|
return /* @__PURE__ */ jsx12(Freeze, {
|
|
9151
9204
|
frame: freezeFrame,
|
|
9152
|
-
active:
|
|
9205
|
+
active: isPremountingOrPostmounting,
|
|
9153
9206
|
children: /* @__PURE__ */ jsx12(SequenceInner, {
|
|
9154
9207
|
ref,
|
|
9155
9208
|
from,
|
|
9156
9209
|
durationInFrames,
|
|
9157
|
-
style,
|
|
9210
|
+
style: premountingStyle ?? undefined,
|
|
9158
9211
|
_remotionInternalPremountDisplay: premountFor,
|
|
9159
9212
|
_remotionInternalPostmountDisplay: postmountFor,
|
|
9160
9213
|
_remotionInternalIsPremounting: premountingActive,
|
|
@@ -9490,7 +9543,7 @@ var useEffectChainState = () => {
|
|
|
9490
9543
|
}
|
|
9491
9544
|
};
|
|
9492
9545
|
}, []);
|
|
9493
|
-
return
|
|
9546
|
+
return useMemo16(() => ({
|
|
9494
9547
|
get: (width, height) => {
|
|
9495
9548
|
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
9496
9549
|
if (chainStateRef.current) {
|
|
@@ -9506,7 +9559,7 @@ var useEffectChainState = () => {
|
|
|
9506
9559
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
9507
9560
|
const canvasRef = useRef8(null);
|
|
9508
9561
|
const chainState = useEffectChainState();
|
|
9509
|
-
const sourceCanvas =
|
|
9562
|
+
const sourceCanvas = useMemo17(() => {
|
|
9510
9563
|
if (typeof document === "undefined") {
|
|
9511
9564
|
return null;
|
|
9512
9565
|
}
|
|
@@ -10063,7 +10116,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
10063
10116
|
};
|
|
10064
10117
|
}
|
|
10065
10118
|
}, []);
|
|
10066
|
-
const contextValue =
|
|
10119
|
+
const contextValue = useMemo18(() => {
|
|
10067
10120
|
return {
|
|
10068
10121
|
registerRenderAsset,
|
|
10069
10122
|
unregisterRenderAsset,
|
|
@@ -10077,7 +10130,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
10077
10130
|
};
|
|
10078
10131
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
10079
10132
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
10080
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
10133
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
10081
10134
|
const env = useRemotionEnvironment();
|
|
10082
10135
|
const frame = useCurrentFrame();
|
|
10083
10136
|
const [id] = useState8(() => {
|
|
@@ -10192,14 +10245,14 @@ var Loop = ({
|
|
|
10192
10245
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
10193
10246
|
const start = iteration * durationInFrames;
|
|
10194
10247
|
const from = Math.min(start, maxFrame);
|
|
10195
|
-
const loopDisplay =
|
|
10248
|
+
const loopDisplay = useMemo19(() => {
|
|
10196
10249
|
return {
|
|
10197
10250
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
10198
10251
|
startOffset: -from,
|
|
10199
10252
|
durationInFrames
|
|
10200
10253
|
};
|
|
10201
10254
|
}, [compDuration, durationInFrames, from, times]);
|
|
10202
|
-
const loopContext =
|
|
10255
|
+
const loopContext = useMemo19(() => {
|
|
10203
10256
|
return {
|
|
10204
10257
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
10205
10258
|
durationInFrames
|
|
@@ -10268,7 +10321,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
10268
10321
|
return src.slice(0, hashIndex);
|
|
10269
10322
|
};
|
|
10270
10323
|
var usePreload = (src) => {
|
|
10271
|
-
const preloads2 =
|
|
10324
|
+
const preloads2 = useContext20(PreloadContext);
|
|
10272
10325
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
10273
10326
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
10274
10327
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -10571,7 +10624,7 @@ var DurationsContext = createContext20({
|
|
|
10571
10624
|
});
|
|
10572
10625
|
var DurationsContextProvider = ({ children }) => {
|
|
10573
10626
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
10574
|
-
const value =
|
|
10627
|
+
const value = useMemo20(() => {
|
|
10575
10628
|
return {
|
|
10576
10629
|
durations,
|
|
10577
10630
|
setDurations
|
|
@@ -10710,7 +10763,7 @@ var useSingletonAudioContext = ({
|
|
|
10710
10763
|
if (sampleRate !== initialSampleRate.current) {
|
|
10711
10764
|
throw new Error(`Changing the AudioContext sample rate dynamically is not supported. The sample rate was initialized with ${initialSampleRate.current} Hz, but ${sampleRate} Hz was passed later.`);
|
|
10712
10765
|
}
|
|
10713
|
-
const context =
|
|
10766
|
+
const context = useMemo21(() => {
|
|
10714
10767
|
if (env.isRendering) {
|
|
10715
10768
|
return null;
|
|
10716
10769
|
}
|
|
@@ -10844,9 +10897,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10844
10897
|
});
|
|
10845
10898
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
10846
10899
|
const isResuming = useRef12(null);
|
|
10847
|
-
const audioSyncAnchor =
|
|
10900
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
10848
10901
|
const audioSyncAnchorListeners = useRef12([]);
|
|
10849
|
-
const audioSyncAnchorEmitter =
|
|
10902
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
10850
10903
|
return {
|
|
10851
10904
|
dispatch: (event) => {
|
|
10852
10905
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -10866,7 +10919,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10866
10919
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
10867
10920
|
nodesToResume.current.delete(node);
|
|
10868
10921
|
}, []);
|
|
10869
|
-
const scheduleAudioNode =
|
|
10922
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
10870
10923
|
return ({
|
|
10871
10924
|
node,
|
|
10872
10925
|
mediaTimestamp,
|
|
@@ -10958,7 +11011,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10958
11011
|
audioContextIsPlayingEventually.current = false;
|
|
10959
11012
|
return ctxAndGain.suspend();
|
|
10960
11013
|
}, [ctxAndGain]);
|
|
10961
|
-
const audioContextValue =
|
|
11014
|
+
const audioContextValue = useMemo22(() => {
|
|
10962
11015
|
return {
|
|
10963
11016
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
10964
11017
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -10995,10 +11048,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10995
11048
|
const logLevel = useLogLevel();
|
|
10996
11049
|
const mountTime = useMountTime();
|
|
10997
11050
|
const env = useRemotionEnvironment();
|
|
10998
|
-
const audioCtx =
|
|
11051
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
10999
11052
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
11000
11053
|
const resume = audioCtx?.resume;
|
|
11001
|
-
const refs =
|
|
11054
|
+
const refs = useMemo22(() => {
|
|
11002
11055
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
11003
11056
|
const ref = createRef2();
|
|
11004
11057
|
return {
|
|
@@ -11137,7 +11190,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
11137
11190
|
});
|
|
11138
11191
|
resume?.();
|
|
11139
11192
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
11140
|
-
const audioTagsValue =
|
|
11193
|
+
const audioTagsValue = useMemo22(() => {
|
|
11141
11194
|
return {
|
|
11142
11195
|
registerAudio,
|
|
11143
11196
|
unregisterAudio,
|
|
@@ -11152,7 +11205,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
11152
11205
|
unregisterAudio,
|
|
11153
11206
|
updateAudio
|
|
11154
11207
|
]);
|
|
11155
|
-
const sharedAudioTagElements =
|
|
11208
|
+
const sharedAudioTagElements = useMemo22(() => {
|
|
11156
11209
|
return refs.map(({ id, ref }) => {
|
|
11157
11210
|
return /* @__PURE__ */ jsx19("audio", {
|
|
11158
11211
|
ref,
|
|
@@ -11175,8 +11228,8 @@ var useSharedAudio = ({
|
|
|
11175
11228
|
premounting,
|
|
11176
11229
|
postmounting
|
|
11177
11230
|
}) => {
|
|
11178
|
-
const audioCtx =
|
|
11179
|
-
const tagsCtx =
|
|
11231
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
11232
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
11180
11233
|
const [elem] = useState10(() => {
|
|
11181
11234
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
11182
11235
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -11355,7 +11408,7 @@ var useVolume = ({
|
|
|
11355
11408
|
const audioStuffRef = useRef14(null);
|
|
11356
11409
|
const currentVolumeRef = useRef14(volume);
|
|
11357
11410
|
currentVolumeRef.current = volume;
|
|
11358
|
-
const sharedAudioContext =
|
|
11411
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
11359
11412
|
if (!sharedAudioContext) {
|
|
11360
11413
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
11361
11414
|
}
|
|
@@ -11420,7 +11473,7 @@ var useVolume = ({
|
|
|
11420
11473
|
return audioStuffRef;
|
|
11421
11474
|
};
|
|
11422
11475
|
var useMediaStartsAt = () => {
|
|
11423
|
-
const parentSequence =
|
|
11476
|
+
const parentSequence = useContext23(SequenceContext);
|
|
11424
11477
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
11425
11478
|
};
|
|
11426
11479
|
var useFrameForVolumeProp = (behavior) => {
|
|
@@ -11509,7 +11562,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11509
11562
|
if (!src) {
|
|
11510
11563
|
throw new Error("No src passed");
|
|
11511
11564
|
}
|
|
11512
|
-
const parentSequence =
|
|
11565
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11513
11566
|
const [initialVolume] = useState11(() => volume);
|
|
11514
11567
|
const duration = getTimelineDuration({
|
|
11515
11568
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -11519,7 +11572,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11519
11572
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
11520
11573
|
loop
|
|
11521
11574
|
});
|
|
11522
|
-
const volumes =
|
|
11575
|
+
const volumes = useMemo23(() => {
|
|
11523
11576
|
if (typeof volume === "number") {
|
|
11524
11577
|
return volume;
|
|
11525
11578
|
}
|
|
@@ -11540,7 +11593,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11540
11593
|
const nonce = useNonce();
|
|
11541
11594
|
const { rootId } = useTimelineContext();
|
|
11542
11595
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
11543
|
-
const memoizedResult =
|
|
11596
|
+
const memoizedResult = useMemo23(() => {
|
|
11544
11597
|
return {
|
|
11545
11598
|
volumes,
|
|
11546
11599
|
duration,
|
|
@@ -11581,9 +11634,9 @@ var useMediaInTimeline = ({
|
|
|
11581
11634
|
documentationLink,
|
|
11582
11635
|
refForOutline
|
|
11583
11636
|
}) => {
|
|
11584
|
-
const parentSequence =
|
|
11637
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11585
11638
|
const startsAt = useMediaStartsAt();
|
|
11586
|
-
const { registerSequence, unregisterSequence } =
|
|
11639
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
11587
11640
|
const { durationInFrames } = useVideoConfig();
|
|
11588
11641
|
const mediaStartsAt = useMediaStartsAt();
|
|
11589
11642
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -11748,13 +11801,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11748
11801
|
}
|
|
11749
11802
|
}, [blocks]);
|
|
11750
11803
|
}
|
|
11751
|
-
return
|
|
11804
|
+
return useMemo24(() => {
|
|
11752
11805
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11753
11806
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11754
11807
|
};
|
|
11755
11808
|
var BufferingContextReact = React21.createContext(null);
|
|
11756
11809
|
var BufferingProvider = ({ children }) => {
|
|
11757
|
-
const { logLevel, mountTime } =
|
|
11810
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
11758
11811
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
11759
11812
|
return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
|
|
11760
11813
|
value: bufferManager,
|
|
@@ -11780,10 +11833,10 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
11780
11833
|
return isBuffering;
|
|
11781
11834
|
};
|
|
11782
11835
|
var useBufferState = () => {
|
|
11783
|
-
const buffer =
|
|
11836
|
+
const buffer = useContext26(BufferingContextReact);
|
|
11784
11837
|
const logLevel = useLogLevel();
|
|
11785
11838
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
11786
|
-
return
|
|
11839
|
+
return useMemo25(() => ({
|
|
11787
11840
|
delayPlayback: () => {
|
|
11788
11841
|
if (!addBlock) {
|
|
11789
11842
|
throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");
|
|
@@ -11891,7 +11944,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
11891
11944
|
onVariableFpsVideoDetected,
|
|
11892
11945
|
pauseWhenBuffering
|
|
11893
11946
|
]);
|
|
11894
|
-
return
|
|
11947
|
+
return useMemo26(() => {
|
|
11895
11948
|
return {
|
|
11896
11949
|
isBuffering: () => bufferingRef.current,
|
|
11897
11950
|
bufferUntilFirstFrame
|
|
@@ -12265,7 +12318,7 @@ var useMediaPlayback = ({
|
|
|
12265
12318
|
const frame = useCurrentFrame();
|
|
12266
12319
|
const absoluteFrame = useTimelinePosition();
|
|
12267
12320
|
const [playing] = usePlayingState();
|
|
12268
|
-
const buffering =
|
|
12321
|
+
const buffering = useContext27(BufferingContextReact);
|
|
12269
12322
|
const { fps } = useVideoConfig();
|
|
12270
12323
|
const mediaStartsAt = useMediaStartsAt();
|
|
12271
12324
|
const lastSeekDueToShift = useRef18(null);
|
|
@@ -12560,16 +12613,16 @@ var SetMediaVolumeContext = createContext22({
|
|
|
12560
12613
|
}
|
|
12561
12614
|
});
|
|
12562
12615
|
var useMediaVolumeState = () => {
|
|
12563
|
-
const { mediaVolume } =
|
|
12564
|
-
const { setMediaVolume } =
|
|
12565
|
-
return
|
|
12616
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
12617
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
12618
|
+
return useMemo27(() => {
|
|
12566
12619
|
return [mediaVolume, setMediaVolume];
|
|
12567
12620
|
}, [mediaVolume, setMediaVolume]);
|
|
12568
12621
|
};
|
|
12569
12622
|
var usePlayerMutedState = () => {
|
|
12570
|
-
const { playerMuted } =
|
|
12571
|
-
const { setPlayerMuted } =
|
|
12572
|
-
return
|
|
12623
|
+
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
12624
|
+
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
12625
|
+
return useMemo27(() => {
|
|
12573
12626
|
return [playerMuted, setPlayerMuted];
|
|
12574
12627
|
}, [playerMuted, setPlayerMuted]);
|
|
12575
12628
|
};
|
|
@@ -12623,7 +12676,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12623
12676
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
12624
12677
|
}
|
|
12625
12678
|
const preloadedSrc = usePreload(src);
|
|
12626
|
-
const sequenceContext =
|
|
12679
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
12627
12680
|
const [timelineId] = useState14(() => String(Math.random()));
|
|
12628
12681
|
const userPreferredVolume = evaluateVolume({
|
|
12629
12682
|
frame: volumePropFrame,
|
|
@@ -12636,7 +12689,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12636
12689
|
requestsVideoFrame: false,
|
|
12637
12690
|
isClientSideRendering: false
|
|
12638
12691
|
});
|
|
12639
|
-
const propsToPass =
|
|
12692
|
+
const propsToPass = useMemo28(() => {
|
|
12640
12693
|
return {
|
|
12641
12694
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
12642
12695
|
src: preloadedSrc,
|
|
@@ -12653,7 +12706,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12653
12706
|
userPreferredVolume,
|
|
12654
12707
|
crossOriginValue
|
|
12655
12708
|
]);
|
|
12656
|
-
const id =
|
|
12709
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
12657
12710
|
src,
|
|
12658
12711
|
sequenceContext?.relativeFrom,
|
|
12659
12712
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12783,10 +12836,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12783
12836
|
const absoluteFrame = useTimelinePosition();
|
|
12784
12837
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
12785
12838
|
const frame = useCurrentFrame();
|
|
12786
|
-
const sequenceContext =
|
|
12787
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12839
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
12840
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
12788
12841
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12789
|
-
const id =
|
|
12842
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12790
12843
|
props.src,
|
|
12791
12844
|
sequenceContext?.relativeFrom,
|
|
12792
12845
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12893,7 +12946,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12893
12946
|
};
|
|
12894
12947
|
var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
|
|
12895
12948
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
12896
|
-
const audioTagsContext =
|
|
12949
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
12897
12950
|
const propsWithFreeze = props;
|
|
12898
12951
|
const {
|
|
12899
12952
|
startFrom,
|
|
@@ -12917,7 +12970,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
12917
12970
|
if (typeof freeze !== "undefined") {
|
|
12918
12971
|
throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
|
|
12919
12972
|
}
|
|
12920
|
-
const { durations, setDurations } =
|
|
12973
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
12921
12974
|
if (typeof props.src !== "string") {
|
|
12922
12975
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
12923
12976
|
}
|
|
@@ -13079,7 +13132,7 @@ var SolidInner = ({
|
|
|
13079
13132
|
effects,
|
|
13080
13133
|
overrideId: overrideId ?? null
|
|
13081
13134
|
});
|
|
13082
|
-
const sourceCanvas =
|
|
13135
|
+
const sourceCanvas = useMemo30(() => {
|
|
13083
13136
|
if (typeof document === "undefined") {
|
|
13084
13137
|
return null;
|
|
13085
13138
|
}
|
|
@@ -13147,7 +13200,7 @@ var SolidInner = ({
|
|
|
13147
13200
|
cancelRender2,
|
|
13148
13201
|
memoizedEffects
|
|
13149
13202
|
]);
|
|
13150
|
-
const canvasStyle =
|
|
13203
|
+
const canvasStyle = useMemo30(() => {
|
|
13151
13204
|
return {
|
|
13152
13205
|
width,
|
|
13153
13206
|
height,
|
|
@@ -13296,7 +13349,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13296
13349
|
controls,
|
|
13297
13350
|
style
|
|
13298
13351
|
}, ref) => {
|
|
13299
|
-
const ancestor =
|
|
13352
|
+
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
13300
13353
|
assertHtmlInCanvasDimensions(width, height);
|
|
13301
13354
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
13302
13355
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
@@ -13515,20 +13568,20 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13515
13568
|
continueRender2(handle);
|
|
13516
13569
|
};
|
|
13517
13570
|
}, [width, height, continueRender2, canvasSizeKey]);
|
|
13518
|
-
const innerStyle =
|
|
13571
|
+
const innerStyle = useMemo31(() => {
|
|
13519
13572
|
return {
|
|
13520
13573
|
width,
|
|
13521
13574
|
height
|
|
13522
13575
|
};
|
|
13523
13576
|
}, [width, height]);
|
|
13524
|
-
const canvasStyle =
|
|
13577
|
+
const canvasStyle = useMemo31(() => {
|
|
13525
13578
|
return {
|
|
13526
13579
|
width,
|
|
13527
13580
|
height,
|
|
13528
13581
|
...style ?? {}
|
|
13529
13582
|
};
|
|
13530
13583
|
}, [height, style, width]);
|
|
13531
|
-
const ancestorValue =
|
|
13584
|
+
const ancestorValue = useMemo31(() => {
|
|
13532
13585
|
return {
|
|
13533
13586
|
requestParentPaint: () => {
|
|
13534
13587
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -13742,7 +13795,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13742
13795
|
effects,
|
|
13743
13796
|
overrideId: controls?.overrideId ?? null
|
|
13744
13797
|
});
|
|
13745
|
-
const sequenceContext =
|
|
13798
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
13746
13799
|
const pendingLoadDelayRef = useRef23(null);
|
|
13747
13800
|
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
13748
13801
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
@@ -13759,7 +13812,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13759
13812
|
continueRender2(pending.handle);
|
|
13760
13813
|
pendingLoadDelayRef.current = null;
|
|
13761
13814
|
}, [continueRender2]);
|
|
13762
|
-
const sourceCanvas =
|
|
13815
|
+
const sourceCanvas = useMemo32(() => {
|
|
13763
13816
|
if (typeof document === "undefined") {
|
|
13764
13817
|
return null;
|
|
13765
13818
|
}
|
|
@@ -14081,7 +14134,7 @@ var ImgContent = ({
|
|
|
14081
14134
|
const imageRef = useRef24(null);
|
|
14082
14135
|
const errors = useRef24({});
|
|
14083
14136
|
const { delayPlayback } = useBufferState();
|
|
14084
|
-
const sequenceContext =
|
|
14137
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
14085
14138
|
const [isLoading, setIsLoading] = useState18(false);
|
|
14086
14139
|
const _propsValid = true;
|
|
14087
14140
|
if (!_propsValid) {
|
|
@@ -14430,7 +14483,10 @@ var makeRemotionComponentIdentity = ({
|
|
|
14430
14483
|
};
|
|
14431
14484
|
var interactiveElementSchema = {
|
|
14432
14485
|
...baseSchema,
|
|
14433
|
-
...transformSchema
|
|
14486
|
+
...transformSchema
|
|
14487
|
+
};
|
|
14488
|
+
var interactiveTextElementSchema = {
|
|
14489
|
+
...interactiveElementSchema,
|
|
14434
14490
|
...textSchema,
|
|
14435
14491
|
...textContentSchema
|
|
14436
14492
|
};
|
|
@@ -14446,7 +14502,7 @@ var withSchema = (options) => {
|
|
|
14446
14502
|
addSequenceStackTraces(Wrapped);
|
|
14447
14503
|
return Wrapped;
|
|
14448
14504
|
};
|
|
14449
|
-
var makeInteractiveElement = (tag, displayName) => {
|
|
14505
|
+
var makeInteractiveElement = (tag, displayName, schema) => {
|
|
14450
14506
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
14451
14507
|
const {
|
|
14452
14508
|
durationInFrames,
|
|
@@ -14492,12 +14548,18 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14492
14548
|
packageName: "remotion",
|
|
14493
14549
|
componentName: displayName.slice(1, -1)
|
|
14494
14550
|
}),
|
|
14495
|
-
schema
|
|
14551
|
+
schema,
|
|
14496
14552
|
supportsEffects: false
|
|
14497
14553
|
});
|
|
14498
14554
|
Wrapped.displayName = displayName;
|
|
14499
14555
|
return Wrapped;
|
|
14500
14556
|
};
|
|
14557
|
+
var makeInteractiveTextElement = (tag, displayName) => {
|
|
14558
|
+
return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
|
|
14559
|
+
};
|
|
14560
|
+
var makeInteractiveNonTextElement = (tag, displayName) => {
|
|
14561
|
+
return makeInteractiveElement(tag, displayName, interactiveElementSchema);
|
|
14562
|
+
};
|
|
14501
14563
|
var Interactive = {
|
|
14502
14564
|
baseSchema,
|
|
14503
14565
|
transformSchema,
|
|
@@ -14506,41 +14568,41 @@ var Interactive = {
|
|
|
14506
14568
|
sequenceSchema,
|
|
14507
14569
|
withSchema,
|
|
14508
14570
|
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
14509
|
-
A:
|
|
14510
|
-
Article:
|
|
14511
|
-
Aside:
|
|
14512
|
-
Button:
|
|
14513
|
-
Circle:
|
|
14514
|
-
Code:
|
|
14515
|
-
Div:
|
|
14516
|
-
Ellipse:
|
|
14517
|
-
Em:
|
|
14518
|
-
Footer:
|
|
14519
|
-
G:
|
|
14520
|
-
H1:
|
|
14521
|
-
H2:
|
|
14522
|
-
H3:
|
|
14523
|
-
H4:
|
|
14524
|
-
H5:
|
|
14525
|
-
H6:
|
|
14526
|
-
Header:
|
|
14527
|
-
Label:
|
|
14528
|
-
Li:
|
|
14529
|
-
Line:
|
|
14530
|
-
Main:
|
|
14531
|
-
Nav:
|
|
14532
|
-
Ol:
|
|
14533
|
-
P:
|
|
14534
|
-
Path:
|
|
14535
|
-
Pre:
|
|
14536
|
-
Rect:
|
|
14537
|
-
Section:
|
|
14538
|
-
Small:
|
|
14539
|
-
Span:
|
|
14540
|
-
Strong:
|
|
14541
|
-
Svg:
|
|
14542
|
-
Text:
|
|
14543
|
-
Ul:
|
|
14571
|
+
A: makeInteractiveTextElement("a", "<Interactive.A>"),
|
|
14572
|
+
Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
|
|
14573
|
+
Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
|
|
14574
|
+
Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
|
|
14575
|
+
Circle: makeInteractiveNonTextElement("circle", "<Interactive.Circle>"),
|
|
14576
|
+
Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
|
|
14577
|
+
Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
|
|
14578
|
+
Ellipse: makeInteractiveNonTextElement("ellipse", "<Interactive.Ellipse>"),
|
|
14579
|
+
Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
|
|
14580
|
+
Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
|
|
14581
|
+
G: makeInteractiveNonTextElement("g", "<Interactive.G>"),
|
|
14582
|
+
H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
|
|
14583
|
+
H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
|
|
14584
|
+
H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
|
|
14585
|
+
H4: makeInteractiveTextElement("h4", "<Interactive.H4>"),
|
|
14586
|
+
H5: makeInteractiveTextElement("h5", "<Interactive.H5>"),
|
|
14587
|
+
H6: makeInteractiveTextElement("h6", "<Interactive.H6>"),
|
|
14588
|
+
Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
|
|
14589
|
+
Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
|
|
14590
|
+
Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
|
|
14591
|
+
Line: makeInteractiveNonTextElement("line", "<Interactive.Line>"),
|
|
14592
|
+
Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
|
|
14593
|
+
Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
|
|
14594
|
+
Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
|
|
14595
|
+
P: makeInteractiveTextElement("p", "<Interactive.P>"),
|
|
14596
|
+
Path: makeInteractiveNonTextElement("path", "<Interactive.Path>"),
|
|
14597
|
+
Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
|
|
14598
|
+
Rect: makeInteractiveNonTextElement("rect", "<Interactive.Rect>"),
|
|
14599
|
+
Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
|
|
14600
|
+
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
14601
|
+
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
14602
|
+
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
14603
|
+
Svg: makeInteractiveNonTextElement("svg", "<Interactive.Svg>"),
|
|
14604
|
+
Text: makeInteractiveTextElement("text", "<Interactive.Text>"),
|
|
14605
|
+
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
14544
14606
|
};
|
|
14545
14607
|
var compositionsRef = React31.createRef();
|
|
14546
14608
|
var CompositionManagerProvider = ({
|
|
@@ -14597,7 +14659,7 @@ var CompositionManagerProvider = ({
|
|
|
14597
14659
|
getCompositions: () => currentcompositionsRef.current
|
|
14598
14660
|
};
|
|
14599
14661
|
}, []);
|
|
14600
|
-
const compositionManagerSetters =
|
|
14662
|
+
const compositionManagerSetters = useMemo33(() => {
|
|
14601
14663
|
return {
|
|
14602
14664
|
registerComposition,
|
|
14603
14665
|
unregisterComposition,
|
|
@@ -14613,7 +14675,7 @@ var CompositionManagerProvider = ({
|
|
|
14613
14675
|
unregisterFolder,
|
|
14614
14676
|
onlyRenderComposition
|
|
14615
14677
|
]);
|
|
14616
|
-
const compositionManagerContextValue =
|
|
14678
|
+
const compositionManagerContextValue = useMemo33(() => {
|
|
14617
14679
|
return {
|
|
14618
14680
|
compositions,
|
|
14619
14681
|
folders,
|
|
@@ -14711,7 +14773,7 @@ var waitForRoot = (fn) => {
|
|
|
14711
14773
|
};
|
|
14712
14774
|
var MediaEnabledContext = createContext24(null);
|
|
14713
14775
|
var useVideoEnabled = () => {
|
|
14714
|
-
const context =
|
|
14776
|
+
const context = useContext35(MediaEnabledContext);
|
|
14715
14777
|
if (!context) {
|
|
14716
14778
|
return window.remotion_videoEnabled;
|
|
14717
14779
|
}
|
|
@@ -14721,7 +14783,7 @@ var useVideoEnabled = () => {
|
|
|
14721
14783
|
return context.videoEnabled;
|
|
14722
14784
|
};
|
|
14723
14785
|
var useAudioEnabled = () => {
|
|
14724
|
-
const context =
|
|
14786
|
+
const context = useContext35(MediaEnabledContext);
|
|
14725
14787
|
if (!context) {
|
|
14726
14788
|
return window.remotion_audioEnabled;
|
|
14727
14789
|
}
|
|
@@ -14735,7 +14797,7 @@ var MediaEnabledProvider = ({
|
|
|
14735
14797
|
videoEnabled,
|
|
14736
14798
|
audioEnabled
|
|
14737
14799
|
}) => {
|
|
14738
|
-
const value =
|
|
14800
|
+
const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
14739
14801
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
14740
14802
|
value,
|
|
14741
14803
|
children
|
|
@@ -14751,13 +14813,13 @@ var RemotionRootContexts = ({
|
|
|
14751
14813
|
audioEnabled,
|
|
14752
14814
|
frameState
|
|
14753
14815
|
}) => {
|
|
14754
|
-
const nonceContext =
|
|
14816
|
+
const nonceContext = useMemo35(() => {
|
|
14755
14817
|
let counter = 0;
|
|
14756
14818
|
return {
|
|
14757
14819
|
getNonce: () => counter++
|
|
14758
14820
|
};
|
|
14759
14821
|
}, []);
|
|
14760
|
-
const logging =
|
|
14822
|
+
const logging = useMemo35(() => {
|
|
14761
14823
|
return { logLevel, mountTime: Date.now() };
|
|
14762
14824
|
}, [logLevel]);
|
|
14763
14825
|
return /* @__PURE__ */ jsx322(LogLevelContext.Provider, {
|
|
@@ -15058,13 +15120,13 @@ var OffthreadVideoForRendering = ({
|
|
|
15058
15120
|
const frame = useCurrentFrame();
|
|
15059
15121
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
15060
15122
|
const videoConfig = useUnsafeVideoConfig();
|
|
15061
|
-
const sequenceContext =
|
|
15123
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
15062
15124
|
const mediaStartsAt = useMediaStartsAt();
|
|
15063
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
15125
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
15064
15126
|
if (!src) {
|
|
15065
15127
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
15066
15128
|
}
|
|
15067
|
-
const id =
|
|
15129
|
+
const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
15068
15130
|
src,
|
|
15069
15131
|
sequenceContext?.cumulatedFrom,
|
|
15070
15132
|
sequenceContext?.relativeFrom,
|
|
@@ -15119,14 +15181,14 @@ var OffthreadVideoForRendering = ({
|
|
|
15119
15181
|
sequenceContext?.cumulatedNegativeFrom,
|
|
15120
15182
|
audioStreamIndex
|
|
15121
15183
|
]);
|
|
15122
|
-
const currentTime =
|
|
15184
|
+
const currentTime = useMemo36(() => {
|
|
15123
15185
|
return getExpectedMediaFrameUncorrected({
|
|
15124
15186
|
frame,
|
|
15125
15187
|
playbackRate: playbackRate || 1,
|
|
15126
15188
|
startFrom: -mediaStartsAt
|
|
15127
15189
|
}) / videoConfig.fps;
|
|
15128
15190
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
15129
|
-
const actualSrc =
|
|
15191
|
+
const actualSrc = useMemo36(() => {
|
|
15130
15192
|
return getOffthreadVideoSource({
|
|
15131
15193
|
src,
|
|
15132
15194
|
currentTime,
|
|
@@ -15214,7 +15276,7 @@ var OffthreadVideoForRendering = ({
|
|
|
15214
15276
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
15215
15277
|
}
|
|
15216
15278
|
}, [imageSrc, onError]);
|
|
15217
|
-
const className =
|
|
15279
|
+
const className = useMemo36(() => {
|
|
15218
15280
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
15219
15281
|
}, [props2.className]);
|
|
15220
15282
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -15278,12 +15340,12 @@ class MediaPlaybackError extends Error {
|
|
|
15278
15340
|
}
|
|
15279
15341
|
}
|
|
15280
15342
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
15281
|
-
const context =
|
|
15343
|
+
const context = useContext38(SharedAudioContext);
|
|
15282
15344
|
if (!context) {
|
|
15283
15345
|
throw new Error("SharedAudioContext not found");
|
|
15284
15346
|
}
|
|
15285
15347
|
const videoRef = useRef27(null);
|
|
15286
|
-
const sharedSource =
|
|
15348
|
+
const sharedSource = useMemo37(() => {
|
|
15287
15349
|
if (!context.audioContext) {
|
|
15288
15350
|
return null;
|
|
15289
15351
|
}
|
|
@@ -15335,7 +15397,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15335
15397
|
}
|
|
15336
15398
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
15337
15399
|
const { fps, durationInFrames } = useVideoConfig();
|
|
15338
|
-
const parentSequence =
|
|
15400
|
+
const parentSequence = useContext38(SequenceContext);
|
|
15339
15401
|
const logLevel = useLogLevel();
|
|
15340
15402
|
const mountTime = useMountTime();
|
|
15341
15403
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -15486,7 +15548,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15486
15548
|
current.preload = "auto";
|
|
15487
15549
|
}
|
|
15488
15550
|
}, []);
|
|
15489
|
-
const actualStyle =
|
|
15551
|
+
const actualStyle = useMemo37(() => {
|
|
15490
15552
|
return {
|
|
15491
15553
|
...style
|
|
15492
15554
|
};
|
|
@@ -15682,7 +15744,7 @@ function useRemotionContexts() {
|
|
|
15682
15744
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15683
15745
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15684
15746
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15685
|
-
return
|
|
15747
|
+
return useMemo38(() => ({
|
|
15686
15748
|
compositionManagerCtx,
|
|
15687
15749
|
timelineContext,
|
|
15688
15750
|
setTimelineContext,
|
|
@@ -15793,6 +15855,7 @@ var Internals = {
|
|
|
15793
15855
|
textSchema,
|
|
15794
15856
|
transformSchema,
|
|
15795
15857
|
premountSchema,
|
|
15858
|
+
premountStyleSchema,
|
|
15796
15859
|
flattenActiveSchema,
|
|
15797
15860
|
getFlatSchemaWithAllKeys,
|
|
15798
15861
|
RemotionRootContexts,
|
|
@@ -15806,6 +15869,7 @@ var Internals = {
|
|
|
15806
15869
|
truthy,
|
|
15807
15870
|
SequenceContext,
|
|
15808
15871
|
PremountContext,
|
|
15872
|
+
usePremounting,
|
|
15809
15873
|
useRemotionContexts,
|
|
15810
15874
|
RemotionContextProvider,
|
|
15811
15875
|
CSSUtils: exports_default_css,
|
|
@@ -15981,7 +16045,7 @@ var validateSeriesSequenceProps = ({
|
|
|
15981
16045
|
return offset;
|
|
15982
16046
|
};
|
|
15983
16047
|
var SeriesInner = (props2) => {
|
|
15984
|
-
const childrenValue =
|
|
16048
|
+
const childrenValue = useMemo39(() => {
|
|
15985
16049
|
const flattenedChildren = flattenChildren(props2.children);
|
|
15986
16050
|
const renderChildren = (i, startFrame) => {
|
|
15987
16051
|
if (i === flattenedChildren.length) {
|
|
@@ -16310,14 +16374,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
16310
16374
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
16311
16375
|
const videoConfig = useUnsafeVideoConfig();
|
|
16312
16376
|
const videoRef = useRef28(null);
|
|
16313
|
-
const sequenceContext =
|
|
16377
|
+
const sequenceContext = useContext39(SequenceContext);
|
|
16314
16378
|
const mediaStartsAt = useMediaStartsAt();
|
|
16315
16379
|
const environment = useRemotionEnvironment();
|
|
16316
16380
|
const logLevel = useLogLevel();
|
|
16317
16381
|
const mountTime = useMountTime();
|
|
16318
16382
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
16319
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
16320
|
-
const id =
|
|
16383
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
16384
|
+
const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
16321
16385
|
props2.src,
|
|
16322
16386
|
sequenceContext?.cumulatedFrom,
|
|
16323
16387
|
sequenceContext?.relativeFrom,
|
|
@@ -16528,7 +16592,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
16528
16592
|
if (environment.isClientSideRendering) {
|
|
16529
16593
|
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");
|
|
16530
16594
|
}
|
|
16531
|
-
const { durations, setDurations } =
|
|
16595
|
+
const { durations, setDurations } = useContext40(DurationsContext);
|
|
16532
16596
|
if (typeof ref === "string") {
|
|
16533
16597
|
throw new Error("string refs are not supported");
|
|
16534
16598
|
}
|
|
@@ -16647,7 +16711,7 @@ addSequenceStackTraces(Composition);
|
|
|
16647
16711
|
addSequenceStackTraces(Folder);
|
|
16648
16712
|
|
|
16649
16713
|
// ../shapes/dist/esm/index.mjs
|
|
16650
|
-
import React, { useCallback as useCallback26, useMemo as
|
|
16714
|
+
import React, { useCallback as useCallback26, useMemo as useMemo41, useRef as useRef29 } from "react";
|
|
16651
16715
|
import { version } from "react-dom";
|
|
16652
16716
|
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
16653
16717
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -16829,13 +16893,13 @@ var RenderSvg = ({
|
|
|
16829
16893
|
stack,
|
|
16830
16894
|
...props
|
|
16831
16895
|
}) => {
|
|
16832
|
-
const actualStyle =
|
|
16896
|
+
const actualStyle = useMemo41(() => {
|
|
16833
16897
|
return {
|
|
16834
16898
|
overflow: "visible",
|
|
16835
16899
|
...style ?? {}
|
|
16836
16900
|
};
|
|
16837
16901
|
}, [style]);
|
|
16838
|
-
const actualPathStyle =
|
|
16902
|
+
const actualPathStyle = useMemo41(() => {
|
|
16839
16903
|
return {
|
|
16840
16904
|
transformBox: "fill-box",
|
|
16841
16905
|
...pathStyle ?? {}
|
|
@@ -19814,7 +19878,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19814
19878
|
progress: 0,
|
|
19815
19879
|
isActive: false
|
|
19816
19880
|
});
|
|
19817
|
-
const eventTarget =
|
|
19881
|
+
const eventTarget = useMemo43(() => new EventTarget, []);
|
|
19818
19882
|
useEffect21(() => {
|
|
19819
19883
|
if (disabled) {
|
|
19820
19884
|
eventTarget.dispatchEvent(new Event("disabled"));
|