@remotion/promo-pages 4.0.493 → 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 +505 -362
- package/dist/design.js +294 -227
- package/dist/experts.js +291 -224
- package/dist/homepage/Pricing.js +301 -234
- package/dist/prompts/PromptsGallery.js +294 -227
- package/dist/prompts/PromptsShow.js +318 -251
- package/dist/prompts/PromptsSubmit.js +294 -227
- package/dist/team.js +294 -227
- package/dist/template-modal-content.js +296 -229
- package/dist/templates.js +294 -227
- package/package.json +13 -13
package/dist/design.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 : 1,
|
|
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
|
}
|
|
@@ -9532,6 +9585,13 @@ var decodeImage = async ({
|
|
|
9532
9585
|
frameCount: selectedTrack.frameCount
|
|
9533
9586
|
};
|
|
9534
9587
|
};
|
|
9588
|
+
var getCurrentTime = ({
|
|
9589
|
+
frame,
|
|
9590
|
+
playbackRate,
|
|
9591
|
+
fps
|
|
9592
|
+
}) => {
|
|
9593
|
+
return frame * playbackRate / fps;
|
|
9594
|
+
};
|
|
9535
9595
|
var serializeRequestInit = (requestInit) => {
|
|
9536
9596
|
if (!requestInit) {
|
|
9537
9597
|
return null;
|
|
@@ -9599,7 +9659,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
9599
9659
|
const [decodeHandle] = useState6(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
9600
9660
|
const frame = useCurrentFrame();
|
|
9601
9661
|
const { fps } = useVideoConfig();
|
|
9602
|
-
const currentTime = frame
|
|
9662
|
+
const currentTime = getCurrentTime({ frame, playbackRate, fps });
|
|
9603
9663
|
const currentTimeRef = useRef9(currentTime);
|
|
9604
9664
|
currentTimeRef.current = currentTime;
|
|
9605
9665
|
const requestInitKey = serializeRequestInit(requestInit);
|
|
@@ -9727,8 +9787,6 @@ var AnimatedImageInner = ({
|
|
|
9727
9787
|
ref,
|
|
9728
9788
|
...sequenceProps
|
|
9729
9789
|
}) => {
|
|
9730
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
9731
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
9732
9790
|
const actualRef = useRef9(null);
|
|
9733
9791
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
9734
9792
|
useImperativeHandle2(ref, () => {
|
|
@@ -9751,7 +9809,7 @@ var AnimatedImageInner = ({
|
|
|
9751
9809
|
};
|
|
9752
9810
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
9753
9811
|
layout: "none",
|
|
9754
|
-
durationInFrames
|
|
9812
|
+
durationInFrames,
|
|
9755
9813
|
name: "<AnimatedImage>",
|
|
9756
9814
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
9757
9815
|
controls,
|
|
@@ -9877,7 +9935,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
9877
9935
|
};
|
|
9878
9936
|
}
|
|
9879
9937
|
}, []);
|
|
9880
|
-
const contextValue =
|
|
9938
|
+
const contextValue = useMemo18(() => {
|
|
9881
9939
|
return {
|
|
9882
9940
|
registerRenderAsset,
|
|
9883
9941
|
unregisterRenderAsset,
|
|
@@ -9891,7 +9949,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
9891
9949
|
};
|
|
9892
9950
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
9893
9951
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
9894
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9952
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
9895
9953
|
const env = useRemotionEnvironment();
|
|
9896
9954
|
const frame = useCurrentFrame();
|
|
9897
9955
|
const [id] = useState8(() => {
|
|
@@ -10006,14 +10064,14 @@ var Loop = ({
|
|
|
10006
10064
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
10007
10065
|
const start = iteration * durationInFrames;
|
|
10008
10066
|
const from = Math.min(start, maxFrame);
|
|
10009
|
-
const loopDisplay =
|
|
10067
|
+
const loopDisplay = useMemo19(() => {
|
|
10010
10068
|
return {
|
|
10011
10069
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
10012
10070
|
startOffset: -from,
|
|
10013
10071
|
durationInFrames
|
|
10014
10072
|
};
|
|
10015
10073
|
}, [compDuration, durationInFrames, from, times]);
|
|
10016
|
-
const loopContext =
|
|
10074
|
+
const loopContext = useMemo19(() => {
|
|
10017
10075
|
return {
|
|
10018
10076
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
10019
10077
|
durationInFrames
|
|
@@ -10082,7 +10140,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
10082
10140
|
return src.slice(0, hashIndex);
|
|
10083
10141
|
};
|
|
10084
10142
|
var usePreload = (src) => {
|
|
10085
|
-
const preloads2 =
|
|
10143
|
+
const preloads2 = useContext20(PreloadContext);
|
|
10086
10144
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
10087
10145
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
10088
10146
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -10385,7 +10443,7 @@ var DurationsContext = createContext20({
|
|
|
10385
10443
|
});
|
|
10386
10444
|
var DurationsContextProvider = ({ children }) => {
|
|
10387
10445
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
10388
|
-
const value =
|
|
10446
|
+
const value = useMemo20(() => {
|
|
10389
10447
|
return {
|
|
10390
10448
|
durations,
|
|
10391
10449
|
setDurations
|
|
@@ -10524,7 +10582,7 @@ var useSingletonAudioContext = ({
|
|
|
10524
10582
|
if (sampleRate !== initialSampleRate.current) {
|
|
10525
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.`);
|
|
10526
10584
|
}
|
|
10527
|
-
const context =
|
|
10585
|
+
const context = useMemo21(() => {
|
|
10528
10586
|
if (env.isRendering) {
|
|
10529
10587
|
return null;
|
|
10530
10588
|
}
|
|
@@ -10658,9 +10716,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10658
10716
|
});
|
|
10659
10717
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
10660
10718
|
const isResuming = useRef12(null);
|
|
10661
|
-
const audioSyncAnchor =
|
|
10719
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
10662
10720
|
const audioSyncAnchorListeners = useRef12([]);
|
|
10663
|
-
const audioSyncAnchorEmitter =
|
|
10721
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
10664
10722
|
return {
|
|
10665
10723
|
dispatch: (event) => {
|
|
10666
10724
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -10680,7 +10738,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10680
10738
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
10681
10739
|
nodesToResume.current.delete(node);
|
|
10682
10740
|
}, []);
|
|
10683
|
-
const scheduleAudioNode =
|
|
10741
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
10684
10742
|
return ({
|
|
10685
10743
|
node,
|
|
10686
10744
|
mediaTimestamp,
|
|
@@ -10772,7 +10830,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10772
10830
|
audioContextIsPlayingEventually.current = false;
|
|
10773
10831
|
return ctxAndGain.suspend();
|
|
10774
10832
|
}, [ctxAndGain]);
|
|
10775
|
-
const audioContextValue =
|
|
10833
|
+
const audioContextValue = useMemo22(() => {
|
|
10776
10834
|
return {
|
|
10777
10835
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
10778
10836
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -10809,10 +10867,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10809
10867
|
const logLevel = useLogLevel();
|
|
10810
10868
|
const mountTime = useMountTime();
|
|
10811
10869
|
const env = useRemotionEnvironment();
|
|
10812
|
-
const audioCtx =
|
|
10870
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
10813
10871
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
10814
10872
|
const resume = audioCtx?.resume;
|
|
10815
|
-
const refs =
|
|
10873
|
+
const refs = useMemo22(() => {
|
|
10816
10874
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
10817
10875
|
const ref = createRef2();
|
|
10818
10876
|
return {
|
|
@@ -10951,7 +11009,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10951
11009
|
});
|
|
10952
11010
|
resume?.();
|
|
10953
11011
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
10954
|
-
const audioTagsValue =
|
|
11012
|
+
const audioTagsValue = useMemo22(() => {
|
|
10955
11013
|
return {
|
|
10956
11014
|
registerAudio,
|
|
10957
11015
|
unregisterAudio,
|
|
@@ -10966,7 +11024,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10966
11024
|
unregisterAudio,
|
|
10967
11025
|
updateAudio
|
|
10968
11026
|
]);
|
|
10969
|
-
const sharedAudioTagElements =
|
|
11027
|
+
const sharedAudioTagElements = useMemo22(() => {
|
|
10970
11028
|
return refs.map(({ id, ref }) => {
|
|
10971
11029
|
return /* @__PURE__ */ jsx19("audio", {
|
|
10972
11030
|
ref,
|
|
@@ -10989,8 +11047,8 @@ var useSharedAudio = ({
|
|
|
10989
11047
|
premounting,
|
|
10990
11048
|
postmounting
|
|
10991
11049
|
}) => {
|
|
10992
|
-
const audioCtx =
|
|
10993
|
-
const tagsCtx =
|
|
11050
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
11051
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
10994
11052
|
const [elem] = useState10(() => {
|
|
10995
11053
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
10996
11054
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -11169,7 +11227,7 @@ var useVolume = ({
|
|
|
11169
11227
|
const audioStuffRef = useRef14(null);
|
|
11170
11228
|
const currentVolumeRef = useRef14(volume);
|
|
11171
11229
|
currentVolumeRef.current = volume;
|
|
11172
|
-
const sharedAudioContext =
|
|
11230
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
11173
11231
|
if (!sharedAudioContext) {
|
|
11174
11232
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
11175
11233
|
}
|
|
@@ -11234,7 +11292,7 @@ var useVolume = ({
|
|
|
11234
11292
|
return audioStuffRef;
|
|
11235
11293
|
};
|
|
11236
11294
|
var useMediaStartsAt = () => {
|
|
11237
|
-
const parentSequence =
|
|
11295
|
+
const parentSequence = useContext23(SequenceContext);
|
|
11238
11296
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
11239
11297
|
};
|
|
11240
11298
|
var useFrameForVolumeProp = (behavior) => {
|
|
@@ -11323,7 +11381,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11323
11381
|
if (!src) {
|
|
11324
11382
|
throw new Error("No src passed");
|
|
11325
11383
|
}
|
|
11326
|
-
const parentSequence =
|
|
11384
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11327
11385
|
const [initialVolume] = useState11(() => volume);
|
|
11328
11386
|
const duration = getTimelineDuration({
|
|
11329
11387
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -11333,7 +11391,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11333
11391
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
11334
11392
|
loop
|
|
11335
11393
|
});
|
|
11336
|
-
const volumes =
|
|
11394
|
+
const volumes = useMemo23(() => {
|
|
11337
11395
|
if (typeof volume === "number") {
|
|
11338
11396
|
return volume;
|
|
11339
11397
|
}
|
|
@@ -11354,7 +11412,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11354
11412
|
const nonce = useNonce();
|
|
11355
11413
|
const { rootId } = useTimelineContext();
|
|
11356
11414
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
11357
|
-
const memoizedResult =
|
|
11415
|
+
const memoizedResult = useMemo23(() => {
|
|
11358
11416
|
return {
|
|
11359
11417
|
volumes,
|
|
11360
11418
|
duration,
|
|
@@ -11395,9 +11453,9 @@ var useMediaInTimeline = ({
|
|
|
11395
11453
|
documentationLink,
|
|
11396
11454
|
refForOutline
|
|
11397
11455
|
}) => {
|
|
11398
|
-
const parentSequence =
|
|
11456
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11399
11457
|
const startsAt = useMediaStartsAt();
|
|
11400
|
-
const { registerSequence, unregisterSequence } =
|
|
11458
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
11401
11459
|
const { durationInFrames } = useVideoConfig();
|
|
11402
11460
|
const mediaStartsAt = useMediaStartsAt();
|
|
11403
11461
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -11562,13 +11620,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11562
11620
|
}
|
|
11563
11621
|
}, [blocks]);
|
|
11564
11622
|
}
|
|
11565
|
-
return
|
|
11623
|
+
return useMemo24(() => {
|
|
11566
11624
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11567
11625
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11568
11626
|
};
|
|
11569
11627
|
var BufferingContextReact = React21.createContext(null);
|
|
11570
11628
|
var BufferingProvider = ({ children }) => {
|
|
11571
|
-
const { logLevel, mountTime } =
|
|
11629
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
11572
11630
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
11573
11631
|
return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
|
|
11574
11632
|
value: bufferManager,
|
|
@@ -11594,10 +11652,10 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
11594
11652
|
return isBuffering;
|
|
11595
11653
|
};
|
|
11596
11654
|
var useBufferState = () => {
|
|
11597
|
-
const buffer =
|
|
11655
|
+
const buffer = useContext26(BufferingContextReact);
|
|
11598
11656
|
const logLevel = useLogLevel();
|
|
11599
11657
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
11600
|
-
return
|
|
11658
|
+
return useMemo25(() => ({
|
|
11601
11659
|
delayPlayback: () => {
|
|
11602
11660
|
if (!addBlock) {
|
|
11603
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");
|
|
@@ -11705,7 +11763,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
11705
11763
|
onVariableFpsVideoDetected,
|
|
11706
11764
|
pauseWhenBuffering
|
|
11707
11765
|
]);
|
|
11708
|
-
return
|
|
11766
|
+
return useMemo26(() => {
|
|
11709
11767
|
return {
|
|
11710
11768
|
isBuffering: () => bufferingRef.current,
|
|
11711
11769
|
bufferUntilFirstFrame
|
|
@@ -12079,7 +12137,7 @@ var useMediaPlayback = ({
|
|
|
12079
12137
|
const frame = useCurrentFrame();
|
|
12080
12138
|
const absoluteFrame = useTimelinePosition();
|
|
12081
12139
|
const [playing] = usePlayingState();
|
|
12082
|
-
const buffering =
|
|
12140
|
+
const buffering = useContext27(BufferingContextReact);
|
|
12083
12141
|
const { fps } = useVideoConfig();
|
|
12084
12142
|
const mediaStartsAt = useMediaStartsAt();
|
|
12085
12143
|
const lastSeekDueToShift = useRef18(null);
|
|
@@ -12374,16 +12432,16 @@ var SetMediaVolumeContext = createContext22({
|
|
|
12374
12432
|
}
|
|
12375
12433
|
});
|
|
12376
12434
|
var useMediaVolumeState = () => {
|
|
12377
|
-
const { mediaVolume } =
|
|
12378
|
-
const { setMediaVolume } =
|
|
12379
|
-
return
|
|
12435
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
12436
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
12437
|
+
return useMemo27(() => {
|
|
12380
12438
|
return [mediaVolume, setMediaVolume];
|
|
12381
12439
|
}, [mediaVolume, setMediaVolume]);
|
|
12382
12440
|
};
|
|
12383
12441
|
var usePlayerMutedState = () => {
|
|
12384
|
-
const { playerMuted } =
|
|
12385
|
-
const { setPlayerMuted } =
|
|
12386
|
-
return
|
|
12442
|
+
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
12443
|
+
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
12444
|
+
return useMemo27(() => {
|
|
12387
12445
|
return [playerMuted, setPlayerMuted];
|
|
12388
12446
|
}, [playerMuted, setPlayerMuted]);
|
|
12389
12447
|
};
|
|
@@ -12437,7 +12495,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12437
12495
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
12438
12496
|
}
|
|
12439
12497
|
const preloadedSrc = usePreload(src);
|
|
12440
|
-
const sequenceContext =
|
|
12498
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
12441
12499
|
const [timelineId] = useState14(() => String(Math.random()));
|
|
12442
12500
|
const userPreferredVolume = evaluateVolume({
|
|
12443
12501
|
frame: volumePropFrame,
|
|
@@ -12450,7 +12508,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12450
12508
|
requestsVideoFrame: false,
|
|
12451
12509
|
isClientSideRendering: false
|
|
12452
12510
|
});
|
|
12453
|
-
const propsToPass =
|
|
12511
|
+
const propsToPass = useMemo28(() => {
|
|
12454
12512
|
return {
|
|
12455
12513
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
12456
12514
|
src: preloadedSrc,
|
|
@@ -12467,7 +12525,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12467
12525
|
userPreferredVolume,
|
|
12468
12526
|
crossOriginValue
|
|
12469
12527
|
]);
|
|
12470
|
-
const id =
|
|
12528
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
12471
12529
|
src,
|
|
12472
12530
|
sequenceContext?.relativeFrom,
|
|
12473
12531
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12597,10 +12655,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12597
12655
|
const absoluteFrame = useTimelinePosition();
|
|
12598
12656
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
12599
12657
|
const frame = useCurrentFrame();
|
|
12600
|
-
const sequenceContext =
|
|
12601
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12658
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
12659
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
12602
12660
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12603
|
-
const id =
|
|
12661
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12604
12662
|
props.src,
|
|
12605
12663
|
sequenceContext?.relativeFrom,
|
|
12606
12664
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12707,7 +12765,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12707
12765
|
};
|
|
12708
12766
|
var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
|
|
12709
12767
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
12710
|
-
const audioTagsContext =
|
|
12768
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
12711
12769
|
const propsWithFreeze = props;
|
|
12712
12770
|
const {
|
|
12713
12771
|
startFrom,
|
|
@@ -12731,7 +12789,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
12731
12789
|
if (typeof freeze !== "undefined") {
|
|
12732
12790
|
throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
|
|
12733
12791
|
}
|
|
12734
|
-
const { durations, setDurations } =
|
|
12792
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
12735
12793
|
if (typeof props.src !== "string") {
|
|
12736
12794
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
12737
12795
|
}
|
|
@@ -12893,7 +12951,7 @@ var SolidInner = ({
|
|
|
12893
12951
|
effects,
|
|
12894
12952
|
overrideId: overrideId ?? null
|
|
12895
12953
|
});
|
|
12896
|
-
const sourceCanvas =
|
|
12954
|
+
const sourceCanvas = useMemo30(() => {
|
|
12897
12955
|
if (typeof document === "undefined") {
|
|
12898
12956
|
return null;
|
|
12899
12957
|
}
|
|
@@ -12961,7 +13019,7 @@ var SolidInner = ({
|
|
|
12961
13019
|
cancelRender2,
|
|
12962
13020
|
memoizedEffects
|
|
12963
13021
|
]);
|
|
12964
|
-
const canvasStyle =
|
|
13022
|
+
const canvasStyle = useMemo30(() => {
|
|
12965
13023
|
return {
|
|
12966
13024
|
width,
|
|
12967
13025
|
height,
|
|
@@ -13110,7 +13168,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13110
13168
|
controls,
|
|
13111
13169
|
style
|
|
13112
13170
|
}, ref) => {
|
|
13113
|
-
const ancestor =
|
|
13171
|
+
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
13114
13172
|
assertHtmlInCanvasDimensions(width, height);
|
|
13115
13173
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
13116
13174
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
@@ -13329,20 +13387,20 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13329
13387
|
continueRender2(handle);
|
|
13330
13388
|
};
|
|
13331
13389
|
}, [width, height, continueRender2, canvasSizeKey]);
|
|
13332
|
-
const innerStyle =
|
|
13390
|
+
const innerStyle = useMemo31(() => {
|
|
13333
13391
|
return {
|
|
13334
13392
|
width,
|
|
13335
13393
|
height
|
|
13336
13394
|
};
|
|
13337
13395
|
}, [width, height]);
|
|
13338
|
-
const canvasStyle =
|
|
13396
|
+
const canvasStyle = useMemo31(() => {
|
|
13339
13397
|
return {
|
|
13340
13398
|
width,
|
|
13341
13399
|
height,
|
|
13342
13400
|
...style ?? {}
|
|
13343
13401
|
};
|
|
13344
13402
|
}, [height, style, width]);
|
|
13345
|
-
const ancestorValue =
|
|
13403
|
+
const ancestorValue = useMemo31(() => {
|
|
13346
13404
|
return {
|
|
13347
13405
|
requestParentPaint: () => {
|
|
13348
13406
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -13379,8 +13437,6 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
13379
13437
|
name,
|
|
13380
13438
|
...sequenceProps
|
|
13381
13439
|
}, ref) => {
|
|
13382
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
13383
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
13384
13440
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
13385
13441
|
const actualRef = useRef22(null);
|
|
13386
13442
|
const setCanvasRef = useCallback16((node) => {
|
|
@@ -13392,7 +13448,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
13392
13448
|
}
|
|
13393
13449
|
}, [ref]);
|
|
13394
13450
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
13395
|
-
durationInFrames
|
|
13451
|
+
durationInFrames,
|
|
13396
13452
|
name: name ?? "<HtmlInCanvas>",
|
|
13397
13453
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
13398
13454
|
controls,
|
|
@@ -13558,7 +13614,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13558
13614
|
effects,
|
|
13559
13615
|
overrideId: controls?.overrideId ?? null
|
|
13560
13616
|
});
|
|
13561
|
-
const sequenceContext =
|
|
13617
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
13562
13618
|
const pendingLoadDelayRef = useRef23(null);
|
|
13563
13619
|
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
13564
13620
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
@@ -13575,7 +13631,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13575
13631
|
continueRender2(pending.handle);
|
|
13576
13632
|
pendingLoadDelayRef.current = null;
|
|
13577
13633
|
}, [continueRender2]);
|
|
13578
|
-
const sourceCanvas =
|
|
13634
|
+
const sourceCanvas = useMemo32(() => {
|
|
13579
13635
|
if (typeof document === "undefined") {
|
|
13580
13636
|
return null;
|
|
13581
13637
|
}
|
|
@@ -13897,7 +13953,7 @@ var ImgContent = ({
|
|
|
13897
13953
|
const imageRef = useRef24(null);
|
|
13898
13954
|
const errors = useRef24({});
|
|
13899
13955
|
const { delayPlayback } = useBufferState();
|
|
13900
|
-
const sequenceContext =
|
|
13956
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
13901
13957
|
const [isLoading, setIsLoading] = useState18(false);
|
|
13902
13958
|
const _propsValid = true;
|
|
13903
13959
|
if (!_propsValid) {
|
|
@@ -14246,7 +14302,10 @@ var makeRemotionComponentIdentity = ({
|
|
|
14246
14302
|
};
|
|
14247
14303
|
var interactiveElementSchema = {
|
|
14248
14304
|
...baseSchema,
|
|
14249
|
-
...transformSchema
|
|
14305
|
+
...transformSchema
|
|
14306
|
+
};
|
|
14307
|
+
var interactiveTextElementSchema = {
|
|
14308
|
+
...interactiveElementSchema,
|
|
14250
14309
|
...textSchema,
|
|
14251
14310
|
...textContentSchema
|
|
14252
14311
|
};
|
|
@@ -14262,7 +14321,7 @@ var withSchema = (options) => {
|
|
|
14262
14321
|
addSequenceStackTraces(Wrapped);
|
|
14263
14322
|
return Wrapped;
|
|
14264
14323
|
};
|
|
14265
|
-
var makeInteractiveElement = (tag, displayName) => {
|
|
14324
|
+
var makeInteractiveElement = (tag, displayName, schema) => {
|
|
14266
14325
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
14267
14326
|
const {
|
|
14268
14327
|
durationInFrames,
|
|
@@ -14308,12 +14367,18 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14308
14367
|
packageName: "remotion",
|
|
14309
14368
|
componentName: displayName.slice(1, -1)
|
|
14310
14369
|
}),
|
|
14311
|
-
schema
|
|
14370
|
+
schema,
|
|
14312
14371
|
supportsEffects: false
|
|
14313
14372
|
});
|
|
14314
14373
|
Wrapped.displayName = displayName;
|
|
14315
14374
|
return Wrapped;
|
|
14316
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
|
+
};
|
|
14317
14382
|
var Interactive = {
|
|
14318
14383
|
baseSchema,
|
|
14319
14384
|
transformSchema,
|
|
@@ -14322,41 +14387,41 @@ var Interactive = {
|
|
|
14322
14387
|
sequenceSchema,
|
|
14323
14388
|
withSchema,
|
|
14324
14389
|
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
14325
|
-
A:
|
|
14326
|
-
Article:
|
|
14327
|
-
Aside:
|
|
14328
|
-
Button:
|
|
14329
|
-
Circle:
|
|
14330
|
-
Code:
|
|
14331
|
-
Div:
|
|
14332
|
-
Ellipse:
|
|
14333
|
-
Em:
|
|
14334
|
-
Footer:
|
|
14335
|
-
G:
|
|
14336
|
-
H1:
|
|
14337
|
-
H2:
|
|
14338
|
-
H3:
|
|
14339
|
-
H4:
|
|
14340
|
-
H5:
|
|
14341
|
-
H6:
|
|
14342
|
-
Header:
|
|
14343
|
-
Label:
|
|
14344
|
-
Li:
|
|
14345
|
-
Line:
|
|
14346
|
-
Main:
|
|
14347
|
-
Nav:
|
|
14348
|
-
Ol:
|
|
14349
|
-
P:
|
|
14350
|
-
Path:
|
|
14351
|
-
Pre:
|
|
14352
|
-
Rect:
|
|
14353
|
-
Section:
|
|
14354
|
-
Small:
|
|
14355
|
-
Span:
|
|
14356
|
-
Strong:
|
|
14357
|
-
Svg:
|
|
14358
|
-
Text:
|
|
14359
|
-
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>")
|
|
14360
14425
|
};
|
|
14361
14426
|
var compositionsRef = React31.createRef();
|
|
14362
14427
|
var CompositionManagerProvider = ({
|
|
@@ -14413,7 +14478,7 @@ var CompositionManagerProvider = ({
|
|
|
14413
14478
|
getCompositions: () => currentcompositionsRef.current
|
|
14414
14479
|
};
|
|
14415
14480
|
}, []);
|
|
14416
|
-
const compositionManagerSetters =
|
|
14481
|
+
const compositionManagerSetters = useMemo33(() => {
|
|
14417
14482
|
return {
|
|
14418
14483
|
registerComposition,
|
|
14419
14484
|
unregisterComposition,
|
|
@@ -14429,7 +14494,7 @@ var CompositionManagerProvider = ({
|
|
|
14429
14494
|
unregisterFolder,
|
|
14430
14495
|
onlyRenderComposition
|
|
14431
14496
|
]);
|
|
14432
|
-
const compositionManagerContextValue =
|
|
14497
|
+
const compositionManagerContextValue = useMemo33(() => {
|
|
14433
14498
|
return {
|
|
14434
14499
|
compositions,
|
|
14435
14500
|
folders,
|
|
@@ -14527,7 +14592,7 @@ var waitForRoot = (fn) => {
|
|
|
14527
14592
|
};
|
|
14528
14593
|
var MediaEnabledContext = createContext24(null);
|
|
14529
14594
|
var useVideoEnabled = () => {
|
|
14530
|
-
const context =
|
|
14595
|
+
const context = useContext35(MediaEnabledContext);
|
|
14531
14596
|
if (!context) {
|
|
14532
14597
|
return window.remotion_videoEnabled;
|
|
14533
14598
|
}
|
|
@@ -14537,7 +14602,7 @@ var useVideoEnabled = () => {
|
|
|
14537
14602
|
return context.videoEnabled;
|
|
14538
14603
|
};
|
|
14539
14604
|
var useAudioEnabled = () => {
|
|
14540
|
-
const context =
|
|
14605
|
+
const context = useContext35(MediaEnabledContext);
|
|
14541
14606
|
if (!context) {
|
|
14542
14607
|
return window.remotion_audioEnabled;
|
|
14543
14608
|
}
|
|
@@ -14551,7 +14616,7 @@ var MediaEnabledProvider = ({
|
|
|
14551
14616
|
videoEnabled,
|
|
14552
14617
|
audioEnabled
|
|
14553
14618
|
}) => {
|
|
14554
|
-
const value =
|
|
14619
|
+
const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
14555
14620
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
14556
14621
|
value,
|
|
14557
14622
|
children
|
|
@@ -14567,13 +14632,13 @@ var RemotionRootContexts = ({
|
|
|
14567
14632
|
audioEnabled,
|
|
14568
14633
|
frameState
|
|
14569
14634
|
}) => {
|
|
14570
|
-
const nonceContext =
|
|
14635
|
+
const nonceContext = useMemo35(() => {
|
|
14571
14636
|
let counter = 0;
|
|
14572
14637
|
return {
|
|
14573
14638
|
getNonce: () => counter++
|
|
14574
14639
|
};
|
|
14575
14640
|
}, []);
|
|
14576
|
-
const logging =
|
|
14641
|
+
const logging = useMemo35(() => {
|
|
14577
14642
|
return { logLevel, mountTime: Date.now() };
|
|
14578
14643
|
}, [logLevel]);
|
|
14579
14644
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -14874,13 +14939,13 @@ var OffthreadVideoForRendering = ({
|
|
|
14874
14939
|
const frame = useCurrentFrame();
|
|
14875
14940
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
14876
14941
|
const videoConfig = useUnsafeVideoConfig();
|
|
14877
|
-
const sequenceContext =
|
|
14942
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
14878
14943
|
const mediaStartsAt = useMediaStartsAt();
|
|
14879
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
14944
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
14880
14945
|
if (!src) {
|
|
14881
14946
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
14882
14947
|
}
|
|
14883
|
-
const id =
|
|
14948
|
+
const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
14884
14949
|
src,
|
|
14885
14950
|
sequenceContext?.cumulatedFrom,
|
|
14886
14951
|
sequenceContext?.relativeFrom,
|
|
@@ -14935,14 +15000,14 @@ var OffthreadVideoForRendering = ({
|
|
|
14935
15000
|
sequenceContext?.cumulatedNegativeFrom,
|
|
14936
15001
|
audioStreamIndex
|
|
14937
15002
|
]);
|
|
14938
|
-
const currentTime =
|
|
15003
|
+
const currentTime = useMemo36(() => {
|
|
14939
15004
|
return getExpectedMediaFrameUncorrected({
|
|
14940
15005
|
frame,
|
|
14941
15006
|
playbackRate: playbackRate || 1,
|
|
14942
15007
|
startFrom: -mediaStartsAt
|
|
14943
15008
|
}) / videoConfig.fps;
|
|
14944
15009
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
14945
|
-
const actualSrc =
|
|
15010
|
+
const actualSrc = useMemo36(() => {
|
|
14946
15011
|
return getOffthreadVideoSource({
|
|
14947
15012
|
src,
|
|
14948
15013
|
currentTime,
|
|
@@ -15030,7 +15095,7 @@ var OffthreadVideoForRendering = ({
|
|
|
15030
15095
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
15031
15096
|
}
|
|
15032
15097
|
}, [imageSrc, onError]);
|
|
15033
|
-
const className =
|
|
15098
|
+
const className = useMemo36(() => {
|
|
15034
15099
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
15035
15100
|
}, [props2.className]);
|
|
15036
15101
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -15094,12 +15159,12 @@ class MediaPlaybackError extends Error {
|
|
|
15094
15159
|
}
|
|
15095
15160
|
}
|
|
15096
15161
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
15097
|
-
const context =
|
|
15162
|
+
const context = useContext38(SharedAudioContext);
|
|
15098
15163
|
if (!context) {
|
|
15099
15164
|
throw new Error("SharedAudioContext not found");
|
|
15100
15165
|
}
|
|
15101
15166
|
const videoRef = useRef27(null);
|
|
15102
|
-
const sharedSource =
|
|
15167
|
+
const sharedSource = useMemo37(() => {
|
|
15103
15168
|
if (!context.audioContext) {
|
|
15104
15169
|
return null;
|
|
15105
15170
|
}
|
|
@@ -15151,7 +15216,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15151
15216
|
}
|
|
15152
15217
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
15153
15218
|
const { fps, durationInFrames } = useVideoConfig();
|
|
15154
|
-
const parentSequence =
|
|
15219
|
+
const parentSequence = useContext38(SequenceContext);
|
|
15155
15220
|
const logLevel = useLogLevel();
|
|
15156
15221
|
const mountTime = useMountTime();
|
|
15157
15222
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -15302,7 +15367,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15302
15367
|
current.preload = "auto";
|
|
15303
15368
|
}
|
|
15304
15369
|
}, []);
|
|
15305
|
-
const actualStyle =
|
|
15370
|
+
const actualStyle = useMemo37(() => {
|
|
15306
15371
|
return {
|
|
15307
15372
|
...style
|
|
15308
15373
|
};
|
|
@@ -15498,7 +15563,7 @@ function useRemotionContexts() {
|
|
|
15498
15563
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15499
15564
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15500
15565
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15501
|
-
return
|
|
15566
|
+
return useMemo38(() => ({
|
|
15502
15567
|
compositionManagerCtx,
|
|
15503
15568
|
timelineContext,
|
|
15504
15569
|
setTimelineContext,
|
|
@@ -15609,6 +15674,7 @@ var Internals = {
|
|
|
15609
15674
|
textSchema,
|
|
15610
15675
|
transformSchema,
|
|
15611
15676
|
premountSchema,
|
|
15677
|
+
premountStyleSchema,
|
|
15612
15678
|
flattenActiveSchema,
|
|
15613
15679
|
getFlatSchemaWithAllKeys,
|
|
15614
15680
|
RemotionRootContexts,
|
|
@@ -15622,6 +15688,7 @@ var Internals = {
|
|
|
15622
15688
|
truthy,
|
|
15623
15689
|
SequenceContext,
|
|
15624
15690
|
PremountContext,
|
|
15691
|
+
usePremounting,
|
|
15625
15692
|
useRemotionContexts,
|
|
15626
15693
|
RemotionContextProvider,
|
|
15627
15694
|
CSSUtils: exports_default_css,
|
|
@@ -15797,7 +15864,7 @@ var validateSeriesSequenceProps = ({
|
|
|
15797
15864
|
return offset;
|
|
15798
15865
|
};
|
|
15799
15866
|
var SeriesInner = (props2) => {
|
|
15800
|
-
const childrenValue =
|
|
15867
|
+
const childrenValue = useMemo39(() => {
|
|
15801
15868
|
const flattenedChildren = flattenChildren(props2.children);
|
|
15802
15869
|
const renderChildren = (i, startFrame) => {
|
|
15803
15870
|
if (i === flattenedChildren.length) {
|
|
@@ -16126,14 +16193,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
16126
16193
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
16127
16194
|
const videoConfig = useUnsafeVideoConfig();
|
|
16128
16195
|
const videoRef = useRef28(null);
|
|
16129
|
-
const sequenceContext =
|
|
16196
|
+
const sequenceContext = useContext39(SequenceContext);
|
|
16130
16197
|
const mediaStartsAt = useMediaStartsAt();
|
|
16131
16198
|
const environment = useRemotionEnvironment();
|
|
16132
16199
|
const logLevel = useLogLevel();
|
|
16133
16200
|
const mountTime = useMountTime();
|
|
16134
16201
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
16135
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
16136
|
-
const id =
|
|
16202
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
16203
|
+
const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
16137
16204
|
props2.src,
|
|
16138
16205
|
sequenceContext?.cumulatedFrom,
|
|
16139
16206
|
sequenceContext?.relativeFrom,
|
|
@@ -16344,7 +16411,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
16344
16411
|
if (environment.isClientSideRendering) {
|
|
16345
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");
|
|
16346
16413
|
}
|
|
16347
|
-
const { durations, setDurations } =
|
|
16414
|
+
const { durations, setDurations } = useContext40(DurationsContext);
|
|
16348
16415
|
if (typeof ref === "string") {
|
|
16349
16416
|
throw new Error("string refs are not supported");
|
|
16350
16417
|
}
|
|
@@ -16463,7 +16530,7 @@ addSequenceStackTraces(Composition);
|
|
|
16463
16530
|
addSequenceStackTraces(Folder);
|
|
16464
16531
|
|
|
16465
16532
|
// ../shapes/dist/esm/index.mjs
|
|
16466
|
-
import React, { useCallback as useCallback26, useMemo as
|
|
16533
|
+
import React, { useCallback as useCallback26, useMemo as useMemo41, useRef as useRef29 } from "react";
|
|
16467
16534
|
import { version } from "react-dom";
|
|
16468
16535
|
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
16469
16536
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -16645,13 +16712,13 @@ var RenderSvg = ({
|
|
|
16645
16712
|
stack,
|
|
16646
16713
|
...props
|
|
16647
16714
|
}) => {
|
|
16648
|
-
const actualStyle =
|
|
16715
|
+
const actualStyle = useMemo41(() => {
|
|
16649
16716
|
return {
|
|
16650
16717
|
overflow: "visible",
|
|
16651
16718
|
...style ?? {}
|
|
16652
16719
|
};
|
|
16653
16720
|
}, [style]);
|
|
16654
|
-
const actualPathStyle =
|
|
16721
|
+
const actualPathStyle = useMemo41(() => {
|
|
16655
16722
|
return {
|
|
16656
16723
|
transformBox: "fill-box",
|
|
16657
16724
|
...pathStyle ?? {}
|
|
@@ -19630,7 +19697,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19630
19697
|
progress: 0,
|
|
19631
19698
|
isActive: false
|
|
19632
19699
|
});
|
|
19633
|
-
const eventTarget =
|
|
19700
|
+
const eventTarget = useMemo43(() => new EventTarget, []);
|
|
19634
19701
|
useEffect21(() => {
|
|
19635
19702
|
if (disabled) {
|
|
19636
19703
|
eventTarget.dispatchEvent(new Event("disabled"));
|