@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/templates.js
CHANGED
|
@@ -1378,7 +1378,7 @@ var getDefaultConfig = () => {
|
|
|
1378
1378
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1379
1379
|
|
|
1380
1380
|
// ../design/dist/esm/index.mjs
|
|
1381
|
-
import React33, { useEffect as useEffect21, useMemo as
|
|
1381
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo43, useState as useState23 } from "react";
|
|
1382
1382
|
|
|
1383
1383
|
// ../paths/dist/esm/index.mjs
|
|
1384
1384
|
var cutLInstruction = ({
|
|
@@ -4175,9 +4175,9 @@ import React9 from "react";
|
|
|
4175
4175
|
import {
|
|
4176
4176
|
forwardRef as forwardRef3,
|
|
4177
4177
|
useCallback as useCallback6,
|
|
4178
|
-
useContext as
|
|
4178
|
+
useContext as useContext18,
|
|
4179
4179
|
useEffect as useEffect3,
|
|
4180
|
-
useMemo as
|
|
4180
|
+
useMemo as useMemo15,
|
|
4181
4181
|
useRef as useRef6,
|
|
4182
4182
|
useState as useState5
|
|
4183
4183
|
} from "react";
|
|
@@ -4196,13 +4196,14 @@ import { useContext as useContext11 } from "react";
|
|
|
4196
4196
|
import { useContext as useContext13 } from "react";
|
|
4197
4197
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
4198
4198
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4199
|
-
import { createContext as createContext14 } from "react";
|
|
4200
4199
|
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
4201
4200
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4202
|
-
import React13, { createContext as
|
|
4201
|
+
import React13, { createContext as createContext14 } from "react";
|
|
4203
4202
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4204
|
-
import
|
|
4205
|
-
import {
|
|
4203
|
+
import { useContext as useContext15, useMemo as useMemo13 } from "react";
|
|
4204
|
+
import { createContext as createContext15 } from "react";
|
|
4205
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext17, useMemo as useMemo14, useState as useState4 } from "react";
|
|
4206
|
+
import { useContext as useContext16, useRef as useRef5 } from "react";
|
|
4206
4207
|
import { createContext as createContext16 } from "react";
|
|
4207
4208
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
4208
4209
|
import {
|
|
@@ -4213,70 +4214,70 @@ import {
|
|
|
4213
4214
|
useRef as useRef9,
|
|
4214
4215
|
useState as useState6
|
|
4215
4216
|
} from "react";
|
|
4216
|
-
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as
|
|
4217
|
-
import { useEffect as useEffect4, useMemo as
|
|
4217
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo17, useRef as useRef8 } from "react";
|
|
4218
|
+
import { useEffect as useEffect4, useMemo as useMemo16, useRef as useRef7 } from "react";
|
|
4218
4219
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4219
4220
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4220
|
-
import { useContext as
|
|
4221
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
4221
4222
|
import {
|
|
4222
4223
|
createContext as createContext17,
|
|
4223
4224
|
useCallback as useCallback8,
|
|
4224
4225
|
useImperativeHandle as useImperativeHandle3,
|
|
4225
4226
|
useLayoutEffect as useLayoutEffect3,
|
|
4226
|
-
useMemo as
|
|
4227
|
+
useMemo as useMemo18,
|
|
4227
4228
|
useRef as useRef10,
|
|
4228
4229
|
useState as useState7
|
|
4229
4230
|
} from "react";
|
|
4230
4231
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4231
|
-
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as
|
|
4232
|
-
import React17, { createContext as createContext18, useMemo as
|
|
4232
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext31 } from "react";
|
|
4233
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
4233
4234
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
4234
|
-
import { useContext as
|
|
4235
|
+
import { useContext as useContext20 } from "react";
|
|
4235
4236
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
4236
4237
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
4237
|
-
import { createContext as createContext20, useMemo as
|
|
4238
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
4238
4239
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4239
4240
|
import { useCallback as useCallback13 } from "react";
|
|
4240
4241
|
import React23, {
|
|
4241
4242
|
forwardRef as forwardRef5,
|
|
4242
|
-
useContext as
|
|
4243
|
+
useContext as useContext29,
|
|
4243
4244
|
useEffect as useEffect14,
|
|
4244
4245
|
useImperativeHandle as useImperativeHandle4,
|
|
4245
|
-
useMemo as
|
|
4246
|
+
useMemo as useMemo28,
|
|
4246
4247
|
useRef as useRef19,
|
|
4247
4248
|
useState as useState14
|
|
4248
4249
|
} from "react";
|
|
4249
|
-
import { useContext as
|
|
4250
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
4250
4251
|
import React20, {
|
|
4251
4252
|
createContext as createContext21,
|
|
4252
4253
|
createRef as createRef2,
|
|
4253
4254
|
useCallback as useCallback9,
|
|
4254
|
-
useContext as
|
|
4255
|
+
useContext as useContext21,
|
|
4255
4256
|
useEffect as useEffect7,
|
|
4256
|
-
useMemo as
|
|
4257
|
+
useMemo as useMemo22,
|
|
4257
4258
|
useRef as useRef12,
|
|
4258
4259
|
useState as useState10
|
|
4259
4260
|
} from "react";
|
|
4260
|
-
import { useMemo as
|
|
4261
|
+
import { useMemo as useMemo21, useRef as useRef11 } from "react";
|
|
4261
4262
|
import { jsx as jsx19, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
4262
4263
|
import { useRef as useRef13 } from "react";
|
|
4263
|
-
import { useContext as
|
|
4264
|
-
import { useContext as
|
|
4264
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState11 } from "react";
|
|
4265
|
+
import { useContext as useContext23 } from "react";
|
|
4265
4266
|
import {
|
|
4266
4267
|
useCallback as useCallback12,
|
|
4267
|
-
useContext as
|
|
4268
|
+
useContext as useContext27,
|
|
4268
4269
|
useEffect as useEffect12,
|
|
4269
4270
|
useLayoutEffect as useLayoutEffect7,
|
|
4270
4271
|
useRef as useRef18
|
|
4271
4272
|
} from "react";
|
|
4272
|
-
import { useCallback as useCallback11, useMemo as
|
|
4273
|
-
import { useContext as
|
|
4273
|
+
import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef16 } from "react";
|
|
4274
|
+
import { useContext as useContext26, useMemo as useMemo25 } from "react";
|
|
4274
4275
|
import React21, {
|
|
4275
4276
|
useCallback as useCallback10,
|
|
4276
|
-
useContext as
|
|
4277
|
+
useContext as useContext25,
|
|
4277
4278
|
useEffect as useEffect9,
|
|
4278
4279
|
useLayoutEffect as useLayoutEffect6,
|
|
4279
|
-
useMemo as
|
|
4280
|
+
useMemo as useMemo24,
|
|
4280
4281
|
useRef as useRef15,
|
|
4281
4282
|
useState as useState12
|
|
4282
4283
|
} from "react";
|
|
@@ -4285,15 +4286,15 @@ import React22 from "react";
|
|
|
4285
4286
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
4286
4287
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
4287
4288
|
import { useEffect as useEffect13 } from "react";
|
|
4288
|
-
import { createContext as createContext22, useContext as
|
|
4289
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
|
|
4289
4290
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
4290
4291
|
import {
|
|
4291
4292
|
forwardRef as forwardRef6,
|
|
4292
|
-
useContext as
|
|
4293
|
+
useContext as useContext30,
|
|
4293
4294
|
useEffect as useEffect15,
|
|
4294
4295
|
useImperativeHandle as useImperativeHandle5,
|
|
4295
4296
|
useLayoutEffect as useLayoutEffect8,
|
|
4296
|
-
useMemo as
|
|
4297
|
+
useMemo as useMemo29,
|
|
4297
4298
|
useRef as useRef20
|
|
4298
4299
|
} from "react";
|
|
4299
4300
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
@@ -4303,7 +4304,7 @@ import {
|
|
|
4303
4304
|
useCallback as useCallback15,
|
|
4304
4305
|
useEffect as useEffect16,
|
|
4305
4306
|
useImperativeHandle as useImperativeHandle6,
|
|
4306
|
-
useMemo as
|
|
4307
|
+
useMemo as useMemo30,
|
|
4307
4308
|
useRef as useRef21,
|
|
4308
4309
|
useState as useState15
|
|
4309
4310
|
} from "react";
|
|
@@ -4312,19 +4313,19 @@ import {
|
|
|
4312
4313
|
createContext as createContext23,
|
|
4313
4314
|
forwardRef as forwardRef9,
|
|
4314
4315
|
useCallback as useCallback16,
|
|
4315
|
-
useContext as
|
|
4316
|
+
useContext as useContext32,
|
|
4316
4317
|
useLayoutEffect as useLayoutEffect9,
|
|
4317
|
-
useMemo as
|
|
4318
|
+
useMemo as useMemo31,
|
|
4318
4319
|
useRef as useRef22
|
|
4319
4320
|
} from "react";
|
|
4320
4321
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4321
4322
|
import {
|
|
4322
4323
|
forwardRef as forwardRef10,
|
|
4323
4324
|
useCallback as useCallback17,
|
|
4324
|
-
useContext as
|
|
4325
|
+
useContext as useContext33,
|
|
4325
4326
|
useImperativeHandle as useImperativeHandle7,
|
|
4326
4327
|
useLayoutEffect as useLayoutEffect10,
|
|
4327
|
-
useMemo as
|
|
4328
|
+
useMemo as useMemo32,
|
|
4328
4329
|
useRef as useRef23,
|
|
4329
4330
|
useState as useState16
|
|
4330
4331
|
} from "react";
|
|
@@ -4333,7 +4334,7 @@ import { forwardRef as forwardRef11, useCallback as useCallback18, useState as u
|
|
|
4333
4334
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
4334
4335
|
import {
|
|
4335
4336
|
useCallback as useCallback19,
|
|
4336
|
-
useContext as
|
|
4337
|
+
useContext as useContext34,
|
|
4337
4338
|
useLayoutEffect as useLayoutEffect11,
|
|
4338
4339
|
useRef as useRef24,
|
|
4339
4340
|
useState as useState18
|
|
@@ -4346,59 +4347,59 @@ import React31 from "react";
|
|
|
4346
4347
|
import {
|
|
4347
4348
|
useCallback as useCallback21,
|
|
4348
4349
|
useImperativeHandle as useImperativeHandle8,
|
|
4349
|
-
useMemo as
|
|
4350
|
+
useMemo as useMemo33,
|
|
4350
4351
|
useRef as useRef26,
|
|
4351
4352
|
useState as useState19
|
|
4352
4353
|
} from "react";
|
|
4353
4354
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4354
4355
|
import React32 from "react";
|
|
4355
|
-
import { useMemo as
|
|
4356
|
-
import { createContext as createContext24, useContext as
|
|
4356
|
+
import { useMemo as useMemo35 } from "react";
|
|
4357
|
+
import { createContext as createContext24, useContext as useContext35, useMemo as useMemo34 } from "react";
|
|
4357
4358
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4358
4359
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4359
4360
|
import React34 from "react";
|
|
4360
4361
|
import React35, { createContext as createContext25 } from "react";
|
|
4361
|
-
import React36, { useContext as
|
|
4362
|
+
import React36, { useContext as useContext36 } from "react";
|
|
4362
4363
|
import { useCallback as useCallback24 } from "react";
|
|
4363
4364
|
import {
|
|
4364
4365
|
useCallback as useCallback22,
|
|
4365
|
-
useContext as
|
|
4366
|
+
useContext as useContext37,
|
|
4366
4367
|
useEffect as useEffect17,
|
|
4367
4368
|
useLayoutEffect as useLayoutEffect12,
|
|
4368
|
-
useMemo as
|
|
4369
|
+
useMemo as useMemo36,
|
|
4369
4370
|
useState as useState20
|
|
4370
4371
|
} from "react";
|
|
4371
4372
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4372
4373
|
import React38, {
|
|
4373
4374
|
forwardRef as forwardRef13,
|
|
4374
4375
|
useCallback as useCallback23,
|
|
4375
|
-
useContext as
|
|
4376
|
+
useContext as useContext38,
|
|
4376
4377
|
useEffect as useEffect19,
|
|
4377
4378
|
useImperativeHandle as useImperativeHandle9,
|
|
4378
|
-
useMemo as
|
|
4379
|
+
useMemo as useMemo37,
|
|
4379
4380
|
useRef as useRef27,
|
|
4380
4381
|
useState as useState21
|
|
4381
4382
|
} from "react";
|
|
4382
4383
|
import { useEffect as useEffect18 } from "react";
|
|
4383
4384
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4384
4385
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4385
|
-
import React40, { useMemo as
|
|
4386
|
+
import React40, { useMemo as useMemo38 } from "react";
|
|
4386
4387
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4387
4388
|
import React42, {
|
|
4388
4389
|
forwardRef as forwardRef14,
|
|
4389
|
-
useMemo as
|
|
4390
|
+
useMemo as useMemo39
|
|
4390
4391
|
} from "react";
|
|
4391
4392
|
import React41 from "react";
|
|
4392
4393
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
4393
4394
|
import React43 from "react";
|
|
4394
|
-
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
|
|
4395
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext40 } from "react";
|
|
4395
4396
|
import {
|
|
4396
4397
|
forwardRef as forwardRef15,
|
|
4397
|
-
useContext as
|
|
4398
|
+
useContext as useContext39,
|
|
4398
4399
|
useEffect as useEffect20,
|
|
4399
4400
|
useImperativeHandle as useImperativeHandle10,
|
|
4400
4401
|
useLayoutEffect as useLayoutEffect13,
|
|
4401
|
-
useMemo as
|
|
4402
|
+
useMemo as useMemo40,
|
|
4402
4403
|
useRef as useRef28
|
|
4403
4404
|
} from "react";
|
|
4404
4405
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
@@ -5589,7 +5590,7 @@ var getSingleChildComponent = (children) => {
|
|
|
5589
5590
|
}
|
|
5590
5591
|
return child.type;
|
|
5591
5592
|
};
|
|
5592
|
-
var VERSION = "4.0.
|
|
5593
|
+
var VERSION = "4.0.495";
|
|
5593
5594
|
var checkMultipleRemotionVersions = () => {
|
|
5594
5595
|
if (typeof globalThis === "undefined") {
|
|
5595
5596
|
return;
|
|
@@ -6082,15 +6083,19 @@ var premountSchema = {
|
|
|
6082
6083
|
description: "Premount For",
|
|
6083
6084
|
min: 0,
|
|
6084
6085
|
step: 1,
|
|
6085
|
-
hiddenFromList: false
|
|
6086
|
+
hiddenFromList: false,
|
|
6087
|
+
keyframable: false
|
|
6086
6088
|
},
|
|
6087
6089
|
postmountFor: {
|
|
6088
6090
|
type: "number",
|
|
6089
6091
|
default: 0,
|
|
6090
6092
|
min: 0,
|
|
6091
6093
|
step: 1,
|
|
6092
|
-
hiddenFromList: true
|
|
6093
|
-
|
|
6094
|
+
hiddenFromList: true,
|
|
6095
|
+
keyframable: false
|
|
6096
|
+
}
|
|
6097
|
+
};
|
|
6098
|
+
var premountStyleSchema = {
|
|
6094
6099
|
styleWhilePremounted: {
|
|
6095
6100
|
type: "hidden"
|
|
6096
6101
|
},
|
|
@@ -6098,10 +6103,13 @@ var premountSchema = {
|
|
|
6098
6103
|
type: "hidden"
|
|
6099
6104
|
}
|
|
6100
6105
|
};
|
|
6101
|
-
var sequencePremountSchema =
|
|
6106
|
+
var sequencePremountSchema = {
|
|
6107
|
+
...premountSchema,
|
|
6108
|
+
...premountStyleSchema
|
|
6109
|
+
};
|
|
6102
6110
|
var sequenceStyleSchema = {
|
|
6103
6111
|
...transformSchema,
|
|
6104
|
-
...
|
|
6112
|
+
...sequencePremountSchema
|
|
6105
6113
|
};
|
|
6106
6114
|
var hiddenField = {
|
|
6107
6115
|
type: "boolean",
|
|
@@ -6186,9 +6194,6 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6186
6194
|
default: "none"
|
|
6187
6195
|
}
|
|
6188
6196
|
};
|
|
6189
|
-
var PremountContext = createContext14({
|
|
6190
|
-
premountFramesRemaining: 0
|
|
6191
|
-
});
|
|
6192
6197
|
var SequenceManager = React12.createContext({
|
|
6193
6198
|
registerSequence: () => {
|
|
6194
6199
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -6368,7 +6373,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
6368
6373
|
})
|
|
6369
6374
|
});
|
|
6370
6375
|
};
|
|
6371
|
-
var IsInsideSeriesContext =
|
|
6376
|
+
var IsInsideSeriesContext = createContext14(false);
|
|
6372
6377
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
6373
6378
|
return /* @__PURE__ */ jsx11(IsInsideSeriesContext.Provider, {
|
|
6374
6379
|
value: true,
|
|
@@ -6387,7 +6392,61 @@ var useRequireToBeInsideSeries = () => {
|
|
|
6387
6392
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6388
6393
|
}
|
|
6389
6394
|
};
|
|
6395
|
+
var PremountContext = createContext15({
|
|
6396
|
+
premountFramesRemaining: 0
|
|
6397
|
+
});
|
|
6390
6398
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
6399
|
+
var usePremounting = ({
|
|
6400
|
+
from,
|
|
6401
|
+
durationInFrames,
|
|
6402
|
+
premountFor,
|
|
6403
|
+
postmountFor,
|
|
6404
|
+
style,
|
|
6405
|
+
styleWhilePremounted,
|
|
6406
|
+
styleWhilePostmounted,
|
|
6407
|
+
hideWhilePremounted
|
|
6408
|
+
}) => {
|
|
6409
|
+
const parentPremountContext = useContext15(PremountContext);
|
|
6410
|
+
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
6411
|
+
const environment = useRemotionEnvironment();
|
|
6412
|
+
const { fps } = useVideoConfig();
|
|
6413
|
+
const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? premountFor ?? fps : premountFor ?? 0;
|
|
6414
|
+
const effectivePostmountFor = postmountFor ?? 0;
|
|
6415
|
+
const endThreshold = Math.ceil(from + durationInFrames - 1);
|
|
6416
|
+
const premountingActive = !environment.isRendering && frame < from && frame >= from - effectivePremountFor;
|
|
6417
|
+
const postmountingActive = !environment.isRendering && frame > endThreshold && frame <= endThreshold + effectivePostmountFor;
|
|
6418
|
+
const isPremountingOrPostmounting = premountingActive || postmountingActive;
|
|
6419
|
+
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
6420
|
+
const premountingStyle = useMemo13(() => {
|
|
6421
|
+
if (!isPremountingOrPostmounting) {
|
|
6422
|
+
return style;
|
|
6423
|
+
}
|
|
6424
|
+
return {
|
|
6425
|
+
...style,
|
|
6426
|
+
...hideWhilePremounted === "opacity" ? { opacity: 0 } : { display: "none" },
|
|
6427
|
+
pointerEvents: "none",
|
|
6428
|
+
...premountingActive ? styleWhilePremounted : {},
|
|
6429
|
+
...postmountingActive ? styleWhilePostmounted : {}
|
|
6430
|
+
};
|
|
6431
|
+
}, [
|
|
6432
|
+
isPremountingOrPostmounting,
|
|
6433
|
+
hideWhilePremounted,
|
|
6434
|
+
postmountingActive,
|
|
6435
|
+
premountingActive,
|
|
6436
|
+
style,
|
|
6437
|
+
styleWhilePostmounted,
|
|
6438
|
+
styleWhilePremounted
|
|
6439
|
+
]);
|
|
6440
|
+
return {
|
|
6441
|
+
effectivePremountFor,
|
|
6442
|
+
effectivePostmountFor,
|
|
6443
|
+
premountingActive,
|
|
6444
|
+
postmountingActive,
|
|
6445
|
+
isPremountingOrPostmounting,
|
|
6446
|
+
freezeFrame,
|
|
6447
|
+
premountingStyle
|
|
6448
|
+
};
|
|
6449
|
+
};
|
|
6391
6450
|
var deleteNestedKey = (obj, keysToRemove) => {
|
|
6392
6451
|
for (const key of keysToRemove) {
|
|
6393
6452
|
const parts = key.split(".");
|
|
@@ -8211,10 +8270,10 @@ var useMemoizedEffects = ({
|
|
|
8211
8270
|
overrideId
|
|
8212
8271
|
}) => {
|
|
8213
8272
|
const previousRef = useRef5(null);
|
|
8214
|
-
const { propStatuses } =
|
|
8215
|
-
const { getEffectDragOverrides } =
|
|
8273
|
+
const { propStatuses } = useContext16(VisualModePropStatusesContext);
|
|
8274
|
+
const { getEffectDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
8216
8275
|
const frame = useCurrentFrame();
|
|
8217
|
-
const { overrideIdToNodePathMappings } =
|
|
8276
|
+
const { overrideIdToNodePathMappings } = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
8218
8277
|
const previous = previousRef.current;
|
|
8219
8278
|
const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
|
|
8220
8279
|
const resolved = effects.map((descriptor, index) => {
|
|
@@ -8558,9 +8617,9 @@ var withInteractivitySchema = ({
|
|
|
8558
8617
|
ref
|
|
8559
8618
|
});
|
|
8560
8619
|
}
|
|
8561
|
-
const { propStatuses } =
|
|
8562
|
-
const { getDragOverrides } =
|
|
8563
|
-
const nodePathMapping =
|
|
8620
|
+
const { propStatuses } = useContext17(VisualModePropStatusesContext);
|
|
8621
|
+
const { getDragOverrides } = useContext17(VisualModeDragOverridesContext);
|
|
8622
|
+
const nodePathMapping = useContext17(OverrideIdsToNodePathsGettersContext);
|
|
8564
8623
|
const frame = useCurrentFrame();
|
|
8565
8624
|
if (props.controls) {
|
|
8566
8625
|
return React14.createElement(Component, {
|
|
@@ -8587,8 +8646,8 @@ var withInteractivitySchema = ({
|
|
|
8587
8646
|
key,
|
|
8588
8647
|
props
|
|
8589
8648
|
}));
|
|
8590
|
-
const currentRuntimeValueDotNotation =
|
|
8591
|
-
const controls =
|
|
8649
|
+
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
|
|
8650
|
+
const controls = useMemo14(() => {
|
|
8592
8651
|
return {
|
|
8593
8652
|
schema: schemaWithSequenceName,
|
|
8594
8653
|
currentRuntimeValueDotNotation,
|
|
@@ -8598,7 +8657,7 @@ var withInteractivitySchema = ({
|
|
|
8598
8657
|
componentName
|
|
8599
8658
|
};
|
|
8600
8659
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
8601
|
-
const { merged: valuesDotNotation, propsToDelete } =
|
|
8660
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
8602
8661
|
return computeEffectiveSchemaValuesDotNotation({
|
|
8603
8662
|
schema: schemaWithSequenceName,
|
|
8604
8663
|
currentValue: currentRuntimeValueDotNotation,
|
|
@@ -8656,7 +8715,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8656
8715
|
}, ref) => {
|
|
8657
8716
|
const { layout = "absolute-fill" } = other;
|
|
8658
8717
|
const [id] = useState5(() => String(Math.random()));
|
|
8659
|
-
const parentSequence =
|
|
8718
|
+
const parentSequence = useContext18(SequenceContext);
|
|
8660
8719
|
const { rootId } = useTimelineContext();
|
|
8661
8720
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
8662
8721
|
const nonce = useNonce();
|
|
@@ -8707,13 +8766,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8707
8766
|
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
|
|
8708
8767
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
|
|
8709
8768
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
8710
|
-
const { registerSequence, unregisterSequence } =
|
|
8769
|
+
const { registerSequence, unregisterSequence } = useContext18(SequenceManager);
|
|
8711
8770
|
const wrapperRefForOutline = useRef6(null);
|
|
8712
8771
|
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
8713
|
-
const premounting =
|
|
8772
|
+
const premounting = useMemo15(() => {
|
|
8714
8773
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
8715
8774
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
8716
|
-
const postmounting =
|
|
8775
|
+
const postmounting = useMemo15(() => {
|
|
8717
8776
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
8718
8777
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
8719
8778
|
const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
|
|
@@ -8721,7 +8780,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8721
8780
|
const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
|
|
8722
8781
|
const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
|
|
8723
8782
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
8724
|
-
const contextValue =
|
|
8783
|
+
const contextValue = useMemo15(() => {
|
|
8725
8784
|
return {
|
|
8726
8785
|
absoluteFrom,
|
|
8727
8786
|
cumulatedFrom,
|
|
@@ -8752,12 +8811,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8752
8811
|
postmountDisplay,
|
|
8753
8812
|
cumulatedNegativeFrom
|
|
8754
8813
|
]);
|
|
8755
|
-
const timelineClipName =
|
|
8814
|
+
const timelineClipName = useMemo15(() => {
|
|
8756
8815
|
return name ?? "";
|
|
8757
8816
|
}, [name]);
|
|
8758
8817
|
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
8759
8818
|
const env = useRemotionEnvironment();
|
|
8760
|
-
const isInsideSeries =
|
|
8819
|
+
const isInsideSeries = useContext18(IsInsideSeriesContext);
|
|
8761
8820
|
const inheritedStack = other?.stack ?? null;
|
|
8762
8821
|
const stackRef = useRef6(null);
|
|
8763
8822
|
stackRef.current = stack ?? inheritedStack;
|
|
@@ -8905,7 +8964,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8905
8964
|
ref.current = node;
|
|
8906
8965
|
}
|
|
8907
8966
|
}, [ref]);
|
|
8908
|
-
const defaultStyle =
|
|
8967
|
+
const defaultStyle = useMemo15(() => {
|
|
8909
8968
|
return {
|
|
8910
8969
|
flexDirection: undefined,
|
|
8911
8970
|
...width ? { width } : {},
|
|
@@ -8931,8 +8990,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8931
8990
|
};
|
|
8932
8991
|
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
8933
8992
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
8934
|
-
const parentPremountContext = useContext17(PremountContext);
|
|
8935
|
-
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
8936
8993
|
if (props.layout === "none") {
|
|
8937
8994
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
8938
8995
|
}
|
|
@@ -8946,34 +9003,30 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
8946
9003
|
styleWhilePostmounted,
|
|
8947
9004
|
...otherProps
|
|
8948
9005
|
} = props;
|
|
8949
|
-
const
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
8953
|
-
const isFreezingActive = premountingActive || postmountingActive;
|
|
8954
|
-
const style = useMemo14(() => {
|
|
8955
|
-
return {
|
|
8956
|
-
...passedStyle,
|
|
8957
|
-
opacity: premountingActive || postmountingActive ? 0 : passedStyle?.opacity,
|
|
8958
|
-
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
8959
|
-
...premountingActive ? styleWhilePremounted : {},
|
|
8960
|
-
...postmountingActive ? styleWhilePostmounted : {}
|
|
8961
|
-
};
|
|
8962
|
-
}, [
|
|
8963
|
-
passedStyle,
|
|
8964
|
-
premountingActive,
|
|
9006
|
+
const {
|
|
9007
|
+
freezeFrame,
|
|
9008
|
+
isPremountingOrPostmounting,
|
|
8965
9009
|
postmountingActive,
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
9010
|
+
premountingActive,
|
|
9011
|
+
premountingStyle
|
|
9012
|
+
} = usePremounting({
|
|
9013
|
+
from,
|
|
9014
|
+
durationInFrames,
|
|
9015
|
+
premountFor,
|
|
9016
|
+
postmountFor,
|
|
9017
|
+
style: passedStyle ?? null,
|
|
9018
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
9019
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
9020
|
+
hideWhilePremounted: "opacity"
|
|
9021
|
+
});
|
|
8969
9022
|
return /* @__PURE__ */ jsx12(Freeze, {
|
|
8970
9023
|
frame: freezeFrame,
|
|
8971
|
-
active:
|
|
9024
|
+
active: isPremountingOrPostmounting,
|
|
8972
9025
|
children: /* @__PURE__ */ jsx12(SequenceInner, {
|
|
8973
9026
|
ref,
|
|
8974
9027
|
from,
|
|
8975
9028
|
durationInFrames,
|
|
8976
|
-
style,
|
|
9029
|
+
style: premountingStyle ?? undefined,
|
|
8977
9030
|
_remotionInternalPremountDisplay: premountFor,
|
|
8978
9031
|
_remotionInternalPostmountDisplay: postmountFor,
|
|
8979
9032
|
_remotionInternalIsPremounting: premountingActive,
|
|
@@ -9309,7 +9362,7 @@ var useEffectChainState = () => {
|
|
|
9309
9362
|
}
|
|
9310
9363
|
};
|
|
9311
9364
|
}, []);
|
|
9312
|
-
return
|
|
9365
|
+
return useMemo16(() => ({
|
|
9313
9366
|
get: (width, height) => {
|
|
9314
9367
|
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
9315
9368
|
if (chainStateRef.current) {
|
|
@@ -9325,7 +9378,7 @@ var useEffectChainState = () => {
|
|
|
9325
9378
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
9326
9379
|
const canvasRef = useRef8(null);
|
|
9327
9380
|
const chainState = useEffectChainState();
|
|
9328
|
-
const sourceCanvas =
|
|
9381
|
+
const sourceCanvas = useMemo17(() => {
|
|
9329
9382
|
if (typeof document === "undefined") {
|
|
9330
9383
|
return null;
|
|
9331
9384
|
}
|
|
@@ -9882,7 +9935,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
9882
9935
|
};
|
|
9883
9936
|
}
|
|
9884
9937
|
}, []);
|
|
9885
|
-
const contextValue =
|
|
9938
|
+
const contextValue = useMemo18(() => {
|
|
9886
9939
|
return {
|
|
9887
9940
|
registerRenderAsset,
|
|
9888
9941
|
unregisterRenderAsset,
|
|
@@ -9896,7 +9949,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
9896
9949
|
};
|
|
9897
9950
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
9898
9951
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
9899
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9952
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
9900
9953
|
const env = useRemotionEnvironment();
|
|
9901
9954
|
const frame = useCurrentFrame();
|
|
9902
9955
|
const [id] = useState8(() => {
|
|
@@ -10011,14 +10064,14 @@ var Loop = ({
|
|
|
10011
10064
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
10012
10065
|
const start = iteration * durationInFrames;
|
|
10013
10066
|
const from = Math.min(start, maxFrame);
|
|
10014
|
-
const loopDisplay =
|
|
10067
|
+
const loopDisplay = useMemo19(() => {
|
|
10015
10068
|
return {
|
|
10016
10069
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
10017
10070
|
startOffset: -from,
|
|
10018
10071
|
durationInFrames
|
|
10019
10072
|
};
|
|
10020
10073
|
}, [compDuration, durationInFrames, from, times]);
|
|
10021
|
-
const loopContext =
|
|
10074
|
+
const loopContext = useMemo19(() => {
|
|
10022
10075
|
return {
|
|
10023
10076
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
10024
10077
|
durationInFrames
|
|
@@ -10087,7 +10140,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
10087
10140
|
return src.slice(0, hashIndex);
|
|
10088
10141
|
};
|
|
10089
10142
|
var usePreload = (src) => {
|
|
10090
|
-
const preloads2 =
|
|
10143
|
+
const preloads2 = useContext20(PreloadContext);
|
|
10091
10144
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
10092
10145
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
10093
10146
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -10390,7 +10443,7 @@ var DurationsContext = createContext20({
|
|
|
10390
10443
|
});
|
|
10391
10444
|
var DurationsContextProvider = ({ children }) => {
|
|
10392
10445
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
10393
|
-
const value =
|
|
10446
|
+
const value = useMemo20(() => {
|
|
10394
10447
|
return {
|
|
10395
10448
|
durations,
|
|
10396
10449
|
setDurations
|
|
@@ -10529,7 +10582,7 @@ var useSingletonAudioContext = ({
|
|
|
10529
10582
|
if (sampleRate !== initialSampleRate.current) {
|
|
10530
10583
|
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.`);
|
|
10531
10584
|
}
|
|
10532
|
-
const context =
|
|
10585
|
+
const context = useMemo21(() => {
|
|
10533
10586
|
if (env.isRendering) {
|
|
10534
10587
|
return null;
|
|
10535
10588
|
}
|
|
@@ -10663,9 +10716,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10663
10716
|
});
|
|
10664
10717
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
10665
10718
|
const isResuming = useRef12(null);
|
|
10666
|
-
const audioSyncAnchor =
|
|
10719
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
10667
10720
|
const audioSyncAnchorListeners = useRef12([]);
|
|
10668
|
-
const audioSyncAnchorEmitter =
|
|
10721
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
10669
10722
|
return {
|
|
10670
10723
|
dispatch: (event) => {
|
|
10671
10724
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -10685,7 +10738,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10685
10738
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
10686
10739
|
nodesToResume.current.delete(node);
|
|
10687
10740
|
}, []);
|
|
10688
|
-
const scheduleAudioNode =
|
|
10741
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
10689
10742
|
return ({
|
|
10690
10743
|
node,
|
|
10691
10744
|
mediaTimestamp,
|
|
@@ -10777,7 +10830,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10777
10830
|
audioContextIsPlayingEventually.current = false;
|
|
10778
10831
|
return ctxAndGain.suspend();
|
|
10779
10832
|
}, [ctxAndGain]);
|
|
10780
|
-
const audioContextValue =
|
|
10833
|
+
const audioContextValue = useMemo22(() => {
|
|
10781
10834
|
return {
|
|
10782
10835
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
10783
10836
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -10814,10 +10867,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10814
10867
|
const logLevel = useLogLevel();
|
|
10815
10868
|
const mountTime = useMountTime();
|
|
10816
10869
|
const env = useRemotionEnvironment();
|
|
10817
|
-
const audioCtx =
|
|
10870
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
10818
10871
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
10819
10872
|
const resume = audioCtx?.resume;
|
|
10820
|
-
const refs =
|
|
10873
|
+
const refs = useMemo22(() => {
|
|
10821
10874
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
10822
10875
|
const ref = createRef2();
|
|
10823
10876
|
return {
|
|
@@ -10956,7 +11009,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10956
11009
|
});
|
|
10957
11010
|
resume?.();
|
|
10958
11011
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
10959
|
-
const audioTagsValue =
|
|
11012
|
+
const audioTagsValue = useMemo22(() => {
|
|
10960
11013
|
return {
|
|
10961
11014
|
registerAudio,
|
|
10962
11015
|
unregisterAudio,
|
|
@@ -10971,7 +11024,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10971
11024
|
unregisterAudio,
|
|
10972
11025
|
updateAudio
|
|
10973
11026
|
]);
|
|
10974
|
-
const sharedAudioTagElements =
|
|
11027
|
+
const sharedAudioTagElements = useMemo22(() => {
|
|
10975
11028
|
return refs.map(({ id, ref }) => {
|
|
10976
11029
|
return /* @__PURE__ */ jsx19("audio", {
|
|
10977
11030
|
ref,
|
|
@@ -10994,8 +11047,8 @@ var useSharedAudio = ({
|
|
|
10994
11047
|
premounting,
|
|
10995
11048
|
postmounting
|
|
10996
11049
|
}) => {
|
|
10997
|
-
const audioCtx =
|
|
10998
|
-
const tagsCtx =
|
|
11050
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
11051
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
10999
11052
|
const [elem] = useState10(() => {
|
|
11000
11053
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
11001
11054
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -11174,7 +11227,7 @@ var useVolume = ({
|
|
|
11174
11227
|
const audioStuffRef = useRef14(null);
|
|
11175
11228
|
const currentVolumeRef = useRef14(volume);
|
|
11176
11229
|
currentVolumeRef.current = volume;
|
|
11177
|
-
const sharedAudioContext =
|
|
11230
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
11178
11231
|
if (!sharedAudioContext) {
|
|
11179
11232
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
11180
11233
|
}
|
|
@@ -11239,7 +11292,7 @@ var useVolume = ({
|
|
|
11239
11292
|
return audioStuffRef;
|
|
11240
11293
|
};
|
|
11241
11294
|
var useMediaStartsAt = () => {
|
|
11242
|
-
const parentSequence =
|
|
11295
|
+
const parentSequence = useContext23(SequenceContext);
|
|
11243
11296
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
11244
11297
|
};
|
|
11245
11298
|
var useFrameForVolumeProp = (behavior) => {
|
|
@@ -11328,7 +11381,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11328
11381
|
if (!src) {
|
|
11329
11382
|
throw new Error("No src passed");
|
|
11330
11383
|
}
|
|
11331
|
-
const parentSequence =
|
|
11384
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11332
11385
|
const [initialVolume] = useState11(() => volume);
|
|
11333
11386
|
const duration = getTimelineDuration({
|
|
11334
11387
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -11338,7 +11391,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11338
11391
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
11339
11392
|
loop
|
|
11340
11393
|
});
|
|
11341
|
-
const volumes =
|
|
11394
|
+
const volumes = useMemo23(() => {
|
|
11342
11395
|
if (typeof volume === "number") {
|
|
11343
11396
|
return volume;
|
|
11344
11397
|
}
|
|
@@ -11359,7 +11412,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11359
11412
|
const nonce = useNonce();
|
|
11360
11413
|
const { rootId } = useTimelineContext();
|
|
11361
11414
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
11362
|
-
const memoizedResult =
|
|
11415
|
+
const memoizedResult = useMemo23(() => {
|
|
11363
11416
|
return {
|
|
11364
11417
|
volumes,
|
|
11365
11418
|
duration,
|
|
@@ -11400,9 +11453,9 @@ var useMediaInTimeline = ({
|
|
|
11400
11453
|
documentationLink,
|
|
11401
11454
|
refForOutline
|
|
11402
11455
|
}) => {
|
|
11403
|
-
const parentSequence =
|
|
11456
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11404
11457
|
const startsAt = useMediaStartsAt();
|
|
11405
|
-
const { registerSequence, unregisterSequence } =
|
|
11458
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
11406
11459
|
const { durationInFrames } = useVideoConfig();
|
|
11407
11460
|
const mediaStartsAt = useMediaStartsAt();
|
|
11408
11461
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -11567,13 +11620,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11567
11620
|
}
|
|
11568
11621
|
}, [blocks]);
|
|
11569
11622
|
}
|
|
11570
|
-
return
|
|
11623
|
+
return useMemo24(() => {
|
|
11571
11624
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11572
11625
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11573
11626
|
};
|
|
11574
11627
|
var BufferingContextReact = React21.createContext(null);
|
|
11575
11628
|
var BufferingProvider = ({ children }) => {
|
|
11576
|
-
const { logLevel, mountTime } =
|
|
11629
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
11577
11630
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
11578
11631
|
return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
|
|
11579
11632
|
value: bufferManager,
|
|
@@ -11599,10 +11652,10 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
11599
11652
|
return isBuffering;
|
|
11600
11653
|
};
|
|
11601
11654
|
var useBufferState = () => {
|
|
11602
|
-
const buffer =
|
|
11655
|
+
const buffer = useContext26(BufferingContextReact);
|
|
11603
11656
|
const logLevel = useLogLevel();
|
|
11604
11657
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
11605
|
-
return
|
|
11658
|
+
return useMemo25(() => ({
|
|
11606
11659
|
delayPlayback: () => {
|
|
11607
11660
|
if (!addBlock) {
|
|
11608
11661
|
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");
|
|
@@ -11710,7 +11763,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
11710
11763
|
onVariableFpsVideoDetected,
|
|
11711
11764
|
pauseWhenBuffering
|
|
11712
11765
|
]);
|
|
11713
|
-
return
|
|
11766
|
+
return useMemo26(() => {
|
|
11714
11767
|
return {
|
|
11715
11768
|
isBuffering: () => bufferingRef.current,
|
|
11716
11769
|
bufferUntilFirstFrame
|
|
@@ -12084,7 +12137,7 @@ var useMediaPlayback = ({
|
|
|
12084
12137
|
const frame = useCurrentFrame();
|
|
12085
12138
|
const absoluteFrame = useTimelinePosition();
|
|
12086
12139
|
const [playing] = usePlayingState();
|
|
12087
|
-
const buffering =
|
|
12140
|
+
const buffering = useContext27(BufferingContextReact);
|
|
12088
12141
|
const { fps } = useVideoConfig();
|
|
12089
12142
|
const mediaStartsAt = useMediaStartsAt();
|
|
12090
12143
|
const lastSeekDueToShift = useRef18(null);
|
|
@@ -12379,16 +12432,16 @@ var SetMediaVolumeContext = createContext22({
|
|
|
12379
12432
|
}
|
|
12380
12433
|
});
|
|
12381
12434
|
var useMediaVolumeState = () => {
|
|
12382
|
-
const { mediaVolume } =
|
|
12383
|
-
const { setMediaVolume } =
|
|
12384
|
-
return
|
|
12435
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
12436
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
12437
|
+
return useMemo27(() => {
|
|
12385
12438
|
return [mediaVolume, setMediaVolume];
|
|
12386
12439
|
}, [mediaVolume, setMediaVolume]);
|
|
12387
12440
|
};
|
|
12388
12441
|
var usePlayerMutedState = () => {
|
|
12389
|
-
const { playerMuted } =
|
|
12390
|
-
const { setPlayerMuted } =
|
|
12391
|
-
return
|
|
12442
|
+
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
12443
|
+
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
12444
|
+
return useMemo27(() => {
|
|
12392
12445
|
return [playerMuted, setPlayerMuted];
|
|
12393
12446
|
}, [playerMuted, setPlayerMuted]);
|
|
12394
12447
|
};
|
|
@@ -12442,7 +12495,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12442
12495
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
12443
12496
|
}
|
|
12444
12497
|
const preloadedSrc = usePreload(src);
|
|
12445
|
-
const sequenceContext =
|
|
12498
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
12446
12499
|
const [timelineId] = useState14(() => String(Math.random()));
|
|
12447
12500
|
const userPreferredVolume = evaluateVolume({
|
|
12448
12501
|
frame: volumePropFrame,
|
|
@@ -12455,7 +12508,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12455
12508
|
requestsVideoFrame: false,
|
|
12456
12509
|
isClientSideRendering: false
|
|
12457
12510
|
});
|
|
12458
|
-
const propsToPass =
|
|
12511
|
+
const propsToPass = useMemo28(() => {
|
|
12459
12512
|
return {
|
|
12460
12513
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
12461
12514
|
src: preloadedSrc,
|
|
@@ -12472,7 +12525,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12472
12525
|
userPreferredVolume,
|
|
12473
12526
|
crossOriginValue
|
|
12474
12527
|
]);
|
|
12475
|
-
const id =
|
|
12528
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
12476
12529
|
src,
|
|
12477
12530
|
sequenceContext?.relativeFrom,
|
|
12478
12531
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12602,10 +12655,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12602
12655
|
const absoluteFrame = useTimelinePosition();
|
|
12603
12656
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
12604
12657
|
const frame = useCurrentFrame();
|
|
12605
|
-
const sequenceContext =
|
|
12606
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12658
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
12659
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
12607
12660
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12608
|
-
const id =
|
|
12661
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12609
12662
|
props.src,
|
|
12610
12663
|
sequenceContext?.relativeFrom,
|
|
12611
12664
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12712,7 +12765,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12712
12765
|
};
|
|
12713
12766
|
var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
|
|
12714
12767
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
12715
|
-
const audioTagsContext =
|
|
12768
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
12716
12769
|
const propsWithFreeze = props;
|
|
12717
12770
|
const {
|
|
12718
12771
|
startFrom,
|
|
@@ -12736,7 +12789,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
12736
12789
|
if (typeof freeze !== "undefined") {
|
|
12737
12790
|
throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
|
|
12738
12791
|
}
|
|
12739
|
-
const { durations, setDurations } =
|
|
12792
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
12740
12793
|
if (typeof props.src !== "string") {
|
|
12741
12794
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
12742
12795
|
}
|
|
@@ -12898,7 +12951,7 @@ var SolidInner = ({
|
|
|
12898
12951
|
effects,
|
|
12899
12952
|
overrideId: overrideId ?? null
|
|
12900
12953
|
});
|
|
12901
|
-
const sourceCanvas =
|
|
12954
|
+
const sourceCanvas = useMemo30(() => {
|
|
12902
12955
|
if (typeof document === "undefined") {
|
|
12903
12956
|
return null;
|
|
12904
12957
|
}
|
|
@@ -12966,7 +13019,7 @@ var SolidInner = ({
|
|
|
12966
13019
|
cancelRender2,
|
|
12967
13020
|
memoizedEffects
|
|
12968
13021
|
]);
|
|
12969
|
-
const canvasStyle =
|
|
13022
|
+
const canvasStyle = useMemo30(() => {
|
|
12970
13023
|
return {
|
|
12971
13024
|
width,
|
|
12972
13025
|
height,
|
|
@@ -13115,7 +13168,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13115
13168
|
controls,
|
|
13116
13169
|
style
|
|
13117
13170
|
}, ref) => {
|
|
13118
|
-
const ancestor =
|
|
13171
|
+
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
13119
13172
|
assertHtmlInCanvasDimensions(width, height);
|
|
13120
13173
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
13121
13174
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
@@ -13334,20 +13387,20 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13334
13387
|
continueRender2(handle);
|
|
13335
13388
|
};
|
|
13336
13389
|
}, [width, height, continueRender2, canvasSizeKey]);
|
|
13337
|
-
const innerStyle =
|
|
13390
|
+
const innerStyle = useMemo31(() => {
|
|
13338
13391
|
return {
|
|
13339
13392
|
width,
|
|
13340
13393
|
height
|
|
13341
13394
|
};
|
|
13342
13395
|
}, [width, height]);
|
|
13343
|
-
const canvasStyle =
|
|
13396
|
+
const canvasStyle = useMemo31(() => {
|
|
13344
13397
|
return {
|
|
13345
13398
|
width,
|
|
13346
13399
|
height,
|
|
13347
13400
|
...style ?? {}
|
|
13348
13401
|
};
|
|
13349
13402
|
}, [height, style, width]);
|
|
13350
|
-
const ancestorValue =
|
|
13403
|
+
const ancestorValue = useMemo31(() => {
|
|
13351
13404
|
return {
|
|
13352
13405
|
requestParentPaint: () => {
|
|
13353
13406
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -13561,7 +13614,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13561
13614
|
effects,
|
|
13562
13615
|
overrideId: controls?.overrideId ?? null
|
|
13563
13616
|
});
|
|
13564
|
-
const sequenceContext =
|
|
13617
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
13565
13618
|
const pendingLoadDelayRef = useRef23(null);
|
|
13566
13619
|
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
13567
13620
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
@@ -13578,7 +13631,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13578
13631
|
continueRender2(pending.handle);
|
|
13579
13632
|
pendingLoadDelayRef.current = null;
|
|
13580
13633
|
}, [continueRender2]);
|
|
13581
|
-
const sourceCanvas =
|
|
13634
|
+
const sourceCanvas = useMemo32(() => {
|
|
13582
13635
|
if (typeof document === "undefined") {
|
|
13583
13636
|
return null;
|
|
13584
13637
|
}
|
|
@@ -13900,7 +13953,7 @@ var ImgContent = ({
|
|
|
13900
13953
|
const imageRef = useRef24(null);
|
|
13901
13954
|
const errors = useRef24({});
|
|
13902
13955
|
const { delayPlayback } = useBufferState();
|
|
13903
|
-
const sequenceContext =
|
|
13956
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
13904
13957
|
const [isLoading, setIsLoading] = useState18(false);
|
|
13905
13958
|
const _propsValid = true;
|
|
13906
13959
|
if (!_propsValid) {
|
|
@@ -14249,7 +14302,10 @@ var makeRemotionComponentIdentity = ({
|
|
|
14249
14302
|
};
|
|
14250
14303
|
var interactiveElementSchema = {
|
|
14251
14304
|
...baseSchema,
|
|
14252
|
-
...transformSchema
|
|
14305
|
+
...transformSchema
|
|
14306
|
+
};
|
|
14307
|
+
var interactiveTextElementSchema = {
|
|
14308
|
+
...interactiveElementSchema,
|
|
14253
14309
|
...textSchema,
|
|
14254
14310
|
...textContentSchema
|
|
14255
14311
|
};
|
|
@@ -14265,7 +14321,7 @@ var withSchema = (options) => {
|
|
|
14265
14321
|
addSequenceStackTraces(Wrapped);
|
|
14266
14322
|
return Wrapped;
|
|
14267
14323
|
};
|
|
14268
|
-
var makeInteractiveElement = (tag, displayName) => {
|
|
14324
|
+
var makeInteractiveElement = (tag, displayName, schema) => {
|
|
14269
14325
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
14270
14326
|
const {
|
|
14271
14327
|
durationInFrames,
|
|
@@ -14311,12 +14367,18 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14311
14367
|
packageName: "remotion",
|
|
14312
14368
|
componentName: displayName.slice(1, -1)
|
|
14313
14369
|
}),
|
|
14314
|
-
schema
|
|
14370
|
+
schema,
|
|
14315
14371
|
supportsEffects: false
|
|
14316
14372
|
});
|
|
14317
14373
|
Wrapped.displayName = displayName;
|
|
14318
14374
|
return Wrapped;
|
|
14319
14375
|
};
|
|
14376
|
+
var makeInteractiveTextElement = (tag, displayName) => {
|
|
14377
|
+
return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
|
|
14378
|
+
};
|
|
14379
|
+
var makeInteractiveNonTextElement = (tag, displayName) => {
|
|
14380
|
+
return makeInteractiveElement(tag, displayName, interactiveElementSchema);
|
|
14381
|
+
};
|
|
14320
14382
|
var Interactive = {
|
|
14321
14383
|
baseSchema,
|
|
14322
14384
|
transformSchema,
|
|
@@ -14325,41 +14387,41 @@ var Interactive = {
|
|
|
14325
14387
|
sequenceSchema,
|
|
14326
14388
|
withSchema,
|
|
14327
14389
|
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
14328
|
-
A:
|
|
14329
|
-
Article:
|
|
14330
|
-
Aside:
|
|
14331
|
-
Button:
|
|
14332
|
-
Circle:
|
|
14333
|
-
Code:
|
|
14334
|
-
Div:
|
|
14335
|
-
Ellipse:
|
|
14336
|
-
Em:
|
|
14337
|
-
Footer:
|
|
14338
|
-
G:
|
|
14339
|
-
H1:
|
|
14340
|
-
H2:
|
|
14341
|
-
H3:
|
|
14342
|
-
H4:
|
|
14343
|
-
H5:
|
|
14344
|
-
H6:
|
|
14345
|
-
Header:
|
|
14346
|
-
Label:
|
|
14347
|
-
Li:
|
|
14348
|
-
Line:
|
|
14349
|
-
Main:
|
|
14350
|
-
Nav:
|
|
14351
|
-
Ol:
|
|
14352
|
-
P:
|
|
14353
|
-
Path:
|
|
14354
|
-
Pre:
|
|
14355
|
-
Rect:
|
|
14356
|
-
Section:
|
|
14357
|
-
Small:
|
|
14358
|
-
Span:
|
|
14359
|
-
Strong:
|
|
14360
|
-
Svg:
|
|
14361
|
-
Text:
|
|
14362
|
-
Ul:
|
|
14390
|
+
A: makeInteractiveTextElement("a", "<Interactive.A>"),
|
|
14391
|
+
Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
|
|
14392
|
+
Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
|
|
14393
|
+
Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
|
|
14394
|
+
Circle: makeInteractiveNonTextElement("circle", "<Interactive.Circle>"),
|
|
14395
|
+
Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
|
|
14396
|
+
Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
|
|
14397
|
+
Ellipse: makeInteractiveNonTextElement("ellipse", "<Interactive.Ellipse>"),
|
|
14398
|
+
Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
|
|
14399
|
+
Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
|
|
14400
|
+
G: makeInteractiveNonTextElement("g", "<Interactive.G>"),
|
|
14401
|
+
H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
|
|
14402
|
+
H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
|
|
14403
|
+
H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
|
|
14404
|
+
H4: makeInteractiveTextElement("h4", "<Interactive.H4>"),
|
|
14405
|
+
H5: makeInteractiveTextElement("h5", "<Interactive.H5>"),
|
|
14406
|
+
H6: makeInteractiveTextElement("h6", "<Interactive.H6>"),
|
|
14407
|
+
Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
|
|
14408
|
+
Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
|
|
14409
|
+
Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
|
|
14410
|
+
Line: makeInteractiveNonTextElement("line", "<Interactive.Line>"),
|
|
14411
|
+
Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
|
|
14412
|
+
Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
|
|
14413
|
+
Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
|
|
14414
|
+
P: makeInteractiveTextElement("p", "<Interactive.P>"),
|
|
14415
|
+
Path: makeInteractiveNonTextElement("path", "<Interactive.Path>"),
|
|
14416
|
+
Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
|
|
14417
|
+
Rect: makeInteractiveNonTextElement("rect", "<Interactive.Rect>"),
|
|
14418
|
+
Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
|
|
14419
|
+
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
14420
|
+
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
14421
|
+
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
14422
|
+
Svg: makeInteractiveNonTextElement("svg", "<Interactive.Svg>"),
|
|
14423
|
+
Text: makeInteractiveTextElement("text", "<Interactive.Text>"),
|
|
14424
|
+
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
14363
14425
|
};
|
|
14364
14426
|
var compositionsRef = React31.createRef();
|
|
14365
14427
|
var CompositionManagerProvider = ({
|
|
@@ -14416,7 +14478,7 @@ var CompositionManagerProvider = ({
|
|
|
14416
14478
|
getCompositions: () => currentcompositionsRef.current
|
|
14417
14479
|
};
|
|
14418
14480
|
}, []);
|
|
14419
|
-
const compositionManagerSetters =
|
|
14481
|
+
const compositionManagerSetters = useMemo33(() => {
|
|
14420
14482
|
return {
|
|
14421
14483
|
registerComposition,
|
|
14422
14484
|
unregisterComposition,
|
|
@@ -14432,7 +14494,7 @@ var CompositionManagerProvider = ({
|
|
|
14432
14494
|
unregisterFolder,
|
|
14433
14495
|
onlyRenderComposition
|
|
14434
14496
|
]);
|
|
14435
|
-
const compositionManagerContextValue =
|
|
14497
|
+
const compositionManagerContextValue = useMemo33(() => {
|
|
14436
14498
|
return {
|
|
14437
14499
|
compositions,
|
|
14438
14500
|
folders,
|
|
@@ -14530,7 +14592,7 @@ var waitForRoot = (fn) => {
|
|
|
14530
14592
|
};
|
|
14531
14593
|
var MediaEnabledContext = createContext24(null);
|
|
14532
14594
|
var useVideoEnabled = () => {
|
|
14533
|
-
const context =
|
|
14595
|
+
const context = useContext35(MediaEnabledContext);
|
|
14534
14596
|
if (!context) {
|
|
14535
14597
|
return window.remotion_videoEnabled;
|
|
14536
14598
|
}
|
|
@@ -14540,7 +14602,7 @@ var useVideoEnabled = () => {
|
|
|
14540
14602
|
return context.videoEnabled;
|
|
14541
14603
|
};
|
|
14542
14604
|
var useAudioEnabled = () => {
|
|
14543
|
-
const context =
|
|
14605
|
+
const context = useContext35(MediaEnabledContext);
|
|
14544
14606
|
if (!context) {
|
|
14545
14607
|
return window.remotion_audioEnabled;
|
|
14546
14608
|
}
|
|
@@ -14554,7 +14616,7 @@ var MediaEnabledProvider = ({
|
|
|
14554
14616
|
videoEnabled,
|
|
14555
14617
|
audioEnabled
|
|
14556
14618
|
}) => {
|
|
14557
|
-
const value =
|
|
14619
|
+
const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
14558
14620
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
14559
14621
|
value,
|
|
14560
14622
|
children
|
|
@@ -14570,13 +14632,13 @@ var RemotionRootContexts = ({
|
|
|
14570
14632
|
audioEnabled,
|
|
14571
14633
|
frameState
|
|
14572
14634
|
}) => {
|
|
14573
|
-
const nonceContext =
|
|
14635
|
+
const nonceContext = useMemo35(() => {
|
|
14574
14636
|
let counter = 0;
|
|
14575
14637
|
return {
|
|
14576
14638
|
getNonce: () => counter++
|
|
14577
14639
|
};
|
|
14578
14640
|
}, []);
|
|
14579
|
-
const logging =
|
|
14641
|
+
const logging = useMemo35(() => {
|
|
14580
14642
|
return { logLevel, mountTime: Date.now() };
|
|
14581
14643
|
}, [logLevel]);
|
|
14582
14644
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -14877,13 +14939,13 @@ var OffthreadVideoForRendering = ({
|
|
|
14877
14939
|
const frame = useCurrentFrame();
|
|
14878
14940
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
14879
14941
|
const videoConfig = useUnsafeVideoConfig();
|
|
14880
|
-
const sequenceContext =
|
|
14942
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
14881
14943
|
const mediaStartsAt = useMediaStartsAt();
|
|
14882
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
14944
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
14883
14945
|
if (!src) {
|
|
14884
14946
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
14885
14947
|
}
|
|
14886
|
-
const id =
|
|
14948
|
+
const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
14887
14949
|
src,
|
|
14888
14950
|
sequenceContext?.cumulatedFrom,
|
|
14889
14951
|
sequenceContext?.relativeFrom,
|
|
@@ -14938,14 +15000,14 @@ var OffthreadVideoForRendering = ({
|
|
|
14938
15000
|
sequenceContext?.cumulatedNegativeFrom,
|
|
14939
15001
|
audioStreamIndex
|
|
14940
15002
|
]);
|
|
14941
|
-
const currentTime =
|
|
15003
|
+
const currentTime = useMemo36(() => {
|
|
14942
15004
|
return getExpectedMediaFrameUncorrected({
|
|
14943
15005
|
frame,
|
|
14944
15006
|
playbackRate: playbackRate || 1,
|
|
14945
15007
|
startFrom: -mediaStartsAt
|
|
14946
15008
|
}) / videoConfig.fps;
|
|
14947
15009
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
14948
|
-
const actualSrc =
|
|
15010
|
+
const actualSrc = useMemo36(() => {
|
|
14949
15011
|
return getOffthreadVideoSource({
|
|
14950
15012
|
src,
|
|
14951
15013
|
currentTime,
|
|
@@ -15033,7 +15095,7 @@ var OffthreadVideoForRendering = ({
|
|
|
15033
15095
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
15034
15096
|
}
|
|
15035
15097
|
}, [imageSrc, onError]);
|
|
15036
|
-
const className =
|
|
15098
|
+
const className = useMemo36(() => {
|
|
15037
15099
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
15038
15100
|
}, [props2.className]);
|
|
15039
15101
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -15097,12 +15159,12 @@ class MediaPlaybackError extends Error {
|
|
|
15097
15159
|
}
|
|
15098
15160
|
}
|
|
15099
15161
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
15100
|
-
const context =
|
|
15162
|
+
const context = useContext38(SharedAudioContext);
|
|
15101
15163
|
if (!context) {
|
|
15102
15164
|
throw new Error("SharedAudioContext not found");
|
|
15103
15165
|
}
|
|
15104
15166
|
const videoRef = useRef27(null);
|
|
15105
|
-
const sharedSource =
|
|
15167
|
+
const sharedSource = useMemo37(() => {
|
|
15106
15168
|
if (!context.audioContext) {
|
|
15107
15169
|
return null;
|
|
15108
15170
|
}
|
|
@@ -15154,7 +15216,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15154
15216
|
}
|
|
15155
15217
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
15156
15218
|
const { fps, durationInFrames } = useVideoConfig();
|
|
15157
|
-
const parentSequence =
|
|
15219
|
+
const parentSequence = useContext38(SequenceContext);
|
|
15158
15220
|
const logLevel = useLogLevel();
|
|
15159
15221
|
const mountTime = useMountTime();
|
|
15160
15222
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -15305,7 +15367,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15305
15367
|
current.preload = "auto";
|
|
15306
15368
|
}
|
|
15307
15369
|
}, []);
|
|
15308
|
-
const actualStyle =
|
|
15370
|
+
const actualStyle = useMemo37(() => {
|
|
15309
15371
|
return {
|
|
15310
15372
|
...style
|
|
15311
15373
|
};
|
|
@@ -15501,7 +15563,7 @@ function useRemotionContexts() {
|
|
|
15501
15563
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15502
15564
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15503
15565
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15504
|
-
return
|
|
15566
|
+
return useMemo38(() => ({
|
|
15505
15567
|
compositionManagerCtx,
|
|
15506
15568
|
timelineContext,
|
|
15507
15569
|
setTimelineContext,
|
|
@@ -15612,6 +15674,7 @@ var Internals = {
|
|
|
15612
15674
|
textSchema,
|
|
15613
15675
|
transformSchema,
|
|
15614
15676
|
premountSchema,
|
|
15677
|
+
premountStyleSchema,
|
|
15615
15678
|
flattenActiveSchema,
|
|
15616
15679
|
getFlatSchemaWithAllKeys,
|
|
15617
15680
|
RemotionRootContexts,
|
|
@@ -15625,6 +15688,7 @@ var Internals = {
|
|
|
15625
15688
|
truthy,
|
|
15626
15689
|
SequenceContext,
|
|
15627
15690
|
PremountContext,
|
|
15691
|
+
usePremounting,
|
|
15628
15692
|
useRemotionContexts,
|
|
15629
15693
|
RemotionContextProvider,
|
|
15630
15694
|
CSSUtils: exports_default_css,
|
|
@@ -15800,7 +15864,7 @@ var validateSeriesSequenceProps = ({
|
|
|
15800
15864
|
return offset;
|
|
15801
15865
|
};
|
|
15802
15866
|
var SeriesInner = (props2) => {
|
|
15803
|
-
const childrenValue =
|
|
15867
|
+
const childrenValue = useMemo39(() => {
|
|
15804
15868
|
const flattenedChildren = flattenChildren(props2.children);
|
|
15805
15869
|
const renderChildren = (i, startFrame) => {
|
|
15806
15870
|
if (i === flattenedChildren.length) {
|
|
@@ -16129,14 +16193,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
16129
16193
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
16130
16194
|
const videoConfig = useUnsafeVideoConfig();
|
|
16131
16195
|
const videoRef = useRef28(null);
|
|
16132
|
-
const sequenceContext =
|
|
16196
|
+
const sequenceContext = useContext39(SequenceContext);
|
|
16133
16197
|
const mediaStartsAt = useMediaStartsAt();
|
|
16134
16198
|
const environment = useRemotionEnvironment();
|
|
16135
16199
|
const logLevel = useLogLevel();
|
|
16136
16200
|
const mountTime = useMountTime();
|
|
16137
16201
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
16138
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
16139
|
-
const id =
|
|
16202
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
16203
|
+
const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
16140
16204
|
props2.src,
|
|
16141
16205
|
sequenceContext?.cumulatedFrom,
|
|
16142
16206
|
sequenceContext?.relativeFrom,
|
|
@@ -16347,7 +16411,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
16347
16411
|
if (environment.isClientSideRendering) {
|
|
16348
16412
|
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");
|
|
16349
16413
|
}
|
|
16350
|
-
const { durations, setDurations } =
|
|
16414
|
+
const { durations, setDurations } = useContext40(DurationsContext);
|
|
16351
16415
|
if (typeof ref === "string") {
|
|
16352
16416
|
throw new Error("string refs are not supported");
|
|
16353
16417
|
}
|
|
@@ -16466,7 +16530,7 @@ addSequenceStackTraces(Composition);
|
|
|
16466
16530
|
addSequenceStackTraces(Folder);
|
|
16467
16531
|
|
|
16468
16532
|
// ../shapes/dist/esm/index.mjs
|
|
16469
|
-
import React, { useCallback as useCallback26, useMemo as
|
|
16533
|
+
import React, { useCallback as useCallback26, useMemo as useMemo41, useRef as useRef29 } from "react";
|
|
16470
16534
|
import { version } from "react-dom";
|
|
16471
16535
|
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
16472
16536
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -16648,13 +16712,13 @@ var RenderSvg = ({
|
|
|
16648
16712
|
stack,
|
|
16649
16713
|
...props
|
|
16650
16714
|
}) => {
|
|
16651
|
-
const actualStyle =
|
|
16715
|
+
const actualStyle = useMemo41(() => {
|
|
16652
16716
|
return {
|
|
16653
16717
|
overflow: "visible",
|
|
16654
16718
|
...style ?? {}
|
|
16655
16719
|
};
|
|
16656
16720
|
}, [style]);
|
|
16657
|
-
const actualPathStyle =
|
|
16721
|
+
const actualPathStyle = useMemo41(() => {
|
|
16658
16722
|
return {
|
|
16659
16723
|
transformBox: "fill-box",
|
|
16660
16724
|
...pathStyle ?? {}
|
|
@@ -19633,7 +19697,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19633
19697
|
progress: 0,
|
|
19634
19698
|
isActive: false
|
|
19635
19699
|
});
|
|
19636
|
-
const eventTarget =
|
|
19700
|
+
const eventTarget = useMemo43(() => new EventTarget, []);
|
|
19637
19701
|
useEffect21(() => {
|
|
19638
19702
|
if (disabled) {
|
|
19639
19703
|
eventTarget.dispatchEvent(new Event("disabled"));
|