@remotion/promo-pages 4.0.498 → 4.0.500
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 +1077 -931
- package/dist/design.js +407 -141
- package/dist/experts.js +404 -138
- package/dist/homepage/Pricing.js +416 -150
- package/dist/prompts/PromptsGallery.js +407 -141
- package/dist/prompts/PromptsShow.js +407 -141
- package/dist/prompts/PromptsSubmit.js +407 -141
- package/dist/tailwind.css +3 -200
- package/dist/team.js +407 -141
- package/dist/template-modal-content.js +409 -143
- package/dist/templates.js +408 -141
- package/package.json +15 -15
- package/public/img/applications.mp4 +0 -0
- package/public/img/applications.webm +0 -0
- package/public/img/design-systems.mp4 +0 -0
- package/public/img/design-systems.webm +0 -0
- package/public/img/render-progress.mp4 +0 -0
- package/public/img/render-progress.webm +0 -0
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 useMemo54 } 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 useMemo44, useState as useState23 } from "react";
|
|
1385
1385
|
|
|
1386
1386
|
// ../paths/dist/esm/index.mjs
|
|
1387
1387
|
var cutLInstruction = ({
|
|
@@ -4217,8 +4217,9 @@ import {
|
|
|
4217
4217
|
useRef as useRef9,
|
|
4218
4218
|
useState as useState6
|
|
4219
4219
|
} from "react";
|
|
4220
|
-
import
|
|
4221
|
-
import {
|
|
4220
|
+
import { useMemo as useMemo16 } from "react";
|
|
4221
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo18, useRef as useRef8 } from "react";
|
|
4222
|
+
import { useEffect as useEffect4, useMemo as useMemo17, useRef as useRef7 } from "react";
|
|
4222
4223
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4223
4224
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4224
4225
|
import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
@@ -4227,18 +4228,18 @@ import {
|
|
|
4227
4228
|
useCallback as useCallback8,
|
|
4228
4229
|
useImperativeHandle as useImperativeHandle3,
|
|
4229
4230
|
useLayoutEffect as useLayoutEffect3,
|
|
4230
|
-
useMemo as
|
|
4231
|
+
useMemo as useMemo19,
|
|
4231
4232
|
useRef as useRef10,
|
|
4232
4233
|
useState as useState7
|
|
4233
4234
|
} from "react";
|
|
4234
4235
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4235
4236
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext31 } from "react";
|
|
4236
|
-
import React17, { createContext as createContext18, useMemo as
|
|
4237
|
+
import React17, { createContext as createContext18, useMemo as useMemo20 } from "react";
|
|
4237
4238
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
4238
4239
|
import { useContext as useContext20 } from "react";
|
|
4239
4240
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
4240
4241
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
4241
|
-
import { createContext as createContext20, useMemo as
|
|
4242
|
+
import { createContext as createContext20, useMemo as useMemo21, useReducer } from "react";
|
|
4242
4243
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4243
4244
|
import { useCallback as useCallback13 } from "react";
|
|
4244
4245
|
import React23, {
|
|
@@ -4246,7 +4247,7 @@ import React23, {
|
|
|
4246
4247
|
useContext as useContext29,
|
|
4247
4248
|
useEffect as useEffect14,
|
|
4248
4249
|
useImperativeHandle as useImperativeHandle4,
|
|
4249
|
-
useMemo as
|
|
4250
|
+
useMemo as useMemo29,
|
|
4250
4251
|
useRef as useRef19,
|
|
4251
4252
|
useState as useState14
|
|
4252
4253
|
} from "react";
|
|
@@ -4257,14 +4258,14 @@ import React20, {
|
|
|
4257
4258
|
useCallback as useCallback9,
|
|
4258
4259
|
useContext as useContext21,
|
|
4259
4260
|
useEffect as useEffect7,
|
|
4260
|
-
useMemo as
|
|
4261
|
+
useMemo as useMemo23,
|
|
4261
4262
|
useRef as useRef12,
|
|
4262
4263
|
useState as useState10
|
|
4263
4264
|
} from "react";
|
|
4264
|
-
import { useMemo as
|
|
4265
|
+
import { useMemo as useMemo22, useRef as useRef11 } from "react";
|
|
4265
4266
|
import { jsx as jsx19, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
4266
4267
|
import { useRef as useRef13 } from "react";
|
|
4267
|
-
import { useContext as useContext24, useEffect as useEffect8, useMemo as
|
|
4268
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo24, useState as useState11 } from "react";
|
|
4268
4269
|
import { useContext as useContext23 } from "react";
|
|
4269
4270
|
import {
|
|
4270
4271
|
useCallback as useCallback12,
|
|
@@ -4273,14 +4274,14 @@ import {
|
|
|
4273
4274
|
useLayoutEffect as useLayoutEffect7,
|
|
4274
4275
|
useRef as useRef18
|
|
4275
4276
|
} from "react";
|
|
4276
|
-
import { useCallback as useCallback11, useMemo as
|
|
4277
|
-
import { useContext as useContext26, useMemo as
|
|
4277
|
+
import { useCallback as useCallback11, useMemo as useMemo27, useRef as useRef16 } from "react";
|
|
4278
|
+
import { useContext as useContext26, useMemo as useMemo26 } from "react";
|
|
4278
4279
|
import React21, {
|
|
4279
4280
|
useCallback as useCallback10,
|
|
4280
4281
|
useContext as useContext25,
|
|
4281
4282
|
useEffect as useEffect9,
|
|
4282
4283
|
useLayoutEffect as useLayoutEffect6,
|
|
4283
|
-
useMemo as
|
|
4284
|
+
useMemo as useMemo25,
|
|
4284
4285
|
useRef as useRef15,
|
|
4285
4286
|
useState as useState12
|
|
4286
4287
|
} from "react";
|
|
@@ -4289,7 +4290,7 @@ import React22 from "react";
|
|
|
4289
4290
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
4290
4291
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
4291
4292
|
import { useEffect as useEffect13 } from "react";
|
|
4292
|
-
import { createContext as createContext22, useContext as useContext28, useMemo as
|
|
4293
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo28 } from "react";
|
|
4293
4294
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
4294
4295
|
import {
|
|
4295
4296
|
forwardRef as forwardRef6,
|
|
@@ -4297,7 +4298,7 @@ import {
|
|
|
4297
4298
|
useEffect as useEffect15,
|
|
4298
4299
|
useImperativeHandle as useImperativeHandle5,
|
|
4299
4300
|
useLayoutEffect as useLayoutEffect8,
|
|
4300
|
-
useMemo as
|
|
4301
|
+
useMemo as useMemo30,
|
|
4301
4302
|
useRef as useRef20
|
|
4302
4303
|
} from "react";
|
|
4303
4304
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
@@ -4307,7 +4308,7 @@ import {
|
|
|
4307
4308
|
useCallback as useCallback15,
|
|
4308
4309
|
useEffect as useEffect16,
|
|
4309
4310
|
useImperativeHandle as useImperativeHandle6,
|
|
4310
|
-
useMemo as
|
|
4311
|
+
useMemo as useMemo31,
|
|
4311
4312
|
useRef as useRef21,
|
|
4312
4313
|
useState as useState15
|
|
4313
4314
|
} from "react";
|
|
@@ -4318,7 +4319,7 @@ import {
|
|
|
4318
4319
|
useCallback as useCallback16,
|
|
4319
4320
|
useContext as useContext32,
|
|
4320
4321
|
useLayoutEffect as useLayoutEffect9,
|
|
4321
|
-
useMemo as
|
|
4322
|
+
useMemo as useMemo32,
|
|
4322
4323
|
useRef as useRef22
|
|
4323
4324
|
} from "react";
|
|
4324
4325
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
@@ -4328,7 +4329,7 @@ import {
|
|
|
4328
4329
|
useContext as useContext33,
|
|
4329
4330
|
useImperativeHandle as useImperativeHandle7,
|
|
4330
4331
|
useLayoutEffect as useLayoutEffect10,
|
|
4331
|
-
useMemo as
|
|
4332
|
+
useMemo as useMemo33,
|
|
4332
4333
|
useRef as useRef23,
|
|
4333
4334
|
useState as useState16
|
|
4334
4335
|
} from "react";
|
|
@@ -4350,14 +4351,14 @@ import React31 from "react";
|
|
|
4350
4351
|
import {
|
|
4351
4352
|
useCallback as useCallback21,
|
|
4352
4353
|
useImperativeHandle as useImperativeHandle8,
|
|
4353
|
-
useMemo as
|
|
4354
|
+
useMemo as useMemo34,
|
|
4354
4355
|
useRef as useRef26,
|
|
4355
4356
|
useState as useState19
|
|
4356
4357
|
} from "react";
|
|
4357
4358
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4358
4359
|
import React32 from "react";
|
|
4359
|
-
import { useMemo as
|
|
4360
|
-
import { createContext as createContext24, useContext as useContext35, useMemo as
|
|
4360
|
+
import { useMemo as useMemo36 } from "react";
|
|
4361
|
+
import { createContext as createContext24, useContext as useContext35, useMemo as useMemo35 } from "react";
|
|
4361
4362
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4362
4363
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4363
4364
|
import React34 from "react";
|
|
@@ -4369,7 +4370,7 @@ import {
|
|
|
4369
4370
|
useContext as useContext37,
|
|
4370
4371
|
useEffect as useEffect17,
|
|
4371
4372
|
useLayoutEffect as useLayoutEffect12,
|
|
4372
|
-
useMemo as
|
|
4373
|
+
useMemo as useMemo37,
|
|
4373
4374
|
useState as useState20
|
|
4374
4375
|
} from "react";
|
|
4375
4376
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
@@ -4379,18 +4380,18 @@ import React38, {
|
|
|
4379
4380
|
useContext as useContext38,
|
|
4380
4381
|
useEffect as useEffect19,
|
|
4381
4382
|
useImperativeHandle as useImperativeHandle9,
|
|
4382
|
-
useMemo as
|
|
4383
|
+
useMemo as useMemo38,
|
|
4383
4384
|
useRef as useRef27,
|
|
4384
4385
|
useState as useState21
|
|
4385
4386
|
} from "react";
|
|
4386
4387
|
import { useEffect as useEffect18 } from "react";
|
|
4387
4388
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4388
4389
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4389
|
-
import React40, { useMemo as
|
|
4390
|
+
import React40, { useMemo as useMemo39 } from "react";
|
|
4390
4391
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4391
4392
|
import React42, {
|
|
4392
4393
|
forwardRef as forwardRef14,
|
|
4393
|
-
useMemo as
|
|
4394
|
+
useMemo as useMemo40
|
|
4394
4395
|
} from "react";
|
|
4395
4396
|
import React41 from "react";
|
|
4396
4397
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
@@ -4402,7 +4403,7 @@ import {
|
|
|
4402
4403
|
useEffect as useEffect20,
|
|
4403
4404
|
useImperativeHandle as useImperativeHandle10,
|
|
4404
4405
|
useLayoutEffect as useLayoutEffect13,
|
|
4405
|
-
useMemo as
|
|
4406
|
+
useMemo as useMemo41,
|
|
4406
4407
|
useRef as useRef28
|
|
4407
4408
|
} from "react";
|
|
4408
4409
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
@@ -5582,7 +5583,7 @@ var getSingleChildComponent = (children) => {
|
|
|
5582
5583
|
}
|
|
5583
5584
|
return child.type;
|
|
5584
5585
|
};
|
|
5585
|
-
var VERSION = "4.0.
|
|
5586
|
+
var VERSION = "4.0.500";
|
|
5586
5587
|
var checkMultipleRemotionVersions = () => {
|
|
5587
5588
|
if (typeof globalThis === "undefined") {
|
|
5588
5589
|
return;
|
|
@@ -5624,38 +5625,6 @@ __export2(exports_timeline_position_state, {
|
|
|
5624
5625
|
getFrameForComposition: () => getFrameForComposition,
|
|
5625
5626
|
clampFrameToCompositionRange: () => clampFrameToCompositionRange
|
|
5626
5627
|
});
|
|
5627
|
-
function mulberry32(a) {
|
|
5628
|
-
let t = a + 1831565813;
|
|
5629
|
-
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
5630
|
-
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
5631
|
-
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
5632
|
-
}
|
|
5633
|
-
function hashCode(str) {
|
|
5634
|
-
let i = 0;
|
|
5635
|
-
let chr = 0;
|
|
5636
|
-
let hash = 0;
|
|
5637
|
-
for (i = 0;i < str.length; i++) {
|
|
5638
|
-
chr = str.charCodeAt(i);
|
|
5639
|
-
hash = (hash << 5) - hash + chr;
|
|
5640
|
-
hash |= 0;
|
|
5641
|
-
}
|
|
5642
|
-
return hash;
|
|
5643
|
-
}
|
|
5644
|
-
var random = (seed, dummy) => {
|
|
5645
|
-
if (dummy !== undefined) {
|
|
5646
|
-
throw new TypeError("random() takes only one argument");
|
|
5647
|
-
}
|
|
5648
|
-
if (seed === null) {
|
|
5649
|
-
return Math.random();
|
|
5650
|
-
}
|
|
5651
|
-
if (typeof seed === "string") {
|
|
5652
|
-
return mulberry32(hashCode(seed));
|
|
5653
|
-
}
|
|
5654
|
-
if (typeof seed === "number") {
|
|
5655
|
-
return mulberry32(seed * 10000000000);
|
|
5656
|
-
}
|
|
5657
|
-
throw new Error("random() argument must be a number or a string");
|
|
5658
|
-
};
|
|
5659
5628
|
var SetTimelineContext = createContext13({
|
|
5660
5629
|
setFrame: () => {
|
|
5661
5630
|
throw new Error("default");
|
|
@@ -5672,7 +5641,6 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
5672
5641
|
const imperativePlaying = useRef3(false);
|
|
5673
5642
|
const [playbackRate, setPlaybackRate] = useState2(1);
|
|
5674
5643
|
const audioAndVideoTags = useRef3([]);
|
|
5675
|
-
const [remotionRootId] = useState2(() => String(random(null)));
|
|
5676
5644
|
const [_frame, setFrame] = useState2(() => getInitialFrameState());
|
|
5677
5645
|
const frame = frameState ?? _frame;
|
|
5678
5646
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
@@ -5707,10 +5675,9 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
5707
5675
|
frame,
|
|
5708
5676
|
playing,
|
|
5709
5677
|
imperativePlaying,
|
|
5710
|
-
rootId: remotionRootId,
|
|
5711
5678
|
audioAndVideoTags
|
|
5712
5679
|
};
|
|
5713
|
-
}, [frame, playing
|
|
5680
|
+
}, [frame, playing]);
|
|
5714
5681
|
const playbackRateContextValue = useMemo8(() => {
|
|
5715
5682
|
return {
|
|
5716
5683
|
playbackRate,
|
|
@@ -6099,6 +6066,29 @@ var backgroundSchema = {
|
|
|
6099
6066
|
description: "Color"
|
|
6100
6067
|
}
|
|
6101
6068
|
};
|
|
6069
|
+
var svgStrokeSchema = {
|
|
6070
|
+
stroke: {
|
|
6071
|
+
type: "color",
|
|
6072
|
+
default: "none",
|
|
6073
|
+
description: "Stroke"
|
|
6074
|
+
},
|
|
6075
|
+
strokeWidth: {
|
|
6076
|
+
type: "number",
|
|
6077
|
+
default: 1,
|
|
6078
|
+
description: "Stroke width",
|
|
6079
|
+
min: 0,
|
|
6080
|
+
step: 1,
|
|
6081
|
+
hiddenFromList: false
|
|
6082
|
+
}
|
|
6083
|
+
};
|
|
6084
|
+
var svgPaintSchema = {
|
|
6085
|
+
fill: {
|
|
6086
|
+
type: "color",
|
|
6087
|
+
default: undefined,
|
|
6088
|
+
description: "Fill"
|
|
6089
|
+
},
|
|
6090
|
+
...svgStrokeSchema
|
|
6091
|
+
};
|
|
6102
6092
|
var textContentSchema = {
|
|
6103
6093
|
children: {
|
|
6104
6094
|
type: "text-content",
|
|
@@ -6129,7 +6119,51 @@ var premountSchema = {
|
|
|
6129
6119
|
var sequencePremountSchema = {
|
|
6130
6120
|
...premountSchema
|
|
6131
6121
|
};
|
|
6122
|
+
var cropSchema = {
|
|
6123
|
+
cropLeft: {
|
|
6124
|
+
type: "number",
|
|
6125
|
+
default: 0,
|
|
6126
|
+
description: "Crop left",
|
|
6127
|
+
min: 0,
|
|
6128
|
+
max: 1,
|
|
6129
|
+
step: 0.01,
|
|
6130
|
+
hiddenFromList: false,
|
|
6131
|
+
keyframable: true
|
|
6132
|
+
},
|
|
6133
|
+
cropRight: {
|
|
6134
|
+
type: "number",
|
|
6135
|
+
default: 0,
|
|
6136
|
+
description: "Crop right",
|
|
6137
|
+
min: 0,
|
|
6138
|
+
max: 1,
|
|
6139
|
+
step: 0.01,
|
|
6140
|
+
hiddenFromList: false,
|
|
6141
|
+
keyframable: true
|
|
6142
|
+
},
|
|
6143
|
+
cropTop: {
|
|
6144
|
+
type: "number",
|
|
6145
|
+
default: 0,
|
|
6146
|
+
description: "Crop top",
|
|
6147
|
+
min: 0,
|
|
6148
|
+
max: 1,
|
|
6149
|
+
step: 0.01,
|
|
6150
|
+
hiddenFromList: false,
|
|
6151
|
+
keyframable: true
|
|
6152
|
+
},
|
|
6153
|
+
cropBottom: {
|
|
6154
|
+
type: "number",
|
|
6155
|
+
default: 0,
|
|
6156
|
+
description: "Crop bottom",
|
|
6157
|
+
min: 0,
|
|
6158
|
+
max: 1,
|
|
6159
|
+
step: 0.01,
|
|
6160
|
+
hiddenFromList: false,
|
|
6161
|
+
keyframable: true
|
|
6162
|
+
}
|
|
6163
|
+
};
|
|
6164
|
+
var sequenceCropSchema = cropSchema;
|
|
6132
6165
|
var sequenceStyleSchema = {
|
|
6166
|
+
...sequenceCropSchema,
|
|
6133
6167
|
...transformSchema,
|
|
6134
6168
|
...backgroundSchema,
|
|
6135
6169
|
...borderSchema,
|
|
@@ -6218,6 +6252,54 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6218
6252
|
default: "none"
|
|
6219
6253
|
}
|
|
6220
6254
|
};
|
|
6255
|
+
var clampCrop = (value) => {
|
|
6256
|
+
return Math.min(1, Math.max(0, value ?? 0));
|
|
6257
|
+
};
|
|
6258
|
+
var resolveAxis = (start, end) => {
|
|
6259
|
+
const resolvedStart = clampCrop(start);
|
|
6260
|
+
const resolvedEnd = clampCrop(end);
|
|
6261
|
+
if (resolvedStart + resolvedEnd > 1) {
|
|
6262
|
+
return [0.5, 0.5];
|
|
6263
|
+
}
|
|
6264
|
+
return [resolvedStart, resolvedEnd];
|
|
6265
|
+
};
|
|
6266
|
+
var resolveSequenceCrop = ({
|
|
6267
|
+
cropLeft,
|
|
6268
|
+
cropRight,
|
|
6269
|
+
cropTop,
|
|
6270
|
+
cropBottom
|
|
6271
|
+
}) => {
|
|
6272
|
+
const [left, right] = resolveAxis(cropLeft, cropRight);
|
|
6273
|
+
const [top, bottom] = resolveAxis(cropTop, cropBottom);
|
|
6274
|
+
return { left, right, top, bottom };
|
|
6275
|
+
};
|
|
6276
|
+
var getSequenceCropClipPath = ({
|
|
6277
|
+
left,
|
|
6278
|
+
right,
|
|
6279
|
+
top,
|
|
6280
|
+
bottom,
|
|
6281
|
+
borderRadius
|
|
6282
|
+
}) => {
|
|
6283
|
+
if (left === 0 && right === 0 && top === 0 && bottom === 0) {
|
|
6284
|
+
return null;
|
|
6285
|
+
}
|
|
6286
|
+
const serializedBorderRadius = typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius;
|
|
6287
|
+
const rounded = serializedBorderRadius ? ` round ${serializedBorderRadius}` : "";
|
|
6288
|
+
return `inset(${top * 100}% ${right * 100}% ${bottom * 100}% ${left * 100}%${rounded})`;
|
|
6289
|
+
};
|
|
6290
|
+
var validateSequenceCrop = (crop, componentName = "<Sequence />") => {
|
|
6291
|
+
for (const [name, value] of Object.entries(crop)) {
|
|
6292
|
+
if (value === undefined) {
|
|
6293
|
+
continue;
|
|
6294
|
+
}
|
|
6295
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
6296
|
+
throw new TypeError(`The "${name}" prop of ${componentName} must be a finite number, but got ${String(value)}.`);
|
|
6297
|
+
}
|
|
6298
|
+
if (value < 0 || value > 1) {
|
|
6299
|
+
throw new RangeError(`The "${name}" prop of ${componentName} must be between 0 and 1, but got ${value}.`);
|
|
6300
|
+
}
|
|
6301
|
+
}
|
|
6302
|
+
};
|
|
6221
6303
|
var SequenceManager = React12.createContext({
|
|
6222
6304
|
registerSequence: () => {
|
|
6223
6305
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -8637,7 +8719,7 @@ var withInteractivitySchema = ({
|
|
|
8637
8719
|
const flatKeys = Object.keys(flatSchema);
|
|
8638
8720
|
const Wrapped = forwardRef2((props, ref) => {
|
|
8639
8721
|
const env = useRemotionEnvironment();
|
|
8640
|
-
if (!env.isStudio || env.
|
|
8722
|
+
if (!env.isStudio || env.isRendering) {
|
|
8641
8723
|
return React14.createElement(Component, {
|
|
8642
8724
|
...props,
|
|
8643
8725
|
controls: null,
|
|
@@ -8667,7 +8749,7 @@ var withInteractivitySchema = ({
|
|
|
8667
8749
|
stackToOverrideMap[stack] = newOverrideId;
|
|
8668
8750
|
return newOverrideId;
|
|
8669
8751
|
});
|
|
8670
|
-
const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
8752
|
+
const nodePath = env.isReadOnlyStudio ? null : nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
8671
8753
|
const runtimeValues = flatKeys.map((key) => getRuntimeValueForSchemaKey({
|
|
8672
8754
|
flatSchema,
|
|
8673
8755
|
key,
|
|
@@ -8738,17 +8820,32 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8738
8820
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
8739
8821
|
_remotionInternalIsMedia: isMedia,
|
|
8740
8822
|
outlineRef: passedRefForOutline,
|
|
8823
|
+
cropLeft,
|
|
8824
|
+
cropRight,
|
|
8825
|
+
cropTop,
|
|
8826
|
+
cropBottom,
|
|
8741
8827
|
...other
|
|
8742
8828
|
}, ref) => {
|
|
8743
8829
|
const { layout = "absolute-fill" } = other;
|
|
8744
8830
|
const [id] = useState5(() => String(Math.random()));
|
|
8745
8831
|
const parentSequence = useContext18(SequenceContext);
|
|
8746
|
-
const { rootId } = useTimelineContext();
|
|
8747
8832
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
8748
8833
|
const nonce = useNonce();
|
|
8749
8834
|
if (layout !== "absolute-fill" && layout !== "none") {
|
|
8750
8835
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
8751
8836
|
}
|
|
8837
|
+
const cropProps = { cropLeft, cropRight, cropTop, cropBottom };
|
|
8838
|
+
const hasCropProp = Object.values(cropProps).some((value) => value !== undefined);
|
|
8839
|
+
if (layout === "none" && hasCropProp) {
|
|
8840
|
+
throw new TypeError('The cropLeft, cropRight, cropTop and cropBottom props of <Sequence /> are only supported with layout="absolute-fill".');
|
|
8841
|
+
}
|
|
8842
|
+
validateSequenceCrop(cropProps);
|
|
8843
|
+
const {
|
|
8844
|
+
left: resolvedCropLeft,
|
|
8845
|
+
right: resolvedCropRight,
|
|
8846
|
+
top: resolvedCropTop,
|
|
8847
|
+
bottom: resolvedCropBottom
|
|
8848
|
+
} = resolveSequenceCrop(cropProps);
|
|
8752
8849
|
if (layout === "none" && typeof other.style !== "undefined") {
|
|
8753
8850
|
throw new TypeError('If layout="none", you may not pass a style. Passed: ' + JSON.stringify(other.style));
|
|
8754
8851
|
}
|
|
@@ -8874,7 +8971,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8874
8971
|
parent: parentSequence?.id ?? null,
|
|
8875
8972
|
postmountDisplay: postmountDisplay ?? null,
|
|
8876
8973
|
premountDisplay: premountDisplay ?? null,
|
|
8877
|
-
rootId,
|
|
8878
8974
|
showInTimeline,
|
|
8879
8975
|
src: isMedia.src,
|
|
8880
8976
|
getStack: () => stackRef.current,
|
|
@@ -8901,7 +8997,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8901
8997
|
playbackRate: isMedia.data.playbackRate,
|
|
8902
8998
|
postmountDisplay: postmountDisplay ?? null,
|
|
8903
8999
|
premountDisplay: premountDisplay ?? null,
|
|
8904
|
-
rootId,
|
|
8905
9000
|
showInTimeline,
|
|
8906
9001
|
src: isMedia.data.src,
|
|
8907
9002
|
getStack: () => stackRef.current,
|
|
@@ -8928,7 +9023,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8928
9023
|
documentationLink: resolvedDocumentationLink,
|
|
8929
9024
|
parent: parentSequence?.id ?? null,
|
|
8930
9025
|
type: "sequence",
|
|
8931
|
-
rootId,
|
|
8932
9026
|
showInTimeline,
|
|
8933
9027
|
nonce: nonce.get(),
|
|
8934
9028
|
loopDisplay,
|
|
@@ -8954,7 +9048,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8954
9048
|
unregisterSequence,
|
|
8955
9049
|
parentSequence?.id,
|
|
8956
9050
|
actualDurationInFrames,
|
|
8957
|
-
rootId,
|
|
8958
9051
|
from,
|
|
8959
9052
|
trimBefore,
|
|
8960
9053
|
registeredTrimBefore,
|
|
@@ -8983,6 +9076,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8983
9076
|
children: content
|
|
8984
9077
|
});
|
|
8985
9078
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
9079
|
+
const cropClipPath = getSequenceCropClipPath({
|
|
9080
|
+
left: resolvedCropLeft,
|
|
9081
|
+
right: resolvedCropRight,
|
|
9082
|
+
top: resolvedCropTop,
|
|
9083
|
+
bottom: resolvedCropBottom,
|
|
9084
|
+
borderRadius: styleIfThere?.borderRadius
|
|
9085
|
+
});
|
|
8986
9086
|
const sequenceRef = useCallback6((node) => {
|
|
8987
9087
|
wrapperRefForOutline.current = node;
|
|
8988
9088
|
if (typeof ref === "function") {
|
|
@@ -8996,9 +9096,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8996
9096
|
flexDirection: undefined,
|
|
8997
9097
|
...width ? { width } : {},
|
|
8998
9098
|
...height ? { height } : {},
|
|
8999
|
-
...styleIfThere ?? {}
|
|
9099
|
+
...styleIfThere ?? {},
|
|
9100
|
+
...cropClipPath ? {
|
|
9101
|
+
clipPath: cropClipPath
|
|
9102
|
+
} : {}
|
|
9000
9103
|
};
|
|
9001
|
-
}, [height, styleIfThere, width]);
|
|
9104
|
+
}, [cropClipPath, height, styleIfThere, width]);
|
|
9002
9105
|
if (ref !== null && layout === "none") {
|
|
9003
9106
|
throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
|
|
9004
9107
|
}
|
|
@@ -9097,6 +9200,26 @@ var SequenceWithoutFrom = withInteractivitySchema({
|
|
|
9097
9200
|
schema: sequenceSchemaWithoutFrom,
|
|
9098
9201
|
supportsEffects: false
|
|
9099
9202
|
});
|
|
9203
|
+
var useCropStyle = ({
|
|
9204
|
+
cropLeft,
|
|
9205
|
+
cropRight,
|
|
9206
|
+
cropTop,
|
|
9207
|
+
cropBottom,
|
|
9208
|
+
style,
|
|
9209
|
+
componentName
|
|
9210
|
+
}) => {
|
|
9211
|
+
validateSequenceCrop({ cropLeft, cropRight, cropTop, cropBottom }, componentName);
|
|
9212
|
+
return useMemo16(() => {
|
|
9213
|
+
const cropClipPath = getSequenceCropClipPath({
|
|
9214
|
+
...resolveSequenceCrop({ cropLeft, cropRight, cropTop, cropBottom }),
|
|
9215
|
+
borderRadius: style?.borderRadius
|
|
9216
|
+
});
|
|
9217
|
+
if (cropClipPath === null) {
|
|
9218
|
+
return style;
|
|
9219
|
+
}
|
|
9220
|
+
return { ...style, clipPath: cropClipPath };
|
|
9221
|
+
}, [cropBottom, cropLeft, cropRight, cropTop, style]);
|
|
9222
|
+
};
|
|
9100
9223
|
var calculateImageFit = (fit, imageSize, canvasSize) => {
|
|
9101
9224
|
switch (fit) {
|
|
9102
9225
|
case "fill": {
|
|
@@ -9389,7 +9512,7 @@ var useEffectChainState = () => {
|
|
|
9389
9512
|
}
|
|
9390
9513
|
};
|
|
9391
9514
|
}, []);
|
|
9392
|
-
return
|
|
9515
|
+
return useMemo17(() => ({
|
|
9393
9516
|
get: (width, height) => {
|
|
9394
9517
|
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
9395
9518
|
if (chainStateRef.current) {
|
|
@@ -9405,7 +9528,7 @@ var useEffectChainState = () => {
|
|
|
9405
9528
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
9406
9529
|
const canvasRef = useRef8(null);
|
|
9407
9530
|
const chainState = useEffectChainState();
|
|
9408
|
-
const sourceCanvas =
|
|
9531
|
+
const sourceCanvas = useMemo18(() => {
|
|
9409
9532
|
if (typeof document === "undefined") {
|
|
9410
9533
|
return null;
|
|
9411
9534
|
}
|
|
@@ -9667,6 +9790,7 @@ var animatedImageSchema = {
|
|
|
9667
9790
|
keyframable: false
|
|
9668
9791
|
},
|
|
9669
9792
|
...baseSchema,
|
|
9793
|
+
...cropSchema,
|
|
9670
9794
|
...premountSchema,
|
|
9671
9795
|
playbackRate: {
|
|
9672
9796
|
type: "number",
|
|
@@ -9861,6 +9985,10 @@ var AnimatedImageInner = ({
|
|
|
9861
9985
|
postmountFor,
|
|
9862
9986
|
styleWhilePremounted,
|
|
9863
9987
|
styleWhilePostmounted,
|
|
9988
|
+
cropLeft,
|
|
9989
|
+
cropRight,
|
|
9990
|
+
cropTop,
|
|
9991
|
+
cropBottom,
|
|
9864
9992
|
requestInit,
|
|
9865
9993
|
effects = [],
|
|
9866
9994
|
controls,
|
|
@@ -9890,6 +10018,14 @@ var AnimatedImageInner = ({
|
|
|
9890
10018
|
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
9891
10019
|
hideWhilePremounted: "display-none"
|
|
9892
10020
|
});
|
|
10021
|
+
const croppedStyle = useCropStyle({
|
|
10022
|
+
cropLeft,
|
|
10023
|
+
cropRight,
|
|
10024
|
+
cropTop,
|
|
10025
|
+
cropBottom,
|
|
10026
|
+
style: premountingStyle,
|
|
10027
|
+
componentName: "<AnimatedImage />"
|
|
10028
|
+
});
|
|
9893
10029
|
const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
|
|
9894
10030
|
const animatedImageProps = {
|
|
9895
10031
|
src,
|
|
@@ -9901,7 +10037,7 @@ var AnimatedImageInner = ({
|
|
|
9901
10037
|
loopBehavior,
|
|
9902
10038
|
id,
|
|
9903
10039
|
className,
|
|
9904
|
-
style:
|
|
10040
|
+
style: croppedStyle ?? undefined,
|
|
9905
10041
|
requestInit,
|
|
9906
10042
|
...canvasProps
|
|
9907
10043
|
};
|
|
@@ -10042,7 +10178,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
10042
10178
|
};
|
|
10043
10179
|
}
|
|
10044
10180
|
}, []);
|
|
10045
|
-
const contextValue =
|
|
10181
|
+
const contextValue = useMemo19(() => {
|
|
10046
10182
|
return {
|
|
10047
10183
|
registerRenderAsset,
|
|
10048
10184
|
unregisterRenderAsset,
|
|
@@ -10171,14 +10307,14 @@ var Loop = ({
|
|
|
10171
10307
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
10172
10308
|
const start = iteration * durationInFrames;
|
|
10173
10309
|
const from = Math.min(start, maxFrame);
|
|
10174
|
-
const loopDisplay =
|
|
10310
|
+
const loopDisplay = useMemo20(() => {
|
|
10175
10311
|
return {
|
|
10176
10312
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
10177
10313
|
startOffset: -from,
|
|
10178
10314
|
durationInFrames
|
|
10179
10315
|
};
|
|
10180
10316
|
}, [compDuration, durationInFrames, from, times]);
|
|
10181
|
-
const loopContext =
|
|
10317
|
+
const loopContext = useMemo20(() => {
|
|
10182
10318
|
return {
|
|
10183
10319
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
10184
10320
|
durationInFrames
|
|
@@ -10550,7 +10686,7 @@ var DurationsContext = createContext20({
|
|
|
10550
10686
|
});
|
|
10551
10687
|
var DurationsContextProvider = ({ children }) => {
|
|
10552
10688
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
10553
|
-
const value =
|
|
10689
|
+
const value = useMemo21(() => {
|
|
10554
10690
|
return {
|
|
10555
10691
|
durations,
|
|
10556
10692
|
setDurations
|
|
@@ -10577,6 +10713,38 @@ var getCrossOriginValue = ({
|
|
|
10577
10713
|
}
|
|
10578
10714
|
return;
|
|
10579
10715
|
};
|
|
10716
|
+
function mulberry32(a2) {
|
|
10717
|
+
let t = a2 + 1831565813;
|
|
10718
|
+
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
10719
|
+
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
10720
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
10721
|
+
}
|
|
10722
|
+
function hashCode(str) {
|
|
10723
|
+
let i = 0;
|
|
10724
|
+
let chr = 0;
|
|
10725
|
+
let hash = 0;
|
|
10726
|
+
for (i = 0;i < str.length; i++) {
|
|
10727
|
+
chr = str.charCodeAt(i);
|
|
10728
|
+
hash = (hash << 5) - hash + chr;
|
|
10729
|
+
hash |= 0;
|
|
10730
|
+
}
|
|
10731
|
+
return hash;
|
|
10732
|
+
}
|
|
10733
|
+
var random = (seed, dummy) => {
|
|
10734
|
+
if (dummy !== undefined) {
|
|
10735
|
+
throw new TypeError("random() takes only one argument");
|
|
10736
|
+
}
|
|
10737
|
+
if (seed === null) {
|
|
10738
|
+
return Math.random();
|
|
10739
|
+
}
|
|
10740
|
+
if (typeof seed === "string") {
|
|
10741
|
+
return mulberry32(hashCode(seed));
|
|
10742
|
+
}
|
|
10743
|
+
if (typeof seed === "number") {
|
|
10744
|
+
return mulberry32(seed * 10000000000);
|
|
10745
|
+
}
|
|
10746
|
+
throw new Error("random() argument must be a number or a string");
|
|
10747
|
+
};
|
|
10580
10748
|
var playAndHandleNotAllowedError = ({
|
|
10581
10749
|
mediaRef,
|
|
10582
10750
|
mediaType,
|
|
@@ -10693,7 +10861,7 @@ var useSingletonAudioContext = ({
|
|
|
10693
10861
|
if (sampleRate !== initialSampleRate.current) {
|
|
10694
10862
|
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.`);
|
|
10695
10863
|
}
|
|
10696
|
-
const context =
|
|
10864
|
+
const context = useMemo22(() => {
|
|
10697
10865
|
if (env.isRendering) {
|
|
10698
10866
|
return null;
|
|
10699
10867
|
}
|
|
@@ -10827,9 +10995,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10827
10995
|
});
|
|
10828
10996
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
10829
10997
|
const isResuming = useRef12(null);
|
|
10830
|
-
const audioSyncAnchor =
|
|
10998
|
+
const audioSyncAnchor = useMemo23(() => ({ value: 0 }), []);
|
|
10831
10999
|
const audioSyncAnchorListeners = useRef12([]);
|
|
10832
|
-
const audioSyncAnchorEmitter =
|
|
11000
|
+
const audioSyncAnchorEmitter = useMemo23(() => {
|
|
10833
11001
|
return {
|
|
10834
11002
|
dispatch: (event) => {
|
|
10835
11003
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -10849,7 +11017,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10849
11017
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
10850
11018
|
nodesToResume.current.delete(node);
|
|
10851
11019
|
}, []);
|
|
10852
|
-
const scheduleAudioNode =
|
|
11020
|
+
const scheduleAudioNode = useMemo23(() => {
|
|
10853
11021
|
return ({
|
|
10854
11022
|
node,
|
|
10855
11023
|
mediaTimestamp,
|
|
@@ -10941,7 +11109,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10941
11109
|
audioContextIsPlayingEventually.current = false;
|
|
10942
11110
|
return ctxAndGain.suspend();
|
|
10943
11111
|
}, [ctxAndGain]);
|
|
10944
|
-
const audioContextValue =
|
|
11112
|
+
const audioContextValue = useMemo23(() => {
|
|
10945
11113
|
return {
|
|
10946
11114
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
10947
11115
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -11123,7 +11291,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
11123
11291
|
});
|
|
11124
11292
|
resume?.();
|
|
11125
11293
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
11126
|
-
const audioTagsValue =
|
|
11294
|
+
const audioTagsValue = useMemo23(() => {
|
|
11127
11295
|
return {
|
|
11128
11296
|
registerAudio,
|
|
11129
11297
|
unregisterAudio,
|
|
@@ -11138,7 +11306,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
11138
11306
|
unregisterAudio,
|
|
11139
11307
|
updateAudio
|
|
11140
11308
|
]);
|
|
11141
|
-
const sharedAudioTagElements =
|
|
11309
|
+
const sharedAudioTagElements = useMemo23(() => {
|
|
11142
11310
|
return refs.map(({ id, ref }) => {
|
|
11143
11311
|
return /* @__PURE__ */ jsx19("audio", {
|
|
11144
11312
|
ref,
|
|
@@ -11506,7 +11674,7 @@ var useBasicMediaInTimeline = ({
|
|
|
11506
11674
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
11507
11675
|
loop
|
|
11508
11676
|
});
|
|
11509
|
-
const volumes =
|
|
11677
|
+
const volumes = useMemo24(() => {
|
|
11510
11678
|
if (typeof volume === "number") {
|
|
11511
11679
|
return volume;
|
|
11512
11680
|
}
|
|
@@ -11525,15 +11693,13 @@ var useBasicMediaInTimeline = ({
|
|
|
11525
11693
|
}, [initialVolume, mediaType, src, volume]);
|
|
11526
11694
|
const doesVolumeChange = typeof volume === "function";
|
|
11527
11695
|
const nonce = useNonce();
|
|
11528
|
-
const { rootId } = useTimelineContext();
|
|
11529
11696
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
11530
|
-
const memoizedResult =
|
|
11697
|
+
const memoizedResult = useMemo24(() => {
|
|
11531
11698
|
return {
|
|
11532
11699
|
volumes,
|
|
11533
11700
|
duration,
|
|
11534
11701
|
doesVolumeChange,
|
|
11535
11702
|
nonce,
|
|
11536
|
-
rootId,
|
|
11537
11703
|
finalDisplayName: displayName ?? getAssetDisplayName(src),
|
|
11538
11704
|
startMediaFrom,
|
|
11539
11705
|
src,
|
|
@@ -11544,7 +11710,6 @@ var useBasicMediaInTimeline = ({
|
|
|
11544
11710
|
duration,
|
|
11545
11711
|
doesVolumeChange,
|
|
11546
11712
|
nonce,
|
|
11547
|
-
rootId,
|
|
11548
11713
|
displayName,
|
|
11549
11714
|
src,
|
|
11550
11715
|
startMediaFrom,
|
|
@@ -11573,7 +11738,7 @@ var useMediaInTimeline = ({
|
|
|
11573
11738
|
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
11574
11739
|
const { durationInFrames } = useVideoConfig();
|
|
11575
11740
|
const mediaStartsAt = useMediaStartsAt();
|
|
11576
|
-
const { volumes, duration, doesVolumeChange, nonce,
|
|
11741
|
+
const { volumes, duration, doesVolumeChange, nonce, finalDisplayName } = useBasicMediaInTimeline({
|
|
11577
11742
|
volume,
|
|
11578
11743
|
mediaVolume,
|
|
11579
11744
|
mediaType,
|
|
@@ -11607,7 +11772,6 @@ var useMediaInTimeline = ({
|
|
|
11607
11772
|
parent: parentSequence?.id ?? null,
|
|
11608
11773
|
displayName: finalDisplayName,
|
|
11609
11774
|
documentationLink,
|
|
11610
|
-
rootId,
|
|
11611
11775
|
volume: volumes,
|
|
11612
11776
|
showInTimeline: true,
|
|
11613
11777
|
nonce: nonce.get(),
|
|
@@ -11648,7 +11812,6 @@ var useMediaInTimeline = ({
|
|
|
11648
11812
|
postmountDisplay,
|
|
11649
11813
|
loopDisplay,
|
|
11650
11814
|
documentationLink,
|
|
11651
|
-
rootId,
|
|
11652
11815
|
finalDisplayName,
|
|
11653
11816
|
isStudio,
|
|
11654
11817
|
refForOutline
|
|
@@ -11735,7 +11898,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11735
11898
|
}
|
|
11736
11899
|
}, [blocks]);
|
|
11737
11900
|
}
|
|
11738
|
-
return
|
|
11901
|
+
return useMemo25(() => {
|
|
11739
11902
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11740
11903
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11741
11904
|
};
|
|
@@ -11770,7 +11933,7 @@ var useBufferState = () => {
|
|
|
11770
11933
|
const buffer = useContext26(BufferingContextReact);
|
|
11771
11934
|
const logLevel = useLogLevel();
|
|
11772
11935
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
11773
|
-
return
|
|
11936
|
+
return useMemo26(() => ({
|
|
11774
11937
|
delayPlayback: () => {
|
|
11775
11938
|
if (!addBlock) {
|
|
11776
11939
|
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");
|
|
@@ -11878,7 +12041,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
11878
12041
|
onVariableFpsVideoDetected,
|
|
11879
12042
|
pauseWhenBuffering
|
|
11880
12043
|
]);
|
|
11881
|
-
return
|
|
12044
|
+
return useMemo27(() => {
|
|
11882
12045
|
return {
|
|
11883
12046
|
isBuffering: () => bufferingRef.current,
|
|
11884
12047
|
bufferUntilFirstFrame
|
|
@@ -12549,14 +12712,14 @@ var SetMediaVolumeContext = createContext22({
|
|
|
12549
12712
|
var useMediaVolumeState = () => {
|
|
12550
12713
|
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
12551
12714
|
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
12552
|
-
return
|
|
12715
|
+
return useMemo28(() => {
|
|
12553
12716
|
return [mediaVolume, setMediaVolume];
|
|
12554
12717
|
}, [mediaVolume, setMediaVolume]);
|
|
12555
12718
|
};
|
|
12556
12719
|
var usePlayerMutedState = () => {
|
|
12557
12720
|
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
12558
12721
|
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
12559
|
-
return
|
|
12722
|
+
return useMemo28(() => {
|
|
12560
12723
|
return [playerMuted, setPlayerMuted];
|
|
12561
12724
|
}, [playerMuted, setPlayerMuted]);
|
|
12562
12725
|
};
|
|
@@ -12623,7 +12786,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12623
12786
|
requestsVideoFrame: false,
|
|
12624
12787
|
isClientSideRendering: false
|
|
12625
12788
|
});
|
|
12626
|
-
const propsToPass =
|
|
12789
|
+
const propsToPass = useMemo29(() => {
|
|
12627
12790
|
return {
|
|
12628
12791
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
12629
12792
|
src: preloadedSrc,
|
|
@@ -12640,7 +12803,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12640
12803
|
userPreferredVolume,
|
|
12641
12804
|
crossOriginValue
|
|
12642
12805
|
]);
|
|
12643
|
-
const id =
|
|
12806
|
+
const id = useMemo29(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
12644
12807
|
src,
|
|
12645
12808
|
sequenceContext?.relativeFrom,
|
|
12646
12809
|
sequenceContext?.cumulatedFrom,
|
|
@@ -12773,7 +12936,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
12773
12936
|
const sequenceContext = useContext30(SequenceContext);
|
|
12774
12937
|
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
12775
12938
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12776
|
-
const id =
|
|
12939
|
+
const id = useMemo30(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12777
12940
|
props.src,
|
|
12778
12941
|
sequenceContext?.relativeFrom,
|
|
12779
12942
|
sequenceContext?.cumulatedFrom,
|
|
@@ -13047,7 +13210,8 @@ var solidSchema = {
|
|
|
13047
13210
|
},
|
|
13048
13211
|
...transformSchema,
|
|
13049
13212
|
...backgroundSchema,
|
|
13050
|
-
...borderSchema
|
|
13213
|
+
...borderSchema,
|
|
13214
|
+
...cropSchema
|
|
13051
13215
|
};
|
|
13052
13216
|
var SolidInner = ({
|
|
13053
13217
|
color,
|
|
@@ -13069,7 +13233,7 @@ var SolidInner = ({
|
|
|
13069
13233
|
effects,
|
|
13070
13234
|
overrideId: overrideId ?? null
|
|
13071
13235
|
});
|
|
13072
|
-
const sourceCanvas =
|
|
13236
|
+
const sourceCanvas = useMemo31(() => {
|
|
13073
13237
|
if (typeof document === "undefined") {
|
|
13074
13238
|
return null;
|
|
13075
13239
|
}
|
|
@@ -13137,7 +13301,7 @@ var SolidInner = ({
|
|
|
13137
13301
|
cancelRender2,
|
|
13138
13302
|
memoizedEffects
|
|
13139
13303
|
]);
|
|
13140
|
-
const canvasStyle =
|
|
13304
|
+
const canvasStyle = useMemo31(() => {
|
|
13141
13305
|
return {
|
|
13142
13306
|
width,
|
|
13143
13307
|
height,
|
|
@@ -13168,6 +13332,10 @@ var SolidOuter = forwardRef8(({
|
|
|
13168
13332
|
hidden,
|
|
13169
13333
|
showInTimeline,
|
|
13170
13334
|
pixelDensity,
|
|
13335
|
+
cropLeft,
|
|
13336
|
+
cropRight,
|
|
13337
|
+
cropTop,
|
|
13338
|
+
cropBottom,
|
|
13171
13339
|
...props2
|
|
13172
13340
|
}, ref) => {
|
|
13173
13341
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
@@ -13175,6 +13343,14 @@ var SolidOuter = forwardRef8(({
|
|
|
13175
13343
|
useImperativeHandle6(ref, () => {
|
|
13176
13344
|
return actualRef.current;
|
|
13177
13345
|
}, []);
|
|
13346
|
+
const croppedStyle = useCropStyle({
|
|
13347
|
+
cropLeft,
|
|
13348
|
+
cropRight,
|
|
13349
|
+
cropTop,
|
|
13350
|
+
cropBottom,
|
|
13351
|
+
style: style ?? null,
|
|
13352
|
+
componentName: "<Solid />"
|
|
13353
|
+
});
|
|
13178
13354
|
return /* @__PURE__ */ jsx24(Sequence, {
|
|
13179
13355
|
layout: "none",
|
|
13180
13356
|
from,
|
|
@@ -13196,7 +13372,7 @@ var SolidOuter = forwardRef8(({
|
|
|
13196
13372
|
height,
|
|
13197
13373
|
width,
|
|
13198
13374
|
className,
|
|
13199
|
-
style,
|
|
13375
|
+
style: croppedStyle ?? undefined,
|
|
13200
13376
|
effects,
|
|
13201
13377
|
pixelDensity
|
|
13202
13378
|
})
|
|
@@ -13225,6 +13401,17 @@ var isHtmlInCanvasSupported = () => {
|
|
|
13225
13401
|
return cachedSupport;
|
|
13226
13402
|
};
|
|
13227
13403
|
var HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = "HTML in Canvas is not supported. Two common causes: Chrome is older than version 148 (update Chrome), or the HTML-in-Canvas flag is disabled at chrome://flags/#canvas-draw-element (enable it and restart Chrome).";
|
|
13404
|
+
var MINIMUM_CHROME_VERSION_FOR_NESTED_HTML_IN_CANVAS = 152;
|
|
13405
|
+
var getChromeMajorVersion = () => {
|
|
13406
|
+
if (typeof navigator === "undefined") {
|
|
13407
|
+
return null;
|
|
13408
|
+
}
|
|
13409
|
+
const match = navigator.userAgent.match(/\b(?:HeadlessChrome|Chrome)\/(\d+)/);
|
|
13410
|
+
if (!match) {
|
|
13411
|
+
return null;
|
|
13412
|
+
}
|
|
13413
|
+
return Number(match[1]);
|
|
13414
|
+
};
|
|
13228
13415
|
function assertHtmlInCanvasDimensions(width, height) {
|
|
13229
13416
|
if (typeof width !== "number" || typeof height !== "number") {
|
|
13230
13417
|
throw new Error(`HtmlInCanvas: \`width\` and \`height\` must be numbers. Received width=${String(width)}, height=${String(height)}.`);
|
|
@@ -13288,6 +13475,10 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13288
13475
|
}, ref) => {
|
|
13289
13476
|
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
13290
13477
|
assertHtmlInCanvasDimensions(width, height);
|
|
13478
|
+
const chromeMajorVersion = getChromeMajorVersion();
|
|
13479
|
+
if (ancestor && chromeMajorVersion !== null && chromeMajorVersion < MINIMUM_CHROME_VERSION_FOR_NESTED_HTML_IN_CANVAS) {
|
|
13480
|
+
throw new Error(`Nested <HtmlInCanvas> components require Chrome ${MINIMUM_CHROME_VERSION_FOR_NESTED_HTML_IN_CANVAS} or newer, but the current browser is Chrome ${chromeMajorVersion}. Upgrade Chrome or avoid nesting components that use <HtmlInCanvas>, such as shapes with effects.`);
|
|
13481
|
+
}
|
|
13291
13482
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
13292
13483
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
13293
13484
|
const canvasHeight = Math.ceil(height * resolvedPixelDensity);
|
|
@@ -13506,20 +13697,20 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13506
13697
|
continueRender2(handle);
|
|
13507
13698
|
};
|
|
13508
13699
|
}, [width, height, continueRender2, delayRender2, canvasSizeKey]);
|
|
13509
|
-
const innerStyle =
|
|
13700
|
+
const innerStyle = useMemo32(() => {
|
|
13510
13701
|
return {
|
|
13511
13702
|
width,
|
|
13512
13703
|
height
|
|
13513
13704
|
};
|
|
13514
13705
|
}, [width, height]);
|
|
13515
|
-
const canvasStyle =
|
|
13706
|
+
const canvasStyle = useMemo32(() => {
|
|
13516
13707
|
return {
|
|
13517
13708
|
width,
|
|
13518
13709
|
height,
|
|
13519
13710
|
...style ?? {}
|
|
13520
13711
|
};
|
|
13521
13712
|
}, [height, style, width]);
|
|
13522
|
-
const ancestorValue =
|
|
13713
|
+
const ancestorValue = useMemo32(() => {
|
|
13523
13714
|
return {
|
|
13524
13715
|
requestParentPaint: () => {
|
|
13525
13716
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -13552,6 +13743,10 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
13552
13743
|
pixelDensity,
|
|
13553
13744
|
controls,
|
|
13554
13745
|
style,
|
|
13746
|
+
cropLeft,
|
|
13747
|
+
cropRight,
|
|
13748
|
+
cropTop,
|
|
13749
|
+
cropBottom,
|
|
13555
13750
|
durationInFrames,
|
|
13556
13751
|
name,
|
|
13557
13752
|
...sequenceProps
|
|
@@ -13566,6 +13761,14 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
13566
13761
|
ref.current = node;
|
|
13567
13762
|
}
|
|
13568
13763
|
}, [ref]);
|
|
13764
|
+
const croppedStyle = useCropStyle({
|
|
13765
|
+
cropLeft,
|
|
13766
|
+
cropRight,
|
|
13767
|
+
cropTop,
|
|
13768
|
+
cropBottom,
|
|
13769
|
+
style: style ?? null,
|
|
13770
|
+
componentName: "<HtmlInCanvas />"
|
|
13771
|
+
});
|
|
13569
13772
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
13570
13773
|
durationInFrames,
|
|
13571
13774
|
name: name ?? "<HtmlInCanvas>",
|
|
@@ -13584,7 +13787,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
13584
13787
|
onInit,
|
|
13585
13788
|
pixelDensity,
|
|
13586
13789
|
controls,
|
|
13587
|
-
style,
|
|
13790
|
+
style: croppedStyle ?? undefined,
|
|
13588
13791
|
children
|
|
13589
13792
|
})
|
|
13590
13793
|
});
|
|
@@ -13603,7 +13806,8 @@ var htmlInCanvasSchema = {
|
|
|
13603
13806
|
},
|
|
13604
13807
|
...transformSchema,
|
|
13605
13808
|
...backgroundSchema,
|
|
13606
|
-
...borderSchema
|
|
13809
|
+
...borderSchema,
|
|
13810
|
+
...cropSchema
|
|
13607
13811
|
};
|
|
13608
13812
|
var HtmlInCanvasWrapped = withInteractivitySchema({
|
|
13609
13813
|
Component: HtmlInCanvasInner,
|
|
@@ -13625,6 +13829,7 @@ function truncateSrcForLabel(src) {
|
|
|
13625
13829
|
}
|
|
13626
13830
|
var canvasImageSchema = {
|
|
13627
13831
|
...baseSchema,
|
|
13832
|
+
...cropSchema,
|
|
13628
13833
|
...premountSchema,
|
|
13629
13834
|
fit: {
|
|
13630
13835
|
type: "enum",
|
|
@@ -13755,7 +13960,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13755
13960
|
continueRender2(pending.handle);
|
|
13756
13961
|
pendingLoadDelayRef.current = null;
|
|
13757
13962
|
}, [continueRender2]);
|
|
13758
|
-
const sourceCanvas =
|
|
13963
|
+
const sourceCanvas = useMemo33(() => {
|
|
13759
13964
|
if (typeof document === "undefined") {
|
|
13760
13965
|
return null;
|
|
13761
13966
|
}
|
|
@@ -13969,9 +14174,14 @@ var CanvasImageInner = forwardRef10(({
|
|
|
13969
14174
|
hidden,
|
|
13970
14175
|
name,
|
|
13971
14176
|
showInTimeline,
|
|
14177
|
+
cropLeft,
|
|
14178
|
+
cropRight,
|
|
14179
|
+
cropTop,
|
|
14180
|
+
cropBottom,
|
|
13972
14181
|
stack,
|
|
13973
14182
|
controls,
|
|
13974
14183
|
_remotionInternalDocumentationLink,
|
|
14184
|
+
_remotionInternalCropComponentName,
|
|
13975
14185
|
outlineRef,
|
|
13976
14186
|
...canvasProps
|
|
13977
14187
|
}, ref) => {
|
|
@@ -14001,6 +14211,14 @@ var CanvasImageInner = forwardRef10(({
|
|
|
14001
14211
|
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
14002
14212
|
hideWhilePremounted: "display-none"
|
|
14003
14213
|
});
|
|
14214
|
+
const croppedStyle = useCropStyle({
|
|
14215
|
+
cropLeft,
|
|
14216
|
+
cropRight,
|
|
14217
|
+
cropTop,
|
|
14218
|
+
cropBottom,
|
|
14219
|
+
style: premountingStyle,
|
|
14220
|
+
componentName: _remotionInternalCropComponentName ?? "<CanvasImage />"
|
|
14221
|
+
});
|
|
14004
14222
|
return /* @__PURE__ */ jsx26(Freeze, {
|
|
14005
14223
|
frame: freezeFrame,
|
|
14006
14224
|
active: isPremountingOrPostmounting,
|
|
@@ -14032,7 +14250,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
14032
14250
|
effects,
|
|
14033
14251
|
controls,
|
|
14034
14252
|
className,
|
|
14035
|
-
style:
|
|
14253
|
+
style: croppedStyle ?? undefined,
|
|
14036
14254
|
id,
|
|
14037
14255
|
onError,
|
|
14038
14256
|
pauseWhenLoading,
|
|
@@ -14263,6 +14481,10 @@ var NativeImgInner = ({
|
|
|
14263
14481
|
style,
|
|
14264
14482
|
styleWhilePremounted,
|
|
14265
14483
|
styleWhilePostmounted,
|
|
14484
|
+
cropLeft,
|
|
14485
|
+
cropRight,
|
|
14486
|
+
cropTop,
|
|
14487
|
+
cropBottom,
|
|
14266
14488
|
controls,
|
|
14267
14489
|
outlineRef: refForOutline,
|
|
14268
14490
|
...props2
|
|
@@ -14288,6 +14510,14 @@ var NativeImgInner = ({
|
|
|
14288
14510
|
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
14289
14511
|
hideWhilePremounted: "display-none"
|
|
14290
14512
|
});
|
|
14513
|
+
const croppedStyle = useCropStyle({
|
|
14514
|
+
cropLeft,
|
|
14515
|
+
cropRight,
|
|
14516
|
+
cropTop,
|
|
14517
|
+
cropBottom,
|
|
14518
|
+
style: premountingStyle,
|
|
14519
|
+
componentName: "<Img />"
|
|
14520
|
+
});
|
|
14291
14521
|
return /* @__PURE__ */ jsx28(Freeze, {
|
|
14292
14522
|
frame: freezeFrame,
|
|
14293
14523
|
active: isPremountingOrPostmounting,
|
|
@@ -14312,7 +14542,7 @@ var NativeImgInner = ({
|
|
|
14312
14542
|
children: /* @__PURE__ */ jsx28(ImgContent, {
|
|
14313
14543
|
src,
|
|
14314
14544
|
refForOutline,
|
|
14315
|
-
style:
|
|
14545
|
+
style: croppedStyle ?? undefined,
|
|
14316
14546
|
...props2
|
|
14317
14547
|
})
|
|
14318
14548
|
})
|
|
@@ -14327,6 +14557,7 @@ var imgSchema = {
|
|
|
14327
14557
|
keyframable: false
|
|
14328
14558
|
},
|
|
14329
14559
|
...baseSchema,
|
|
14560
|
+
...cropSchema,
|
|
14330
14561
|
...premountSchema,
|
|
14331
14562
|
...transformSchema,
|
|
14332
14563
|
...backgroundSchema,
|
|
@@ -14395,6 +14626,10 @@ var ImgInner = ({
|
|
|
14395
14626
|
height,
|
|
14396
14627
|
className,
|
|
14397
14628
|
style,
|
|
14629
|
+
cropLeft,
|
|
14630
|
+
cropRight,
|
|
14631
|
+
cropTop,
|
|
14632
|
+
cropBottom,
|
|
14398
14633
|
id,
|
|
14399
14634
|
pauseWhenLoading,
|
|
14400
14635
|
maxRetries,
|
|
@@ -14426,6 +14661,10 @@ var ImgInner = ({
|
|
|
14426
14661
|
height,
|
|
14427
14662
|
className,
|
|
14428
14663
|
style,
|
|
14664
|
+
cropLeft,
|
|
14665
|
+
cropRight,
|
|
14666
|
+
cropTop,
|
|
14667
|
+
cropBottom,
|
|
14429
14668
|
id,
|
|
14430
14669
|
pauseWhenLoading: shouldPauseWhenLoading,
|
|
14431
14670
|
maxRetries,
|
|
@@ -14455,6 +14694,10 @@ var ImgInner = ({
|
|
|
14455
14694
|
effects,
|
|
14456
14695
|
className,
|
|
14457
14696
|
style,
|
|
14697
|
+
cropLeft,
|
|
14698
|
+
cropRight,
|
|
14699
|
+
cropTop,
|
|
14700
|
+
cropBottom,
|
|
14458
14701
|
id,
|
|
14459
14702
|
pauseWhenLoading: shouldPauseWhenLoading,
|
|
14460
14703
|
maxRetries,
|
|
@@ -14473,6 +14716,7 @@ var ImgInner = ({
|
|
|
14473
14716
|
showInTimeline,
|
|
14474
14717
|
stack,
|
|
14475
14718
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
14719
|
+
_remotionInternalCropComponentName: "<Img />",
|
|
14476
14720
|
controls,
|
|
14477
14721
|
outlineRef: refForOutline,
|
|
14478
14722
|
...canvasProps
|
|
@@ -14521,9 +14765,22 @@ var interactiveTextElementSchema = {
|
|
|
14521
14765
|
};
|
|
14522
14766
|
var interactiveSvgTextElementSchema = {
|
|
14523
14767
|
...interactiveElementSchema,
|
|
14768
|
+
...svgPaintSchema,
|
|
14524
14769
|
...textSchema,
|
|
14525
14770
|
...textContentSchema
|
|
14526
14771
|
};
|
|
14772
|
+
var interactiveSvgElementSchema = {
|
|
14773
|
+
...interactiveElementSchema,
|
|
14774
|
+
...svgPaintSchema
|
|
14775
|
+
};
|
|
14776
|
+
var interactiveSvgStrokeElementSchema = {
|
|
14777
|
+
...interactiveElementSchema,
|
|
14778
|
+
...svgStrokeSchema
|
|
14779
|
+
};
|
|
14780
|
+
var interactiveSvgRootElementSchema = {
|
|
14781
|
+
...interactiveBorderElementSchema,
|
|
14782
|
+
...svgPaintSchema
|
|
14783
|
+
};
|
|
14527
14784
|
var setRef = (ref, value) => {
|
|
14528
14785
|
if (typeof ref === "function") {
|
|
14529
14786
|
ref(value);
|
|
@@ -14591,8 +14848,11 @@ var makeInteractiveElement = (tag, displayName, schema) => {
|
|
|
14591
14848
|
var makeInteractiveTextElement = (tag, displayName) => {
|
|
14592
14849
|
return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
|
|
14593
14850
|
};
|
|
14594
|
-
var
|
|
14595
|
-
return makeInteractiveElement(tag, displayName,
|
|
14851
|
+
var makeInteractiveSvgElement = (tag, displayName) => {
|
|
14852
|
+
return makeInteractiveElement(tag, displayName, interactiveSvgElementSchema);
|
|
14853
|
+
};
|
|
14854
|
+
var makeInteractiveSvgStrokeElement = (tag, displayName) => {
|
|
14855
|
+
return makeInteractiveElement(tag, displayName, interactiveSvgStrokeElementSchema);
|
|
14596
14856
|
};
|
|
14597
14857
|
var Interactive = {
|
|
14598
14858
|
baseSchema,
|
|
@@ -14600,6 +14860,9 @@ var Interactive = {
|
|
|
14600
14860
|
textSchema,
|
|
14601
14861
|
backgroundSchema,
|
|
14602
14862
|
borderSchema,
|
|
14863
|
+
cropSchema,
|
|
14864
|
+
svgPaintSchema,
|
|
14865
|
+
svgStrokeSchema,
|
|
14603
14866
|
premountSchema,
|
|
14604
14867
|
sequenceSchema,
|
|
14605
14868
|
withSchema,
|
|
@@ -14608,13 +14871,13 @@ var Interactive = {
|
|
|
14608
14871
|
Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
|
|
14609
14872
|
Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
|
|
14610
14873
|
Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
|
|
14611
|
-
Circle:
|
|
14874
|
+
Circle: makeInteractiveSvgElement("circle", "<Interactive.Circle>"),
|
|
14612
14875
|
Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
|
|
14613
14876
|
Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
|
|
14614
|
-
Ellipse:
|
|
14877
|
+
Ellipse: makeInteractiveSvgElement("ellipse", "<Interactive.Ellipse>"),
|
|
14615
14878
|
Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
|
|
14616
14879
|
Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
|
|
14617
|
-
G:
|
|
14880
|
+
G: makeInteractiveSvgElement("g", "<Interactive.G>"),
|
|
14618
14881
|
H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
|
|
14619
14882
|
H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
|
|
14620
14883
|
H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
|
|
@@ -14624,19 +14887,19 @@ var Interactive = {
|
|
|
14624
14887
|
Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
|
|
14625
14888
|
Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
|
|
14626
14889
|
Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
|
|
14627
|
-
Line:
|
|
14890
|
+
Line: makeInteractiveSvgStrokeElement("line", "<Interactive.Line>"),
|
|
14628
14891
|
Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
|
|
14629
14892
|
Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
|
|
14630
14893
|
Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
|
|
14631
14894
|
P: makeInteractiveTextElement("p", "<Interactive.P>"),
|
|
14632
|
-
Path:
|
|
14895
|
+
Path: makeInteractiveSvgElement("path", "<Interactive.Path>"),
|
|
14633
14896
|
Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
|
|
14634
|
-
Rect:
|
|
14897
|
+
Rect: makeInteractiveSvgElement("rect", "<Interactive.Rect>"),
|
|
14635
14898
|
Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
|
|
14636
14899
|
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
14637
14900
|
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
14638
14901
|
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
14639
|
-
Svg: makeInteractiveElement("svg", "<Interactive.Svg>",
|
|
14902
|
+
Svg: makeInteractiveElement("svg", "<Interactive.Svg>", interactiveSvgRootElementSchema),
|
|
14640
14903
|
Text: makeInteractiveElement("text", "<Interactive.Text>", interactiveSvgTextElementSchema),
|
|
14641
14904
|
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
14642
14905
|
};
|
|
@@ -14724,7 +14987,7 @@ var CompositionManagerProvider = ({
|
|
|
14724
14987
|
getCompositions: () => currentcompositionsRef.current
|
|
14725
14988
|
};
|
|
14726
14989
|
}, []);
|
|
14727
|
-
const compositionManagerSetters =
|
|
14990
|
+
const compositionManagerSetters = useMemo34(() => {
|
|
14728
14991
|
return {
|
|
14729
14992
|
registerComposition,
|
|
14730
14993
|
unregisterComposition,
|
|
@@ -14740,7 +15003,7 @@ var CompositionManagerProvider = ({
|
|
|
14740
15003
|
unregisterFolder,
|
|
14741
15004
|
onlyRenderComposition
|
|
14742
15005
|
]);
|
|
14743
|
-
const compositionManagerContextValue =
|
|
15006
|
+
const compositionManagerContextValue = useMemo34(() => {
|
|
14744
15007
|
return {
|
|
14745
15008
|
compositions,
|
|
14746
15009
|
folders,
|
|
@@ -14862,7 +15125,7 @@ var MediaEnabledProvider = ({
|
|
|
14862
15125
|
videoEnabled,
|
|
14863
15126
|
audioEnabled
|
|
14864
15127
|
}) => {
|
|
14865
|
-
const value =
|
|
15128
|
+
const value = useMemo35(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
14866
15129
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
14867
15130
|
value,
|
|
14868
15131
|
children
|
|
@@ -14878,13 +15141,13 @@ var RemotionRootContexts = ({
|
|
|
14878
15141
|
audioEnabled,
|
|
14879
15142
|
frameState
|
|
14880
15143
|
}) => {
|
|
14881
|
-
const nonceContext =
|
|
15144
|
+
const nonceContext = useMemo36(() => {
|
|
14882
15145
|
let counter = 0;
|
|
14883
15146
|
return {
|
|
14884
15147
|
getNonce: () => counter++
|
|
14885
15148
|
};
|
|
14886
15149
|
}, []);
|
|
14887
|
-
const logging =
|
|
15150
|
+
const logging = useMemo36(() => {
|
|
14888
15151
|
return { logLevel, mountTime: Date.now() };
|
|
14889
15152
|
}, [logLevel]);
|
|
14890
15153
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -15191,7 +15454,7 @@ var OffthreadVideoForRendering = ({
|
|
|
15191
15454
|
if (!src) {
|
|
15192
15455
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
15193
15456
|
}
|
|
15194
|
-
const id =
|
|
15457
|
+
const id = useMemo37(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
15195
15458
|
src,
|
|
15196
15459
|
sequenceContext?.cumulatedFrom,
|
|
15197
15460
|
sequenceContext?.relativeFrom,
|
|
@@ -15246,14 +15509,14 @@ var OffthreadVideoForRendering = ({
|
|
|
15246
15509
|
sequenceContext?.cumulatedNegativeFrom,
|
|
15247
15510
|
audioStreamIndex
|
|
15248
15511
|
]);
|
|
15249
|
-
const currentTime =
|
|
15512
|
+
const currentTime = useMemo37(() => {
|
|
15250
15513
|
return getExpectedMediaFrameUncorrected({
|
|
15251
15514
|
frame,
|
|
15252
15515
|
playbackRate: playbackRate || 1,
|
|
15253
15516
|
startFrom: -mediaStartsAt
|
|
15254
15517
|
}) / videoConfig.fps;
|
|
15255
15518
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
15256
|
-
const actualSrc =
|
|
15519
|
+
const actualSrc = useMemo37(() => {
|
|
15257
15520
|
return getOffthreadVideoSource({
|
|
15258
15521
|
src,
|
|
15259
15522
|
currentTime,
|
|
@@ -15341,7 +15604,7 @@ var OffthreadVideoForRendering = ({
|
|
|
15341
15604
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
15342
15605
|
}
|
|
15343
15606
|
}, [imageSrc, onError]);
|
|
15344
|
-
const className =
|
|
15607
|
+
const className = useMemo37(() => {
|
|
15345
15608
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
15346
15609
|
}, [props2.className]);
|
|
15347
15610
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -15410,7 +15673,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15410
15673
|
throw new Error("SharedAudioContext not found");
|
|
15411
15674
|
}
|
|
15412
15675
|
const videoRef = useRef27(null);
|
|
15413
|
-
const sharedSource =
|
|
15676
|
+
const sharedSource = useMemo38(() => {
|
|
15414
15677
|
if (!context.audioContext) {
|
|
15415
15678
|
return null;
|
|
15416
15679
|
}
|
|
@@ -15613,7 +15876,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15613
15876
|
current.preload = "auto";
|
|
15614
15877
|
}
|
|
15615
15878
|
}, []);
|
|
15616
|
-
const actualStyle =
|
|
15879
|
+
const actualStyle = useMemo38(() => {
|
|
15617
15880
|
return {
|
|
15618
15881
|
...style
|
|
15619
15882
|
};
|
|
@@ -15810,7 +16073,7 @@ function useRemotionContexts() {
|
|
|
15810
16073
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15811
16074
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15812
16075
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15813
|
-
return
|
|
16076
|
+
return useMemo39(() => ({
|
|
15814
16077
|
compositionManagerCtx,
|
|
15815
16078
|
timelineContext,
|
|
15816
16079
|
setTimelineContext,
|
|
@@ -15919,6 +16182,7 @@ var Internals = {
|
|
|
15919
16182
|
sequenceStyleSchema,
|
|
15920
16183
|
sequenceVisualStyleSchema,
|
|
15921
16184
|
sequencePremountSchema,
|
|
16185
|
+
sequenceCropSchema,
|
|
15922
16186
|
textSchema,
|
|
15923
16187
|
transformSchema,
|
|
15924
16188
|
premountSchema,
|
|
@@ -16042,7 +16306,9 @@ var Internals = {
|
|
|
16042
16306
|
hiddenField,
|
|
16043
16307
|
durationInFramesField,
|
|
16044
16308
|
freezeField,
|
|
16045
|
-
fromField
|
|
16309
|
+
fromField,
|
|
16310
|
+
resolveSequenceCrop,
|
|
16311
|
+
useCropStyle
|
|
16046
16312
|
};
|
|
16047
16313
|
var flattenChildren = (children) => {
|
|
16048
16314
|
const childrenArray = React41.Children.toArray(children);
|
|
@@ -16112,7 +16378,7 @@ var validateSeriesSequenceProps = ({
|
|
|
16112
16378
|
return offset;
|
|
16113
16379
|
};
|
|
16114
16380
|
var SeriesInner = (props2) => {
|
|
16115
|
-
const childrenValue =
|
|
16381
|
+
const childrenValue = useMemo40(() => {
|
|
16116
16382
|
const flattenedChildren = flattenChildren(props2.children);
|
|
16117
16383
|
const renderChildren = (i, startFrame) => {
|
|
16118
16384
|
if (i === flattenedChildren.length) {
|
|
@@ -16448,7 +16714,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
16448
16714
|
const mountTime = useMountTime();
|
|
16449
16715
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
16450
16716
|
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
16451
|
-
const id =
|
|
16717
|
+
const id = useMemo41(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
16452
16718
|
props2.src,
|
|
16453
16719
|
sequenceContext?.cumulatedFrom,
|
|
16454
16720
|
sequenceContext?.relativeFrom,
|
|
@@ -16779,7 +17045,7 @@ addSequenceStackTraces(Composition);
|
|
|
16779
17045
|
addSequenceStackTraces(Folder);
|
|
16780
17046
|
|
|
16781
17047
|
// ../shapes/dist/esm/index.mjs
|
|
16782
|
-
import React, { useCallback as useCallback26, useMemo as
|
|
17048
|
+
import React, { useCallback as useCallback26, useMemo as useMemo42, useRef as useRef29 } from "react";
|
|
16783
17049
|
import { version } from "react-dom";
|
|
16784
17050
|
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
16785
17051
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -16961,13 +17227,13 @@ var RenderSvg = ({
|
|
|
16961
17227
|
stack,
|
|
16962
17228
|
...props
|
|
16963
17229
|
}) => {
|
|
16964
|
-
const actualStyle =
|
|
17230
|
+
const actualStyle = useMemo42(() => {
|
|
16965
17231
|
return {
|
|
16966
17232
|
overflow: "visible",
|
|
16967
17233
|
...style ?? {}
|
|
16968
17234
|
};
|
|
16969
17235
|
}, [style]);
|
|
16970
|
-
const actualPathStyle =
|
|
17236
|
+
const actualPathStyle = useMemo42(() => {
|
|
16971
17237
|
return {
|
|
16972
17238
|
transformBox: "fill-box",
|
|
16973
17239
|
...pathStyle ?? {}
|
|
@@ -19948,7 +20214,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19948
20214
|
progress: 0,
|
|
19949
20215
|
isActive: false
|
|
19950
20216
|
});
|
|
19951
|
-
const eventTarget =
|
|
20217
|
+
const eventTarget = useMemo44(() => new EventTarget, []);
|
|
19952
20218
|
useEffect21(() => {
|
|
19953
20219
|
if (disabled) {
|
|
19954
20220
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
@@ -26395,7 +26661,7 @@ var Triangle22 = (props) => {
|
|
|
26395
26661
|
};
|
|
26396
26662
|
|
|
26397
26663
|
// src/components/homepage/FreePricing.tsx
|
|
26398
|
-
import React53, { useCallback as useCallback38, useMemo as
|
|
26664
|
+
import React53, { useCallback as useCallback38, useMemo as useMemo53 } from "react";
|
|
26399
26665
|
|
|
26400
26666
|
// ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
26401
26667
|
var CLASS_PART_SEPARATOR2 = "-";
|
|
@@ -27882,11 +28148,11 @@ var FreePricing = () => {
|
|
|
27882
28148
|
checked: true
|
|
27883
28149
|
}),
|
|
27884
28150
|
/* @__PURE__ */ jsx46(PricingBulletPoint, {
|
|
27885
|
-
text: "
|
|
28151
|
+
text: "All features included",
|
|
27886
28152
|
checked: true
|
|
27887
28153
|
}),
|
|
27888
28154
|
/* @__PURE__ */ jsx46(PricingBulletPoint, {
|
|
27889
|
-
text: "Unlimited use",
|
|
28155
|
+
text: "Unlimited commercial use",
|
|
27890
28156
|
checked: true
|
|
27891
28157
|
}),
|
|
27892
28158
|
/* @__PURE__ */ jsx46(PricingBulletPoint, {
|
|
@@ -28052,14 +28318,14 @@ var CompanyPricing = () => {
|
|
|
28052
28318
|
}, []);
|
|
28053
28319
|
const creatorsPrice = creatorsSelected ? devSeatCount * SEAT_PRICE : 0;
|
|
28054
28320
|
const automatorsPrice = automatorsSelected ? Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE : 0;
|
|
28055
|
-
const totalPrice =
|
|
28321
|
+
const totalPrice = useMemo53(() => {
|
|
28056
28322
|
const basePrice = creatorsPrice + automatorsPrice;
|
|
28057
28323
|
if (automatorsSelected) {
|
|
28058
28324
|
return Math.max(100, basePrice);
|
|
28059
28325
|
}
|
|
28060
28326
|
return basePrice;
|
|
28061
28327
|
}, [creatorsPrice, automatorsPrice, automatorsSelected]);
|
|
28062
|
-
const totalPriceString =
|
|
28328
|
+
const totalPriceString = useMemo53(() => {
|
|
28063
28329
|
return formatPrice(totalPrice);
|
|
28064
28330
|
}, [formatPrice, totalPrice]);
|
|
28065
28331
|
const showMinimumMessage = automatorsSelected && creatorsPrice + automatorsPrice < 100;
|
|
@@ -28289,13 +28555,13 @@ var Pricing = ({
|
|
|
28289
28555
|
licenseHref = "https://github.com/remotion-dev/remotion/blob/main/LICENSE.md",
|
|
28290
28556
|
termsHref = "/docs/license/terms"
|
|
28291
28557
|
}) => {
|
|
28292
|
-
const faqLinkTarget =
|
|
28558
|
+
const faqLinkTarget = useMemo54(() => {
|
|
28293
28559
|
return faqHref.startsWith("http") ? "_blank" : undefined;
|
|
28294
28560
|
}, [faqHref]);
|
|
28295
|
-
const licenseLinkTarget =
|
|
28561
|
+
const licenseLinkTarget = useMemo54(() => {
|
|
28296
28562
|
return licenseHref.startsWith("http") ? "_blank" : undefined;
|
|
28297
28563
|
}, [licenseHref]);
|
|
28298
|
-
const termsLinkTarget =
|
|
28564
|
+
const termsLinkTarget = useMemo54(() => {
|
|
28299
28565
|
return termsHref.startsWith("http") ? "_blank" : undefined;
|
|
28300
28566
|
}, [termsHref]);
|
|
28301
28567
|
return /* @__PURE__ */ jsxs9("div", {
|