@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/homepage/Pricing.js
CHANGED
|
@@ -33,7 +33,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
// src/components/homepage/Pricing.tsx
|
|
36
|
-
import { useMemo as
|
|
36
|
+
import { useMemo as useMemo53 } from "react";
|
|
37
37
|
|
|
38
38
|
// ../design/dist/esm/index.mjs
|
|
39
39
|
import * as React24 from "react";
|
|
@@ -1381,7 +1381,7 @@ var getDefaultConfig = () => {
|
|
|
1381
1381
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1382
1382
|
|
|
1383
1383
|
// ../design/dist/esm/index.mjs
|
|
1384
|
-
import React33, { useEffect as useEffect21, useMemo as
|
|
1384
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo43, useState as useState23 } from "react";
|
|
1385
1385
|
|
|
1386
1386
|
// ../paths/dist/esm/index.mjs
|
|
1387
1387
|
var cutLInstruction = ({
|
|
@@ -4178,9 +4178,9 @@ import React9 from "react";
|
|
|
4178
4178
|
import {
|
|
4179
4179
|
forwardRef as forwardRef3,
|
|
4180
4180
|
useCallback as useCallback6,
|
|
4181
|
-
useContext as
|
|
4181
|
+
useContext as useContext18,
|
|
4182
4182
|
useEffect as useEffect3,
|
|
4183
|
-
useMemo as
|
|
4183
|
+
useMemo as useMemo15,
|
|
4184
4184
|
useRef as useRef6,
|
|
4185
4185
|
useState as useState5
|
|
4186
4186
|
} from "react";
|
|
@@ -4199,13 +4199,14 @@ import { useContext as useContext11 } from "react";
|
|
|
4199
4199
|
import { useContext as useContext13 } from "react";
|
|
4200
4200
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
4201
4201
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4202
|
-
import { createContext as createContext14 } from "react";
|
|
4203
4202
|
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
4204
4203
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4205
|
-
import React13, { createContext as
|
|
4204
|
+
import React13, { createContext as createContext14 } from "react";
|
|
4206
4205
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4207
|
-
import
|
|
4208
|
-
import {
|
|
4206
|
+
import { useContext as useContext15, useMemo as useMemo13 } from "react";
|
|
4207
|
+
import { createContext as createContext15 } from "react";
|
|
4208
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext17, useMemo as useMemo14, useState as useState4 } from "react";
|
|
4209
|
+
import { useContext as useContext16, useRef as useRef5 } from "react";
|
|
4209
4210
|
import { createContext as createContext16 } from "react";
|
|
4210
4211
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
4211
4212
|
import {
|
|
@@ -4216,70 +4217,70 @@ import {
|
|
|
4216
4217
|
useRef as useRef9,
|
|
4217
4218
|
useState as useState6
|
|
4218
4219
|
} from "react";
|
|
4219
|
-
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as
|
|
4220
|
-
import { useEffect as useEffect4, useMemo as
|
|
4220
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo17, useRef as useRef8 } from "react";
|
|
4221
|
+
import { useEffect as useEffect4, useMemo as useMemo16, useRef as useRef7 } from "react";
|
|
4221
4222
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4222
4223
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4223
|
-
import { useContext as
|
|
4224
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
4224
4225
|
import {
|
|
4225
4226
|
createContext as createContext17,
|
|
4226
4227
|
useCallback as useCallback8,
|
|
4227
4228
|
useImperativeHandle as useImperativeHandle3,
|
|
4228
4229
|
useLayoutEffect as useLayoutEffect3,
|
|
4229
|
-
useMemo as
|
|
4230
|
+
useMemo as useMemo18,
|
|
4230
4231
|
useRef as useRef10,
|
|
4231
4232
|
useState as useState7
|
|
4232
4233
|
} from "react";
|
|
4233
4234
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4234
|
-
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as
|
|
4235
|
-
import React17, { createContext as createContext18, useMemo as
|
|
4235
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext31 } from "react";
|
|
4236
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
4236
4237
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
4237
|
-
import { useContext as
|
|
4238
|
+
import { useContext as useContext20 } from "react";
|
|
4238
4239
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
4239
4240
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
4240
|
-
import { createContext as createContext20, useMemo as
|
|
4241
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
4241
4242
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4242
4243
|
import { useCallback as useCallback13 } from "react";
|
|
4243
4244
|
import React23, {
|
|
4244
4245
|
forwardRef as forwardRef5,
|
|
4245
|
-
useContext as
|
|
4246
|
+
useContext as useContext29,
|
|
4246
4247
|
useEffect as useEffect14,
|
|
4247
4248
|
useImperativeHandle as useImperativeHandle4,
|
|
4248
|
-
useMemo as
|
|
4249
|
+
useMemo as useMemo28,
|
|
4249
4250
|
useRef as useRef19,
|
|
4250
4251
|
useState as useState14
|
|
4251
4252
|
} from "react";
|
|
4252
|
-
import { useContext as
|
|
4253
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
4253
4254
|
import React20, {
|
|
4254
4255
|
createContext as createContext21,
|
|
4255
4256
|
createRef as createRef2,
|
|
4256
4257
|
useCallback as useCallback9,
|
|
4257
|
-
useContext as
|
|
4258
|
+
useContext as useContext21,
|
|
4258
4259
|
useEffect as useEffect7,
|
|
4259
|
-
useMemo as
|
|
4260
|
+
useMemo as useMemo22,
|
|
4260
4261
|
useRef as useRef12,
|
|
4261
4262
|
useState as useState10
|
|
4262
4263
|
} from "react";
|
|
4263
|
-
import { useMemo as
|
|
4264
|
+
import { useMemo as useMemo21, useRef as useRef11 } from "react";
|
|
4264
4265
|
import { jsx as jsx19, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
4265
4266
|
import { useRef as useRef13 } from "react";
|
|
4266
|
-
import { useContext as
|
|
4267
|
-
import { useContext as
|
|
4267
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState11 } from "react";
|
|
4268
|
+
import { useContext as useContext23 } from "react";
|
|
4268
4269
|
import {
|
|
4269
4270
|
useCallback as useCallback12,
|
|
4270
|
-
useContext as
|
|
4271
|
+
useContext as useContext27,
|
|
4271
4272
|
useEffect as useEffect12,
|
|
4272
4273
|
useLayoutEffect as useLayoutEffect7,
|
|
4273
4274
|
useRef as useRef18
|
|
4274
4275
|
} from "react";
|
|
4275
|
-
import { useCallback as useCallback11, useMemo as
|
|
4276
|
-
import { useContext as
|
|
4276
|
+
import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef16 } from "react";
|
|
4277
|
+
import { useContext as useContext26, useMemo as useMemo25 } from "react";
|
|
4277
4278
|
import React21, {
|
|
4278
4279
|
useCallback as useCallback10,
|
|
4279
|
-
useContext as
|
|
4280
|
+
useContext as useContext25,
|
|
4280
4281
|
useEffect as useEffect9,
|
|
4281
4282
|
useLayoutEffect as useLayoutEffect6,
|
|
4282
|
-
useMemo as
|
|
4283
|
+
useMemo as useMemo24,
|
|
4283
4284
|
useRef as useRef15,
|
|
4284
4285
|
useState as useState12
|
|
4285
4286
|
} from "react";
|
|
@@ -4288,15 +4289,15 @@ import React22 from "react";
|
|
|
4288
4289
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
4289
4290
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
4290
4291
|
import { useEffect as useEffect13 } from "react";
|
|
4291
|
-
import { createContext as createContext22, useContext as
|
|
4292
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
|
|
4292
4293
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
4293
4294
|
import {
|
|
4294
4295
|
forwardRef as forwardRef6,
|
|
4295
|
-
useContext as
|
|
4296
|
+
useContext as useContext30,
|
|
4296
4297
|
useEffect as useEffect15,
|
|
4297
4298
|
useImperativeHandle as useImperativeHandle5,
|
|
4298
4299
|
useLayoutEffect as useLayoutEffect8,
|
|
4299
|
-
useMemo as
|
|
4300
|
+
useMemo as useMemo29,
|
|
4300
4301
|
useRef as useRef20
|
|
4301
4302
|
} from "react";
|
|
4302
4303
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
@@ -4306,7 +4307,7 @@ import {
|
|
|
4306
4307
|
useCallback as useCallback15,
|
|
4307
4308
|
useEffect as useEffect16,
|
|
4308
4309
|
useImperativeHandle as useImperativeHandle6,
|
|
4309
|
-
useMemo as
|
|
4310
|
+
useMemo as useMemo30,
|
|
4310
4311
|
useRef as useRef21,
|
|
4311
4312
|
useState as useState15
|
|
4312
4313
|
} from "react";
|
|
@@ -4315,19 +4316,19 @@ import {
|
|
|
4315
4316
|
createContext as createContext23,
|
|
4316
4317
|
forwardRef as forwardRef9,
|
|
4317
4318
|
useCallback as useCallback16,
|
|
4318
|
-
useContext as
|
|
4319
|
+
useContext as useContext32,
|
|
4319
4320
|
useLayoutEffect as useLayoutEffect9,
|
|
4320
|
-
useMemo as
|
|
4321
|
+
useMemo as useMemo31,
|
|
4321
4322
|
useRef as useRef22
|
|
4322
4323
|
} from "react";
|
|
4323
4324
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4324
4325
|
import {
|
|
4325
4326
|
forwardRef as forwardRef10,
|
|
4326
4327
|
useCallback as useCallback17,
|
|
4327
|
-
useContext as
|
|
4328
|
+
useContext as useContext33,
|
|
4328
4329
|
useImperativeHandle as useImperativeHandle7,
|
|
4329
4330
|
useLayoutEffect as useLayoutEffect10,
|
|
4330
|
-
useMemo as
|
|
4331
|
+
useMemo as useMemo32,
|
|
4331
4332
|
useRef as useRef23,
|
|
4332
4333
|
useState as useState16
|
|
4333
4334
|
} from "react";
|
|
@@ -4336,7 +4337,7 @@ import { forwardRef as forwardRef11, useCallback as useCallback18, useState as u
|
|
|
4336
4337
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
4337
4338
|
import {
|
|
4338
4339
|
useCallback as useCallback19,
|
|
4339
|
-
useContext as
|
|
4340
|
+
useContext as useContext34,
|
|
4340
4341
|
useLayoutEffect as useLayoutEffect11,
|
|
4341
4342
|
useRef as useRef24,
|
|
4342
4343
|
useState as useState18
|
|
@@ -4349,59 +4350,59 @@ import React31 from "react";
|
|
|
4349
4350
|
import {
|
|
4350
4351
|
useCallback as useCallback21,
|
|
4351
4352
|
useImperativeHandle as useImperativeHandle8,
|
|
4352
|
-
useMemo as
|
|
4353
|
+
useMemo as useMemo33,
|
|
4353
4354
|
useRef as useRef26,
|
|
4354
4355
|
useState as useState19
|
|
4355
4356
|
} from "react";
|
|
4356
4357
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4357
4358
|
import React32 from "react";
|
|
4358
|
-
import { useMemo as
|
|
4359
|
-
import { createContext as createContext24, useContext as
|
|
4359
|
+
import { useMemo as useMemo35 } from "react";
|
|
4360
|
+
import { createContext as createContext24, useContext as useContext35, useMemo as useMemo34 } from "react";
|
|
4360
4361
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4361
4362
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4362
4363
|
import React34 from "react";
|
|
4363
4364
|
import React35, { createContext as createContext25 } from "react";
|
|
4364
|
-
import React36, { useContext as
|
|
4365
|
+
import React36, { useContext as useContext36 } from "react";
|
|
4365
4366
|
import { useCallback as useCallback24 } from "react";
|
|
4366
4367
|
import {
|
|
4367
4368
|
useCallback as useCallback22,
|
|
4368
|
-
useContext as
|
|
4369
|
+
useContext as useContext37,
|
|
4369
4370
|
useEffect as useEffect17,
|
|
4370
4371
|
useLayoutEffect as useLayoutEffect12,
|
|
4371
|
-
useMemo as
|
|
4372
|
+
useMemo as useMemo36,
|
|
4372
4373
|
useState as useState20
|
|
4373
4374
|
} from "react";
|
|
4374
4375
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4375
4376
|
import React38, {
|
|
4376
4377
|
forwardRef as forwardRef13,
|
|
4377
4378
|
useCallback as useCallback23,
|
|
4378
|
-
useContext as
|
|
4379
|
+
useContext as useContext38,
|
|
4379
4380
|
useEffect as useEffect19,
|
|
4380
4381
|
useImperativeHandle as useImperativeHandle9,
|
|
4381
|
-
useMemo as
|
|
4382
|
+
useMemo as useMemo37,
|
|
4382
4383
|
useRef as useRef27,
|
|
4383
4384
|
useState as useState21
|
|
4384
4385
|
} from "react";
|
|
4385
4386
|
import { useEffect as useEffect18 } from "react";
|
|
4386
4387
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4387
4388
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4388
|
-
import React40, { useMemo as
|
|
4389
|
+
import React40, { useMemo as useMemo38 } from "react";
|
|
4389
4390
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4390
4391
|
import React42, {
|
|
4391
4392
|
forwardRef as forwardRef14,
|
|
4392
|
-
useMemo as
|
|
4393
|
+
useMemo as useMemo39
|
|
4393
4394
|
} from "react";
|
|
4394
4395
|
import React41 from "react";
|
|
4395
4396
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
4396
4397
|
import React43 from "react";
|
|
4397
|
-
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
|
|
4398
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext40 } from "react";
|
|
4398
4399
|
import {
|
|
4399
4400
|
forwardRef as forwardRef15,
|
|
4400
|
-
useContext as
|
|
4401
|
+
useContext as useContext39,
|
|
4401
4402
|
useEffect as useEffect20,
|
|
4402
4403
|
useImperativeHandle as useImperativeHandle10,
|
|
4403
4404
|
useLayoutEffect as useLayoutEffect13,
|
|
4404
|
-
useMemo as
|
|
4405
|
+
useMemo as useMemo40,
|
|
4405
4406
|
useRef as useRef28
|
|
4406
4407
|
} from "react";
|
|
4407
4408
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
@@ -5592,7 +5593,7 @@ var getSingleChildComponent = (children) => {
|
|
|
5592
5593
|
}
|
|
5593
5594
|
return child.type;
|
|
5594
5595
|
};
|
|
5595
|
-
var VERSION = "4.0.
|
|
5596
|
+
var VERSION = "4.0.495";
|
|
5596
5597
|
var checkMultipleRemotionVersions = () => {
|
|
5597
5598
|
if (typeof globalThis === "undefined") {
|
|
5598
5599
|
return;
|
|
@@ -6085,15 +6086,19 @@ var premountSchema = {
|
|
|
6085
6086
|
description: "Premount For",
|
|
6086
6087
|
min: 0,
|
|
6087
6088
|
step: 1,
|
|
6088
|
-
hiddenFromList: false
|
|
6089
|
+
hiddenFromList: false,
|
|
6090
|
+
keyframable: false
|
|
6089
6091
|
},
|
|
6090
6092
|
postmountFor: {
|
|
6091
6093
|
type: "number",
|
|
6092
6094
|
default: 0,
|
|
6093
6095
|
min: 0,
|
|
6094
6096
|
step: 1,
|
|
6095
|
-
hiddenFromList: true
|
|
6096
|
-
|
|
6097
|
+
hiddenFromList: true,
|
|
6098
|
+
keyframable: false
|
|
6099
|
+
}
|
|
6100
|
+
};
|
|
6101
|
+
var premountStyleSchema = {
|
|
6097
6102
|
styleWhilePremounted: {
|
|
6098
6103
|
type: "hidden"
|
|
6099
6104
|
},
|
|
@@ -6101,10 +6106,13 @@ var premountSchema = {
|
|
|
6101
6106
|
type: "hidden"
|
|
6102
6107
|
}
|
|
6103
6108
|
};
|
|
6104
|
-
var sequencePremountSchema =
|
|
6109
|
+
var sequencePremountSchema = {
|
|
6110
|
+
...premountSchema,
|
|
6111
|
+
...premountStyleSchema
|
|
6112
|
+
};
|
|
6105
6113
|
var sequenceStyleSchema = {
|
|
6106
6114
|
...transformSchema,
|
|
6107
|
-
...
|
|
6115
|
+
...sequencePremountSchema
|
|
6108
6116
|
};
|
|
6109
6117
|
var hiddenField = {
|
|
6110
6118
|
type: "boolean",
|
|
@@ -6189,9 +6197,6 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6189
6197
|
default: "none"
|
|
6190
6198
|
}
|
|
6191
6199
|
};
|
|
6192
|
-
var PremountContext = createContext14({
|
|
6193
|
-
premountFramesRemaining: 0
|
|
6194
|
-
});
|
|
6195
6200
|
var SequenceManager = React12.createContext({
|
|
6196
6201
|
registerSequence: () => {
|
|
6197
6202
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -6371,7 +6376,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
6371
6376
|
})
|
|
6372
6377
|
});
|
|
6373
6378
|
};
|
|
6374
|
-
var IsInsideSeriesContext =
|
|
6379
|
+
var IsInsideSeriesContext = createContext14(false);
|
|
6375
6380
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
6376
6381
|
return /* @__PURE__ */ jsx11(IsInsideSeriesContext.Provider, {
|
|
6377
6382
|
value: true,
|
|
@@ -6390,7 +6395,61 @@ var useRequireToBeInsideSeries = () => {
|
|
|
6390
6395
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6391
6396
|
}
|
|
6392
6397
|
};
|
|
6398
|
+
var PremountContext = createContext15({
|
|
6399
|
+
premountFramesRemaining: 0
|
|
6400
|
+
});
|
|
6393
6401
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
6402
|
+
var usePremounting = ({
|
|
6403
|
+
from,
|
|
6404
|
+
durationInFrames,
|
|
6405
|
+
premountFor,
|
|
6406
|
+
postmountFor,
|
|
6407
|
+
style,
|
|
6408
|
+
styleWhilePremounted,
|
|
6409
|
+
styleWhilePostmounted,
|
|
6410
|
+
hideWhilePremounted
|
|
6411
|
+
}) => {
|
|
6412
|
+
const parentPremountContext = useContext15(PremountContext);
|
|
6413
|
+
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
6414
|
+
const environment = useRemotionEnvironment();
|
|
6415
|
+
const { fps } = useVideoConfig();
|
|
6416
|
+
const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? premountFor ?? fps : premountFor ?? 0;
|
|
6417
|
+
const effectivePostmountFor = postmountFor ?? 0;
|
|
6418
|
+
const endThreshold = Math.ceil(from + durationInFrames - 1);
|
|
6419
|
+
const premountingActive = !environment.isRendering && frame < from && frame >= from - effectivePremountFor;
|
|
6420
|
+
const postmountingActive = !environment.isRendering && frame > endThreshold && frame <= endThreshold + effectivePostmountFor;
|
|
6421
|
+
const isPremountingOrPostmounting = premountingActive || postmountingActive;
|
|
6422
|
+
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
6423
|
+
const premountingStyle = useMemo13(() => {
|
|
6424
|
+
if (!isPremountingOrPostmounting) {
|
|
6425
|
+
return style;
|
|
6426
|
+
}
|
|
6427
|
+
return {
|
|
6428
|
+
...style,
|
|
6429
|
+
...hideWhilePremounted === "opacity" ? { opacity: 0 } : { display: "none" },
|
|
6430
|
+
pointerEvents: "none",
|
|
6431
|
+
...premountingActive ? styleWhilePremounted : {},
|
|
6432
|
+
...postmountingActive ? styleWhilePostmounted : {}
|
|
6433
|
+
};
|
|
6434
|
+
}, [
|
|
6435
|
+
isPremountingOrPostmounting,
|
|
6436
|
+
hideWhilePremounted,
|
|
6437
|
+
postmountingActive,
|
|
6438
|
+
premountingActive,
|
|
6439
|
+
style,
|
|
6440
|
+
styleWhilePostmounted,
|
|
6441
|
+
styleWhilePremounted
|
|
6442
|
+
]);
|
|
6443
|
+
return {
|
|
6444
|
+
effectivePremountFor,
|
|
6445
|
+
effectivePostmountFor,
|
|
6446
|
+
premountingActive,
|
|
6447
|
+
postmountingActive,
|
|
6448
|
+
isPremountingOrPostmounting,
|
|
6449
|
+
freezeFrame,
|
|
6450
|
+
premountingStyle
|
|
6451
|
+
};
|
|
6452
|
+
};
|
|
6394
6453
|
var deleteNestedKey = (obj, keysToRemove) => {
|
|
6395
6454
|
for (const key of keysToRemove) {
|
|
6396
6455
|
const parts = key.split(".");
|
|
@@ -8214,10 +8273,10 @@ var useMemoizedEffects = ({
|
|
|
8214
8273
|
overrideId
|
|
8215
8274
|
}) => {
|
|
8216
8275
|
const previousRef = useRef5(null);
|
|
8217
|
-
const { propStatuses } =
|
|
8218
|
-
const { getEffectDragOverrides } =
|
|
8276
|
+
const { propStatuses } = useContext16(VisualModePropStatusesContext);
|
|
8277
|
+
const { getEffectDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
8219
8278
|
const frame = useCurrentFrame();
|
|
8220
|
-
const { overrideIdToNodePathMappings } =
|
|
8279
|
+
const { overrideIdToNodePathMappings } = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
8221
8280
|
const previous = previousRef.current;
|
|
8222
8281
|
const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
|
|
8223
8282
|
const resolved = effects.map((descriptor, index) => {
|
|
@@ -8561,9 +8620,9 @@ var withInteractivitySchema = ({
|
|
|
8561
8620
|
ref
|
|
8562
8621
|
});
|
|
8563
8622
|
}
|
|
8564
|
-
const { propStatuses } =
|
|
8565
|
-
const { getDragOverrides } =
|
|
8566
|
-
const nodePathMapping =
|
|
8623
|
+
const { propStatuses } = useContext17(VisualModePropStatusesContext);
|
|
8624
|
+
const { getDragOverrides } = useContext17(VisualModeDragOverridesContext);
|
|
8625
|
+
const nodePathMapping = useContext17(OverrideIdsToNodePathsGettersContext);
|
|
8567
8626
|
const frame = useCurrentFrame();
|
|
8568
8627
|
if (props.controls) {
|
|
8569
8628
|
return React14.createElement(Component, {
|
|
@@ -8590,8 +8649,8 @@ var withInteractivitySchema = ({
|
|
|
8590
8649
|
key,
|
|
8591
8650
|
props
|
|
8592
8651
|
}));
|
|
8593
|
-
const currentRuntimeValueDotNotation =
|
|
8594
|
-
const controls =
|
|
8652
|
+
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
|
|
8653
|
+
const controls = useMemo14(() => {
|
|
8595
8654
|
return {
|
|
8596
8655
|
schema: schemaWithSequenceName,
|
|
8597
8656
|
currentRuntimeValueDotNotation,
|
|
@@ -8601,7 +8660,7 @@ var withInteractivitySchema = ({
|
|
|
8601
8660
|
componentName
|
|
8602
8661
|
};
|
|
8603
8662
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
8604
|
-
const { merged: valuesDotNotation, propsToDelete } =
|
|
8663
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
8605
8664
|
return computeEffectiveSchemaValuesDotNotation({
|
|
8606
8665
|
schema: schemaWithSequenceName,
|
|
8607
8666
|
currentValue: currentRuntimeValueDotNotation,
|
|
@@ -8659,7 +8718,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8659
8718
|
}, ref) => {
|
|
8660
8719
|
const { layout = "absolute-fill" } = other;
|
|
8661
8720
|
const [id] = useState5(() => String(Math.random()));
|
|
8662
|
-
const parentSequence =
|
|
8721
|
+
const parentSequence = useContext18(SequenceContext);
|
|
8663
8722
|
const { rootId } = useTimelineContext();
|
|
8664
8723
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
8665
8724
|
const nonce = useNonce();
|
|
@@ -8710,13 +8769,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8710
8769
|
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
|
|
8711
8770
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
|
|
8712
8771
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
8713
|
-
const { registerSequence, unregisterSequence } =
|
|
8772
|
+
const { registerSequence, unregisterSequence } = useContext18(SequenceManager);
|
|
8714
8773
|
const wrapperRefForOutline = useRef6(null);
|
|
8715
8774
|
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
8716
|
-
const premounting =
|
|
8775
|
+
const premounting = useMemo15(() => {
|
|
8717
8776
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
8718
8777
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
8719
|
-
const postmounting =
|
|
8778
|
+
const postmounting = useMemo15(() => {
|
|
8720
8779
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
8721
8780
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
8722
8781
|
const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
|
|
@@ -8724,7 +8783,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8724
8783
|
const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
|
|
8725
8784
|
const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
|
|
8726
8785
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
8727
|
-
const contextValue =
|
|
8786
|
+
const contextValue = useMemo15(() => {
|
|
8728
8787
|
return {
|
|
8729
8788
|
absoluteFrom,
|
|
8730
8789
|
cumulatedFrom,
|
|
@@ -8755,12 +8814,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8755
8814
|
postmountDisplay,
|
|
8756
8815
|
cumulatedNegativeFrom
|
|
8757
8816
|
]);
|
|
8758
|
-
const timelineClipName =
|
|
8817
|
+
const timelineClipName = useMemo15(() => {
|
|
8759
8818
|
return name ?? "";
|
|
8760
8819
|
}, [name]);
|
|
8761
8820
|
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
8762
8821
|
const env = useRemotionEnvironment();
|
|
8763
|
-
const isInsideSeries =
|
|
8822
|
+
const isInsideSeries = useContext18(IsInsideSeriesContext);
|
|
8764
8823
|
const inheritedStack = other?.stack ?? null;
|
|
8765
8824
|
const stackRef = useRef6(null);
|
|
8766
8825
|
stackRef.current = stack ?? inheritedStack;
|
|
@@ -8908,7 +8967,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8908
8967
|
ref.current = node;
|
|
8909
8968
|
}
|
|
8910
8969
|
}, [ref]);
|
|
8911
|
-
const defaultStyle =
|
|
8970
|
+
const defaultStyle = useMemo15(() => {
|
|
8912
8971
|
return {
|
|
8913
8972
|
flexDirection: undefined,
|
|
8914
8973
|
...width ? { width } : {},
|
|
@@ -8934,8 +8993,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8934
8993
|
};
|
|
8935
8994
|
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
8936
8995
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
8937
|
-
const parentPremountContext = useContext17(PremountContext);
|
|
8938
|
-
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
8939
8996
|
if (props.layout === "none") {
|
|
8940
8997
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
8941
8998
|
}
|
|
@@ -8949,34 +9006,30 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
8949
9006
|
styleWhilePostmounted,
|
|
8950
9007
|
...otherProps
|
|
8951
9008
|
} = props;
|
|
8952
|
-
const
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
8956
|
-
const isFreezingActive = premountingActive || postmountingActive;
|
|
8957
|
-
const style = useMemo14(() => {
|
|
8958
|
-
return {
|
|
8959
|
-
...passedStyle,
|
|
8960
|
-
opacity: premountingActive || postmountingActive ? 0 : passedStyle?.opacity,
|
|
8961
|
-
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
8962
|
-
...premountingActive ? styleWhilePremounted : {},
|
|
8963
|
-
...postmountingActive ? styleWhilePostmounted : {}
|
|
8964
|
-
};
|
|
8965
|
-
}, [
|
|
8966
|
-
passedStyle,
|
|
8967
|
-
premountingActive,
|
|
9009
|
+
const {
|
|
9010
|
+
freezeFrame,
|
|
9011
|
+
isPremountingOrPostmounting,
|
|
8968
9012
|
postmountingActive,
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
9013
|
+
premountingActive,
|
|
9014
|
+
premountingStyle
|
|
9015
|
+
} = usePremounting({
|
|
9016
|
+
from,
|
|
9017
|
+
durationInFrames,
|
|
9018
|
+
premountFor,
|
|
9019
|
+
postmountFor,
|
|
9020
|
+
style: passedStyle ?? null,
|
|
9021
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
9022
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
9023
|
+
hideWhilePremounted: "opacity"
|
|
9024
|
+
});
|
|
8972
9025
|
return /* @__PURE__ */ jsx12(Freeze, {
|
|
8973
9026
|
frame: freezeFrame,
|
|
8974
|
-
active:
|
|
9027
|
+
active: isPremountingOrPostmounting,
|
|
8975
9028
|
children: /* @__PURE__ */ jsx12(SequenceInner, {
|
|
8976
9029
|
ref,
|
|
8977
9030
|
from,
|
|
8978
9031
|
durationInFrames,
|
|
8979
|
-
style,
|
|
9032
|
+
style: premountingStyle ?? undefined,
|
|
8980
9033
|
_remotionInternalPremountDisplay: premountFor,
|
|
8981
9034
|
_remotionInternalPostmountDisplay: postmountFor,
|
|
8982
9035
|
_remotionInternalIsPremounting: premountingActive,
|
|
@@ -9312,7 +9365,7 @@ var useEffectChainState = () => {
|
|
|
9312
9365
|
}
|
|
9313
9366
|
};
|
|
9314
9367
|
}, []);
|
|
9315
|
-
return
|
|
9368
|
+
return useMemo16(() => ({
|
|
9316
9369
|
get: (width, height) => {
|
|
9317
9370
|
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
9318
9371
|
if (chainStateRef.current) {
|
|
@@ -9328,7 +9381,7 @@ var useEffectChainState = () => {
|
|
|
9328
9381
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
9329
9382
|
const canvasRef = useRef8(null);
|
|
9330
9383
|
const chainState = useEffectChainState();
|
|
9331
|
-
const sourceCanvas =
|
|
9384
|
+
const sourceCanvas = useMemo17(() => {
|
|
9332
9385
|
if (typeof document === "undefined") {
|
|
9333
9386
|
return null;
|
|
9334
9387
|
}
|
|
@@ -9885,7 +9938,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
9885
9938
|
};
|
|
9886
9939
|
}
|
|
9887
9940
|
}, []);
|
|
9888
|
-
const contextValue =
|
|
9941
|
+
const contextValue = useMemo18(() => {
|
|
9889
9942
|
return {
|
|
9890
9943
|
registerRenderAsset,
|
|
9891
9944
|
unregisterRenderAsset,
|
|
@@ -9899,7 +9952,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
9899
9952
|
};
|
|
9900
9953
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
9901
9954
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
9902
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9955
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
9903
9956
|
const env = useRemotionEnvironment();
|
|
9904
9957
|
const frame = useCurrentFrame();
|
|
9905
9958
|
const [id] = useState8(() => {
|
|
@@ -10014,14 +10067,14 @@ var Loop = ({
|
|
|
10014
10067
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
10015
10068
|
const start = iteration * durationInFrames;
|
|
10016
10069
|
const from = Math.min(start, maxFrame);
|
|
10017
|
-
const loopDisplay =
|
|
10070
|
+
const loopDisplay = useMemo19(() => {
|
|
10018
10071
|
return {
|
|
10019
10072
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
10020
10073
|
startOffset: -from,
|
|
10021
10074
|
durationInFrames
|
|
10022
10075
|
};
|
|
10023
10076
|
}, [compDuration, durationInFrames, from, times]);
|
|
10024
|
-
const loopContext =
|
|
10077
|
+
const loopContext = useMemo19(() => {
|
|
10025
10078
|
return {
|
|
10026
10079
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
10027
10080
|
durationInFrames
|
|
@@ -10090,7 +10143,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
10090
10143
|
return src.slice(0, hashIndex);
|
|
10091
10144
|
};
|
|
10092
10145
|
var usePreload = (src) => {
|
|
10093
|
-
const preloads2 =
|
|
10146
|
+
const preloads2 = useContext20(PreloadContext);
|
|
10094
10147
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
10095
10148
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
10096
10149
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -10393,7 +10446,7 @@ var DurationsContext = createContext20({
|
|
|
10393
10446
|
});
|
|
10394
10447
|
var DurationsContextProvider = ({ children }) => {
|
|
10395
10448
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
10396
|
-
const value =
|
|
10449
|
+
const value = useMemo20(() => {
|
|
10397
10450
|
return {
|
|
10398
10451
|
durations,
|
|
10399
10452
|
setDurations
|
|
@@ -10532,7 +10585,7 @@ var useSingletonAudioContext = ({
|
|
|
10532
10585
|
if (sampleRate !== initialSampleRate.current) {
|
|
10533
10586
|
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.`);
|
|
10534
10587
|
}
|
|
10535
|
-
const context =
|
|
10588
|
+
const context = useMemo21(() => {
|
|
10536
10589
|
if (env.isRendering) {
|
|
10537
10590
|
return null;
|
|
10538
10591
|
}
|
|
@@ -10666,9 +10719,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10666
10719
|
});
|
|
10667
10720
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
10668
10721
|
const isResuming = useRef12(null);
|
|
10669
|
-
const audioSyncAnchor =
|
|
10722
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
10670
10723
|
const audioSyncAnchorListeners = useRef12([]);
|
|
10671
|
-
const audioSyncAnchorEmitter =
|
|
10724
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
10672
10725
|
return {
|
|
10673
10726
|
dispatch: (event) => {
|
|
10674
10727
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -10688,7 +10741,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10688
10741
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
10689
10742
|
nodesToResume.current.delete(node);
|
|
10690
10743
|
}, []);
|
|
10691
|
-
const scheduleAudioNode =
|
|
10744
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
10692
10745
|
return ({
|
|
10693
10746
|
node,
|
|
10694
10747
|
mediaTimestamp,
|
|
@@ -10780,7 +10833,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10780
10833
|
audioContextIsPlayingEventually.current = false;
|
|
10781
10834
|
return ctxAndGain.suspend();
|
|
10782
10835
|
}, [ctxAndGain]);
|
|
10783
|
-
const audioContextValue =
|
|
10836
|
+
const audioContextValue = useMemo22(() => {
|
|
10784
10837
|
return {
|
|
10785
10838
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
10786
10839
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -10817,10 +10870,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10817
10870
|
const logLevel = useLogLevel();
|
|
10818
10871
|
const mountTime = useMountTime();
|
|
10819
10872
|
const env = useRemotionEnvironment();
|
|
10820
|
-
const audioCtx =
|
|
10873
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
10821
10874
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
10822
10875
|
const resume = audioCtx?.resume;
|
|
10823
|
-
const refs =
|
|
10876
|
+
const refs = useMemo22(() => {
|
|
10824
10877
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
10825
10878
|
const ref = createRef2();
|
|
10826
10879
|
return {
|
|
@@ -10959,7 +11012,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10959
11012
|
});
|
|
10960
11013
|
resume?.();
|
|
10961
11014
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
10962
|
-
const audioTagsValue =
|
|
11015
|
+
const audioTagsValue = useMemo22(() => {
|
|
10963
11016
|
return {
|
|
10964
11017
|
registerAudio,
|
|
10965
11018
|
unregisterAudio,
|
|
@@ -10974,7 +11027,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10974
11027
|
unregisterAudio,
|
|
10975
11028
|
updateAudio
|
|
10976
11029
|
]);
|
|
10977
|
-
const sharedAudioTagElements =
|
|
11030
|
+
const sharedAudioTagElements = useMemo22(() => {
|
|
10978
11031
|
return refs.map(({ id, ref }) => {
|
|
10979
11032
|
return /* @__PURE__ */ jsx19("audio", {
|
|
10980
11033
|
ref,
|
|
@@ -10997,8 +11050,8 @@ var useSharedAudio = ({
|
|
|
10997
11050
|
premounting,
|
|
10998
11051
|
postmounting
|
|
10999
11052
|
}) => {
|
|
11000
|
-
const audioCtx =
|
|
11001
|
-
const tagsCtx =
|
|
11053
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
11054
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
11002
11055
|
const [elem] = useState10(() => {
|
|
11003
11056
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
11004
11057
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -11177,7 +11230,7 @@ var useVolume = ({
|
|
|
11177
11230
|
const audioStuffRef = useRef14(null);
|
|
11178
11231
|
const currentVolumeRef = useRef14(volume);
|
|
11179
11232
|
currentVolumeRef.current = volume;
|
|
11180
|
-
const sharedAudioContext =
|
|
11233
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
11181
11234
|
if (!sharedAudioContext) {
|
|
11182
11235
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
11183
11236
|
}
|
|
@@ -11242,7 +11295,7 @@ var useVolume = ({
|
|
|
11242
11295
|
return audioStuffRef;
|
|
11243
11296
|
};
|
|
11244
11297
|
var useMediaStartsAt = () => {
|
|
11245
|
-
const parentSequence =
|
|
11298
|
+
const parentSequence = useContext23(SequenceContext);
|
|
11246
11299
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
11247
11300
|
};
|
|
11248
11301
|
var useFrameForVolumeProp = (behavior) => {
|
|
@@ -11331,7 +11384,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11331
11384
|
if (!src) {
|
|
11332
11385
|
throw new Error("No src passed");
|
|
11333
11386
|
}
|
|
11334
|
-
const parentSequence =
|
|
11387
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11335
11388
|
const [initialVolume] = useState11(() => volume);
|
|
11336
11389
|
const duration = getTimelineDuration({
|
|
11337
11390
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -11341,7 +11394,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11341
11394
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
11342
11395
|
loop
|
|
11343
11396
|
});
|
|
11344
|
-
const volumes =
|
|
11397
|
+
const volumes = useMemo23(() => {
|
|
11345
11398
|
if (typeof volume === "number") {
|
|
11346
11399
|
return volume;
|
|
11347
11400
|
}
|
|
@@ -11362,7 +11415,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11362
11415
|
const nonce = useNonce();
|
|
11363
11416
|
const { rootId } = useTimelineContext();
|
|
11364
11417
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
11365
|
-
const memoizedResult =
|
|
11418
|
+
const memoizedResult = useMemo23(() => {
|
|
11366
11419
|
return {
|
|
11367
11420
|
volumes,
|
|
11368
11421
|
duration,
|
|
@@ -11403,9 +11456,9 @@ var useMediaInTimeline = ({
|
|
|
11403
11456
|
documentationLink,
|
|
11404
11457
|
refForOutline
|
|
11405
11458
|
}) => {
|
|
11406
|
-
const parentSequence =
|
|
11459
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11407
11460
|
const startsAt = useMediaStartsAt();
|
|
11408
|
-
const { registerSequence, unregisterSequence } =
|
|
11461
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
11409
11462
|
const { durationInFrames } = useVideoConfig();
|
|
11410
11463
|
const mediaStartsAt = useMediaStartsAt();
|
|
11411
11464
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -11570,13 +11623,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11570
11623
|
}
|
|
11571
11624
|
}, [blocks]);
|
|
11572
11625
|
}
|
|
11573
|
-
return
|
|
11626
|
+
return useMemo24(() => {
|
|
11574
11627
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11575
11628
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11576
11629
|
};
|
|
11577
11630
|
var BufferingContextReact = React21.createContext(null);
|
|
11578
11631
|
var BufferingProvider = ({ children }) => {
|
|
11579
|
-
const { logLevel, mountTime } =
|
|
11632
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
11580
11633
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
11581
11634
|
return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
|
|
11582
11635
|
value: bufferManager,
|
|
@@ -11602,10 +11655,10 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
11602
11655
|
return isBuffering;
|
|
11603
11656
|
};
|
|
11604
11657
|
var useBufferState = () => {
|
|
11605
|
-
const buffer =
|
|
11658
|
+
const buffer = useContext26(BufferingContextReact);
|
|
11606
11659
|
const logLevel = useLogLevel();
|
|
11607
11660
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
11608
|
-
return
|
|
11661
|
+
return useMemo25(() => ({
|
|
11609
11662
|
delayPlayback: () => {
|
|
11610
11663
|
if (!addBlock) {
|
|
11611
11664
|
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");
|
|
@@ -11713,7 +11766,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
11713
11766
|
onVariableFpsVideoDetected,
|
|
11714
11767
|
pauseWhenBuffering
|
|
11715
11768
|
]);
|
|
11716
|
-
return
|
|
11769
|
+
return useMemo26(() => {
|
|
11717
11770
|
return {
|
|
11718
11771
|
isBuffering: () => bufferingRef.current,
|
|
11719
11772
|
bufferUntilFirstFrame
|
|
@@ -12087,7 +12140,7 @@ var useMediaPlayback = ({
|
|
|
12087
12140
|
const frame = useCurrentFrame();
|
|
12088
12141
|
const absoluteFrame = useTimelinePosition();
|
|
12089
12142
|
const [playing] = usePlayingState();
|
|
12090
|
-
const buffering =
|
|
12143
|
+
const buffering = useContext27(BufferingContextReact);
|
|
12091
12144
|
const { fps } = useVideoConfig();
|
|
12092
12145
|
const mediaStartsAt = useMediaStartsAt();
|
|
12093
12146
|
const lastSeekDueToShift = useRef18(null);
|
|
@@ -12382,16 +12435,16 @@ var SetMediaVolumeContext = createContext22({
|
|
|
12382
12435
|
}
|
|
12383
12436
|
});
|
|
12384
12437
|
var useMediaVolumeState = () => {
|
|
12385
|
-
const { mediaVolume } =
|
|
12386
|
-
const { setMediaVolume } =
|
|
12387
|
-
return
|
|
12438
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
12439
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
12440
|
+
return useMemo27(() => {
|
|
12388
12441
|
return [mediaVolume, setMediaVolume];
|
|
12389
12442
|
}, [mediaVolume, setMediaVolume]);
|
|
12390
12443
|
};
|
|
12391
12444
|
var usePlayerMutedState = () => {
|
|
12392
|
-
const { playerMuted } =
|
|
12393
|
-
const { setPlayerMuted } =
|
|
12394
|
-
return
|
|
12445
|
+
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
12446
|
+
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
12447
|
+
return useMemo27(() => {
|
|
12395
12448
|
return [playerMuted, setPlayerMuted];
|
|
12396
12449
|
}, [playerMuted, setPlayerMuted]);
|
|
12397
12450
|
};
|
|
@@ -12445,7 +12498,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12445
12498
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
12446
12499
|
}
|
|
12447
12500
|
const preloadedSrc = usePreload(src);
|
|
12448
|
-
const sequenceContext =
|
|
12501
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
12449
12502
|
const [timelineId] = useState14(() => String(Math.random()));
|
|
12450
12503
|
const userPreferredVolume = evaluateVolume({
|
|
12451
12504
|
frame: volumePropFrame,
|
|
@@ -12458,7 +12511,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12458
12511
|
requestsVideoFrame: false,
|
|
12459
12512
|
isClientSideRendering: false
|
|
12460
12513
|
});
|
|
12461
|
-
const propsToPass =
|
|
12514
|
+
const propsToPass = useMemo28(() => {
|
|
12462
12515
|
return {
|
|
12463
12516
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
12464
12517
|
src: preloadedSrc,
|
|
@@ -12475,7 +12528,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12475
12528
|
userPreferredVolume,
|
|
12476
12529
|
crossOriginValue
|
|
12477
12530
|
]);
|
|
12478
|
-
const id =
|
|
12531
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
12479
12532
|
src,
|
|
12480
12533
|
sequenceContext?.relativeFrom,
|
|
12481
12534
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12605,10 +12658,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12605
12658
|
const absoluteFrame = useTimelinePosition();
|
|
12606
12659
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
12607
12660
|
const frame = useCurrentFrame();
|
|
12608
|
-
const sequenceContext =
|
|
12609
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12661
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
12662
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
12610
12663
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12611
|
-
const id =
|
|
12664
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12612
12665
|
props.src,
|
|
12613
12666
|
sequenceContext?.relativeFrom,
|
|
12614
12667
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12715,7 +12768,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12715
12768
|
};
|
|
12716
12769
|
var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
|
|
12717
12770
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
12718
|
-
const audioTagsContext =
|
|
12771
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
12719
12772
|
const propsWithFreeze = props;
|
|
12720
12773
|
const {
|
|
12721
12774
|
startFrom,
|
|
@@ -12739,7 +12792,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
12739
12792
|
if (typeof freeze !== "undefined") {
|
|
12740
12793
|
throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
|
|
12741
12794
|
}
|
|
12742
|
-
const { durations, setDurations } =
|
|
12795
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
12743
12796
|
if (typeof props.src !== "string") {
|
|
12744
12797
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
12745
12798
|
}
|
|
@@ -12901,7 +12954,7 @@ var SolidInner = ({
|
|
|
12901
12954
|
effects,
|
|
12902
12955
|
overrideId: overrideId ?? null
|
|
12903
12956
|
});
|
|
12904
|
-
const sourceCanvas =
|
|
12957
|
+
const sourceCanvas = useMemo30(() => {
|
|
12905
12958
|
if (typeof document === "undefined") {
|
|
12906
12959
|
return null;
|
|
12907
12960
|
}
|
|
@@ -12969,7 +13022,7 @@ var SolidInner = ({
|
|
|
12969
13022
|
cancelRender2,
|
|
12970
13023
|
memoizedEffects
|
|
12971
13024
|
]);
|
|
12972
|
-
const canvasStyle =
|
|
13025
|
+
const canvasStyle = useMemo30(() => {
|
|
12973
13026
|
return {
|
|
12974
13027
|
width,
|
|
12975
13028
|
height,
|
|
@@ -13118,7 +13171,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13118
13171
|
controls,
|
|
13119
13172
|
style
|
|
13120
13173
|
}, ref) => {
|
|
13121
|
-
const ancestor =
|
|
13174
|
+
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
13122
13175
|
assertHtmlInCanvasDimensions(width, height);
|
|
13123
13176
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
13124
13177
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
@@ -13337,20 +13390,20 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13337
13390
|
continueRender2(handle);
|
|
13338
13391
|
};
|
|
13339
13392
|
}, [width, height, continueRender2, canvasSizeKey]);
|
|
13340
|
-
const innerStyle =
|
|
13393
|
+
const innerStyle = useMemo31(() => {
|
|
13341
13394
|
return {
|
|
13342
13395
|
width,
|
|
13343
13396
|
height
|
|
13344
13397
|
};
|
|
13345
13398
|
}, [width, height]);
|
|
13346
|
-
const canvasStyle =
|
|
13399
|
+
const canvasStyle = useMemo31(() => {
|
|
13347
13400
|
return {
|
|
13348
13401
|
width,
|
|
13349
13402
|
height,
|
|
13350
13403
|
...style ?? {}
|
|
13351
13404
|
};
|
|
13352
13405
|
}, [height, style, width]);
|
|
13353
|
-
const ancestorValue =
|
|
13406
|
+
const ancestorValue = useMemo31(() => {
|
|
13354
13407
|
return {
|
|
13355
13408
|
requestParentPaint: () => {
|
|
13356
13409
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -13564,7 +13617,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13564
13617
|
effects,
|
|
13565
13618
|
overrideId: controls?.overrideId ?? null
|
|
13566
13619
|
});
|
|
13567
|
-
const sequenceContext =
|
|
13620
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
13568
13621
|
const pendingLoadDelayRef = useRef23(null);
|
|
13569
13622
|
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
13570
13623
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
@@ -13581,7 +13634,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13581
13634
|
continueRender2(pending.handle);
|
|
13582
13635
|
pendingLoadDelayRef.current = null;
|
|
13583
13636
|
}, [continueRender2]);
|
|
13584
|
-
const sourceCanvas =
|
|
13637
|
+
const sourceCanvas = useMemo32(() => {
|
|
13585
13638
|
if (typeof document === "undefined") {
|
|
13586
13639
|
return null;
|
|
13587
13640
|
}
|
|
@@ -13903,7 +13956,7 @@ var ImgContent = ({
|
|
|
13903
13956
|
const imageRef = useRef24(null);
|
|
13904
13957
|
const errors = useRef24({});
|
|
13905
13958
|
const { delayPlayback } = useBufferState();
|
|
13906
|
-
const sequenceContext =
|
|
13959
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
13907
13960
|
const [isLoading, setIsLoading] = useState18(false);
|
|
13908
13961
|
const _propsValid = true;
|
|
13909
13962
|
if (!_propsValid) {
|
|
@@ -14252,7 +14305,10 @@ var makeRemotionComponentIdentity = ({
|
|
|
14252
14305
|
};
|
|
14253
14306
|
var interactiveElementSchema = {
|
|
14254
14307
|
...baseSchema,
|
|
14255
|
-
...transformSchema
|
|
14308
|
+
...transformSchema
|
|
14309
|
+
};
|
|
14310
|
+
var interactiveTextElementSchema = {
|
|
14311
|
+
...interactiveElementSchema,
|
|
14256
14312
|
...textSchema,
|
|
14257
14313
|
...textContentSchema
|
|
14258
14314
|
};
|
|
@@ -14268,7 +14324,7 @@ var withSchema = (options) => {
|
|
|
14268
14324
|
addSequenceStackTraces(Wrapped);
|
|
14269
14325
|
return Wrapped;
|
|
14270
14326
|
};
|
|
14271
|
-
var makeInteractiveElement = (tag, displayName) => {
|
|
14327
|
+
var makeInteractiveElement = (tag, displayName, schema) => {
|
|
14272
14328
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
14273
14329
|
const {
|
|
14274
14330
|
durationInFrames,
|
|
@@ -14314,12 +14370,18 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14314
14370
|
packageName: "remotion",
|
|
14315
14371
|
componentName: displayName.slice(1, -1)
|
|
14316
14372
|
}),
|
|
14317
|
-
schema
|
|
14373
|
+
schema,
|
|
14318
14374
|
supportsEffects: false
|
|
14319
14375
|
});
|
|
14320
14376
|
Wrapped.displayName = displayName;
|
|
14321
14377
|
return Wrapped;
|
|
14322
14378
|
};
|
|
14379
|
+
var makeInteractiveTextElement = (tag, displayName) => {
|
|
14380
|
+
return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
|
|
14381
|
+
};
|
|
14382
|
+
var makeInteractiveNonTextElement = (tag, displayName) => {
|
|
14383
|
+
return makeInteractiveElement(tag, displayName, interactiveElementSchema);
|
|
14384
|
+
};
|
|
14323
14385
|
var Interactive = {
|
|
14324
14386
|
baseSchema,
|
|
14325
14387
|
transformSchema,
|
|
@@ -14328,41 +14390,41 @@ var Interactive = {
|
|
|
14328
14390
|
sequenceSchema,
|
|
14329
14391
|
withSchema,
|
|
14330
14392
|
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
14331
|
-
A:
|
|
14332
|
-
Article:
|
|
14333
|
-
Aside:
|
|
14334
|
-
Button:
|
|
14335
|
-
Circle:
|
|
14336
|
-
Code:
|
|
14337
|
-
Div:
|
|
14338
|
-
Ellipse:
|
|
14339
|
-
Em:
|
|
14340
|
-
Footer:
|
|
14341
|
-
G:
|
|
14342
|
-
H1:
|
|
14343
|
-
H2:
|
|
14344
|
-
H3:
|
|
14345
|
-
H4:
|
|
14346
|
-
H5:
|
|
14347
|
-
H6:
|
|
14348
|
-
Header:
|
|
14349
|
-
Label:
|
|
14350
|
-
Li:
|
|
14351
|
-
Line:
|
|
14352
|
-
Main:
|
|
14353
|
-
Nav:
|
|
14354
|
-
Ol:
|
|
14355
|
-
P:
|
|
14356
|
-
Path:
|
|
14357
|
-
Pre:
|
|
14358
|
-
Rect:
|
|
14359
|
-
Section:
|
|
14360
|
-
Small:
|
|
14361
|
-
Span:
|
|
14362
|
-
Strong:
|
|
14363
|
-
Svg:
|
|
14364
|
-
Text:
|
|
14365
|
-
Ul:
|
|
14393
|
+
A: makeInteractiveTextElement("a", "<Interactive.A>"),
|
|
14394
|
+
Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
|
|
14395
|
+
Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
|
|
14396
|
+
Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
|
|
14397
|
+
Circle: makeInteractiveNonTextElement("circle", "<Interactive.Circle>"),
|
|
14398
|
+
Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
|
|
14399
|
+
Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
|
|
14400
|
+
Ellipse: makeInteractiveNonTextElement("ellipse", "<Interactive.Ellipse>"),
|
|
14401
|
+
Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
|
|
14402
|
+
Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
|
|
14403
|
+
G: makeInteractiveNonTextElement("g", "<Interactive.G>"),
|
|
14404
|
+
H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
|
|
14405
|
+
H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
|
|
14406
|
+
H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
|
|
14407
|
+
H4: makeInteractiveTextElement("h4", "<Interactive.H4>"),
|
|
14408
|
+
H5: makeInteractiveTextElement("h5", "<Interactive.H5>"),
|
|
14409
|
+
H6: makeInteractiveTextElement("h6", "<Interactive.H6>"),
|
|
14410
|
+
Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
|
|
14411
|
+
Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
|
|
14412
|
+
Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
|
|
14413
|
+
Line: makeInteractiveNonTextElement("line", "<Interactive.Line>"),
|
|
14414
|
+
Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
|
|
14415
|
+
Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
|
|
14416
|
+
Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
|
|
14417
|
+
P: makeInteractiveTextElement("p", "<Interactive.P>"),
|
|
14418
|
+
Path: makeInteractiveNonTextElement("path", "<Interactive.Path>"),
|
|
14419
|
+
Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
|
|
14420
|
+
Rect: makeInteractiveNonTextElement("rect", "<Interactive.Rect>"),
|
|
14421
|
+
Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
|
|
14422
|
+
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
14423
|
+
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
14424
|
+
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
14425
|
+
Svg: makeInteractiveNonTextElement("svg", "<Interactive.Svg>"),
|
|
14426
|
+
Text: makeInteractiveTextElement("text", "<Interactive.Text>"),
|
|
14427
|
+
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
14366
14428
|
};
|
|
14367
14429
|
var compositionsRef = React31.createRef();
|
|
14368
14430
|
var CompositionManagerProvider = ({
|
|
@@ -14419,7 +14481,7 @@ var CompositionManagerProvider = ({
|
|
|
14419
14481
|
getCompositions: () => currentcompositionsRef.current
|
|
14420
14482
|
};
|
|
14421
14483
|
}, []);
|
|
14422
|
-
const compositionManagerSetters =
|
|
14484
|
+
const compositionManagerSetters = useMemo33(() => {
|
|
14423
14485
|
return {
|
|
14424
14486
|
registerComposition,
|
|
14425
14487
|
unregisterComposition,
|
|
@@ -14435,7 +14497,7 @@ var CompositionManagerProvider = ({
|
|
|
14435
14497
|
unregisterFolder,
|
|
14436
14498
|
onlyRenderComposition
|
|
14437
14499
|
]);
|
|
14438
|
-
const compositionManagerContextValue =
|
|
14500
|
+
const compositionManagerContextValue = useMemo33(() => {
|
|
14439
14501
|
return {
|
|
14440
14502
|
compositions,
|
|
14441
14503
|
folders,
|
|
@@ -14533,7 +14595,7 @@ var waitForRoot = (fn) => {
|
|
|
14533
14595
|
};
|
|
14534
14596
|
var MediaEnabledContext = createContext24(null);
|
|
14535
14597
|
var useVideoEnabled = () => {
|
|
14536
|
-
const context =
|
|
14598
|
+
const context = useContext35(MediaEnabledContext);
|
|
14537
14599
|
if (!context) {
|
|
14538
14600
|
return window.remotion_videoEnabled;
|
|
14539
14601
|
}
|
|
@@ -14543,7 +14605,7 @@ var useVideoEnabled = () => {
|
|
|
14543
14605
|
return context.videoEnabled;
|
|
14544
14606
|
};
|
|
14545
14607
|
var useAudioEnabled = () => {
|
|
14546
|
-
const context =
|
|
14608
|
+
const context = useContext35(MediaEnabledContext);
|
|
14547
14609
|
if (!context) {
|
|
14548
14610
|
return window.remotion_audioEnabled;
|
|
14549
14611
|
}
|
|
@@ -14557,7 +14619,7 @@ var MediaEnabledProvider = ({
|
|
|
14557
14619
|
videoEnabled,
|
|
14558
14620
|
audioEnabled
|
|
14559
14621
|
}) => {
|
|
14560
|
-
const value =
|
|
14622
|
+
const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
14561
14623
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
14562
14624
|
value,
|
|
14563
14625
|
children
|
|
@@ -14573,13 +14635,13 @@ var RemotionRootContexts = ({
|
|
|
14573
14635
|
audioEnabled,
|
|
14574
14636
|
frameState
|
|
14575
14637
|
}) => {
|
|
14576
|
-
const nonceContext =
|
|
14638
|
+
const nonceContext = useMemo35(() => {
|
|
14577
14639
|
let counter = 0;
|
|
14578
14640
|
return {
|
|
14579
14641
|
getNonce: () => counter++
|
|
14580
14642
|
};
|
|
14581
14643
|
}, []);
|
|
14582
|
-
const logging =
|
|
14644
|
+
const logging = useMemo35(() => {
|
|
14583
14645
|
return { logLevel, mountTime: Date.now() };
|
|
14584
14646
|
}, [logLevel]);
|
|
14585
14647
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -14880,13 +14942,13 @@ var OffthreadVideoForRendering = ({
|
|
|
14880
14942
|
const frame = useCurrentFrame();
|
|
14881
14943
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
14882
14944
|
const videoConfig = useUnsafeVideoConfig();
|
|
14883
|
-
const sequenceContext =
|
|
14945
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
14884
14946
|
const mediaStartsAt = useMediaStartsAt();
|
|
14885
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
14947
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
14886
14948
|
if (!src) {
|
|
14887
14949
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
14888
14950
|
}
|
|
14889
|
-
const id =
|
|
14951
|
+
const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
14890
14952
|
src,
|
|
14891
14953
|
sequenceContext?.cumulatedFrom,
|
|
14892
14954
|
sequenceContext?.relativeFrom,
|
|
@@ -14941,14 +15003,14 @@ var OffthreadVideoForRendering = ({
|
|
|
14941
15003
|
sequenceContext?.cumulatedNegativeFrom,
|
|
14942
15004
|
audioStreamIndex
|
|
14943
15005
|
]);
|
|
14944
|
-
const currentTime =
|
|
15006
|
+
const currentTime = useMemo36(() => {
|
|
14945
15007
|
return getExpectedMediaFrameUncorrected({
|
|
14946
15008
|
frame,
|
|
14947
15009
|
playbackRate: playbackRate || 1,
|
|
14948
15010
|
startFrom: -mediaStartsAt
|
|
14949
15011
|
}) / videoConfig.fps;
|
|
14950
15012
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
14951
|
-
const actualSrc =
|
|
15013
|
+
const actualSrc = useMemo36(() => {
|
|
14952
15014
|
return getOffthreadVideoSource({
|
|
14953
15015
|
src,
|
|
14954
15016
|
currentTime,
|
|
@@ -15036,7 +15098,7 @@ var OffthreadVideoForRendering = ({
|
|
|
15036
15098
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
15037
15099
|
}
|
|
15038
15100
|
}, [imageSrc, onError]);
|
|
15039
|
-
const className =
|
|
15101
|
+
const className = useMemo36(() => {
|
|
15040
15102
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
15041
15103
|
}, [props2.className]);
|
|
15042
15104
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -15100,12 +15162,12 @@ class MediaPlaybackError extends Error {
|
|
|
15100
15162
|
}
|
|
15101
15163
|
}
|
|
15102
15164
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
15103
|
-
const context =
|
|
15165
|
+
const context = useContext38(SharedAudioContext);
|
|
15104
15166
|
if (!context) {
|
|
15105
15167
|
throw new Error("SharedAudioContext not found");
|
|
15106
15168
|
}
|
|
15107
15169
|
const videoRef = useRef27(null);
|
|
15108
|
-
const sharedSource =
|
|
15170
|
+
const sharedSource = useMemo37(() => {
|
|
15109
15171
|
if (!context.audioContext) {
|
|
15110
15172
|
return null;
|
|
15111
15173
|
}
|
|
@@ -15157,7 +15219,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15157
15219
|
}
|
|
15158
15220
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
15159
15221
|
const { fps, durationInFrames } = useVideoConfig();
|
|
15160
|
-
const parentSequence =
|
|
15222
|
+
const parentSequence = useContext38(SequenceContext);
|
|
15161
15223
|
const logLevel = useLogLevel();
|
|
15162
15224
|
const mountTime = useMountTime();
|
|
15163
15225
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -15308,7 +15370,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15308
15370
|
current.preload = "auto";
|
|
15309
15371
|
}
|
|
15310
15372
|
}, []);
|
|
15311
|
-
const actualStyle =
|
|
15373
|
+
const actualStyle = useMemo37(() => {
|
|
15312
15374
|
return {
|
|
15313
15375
|
...style
|
|
15314
15376
|
};
|
|
@@ -15504,7 +15566,7 @@ function useRemotionContexts() {
|
|
|
15504
15566
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15505
15567
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15506
15568
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15507
|
-
return
|
|
15569
|
+
return useMemo38(() => ({
|
|
15508
15570
|
compositionManagerCtx,
|
|
15509
15571
|
timelineContext,
|
|
15510
15572
|
setTimelineContext,
|
|
@@ -15615,6 +15677,7 @@ var Internals = {
|
|
|
15615
15677
|
textSchema,
|
|
15616
15678
|
transformSchema,
|
|
15617
15679
|
premountSchema,
|
|
15680
|
+
premountStyleSchema,
|
|
15618
15681
|
flattenActiveSchema,
|
|
15619
15682
|
getFlatSchemaWithAllKeys,
|
|
15620
15683
|
RemotionRootContexts,
|
|
@@ -15628,6 +15691,7 @@ var Internals = {
|
|
|
15628
15691
|
truthy,
|
|
15629
15692
|
SequenceContext,
|
|
15630
15693
|
PremountContext,
|
|
15694
|
+
usePremounting,
|
|
15631
15695
|
useRemotionContexts,
|
|
15632
15696
|
RemotionContextProvider,
|
|
15633
15697
|
CSSUtils: exports_default_css,
|
|
@@ -15803,7 +15867,7 @@ var validateSeriesSequenceProps = ({
|
|
|
15803
15867
|
return offset;
|
|
15804
15868
|
};
|
|
15805
15869
|
var SeriesInner = (props2) => {
|
|
15806
|
-
const childrenValue =
|
|
15870
|
+
const childrenValue = useMemo39(() => {
|
|
15807
15871
|
const flattenedChildren = flattenChildren(props2.children);
|
|
15808
15872
|
const renderChildren = (i, startFrame) => {
|
|
15809
15873
|
if (i === flattenedChildren.length) {
|
|
@@ -16132,14 +16196,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
16132
16196
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
16133
16197
|
const videoConfig = useUnsafeVideoConfig();
|
|
16134
16198
|
const videoRef = useRef28(null);
|
|
16135
|
-
const sequenceContext =
|
|
16199
|
+
const sequenceContext = useContext39(SequenceContext);
|
|
16136
16200
|
const mediaStartsAt = useMediaStartsAt();
|
|
16137
16201
|
const environment = useRemotionEnvironment();
|
|
16138
16202
|
const logLevel = useLogLevel();
|
|
16139
16203
|
const mountTime = useMountTime();
|
|
16140
16204
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
16141
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
16142
|
-
const id =
|
|
16205
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
16206
|
+
const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
16143
16207
|
props2.src,
|
|
16144
16208
|
sequenceContext?.cumulatedFrom,
|
|
16145
16209
|
sequenceContext?.relativeFrom,
|
|
@@ -16350,7 +16414,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
16350
16414
|
if (environment.isClientSideRendering) {
|
|
16351
16415
|
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");
|
|
16352
16416
|
}
|
|
16353
|
-
const { durations, setDurations } =
|
|
16417
|
+
const { durations, setDurations } = useContext40(DurationsContext);
|
|
16354
16418
|
if (typeof ref === "string") {
|
|
16355
16419
|
throw new Error("string refs are not supported");
|
|
16356
16420
|
}
|
|
@@ -16469,7 +16533,7 @@ addSequenceStackTraces(Composition);
|
|
|
16469
16533
|
addSequenceStackTraces(Folder);
|
|
16470
16534
|
|
|
16471
16535
|
// ../shapes/dist/esm/index.mjs
|
|
16472
|
-
import React, { useCallback as useCallback26, useMemo as
|
|
16536
|
+
import React, { useCallback as useCallback26, useMemo as useMemo41, useRef as useRef29 } from "react";
|
|
16473
16537
|
import { version } from "react-dom";
|
|
16474
16538
|
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
16475
16539
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -16651,13 +16715,13 @@ var RenderSvg = ({
|
|
|
16651
16715
|
stack,
|
|
16652
16716
|
...props
|
|
16653
16717
|
}) => {
|
|
16654
|
-
const actualStyle =
|
|
16718
|
+
const actualStyle = useMemo41(() => {
|
|
16655
16719
|
return {
|
|
16656
16720
|
overflow: "visible",
|
|
16657
16721
|
...style ?? {}
|
|
16658
16722
|
};
|
|
16659
16723
|
}, [style]);
|
|
16660
|
-
const actualPathStyle =
|
|
16724
|
+
const actualPathStyle = useMemo41(() => {
|
|
16661
16725
|
return {
|
|
16662
16726
|
transformBox: "fill-box",
|
|
16663
16727
|
...pathStyle ?? {}
|
|
@@ -19636,7 +19700,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19636
19700
|
progress: 0,
|
|
19637
19701
|
isActive: false
|
|
19638
19702
|
});
|
|
19639
|
-
const eventTarget =
|
|
19703
|
+
const eventTarget = useMemo43(() => new EventTarget, []);
|
|
19640
19704
|
useEffect21(() => {
|
|
19641
19705
|
if (disabled) {
|
|
19642
19706
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
@@ -26083,7 +26147,7 @@ var Triangle22 = (props) => {
|
|
|
26083
26147
|
};
|
|
26084
26148
|
|
|
26085
26149
|
// src/components/homepage/FreePricing.tsx
|
|
26086
|
-
import React53, { useCallback as useCallback38, useMemo as
|
|
26150
|
+
import React53, { useCallback as useCallback38, useMemo as useMemo52 } from "react";
|
|
26087
26151
|
|
|
26088
26152
|
// ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
26089
26153
|
var CLASS_PART_SEPARATOR2 = "-";
|
|
@@ -27740,14 +27804,14 @@ var CompanyPricing = () => {
|
|
|
27740
27804
|
}, []);
|
|
27741
27805
|
const creatorsPrice = creatorsSelected ? devSeatCount * SEAT_PRICE : 0;
|
|
27742
27806
|
const automatorsPrice = automatorsSelected ? Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE : 0;
|
|
27743
|
-
const totalPrice =
|
|
27807
|
+
const totalPrice = useMemo52(() => {
|
|
27744
27808
|
const basePrice = creatorsPrice + automatorsPrice;
|
|
27745
27809
|
if (automatorsSelected) {
|
|
27746
27810
|
return Math.max(100, basePrice);
|
|
27747
27811
|
}
|
|
27748
27812
|
return basePrice;
|
|
27749
27813
|
}, [creatorsPrice, automatorsPrice, automatorsSelected]);
|
|
27750
|
-
const totalPriceString =
|
|
27814
|
+
const totalPriceString = useMemo52(() => {
|
|
27751
27815
|
return formatPrice(totalPrice);
|
|
27752
27816
|
}, [formatPrice, totalPrice]);
|
|
27753
27817
|
const showMinimumMessage = automatorsSelected && creatorsPrice + automatorsPrice < 100;
|
|
@@ -27977,13 +28041,13 @@ var Pricing = ({
|
|
|
27977
28041
|
licenseHref = "https://github.com/remotion-dev/remotion/blob/main/LICENSE.md",
|
|
27978
28042
|
termsHref = "/docs/license/terms"
|
|
27979
28043
|
}) => {
|
|
27980
|
-
const faqLinkTarget =
|
|
28044
|
+
const faqLinkTarget = useMemo53(() => {
|
|
27981
28045
|
return faqHref.startsWith("http") ? "_blank" : undefined;
|
|
27982
28046
|
}, [faqHref]);
|
|
27983
|
-
const licenseLinkTarget =
|
|
28047
|
+
const licenseLinkTarget = useMemo53(() => {
|
|
27984
28048
|
return licenseHref.startsWith("http") ? "_blank" : undefined;
|
|
27985
28049
|
}, [licenseHref]);
|
|
27986
|
-
const termsLinkTarget =
|
|
28050
|
+
const termsLinkTarget = useMemo53(() => {
|
|
27987
28051
|
return termsHref.startsWith("http") ? "_blank" : undefined;
|
|
27988
28052
|
}, [termsHref]);
|
|
27989
28053
|
return /* @__PURE__ */ jsxs9("div", {
|