@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/experts.js
CHANGED
|
@@ -911,7 +911,7 @@ var experts = [
|
|
|
911
911
|
}
|
|
912
912
|
];
|
|
913
913
|
// src/components/experts/ExpertsPage.tsx
|
|
914
|
-
import { useMemo as
|
|
914
|
+
import { useMemo as useMemo42 } from "react";
|
|
915
915
|
|
|
916
916
|
// ../core/dist/esm/index.mjs
|
|
917
917
|
import { createContext } from "react";
|
|
@@ -984,8 +984,9 @@ import {
|
|
|
984
984
|
useRef as useRef9,
|
|
985
985
|
useState as useState6
|
|
986
986
|
} from "react";
|
|
987
|
-
import
|
|
988
|
-
import {
|
|
987
|
+
import { useMemo as useMemo16 } from "react";
|
|
988
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo18, useRef as useRef8 } from "react";
|
|
989
|
+
import { useEffect as useEffect4, useMemo as useMemo17, useRef as useRef7 } from "react";
|
|
989
990
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
990
991
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
991
992
|
import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
@@ -994,18 +995,18 @@ import {
|
|
|
994
995
|
useCallback as useCallback8,
|
|
995
996
|
useImperativeHandle as useImperativeHandle3,
|
|
996
997
|
useLayoutEffect as useLayoutEffect3,
|
|
997
|
-
useMemo as
|
|
998
|
+
useMemo as useMemo19,
|
|
998
999
|
useRef as useRef10,
|
|
999
1000
|
useState as useState7
|
|
1000
1001
|
} from "react";
|
|
1001
1002
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1002
1003
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext31 } from "react";
|
|
1003
|
-
import React17, { createContext as createContext18, useMemo as
|
|
1004
|
+
import React17, { createContext as createContext18, useMemo as useMemo20 } from "react";
|
|
1004
1005
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1005
1006
|
import { useContext as useContext20 } from "react";
|
|
1006
1007
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
1007
1008
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1008
|
-
import { createContext as createContext20, useMemo as
|
|
1009
|
+
import { createContext as createContext20, useMemo as useMemo21, useReducer } from "react";
|
|
1009
1010
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1010
1011
|
import { useCallback as useCallback13 } from "react";
|
|
1011
1012
|
import React23, {
|
|
@@ -1013,7 +1014,7 @@ import React23, {
|
|
|
1013
1014
|
useContext as useContext29,
|
|
1014
1015
|
useEffect as useEffect14,
|
|
1015
1016
|
useImperativeHandle as useImperativeHandle4,
|
|
1016
|
-
useMemo as
|
|
1017
|
+
useMemo as useMemo29,
|
|
1017
1018
|
useRef as useRef19,
|
|
1018
1019
|
useState as useState14
|
|
1019
1020
|
} from "react";
|
|
@@ -1024,14 +1025,14 @@ import React20, {
|
|
|
1024
1025
|
useCallback as useCallback9,
|
|
1025
1026
|
useContext as useContext21,
|
|
1026
1027
|
useEffect as useEffect7,
|
|
1027
|
-
useMemo as
|
|
1028
|
+
useMemo as useMemo23,
|
|
1028
1029
|
useRef as useRef12,
|
|
1029
1030
|
useState as useState10
|
|
1030
1031
|
} from "react";
|
|
1031
|
-
import { useMemo as
|
|
1032
|
+
import { useMemo as useMemo22, useRef as useRef11 } from "react";
|
|
1032
1033
|
import { jsx as jsx19, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1033
1034
|
import { useRef as useRef13 } from "react";
|
|
1034
|
-
import { useContext as useContext24, useEffect as useEffect8, useMemo as
|
|
1035
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo24, useState as useState11 } from "react";
|
|
1035
1036
|
import { useContext as useContext23 } from "react";
|
|
1036
1037
|
import {
|
|
1037
1038
|
useCallback as useCallback12,
|
|
@@ -1040,14 +1041,14 @@ import {
|
|
|
1040
1041
|
useLayoutEffect as useLayoutEffect7,
|
|
1041
1042
|
useRef as useRef18
|
|
1042
1043
|
} from "react";
|
|
1043
|
-
import { useCallback as useCallback11, useMemo as
|
|
1044
|
-
import { useContext as useContext26, useMemo as
|
|
1044
|
+
import { useCallback as useCallback11, useMemo as useMemo27, useRef as useRef16 } from "react";
|
|
1045
|
+
import { useContext as useContext26, useMemo as useMemo26 } from "react";
|
|
1045
1046
|
import React21, {
|
|
1046
1047
|
useCallback as useCallback10,
|
|
1047
1048
|
useContext as useContext25,
|
|
1048
1049
|
useEffect as useEffect9,
|
|
1049
1050
|
useLayoutEffect as useLayoutEffect6,
|
|
1050
|
-
useMemo as
|
|
1051
|
+
useMemo as useMemo25,
|
|
1051
1052
|
useRef as useRef15,
|
|
1052
1053
|
useState as useState12
|
|
1053
1054
|
} from "react";
|
|
@@ -1056,7 +1057,7 @@ import React22 from "react";
|
|
|
1056
1057
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
1057
1058
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
1058
1059
|
import { useEffect as useEffect13 } from "react";
|
|
1059
|
-
import { createContext as createContext22, useContext as useContext28, useMemo as
|
|
1060
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo28 } from "react";
|
|
1060
1061
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1061
1062
|
import {
|
|
1062
1063
|
forwardRef as forwardRef6,
|
|
@@ -1064,7 +1065,7 @@ import {
|
|
|
1064
1065
|
useEffect as useEffect15,
|
|
1065
1066
|
useImperativeHandle as useImperativeHandle5,
|
|
1066
1067
|
useLayoutEffect as useLayoutEffect8,
|
|
1067
|
-
useMemo as
|
|
1068
|
+
useMemo as useMemo30,
|
|
1068
1069
|
useRef as useRef20
|
|
1069
1070
|
} from "react";
|
|
1070
1071
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
@@ -1074,7 +1075,7 @@ import {
|
|
|
1074
1075
|
useCallback as useCallback15,
|
|
1075
1076
|
useEffect as useEffect16,
|
|
1076
1077
|
useImperativeHandle as useImperativeHandle6,
|
|
1077
|
-
useMemo as
|
|
1078
|
+
useMemo as useMemo31,
|
|
1078
1079
|
useRef as useRef21,
|
|
1079
1080
|
useState as useState15
|
|
1080
1081
|
} from "react";
|
|
@@ -1085,7 +1086,7 @@ import {
|
|
|
1085
1086
|
useCallback as useCallback16,
|
|
1086
1087
|
useContext as useContext32,
|
|
1087
1088
|
useLayoutEffect as useLayoutEffect9,
|
|
1088
|
-
useMemo as
|
|
1089
|
+
useMemo as useMemo32,
|
|
1089
1090
|
useRef as useRef22
|
|
1090
1091
|
} from "react";
|
|
1091
1092
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
@@ -1095,7 +1096,7 @@ import {
|
|
|
1095
1096
|
useContext as useContext33,
|
|
1096
1097
|
useImperativeHandle as useImperativeHandle7,
|
|
1097
1098
|
useLayoutEffect as useLayoutEffect10,
|
|
1098
|
-
useMemo as
|
|
1099
|
+
useMemo as useMemo33,
|
|
1099
1100
|
useRef as useRef23,
|
|
1100
1101
|
useState as useState16
|
|
1101
1102
|
} from "react";
|
|
@@ -1117,14 +1118,14 @@ import React31 from "react";
|
|
|
1117
1118
|
import {
|
|
1118
1119
|
useCallback as useCallback21,
|
|
1119
1120
|
useImperativeHandle as useImperativeHandle8,
|
|
1120
|
-
useMemo as
|
|
1121
|
+
useMemo as useMemo34,
|
|
1121
1122
|
useRef as useRef26,
|
|
1122
1123
|
useState as useState19
|
|
1123
1124
|
} from "react";
|
|
1124
1125
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1125
1126
|
import React32 from "react";
|
|
1126
|
-
import { useMemo as
|
|
1127
|
-
import { createContext as createContext24, useContext as useContext35, useMemo as
|
|
1127
|
+
import { useMemo as useMemo36 } from "react";
|
|
1128
|
+
import { createContext as createContext24, useContext as useContext35, useMemo as useMemo35 } from "react";
|
|
1128
1129
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1129
1130
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1130
1131
|
import React34 from "react";
|
|
@@ -1136,7 +1137,7 @@ import {
|
|
|
1136
1137
|
useContext as useContext37,
|
|
1137
1138
|
useEffect as useEffect17,
|
|
1138
1139
|
useLayoutEffect as useLayoutEffect12,
|
|
1139
|
-
useMemo as
|
|
1140
|
+
useMemo as useMemo37,
|
|
1140
1141
|
useState as useState20
|
|
1141
1142
|
} from "react";
|
|
1142
1143
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
@@ -1146,18 +1147,18 @@ import React38, {
|
|
|
1146
1147
|
useContext as useContext38,
|
|
1147
1148
|
useEffect as useEffect19,
|
|
1148
1149
|
useImperativeHandle as useImperativeHandle9,
|
|
1149
|
-
useMemo as
|
|
1150
|
+
useMemo as useMemo38,
|
|
1150
1151
|
useRef as useRef27,
|
|
1151
1152
|
useState as useState21
|
|
1152
1153
|
} from "react";
|
|
1153
1154
|
import { useEffect as useEffect18 } from "react";
|
|
1154
1155
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1155
1156
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1156
|
-
import React40, { useMemo as
|
|
1157
|
+
import React40, { useMemo as useMemo39 } from "react";
|
|
1157
1158
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1158
1159
|
import React42, {
|
|
1159
1160
|
forwardRef as forwardRef14,
|
|
1160
|
-
useMemo as
|
|
1161
|
+
useMemo as useMemo40
|
|
1161
1162
|
} from "react";
|
|
1162
1163
|
import React41 from "react";
|
|
1163
1164
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
@@ -1169,7 +1170,7 @@ import {
|
|
|
1169
1170
|
useEffect as useEffect20,
|
|
1170
1171
|
useImperativeHandle as useImperativeHandle10,
|
|
1171
1172
|
useLayoutEffect as useLayoutEffect13,
|
|
1172
|
-
useMemo as
|
|
1173
|
+
useMemo as useMemo41,
|
|
1173
1174
|
useRef as useRef28
|
|
1174
1175
|
} from "react";
|
|
1175
1176
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
@@ -2349,7 +2350,7 @@ var getSingleChildComponent = (children) => {
|
|
|
2349
2350
|
}
|
|
2350
2351
|
return child.type;
|
|
2351
2352
|
};
|
|
2352
|
-
var VERSION = "4.0.
|
|
2353
|
+
var VERSION = "4.0.500";
|
|
2353
2354
|
var checkMultipleRemotionVersions = () => {
|
|
2354
2355
|
if (typeof globalThis === "undefined") {
|
|
2355
2356
|
return;
|
|
@@ -2391,38 +2392,6 @@ __export2(exports_timeline_position_state, {
|
|
|
2391
2392
|
getFrameForComposition: () => getFrameForComposition,
|
|
2392
2393
|
clampFrameToCompositionRange: () => clampFrameToCompositionRange
|
|
2393
2394
|
});
|
|
2394
|
-
function mulberry32(a) {
|
|
2395
|
-
let t = a + 1831565813;
|
|
2396
|
-
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
2397
|
-
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
2398
|
-
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
2399
|
-
}
|
|
2400
|
-
function hashCode(str) {
|
|
2401
|
-
let i = 0;
|
|
2402
|
-
let chr = 0;
|
|
2403
|
-
let hash = 0;
|
|
2404
|
-
for (i = 0;i < str.length; i++) {
|
|
2405
|
-
chr = str.charCodeAt(i);
|
|
2406
|
-
hash = (hash << 5) - hash + chr;
|
|
2407
|
-
hash |= 0;
|
|
2408
|
-
}
|
|
2409
|
-
return hash;
|
|
2410
|
-
}
|
|
2411
|
-
var random = (seed, dummy) => {
|
|
2412
|
-
if (dummy !== undefined) {
|
|
2413
|
-
throw new TypeError("random() takes only one argument");
|
|
2414
|
-
}
|
|
2415
|
-
if (seed === null) {
|
|
2416
|
-
return Math.random();
|
|
2417
|
-
}
|
|
2418
|
-
if (typeof seed === "string") {
|
|
2419
|
-
return mulberry32(hashCode(seed));
|
|
2420
|
-
}
|
|
2421
|
-
if (typeof seed === "number") {
|
|
2422
|
-
return mulberry32(seed * 10000000000);
|
|
2423
|
-
}
|
|
2424
|
-
throw new Error("random() argument must be a number or a string");
|
|
2425
|
-
};
|
|
2426
2395
|
var SetTimelineContext = createContext13({
|
|
2427
2396
|
setFrame: () => {
|
|
2428
2397
|
throw new Error("default");
|
|
@@ -2439,7 +2408,6 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
2439
2408
|
const imperativePlaying = useRef3(false);
|
|
2440
2409
|
const [playbackRate, setPlaybackRate] = useState2(1);
|
|
2441
2410
|
const audioAndVideoTags = useRef3([]);
|
|
2442
|
-
const [remotionRootId] = useState2(() => String(random(null)));
|
|
2443
2411
|
const [_frame, setFrame] = useState2(() => getInitialFrameState());
|
|
2444
2412
|
const frame = frameState ?? _frame;
|
|
2445
2413
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
@@ -2474,10 +2442,9 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
2474
2442
|
frame,
|
|
2475
2443
|
playing,
|
|
2476
2444
|
imperativePlaying,
|
|
2477
|
-
rootId: remotionRootId,
|
|
2478
2445
|
audioAndVideoTags
|
|
2479
2446
|
};
|
|
2480
|
-
}, [frame, playing
|
|
2447
|
+
}, [frame, playing]);
|
|
2481
2448
|
const playbackRateContextValue = useMemo8(() => {
|
|
2482
2449
|
return {
|
|
2483
2450
|
playbackRate,
|
|
@@ -2866,6 +2833,29 @@ var backgroundSchema = {
|
|
|
2866
2833
|
description: "Color"
|
|
2867
2834
|
}
|
|
2868
2835
|
};
|
|
2836
|
+
var svgStrokeSchema = {
|
|
2837
|
+
stroke: {
|
|
2838
|
+
type: "color",
|
|
2839
|
+
default: "none",
|
|
2840
|
+
description: "Stroke"
|
|
2841
|
+
},
|
|
2842
|
+
strokeWidth: {
|
|
2843
|
+
type: "number",
|
|
2844
|
+
default: 1,
|
|
2845
|
+
description: "Stroke width",
|
|
2846
|
+
min: 0,
|
|
2847
|
+
step: 1,
|
|
2848
|
+
hiddenFromList: false
|
|
2849
|
+
}
|
|
2850
|
+
};
|
|
2851
|
+
var svgPaintSchema = {
|
|
2852
|
+
fill: {
|
|
2853
|
+
type: "color",
|
|
2854
|
+
default: undefined,
|
|
2855
|
+
description: "Fill"
|
|
2856
|
+
},
|
|
2857
|
+
...svgStrokeSchema
|
|
2858
|
+
};
|
|
2869
2859
|
var textContentSchema = {
|
|
2870
2860
|
children: {
|
|
2871
2861
|
type: "text-content",
|
|
@@ -2896,7 +2886,51 @@ var premountSchema = {
|
|
|
2896
2886
|
var sequencePremountSchema = {
|
|
2897
2887
|
...premountSchema
|
|
2898
2888
|
};
|
|
2889
|
+
var cropSchema = {
|
|
2890
|
+
cropLeft: {
|
|
2891
|
+
type: "number",
|
|
2892
|
+
default: 0,
|
|
2893
|
+
description: "Crop left",
|
|
2894
|
+
min: 0,
|
|
2895
|
+
max: 1,
|
|
2896
|
+
step: 0.01,
|
|
2897
|
+
hiddenFromList: false,
|
|
2898
|
+
keyframable: true
|
|
2899
|
+
},
|
|
2900
|
+
cropRight: {
|
|
2901
|
+
type: "number",
|
|
2902
|
+
default: 0,
|
|
2903
|
+
description: "Crop right",
|
|
2904
|
+
min: 0,
|
|
2905
|
+
max: 1,
|
|
2906
|
+
step: 0.01,
|
|
2907
|
+
hiddenFromList: false,
|
|
2908
|
+
keyframable: true
|
|
2909
|
+
},
|
|
2910
|
+
cropTop: {
|
|
2911
|
+
type: "number",
|
|
2912
|
+
default: 0,
|
|
2913
|
+
description: "Crop top",
|
|
2914
|
+
min: 0,
|
|
2915
|
+
max: 1,
|
|
2916
|
+
step: 0.01,
|
|
2917
|
+
hiddenFromList: false,
|
|
2918
|
+
keyframable: true
|
|
2919
|
+
},
|
|
2920
|
+
cropBottom: {
|
|
2921
|
+
type: "number",
|
|
2922
|
+
default: 0,
|
|
2923
|
+
description: "Crop bottom",
|
|
2924
|
+
min: 0,
|
|
2925
|
+
max: 1,
|
|
2926
|
+
step: 0.01,
|
|
2927
|
+
hiddenFromList: false,
|
|
2928
|
+
keyframable: true
|
|
2929
|
+
}
|
|
2930
|
+
};
|
|
2931
|
+
var sequenceCropSchema = cropSchema;
|
|
2899
2932
|
var sequenceStyleSchema = {
|
|
2933
|
+
...sequenceCropSchema,
|
|
2900
2934
|
...transformSchema,
|
|
2901
2935
|
...backgroundSchema,
|
|
2902
2936
|
...borderSchema,
|
|
@@ -2985,6 +3019,54 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
2985
3019
|
default: "none"
|
|
2986
3020
|
}
|
|
2987
3021
|
};
|
|
3022
|
+
var clampCrop = (value) => {
|
|
3023
|
+
return Math.min(1, Math.max(0, value ?? 0));
|
|
3024
|
+
};
|
|
3025
|
+
var resolveAxis = (start, end) => {
|
|
3026
|
+
const resolvedStart = clampCrop(start);
|
|
3027
|
+
const resolvedEnd = clampCrop(end);
|
|
3028
|
+
if (resolvedStart + resolvedEnd > 1) {
|
|
3029
|
+
return [0.5, 0.5];
|
|
3030
|
+
}
|
|
3031
|
+
return [resolvedStart, resolvedEnd];
|
|
3032
|
+
};
|
|
3033
|
+
var resolveSequenceCrop = ({
|
|
3034
|
+
cropLeft,
|
|
3035
|
+
cropRight,
|
|
3036
|
+
cropTop,
|
|
3037
|
+
cropBottom
|
|
3038
|
+
}) => {
|
|
3039
|
+
const [left, right] = resolveAxis(cropLeft, cropRight);
|
|
3040
|
+
const [top, bottom] = resolveAxis(cropTop, cropBottom);
|
|
3041
|
+
return { left, right, top, bottom };
|
|
3042
|
+
};
|
|
3043
|
+
var getSequenceCropClipPath = ({
|
|
3044
|
+
left,
|
|
3045
|
+
right,
|
|
3046
|
+
top,
|
|
3047
|
+
bottom,
|
|
3048
|
+
borderRadius
|
|
3049
|
+
}) => {
|
|
3050
|
+
if (left === 0 && right === 0 && top === 0 && bottom === 0) {
|
|
3051
|
+
return null;
|
|
3052
|
+
}
|
|
3053
|
+
const serializedBorderRadius = typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius;
|
|
3054
|
+
const rounded = serializedBorderRadius ? ` round ${serializedBorderRadius}` : "";
|
|
3055
|
+
return `inset(${top * 100}% ${right * 100}% ${bottom * 100}% ${left * 100}%${rounded})`;
|
|
3056
|
+
};
|
|
3057
|
+
var validateSequenceCrop = (crop, componentName = "<Sequence />") => {
|
|
3058
|
+
for (const [name, value] of Object.entries(crop)) {
|
|
3059
|
+
if (value === undefined) {
|
|
3060
|
+
continue;
|
|
3061
|
+
}
|
|
3062
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
3063
|
+
throw new TypeError(`The "${name}" prop of ${componentName} must be a finite number, but got ${String(value)}.`);
|
|
3064
|
+
}
|
|
3065
|
+
if (value < 0 || value > 1) {
|
|
3066
|
+
throw new RangeError(`The "${name}" prop of ${componentName} must be between 0 and 1, but got ${value}.`);
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
};
|
|
2988
3070
|
var SequenceManager = React12.createContext({
|
|
2989
3071
|
registerSequence: () => {
|
|
2990
3072
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -5404,7 +5486,7 @@ var withInteractivitySchema = ({
|
|
|
5404
5486
|
const flatKeys = Object.keys(flatSchema);
|
|
5405
5487
|
const Wrapped = forwardRef2((props, ref) => {
|
|
5406
5488
|
const env = useRemotionEnvironment();
|
|
5407
|
-
if (!env.isStudio || env.
|
|
5489
|
+
if (!env.isStudio || env.isRendering) {
|
|
5408
5490
|
return React14.createElement(Component, {
|
|
5409
5491
|
...props,
|
|
5410
5492
|
controls: null,
|
|
@@ -5434,7 +5516,7 @@ var withInteractivitySchema = ({
|
|
|
5434
5516
|
stackToOverrideMap[stack] = newOverrideId;
|
|
5435
5517
|
return newOverrideId;
|
|
5436
5518
|
});
|
|
5437
|
-
const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
5519
|
+
const nodePath = env.isReadOnlyStudio ? null : nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
5438
5520
|
const runtimeValues = flatKeys.map((key) => getRuntimeValueForSchemaKey({
|
|
5439
5521
|
flatSchema,
|
|
5440
5522
|
key,
|
|
@@ -5505,17 +5587,32 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5505
5587
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
5506
5588
|
_remotionInternalIsMedia: isMedia,
|
|
5507
5589
|
outlineRef: passedRefForOutline,
|
|
5590
|
+
cropLeft,
|
|
5591
|
+
cropRight,
|
|
5592
|
+
cropTop,
|
|
5593
|
+
cropBottom,
|
|
5508
5594
|
...other
|
|
5509
5595
|
}, ref) => {
|
|
5510
5596
|
const { layout = "absolute-fill" } = other;
|
|
5511
5597
|
const [id] = useState5(() => String(Math.random()));
|
|
5512
5598
|
const parentSequence = useContext18(SequenceContext);
|
|
5513
|
-
const { rootId } = useTimelineContext();
|
|
5514
5599
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
5515
5600
|
const nonce = useNonce();
|
|
5516
5601
|
if (layout !== "absolute-fill" && layout !== "none") {
|
|
5517
5602
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
5518
5603
|
}
|
|
5604
|
+
const cropProps = { cropLeft, cropRight, cropTop, cropBottom };
|
|
5605
|
+
const hasCropProp = Object.values(cropProps).some((value) => value !== undefined);
|
|
5606
|
+
if (layout === "none" && hasCropProp) {
|
|
5607
|
+
throw new TypeError('The cropLeft, cropRight, cropTop and cropBottom props of <Sequence /> are only supported with layout="absolute-fill".');
|
|
5608
|
+
}
|
|
5609
|
+
validateSequenceCrop(cropProps);
|
|
5610
|
+
const {
|
|
5611
|
+
left: resolvedCropLeft,
|
|
5612
|
+
right: resolvedCropRight,
|
|
5613
|
+
top: resolvedCropTop,
|
|
5614
|
+
bottom: resolvedCropBottom
|
|
5615
|
+
} = resolveSequenceCrop(cropProps);
|
|
5519
5616
|
if (layout === "none" && typeof other.style !== "undefined") {
|
|
5520
5617
|
throw new TypeError('If layout="none", you may not pass a style. Passed: ' + JSON.stringify(other.style));
|
|
5521
5618
|
}
|
|
@@ -5641,7 +5738,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5641
5738
|
parent: parentSequence?.id ?? null,
|
|
5642
5739
|
postmountDisplay: postmountDisplay ?? null,
|
|
5643
5740
|
premountDisplay: premountDisplay ?? null,
|
|
5644
|
-
rootId,
|
|
5645
5741
|
showInTimeline,
|
|
5646
5742
|
src: isMedia.src,
|
|
5647
5743
|
getStack: () => stackRef.current,
|
|
@@ -5668,7 +5764,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5668
5764
|
playbackRate: isMedia.data.playbackRate,
|
|
5669
5765
|
postmountDisplay: postmountDisplay ?? null,
|
|
5670
5766
|
premountDisplay: premountDisplay ?? null,
|
|
5671
|
-
rootId,
|
|
5672
5767
|
showInTimeline,
|
|
5673
5768
|
src: isMedia.data.src,
|
|
5674
5769
|
getStack: () => stackRef.current,
|
|
@@ -5695,7 +5790,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5695
5790
|
documentationLink: resolvedDocumentationLink,
|
|
5696
5791
|
parent: parentSequence?.id ?? null,
|
|
5697
5792
|
type: "sequence",
|
|
5698
|
-
rootId,
|
|
5699
5793
|
showInTimeline,
|
|
5700
5794
|
nonce: nonce.get(),
|
|
5701
5795
|
loopDisplay,
|
|
@@ -5721,7 +5815,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5721
5815
|
unregisterSequence,
|
|
5722
5816
|
parentSequence?.id,
|
|
5723
5817
|
actualDurationInFrames,
|
|
5724
|
-
rootId,
|
|
5725
5818
|
from,
|
|
5726
5819
|
trimBefore,
|
|
5727
5820
|
registeredTrimBefore,
|
|
@@ -5750,6 +5843,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5750
5843
|
children: content
|
|
5751
5844
|
});
|
|
5752
5845
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
5846
|
+
const cropClipPath = getSequenceCropClipPath({
|
|
5847
|
+
left: resolvedCropLeft,
|
|
5848
|
+
right: resolvedCropRight,
|
|
5849
|
+
top: resolvedCropTop,
|
|
5850
|
+
bottom: resolvedCropBottom,
|
|
5851
|
+
borderRadius: styleIfThere?.borderRadius
|
|
5852
|
+
});
|
|
5753
5853
|
const sequenceRef = useCallback6((node) => {
|
|
5754
5854
|
wrapperRefForOutline.current = node;
|
|
5755
5855
|
if (typeof ref === "function") {
|
|
@@ -5763,9 +5863,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5763
5863
|
flexDirection: undefined,
|
|
5764
5864
|
...width ? { width } : {},
|
|
5765
5865
|
...height ? { height } : {},
|
|
5766
|
-
...styleIfThere ?? {}
|
|
5866
|
+
...styleIfThere ?? {},
|
|
5867
|
+
...cropClipPath ? {
|
|
5868
|
+
clipPath: cropClipPath
|
|
5869
|
+
} : {}
|
|
5767
5870
|
};
|
|
5768
|
-
}, [height, styleIfThere, width]);
|
|
5871
|
+
}, [cropClipPath, height, styleIfThere, width]);
|
|
5769
5872
|
if (ref !== null && layout === "none") {
|
|
5770
5873
|
throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
|
|
5771
5874
|
}
|
|
@@ -5864,6 +5967,26 @@ var SequenceWithoutFrom = withInteractivitySchema({
|
|
|
5864
5967
|
schema: sequenceSchemaWithoutFrom,
|
|
5865
5968
|
supportsEffects: false
|
|
5866
5969
|
});
|
|
5970
|
+
var useCropStyle = ({
|
|
5971
|
+
cropLeft,
|
|
5972
|
+
cropRight,
|
|
5973
|
+
cropTop,
|
|
5974
|
+
cropBottom,
|
|
5975
|
+
style,
|
|
5976
|
+
componentName
|
|
5977
|
+
}) => {
|
|
5978
|
+
validateSequenceCrop({ cropLeft, cropRight, cropTop, cropBottom }, componentName);
|
|
5979
|
+
return useMemo16(() => {
|
|
5980
|
+
const cropClipPath = getSequenceCropClipPath({
|
|
5981
|
+
...resolveSequenceCrop({ cropLeft, cropRight, cropTop, cropBottom }),
|
|
5982
|
+
borderRadius: style?.borderRadius
|
|
5983
|
+
});
|
|
5984
|
+
if (cropClipPath === null) {
|
|
5985
|
+
return style;
|
|
5986
|
+
}
|
|
5987
|
+
return { ...style, clipPath: cropClipPath };
|
|
5988
|
+
}, [cropBottom, cropLeft, cropRight, cropTop, style]);
|
|
5989
|
+
};
|
|
5867
5990
|
var calculateImageFit = (fit, imageSize, canvasSize) => {
|
|
5868
5991
|
switch (fit) {
|
|
5869
5992
|
case "fill": {
|
|
@@ -6156,7 +6279,7 @@ var useEffectChainState = () => {
|
|
|
6156
6279
|
}
|
|
6157
6280
|
};
|
|
6158
6281
|
}, []);
|
|
6159
|
-
return
|
|
6282
|
+
return useMemo17(() => ({
|
|
6160
6283
|
get: (width, height) => {
|
|
6161
6284
|
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
6162
6285
|
if (chainStateRef.current) {
|
|
@@ -6172,7 +6295,7 @@ var useEffectChainState = () => {
|
|
|
6172
6295
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
6173
6296
|
const canvasRef = useRef8(null);
|
|
6174
6297
|
const chainState = useEffectChainState();
|
|
6175
|
-
const sourceCanvas =
|
|
6298
|
+
const sourceCanvas = useMemo18(() => {
|
|
6176
6299
|
if (typeof document === "undefined") {
|
|
6177
6300
|
return null;
|
|
6178
6301
|
}
|
|
@@ -6434,6 +6557,7 @@ var animatedImageSchema = {
|
|
|
6434
6557
|
keyframable: false
|
|
6435
6558
|
},
|
|
6436
6559
|
...baseSchema,
|
|
6560
|
+
...cropSchema,
|
|
6437
6561
|
...premountSchema,
|
|
6438
6562
|
playbackRate: {
|
|
6439
6563
|
type: "number",
|
|
@@ -6628,6 +6752,10 @@ var AnimatedImageInner = ({
|
|
|
6628
6752
|
postmountFor,
|
|
6629
6753
|
styleWhilePremounted,
|
|
6630
6754
|
styleWhilePostmounted,
|
|
6755
|
+
cropLeft,
|
|
6756
|
+
cropRight,
|
|
6757
|
+
cropTop,
|
|
6758
|
+
cropBottom,
|
|
6631
6759
|
requestInit,
|
|
6632
6760
|
effects = [],
|
|
6633
6761
|
controls,
|
|
@@ -6657,6 +6785,14 @@ var AnimatedImageInner = ({
|
|
|
6657
6785
|
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
6658
6786
|
hideWhilePremounted: "display-none"
|
|
6659
6787
|
});
|
|
6788
|
+
const croppedStyle = useCropStyle({
|
|
6789
|
+
cropLeft,
|
|
6790
|
+
cropRight,
|
|
6791
|
+
cropTop,
|
|
6792
|
+
cropBottom,
|
|
6793
|
+
style: premountingStyle,
|
|
6794
|
+
componentName: "<AnimatedImage />"
|
|
6795
|
+
});
|
|
6660
6796
|
const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
|
|
6661
6797
|
const animatedImageProps = {
|
|
6662
6798
|
src,
|
|
@@ -6668,7 +6804,7 @@ var AnimatedImageInner = ({
|
|
|
6668
6804
|
loopBehavior,
|
|
6669
6805
|
id,
|
|
6670
6806
|
className,
|
|
6671
|
-
style:
|
|
6807
|
+
style: croppedStyle ?? undefined,
|
|
6672
6808
|
requestInit,
|
|
6673
6809
|
...canvasProps
|
|
6674
6810
|
};
|
|
@@ -6809,7 +6945,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
6809
6945
|
};
|
|
6810
6946
|
}
|
|
6811
6947
|
}, []);
|
|
6812
|
-
const contextValue =
|
|
6948
|
+
const contextValue = useMemo19(() => {
|
|
6813
6949
|
return {
|
|
6814
6950
|
registerRenderAsset,
|
|
6815
6951
|
unregisterRenderAsset,
|
|
@@ -6938,14 +7074,14 @@ var Loop = ({
|
|
|
6938
7074
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
6939
7075
|
const start = iteration * durationInFrames;
|
|
6940
7076
|
const from = Math.min(start, maxFrame);
|
|
6941
|
-
const loopDisplay =
|
|
7077
|
+
const loopDisplay = useMemo20(() => {
|
|
6942
7078
|
return {
|
|
6943
7079
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
6944
7080
|
startOffset: -from,
|
|
6945
7081
|
durationInFrames
|
|
6946
7082
|
};
|
|
6947
7083
|
}, [compDuration, durationInFrames, from, times]);
|
|
6948
|
-
const loopContext =
|
|
7084
|
+
const loopContext = useMemo20(() => {
|
|
6949
7085
|
return {
|
|
6950
7086
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
6951
7087
|
durationInFrames
|
|
@@ -7317,7 +7453,7 @@ var DurationsContext = createContext20({
|
|
|
7317
7453
|
});
|
|
7318
7454
|
var DurationsContextProvider = ({ children }) => {
|
|
7319
7455
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
7320
|
-
const value =
|
|
7456
|
+
const value = useMemo21(() => {
|
|
7321
7457
|
return {
|
|
7322
7458
|
durations,
|
|
7323
7459
|
setDurations
|
|
@@ -7344,6 +7480,38 @@ var getCrossOriginValue = ({
|
|
|
7344
7480
|
}
|
|
7345
7481
|
return;
|
|
7346
7482
|
};
|
|
7483
|
+
function mulberry32(a2) {
|
|
7484
|
+
let t = a2 + 1831565813;
|
|
7485
|
+
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
7486
|
+
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
7487
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
7488
|
+
}
|
|
7489
|
+
function hashCode(str) {
|
|
7490
|
+
let i = 0;
|
|
7491
|
+
let chr = 0;
|
|
7492
|
+
let hash = 0;
|
|
7493
|
+
for (i = 0;i < str.length; i++) {
|
|
7494
|
+
chr = str.charCodeAt(i);
|
|
7495
|
+
hash = (hash << 5) - hash + chr;
|
|
7496
|
+
hash |= 0;
|
|
7497
|
+
}
|
|
7498
|
+
return hash;
|
|
7499
|
+
}
|
|
7500
|
+
var random = (seed, dummy) => {
|
|
7501
|
+
if (dummy !== undefined) {
|
|
7502
|
+
throw new TypeError("random() takes only one argument");
|
|
7503
|
+
}
|
|
7504
|
+
if (seed === null) {
|
|
7505
|
+
return Math.random();
|
|
7506
|
+
}
|
|
7507
|
+
if (typeof seed === "string") {
|
|
7508
|
+
return mulberry32(hashCode(seed));
|
|
7509
|
+
}
|
|
7510
|
+
if (typeof seed === "number") {
|
|
7511
|
+
return mulberry32(seed * 10000000000);
|
|
7512
|
+
}
|
|
7513
|
+
throw new Error("random() argument must be a number or a string");
|
|
7514
|
+
};
|
|
7347
7515
|
var playAndHandleNotAllowedError = ({
|
|
7348
7516
|
mediaRef,
|
|
7349
7517
|
mediaType,
|
|
@@ -7460,7 +7628,7 @@ var useSingletonAudioContext = ({
|
|
|
7460
7628
|
if (sampleRate !== initialSampleRate.current) {
|
|
7461
7629
|
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.`);
|
|
7462
7630
|
}
|
|
7463
|
-
const context =
|
|
7631
|
+
const context = useMemo22(() => {
|
|
7464
7632
|
if (env.isRendering) {
|
|
7465
7633
|
return null;
|
|
7466
7634
|
}
|
|
@@ -7594,9 +7762,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7594
7762
|
});
|
|
7595
7763
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
7596
7764
|
const isResuming = useRef12(null);
|
|
7597
|
-
const audioSyncAnchor =
|
|
7765
|
+
const audioSyncAnchor = useMemo23(() => ({ value: 0 }), []);
|
|
7598
7766
|
const audioSyncAnchorListeners = useRef12([]);
|
|
7599
|
-
const audioSyncAnchorEmitter =
|
|
7767
|
+
const audioSyncAnchorEmitter = useMemo23(() => {
|
|
7600
7768
|
return {
|
|
7601
7769
|
dispatch: (event) => {
|
|
7602
7770
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -7616,7 +7784,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7616
7784
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
7617
7785
|
nodesToResume.current.delete(node);
|
|
7618
7786
|
}, []);
|
|
7619
|
-
const scheduleAudioNode =
|
|
7787
|
+
const scheduleAudioNode = useMemo23(() => {
|
|
7620
7788
|
return ({
|
|
7621
7789
|
node,
|
|
7622
7790
|
mediaTimestamp,
|
|
@@ -7708,7 +7876,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7708
7876
|
audioContextIsPlayingEventually.current = false;
|
|
7709
7877
|
return ctxAndGain.suspend();
|
|
7710
7878
|
}, [ctxAndGain]);
|
|
7711
|
-
const audioContextValue =
|
|
7879
|
+
const audioContextValue = useMemo23(() => {
|
|
7712
7880
|
return {
|
|
7713
7881
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
7714
7882
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -7890,7 +8058,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7890
8058
|
});
|
|
7891
8059
|
resume?.();
|
|
7892
8060
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
7893
|
-
const audioTagsValue =
|
|
8061
|
+
const audioTagsValue = useMemo23(() => {
|
|
7894
8062
|
return {
|
|
7895
8063
|
registerAudio,
|
|
7896
8064
|
unregisterAudio,
|
|
@@ -7905,7 +8073,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7905
8073
|
unregisterAudio,
|
|
7906
8074
|
updateAudio
|
|
7907
8075
|
]);
|
|
7908
|
-
const sharedAudioTagElements =
|
|
8076
|
+
const sharedAudioTagElements = useMemo23(() => {
|
|
7909
8077
|
return refs.map(({ id, ref }) => {
|
|
7910
8078
|
return /* @__PURE__ */ jsx19("audio", {
|
|
7911
8079
|
ref,
|
|
@@ -8273,7 +8441,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8273
8441
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
8274
8442
|
loop
|
|
8275
8443
|
});
|
|
8276
|
-
const volumes =
|
|
8444
|
+
const volumes = useMemo24(() => {
|
|
8277
8445
|
if (typeof volume === "number") {
|
|
8278
8446
|
return volume;
|
|
8279
8447
|
}
|
|
@@ -8292,15 +8460,13 @@ var useBasicMediaInTimeline = ({
|
|
|
8292
8460
|
}, [initialVolume, mediaType, src, volume]);
|
|
8293
8461
|
const doesVolumeChange = typeof volume === "function";
|
|
8294
8462
|
const nonce = useNonce();
|
|
8295
|
-
const { rootId } = useTimelineContext();
|
|
8296
8463
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
8297
|
-
const memoizedResult =
|
|
8464
|
+
const memoizedResult = useMemo24(() => {
|
|
8298
8465
|
return {
|
|
8299
8466
|
volumes,
|
|
8300
8467
|
duration,
|
|
8301
8468
|
doesVolumeChange,
|
|
8302
8469
|
nonce,
|
|
8303
|
-
rootId,
|
|
8304
8470
|
finalDisplayName: displayName ?? getAssetDisplayName(src),
|
|
8305
8471
|
startMediaFrom,
|
|
8306
8472
|
src,
|
|
@@ -8311,7 +8477,6 @@ var useBasicMediaInTimeline = ({
|
|
|
8311
8477
|
duration,
|
|
8312
8478
|
doesVolumeChange,
|
|
8313
8479
|
nonce,
|
|
8314
|
-
rootId,
|
|
8315
8480
|
displayName,
|
|
8316
8481
|
src,
|
|
8317
8482
|
startMediaFrom,
|
|
@@ -8340,7 +8505,7 @@ var useMediaInTimeline = ({
|
|
|
8340
8505
|
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
8341
8506
|
const { durationInFrames } = useVideoConfig();
|
|
8342
8507
|
const mediaStartsAt = useMediaStartsAt();
|
|
8343
|
-
const { volumes, duration, doesVolumeChange, nonce,
|
|
8508
|
+
const { volumes, duration, doesVolumeChange, nonce, finalDisplayName } = useBasicMediaInTimeline({
|
|
8344
8509
|
volume,
|
|
8345
8510
|
mediaVolume,
|
|
8346
8511
|
mediaType,
|
|
@@ -8374,7 +8539,6 @@ var useMediaInTimeline = ({
|
|
|
8374
8539
|
parent: parentSequence?.id ?? null,
|
|
8375
8540
|
displayName: finalDisplayName,
|
|
8376
8541
|
documentationLink,
|
|
8377
|
-
rootId,
|
|
8378
8542
|
volume: volumes,
|
|
8379
8543
|
showInTimeline: true,
|
|
8380
8544
|
nonce: nonce.get(),
|
|
@@ -8415,7 +8579,6 @@ var useMediaInTimeline = ({
|
|
|
8415
8579
|
postmountDisplay,
|
|
8416
8580
|
loopDisplay,
|
|
8417
8581
|
documentationLink,
|
|
8418
|
-
rootId,
|
|
8419
8582
|
finalDisplayName,
|
|
8420
8583
|
isStudio,
|
|
8421
8584
|
refForOutline
|
|
@@ -8502,7 +8665,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
8502
8665
|
}
|
|
8503
8666
|
}, [blocks]);
|
|
8504
8667
|
}
|
|
8505
|
-
return
|
|
8668
|
+
return useMemo25(() => {
|
|
8506
8669
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
8507
8670
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
8508
8671
|
};
|
|
@@ -8537,7 +8700,7 @@ var useBufferState = () => {
|
|
|
8537
8700
|
const buffer = useContext26(BufferingContextReact);
|
|
8538
8701
|
const logLevel = useLogLevel();
|
|
8539
8702
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
8540
|
-
return
|
|
8703
|
+
return useMemo26(() => ({
|
|
8541
8704
|
delayPlayback: () => {
|
|
8542
8705
|
if (!addBlock) {
|
|
8543
8706
|
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");
|
|
@@ -8645,7 +8808,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
8645
8808
|
onVariableFpsVideoDetected,
|
|
8646
8809
|
pauseWhenBuffering
|
|
8647
8810
|
]);
|
|
8648
|
-
return
|
|
8811
|
+
return useMemo27(() => {
|
|
8649
8812
|
return {
|
|
8650
8813
|
isBuffering: () => bufferingRef.current,
|
|
8651
8814
|
bufferUntilFirstFrame
|
|
@@ -9316,14 +9479,14 @@ var SetMediaVolumeContext = createContext22({
|
|
|
9316
9479
|
var useMediaVolumeState = () => {
|
|
9317
9480
|
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
9318
9481
|
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
9319
|
-
return
|
|
9482
|
+
return useMemo28(() => {
|
|
9320
9483
|
return [mediaVolume, setMediaVolume];
|
|
9321
9484
|
}, [mediaVolume, setMediaVolume]);
|
|
9322
9485
|
};
|
|
9323
9486
|
var usePlayerMutedState = () => {
|
|
9324
9487
|
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
9325
9488
|
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
9326
|
-
return
|
|
9489
|
+
return useMemo28(() => {
|
|
9327
9490
|
return [playerMuted, setPlayerMuted];
|
|
9328
9491
|
}, [playerMuted, setPlayerMuted]);
|
|
9329
9492
|
};
|
|
@@ -9390,7 +9553,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9390
9553
|
requestsVideoFrame: false,
|
|
9391
9554
|
isClientSideRendering: false
|
|
9392
9555
|
});
|
|
9393
|
-
const propsToPass =
|
|
9556
|
+
const propsToPass = useMemo29(() => {
|
|
9394
9557
|
return {
|
|
9395
9558
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
9396
9559
|
src: preloadedSrc,
|
|
@@ -9407,7 +9570,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9407
9570
|
userPreferredVolume,
|
|
9408
9571
|
crossOriginValue
|
|
9409
9572
|
]);
|
|
9410
|
-
const id =
|
|
9573
|
+
const id = useMemo29(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
9411
9574
|
src,
|
|
9412
9575
|
sequenceContext?.relativeFrom,
|
|
9413
9576
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9540,7 +9703,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
9540
9703
|
const sequenceContext = useContext30(SequenceContext);
|
|
9541
9704
|
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
9542
9705
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
9543
|
-
const id =
|
|
9706
|
+
const id = useMemo30(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
9544
9707
|
props.src,
|
|
9545
9708
|
sequenceContext?.relativeFrom,
|
|
9546
9709
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9814,7 +9977,8 @@ var solidSchema = {
|
|
|
9814
9977
|
},
|
|
9815
9978
|
...transformSchema,
|
|
9816
9979
|
...backgroundSchema,
|
|
9817
|
-
...borderSchema
|
|
9980
|
+
...borderSchema,
|
|
9981
|
+
...cropSchema
|
|
9818
9982
|
};
|
|
9819
9983
|
var SolidInner = ({
|
|
9820
9984
|
color,
|
|
@@ -9836,7 +10000,7 @@ var SolidInner = ({
|
|
|
9836
10000
|
effects,
|
|
9837
10001
|
overrideId: overrideId ?? null
|
|
9838
10002
|
});
|
|
9839
|
-
const sourceCanvas =
|
|
10003
|
+
const sourceCanvas = useMemo31(() => {
|
|
9840
10004
|
if (typeof document === "undefined") {
|
|
9841
10005
|
return null;
|
|
9842
10006
|
}
|
|
@@ -9904,7 +10068,7 @@ var SolidInner = ({
|
|
|
9904
10068
|
cancelRender2,
|
|
9905
10069
|
memoizedEffects
|
|
9906
10070
|
]);
|
|
9907
|
-
const canvasStyle =
|
|
10071
|
+
const canvasStyle = useMemo31(() => {
|
|
9908
10072
|
return {
|
|
9909
10073
|
width,
|
|
9910
10074
|
height,
|
|
@@ -9935,6 +10099,10 @@ var SolidOuter = forwardRef8(({
|
|
|
9935
10099
|
hidden,
|
|
9936
10100
|
showInTimeline,
|
|
9937
10101
|
pixelDensity,
|
|
10102
|
+
cropLeft,
|
|
10103
|
+
cropRight,
|
|
10104
|
+
cropTop,
|
|
10105
|
+
cropBottom,
|
|
9938
10106
|
...props2
|
|
9939
10107
|
}, ref) => {
|
|
9940
10108
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
@@ -9942,6 +10110,14 @@ var SolidOuter = forwardRef8(({
|
|
|
9942
10110
|
useImperativeHandle6(ref, () => {
|
|
9943
10111
|
return actualRef.current;
|
|
9944
10112
|
}, []);
|
|
10113
|
+
const croppedStyle = useCropStyle({
|
|
10114
|
+
cropLeft,
|
|
10115
|
+
cropRight,
|
|
10116
|
+
cropTop,
|
|
10117
|
+
cropBottom,
|
|
10118
|
+
style: style ?? null,
|
|
10119
|
+
componentName: "<Solid />"
|
|
10120
|
+
});
|
|
9945
10121
|
return /* @__PURE__ */ jsx24(Sequence, {
|
|
9946
10122
|
layout: "none",
|
|
9947
10123
|
from,
|
|
@@ -9963,7 +10139,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9963
10139
|
height,
|
|
9964
10140
|
width,
|
|
9965
10141
|
className,
|
|
9966
|
-
style,
|
|
10142
|
+
style: croppedStyle ?? undefined,
|
|
9967
10143
|
effects,
|
|
9968
10144
|
pixelDensity
|
|
9969
10145
|
})
|
|
@@ -9992,6 +10168,17 @@ var isHtmlInCanvasSupported = () => {
|
|
|
9992
10168
|
return cachedSupport;
|
|
9993
10169
|
};
|
|
9994
10170
|
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).";
|
|
10171
|
+
var MINIMUM_CHROME_VERSION_FOR_NESTED_HTML_IN_CANVAS = 152;
|
|
10172
|
+
var getChromeMajorVersion = () => {
|
|
10173
|
+
if (typeof navigator === "undefined") {
|
|
10174
|
+
return null;
|
|
10175
|
+
}
|
|
10176
|
+
const match = navigator.userAgent.match(/\b(?:HeadlessChrome|Chrome)\/(\d+)/);
|
|
10177
|
+
if (!match) {
|
|
10178
|
+
return null;
|
|
10179
|
+
}
|
|
10180
|
+
return Number(match[1]);
|
|
10181
|
+
};
|
|
9995
10182
|
function assertHtmlInCanvasDimensions(width, height) {
|
|
9996
10183
|
if (typeof width !== "number" || typeof height !== "number") {
|
|
9997
10184
|
throw new Error(`HtmlInCanvas: \`width\` and \`height\` must be numbers. Received width=${String(width)}, height=${String(height)}.`);
|
|
@@ -10055,6 +10242,10 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10055
10242
|
}, ref) => {
|
|
10056
10243
|
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
10057
10244
|
assertHtmlInCanvasDimensions(width, height);
|
|
10245
|
+
const chromeMajorVersion = getChromeMajorVersion();
|
|
10246
|
+
if (ancestor && chromeMajorVersion !== null && chromeMajorVersion < MINIMUM_CHROME_VERSION_FOR_NESTED_HTML_IN_CANVAS) {
|
|
10247
|
+
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.`);
|
|
10248
|
+
}
|
|
10058
10249
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
10059
10250
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
10060
10251
|
const canvasHeight = Math.ceil(height * resolvedPixelDensity);
|
|
@@ -10273,20 +10464,20 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10273
10464
|
continueRender2(handle);
|
|
10274
10465
|
};
|
|
10275
10466
|
}, [width, height, continueRender2, delayRender2, canvasSizeKey]);
|
|
10276
|
-
const innerStyle =
|
|
10467
|
+
const innerStyle = useMemo32(() => {
|
|
10277
10468
|
return {
|
|
10278
10469
|
width,
|
|
10279
10470
|
height
|
|
10280
10471
|
};
|
|
10281
10472
|
}, [width, height]);
|
|
10282
|
-
const canvasStyle =
|
|
10473
|
+
const canvasStyle = useMemo32(() => {
|
|
10283
10474
|
return {
|
|
10284
10475
|
width,
|
|
10285
10476
|
height,
|
|
10286
10477
|
...style ?? {}
|
|
10287
10478
|
};
|
|
10288
10479
|
}, [height, style, width]);
|
|
10289
|
-
const ancestorValue =
|
|
10480
|
+
const ancestorValue = useMemo32(() => {
|
|
10290
10481
|
return {
|
|
10291
10482
|
requestParentPaint: () => {
|
|
10292
10483
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -10319,6 +10510,10 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
10319
10510
|
pixelDensity,
|
|
10320
10511
|
controls,
|
|
10321
10512
|
style,
|
|
10513
|
+
cropLeft,
|
|
10514
|
+
cropRight,
|
|
10515
|
+
cropTop,
|
|
10516
|
+
cropBottom,
|
|
10322
10517
|
durationInFrames,
|
|
10323
10518
|
name,
|
|
10324
10519
|
...sequenceProps
|
|
@@ -10333,6 +10528,14 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
10333
10528
|
ref.current = node;
|
|
10334
10529
|
}
|
|
10335
10530
|
}, [ref]);
|
|
10531
|
+
const croppedStyle = useCropStyle({
|
|
10532
|
+
cropLeft,
|
|
10533
|
+
cropRight,
|
|
10534
|
+
cropTop,
|
|
10535
|
+
cropBottom,
|
|
10536
|
+
style: style ?? null,
|
|
10537
|
+
componentName: "<HtmlInCanvas />"
|
|
10538
|
+
});
|
|
10336
10539
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
10337
10540
|
durationInFrames,
|
|
10338
10541
|
name: name ?? "<HtmlInCanvas>",
|
|
@@ -10351,7 +10554,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
10351
10554
|
onInit,
|
|
10352
10555
|
pixelDensity,
|
|
10353
10556
|
controls,
|
|
10354
|
-
style,
|
|
10557
|
+
style: croppedStyle ?? undefined,
|
|
10355
10558
|
children
|
|
10356
10559
|
})
|
|
10357
10560
|
});
|
|
@@ -10370,7 +10573,8 @@ var htmlInCanvasSchema = {
|
|
|
10370
10573
|
},
|
|
10371
10574
|
...transformSchema,
|
|
10372
10575
|
...backgroundSchema,
|
|
10373
|
-
...borderSchema
|
|
10576
|
+
...borderSchema,
|
|
10577
|
+
...cropSchema
|
|
10374
10578
|
};
|
|
10375
10579
|
var HtmlInCanvasWrapped = withInteractivitySchema({
|
|
10376
10580
|
Component: HtmlInCanvasInner,
|
|
@@ -10392,6 +10596,7 @@ function truncateSrcForLabel(src) {
|
|
|
10392
10596
|
}
|
|
10393
10597
|
var canvasImageSchema = {
|
|
10394
10598
|
...baseSchema,
|
|
10599
|
+
...cropSchema,
|
|
10395
10600
|
...premountSchema,
|
|
10396
10601
|
fit: {
|
|
10397
10602
|
type: "enum",
|
|
@@ -10522,7 +10727,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10522
10727
|
continueRender2(pending.handle);
|
|
10523
10728
|
pendingLoadDelayRef.current = null;
|
|
10524
10729
|
}, [continueRender2]);
|
|
10525
|
-
const sourceCanvas =
|
|
10730
|
+
const sourceCanvas = useMemo33(() => {
|
|
10526
10731
|
if (typeof document === "undefined") {
|
|
10527
10732
|
return null;
|
|
10528
10733
|
}
|
|
@@ -10736,9 +10941,14 @@ var CanvasImageInner = forwardRef10(({
|
|
|
10736
10941
|
hidden,
|
|
10737
10942
|
name,
|
|
10738
10943
|
showInTimeline,
|
|
10944
|
+
cropLeft,
|
|
10945
|
+
cropRight,
|
|
10946
|
+
cropTop,
|
|
10947
|
+
cropBottom,
|
|
10739
10948
|
stack,
|
|
10740
10949
|
controls,
|
|
10741
10950
|
_remotionInternalDocumentationLink,
|
|
10951
|
+
_remotionInternalCropComponentName,
|
|
10742
10952
|
outlineRef,
|
|
10743
10953
|
...canvasProps
|
|
10744
10954
|
}, ref) => {
|
|
@@ -10768,6 +10978,14 @@ var CanvasImageInner = forwardRef10(({
|
|
|
10768
10978
|
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
10769
10979
|
hideWhilePremounted: "display-none"
|
|
10770
10980
|
});
|
|
10981
|
+
const croppedStyle = useCropStyle({
|
|
10982
|
+
cropLeft,
|
|
10983
|
+
cropRight,
|
|
10984
|
+
cropTop,
|
|
10985
|
+
cropBottom,
|
|
10986
|
+
style: premountingStyle,
|
|
10987
|
+
componentName: _remotionInternalCropComponentName ?? "<CanvasImage />"
|
|
10988
|
+
});
|
|
10771
10989
|
return /* @__PURE__ */ jsx26(Freeze, {
|
|
10772
10990
|
frame: freezeFrame,
|
|
10773
10991
|
active: isPremountingOrPostmounting,
|
|
@@ -10799,7 +11017,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
10799
11017
|
effects,
|
|
10800
11018
|
controls,
|
|
10801
11019
|
className,
|
|
10802
|
-
style:
|
|
11020
|
+
style: croppedStyle ?? undefined,
|
|
10803
11021
|
id,
|
|
10804
11022
|
onError,
|
|
10805
11023
|
pauseWhenLoading,
|
|
@@ -11030,6 +11248,10 @@ var NativeImgInner = ({
|
|
|
11030
11248
|
style,
|
|
11031
11249
|
styleWhilePremounted,
|
|
11032
11250
|
styleWhilePostmounted,
|
|
11251
|
+
cropLeft,
|
|
11252
|
+
cropRight,
|
|
11253
|
+
cropTop,
|
|
11254
|
+
cropBottom,
|
|
11033
11255
|
controls,
|
|
11034
11256
|
outlineRef: refForOutline,
|
|
11035
11257
|
...props2
|
|
@@ -11055,6 +11277,14 @@ var NativeImgInner = ({
|
|
|
11055
11277
|
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
11056
11278
|
hideWhilePremounted: "display-none"
|
|
11057
11279
|
});
|
|
11280
|
+
const croppedStyle = useCropStyle({
|
|
11281
|
+
cropLeft,
|
|
11282
|
+
cropRight,
|
|
11283
|
+
cropTop,
|
|
11284
|
+
cropBottom,
|
|
11285
|
+
style: premountingStyle,
|
|
11286
|
+
componentName: "<Img />"
|
|
11287
|
+
});
|
|
11058
11288
|
return /* @__PURE__ */ jsx28(Freeze, {
|
|
11059
11289
|
frame: freezeFrame,
|
|
11060
11290
|
active: isPremountingOrPostmounting,
|
|
@@ -11079,7 +11309,7 @@ var NativeImgInner = ({
|
|
|
11079
11309
|
children: /* @__PURE__ */ jsx28(ImgContent, {
|
|
11080
11310
|
src,
|
|
11081
11311
|
refForOutline,
|
|
11082
|
-
style:
|
|
11312
|
+
style: croppedStyle ?? undefined,
|
|
11083
11313
|
...props2
|
|
11084
11314
|
})
|
|
11085
11315
|
})
|
|
@@ -11094,6 +11324,7 @@ var imgSchema = {
|
|
|
11094
11324
|
keyframable: false
|
|
11095
11325
|
},
|
|
11096
11326
|
...baseSchema,
|
|
11327
|
+
...cropSchema,
|
|
11097
11328
|
...premountSchema,
|
|
11098
11329
|
...transformSchema,
|
|
11099
11330
|
...backgroundSchema,
|
|
@@ -11162,6 +11393,10 @@ var ImgInner = ({
|
|
|
11162
11393
|
height,
|
|
11163
11394
|
className,
|
|
11164
11395
|
style,
|
|
11396
|
+
cropLeft,
|
|
11397
|
+
cropRight,
|
|
11398
|
+
cropTop,
|
|
11399
|
+
cropBottom,
|
|
11165
11400
|
id,
|
|
11166
11401
|
pauseWhenLoading,
|
|
11167
11402
|
maxRetries,
|
|
@@ -11193,6 +11428,10 @@ var ImgInner = ({
|
|
|
11193
11428
|
height,
|
|
11194
11429
|
className,
|
|
11195
11430
|
style,
|
|
11431
|
+
cropLeft,
|
|
11432
|
+
cropRight,
|
|
11433
|
+
cropTop,
|
|
11434
|
+
cropBottom,
|
|
11196
11435
|
id,
|
|
11197
11436
|
pauseWhenLoading: shouldPauseWhenLoading,
|
|
11198
11437
|
maxRetries,
|
|
@@ -11222,6 +11461,10 @@ var ImgInner = ({
|
|
|
11222
11461
|
effects,
|
|
11223
11462
|
className,
|
|
11224
11463
|
style,
|
|
11464
|
+
cropLeft,
|
|
11465
|
+
cropRight,
|
|
11466
|
+
cropTop,
|
|
11467
|
+
cropBottom,
|
|
11225
11468
|
id,
|
|
11226
11469
|
pauseWhenLoading: shouldPauseWhenLoading,
|
|
11227
11470
|
maxRetries,
|
|
@@ -11240,6 +11483,7 @@ var ImgInner = ({
|
|
|
11240
11483
|
showInTimeline,
|
|
11241
11484
|
stack,
|
|
11242
11485
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
11486
|
+
_remotionInternalCropComponentName: "<Img />",
|
|
11243
11487
|
controls,
|
|
11244
11488
|
outlineRef: refForOutline,
|
|
11245
11489
|
...canvasProps
|
|
@@ -11288,9 +11532,22 @@ var interactiveTextElementSchema = {
|
|
|
11288
11532
|
};
|
|
11289
11533
|
var interactiveSvgTextElementSchema = {
|
|
11290
11534
|
...interactiveElementSchema,
|
|
11535
|
+
...svgPaintSchema,
|
|
11291
11536
|
...textSchema,
|
|
11292
11537
|
...textContentSchema
|
|
11293
11538
|
};
|
|
11539
|
+
var interactiveSvgElementSchema = {
|
|
11540
|
+
...interactiveElementSchema,
|
|
11541
|
+
...svgPaintSchema
|
|
11542
|
+
};
|
|
11543
|
+
var interactiveSvgStrokeElementSchema = {
|
|
11544
|
+
...interactiveElementSchema,
|
|
11545
|
+
...svgStrokeSchema
|
|
11546
|
+
};
|
|
11547
|
+
var interactiveSvgRootElementSchema = {
|
|
11548
|
+
...interactiveBorderElementSchema,
|
|
11549
|
+
...svgPaintSchema
|
|
11550
|
+
};
|
|
11294
11551
|
var setRef = (ref, value) => {
|
|
11295
11552
|
if (typeof ref === "function") {
|
|
11296
11553
|
ref(value);
|
|
@@ -11358,8 +11615,11 @@ var makeInteractiveElement = (tag, displayName, schema) => {
|
|
|
11358
11615
|
var makeInteractiveTextElement = (tag, displayName) => {
|
|
11359
11616
|
return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
|
|
11360
11617
|
};
|
|
11361
|
-
var
|
|
11362
|
-
return makeInteractiveElement(tag, displayName,
|
|
11618
|
+
var makeInteractiveSvgElement = (tag, displayName) => {
|
|
11619
|
+
return makeInteractiveElement(tag, displayName, interactiveSvgElementSchema);
|
|
11620
|
+
};
|
|
11621
|
+
var makeInteractiveSvgStrokeElement = (tag, displayName) => {
|
|
11622
|
+
return makeInteractiveElement(tag, displayName, interactiveSvgStrokeElementSchema);
|
|
11363
11623
|
};
|
|
11364
11624
|
var Interactive = {
|
|
11365
11625
|
baseSchema,
|
|
@@ -11367,6 +11627,9 @@ var Interactive = {
|
|
|
11367
11627
|
textSchema,
|
|
11368
11628
|
backgroundSchema,
|
|
11369
11629
|
borderSchema,
|
|
11630
|
+
cropSchema,
|
|
11631
|
+
svgPaintSchema,
|
|
11632
|
+
svgStrokeSchema,
|
|
11370
11633
|
premountSchema,
|
|
11371
11634
|
sequenceSchema,
|
|
11372
11635
|
withSchema,
|
|
@@ -11375,13 +11638,13 @@ var Interactive = {
|
|
|
11375
11638
|
Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
|
|
11376
11639
|
Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
|
|
11377
11640
|
Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
|
|
11378
|
-
Circle:
|
|
11641
|
+
Circle: makeInteractiveSvgElement("circle", "<Interactive.Circle>"),
|
|
11379
11642
|
Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
|
|
11380
11643
|
Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
|
|
11381
|
-
Ellipse:
|
|
11644
|
+
Ellipse: makeInteractiveSvgElement("ellipse", "<Interactive.Ellipse>"),
|
|
11382
11645
|
Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
|
|
11383
11646
|
Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
|
|
11384
|
-
G:
|
|
11647
|
+
G: makeInteractiveSvgElement("g", "<Interactive.G>"),
|
|
11385
11648
|
H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
|
|
11386
11649
|
H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
|
|
11387
11650
|
H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
|
|
@@ -11391,19 +11654,19 @@ var Interactive = {
|
|
|
11391
11654
|
Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
|
|
11392
11655
|
Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
|
|
11393
11656
|
Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
|
|
11394
|
-
Line:
|
|
11657
|
+
Line: makeInteractiveSvgStrokeElement("line", "<Interactive.Line>"),
|
|
11395
11658
|
Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
|
|
11396
11659
|
Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
|
|
11397
11660
|
Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
|
|
11398
11661
|
P: makeInteractiveTextElement("p", "<Interactive.P>"),
|
|
11399
|
-
Path:
|
|
11662
|
+
Path: makeInteractiveSvgElement("path", "<Interactive.Path>"),
|
|
11400
11663
|
Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
|
|
11401
|
-
Rect:
|
|
11664
|
+
Rect: makeInteractiveSvgElement("rect", "<Interactive.Rect>"),
|
|
11402
11665
|
Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
|
|
11403
11666
|
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
11404
11667
|
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
11405
11668
|
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
11406
|
-
Svg: makeInteractiveElement("svg", "<Interactive.Svg>",
|
|
11669
|
+
Svg: makeInteractiveElement("svg", "<Interactive.Svg>", interactiveSvgRootElementSchema),
|
|
11407
11670
|
Text: makeInteractiveElement("text", "<Interactive.Text>", interactiveSvgTextElementSchema),
|
|
11408
11671
|
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
11409
11672
|
};
|
|
@@ -11491,7 +11754,7 @@ var CompositionManagerProvider = ({
|
|
|
11491
11754
|
getCompositions: () => currentcompositionsRef.current
|
|
11492
11755
|
};
|
|
11493
11756
|
}, []);
|
|
11494
|
-
const compositionManagerSetters =
|
|
11757
|
+
const compositionManagerSetters = useMemo34(() => {
|
|
11495
11758
|
return {
|
|
11496
11759
|
registerComposition,
|
|
11497
11760
|
unregisterComposition,
|
|
@@ -11507,7 +11770,7 @@ var CompositionManagerProvider = ({
|
|
|
11507
11770
|
unregisterFolder,
|
|
11508
11771
|
onlyRenderComposition
|
|
11509
11772
|
]);
|
|
11510
|
-
const compositionManagerContextValue =
|
|
11773
|
+
const compositionManagerContextValue = useMemo34(() => {
|
|
11511
11774
|
return {
|
|
11512
11775
|
compositions,
|
|
11513
11776
|
folders,
|
|
@@ -11629,7 +11892,7 @@ var MediaEnabledProvider = ({
|
|
|
11629
11892
|
videoEnabled,
|
|
11630
11893
|
audioEnabled
|
|
11631
11894
|
}) => {
|
|
11632
|
-
const value =
|
|
11895
|
+
const value = useMemo35(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
11633
11896
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
11634
11897
|
value,
|
|
11635
11898
|
children
|
|
@@ -11645,13 +11908,13 @@ var RemotionRootContexts = ({
|
|
|
11645
11908
|
audioEnabled,
|
|
11646
11909
|
frameState
|
|
11647
11910
|
}) => {
|
|
11648
|
-
const nonceContext =
|
|
11911
|
+
const nonceContext = useMemo36(() => {
|
|
11649
11912
|
let counter = 0;
|
|
11650
11913
|
return {
|
|
11651
11914
|
getNonce: () => counter++
|
|
11652
11915
|
};
|
|
11653
11916
|
}, []);
|
|
11654
|
-
const logging =
|
|
11917
|
+
const logging = useMemo36(() => {
|
|
11655
11918
|
return { logLevel, mountTime: Date.now() };
|
|
11656
11919
|
}, [logLevel]);
|
|
11657
11920
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -11958,7 +12221,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11958
12221
|
if (!src) {
|
|
11959
12222
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
11960
12223
|
}
|
|
11961
|
-
const id =
|
|
12224
|
+
const id = useMemo37(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
11962
12225
|
src,
|
|
11963
12226
|
sequenceContext?.cumulatedFrom,
|
|
11964
12227
|
sequenceContext?.relativeFrom,
|
|
@@ -12013,14 +12276,14 @@ var OffthreadVideoForRendering = ({
|
|
|
12013
12276
|
sequenceContext?.cumulatedNegativeFrom,
|
|
12014
12277
|
audioStreamIndex
|
|
12015
12278
|
]);
|
|
12016
|
-
const currentTime =
|
|
12279
|
+
const currentTime = useMemo37(() => {
|
|
12017
12280
|
return getExpectedMediaFrameUncorrected({
|
|
12018
12281
|
frame,
|
|
12019
12282
|
playbackRate: playbackRate || 1,
|
|
12020
12283
|
startFrom: -mediaStartsAt
|
|
12021
12284
|
}) / videoConfig.fps;
|
|
12022
12285
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
12023
|
-
const actualSrc =
|
|
12286
|
+
const actualSrc = useMemo37(() => {
|
|
12024
12287
|
return getOffthreadVideoSource({
|
|
12025
12288
|
src,
|
|
12026
12289
|
currentTime,
|
|
@@ -12108,7 +12371,7 @@ var OffthreadVideoForRendering = ({
|
|
|
12108
12371
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
12109
12372
|
}
|
|
12110
12373
|
}, [imageSrc, onError]);
|
|
12111
|
-
const className =
|
|
12374
|
+
const className = useMemo37(() => {
|
|
12112
12375
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
12113
12376
|
}, [props2.className]);
|
|
12114
12377
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -12177,7 +12440,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12177
12440
|
throw new Error("SharedAudioContext not found");
|
|
12178
12441
|
}
|
|
12179
12442
|
const videoRef = useRef27(null);
|
|
12180
|
-
const sharedSource =
|
|
12443
|
+
const sharedSource = useMemo38(() => {
|
|
12181
12444
|
if (!context.audioContext) {
|
|
12182
12445
|
return null;
|
|
12183
12446
|
}
|
|
@@ -12380,7 +12643,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12380
12643
|
current.preload = "auto";
|
|
12381
12644
|
}
|
|
12382
12645
|
}, []);
|
|
12383
|
-
const actualStyle =
|
|
12646
|
+
const actualStyle = useMemo38(() => {
|
|
12384
12647
|
return {
|
|
12385
12648
|
...style
|
|
12386
12649
|
};
|
|
@@ -12577,7 +12840,7 @@ function useRemotionContexts() {
|
|
|
12577
12840
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
12578
12841
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
12579
12842
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
12580
|
-
return
|
|
12843
|
+
return useMemo39(() => ({
|
|
12581
12844
|
compositionManagerCtx,
|
|
12582
12845
|
timelineContext,
|
|
12583
12846
|
setTimelineContext,
|
|
@@ -12686,6 +12949,7 @@ var Internals = {
|
|
|
12686
12949
|
sequenceStyleSchema,
|
|
12687
12950
|
sequenceVisualStyleSchema,
|
|
12688
12951
|
sequencePremountSchema,
|
|
12952
|
+
sequenceCropSchema,
|
|
12689
12953
|
textSchema,
|
|
12690
12954
|
transformSchema,
|
|
12691
12955
|
premountSchema,
|
|
@@ -12809,7 +13073,9 @@ var Internals = {
|
|
|
12809
13073
|
hiddenField,
|
|
12810
13074
|
durationInFramesField,
|
|
12811
13075
|
freezeField,
|
|
12812
|
-
fromField
|
|
13076
|
+
fromField,
|
|
13077
|
+
resolveSequenceCrop,
|
|
13078
|
+
useCropStyle
|
|
12813
13079
|
};
|
|
12814
13080
|
var flattenChildren = (children) => {
|
|
12815
13081
|
const childrenArray = React41.Children.toArray(children);
|
|
@@ -12879,7 +13145,7 @@ var validateSeriesSequenceProps = ({
|
|
|
12879
13145
|
return offset;
|
|
12880
13146
|
};
|
|
12881
13147
|
var SeriesInner = (props2) => {
|
|
12882
|
-
const childrenValue =
|
|
13148
|
+
const childrenValue = useMemo40(() => {
|
|
12883
13149
|
const flattenedChildren = flattenChildren(props2.children);
|
|
12884
13150
|
const renderChildren = (i, startFrame) => {
|
|
12885
13151
|
if (i === flattenedChildren.length) {
|
|
@@ -13215,7 +13481,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
13215
13481
|
const mountTime = useMountTime();
|
|
13216
13482
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
13217
13483
|
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
13218
|
-
const id =
|
|
13484
|
+
const id = useMemo41(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
13219
13485
|
props2.src,
|
|
13220
13486
|
sequenceContext?.cumulatedFrom,
|
|
13221
13487
|
sequenceContext?.relativeFrom,
|
|
@@ -13883,7 +14149,7 @@ var ExpertCard = ({ expert, Link }) => {
|
|
|
13883
14149
|
});
|
|
13884
14150
|
};
|
|
13885
14151
|
var ExpertsPageContent = ({ Link }) => {
|
|
13886
|
-
const expertsInRandomOrder =
|
|
14152
|
+
const expertsInRandomOrder = useMemo42(() => {
|
|
13887
14153
|
if (typeof window === "undefined") {
|
|
13888
14154
|
return [];
|
|
13889
14155
|
}
|