@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/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 : 1,
|
|
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
|
}
|
|
@@ -9535,6 +9588,13 @@ var decodeImage = async ({
|
|
|
9535
9588
|
frameCount: selectedTrack.frameCount
|
|
9536
9589
|
};
|
|
9537
9590
|
};
|
|
9591
|
+
var getCurrentTime = ({
|
|
9592
|
+
frame,
|
|
9593
|
+
playbackRate,
|
|
9594
|
+
fps
|
|
9595
|
+
}) => {
|
|
9596
|
+
return frame * playbackRate / fps;
|
|
9597
|
+
};
|
|
9538
9598
|
var serializeRequestInit = (requestInit) => {
|
|
9539
9599
|
if (!requestInit) {
|
|
9540
9600
|
return null;
|
|
@@ -9602,7 +9662,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
9602
9662
|
const [decodeHandle] = useState6(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
9603
9663
|
const frame = useCurrentFrame();
|
|
9604
9664
|
const { fps } = useVideoConfig();
|
|
9605
|
-
const currentTime = frame
|
|
9665
|
+
const currentTime = getCurrentTime({ frame, playbackRate, fps });
|
|
9606
9666
|
const currentTimeRef = useRef9(currentTime);
|
|
9607
9667
|
currentTimeRef.current = currentTime;
|
|
9608
9668
|
const requestInitKey = serializeRequestInit(requestInit);
|
|
@@ -9730,8 +9790,6 @@ var AnimatedImageInner = ({
|
|
|
9730
9790
|
ref,
|
|
9731
9791
|
...sequenceProps
|
|
9732
9792
|
}) => {
|
|
9733
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
9734
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
9735
9793
|
const actualRef = useRef9(null);
|
|
9736
9794
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
9737
9795
|
useImperativeHandle2(ref, () => {
|
|
@@ -9754,7 +9812,7 @@ var AnimatedImageInner = ({
|
|
|
9754
9812
|
};
|
|
9755
9813
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
9756
9814
|
layout: "none",
|
|
9757
|
-
durationInFrames
|
|
9815
|
+
durationInFrames,
|
|
9758
9816
|
name: "<AnimatedImage>",
|
|
9759
9817
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
9760
9818
|
controls,
|
|
@@ -9880,7 +9938,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
9880
9938
|
};
|
|
9881
9939
|
}
|
|
9882
9940
|
}, []);
|
|
9883
|
-
const contextValue =
|
|
9941
|
+
const contextValue = useMemo18(() => {
|
|
9884
9942
|
return {
|
|
9885
9943
|
registerRenderAsset,
|
|
9886
9944
|
unregisterRenderAsset,
|
|
@@ -9894,7 +9952,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
9894
9952
|
};
|
|
9895
9953
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
9896
9954
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
9897
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9955
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
9898
9956
|
const env = useRemotionEnvironment();
|
|
9899
9957
|
const frame = useCurrentFrame();
|
|
9900
9958
|
const [id] = useState8(() => {
|
|
@@ -10009,14 +10067,14 @@ var Loop = ({
|
|
|
10009
10067
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
10010
10068
|
const start = iteration * durationInFrames;
|
|
10011
10069
|
const from = Math.min(start, maxFrame);
|
|
10012
|
-
const loopDisplay =
|
|
10070
|
+
const loopDisplay = useMemo19(() => {
|
|
10013
10071
|
return {
|
|
10014
10072
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
10015
10073
|
startOffset: -from,
|
|
10016
10074
|
durationInFrames
|
|
10017
10075
|
};
|
|
10018
10076
|
}, [compDuration, durationInFrames, from, times]);
|
|
10019
|
-
const loopContext =
|
|
10077
|
+
const loopContext = useMemo19(() => {
|
|
10020
10078
|
return {
|
|
10021
10079
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
10022
10080
|
durationInFrames
|
|
@@ -10085,7 +10143,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
10085
10143
|
return src.slice(0, hashIndex);
|
|
10086
10144
|
};
|
|
10087
10145
|
var usePreload = (src) => {
|
|
10088
|
-
const preloads2 =
|
|
10146
|
+
const preloads2 = useContext20(PreloadContext);
|
|
10089
10147
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
10090
10148
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
10091
10149
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -10388,7 +10446,7 @@ var DurationsContext = createContext20({
|
|
|
10388
10446
|
});
|
|
10389
10447
|
var DurationsContextProvider = ({ children }) => {
|
|
10390
10448
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
10391
|
-
const value =
|
|
10449
|
+
const value = useMemo20(() => {
|
|
10392
10450
|
return {
|
|
10393
10451
|
durations,
|
|
10394
10452
|
setDurations
|
|
@@ -10527,7 +10585,7 @@ var useSingletonAudioContext = ({
|
|
|
10527
10585
|
if (sampleRate !== initialSampleRate.current) {
|
|
10528
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.`);
|
|
10529
10587
|
}
|
|
10530
|
-
const context =
|
|
10588
|
+
const context = useMemo21(() => {
|
|
10531
10589
|
if (env.isRendering) {
|
|
10532
10590
|
return null;
|
|
10533
10591
|
}
|
|
@@ -10661,9 +10719,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10661
10719
|
});
|
|
10662
10720
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
10663
10721
|
const isResuming = useRef12(null);
|
|
10664
|
-
const audioSyncAnchor =
|
|
10722
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
10665
10723
|
const audioSyncAnchorListeners = useRef12([]);
|
|
10666
|
-
const audioSyncAnchorEmitter =
|
|
10724
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
10667
10725
|
return {
|
|
10668
10726
|
dispatch: (event) => {
|
|
10669
10727
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -10683,7 +10741,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10683
10741
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
10684
10742
|
nodesToResume.current.delete(node);
|
|
10685
10743
|
}, []);
|
|
10686
|
-
const scheduleAudioNode =
|
|
10744
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
10687
10745
|
return ({
|
|
10688
10746
|
node,
|
|
10689
10747
|
mediaTimestamp,
|
|
@@ -10775,7 +10833,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10775
10833
|
audioContextIsPlayingEventually.current = false;
|
|
10776
10834
|
return ctxAndGain.suspend();
|
|
10777
10835
|
}, [ctxAndGain]);
|
|
10778
|
-
const audioContextValue =
|
|
10836
|
+
const audioContextValue = useMemo22(() => {
|
|
10779
10837
|
return {
|
|
10780
10838
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
10781
10839
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -10812,10 +10870,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10812
10870
|
const logLevel = useLogLevel();
|
|
10813
10871
|
const mountTime = useMountTime();
|
|
10814
10872
|
const env = useRemotionEnvironment();
|
|
10815
|
-
const audioCtx =
|
|
10873
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
10816
10874
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
10817
10875
|
const resume = audioCtx?.resume;
|
|
10818
|
-
const refs =
|
|
10876
|
+
const refs = useMemo22(() => {
|
|
10819
10877
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
10820
10878
|
const ref = createRef2();
|
|
10821
10879
|
return {
|
|
@@ -10954,7 +11012,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10954
11012
|
});
|
|
10955
11013
|
resume?.();
|
|
10956
11014
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
10957
|
-
const audioTagsValue =
|
|
11015
|
+
const audioTagsValue = useMemo22(() => {
|
|
10958
11016
|
return {
|
|
10959
11017
|
registerAudio,
|
|
10960
11018
|
unregisterAudio,
|
|
@@ -10969,7 +11027,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10969
11027
|
unregisterAudio,
|
|
10970
11028
|
updateAudio
|
|
10971
11029
|
]);
|
|
10972
|
-
const sharedAudioTagElements =
|
|
11030
|
+
const sharedAudioTagElements = useMemo22(() => {
|
|
10973
11031
|
return refs.map(({ id, ref }) => {
|
|
10974
11032
|
return /* @__PURE__ */ jsx19("audio", {
|
|
10975
11033
|
ref,
|
|
@@ -10992,8 +11050,8 @@ var useSharedAudio = ({
|
|
|
10992
11050
|
premounting,
|
|
10993
11051
|
postmounting
|
|
10994
11052
|
}) => {
|
|
10995
|
-
const audioCtx =
|
|
10996
|
-
const tagsCtx =
|
|
11053
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
11054
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
10997
11055
|
const [elem] = useState10(() => {
|
|
10998
11056
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
10999
11057
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -11172,7 +11230,7 @@ var useVolume = ({
|
|
|
11172
11230
|
const audioStuffRef = useRef14(null);
|
|
11173
11231
|
const currentVolumeRef = useRef14(volume);
|
|
11174
11232
|
currentVolumeRef.current = volume;
|
|
11175
|
-
const sharedAudioContext =
|
|
11233
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
11176
11234
|
if (!sharedAudioContext) {
|
|
11177
11235
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
11178
11236
|
}
|
|
@@ -11237,7 +11295,7 @@ var useVolume = ({
|
|
|
11237
11295
|
return audioStuffRef;
|
|
11238
11296
|
};
|
|
11239
11297
|
var useMediaStartsAt = () => {
|
|
11240
|
-
const parentSequence =
|
|
11298
|
+
const parentSequence = useContext23(SequenceContext);
|
|
11241
11299
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
11242
11300
|
};
|
|
11243
11301
|
var useFrameForVolumeProp = (behavior) => {
|
|
@@ -11326,7 +11384,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11326
11384
|
if (!src) {
|
|
11327
11385
|
throw new Error("No src passed");
|
|
11328
11386
|
}
|
|
11329
|
-
const parentSequence =
|
|
11387
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11330
11388
|
const [initialVolume] = useState11(() => volume);
|
|
11331
11389
|
const duration = getTimelineDuration({
|
|
11332
11390
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -11336,7 +11394,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11336
11394
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
11337
11395
|
loop
|
|
11338
11396
|
});
|
|
11339
|
-
const volumes =
|
|
11397
|
+
const volumes = useMemo23(() => {
|
|
11340
11398
|
if (typeof volume === "number") {
|
|
11341
11399
|
return volume;
|
|
11342
11400
|
}
|
|
@@ -11357,7 +11415,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11357
11415
|
const nonce = useNonce();
|
|
11358
11416
|
const { rootId } = useTimelineContext();
|
|
11359
11417
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
11360
|
-
const memoizedResult =
|
|
11418
|
+
const memoizedResult = useMemo23(() => {
|
|
11361
11419
|
return {
|
|
11362
11420
|
volumes,
|
|
11363
11421
|
duration,
|
|
@@ -11398,9 +11456,9 @@ var useMediaInTimeline = ({
|
|
|
11398
11456
|
documentationLink,
|
|
11399
11457
|
refForOutline
|
|
11400
11458
|
}) => {
|
|
11401
|
-
const parentSequence =
|
|
11459
|
+
const parentSequence = useContext24(SequenceContext);
|
|
11402
11460
|
const startsAt = useMediaStartsAt();
|
|
11403
|
-
const { registerSequence, unregisterSequence } =
|
|
11461
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
11404
11462
|
const { durationInFrames } = useVideoConfig();
|
|
11405
11463
|
const mediaStartsAt = useMediaStartsAt();
|
|
11406
11464
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -11565,13 +11623,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11565
11623
|
}
|
|
11566
11624
|
}, [blocks]);
|
|
11567
11625
|
}
|
|
11568
|
-
return
|
|
11626
|
+
return useMemo24(() => {
|
|
11569
11627
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11570
11628
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11571
11629
|
};
|
|
11572
11630
|
var BufferingContextReact = React21.createContext(null);
|
|
11573
11631
|
var BufferingProvider = ({ children }) => {
|
|
11574
|
-
const { logLevel, mountTime } =
|
|
11632
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
11575
11633
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
11576
11634
|
return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
|
|
11577
11635
|
value: bufferManager,
|
|
@@ -11597,10 +11655,10 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
11597
11655
|
return isBuffering;
|
|
11598
11656
|
};
|
|
11599
11657
|
var useBufferState = () => {
|
|
11600
|
-
const buffer =
|
|
11658
|
+
const buffer = useContext26(BufferingContextReact);
|
|
11601
11659
|
const logLevel = useLogLevel();
|
|
11602
11660
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
11603
|
-
return
|
|
11661
|
+
return useMemo25(() => ({
|
|
11604
11662
|
delayPlayback: () => {
|
|
11605
11663
|
if (!addBlock) {
|
|
11606
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");
|
|
@@ -11708,7 +11766,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
11708
11766
|
onVariableFpsVideoDetected,
|
|
11709
11767
|
pauseWhenBuffering
|
|
11710
11768
|
]);
|
|
11711
|
-
return
|
|
11769
|
+
return useMemo26(() => {
|
|
11712
11770
|
return {
|
|
11713
11771
|
isBuffering: () => bufferingRef.current,
|
|
11714
11772
|
bufferUntilFirstFrame
|
|
@@ -12082,7 +12140,7 @@ var useMediaPlayback = ({
|
|
|
12082
12140
|
const frame = useCurrentFrame();
|
|
12083
12141
|
const absoluteFrame = useTimelinePosition();
|
|
12084
12142
|
const [playing] = usePlayingState();
|
|
12085
|
-
const buffering =
|
|
12143
|
+
const buffering = useContext27(BufferingContextReact);
|
|
12086
12144
|
const { fps } = useVideoConfig();
|
|
12087
12145
|
const mediaStartsAt = useMediaStartsAt();
|
|
12088
12146
|
const lastSeekDueToShift = useRef18(null);
|
|
@@ -12377,16 +12435,16 @@ var SetMediaVolumeContext = createContext22({
|
|
|
12377
12435
|
}
|
|
12378
12436
|
});
|
|
12379
12437
|
var useMediaVolumeState = () => {
|
|
12380
|
-
const { mediaVolume } =
|
|
12381
|
-
const { setMediaVolume } =
|
|
12382
|
-
return
|
|
12438
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
12439
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
12440
|
+
return useMemo27(() => {
|
|
12383
12441
|
return [mediaVolume, setMediaVolume];
|
|
12384
12442
|
}, [mediaVolume, setMediaVolume]);
|
|
12385
12443
|
};
|
|
12386
12444
|
var usePlayerMutedState = () => {
|
|
12387
|
-
const { playerMuted } =
|
|
12388
|
-
const { setPlayerMuted } =
|
|
12389
|
-
return
|
|
12445
|
+
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
12446
|
+
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
12447
|
+
return useMemo27(() => {
|
|
12390
12448
|
return [playerMuted, setPlayerMuted];
|
|
12391
12449
|
}, [playerMuted, setPlayerMuted]);
|
|
12392
12450
|
};
|
|
@@ -12440,7 +12498,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12440
12498
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
12441
12499
|
}
|
|
12442
12500
|
const preloadedSrc = usePreload(src);
|
|
12443
|
-
const sequenceContext =
|
|
12501
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
12444
12502
|
const [timelineId] = useState14(() => String(Math.random()));
|
|
12445
12503
|
const userPreferredVolume = evaluateVolume({
|
|
12446
12504
|
frame: volumePropFrame,
|
|
@@ -12453,7 +12511,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12453
12511
|
requestsVideoFrame: false,
|
|
12454
12512
|
isClientSideRendering: false
|
|
12455
12513
|
});
|
|
12456
|
-
const propsToPass =
|
|
12514
|
+
const propsToPass = useMemo28(() => {
|
|
12457
12515
|
return {
|
|
12458
12516
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
12459
12517
|
src: preloadedSrc,
|
|
@@ -12470,7 +12528,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12470
12528
|
userPreferredVolume,
|
|
12471
12529
|
crossOriginValue
|
|
12472
12530
|
]);
|
|
12473
|
-
const id =
|
|
12531
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
12474
12532
|
src,
|
|
12475
12533
|
sequenceContext?.relativeFrom,
|
|
12476
12534
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12600,10 +12658,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12600
12658
|
const absoluteFrame = useTimelinePosition();
|
|
12601
12659
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
12602
12660
|
const frame = useCurrentFrame();
|
|
12603
|
-
const sequenceContext =
|
|
12604
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12661
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
12662
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
12605
12663
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12606
|
-
const id =
|
|
12664
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12607
12665
|
props.src,
|
|
12608
12666
|
sequenceContext?.relativeFrom,
|
|
12609
12667
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12710,7 +12768,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12710
12768
|
};
|
|
12711
12769
|
var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
|
|
12712
12770
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
12713
|
-
const audioTagsContext =
|
|
12771
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
12714
12772
|
const propsWithFreeze = props;
|
|
12715
12773
|
const {
|
|
12716
12774
|
startFrom,
|
|
@@ -12734,7 +12792,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
12734
12792
|
if (typeof freeze !== "undefined") {
|
|
12735
12793
|
throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
|
|
12736
12794
|
}
|
|
12737
|
-
const { durations, setDurations } =
|
|
12795
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
12738
12796
|
if (typeof props.src !== "string") {
|
|
12739
12797
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
12740
12798
|
}
|
|
@@ -12896,7 +12954,7 @@ var SolidInner = ({
|
|
|
12896
12954
|
effects,
|
|
12897
12955
|
overrideId: overrideId ?? null
|
|
12898
12956
|
});
|
|
12899
|
-
const sourceCanvas =
|
|
12957
|
+
const sourceCanvas = useMemo30(() => {
|
|
12900
12958
|
if (typeof document === "undefined") {
|
|
12901
12959
|
return null;
|
|
12902
12960
|
}
|
|
@@ -12964,7 +13022,7 @@ var SolidInner = ({
|
|
|
12964
13022
|
cancelRender2,
|
|
12965
13023
|
memoizedEffects
|
|
12966
13024
|
]);
|
|
12967
|
-
const canvasStyle =
|
|
13025
|
+
const canvasStyle = useMemo30(() => {
|
|
12968
13026
|
return {
|
|
12969
13027
|
width,
|
|
12970
13028
|
height,
|
|
@@ -13113,7 +13171,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13113
13171
|
controls,
|
|
13114
13172
|
style
|
|
13115
13173
|
}, ref) => {
|
|
13116
|
-
const ancestor =
|
|
13174
|
+
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
13117
13175
|
assertHtmlInCanvasDimensions(width, height);
|
|
13118
13176
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
13119
13177
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
@@ -13332,20 +13390,20 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13332
13390
|
continueRender2(handle);
|
|
13333
13391
|
};
|
|
13334
13392
|
}, [width, height, continueRender2, canvasSizeKey]);
|
|
13335
|
-
const innerStyle =
|
|
13393
|
+
const innerStyle = useMemo31(() => {
|
|
13336
13394
|
return {
|
|
13337
13395
|
width,
|
|
13338
13396
|
height
|
|
13339
13397
|
};
|
|
13340
13398
|
}, [width, height]);
|
|
13341
|
-
const canvasStyle =
|
|
13399
|
+
const canvasStyle = useMemo31(() => {
|
|
13342
13400
|
return {
|
|
13343
13401
|
width,
|
|
13344
13402
|
height,
|
|
13345
13403
|
...style ?? {}
|
|
13346
13404
|
};
|
|
13347
13405
|
}, [height, style, width]);
|
|
13348
|
-
const ancestorValue =
|
|
13406
|
+
const ancestorValue = useMemo31(() => {
|
|
13349
13407
|
return {
|
|
13350
13408
|
requestParentPaint: () => {
|
|
13351
13409
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -13382,8 +13440,6 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
13382
13440
|
name,
|
|
13383
13441
|
...sequenceProps
|
|
13384
13442
|
}, ref) => {
|
|
13385
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
13386
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
13387
13443
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
13388
13444
|
const actualRef = useRef22(null);
|
|
13389
13445
|
const setCanvasRef = useCallback16((node) => {
|
|
@@ -13395,7 +13451,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
13395
13451
|
}
|
|
13396
13452
|
}, [ref]);
|
|
13397
13453
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
13398
|
-
durationInFrames
|
|
13454
|
+
durationInFrames,
|
|
13399
13455
|
name: name ?? "<HtmlInCanvas>",
|
|
13400
13456
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
13401
13457
|
controls,
|
|
@@ -13561,7 +13617,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13561
13617
|
effects,
|
|
13562
13618
|
overrideId: controls?.overrideId ?? null
|
|
13563
13619
|
});
|
|
13564
|
-
const sequenceContext =
|
|
13620
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
13565
13621
|
const pendingLoadDelayRef = useRef23(null);
|
|
13566
13622
|
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
13567
13623
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
@@ -13578,7 +13634,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13578
13634
|
continueRender2(pending.handle);
|
|
13579
13635
|
pendingLoadDelayRef.current = null;
|
|
13580
13636
|
}, [continueRender2]);
|
|
13581
|
-
const sourceCanvas =
|
|
13637
|
+
const sourceCanvas = useMemo32(() => {
|
|
13582
13638
|
if (typeof document === "undefined") {
|
|
13583
13639
|
return null;
|
|
13584
13640
|
}
|
|
@@ -13900,7 +13956,7 @@ var ImgContent = ({
|
|
|
13900
13956
|
const imageRef = useRef24(null);
|
|
13901
13957
|
const errors = useRef24({});
|
|
13902
13958
|
const { delayPlayback } = useBufferState();
|
|
13903
|
-
const sequenceContext =
|
|
13959
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
13904
13960
|
const [isLoading, setIsLoading] = useState18(false);
|
|
13905
13961
|
const _propsValid = true;
|
|
13906
13962
|
if (!_propsValid) {
|
|
@@ -14249,7 +14305,10 @@ var makeRemotionComponentIdentity = ({
|
|
|
14249
14305
|
};
|
|
14250
14306
|
var interactiveElementSchema = {
|
|
14251
14307
|
...baseSchema,
|
|
14252
|
-
...transformSchema
|
|
14308
|
+
...transformSchema
|
|
14309
|
+
};
|
|
14310
|
+
var interactiveTextElementSchema = {
|
|
14311
|
+
...interactiveElementSchema,
|
|
14253
14312
|
...textSchema,
|
|
14254
14313
|
...textContentSchema
|
|
14255
14314
|
};
|
|
@@ -14265,7 +14324,7 @@ var withSchema = (options) => {
|
|
|
14265
14324
|
addSequenceStackTraces(Wrapped);
|
|
14266
14325
|
return Wrapped;
|
|
14267
14326
|
};
|
|
14268
|
-
var makeInteractiveElement = (tag, displayName) => {
|
|
14327
|
+
var makeInteractiveElement = (tag, displayName, schema) => {
|
|
14269
14328
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
14270
14329
|
const {
|
|
14271
14330
|
durationInFrames,
|
|
@@ -14311,12 +14370,18 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14311
14370
|
packageName: "remotion",
|
|
14312
14371
|
componentName: displayName.slice(1, -1)
|
|
14313
14372
|
}),
|
|
14314
|
-
schema
|
|
14373
|
+
schema,
|
|
14315
14374
|
supportsEffects: false
|
|
14316
14375
|
});
|
|
14317
14376
|
Wrapped.displayName = displayName;
|
|
14318
14377
|
return Wrapped;
|
|
14319
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
|
+
};
|
|
14320
14385
|
var Interactive = {
|
|
14321
14386
|
baseSchema,
|
|
14322
14387
|
transformSchema,
|
|
@@ -14325,41 +14390,41 @@ var Interactive = {
|
|
|
14325
14390
|
sequenceSchema,
|
|
14326
14391
|
withSchema,
|
|
14327
14392
|
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
14328
|
-
A:
|
|
14329
|
-
Article:
|
|
14330
|
-
Aside:
|
|
14331
|
-
Button:
|
|
14332
|
-
Circle:
|
|
14333
|
-
Code:
|
|
14334
|
-
Div:
|
|
14335
|
-
Ellipse:
|
|
14336
|
-
Em:
|
|
14337
|
-
Footer:
|
|
14338
|
-
G:
|
|
14339
|
-
H1:
|
|
14340
|
-
H2:
|
|
14341
|
-
H3:
|
|
14342
|
-
H4:
|
|
14343
|
-
H5:
|
|
14344
|
-
H6:
|
|
14345
|
-
Header:
|
|
14346
|
-
Label:
|
|
14347
|
-
Li:
|
|
14348
|
-
Line:
|
|
14349
|
-
Main:
|
|
14350
|
-
Nav:
|
|
14351
|
-
Ol:
|
|
14352
|
-
P:
|
|
14353
|
-
Path:
|
|
14354
|
-
Pre:
|
|
14355
|
-
Rect:
|
|
14356
|
-
Section:
|
|
14357
|
-
Small:
|
|
14358
|
-
Span:
|
|
14359
|
-
Strong:
|
|
14360
|
-
Svg:
|
|
14361
|
-
Text:
|
|
14362
|
-
Ul:
|
|
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>")
|
|
14363
14428
|
};
|
|
14364
14429
|
var compositionsRef = React31.createRef();
|
|
14365
14430
|
var CompositionManagerProvider = ({
|
|
@@ -14416,7 +14481,7 @@ var CompositionManagerProvider = ({
|
|
|
14416
14481
|
getCompositions: () => currentcompositionsRef.current
|
|
14417
14482
|
};
|
|
14418
14483
|
}, []);
|
|
14419
|
-
const compositionManagerSetters =
|
|
14484
|
+
const compositionManagerSetters = useMemo33(() => {
|
|
14420
14485
|
return {
|
|
14421
14486
|
registerComposition,
|
|
14422
14487
|
unregisterComposition,
|
|
@@ -14432,7 +14497,7 @@ var CompositionManagerProvider = ({
|
|
|
14432
14497
|
unregisterFolder,
|
|
14433
14498
|
onlyRenderComposition
|
|
14434
14499
|
]);
|
|
14435
|
-
const compositionManagerContextValue =
|
|
14500
|
+
const compositionManagerContextValue = useMemo33(() => {
|
|
14436
14501
|
return {
|
|
14437
14502
|
compositions,
|
|
14438
14503
|
folders,
|
|
@@ -14530,7 +14595,7 @@ var waitForRoot = (fn) => {
|
|
|
14530
14595
|
};
|
|
14531
14596
|
var MediaEnabledContext = createContext24(null);
|
|
14532
14597
|
var useVideoEnabled = () => {
|
|
14533
|
-
const context =
|
|
14598
|
+
const context = useContext35(MediaEnabledContext);
|
|
14534
14599
|
if (!context) {
|
|
14535
14600
|
return window.remotion_videoEnabled;
|
|
14536
14601
|
}
|
|
@@ -14540,7 +14605,7 @@ var useVideoEnabled = () => {
|
|
|
14540
14605
|
return context.videoEnabled;
|
|
14541
14606
|
};
|
|
14542
14607
|
var useAudioEnabled = () => {
|
|
14543
|
-
const context =
|
|
14608
|
+
const context = useContext35(MediaEnabledContext);
|
|
14544
14609
|
if (!context) {
|
|
14545
14610
|
return window.remotion_audioEnabled;
|
|
14546
14611
|
}
|
|
@@ -14554,7 +14619,7 @@ var MediaEnabledProvider = ({
|
|
|
14554
14619
|
videoEnabled,
|
|
14555
14620
|
audioEnabled
|
|
14556
14621
|
}) => {
|
|
14557
|
-
const value =
|
|
14622
|
+
const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
14558
14623
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
14559
14624
|
value,
|
|
14560
14625
|
children
|
|
@@ -14570,13 +14635,13 @@ var RemotionRootContexts = ({
|
|
|
14570
14635
|
audioEnabled,
|
|
14571
14636
|
frameState
|
|
14572
14637
|
}) => {
|
|
14573
|
-
const nonceContext =
|
|
14638
|
+
const nonceContext = useMemo35(() => {
|
|
14574
14639
|
let counter = 0;
|
|
14575
14640
|
return {
|
|
14576
14641
|
getNonce: () => counter++
|
|
14577
14642
|
};
|
|
14578
14643
|
}, []);
|
|
14579
|
-
const logging =
|
|
14644
|
+
const logging = useMemo35(() => {
|
|
14580
14645
|
return { logLevel, mountTime: Date.now() };
|
|
14581
14646
|
}, [logLevel]);
|
|
14582
14647
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -14877,13 +14942,13 @@ var OffthreadVideoForRendering = ({
|
|
|
14877
14942
|
const frame = useCurrentFrame();
|
|
14878
14943
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
14879
14944
|
const videoConfig = useUnsafeVideoConfig();
|
|
14880
|
-
const sequenceContext =
|
|
14945
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
14881
14946
|
const mediaStartsAt = useMediaStartsAt();
|
|
14882
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
14947
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
14883
14948
|
if (!src) {
|
|
14884
14949
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
14885
14950
|
}
|
|
14886
|
-
const id =
|
|
14951
|
+
const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
14887
14952
|
src,
|
|
14888
14953
|
sequenceContext?.cumulatedFrom,
|
|
14889
14954
|
sequenceContext?.relativeFrom,
|
|
@@ -14938,14 +15003,14 @@ var OffthreadVideoForRendering = ({
|
|
|
14938
15003
|
sequenceContext?.cumulatedNegativeFrom,
|
|
14939
15004
|
audioStreamIndex
|
|
14940
15005
|
]);
|
|
14941
|
-
const currentTime =
|
|
15006
|
+
const currentTime = useMemo36(() => {
|
|
14942
15007
|
return getExpectedMediaFrameUncorrected({
|
|
14943
15008
|
frame,
|
|
14944
15009
|
playbackRate: playbackRate || 1,
|
|
14945
15010
|
startFrom: -mediaStartsAt
|
|
14946
15011
|
}) / videoConfig.fps;
|
|
14947
15012
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
14948
|
-
const actualSrc =
|
|
15013
|
+
const actualSrc = useMemo36(() => {
|
|
14949
15014
|
return getOffthreadVideoSource({
|
|
14950
15015
|
src,
|
|
14951
15016
|
currentTime,
|
|
@@ -15033,7 +15098,7 @@ var OffthreadVideoForRendering = ({
|
|
|
15033
15098
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
15034
15099
|
}
|
|
15035
15100
|
}, [imageSrc, onError]);
|
|
15036
|
-
const className =
|
|
15101
|
+
const className = useMemo36(() => {
|
|
15037
15102
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
15038
15103
|
}, [props2.className]);
|
|
15039
15104
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -15097,12 +15162,12 @@ class MediaPlaybackError extends Error {
|
|
|
15097
15162
|
}
|
|
15098
15163
|
}
|
|
15099
15164
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
15100
|
-
const context =
|
|
15165
|
+
const context = useContext38(SharedAudioContext);
|
|
15101
15166
|
if (!context) {
|
|
15102
15167
|
throw new Error("SharedAudioContext not found");
|
|
15103
15168
|
}
|
|
15104
15169
|
const videoRef = useRef27(null);
|
|
15105
|
-
const sharedSource =
|
|
15170
|
+
const sharedSource = useMemo37(() => {
|
|
15106
15171
|
if (!context.audioContext) {
|
|
15107
15172
|
return null;
|
|
15108
15173
|
}
|
|
@@ -15154,7 +15219,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15154
15219
|
}
|
|
15155
15220
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
15156
15221
|
const { fps, durationInFrames } = useVideoConfig();
|
|
15157
|
-
const parentSequence =
|
|
15222
|
+
const parentSequence = useContext38(SequenceContext);
|
|
15158
15223
|
const logLevel = useLogLevel();
|
|
15159
15224
|
const mountTime = useMountTime();
|
|
15160
15225
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -15305,7 +15370,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15305
15370
|
current.preload = "auto";
|
|
15306
15371
|
}
|
|
15307
15372
|
}, []);
|
|
15308
|
-
const actualStyle =
|
|
15373
|
+
const actualStyle = useMemo37(() => {
|
|
15309
15374
|
return {
|
|
15310
15375
|
...style
|
|
15311
15376
|
};
|
|
@@ -15501,7 +15566,7 @@ function useRemotionContexts() {
|
|
|
15501
15566
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15502
15567
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15503
15568
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15504
|
-
return
|
|
15569
|
+
return useMemo38(() => ({
|
|
15505
15570
|
compositionManagerCtx,
|
|
15506
15571
|
timelineContext,
|
|
15507
15572
|
setTimelineContext,
|
|
@@ -15612,6 +15677,7 @@ var Internals = {
|
|
|
15612
15677
|
textSchema,
|
|
15613
15678
|
transformSchema,
|
|
15614
15679
|
premountSchema,
|
|
15680
|
+
premountStyleSchema,
|
|
15615
15681
|
flattenActiveSchema,
|
|
15616
15682
|
getFlatSchemaWithAllKeys,
|
|
15617
15683
|
RemotionRootContexts,
|
|
@@ -15625,6 +15691,7 @@ var Internals = {
|
|
|
15625
15691
|
truthy,
|
|
15626
15692
|
SequenceContext,
|
|
15627
15693
|
PremountContext,
|
|
15694
|
+
usePremounting,
|
|
15628
15695
|
useRemotionContexts,
|
|
15629
15696
|
RemotionContextProvider,
|
|
15630
15697
|
CSSUtils: exports_default_css,
|
|
@@ -15800,7 +15867,7 @@ var validateSeriesSequenceProps = ({
|
|
|
15800
15867
|
return offset;
|
|
15801
15868
|
};
|
|
15802
15869
|
var SeriesInner = (props2) => {
|
|
15803
|
-
const childrenValue =
|
|
15870
|
+
const childrenValue = useMemo39(() => {
|
|
15804
15871
|
const flattenedChildren = flattenChildren(props2.children);
|
|
15805
15872
|
const renderChildren = (i, startFrame) => {
|
|
15806
15873
|
if (i === flattenedChildren.length) {
|
|
@@ -16129,14 +16196,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
16129
16196
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
16130
16197
|
const videoConfig = useUnsafeVideoConfig();
|
|
16131
16198
|
const videoRef = useRef28(null);
|
|
16132
|
-
const sequenceContext =
|
|
16199
|
+
const sequenceContext = useContext39(SequenceContext);
|
|
16133
16200
|
const mediaStartsAt = useMediaStartsAt();
|
|
16134
16201
|
const environment = useRemotionEnvironment();
|
|
16135
16202
|
const logLevel = useLogLevel();
|
|
16136
16203
|
const mountTime = useMountTime();
|
|
16137
16204
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
16138
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
16139
|
-
const id =
|
|
16205
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
16206
|
+
const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
16140
16207
|
props2.src,
|
|
16141
16208
|
sequenceContext?.cumulatedFrom,
|
|
16142
16209
|
sequenceContext?.relativeFrom,
|
|
@@ -16347,7 +16414,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
16347
16414
|
if (environment.isClientSideRendering) {
|
|
16348
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");
|
|
16349
16416
|
}
|
|
16350
|
-
const { durations, setDurations } =
|
|
16417
|
+
const { durations, setDurations } = useContext40(DurationsContext);
|
|
16351
16418
|
if (typeof ref === "string") {
|
|
16352
16419
|
throw new Error("string refs are not supported");
|
|
16353
16420
|
}
|
|
@@ -16466,7 +16533,7 @@ addSequenceStackTraces(Composition);
|
|
|
16466
16533
|
addSequenceStackTraces(Folder);
|
|
16467
16534
|
|
|
16468
16535
|
// ../shapes/dist/esm/index.mjs
|
|
16469
|
-
import React, { useCallback as useCallback26, useMemo as
|
|
16536
|
+
import React, { useCallback as useCallback26, useMemo as useMemo41, useRef as useRef29 } from "react";
|
|
16470
16537
|
import { version } from "react-dom";
|
|
16471
16538
|
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
16472
16539
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -16648,13 +16715,13 @@ var RenderSvg = ({
|
|
|
16648
16715
|
stack,
|
|
16649
16716
|
...props
|
|
16650
16717
|
}) => {
|
|
16651
|
-
const actualStyle =
|
|
16718
|
+
const actualStyle = useMemo41(() => {
|
|
16652
16719
|
return {
|
|
16653
16720
|
overflow: "visible",
|
|
16654
16721
|
...style ?? {}
|
|
16655
16722
|
};
|
|
16656
16723
|
}, [style]);
|
|
16657
|
-
const actualPathStyle =
|
|
16724
|
+
const actualPathStyle = useMemo41(() => {
|
|
16658
16725
|
return {
|
|
16659
16726
|
transformBox: "fill-box",
|
|
16660
16727
|
...pathStyle ?? {}
|
|
@@ -19633,7 +19700,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19633
19700
|
progress: 0,
|
|
19634
19701
|
isActive: false
|
|
19635
19702
|
});
|
|
19636
|
-
const eventTarget =
|
|
19703
|
+
const eventTarget = useMemo43(() => new EventTarget, []);
|
|
19637
19704
|
useEffect21(() => {
|
|
19638
19705
|
if (disabled) {
|
|
19639
19706
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
@@ -26080,7 +26147,7 @@ var Triangle22 = (props) => {
|
|
|
26080
26147
|
};
|
|
26081
26148
|
|
|
26082
26149
|
// src/components/homepage/FreePricing.tsx
|
|
26083
|
-
import React53, { useCallback as useCallback38, useMemo as
|
|
26150
|
+
import React53, { useCallback as useCallback38, useMemo as useMemo52 } from "react";
|
|
26084
26151
|
|
|
26085
26152
|
// ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
26086
26153
|
var CLASS_PART_SEPARATOR2 = "-";
|
|
@@ -27737,14 +27804,14 @@ var CompanyPricing = () => {
|
|
|
27737
27804
|
}, []);
|
|
27738
27805
|
const creatorsPrice = creatorsSelected ? devSeatCount * SEAT_PRICE : 0;
|
|
27739
27806
|
const automatorsPrice = automatorsSelected ? Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE : 0;
|
|
27740
|
-
const totalPrice =
|
|
27807
|
+
const totalPrice = useMemo52(() => {
|
|
27741
27808
|
const basePrice = creatorsPrice + automatorsPrice;
|
|
27742
27809
|
if (automatorsSelected) {
|
|
27743
27810
|
return Math.max(100, basePrice);
|
|
27744
27811
|
}
|
|
27745
27812
|
return basePrice;
|
|
27746
27813
|
}, [creatorsPrice, automatorsPrice, automatorsSelected]);
|
|
27747
|
-
const totalPriceString =
|
|
27814
|
+
const totalPriceString = useMemo52(() => {
|
|
27748
27815
|
return formatPrice(totalPrice);
|
|
27749
27816
|
}, [formatPrice, totalPrice]);
|
|
27750
27817
|
const showMinimumMessage = automatorsSelected && creatorsPrice + automatorsPrice < 100;
|
|
@@ -27974,13 +28041,13 @@ var Pricing = ({
|
|
|
27974
28041
|
licenseHref = "https://github.com/remotion-dev/remotion/blob/main/LICENSE.md",
|
|
27975
28042
|
termsHref = "/docs/license/terms"
|
|
27976
28043
|
}) => {
|
|
27977
|
-
const faqLinkTarget =
|
|
28044
|
+
const faqLinkTarget = useMemo53(() => {
|
|
27978
28045
|
return faqHref.startsWith("http") ? "_blank" : undefined;
|
|
27979
28046
|
}, [faqHref]);
|
|
27980
|
-
const licenseLinkTarget =
|
|
28047
|
+
const licenseLinkTarget = useMemo53(() => {
|
|
27981
28048
|
return licenseHref.startsWith("http") ? "_blank" : undefined;
|
|
27982
28049
|
}, [licenseHref]);
|
|
27983
|
-
const termsLinkTarget =
|
|
28050
|
+
const termsLinkTarget = useMemo53(() => {
|
|
27984
28051
|
return termsHref.startsWith("http") ? "_blank" : undefined;
|
|
27985
28052
|
}, [termsHref]);
|
|
27986
28053
|
return /* @__PURE__ */ jsxs9("div", {
|